From 8a892a72e3a81a9ceb3628ddb5ace5f0149d0f2e Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 19:04:09 +0900 Subject: [PATCH 001/622] =?UTF-8?q?new=20branch=20gitignore=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9f209b3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,121 @@ +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +.static_storage/ +.media/ +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# 체섭 ignore +logs/*.txt +d_log/* +d_setting/set.php +set.php +config.php +d_session/sess_* +data/session/sess_* +*/logs/*.txt From feff33715ff6400dbe7803afeed7218d0ff6b7f0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 19:08:17 +0900 Subject: [PATCH 002/622] =?UTF-8?q?schema.sql=EC=9D=84=20=EC=9B=90?= =?UTF-8?q?=EB=9E=98=20=ED=8C=8C=EC=9D=BC=EB=8C=80=EB=A1=9C=20schema.php?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/d_setting/set.php | 6 ------ che_close/install_ok.php | 2 +- che_close/{schema.sql => schema.php} | 0 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 che_close/d_setting/set.php rename che_close/{schema.sql => schema.php} (100%) diff --git a/che_close/d_setting/set.php b/che_close/d_setting/set.php deleted file mode 100644 index bd55013e..00000000 --- a/che_close/d_setting/set.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/che_close/install_ok.php b/che_close/install_ok.php index 7081f964..6da6fcbf 100644 --- a/che_close/install_ok.php +++ b/che_close/install_ok.php @@ -1,6 +1,6 @@
재설치하려면 해당 파일을 지우세요"); diff --git a/che_close/schema.sql b/che_close/schema.php similarity index 100% rename from che_close/schema.sql rename to che_close/schema.php From 7b3b674dee273620c4239f36a0cbd7d7843bb4da Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 19:28:35 +0900 Subject: [PATCH 003/622] =?UTF-8?q?adodb=20=EC=B5=9C=EC=8B=A0=EB=B2=84?= =?UTF-8?q?=EC=A0=84=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20<=3F=20?= =?UTF-8?q?=EB=A5=BC=20<=3Fphp=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _common.php | 2 +- che_close/MYDB.php | 2 +- che_close/_119.php | 2 +- che_close/_119_b.php | 2 +- che_close/_admin1.php | 10 +- che_close/_admin1_submit.php | 2 +- che_close/_admin2.php | 10 +- che_close/_admin2_submit.php | 2 +- che_close/_admin3.php | 10 +- che_close/_admin3_submit.php | 2 +- che_close/_admin4.php | 14 +- che_close/_admin4_submit.php | 2 +- che_close/_admin5.php | 18 +- che_close/_admin5_submit.php | 2 +- che_close/_admin6.php | 10 +- che_close/_admin7.php | 20 +- che_close/_admin8.php | 10 +- che_close/_simul.php | 12 +- che_close/a_bestGeneral.php | 14 +- che_close/a_emperior.php | 12 +- che_close/a_emperior2.php | 12 +- che_close/a_genList.php | 14 +- che_close/a_hallOfFame.php | 14 +- che_close/a_history.php | 14 +- che_close/a_kingdomList.php | 14 +- che_close/a_npcList.php | 14 +- che_close/a_status.php | 16 +- che_close/a_traffic.php | 20 +- che_close/a_vote.php | 18 +- che_close/b_auction.php | 16 +- che_close/b_battleCenter.php | 22 +- che_close/b_betting.php | 24 +- che_close/b_chiefboard.php | 14 +- che_close/b_chiefcenter.php | 14 +- che_close/b_currentCity.php | 18 +- che_close/b_dipcenter.php | 18 +- che_close/b_diplomacy.php | 16 +- che_close/b_genList.php | 16 +- che_close/b_myBossInfo.php | 14 +- che_close/b_myCityInfo.php | 14 +- che_close/b_myGenInfo.php | 14 +- che_close/b_myKingdomInfo.php | 14 +- che_close/b_myPage.php | 24 +- che_close/b_nationboard.php | 14 +- che_close/b_nationrule.php | 14 +- che_close/b_tournament.php | 18 +- che_close/b_troop.php | 14 +- che_close/c_auction.php | 2 +- che_close/c_betting.php | 2 +- che_close/c_chiefboard.php | 2 +- che_close/c_dipcenter.php | 2 +- che_close/c_double.php | 2 +- che_close/c_msgsubmit.php | 2 +- che_close/c_myBossInfo.php | 2 +- che_close/c_nationboard.php | 2 +- che_close/c_nationrule.php | 2 +- che_close/c_tournament.php | 2 +- che_close/c_troop.php | 2 +- che_close/c_vacation.php | 2 +- che_close/c_vote.php | 2 +- che_close/commandlist.php | 6 +- che_close/config.php | 2 +- che_close/d_ally.php | 2 +- che_close/d_cancel.php | 2 +- che_close/d_cease.php | 2 +- che_close/d_merge.php | 2 +- che_close/d_scout.php | 2 +- che_close/d_setting/_common.php | 2 +- che_close/d_surrender.php | 2 +- che_close/data/connected.php | 2 +- che_close/error.php | 4 +- che_close/event_1.php | 2 +- che_close/event_2.php | 2 +- che_close/event_3.php | 2 +- che_close/event_4.php | 2 +- che_close/func.php | 2 +- che_close/func_auction.php | 2 +- che_close/func_history.php | 2 +- che_close/func_http.php | 2 +- che_close/func_npc.php | 2 +- che_close/func_process.php | 2 +- che_close/func_string.php | 2 +- che_close/func_tournament.php | 2 +- che_close/index.php | 2 +- che_close/install.php | 6 +- che_close/install1.php | 2 +- che_close/install2.php | 2 +- che_close/install2_ok.php | 2 +- che_close/install3_ok.php | 2 +- che_close/install_ok.php | 4 +- che_close/join.php | 18 +- che_close/join_post.php | 2 +- che_close/join_token.php | 2 +- che_close/lib.php | 2 +- che_close/login_process.php | 2 +- che_close/logout_process.php | 2 +- che_close/main.php | 58 +- che_close/map.php | 8 +- che_close/map_history.php | 2 +- che_close/msglist.php | 14 +- che_close/npc_login.php | 4 +- che_close/npc_login_process.php | 2 +- che_close/phpinfo.php | 2 +- che_close/preprocessing.php | 2 +- che_close/proc.php | 2 +- che_close/process_war.php | 2 +- che_close/processing.php | 2 +- che_close/queue.php | 2 +- che_close/reset.php | 4 +- che_close/scenario_1.php | 2 +- che_close/scenario_10.php | 2 +- che_close/scenario_11.php | 2 +- che_close/scenario_12.php | 2 +- che_close/scenario_2.php | 2 +- che_close/scenario_20.php | 2 +- che_close/scenario_21.php | 2 +- che_close/scenario_22.php | 2 +- che_close/scenario_23.php | 2 +- che_close/scenario_24.php | 2 +- che_close/scenario_25.php | 2 +- che_close/scenario_26.php | 2 +- che_close/scenario_27.php | 2 +- che_close/scenario_28.php | 2 +- che_close/scenario_3.php | 2 +- che_close/scenario_4.php | 2 +- che_close/scenario_5.php | 2 +- che_close/scenario_6.php | 2 +- che_close/scenario_7.php | 2 +- che_close/scenario_8.php | 2 +- che_close/scenario_9.php | 2 +- che_close/schema.php | 2 +- che_close/select_npc.php | 22 +- che_close/select_npc_post.php | 2 +- che_close/selection.php | 2 +- che_close/stylesheet.php | 2 +- che_close/turn.php | 2 +- che_close/turn_pop_core.php | 2 +- che_close/turn_push_core.php | 2 +- d_setting/_common.php | 2 +- d_setting/set.php | 2 +- e_lib/adodb5/.mailmap | 4 + e_lib/adodb5/LICENSE.md | 496 ++ e_lib/adodb5/README.md | 109 + e_lib/adodb5/adodb-active-record.inc.php | 725 +- e_lib/adodb5/adodb-active-recordx.inc.php | 960 +- e_lib/adodb5/adodb-csvlib.inc.php | 100 +- e_lib/adodb5/adodb-datadict.inc.php | 321 +- e_lib/adodb5/adodb-error.inc.php | 89 +- e_lib/adodb5/adodb-errorhandler.inc.php | 9 +- e_lib/adodb5/adodb-errorpear.inc.php | 36 +- e_lib/adodb5/adodb-exceptions.inc.php | 27 +- e_lib/adodb5/adodb-iterator.inc.php | 30 +- e_lib/adodb5/adodb-lib.inc.php | 536 +- e_lib/adodb5/adodb-memcache.lib.inc.php | 92 +- e_lib/adodb5/adodb-pager.inc.php | 123 +- e_lib/adodb5/adodb-pear.inc.php | 34 +- e_lib/adodb5/adodb-perf.inc.php | 372 +- e_lib/adodb5/adodb-php4.inc.php | 12 +- e_lib/adodb5/adodb-time.inc.php | 610 +- e_lib/adodb5/adodb-xmlschema.inc.php | 691 +- e_lib/adodb5/adodb-xmlschema03.inc.php | 716 +- e_lib/adodb5/adodb.inc.php | 4531 +++++----- e_lib/adodb5/composer.json | 37 + e_lib/adodb5/contrib/toxmlrpc.inc.php | 26 +- e_lib/adodb5/datadict/datadict-access.inc.php | 51 +- e_lib/adodb5/datadict/datadict-db2.inc.php | 61 +- .../adodb5/datadict/datadict-firebird.inc.php | 69 +- .../adodb5/datadict/datadict-generic.inc.php | 65 +- e_lib/adodb5/datadict/datadict-ibase.inc.php | 43 +- .../adodb5/datadict/datadict-informix.inc.php | 44 +- e_lib/adodb5/datadict/datadict-mssql.inc.php | 213 +- .../datadict/datadict-mssqlnative.inc.php | 345 +- e_lib/adodb5/datadict/datadict-mysql.inc.php | 85 +- e_lib/adodb5/datadict/datadict-oci8.inc.php | 125 +- .../adodb5/datadict/datadict-postgres.inc.php | 250 +- e_lib/adodb5/datadict/datadict-sapdb.inc.php | 44 +- e_lib/adodb5/datadict/datadict-sqlite.inc.php | 90 + e_lib/adodb5/datadict/datadict-sybase.inc.php | 181 +- e_lib/adodb5/docs/README.md | 17 + e_lib/adodb5/docs/adodb.gif | Bin 0 -> 1091 bytes e_lib/adodb5/docs/adodb2.gif | Bin 0 -> 1458 bytes e_lib/adodb5/docs/changelog.md | 491 ++ e_lib/adodb5/docs/changelog_v2.x.md | 531 ++ e_lib/adodb5/docs/changelog_v3.x.md | 242 + e_lib/adodb5/docs/changelog_v4+5.md | 109 + e_lib/adodb5/docs/changelog_v4.x.md | 722 ++ e_lib/adodb5/docs/docs-active-record.htm | 1079 --- e_lib/adodb5/docs/docs-adodb.htm | 7731 ----------------- e_lib/adodb5/docs/docs-datadict.htm | 330 - e_lib/adodb5/docs/docs-oracle.htm | 542 -- e_lib/adodb5/docs/docs-perf.htm | 965 -- e_lib/adodb5/docs/docs-session.htm | 336 - e_lib/adodb5/docs/docs-session.old.htm | 313 - e_lib/adodb5/docs/old-changelog.htm | 822 -- e_lib/adodb5/docs/readme.htm | 68 - e_lib/adodb5/docs/tips_portable_sql.htm | 367 - e_lib/adodb5/docs/tute.htm | 290 - e_lib/adodb5/drivers/adodb-access.inc.php | 59 +- e_lib/adodb5/drivers/adodb-ado.inc.php | 232 +- e_lib/adodb5/drivers/adodb-ado5.inc.php | 268 +- e_lib/adodb5/drivers/adodb-ado_access.inc.php | 44 +- e_lib/adodb5/drivers/adodb-ado_mssql.inc.php | 78 +- e_lib/adodb5/drivers/adodb-ads.inc.php | 44 +- .../drivers/adodb-borland_ibase.inc.php | 63 +- e_lib/adodb5/drivers/adodb-csv.inc.php | 104 +- e_lib/adodb5/drivers/adodb-db2.inc.php | 361 +- e_lib/adodb5/drivers/adodb-db2oci.inc.php | 226 + e_lib/adodb5/drivers/adodb-db2ora.inc.php | 86 + e_lib/adodb5/drivers/adodb-fbsql.inc.php | 143 +- e_lib/adodb5/drivers/adodb-firebird.inc.php | 60 +- e_lib/adodb5/drivers/adodb-ibase.inc.php | 691 +- e_lib/adodb5/drivers/adodb-informix.inc.php | 13 +- e_lib/adodb5/drivers/adodb-informix72.inc.php | 124 +- e_lib/adodb5/drivers/adodb-ldap.inc.php | 497 +- e_lib/adodb5/drivers/adodb-mssql.inc.php | 537 +- e_lib/adodb5/drivers/adodb-mssql_n.inc.php | 244 +- .../adodb5/drivers/adodb-mssqlnative.inc.php | 1007 ++- e_lib/adodb5/drivers/adodb-mssqlpo.inc.php | 22 +- e_lib/adodb5/drivers/adodb-mysql.inc.php | 619 +- e_lib/adodb5/drivers/adodb-mysqli.inc.php | 1130 +-- e_lib/adodb5/drivers/adodb-mysqlpo.inc.php | 90 +- e_lib/adodb5/drivers/adodb-mysqlt.inc.php | 98 +- e_lib/adodb5/drivers/adodb-netezza.inc.php | 85 +- e_lib/adodb5/drivers/adodb-oci8.inc.php | 1754 ++-- e_lib/adodb5/drivers/adodb-oci805.inc.php | 38 +- e_lib/adodb5/drivers/adodb-oci8po.inc.php | 195 +- .../adodb5/drivers/adodb-oci8quercus.inc.php | 89 + e_lib/adodb5/drivers/adodb-odbc.inc.php | 316 +- e_lib/adodb5/drivers/adodb-odbc_db2.inc.php | 143 +- e_lib/adodb5/drivers/adodb-odbc_mssql.inc.php | 213 +- .../adodb5/drivers/adodb-odbc_oracle.inc.php | 74 +- e_lib/adodb5/drivers/adodb-odbtp.inc.php | 102 +- .../drivers/adodb-odbtp_unicode.inc.php | 10 +- e_lib/adodb5/drivers/adodb-oracle.inc.php | 99 +- e_lib/adodb5/drivers/adodb-pdo.inc.php | 625 +- e_lib/adodb5/drivers/adodb-pdo_mssql.inc.php | 35 +- e_lib/adodb5/drivers/adodb-pdo_mysql.inc.php | 264 +- e_lib/adodb5/drivers/adodb-pdo_oci.inc.php | 42 +- e_lib/adodb5/drivers/adodb-pdo_pgsql.inc.php | 110 +- e_lib/adodb5/drivers/adodb-pdo_sqlite.inc.php | 68 +- e_lib/adodb5/drivers/adodb-pdo_sqlsrv.inc.php | 49 + e_lib/adodb5/drivers/adodb-postgres.inc.php | 12 +- e_lib/adodb5/drivers/adodb-postgres64.inc.php | 761 +- e_lib/adodb5/drivers/adodb-postgres7.inc.php | 333 +- e_lib/adodb5/drivers/adodb-postgres8.inc.php | 50 +- e_lib/adodb5/drivers/adodb-postgres9.inc.php | 32 + e_lib/adodb5/drivers/adodb-proxy.inc.php | 24 +- e_lib/adodb5/drivers/adodb-sapdb.inc.php | 75 +- .../adodb5/drivers/adodb-sqlanywhere.inc.php | 30 +- e_lib/adodb5/drivers/adodb-sqlite.inc.php | 381 +- e_lib/adodb5/drivers/adodb-sqlite3.inc.php | 438 + e_lib/adodb5/drivers/adodb-sqlitepo.inc.php | 22 +- e_lib/adodb5/drivers/adodb-sybase.inc.php | 361 +- e_lib/adodb5/drivers/adodb-sybase_ase.inc.php | 41 +- e_lib/adodb5/drivers/adodb-vfp.inc.php | 60 +- e_lib/adodb5/lang/adodb-ar.inc.php | 55 +- e_lib/adodb5/lang/adodb-bg.inc.php | 57 +- e_lib/adodb5/lang/adodb-bgutf8.inc.php | 37 - e_lib/adodb5/lang/adodb-ca.inc.php | 23 +- e_lib/adodb5/lang/adodb-cn.inc.php | 56 +- e_lib/adodb5/lang/adodb-cz.inc.php | 41 +- e_lib/adodb5/lang/adodb-da.inc.php | 13 +- e_lib/adodb5/lang/adodb-de.inc.php | 25 +- e_lib/adodb5/lang/adodb-en.inc.php | 6 +- ...odb-esperanto.inc.php => adodb-eo.inc.php} | 11 +- e_lib/adodb5/lang/adodb-es.inc.php | 1 - e_lib/adodb5/lang/adodb-fa.inc.php | 55 +- e_lib/adodb5/lang/adodb-fr.inc.php | 27 +- e_lib/adodb5/lang/adodb-hu.inc.php | 51 +- e_lib/adodb5/lang/adodb-it.inc.php | 5 +- e_lib/adodb5/lang/adodb-nl.inc.php | 1 - e_lib/adodb5/lang/adodb-pl.inc.php | 37 +- e_lib/adodb5/lang/adodb-pt-br.inc.php | 43 +- e_lib/adodb5/lang/adodb-ro.inc.php | 1 - e_lib/adodb5/lang/adodb-ru.inc.php | 34 + e_lib/adodb5/lang/adodb-ru1251.inc.php | 35 - e_lib/adodb5/lang/adodb-sv.inc.php | 25 +- e_lib/adodb5/lang/adodb-th.inc.php | 32 + e_lib/adodb5/lang/adodb-uk.inc.php | 34 + e_lib/adodb5/lang/adodb-uk1251.inc.php | 35 - e_lib/adodb5/lang/adodb_th.inc.php | 33 - e_lib/adodb5/license.txt | 182 - e_lib/adodb5/pear/Auth/Container/ADOdb.php | 51 +- e_lib/adodb5/pear/auth_adodb_example.php | 25 + e_lib/adodb5/pear/readme.Auth.txt | 2 +- e_lib/adodb5/perf/perf-db2.inc.php | 50 +- e_lib/adodb5/perf/perf-informix.inc.php | 37 +- e_lib/adodb5/perf/perf-mssql.inc.php | 60 +- e_lib/adodb5/perf/perf-mssqlnative.inc.php | 60 +- e_lib/adodb5/perf/perf-mysql.inc.php | 143 +- e_lib/adodb5/perf/perf-oci8.inc.php | 427 +- e_lib/adodb5/perf/perf-postgres.inc.php | 57 +- e_lib/adodb5/pivottable.inc.php | 99 +- e_lib/adodb5/readme.txt | 62 - e_lib/adodb5/rsfilter.inc.php | 31 +- e_lib/adodb5/server.php | 46 +- e_lib/adodb5/session/adodb-compress-bzip2.php | 10 +- e_lib/adodb5/session/adodb-compress-gzip.php | 10 +- e_lib/adodb5/session/adodb-cryptsession.php | 8 +- e_lib/adodb5/session/adodb-cryptsession2.php | 8 +- e_lib/adodb5/session/adodb-encrypt-mcrypt.php | 10 +- e_lib/adodb5/session/adodb-encrypt-md5.php | 8 +- e_lib/adodb5/session/adodb-encrypt-secret.php | 8 +- e_lib/adodb5/session/adodb-encrypt-sha1.php | 5 +- e_lib/adodb5/session/adodb-session-clob.php | 8 +- e_lib/adodb5/session/adodb-session-clob2.php | 8 +- e_lib/adodb5/session/adodb-session.php | 90 +- e_lib/adodb5/session/adodb-session2.php | 198 +- .../session/adodb-sessions.mysql.sql.orig | 16 - .../adodb-sessions.oracle.clob.sql.orig | 15 - .../session/adodb-sessions.oracle.sql.orig | 16 - e_lib/adodb5/session/crypt.inc.php | 4 - .../adodb5/session/old/adodb-cryptsession.php | 93 +- .../adodb5/session/old/adodb-session-clob.php | 140 +- e_lib/adodb5/session/old/adodb-session.php | 156 +- e_lib/adodb5/session/old/crypt.inc.php | 1 - e_lib/adodb5/session/session_schema.xml | 2 +- e_lib/adodb5/session/session_schema.xml.orig | 26 - e_lib/adodb5/session/session_schema2.xml | 8 +- e_lib/adodb5/session/session_schema2.xml.orig | 38 - e_lib/adodb5/tests/benchmark.php | 84 - e_lib/adodb5/tests/client.php | 198 - e_lib/adodb5/tests/pdo.php | 94 - e_lib/adodb5/tests/test-active-record.php | 141 - e_lib/adodb5/tests/test-active-recs2.php | 75 - e_lib/adodb5/tests/test-active-relations.php | 87 - e_lib/adodb5/tests/test-active-relationsx.php | 419 - e_lib/adodb5/tests/test-datadict.php | 250 - e_lib/adodb5/tests/test-perf.php | 50 - e_lib/adodb5/tests/test-pgblob.php | 88 - e_lib/adodb5/tests/test-php5.php | 115 - e_lib/adodb5/tests/test-xmlschema.php | 54 - e_lib/adodb5/tests/test.php | 1748 ---- e_lib/adodb5/tests/test2.php | 26 - e_lib/adodb5/tests/test3.php | 44 - e_lib/adodb5/tests/test4.php | 143 - e_lib/adodb5/tests/test5.php | 47 - e_lib/adodb5/tests/test_rs_array.php | 47 - e_lib/adodb5/tests/testcache.php | 29 - e_lib/adodb5/tests/testdatabases.inc.php | 452 - e_lib/adodb5/tests/testgenid.php | 36 - e_lib/adodb5/tests/testmssql.php | 76 - e_lib/adodb5/tests/testoci8.php | 83 - e_lib/adodb5/tests/testoci8cursor.php | 111 - e_lib/adodb5/tests/testpaging.php | 86 - e_lib/adodb5/tests/testpear.php | 34 - e_lib/adodb5/tests/testsessions.php | 98 - e_lib/adodb5/tests/time.php | 18 - e_lib/adodb5/tests/tmssql.php | 80 - e_lib/adodb5/tests/xmlschema-mssql.xml | 34 - e_lib/adodb5/tests/xmlschema-mssql.xml.orig | 34 - e_lib/adodb5/tests/xmlschema.xml | 33 - e_lib/adodb5/tests/xmlschema.xml.orig | 33 - e_lib/adodb5/toexport.inc.php | 40 +- e_lib/adodb5/tohtml.inc.php | 56 +- e_lib/adodb5/xmlschema.dtd | 2 +- e_lib/adodb5/xmlschema.dtd.orig | 39 - e_lib/adodb5/xsl/convert-0.1-0.2.xsl | 70 +- e_lib/adodb5/xsl/convert-0.1-0.2.xsl.orig | 205 - e_lib/adodb5/xsl/convert-0.1-0.3.xsl | 72 +- e_lib/adodb5/xsl/convert-0.1-0.3.xsl.orig | 221 - e_lib/adodb5/xsl/convert-0.2-0.1.xsl | 72 +- e_lib/adodb5/xsl/convert-0.2-0.1.xsl.orig | 207 - e_lib/adodb5/xsl/convert-0.2-0.3.xsl | 98 +- e_lib/adodb5/xsl/convert-0.2-0.3.xsl.orig | 281 - e_lib/adodb5/xsl/remove-0.2.xsl | 20 +- e_lib/adodb5/xsl/remove-0.2.xsl.orig | 54 - e_lib/adodb5/xsl/remove-0.3.xsl | 20 +- e_lib/adodb5/xsl/remove-0.3.xsl.orig | 54 - f_config/DB.php | 2 +- f_config/DBS.php | 2 +- f_config/MAIL.php | 2 +- f_config/SESSION.php | 2 +- f_config/SETTING.php | 2 +- f_config/SETTINGS.php | 2 +- f_config/_common.php | 2 +- f_config/app.php | 2 +- f_config/config.php | 2 +- f_func/_common.php | 2 +- f_func/class._Chat.php | 2 +- f_func/class._DB.php | 2 +- f_func/class._JSON.php | 2 +- f_func/class._Lock.php | 2 +- f_func/class._Log.php | 2 +- f_func/class._Mail.php | 2 +- f_func/class._Process.php | 2 +- f_func/class._Queue.php | 2 +- f_func/class._Session.php | 2 +- f_func/class._Setting.php | 2 +- f_func/class._String.php | 2 +- f_func/class._Time.php | 2 +- f_func/class._Validation.php | 2 +- f_func/func.php | 2 +- f_install/_common.php | 2 +- f_install/install.php | 2 +- f_install/install1.php | 2 +- f_install/install1Post.php | 4 +- f_install/install2.php | 2 +- f_install/install2Post.php | 2 +- f_retrival/_common.php | 2 +- i_banner/banner.php | 22 +- i_entrance/Frame.php | 14 +- i_entrance/_common.php | 2 +- i_entrance/adminInc.php | 6 +- i_entrance/adminPost.php | 2 +- i_entrance/donation/Frame.php | 2 +- i_entrance/donation/Get.php | 2 +- i_entrance/donation/Post.php | 2 +- i_entrance/donation/_common.php | 2 +- i_entrance/donation/calculatePost.php | 2 +- i_entrance/enterPost.php | 2 +- i_entrance/entrance.php | 4 +- i_entrance/logoutPost.php | 2 +- i_entrance/manage/Frame.php | 2 +- i_entrance/manage/Get.php | 2 +- i_entrance/manage/_common.php | 2 +- i_entrance/manage/deletePost.php | 2 +- i_entrance/manage/iconPost.php | 2 +- i_entrance/manage/passwordPost.php | 2 +- i_entrance/manage/quitPost.php | 2 +- i_entrance/member/Frame.php | 2 +- i_entrance/member/Get.php | 2 +- i_entrance/member/Post.php | 2 +- i_entrance/member/_common.php | 2 +- i_entrance/serverListPost.php | 2 +- i_login/Frame.php | 16 +- i_login/Post.php | 2 +- i_login/_common.php | 2 +- i_login/findpw/Frame.php | 2 +- i_login/findpw/Get.php | 2 +- i_login/findpw/Post.php | 2 +- i_login/findpw/_common.php | 2 +- i_login/findpw/checkPost.php | 2 +- i_login/findpw/sendCodePost.php | 2 +- i_login/findpw/verifyCodePost.php | 2 +- i_login/join/Frame.php | 2 +- i_login/join/Get.php | 2 +- i_login/join/Post.php | 2 +- i_login/join/_common.php | 2 +- i_login/join/checkPost.php | 2 +- i_login/join/sendCodePost.php | 2 +- i_login/join/verifyCodePost.php | 2 +- i_login/login.php | 4 +- i_other/_common.php | 2 +- i_other/help.php | 22 +- i_other/screenshot.php | 6 +- i_popup/Frame.php | 2 +- i_popup/_common.php | 2 +- index.php | 2 +- install.php | 2 +- 450 files changed, 19425 insertions(+), 32248 deletions(-) create mode 100644 e_lib/adodb5/.mailmap create mode 100644 e_lib/adodb5/LICENSE.md create mode 100644 e_lib/adodb5/README.md create mode 100644 e_lib/adodb5/composer.json create mode 100644 e_lib/adodb5/datadict/datadict-sqlite.inc.php create mode 100644 e_lib/adodb5/docs/README.md create mode 100644 e_lib/adodb5/docs/adodb.gif create mode 100644 e_lib/adodb5/docs/adodb2.gif create mode 100644 e_lib/adodb5/docs/changelog.md create mode 100644 e_lib/adodb5/docs/changelog_v2.x.md create mode 100644 e_lib/adodb5/docs/changelog_v3.x.md create mode 100644 e_lib/adodb5/docs/changelog_v4+5.md create mode 100644 e_lib/adodb5/docs/changelog_v4.x.md delete mode 100644 e_lib/adodb5/docs/docs-active-record.htm delete mode 100644 e_lib/adodb5/docs/docs-adodb.htm delete mode 100644 e_lib/adodb5/docs/docs-datadict.htm delete mode 100644 e_lib/adodb5/docs/docs-oracle.htm delete mode 100644 e_lib/adodb5/docs/docs-perf.htm delete mode 100644 e_lib/adodb5/docs/docs-session.htm delete mode 100644 e_lib/adodb5/docs/docs-session.old.htm delete mode 100644 e_lib/adodb5/docs/old-changelog.htm delete mode 100644 e_lib/adodb5/docs/readme.htm delete mode 100644 e_lib/adodb5/docs/tips_portable_sql.htm delete mode 100644 e_lib/adodb5/docs/tute.htm create mode 100644 e_lib/adodb5/drivers/adodb-db2oci.inc.php create mode 100644 e_lib/adodb5/drivers/adodb-db2ora.inc.php create mode 100644 e_lib/adodb5/drivers/adodb-oci8quercus.inc.php create mode 100644 e_lib/adodb5/drivers/adodb-pdo_sqlsrv.inc.php create mode 100644 e_lib/adodb5/drivers/adodb-postgres9.inc.php create mode 100644 e_lib/adodb5/drivers/adodb-sqlite3.inc.php delete mode 100644 e_lib/adodb5/lang/adodb-bgutf8.inc.php rename e_lib/adodb5/lang/{adodb-esperanto.inc.php => adodb-eo.inc.php} (85%) create mode 100644 e_lib/adodb5/lang/adodb-ru.inc.php delete mode 100644 e_lib/adodb5/lang/adodb-ru1251.inc.php create mode 100644 e_lib/adodb5/lang/adodb-th.inc.php create mode 100644 e_lib/adodb5/lang/adodb-uk.inc.php delete mode 100644 e_lib/adodb5/lang/adodb-uk1251.inc.php delete mode 100644 e_lib/adodb5/lang/adodb_th.inc.php delete mode 100644 e_lib/adodb5/license.txt create mode 100644 e_lib/adodb5/pear/auth_adodb_example.php delete mode 100644 e_lib/adodb5/readme.txt delete mode 100644 e_lib/adodb5/session/adodb-sessions.mysql.sql.orig delete mode 100644 e_lib/adodb5/session/adodb-sessions.oracle.clob.sql.orig delete mode 100644 e_lib/adodb5/session/adodb-sessions.oracle.sql.orig delete mode 100644 e_lib/adodb5/session/session_schema.xml.orig delete mode 100644 e_lib/adodb5/session/session_schema2.xml.orig delete mode 100644 e_lib/adodb5/tests/benchmark.php delete mode 100644 e_lib/adodb5/tests/client.php delete mode 100644 e_lib/adodb5/tests/pdo.php delete mode 100644 e_lib/adodb5/tests/test-active-record.php delete mode 100644 e_lib/adodb5/tests/test-active-recs2.php delete mode 100644 e_lib/adodb5/tests/test-active-relations.php delete mode 100644 e_lib/adodb5/tests/test-active-relationsx.php delete mode 100644 e_lib/adodb5/tests/test-datadict.php delete mode 100644 e_lib/adodb5/tests/test-perf.php delete mode 100644 e_lib/adodb5/tests/test-pgblob.php delete mode 100644 e_lib/adodb5/tests/test-php5.php delete mode 100644 e_lib/adodb5/tests/test-xmlschema.php delete mode 100644 e_lib/adodb5/tests/test.php delete mode 100644 e_lib/adodb5/tests/test2.php delete mode 100644 e_lib/adodb5/tests/test3.php delete mode 100644 e_lib/adodb5/tests/test4.php delete mode 100644 e_lib/adodb5/tests/test5.php delete mode 100644 e_lib/adodb5/tests/test_rs_array.php delete mode 100644 e_lib/adodb5/tests/testcache.php delete mode 100644 e_lib/adodb5/tests/testdatabases.inc.php delete mode 100644 e_lib/adodb5/tests/testgenid.php delete mode 100644 e_lib/adodb5/tests/testmssql.php delete mode 100644 e_lib/adodb5/tests/testoci8.php delete mode 100644 e_lib/adodb5/tests/testoci8cursor.php delete mode 100644 e_lib/adodb5/tests/testpaging.php delete mode 100644 e_lib/adodb5/tests/testpear.php delete mode 100644 e_lib/adodb5/tests/testsessions.php delete mode 100644 e_lib/adodb5/tests/time.php delete mode 100644 e_lib/adodb5/tests/tmssql.php delete mode 100644 e_lib/adodb5/tests/xmlschema-mssql.xml delete mode 100644 e_lib/adodb5/tests/xmlschema-mssql.xml.orig delete mode 100644 e_lib/adodb5/tests/xmlschema.xml delete mode 100644 e_lib/adodb5/tests/xmlschema.xml.orig delete mode 100644 e_lib/adodb5/xmlschema.dtd.orig delete mode 100644 e_lib/adodb5/xsl/convert-0.1-0.2.xsl.orig delete mode 100644 e_lib/adodb5/xsl/convert-0.1-0.3.xsl.orig delete mode 100644 e_lib/adodb5/xsl/convert-0.2-0.1.xsl.orig delete mode 100644 e_lib/adodb5/xsl/convert-0.2-0.3.xsl.orig delete mode 100644 e_lib/adodb5/xsl/remove-0.2.xsl.orig delete mode 100644 e_lib/adodb5/xsl/remove-0.3.xsl.orig diff --git a/_common.php b/_common.php index 6268a06c..66df4ed9 100644 --- a/_common.php +++ b/_common.php @@ -1,4 +1,4 @@ - - +
게 임 관 리
게 임 관 리
@@ -91,7 +91,7 @@ $admin = getAdmin($connect); -
군량
- - + +
diff --git a/che_close/_admin1_submit.php b/che_close/_admin1_submit.php index 30a77a19..3f3bd5b2 100644 --- a/che_close/_admin1_submit.php +++ b/che_close/_admin1_submit.php @@ -1,4 +1,4 @@ - - +
회 원 관 리
회 원 관 리
@@ -60,7 +60,7 @@ $admin = MYDB_fetch_array($result);
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
-"; @@ -142,8 +142,8 @@ for($i=0; $i < 27; $i++) {
- - + +
diff --git a/che_close/_admin2_submit.php b/che_close/_admin2_submit.php index 8df79d68..295d675e 100644 --- a/che_close/_admin2_submit.php +++ b/che_close/_admin2_submit.php @@ -1,4 +1,4 @@ - - +
특 별 회 원
특 별 회 원
회원선택

무장
지장
-"; @@ -93,8 +93,8 @@ for($i=0; $i < 27; $i++) {
- - + +
diff --git a/che_close/_admin3_submit.php b/che_close/_admin3_submit.php index c80df3ee..60ed41b5 100644 --- a/che_close/_admin3_submit.php +++ b/che_close/_admin3_submit.php @@ -1,4 +1,4 @@ - - +
멀 티 관 리
멀 티 관 리
-1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ipCount = MYDB_num_rows($result); @@ -145,7 +145,7 @@ echo " -1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ipCount = MYDB_num_rows($result); @@ -186,8 +186,8 @@ echo "
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
-"; @@ -97,7 +97,7 @@ echo " -
-
- - + +
diff --git a/che_close/_admin4_submit.php b/che_close/_admin4_submit.php index 84a5cf04..344f7def 100644 --- a/che_close/_admin4_submit.php +++ b/che_close/_admin4_submit.php @@ -1,4 +1,4 @@ - - + -
일 제 정 보
일 제 정 보
정렬순서 : "; "; -수비
국명
- +
@@ -260,7 +260,7 @@ for($i=0; $i < $nationCount; $i++) { -국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)"; break; @@ -273,7 +273,7 @@ case 6: echo ""; break; } ?> -
국가수 장수수기타
- - + +
diff --git a/che_close/_admin5_submit.php b/che_close/_admin5_submit.php index 6603e029..3a6bcb98 100644 --- a/che_close/_admin5_submit.php +++ b/che_close/_admin5_submit.php @@ -1,4 +1,4 @@ - - + -
접 속 정 보
접 속 정 보
정렬순서 : 총로그인 갱신/로그인
- - + +
diff --git a/che_close/_admin7.php b/che_close/_admin7.php index dc6c5f7c..c2013275 100644 --- a/che_close/_admin7.php +++ b/che_close/_admin7.php @@ -1,4 +1,4 @@ - - + @@ -106,10 +106,10 @@ for($i=0; $i < $gencount; $i++) { @@ -118,16 +118,16 @@ for($i=0; $i < $gencount; $i++) {
로 그 정 보
로 그 정 보
정렬순서 : @@ -58,7 +58,7 @@ $sel[$type] = "selected"; 대상장수 :
- +  
- + - +
- + - +
- - + +
diff --git a/che_close/_admin8.php b/che_close/_admin8.php index 61e5b9f6..3bc04662 100644 --- a/che_close/_admin8.php +++ b/che_close/_admin8.php @@ -1,4 +1,4 @@ - - + -
외 교 정 보
외 교 정 보
정렬순서 : @@ -65,7 +65,7 @@ $sel[$type] = "selected"; 기 간 비 고
- - + +
diff --git a/che_close/_simul.php b/che_close/_simul.php index 033e05ec..b993bd97 100644 --- a/che_close/_simul.php +++ b/che_close/_simul.php @@ -1,4 +1,4 @@ - - + @@ -1480,7 +1480,7 @@ input { background-color:black;color:white; } -- - - + -= 2) { printLimitMsg($me[turntime]); exit(); } 명장일람 - + - +
명 장 일 람
명 장 일 람
@@ -39,7 +39,7 @@ if($con >= 2) { printLimitMsg($me[turntime]); exit(); }
-=2"; } else { $sel = "npc<2"; } @@ -270,10 +270,10 @@ for($i=0; $i < 4; $i++) { ?>
- - + +
- + diff --git a/che_close/a_emperior.php b/che_close/a_emperior.php index 784b4e8a..6159ac2e 100644 --- a/che_close/a_emperior.php +++ b/che_close/a_emperior.php @@ -1,4 +1,4 @@ - 왕조일람 - + @@ -21,7 +21,7 @@ increaseRefresh($connect, "왕조일람", 2); - - - + +
- + diff --git a/che_close/a_emperior2.php b/che_close/a_emperior2.php index 4a466bc4..c3d9e8c5 100644 --- a/che_close/a_emperior2.php +++ b/che_close/a_emperior2.php @@ -1,4 +1,4 @@ - 왕조일람 - + @@ -21,7 +21,7 @@ increaseRefresh($connect, "왕조일람", 2); - - - + +
- + diff --git a/che_close/a_genList.php b/che_close/a_genList.php index 4e7411a7..21c54ed7 100644 --- a/che_close/a_genList.php +++ b/che_close/a_genList.php @@ -1,4 +1,4 @@ - 장수일람 - + - +
장 수 일 람
장 수 일 람
정렬순서 :
- - - + +
- + diff --git a/che_close/a_hallOfFame.php b/che_close/a_hallOfFame.php index 25312314..3eecaadd 100644 --- a/che_close/a_hallOfFame.php +++ b/che_close/a_hallOfFame.php @@ -1,4 +1,4 @@ - 명예의 전당 - + - +
명 예 의 전 당
명 예 의 전 당
-
- - + +
- + diff --git a/che_close/a_history.php b/che_close/a_history.php index 917b9c8a..83cfe509 100644 --- a/che_close/a_history.php +++ b/che_close/a_history.php @@ -1,4 +1,4 @@ - 연감 - + - +
연 감
연 감
년월 선택 :
- - + +
- + diff --git a/che_close/a_kingdomList.php b/che_close/a_kingdomList.php index 18920754..108b78cf 100644 --- a/che_close/a_kingdomList.php +++ b/che_close/a_kingdomList.php @@ -1,4 +1,4 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } 세력일람 - + - +
세 력 일 람
세 력 일 람
- - - + +
- + diff --git a/che_close/a_npcList.php b/che_close/a_npcList.php index 87b917a7..2a94a39d 100644 --- a/che_close/a_npcList.php +++ b/che_close/a_npcList.php @@ -1,4 +1,4 @@ - 빙의일람 - + - +
빙 의 일 람
빙 의 일 람
정렬순서 :
- - - + +
- + diff --git a/che_close/a_status.php b/che_close/a_status.php index a21727b4..c9dafa4c 100644 --- a/che_close/a_status.php +++ b/che_close/a_status.php @@ -1,4 +1,4 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } 세력도 - + - +
세 력 도
세 력 도
- +
-
- + - - + - + -메시지리스트 - + - 전체 메세지(최고75자)
- +
개인 메세지(최고75자)
- + - + 국가 메세지(최고75자)
- + diff --git a/che_close/npc_login.php b/che_close/npc_login.php index 3210b5d7..920acf5d 100644 --- a/che_close/npc_login.php +++ b/che_close/npc_login.php @@ -1,4 +1,4 @@ -NPC로그인 - + diff --git a/che_close/npc_login_process.php b/che_close/npc_login_process.php index 9e3851c4..3dd7c0e5 100644 --- a/che_close/npc_login_process.php +++ b/che_close/npc_login_process.php @@ -1,4 +1,4 @@ - diff --git a/che_close/preprocessing.php b/che_close/preprocessing.php index 37c27c5d..bcd7780b 100644 --- a/che_close/preprocessing.php +++ b/che_close/preprocessing.php @@ -1,4 +1,4 @@ -
디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); @fclose($file); @mkdir("data",0707); @chmod("data",0707); diff --git a/che_close/scenario_1.php b/che_close/scenario_1.php index 135bf597..d62efaf9 100644 --- a/che_close/scenario_1.php +++ b/che_close/scenario_1.php @@ -1,4 +1,4 @@ -NPC선택 - +
- +
장 수 선 택
장 수 선 택
- +
-= $admin[maxgeneral]) { - -= 3) { ?> - diff --git a/che_close/new_lib.php b/che_close/new_lib.php index 91f726ac..02f1b34c 100644 --- a/che_close/new_lib.php +++ b/che_close/new_lib.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/che_close/templates/.htaccess b/che_close/templates/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/che_close/templates/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/d_log/.htaccess b/d_log/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/d_log/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/d_log/err.txt b/d_log/err.txt index c0b36fde..e49b9529 100644 --- a/d_log/err.txt +++ b/d_log/err.txt @@ -15,3 +15,4 @@ DB Connect() error: test DB Connect() error: test DB Connect() error: test DB Connect() error: test +이미 설치되어 있습니다. 재설치하려면 설정 파일을 지우세요. diff --git a/e_lib/includes.php b/e_lib/includes.php new file mode 100644 index 00000000..b34f78a2 --- /dev/null +++ b/e_lib/includes.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/e_lib/meekrodb.2.3.class.php b/e_lib/meekrodb.2.3.class.php new file mode 100644 index 00000000..e63d9669 --- /dev/null +++ b/e_lib/meekrodb.2.3.class.php @@ -0,0 +1,956 @@ +. +*/ + + +class DB { + // initial connection + public static $dbName = ''; + public static $user = ''; + public static $password = ''; + public static $host = 'localhost'; + public static $port = null; + public static $encoding = 'latin1'; + + // configure workings + public static $param_char = '%'; + public static $named_param_seperator = '_'; + public static $success_handler = false; + public static $error_handler = true; + public static $throw_exception_on_error = false; + public static $nonsql_error_handler = null; + public static $throw_exception_on_nonsql_error = false; + public static $nested_transactions = false; + public static $usenull = true; + public static $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); + public static $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); + + // internal + protected static $mdb = null; + + public static function getMDB() { + $mdb = DB::$mdb; + + if ($mdb === null) { + $mdb = DB::$mdb = new MeekroDB(); + } + + static $variables_to_sync = array('param_char', 'named_param_seperator', 'success_handler', 'error_handler', 'throw_exception_on_error', + 'nonsql_error_handler', 'throw_exception_on_nonsql_error', 'nested_transactions', 'usenull', 'ssl', 'connect_options'); + + $db_class_vars = get_class_vars('DB'); // the DB::$$var syntax only works in 5.3+ + + foreach ($variables_to_sync as $variable) { + if ($mdb->$variable !== $db_class_vars[$variable]) { + $mdb->$variable = $db_class_vars[$variable]; + } + } + + return $mdb; + } + + // yes, this is ugly. __callStatic() only works in 5.3+ + public static function get() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'get'), $args); } + public static function disconnect() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'disconnect'), $args); } + public static function query() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'query'), $args); } + public static function queryFirstRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstRow'), $args); } + public static function queryOneRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneRow'), $args); } + public static function queryAllLists() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryAllLists'), $args); } + public static function queryFullColumns() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFullColumns'), $args); } + public static function queryFirstList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstList'), $args); } + public static function queryOneList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneList'), $args); } + public static function queryFirstColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstColumn'), $args); } + public static function queryOneColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneColumn'), $args); } + public static function queryFirstField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstField'), $args); } + public static function queryOneField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneField'), $args); } + public static function queryRaw() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRaw'), $args); } + public static function queryRawUnbuf() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRawUnbuf'), $args); } + + public static function insert() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insert'), $args); } + public static function insertIgnore() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertIgnore'), $args); } + public static function insertUpdate() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertUpdate'), $args); } + public static function replace() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'replace'), $args); } + public static function update() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'update'), $args); } + public static function delete() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'delete'), $args); } + + public static function insertId() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertId'), $args); } + public static function count() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'count'), $args); } + public static function affectedRows() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'affectedRows'), $args); } + + public static function useDB() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'useDB'), $args); } + public static function startTransaction() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'startTransaction'), $args); } + public static function commit() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'commit'), $args); } + public static function rollback() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'rollback'), $args); } + public static function tableList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'tableList'), $args); } + public static function columnList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'columnList'), $args); } + + public static function sqlEval() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'sqlEval'), $args); } + public static function nonSQLError() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'nonSQLError'), $args); } + + public static function serverVersion() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'serverVersion'), $args); } + public static function transactionDepth() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'transactionDepth'), $args); } + + + public static function debugMode($handler = true) { + DB::$success_handler = $handler; + } + +} + + +class MeekroDB { + // initial connection + public $dbName = ''; + public $user = ''; + public $password = ''; + public $host = 'localhost'; + public $port = null; + public $encoding = 'latin1'; + + // configure workings + public $param_char = '%'; + public $named_param_seperator = '_'; + public $success_handler = false; + public $error_handler = true; + public $throw_exception_on_error = false; + public $nonsql_error_handler = null; + public $throw_exception_on_nonsql_error = false; + public $nested_transactions = false; + public $usenull = true; + public $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); + public $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); + + // internal + public $internal_mysql = null; + public $server_info = null; + public $insert_id = 0; + public $num_rows = 0; + public $affected_rows = 0; + public $current_db = null; + public $nested_transactions_count = 0; + + + public function __construct($host=null, $user=null, $password=null, $dbName=null, $port=null, $encoding=null) { + if ($host === null) $host = DB::$host; + if ($user === null) $user = DB::$user; + if ($password === null) $password = DB::$password; + if ($dbName === null) $dbName = DB::$dbName; + if ($port === null) $port = DB::$port; + if ($encoding === null) $encoding = DB::$encoding; + + $this->host = $host; + $this->user = $user; + $this->password = $password; + $this->dbName = $dbName; + $this->port = $port; + $this->encoding = $encoding; + } + + public function get() { + $mysql = $this->internal_mysql; + + if (!($mysql instanceof MySQLi)) { + if (! $this->port) $this->port = ini_get('mysqli.default_port'); + $this->current_db = $this->dbName; + $mysql = new mysqli(); + + $connect_flags = 0; + if ($this->ssl['key']) { + $mysql->ssl_set($this->ssl['key'], $this->ssl['cert'], $this->ssl['ca_cert'], $this->ssl['ca_path'], $this->ssl['cipher']); + $connect_flags |= MYSQLI_CLIENT_SSL; + } + foreach ($this->connect_options as $key => $value) { + $mysql->options($key, $value); + } + + // suppress warnings, since we will check connect_error anyway + @$mysql->real_connect($this->host, $this->user, $this->password, $this->dbName, $this->port, null, $connect_flags); + + if ($mysql->connect_error) { + $this->nonSQLError('Unable to connect to MySQL server! Error: ' . $mysql->connect_error); + } + + $mysql->set_charset($this->encoding); + $this->internal_mysql = $mysql; + $this->server_info = $mysql->server_info; + } + + return $mysql; + } + + public function disconnect() { + $mysqli = $this->internal_mysql; + if ($mysqli instanceof MySQLi) { + if ($thread_id = $mysqli->thread_id) $mysqli->kill($thread_id); + $mysqli->close(); + } + $this->internal_mysql = null; + } + + public function nonSQLError($message) { + if ($this->throw_exception_on_nonsql_error) { + $e = new MeekroDBException($message); + throw $e; + } + + $error_handler = is_callable($this->nonsql_error_handler) ? $this->nonsql_error_handler : 'meekrodb_error_handler'; + + call_user_func($error_handler, array( + 'type' => 'nonsql', + 'error' => $message + )); + } + + public function debugMode($handler = true) { + $this->success_handler = $handler; + } + + public function serverVersion() { $this->get(); return $this->server_info; } + public function transactionDepth() { return $this->nested_transactions_count; } + public function insertId() { return $this->insert_id; } + public function affectedRows() { return $this->affected_rows; } + public function count() { $args = func_get_args(); return call_user_func_array(array($this, 'numRows'), $args); } + public function numRows() { return $this->num_rows; } + + public function useDB() { $args = func_get_args(); return call_user_func_array(array($this, 'setDB'), $args); } + public function setDB($dbName) { + $db = $this->get(); + if (! $db->select_db($dbName)) $this->nonSQLError("Unable to set database to $dbName"); + $this->current_db = $dbName; + } + + + public function startTransaction() { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if (!$this->nested_transactions || $this->nested_transactions_count == 0) { + $this->query('START TRANSACTION'); + $this->nested_transactions_count = 1; + } else { + $this->query("SAVEPOINT LEVEL{$this->nested_transactions_count}"); + $this->nested_transactions_count++; + } + + return $this->nested_transactions_count; + } + + public function commit($all=false) { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if ($this->nested_transactions && $this->nested_transactions_count > 0) + $this->nested_transactions_count--; + + if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { + $this->nested_transactions_count = 0; + $this->query('COMMIT'); + } else { + $this->query("RELEASE SAVEPOINT LEVEL{$this->nested_transactions_count}"); + } + + return $this->nested_transactions_count; + } + + public function rollback($all=false) { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if ($this->nested_transactions && $this->nested_transactions_count > 0) + $this->nested_transactions_count--; + + if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { + $this->nested_transactions_count = 0; + $this->query('ROLLBACK'); + } else { + $this->query("ROLLBACK TO SAVEPOINT LEVEL{$this->nested_transactions_count}"); + } + + return $this->nested_transactions_count; + } + + protected function formatTableName($table) { + $table = trim($table, '`'); + + if (strpos($table, '.')) return implode('.', array_map(array($this, 'formatTableName'), explode('.', $table))); + else return '`' . str_replace('`', '``', $table) . '`'; + } + + public function update() { + $args = func_get_args(); + $table = array_shift($args); + $params = array_shift($args); + $where = array_shift($args); + + $query = str_replace('%', $this->param_char, "UPDATE %b SET %? WHERE ") . $where; + + array_unshift($args, $params); + array_unshift($args, $table); + array_unshift($args, $query); + return call_user_func_array(array($this, 'query'), $args); + } + + public function insertOrReplace($which, $table, $datas, $options=array()) { + $datas = unserialize(serialize($datas)); // break references within array + $keys = $values = array(); + + if (isset($datas[0]) && is_array($datas[0])) { + foreach ($datas as $datum) { + ksort($datum); + if (! $keys) $keys = array_keys($datum); + $values[] = array_values($datum); + } + + } else { + $keys = array_keys($datas); + $values = array_values($datas); + } + + if (isset($options['ignore']) && $options['ignore']) $which = 'INSERT IGNORE'; + + if (isset($options['update']) && is_array($options['update']) && $options['update'] && strtolower($which) == 'insert') { + if (array_values($options['update']) !== $options['update']) { + return $this->query( + str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE %?"), + $table, $keys, $values, $options['update']); + } else { + $update_str = array_shift($options['update']); + $query_param = array( + str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE ") . $update_str, + $table, $keys, $values); + $query_param = array_merge($query_param, $options['update']); + return call_user_func_array(array($this, 'query'), $query_param); + } + + } + + return $this->query( + str_replace('%', $this->param_char, "%l INTO %b %lb VALUES %?"), + $which, $table, $keys, $values); + } + + public function insert($table, $data) { return $this->insertOrReplace('INSERT', $table, $data); } + public function insertIgnore($table, $data) { return $this->insertOrReplace('INSERT', $table, $data, array('ignore' => true)); } + public function replace($table, $data) { return $this->insertOrReplace('REPLACE', $table, $data); } + + public function insertUpdate() { + $args = func_get_args(); + $table = array_shift($args); + $data = array_shift($args); + + if (! isset($args[0])) { // update will have all the data of the insert + if (isset($data[0]) && is_array($data[0])) { //multiple insert rows specified -- failing! + $this->nonSQLError("Badly formatted insertUpdate() query -- you didn't specify the update component!"); + } + + $args[0] = $data; + } + + if (is_array($args[0])) $update = $args[0]; + else $update = $args; + + return $this->insertOrReplace('INSERT', $table, $data, array('update' => $update)); + } + + public function delete() { + $args = func_get_args(); + $table = $this->formatTableName(array_shift($args)); + $where = array_shift($args); + $buildquery = "DELETE FROM $table WHERE $where"; + array_unshift($args, $buildquery); + return call_user_func_array(array($this, 'query'), $args); + } + + public function sqleval() { + $args = func_get_args(); + $text = call_user_func_array(array($this, 'parseQueryParams'), $args); + return new MeekroDBEval($text); + } + + public function columnList($table) { + return $this->queryOneColumn('Field', "SHOW COLUMNS FROM %b", $table); + } + + public function tableList($db = null) { + if ($db) { + $olddb = $this->current_db; + $this->useDB($db); + } + + $result = $this->queryFirstColumn('SHOW TABLES'); + if (isset($olddb)) $this->useDB($olddb); + return $result; + } + + protected function preparseQueryParams() { + $args = func_get_args(); + $sql = trim(strval(array_shift($args))); + $args_all = $args; + + if (count($args_all) == 0) return array($sql); + + $param_char_length = strlen($this->param_char); + $named_seperator_length = strlen($this->named_param_seperator); + + $types = array( + $this->param_char . 'll', // list of literals + $this->param_char . 'ls', // list of strings + $this->param_char . 'l', // literal + $this->param_char . 'li', // list of integers + $this->param_char . 'ld', // list of decimals + $this->param_char . 'lb', // list of backticks + $this->param_char . 'lt', // list of timestamps + $this->param_char . 's', // string + $this->param_char . 'i', // integer + $this->param_char . 'd', // double / decimal + $this->param_char . 'b', // backtick + $this->param_char . 't', // timestamp + $this->param_char . '?', // infer type + $this->param_char . 'ss' // search string (like string, surrounded with %'s) + ); + + // generate list of all MeekroDB variables in our query, and their position + // in the form "offset => variable", sorted by offsets + $posList = array(); + foreach ($types as $type) { + $lastPos = 0; + while (($pos = strpos($sql, $type, $lastPos)) !== false) { + $lastPos = $pos + 1; + if (isset($posList[$pos]) && strlen($posList[$pos]) > strlen($type)) continue; + $posList[$pos] = $type; + } + } + + ksort($posList); + + // for each MeekroDB variable, substitute it with array(type: i, value: 53) or whatever + $chunkyQuery = array(); // preparsed query + $pos_adj = 0; // how much we've added or removed from the original sql string + foreach ($posList as $pos => $type) { + $type = substr($type, $param_char_length); // variable, without % in front of it + $length_type = strlen($type) + $param_char_length; // length of variable w/o % + + $new_pos = $pos + $pos_adj; // position of start of variable + $new_pos_back = $new_pos + $length_type; // position of end of variable + $arg_number_length = 0; // length of any named or numbered parameter addition + + // handle numbered parameters + if ($arg_number_length = strspn($sql, '0123456789', $new_pos_back)) { + $arg_number = substr($sql, $new_pos_back, $arg_number_length); + if (! array_key_exists($arg_number, $args_all)) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); + + $arg = $args_all[$arg_number]; + + // handle named parameters + } else if (substr($sql, $new_pos_back, $named_seperator_length) == $this->named_param_seperator) { + $arg_number_length = strspn($sql, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_', + $new_pos_back + $named_seperator_length) + $named_seperator_length; + + $arg_number = substr($sql, $new_pos_back + $named_seperator_length, $arg_number_length - $named_seperator_length); + if (count($args_all) != 1 || !is_array($args_all[0])) $this->nonSQLError("If you use named parameters, the second argument must be an array of parameters"); + if (! array_key_exists($arg_number, $args_all[0])) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); + + $arg = $args_all[0][$arg_number]; + + } else { + $arg_number = 0; + $arg = array_shift($args); + } + + if ($new_pos > 0) $chunkyQuery[] = substr($sql, 0, $new_pos); + + if (is_object($arg) && ($arg instanceof WhereClause)) { + list($clause_sql, $clause_args) = $arg->textAndArgs(); + array_unshift($clause_args, $clause_sql); + $preparsed_sql = call_user_func_array(array($this, 'preparseQueryParams'), $clause_args); + $chunkyQuery = array_merge($chunkyQuery, $preparsed_sql); + } else { + $chunkyQuery[] = array('type' => $type, 'value' => $arg); + } + + $sql = substr($sql, $new_pos_back + $arg_number_length); + $pos_adj -= $new_pos_back + $arg_number_length; + } + + if (strlen($sql) > 0) $chunkyQuery[] = $sql; + + return $chunkyQuery; + } + + protected function escape($str) { return "'" . $this->get()->real_escape_string(strval($str)) . "'"; } + + protected function sanitize($value) { + if (is_object($value)) { + if ($value instanceof MeekroDBEval) return $value->text; + else if ($value instanceof DateTime) return $this->escape($value->format('Y-m-d H:i:s')); + else return ''; + } + + if (is_null($value)) return $this->usenull ? 'NULL' : "''"; + else if (is_bool($value)) return ($value ? 1 : 0); + else if (is_int($value)) return $value; + else if (is_float($value)) return $value; + + else if (is_array($value)) { + // non-assoc array? + if (array_values($value) === $value) { + if (is_array($value[0])) return implode(', ', array_map(array($this, 'sanitize'), $value)); + else return '(' . implode(', ', array_map(array($this, 'sanitize'), $value)) . ')'; + } + + $pairs = array(); + foreach ($value as $k => $v) { + $pairs[] = $this->formatTableName($k) . '=' . $this->sanitize($v); + } + + return implode(', ', $pairs); + } + else return $this->escape($value); + } + + protected function parseTS($ts) { + if (is_string($ts)) return date('Y-m-d H:i:s', strtotime($ts)); + else if (is_object($ts) && ($ts instanceof DateTime)) return $ts->format('Y-m-d H:i:s'); + } + + protected function intval($var) { + if (PHP_INT_SIZE == 8) return intval($var); + return floor(doubleval($var)); + } + + protected function parseQueryParams() { + $args = func_get_args(); + $chunkyQuery = call_user_func_array(array($this, 'preparseQueryParams'), $args); + + $query = ''; + $array_types = array('ls', 'li', 'ld', 'lb', 'll', 'lt'); + + foreach ($chunkyQuery as $chunk) { + if (is_string($chunk)) { + $query .= $chunk; + continue; + } + + $type = $chunk['type']; + $arg = $chunk['value']; + $result = ''; + + if ($type != '?') { + $is_array_type = in_array($type, $array_types, true); + if ($is_array_type && !is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected array, got scalar instead!"); + else if (!$is_array_type && is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected scalar, got array instead!"); + } + + if ($type == 's') $result = $this->escape($arg); + else if ($type == 'i') $result = $this->intval($arg); + else if ($type == 'd') $result = doubleval($arg); + else if ($type == 'b') $result = $this->formatTableName($arg); + else if ($type == 'l') $result = $arg; + else if ($type == 'ss') $result = $this->escape("%" . str_replace(array('%', '_'), array('\%', '\_'), $arg) . "%"); + else if ($type == 't') $result = $this->escape($this->parseTS($arg)); + + else if ($type == 'ls') $result = array_map(array($this, 'escape'), $arg); + else if ($type == 'li') $result = array_map(array($this, 'intval'), $arg); + else if ($type == 'ld') $result = array_map('doubleval', $arg); + else if ($type == 'lb') $result = array_map(array($this, 'formatTableName'), $arg); + else if ($type == 'll') $result = $arg; + else if ($type == 'lt') $result = array_map(array($this, 'escape'), array_map(array($this, 'parseTS'), $arg)); + + else if ($type == '?') $result = $this->sanitize($arg); + + else $this->nonSQLError("Badly formatted SQL query: Invalid MeekroDB param $type"); + + if (is_array($result)) $result = '(' . implode(',', $result) . ')'; + + $query .= $result; + } + + return $query; + } + + protected function prependCall($function, $args, $prepend) { array_unshift($args, $prepend); return call_user_func_array($function, $args); } + public function query() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'assoc'); } + public function queryAllLists() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'list'); } + public function queryFullColumns() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'full'); } + + public function queryRaw() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_buf'); } + public function queryRawUnbuf() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_unbuf'); } + + protected function queryHelper() { + $args = func_get_args(); + $type = array_shift($args); + $db = $this->get(); + + $is_buffered = true; + $row_type = 'assoc'; // assoc, list, raw + $full_names = false; + + switch ($type) { + case 'assoc': + break; + case 'list': + $row_type = 'list'; + break; + case 'full': + $row_type = 'list'; + $full_names = true; + break; + case 'raw_buf': + $row_type = 'raw'; + break; + case 'raw_unbuf': + $is_buffered = false; + $row_type = 'raw'; + break; + default: + $this->nonSQLError('Error -- invalid argument to queryHelper!'); + } + + $sql = call_user_func_array(array($this, 'parseQueryParams'), $args); + + if ($this->success_handler) $starttime = microtime(true); + $result = $db->query($sql, $is_buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); + if ($this->success_handler) $runtime = microtime(true) - $starttime; + else $runtime = 0; + + // ----- BEGIN ERROR HANDLING + if (!$sql || $db->error) { + if ($this->error_handler) { + $error_handler = is_callable($this->error_handler) ? $this->error_handler : 'meekrodb_error_handler'; + + call_user_func($error_handler, array( + 'type' => 'sql', + 'query' => $sql, + 'error' => $db->error, + 'code' => $db->errno + )); + } + + if ($this->throw_exception_on_error) { + $e = new MeekroDBException($db->error, $sql, $db->errno); + throw $e; + } + } else if ($this->success_handler) { + $runtime = sprintf('%f', $runtime * 1000); + $success_handler = is_callable($this->success_handler) ? $this->success_handler : 'meekrodb_debugmode_handler'; + + call_user_func($success_handler, array( + 'query' => $sql, + 'runtime' => $runtime, + 'affected' => $db->affected_rows + )); + } + + // ----- END ERROR HANDLING + + $this->insert_id = $db->insert_id; + $this->affected_rows = $db->affected_rows; + + // mysqli_result->num_rows won't initially show correct results for unbuffered data + if ($is_buffered && ($result instanceof MySQLi_Result)) $this->num_rows = $result->num_rows; + else $this->num_rows = null; + + if ($row_type == 'raw' || !($result instanceof MySQLi_Result)) return $result; + + $return = array(); + + if ($full_names) { + $infos = array(); + foreach ($result->fetch_fields() as $info) { + if (strlen($info->table)) $infos[] = $info->table . '.' . $info->name; + else $infos[] = $info->name; + } + } + + while ($row = ($row_type == 'assoc' ? $result->fetch_assoc() : $result->fetch_row())) { + if ($full_names) $row = array_combine($infos, $row); + $return[] = $row; + } + + // free results + $result->free(); + while ($db->more_results()) { + $db->next_result(); + if ($result = $db->use_result()) $result->free(); + } + + return $return; + } + + public function queryOneRow() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstRow'), $args); } + public function queryFirstRow() { + $args = func_get_args(); + $result = call_user_func_array(array($this, 'query'), $args); + if (!$result || !is_array($result)) return null; + return reset($result); + } + + public function queryOneList() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstList'), $args); } + public function queryFirstList() { + $args = func_get_args(); + $result = call_user_func_array(array($this, 'queryAllLists'), $args); + if (!$result || !is_array($result)) return null; + return reset($result); + } + + public function queryFirstColumn() { + $args = func_get_args(); + $results = call_user_func_array(array($this, 'queryAllLists'), $args); + $ret = array(); + + if (!count($results) || !count($results[0])) return $ret; + + foreach ($results as $row) { + $ret[] = $row[0]; + } + + return $ret; + } + + public function queryOneColumn() { + $args = func_get_args(); + $column = array_shift($args); + $results = call_user_func_array(array($this, 'query'), $args); + $ret = array(); + + if (!count($results) || !count($results[0])) return $ret; + if ($column === null) { + $keys = array_keys($results[0]); + $column = $keys[0]; + } + + foreach ($results as $row) { + $ret[] = $row[$column]; + } + + return $ret; + } + + public function queryFirstField() { + $args = func_get_args(); + $row = call_user_func_array(array($this, 'queryFirstList'), $args); + if ($row == null) return null; + return $row[0]; + } + + public function queryOneField() { + $args = func_get_args(); + $column = array_shift($args); + + $row = call_user_func_array(array($this, 'queryOneRow'), $args); + if ($row == null) { + return null; + } else if ($column === null) { + $keys = array_keys($row); + $column = $keys[0]; + } + + return $row[$column]; + } +} + +class WhereClause { + public $type = 'and'; //AND or OR + public $negate = false; + public $clauses = array(); + + function __construct($type) { + $type = strtolower($type); + if ($type !== 'or' && $type !== 'and') DB::nonSQLError('you must use either WhereClause(and) or WhereClause(or)'); + $this->type = $type; + } + + function add() { + $args = func_get_args(); + $sql = array_shift($args); + + if ($sql instanceof WhereClause) { + $this->clauses[] = $sql; + } else { + $this->clauses[] = array('sql' => $sql, 'args' => $args); + } + } + + function negateLast() { + $i = count($this->clauses) - 1; + if (!isset($this->clauses[$i])) return; + + if ($this->clauses[$i] instanceof WhereClause) { + $this->clauses[$i]->negate(); + } else { + $this->clauses[$i]['sql'] = 'NOT (' . $this->clauses[$i]['sql'] . ')'; + } + } + + function negate() { + $this->negate = ! $this->negate; + } + + function addClause($type) { + $r = new WhereClause($type); + $this->add($r); + return $r; + } + + function count() { + return count($this->clauses); + } + + function textAndArgs() { + $sql = array(); + $args = array(); + + if (count($this->clauses) == 0) return array('(1)', $args); + + foreach ($this->clauses as $clause) { + if ($clause instanceof WhereClause) { + list($clause_sql, $clause_args) = $clause->textAndArgs(); + } else { + $clause_sql = $clause['sql']; + $clause_args = $clause['args']; + } + + $sql[] = "($clause_sql)"; + $args = array_merge($args, $clause_args); + } + + if ($this->type == 'and') $sql = implode(' AND ', $sql); + else $sql = implode(' OR ', $sql); + + if ($this->negate) $sql = '(NOT ' . $sql . ')'; + return array($sql, $args); + } + + // backwards compatability + // we now return full WhereClause object here and evaluate it in preparseQueryParams + function text() { return $this; } +} + +class DBTransaction { + private $committed = false; + + function __construct() { + DB::startTransaction(); + } + function __destruct() { + if (! $this->committed) DB::rollback(); + } + function commit() { + DB::commit(); + $this->committed = true; + } + + +} + +class MeekroDBException extends Exception { + protected $query = ''; + + function __construct($message='', $query='', $code = 0) { + parent::__construct($message); + $this->query = $query; + $this->code = $code; + } + + public function getQuery() { return $this->query; } +} + +class DBHelper { + /* + verticalSlice + 1. For an array of assoc rays, return an array of values for a particular key + 2. if $keyfield is given, same as above but use that hash key as the key in new array + */ + + public static function verticalSlice($array, $field, $keyfield = null) { + $array = (array) $array; + + $R = array(); + foreach ($array as $obj) { + if (! array_key_exists($field, $obj)) die("verticalSlice: array doesn't have requested field\n"); + + if ($keyfield) { + if (! array_key_exists($keyfield, $obj)) die("verticalSlice: array doesn't have requested field\n"); + $R[$obj[$keyfield]] = $obj[$field]; + } else { + $R[] = $obj[$field]; + } + } + return $R; + } + + /* + reIndex + For an array of assoc rays, return a new array of assoc rays using a certain field for keys + */ + + public static function reIndex() { + $fields = func_get_args(); + $array = array_shift($fields); + $array = (array) $array; + + $R = array(); + foreach ($array as $obj) { + $target =& $R; + + foreach ($fields as $field) { + if (! array_key_exists($field, $obj)) die("reIndex: array doesn't have requested field\n"); + + $nextkey = $obj[$field]; + $target =& $target[$nextkey]; + } + $target = $obj; + } + return $R; + } +} + +function meekrodb_error_handler($params) { + if (isset($params['query'])) $out[] = "QUERY: " . $params['query']; + if (isset($params['error'])) $out[] = "ERROR: " . $params['error']; + $out[] = ""; + + if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { + echo implode("\n", $out); + } else { + echo implode("
\n", $out); + } + + die; +} + +function meekrodb_debugmode_handler($params) { + echo "QUERY: " . $params['query'] . " [" . $params['runtime'] . " ms]"; + if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { + echo "\n"; + } else { + echo "
\n"; + } +} + +class MeekroDBEval { + public $text = ''; + + function __construct($text) { + $this->text = $text; + } +} + +?> diff --git a/e_lib/plates/plates.php b/e_lib/plates/plates.php index 8000a7ce..181037cd 100644 --- a/e_lib/plates/plates.php +++ b/e_lib/plates/plates.php @@ -1,14 +1,14 @@ \ No newline at end of file diff --git a/f_config/_common.php b/f_config/_common.php index ccba7f48..cea1c49d 100644 --- a/f_config/_common.php +++ b/f_config/_common.php @@ -1,5 +1,7 @@ diff --git a/f_install/_common.php b/f_install/_common.php index ccba7f48..cea1c49d 100644 --- a/f_install/_common.php +++ b/f_install/_common.php @@ -1,5 +1,7 @@ Date: Thu, 11 Jan 2018 22:39:47 +0900 Subject: [PATCH 007/622] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EA=B0=80=EC=A0=B8=EC=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _common.php | 4 +++- che_close/d_setting/_common.php | 4 +++- d_setting/_common.php | 4 +++- d_setting/set.php | 22 +++++++++---------- f_config/config.js | 2 +- f_func/_common.php | 4 +++- f_func/class._Session.php | 6 ++++- f_func/class._Setting.php | 13 ++++++----- f_install/install2Post.php | 39 ++++++++++++++++++--------------- f_retrival/_common.php | 4 +++- i_banner/analytics.php | 4 ++++ i_entrance/_common.php | 5 ++++- i_entrance/donation/_common.php | 4 +++- i_entrance/manage/_common.php | 4 +++- i_entrance/member/_common.php | 4 +++- i_login/_common.php | 4 +++- i_login/findpw/_common.php | 4 +++- i_login/join/_common.php | 4 +++- i_other/_common.php | 4 +++- i_popup/_common.php | 4 +++- 20 files changed, 93 insertions(+), 50 deletions(-) diff --git a/_common.php b/_common.php index 66df4ed9..bc36bd5c 100644 --- a/_common.php +++ b/_common.php @@ -1,5 +1,7 @@ + diff --git a/f_config/config.js b/f_config/config.js index 769219b2..1e31fcb8 100644 --- a/f_config/config.js +++ b/f_config/config.js @@ -1,5 +1,5 @@ var W = "/"; -var HOME = "/sam/"; +var HOME = "/dev_sam/"; //TODO:install시 수정 //var HOME = "http://62che.com/sam/"; //var HOME = "http://localhost/sam/"; diff --git a/f_func/_common.php b/f_func/_common.php index ccba7f48..cea1c49d 100644 --- a/f_func/_common.php +++ b/f_func/_common.php @@ -1,5 +1,7 @@ dbId = trim(str_replace("\n", "", $f[2])); $this->dbPw = trim(str_replace("\n", "", $f[3])); $this->dbName = trim(str_replace("\n", "", $f[4])); - $this->mailHost = trim(str_replace("\n", "", $f[5])); - $this->mailPort = trim(str_replace("\n", "", $f[6])); - $this->mailId = trim(str_replace("\n", "", $f[7])); - $this->mailPw = trim(str_replace("\n", "", $f[8])); - $this->mailAddr = trim(str_replace("\n", "", $f[9])); + if(count($f) > 10){ + $this->mailHost = trim(str_replace("\n", "", $f[5])); + $this->mailPort = trim(str_replace("\n", "", $f[6])); + $this->mailId = trim(str_replace("\n", "", $f[7])); + $this->mailPw = trim(str_replace("\n", "", $f[8])); + $this->mailAddr = trim(str_replace("\n", "", $f[9])); + } + } } diff --git a/f_install/install2Post.php b/f_install/install2Post.php index 032c201b..99579b67 100644 --- a/f_install/install2Post.php +++ b/f_install/install2Post.php @@ -10,32 +10,35 @@ require_once(ROOT.W.F_CONFIG.W.DB.PHP); // 시스템정보 1개 등록 $DB->InsertArray('SYSTEM', array( - JOIN => 'N', - LOGIN => 'N', - CRT_DATE => _Time::DatetimeNow(), - MDF_DATE => _Time::DatetimeNow() + 'REG' => 'N', + 'LOGIN' => 'N', + 'CRT_DATE' => _Time::DatetimeNow(), + 'MDF_DATE' => _Time::DatetimeNow() )); // 운영자 1명 등록 $DB->InsertArray('MEMBER', array( - ID => $id, - PW => $pw, - PID => '-', - NAME => '운영자', - IP => $_SERVER['REMOTE_ADDR'], - GRADE => 6, - REG_DATE => _Time::DatetimeNow() + 'ID' => $id, + 'PW' => $pw, + 'PID' => '-', + 'NAME' => '운영자', + 'EMAIL' => 'nomail@nomail.com', + 'IP' => $_SERVER['REMOTE_ADDR'], + 'GRADE' => 6, + 'REG_DATE' => _Time::DatetimeNow() )); + // 부운영자 1명 등록 $DB->InsertArray('MEMBER', array( - ID => 'viceadmin', - PW => md5('12qw!@QW12qw!@QW'), - PID => '-', - NAME => '부운영자', - IP => $_SERVER['REMOTE_ADDR'], - GRADE => 5, - REG_DATE => _Time::DatetimeNow() + 'ID' => 'viceadmin', + 'PW' => md5('12qw!@QWQPQP%12qw!@QWQPQP%'), + 'PID' => '-', + 'NAME' => '부운영자', + 'EMAIL' => 'nomail@nomail.com', + 'IP' => $_SERVER['REMOTE_ADDR'], + 'GRADE' => 5, + 'REG_DATE' => _Time::DatetimeNow() )); ?> diff --git a/f_retrival/_common.php b/f_retrival/_common.php index ccba7f48..bc36bd5c 100644 --- a/f_retrival/_common.php +++ b/f_retrival/_common.php @@ -1,5 +1,7 @@ var _gaq = _gaq || []; @@ -11,3 +13,5 @@ })(); +*/ +?> \ No newline at end of file diff --git a/i_entrance/_common.php b/i_entrance/_common.php index ccba7f48..d56bd857 100644 --- a/i_entrance/_common.php +++ b/i_entrance/_common.php @@ -1,5 +1,8 @@ Date: Thu, 11 Jan 2018 22:49:33 +0900 Subject: [PATCH 008/622] =?UTF-8?q?twe=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 22 + che_close/_119.php | 2 +- che_close/_119_b.php | 2 +- che_close/_admin1.php | 6 +- che_close/lib.php | 40 +- che_close/license.txt | 37 +- che_close/main.php | 2 +- i_login/Post.php | 2 +- twe/index.html | 9 + twe_close/MYDB.php | 41 + twe_close/_119.php | 54 + twe_close/_119_b.php | 57 + twe_close/_admin1.php | 223 + twe_close/_admin1_submit.php | 180 + twe_close/_admin2.php | 149 + twe_close/_admin2_submit.php | 432 + twe_close/_admin3.php | 100 + twe_close/_admin3_submit.php | 134 + twe_close/_admin4.php | 193 + twe_close/_admin4_submit.php | 107 + twe_close/_admin5.php | 313 + twe_close/_admin5_submit.php | 30 + twe_close/_admin6.php | 101 + twe_close/_admin7.php | 133 + twe_close/_admin8.php | 156 + twe_close/_simul.php | 1562 ++++ twe_close/a_bestGeneral.php | 279 + twe_close/a_emperior.php | 199 + twe_close/a_emperior2.php | 200 + twe_close/a_genList.php | 182 + twe_close/a_hallOfFame.php | 103 + twe_close/a_history.php | 137 + twe_close/a_kingdomList.php | 246 + twe_close/a_npcList.php | 117 + twe_close/a_status.php | 58 + twe_close/a_traffic.php | 257 + twe_close/a_vote.php | 338 + twe_close/analytics.php | 13 + twe_close/b_auction.php | 260 + twe_close/b_battleCenter.php | 142 + twe_close/b_betting.php | 339 + twe_close/b_chiefboard.php | 71 + twe_close/b_chiefcenter.php | 175 + twe_close/b_currentCity.php | 352 + twe_close/b_dipcenter.php | 298 + twe_close/b_diplomacy.php | 222 + twe_close/b_genList.php | 199 + twe_close/b_myBossInfo.php | 503 ++ twe_close/b_myCityInfo.php | 173 + twe_close/b_myGenInfo.php | 173 + twe_close/b_myKingdomInfo.php | 156 + twe_close/b_myPage.php | 139 + twe_close/b_nationboard.php | 66 + twe_close/b_nationrule.php | 50 + twe_close/b_tournament.php | 405 + twe_close/b_troop.php | 161 + twe_close/c_auction.php | 216 + twe_close/c_betting.php | 41 + twe_close/c_chiefboard.php | 51 + twe_close/c_dipcenter.php | 62 + twe_close/c_double.php | 128 + twe_close/c_msgsubmit.php | 119 + twe_close/c_myBossInfo.php | 256 + twe_close/c_nationboard.php | 51 + twe_close/c_nationrule.php | 22 + twe_close/c_tournament.php | 205 + twe_close/c_troop.php | 58 + twe_close/c_vacation.php | 20 + twe_close/c_vote.php | 76 + twe_close/commandlist.php | 113 + twe_close/confirm.png | Bin 0 -> 582 bytes twe_close/d_ally.php | 120 + twe_close/d_cancel.php | 99 + twe_close/d_cease.php | 104 + twe_close/d_merge.php | 138 + twe_close/d_scout.php | 164 + twe_close/d_setting/.htaccess | 1 + twe_close/d_setting/_common.php | 10 + twe_close/d_surrender.php | 128 + twe_close/data/.htaccess | 1 + twe_close/data/connected.php | 1 + .../session/sess_bl2knvun8a0dsp2e0hc12u2i06 | 1 + .../session/sess_e67fe7rdm5eaehoqrn0j6rodl1 | 1 + twe_close/error.php | 32 + twe_close/event_1.php | 248 + twe_close/event_2.php | 257 + twe_close/event_3.php | 118 + twe_close/event_4.php | 147 + twe_close/func.php | 7419 +++++++++++++++++ twe_close/func_auction.php | 348 + twe_close/func_history.php | 131 + twe_close/func_http.php | 288 + twe_close/func_npc.php | 1864 +++++ twe_close/func_process.php | 6148 ++++++++++++++ twe_close/func_string.php | 304 + twe_close/func_tournament.php | 991 +++ twe_close/gen.xlsx | Bin 0 -> 61653 bytes twe_close/genDatabase.txt | 684 ++ twe_close/index.php | 9 + twe_close/install.php | 91 + twe_close/install1.php | 85 + twe_close/install2.php | 122 + twe_close/install2_ok.php | 348 + twe_close/install3_ok.php | 10 + twe_close/install_ok.php | 97 + twe_close/join.php | 246 + twe_close/join_post.php | 275 + twe_close/join_post.php.orig | 275 + twe_close/join_token.php | 58 + twe_close/jquery-1.11.0.min.js | 4 + twe_close/lib.php | 170 + twe_close/license.txt | 36 + twe_close/lock.txt | 1 + twe_close/login_process.php | 81 + twe_close/logout_process.php | 36 + twe_close/logs/.htaccess | 1 + twe_close/main.php | 338 + twe_close/map.php | 435 + twe_close/map_history.php | 34 + twe_close/msglist.php | 43 + twe_close/mysql_opt.txt | 53 + twe_close/new_lib.php | 12 + twe_close/npc_login.php | 44 + twe_close/npc_login_process.php | 76 + twe_close/phpinfo.php | 3 + twe_close/preprocessing.php | 124 + twe_close/proc.php | 8 + twe_close/proc.sh | 10 + twe_close/process_war.php | 1848 ++++ twe_close/processing.php | 3129 +++++++ twe_close/queue.php | 41 + twe_close/reset.php | 81 + twe_close/scenario_1.php | 795 ++ twe_close/scenario_10.php | 901 ++ twe_close/scenario_11.php | 900 ++ twe_close/scenario_12.php | 1184 +++ twe_close/scenario_2.php | 1714 ++++ twe_close/scenario_20.php | 749 ++ twe_close/scenario_21.php | 777 ++ twe_close/scenario_22.php | 197 + twe_close/scenario_23.php | 753 ++ twe_close/scenario_24.php | 328 + twe_close/scenario_25.php | 319 + twe_close/scenario_26.php | 316 + twe_close/scenario_27.php | 594 ++ twe_close/scenario_28.php | 423 + twe_close/scenario_3.php | 1755 ++++ twe_close/scenario_4.php | 1292 +++ twe_close/scenario_5.php | 998 +++ twe_close/scenario_6.php | 1044 +++ twe_close/scenario_7.php | 1096 +++ twe_close/scenario_8.php | 948 +++ twe_close/scenario_9.php | 872 ++ twe_close/schema.php | 621 ++ twe_close/schema.sql.orig | 621 ++ twe_close/select_npc.php | 149 + twe_close/select_npc_post.php | 127 + twe_close/selection.php | 35 + twe_close/start.php | 3 + twe_close/stylesheet.php | 86 + twe_close/templates/.htaccess | 1 + twe_close/turn.php | 90 + twe_close/turn_pop_core.php | 17 + twe_close/turn_push_core.php | 17 + 164 files changed, 59155 insertions(+), 56 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 twe/index.html create mode 100644 twe_close/MYDB.php create mode 100644 twe_close/_119.php create mode 100644 twe_close/_119_b.php create mode 100644 twe_close/_admin1.php create mode 100644 twe_close/_admin1_submit.php create mode 100644 twe_close/_admin2.php create mode 100644 twe_close/_admin2_submit.php create mode 100644 twe_close/_admin3.php create mode 100644 twe_close/_admin3_submit.php create mode 100644 twe_close/_admin4.php create mode 100644 twe_close/_admin4_submit.php create mode 100644 twe_close/_admin5.php create mode 100644 twe_close/_admin5_submit.php create mode 100644 twe_close/_admin6.php create mode 100644 twe_close/_admin7.php create mode 100644 twe_close/_admin8.php create mode 100644 twe_close/_simul.php create mode 100644 twe_close/a_bestGeneral.php create mode 100644 twe_close/a_emperior.php create mode 100644 twe_close/a_emperior2.php create mode 100644 twe_close/a_genList.php create mode 100644 twe_close/a_hallOfFame.php create mode 100644 twe_close/a_history.php create mode 100644 twe_close/a_kingdomList.php create mode 100644 twe_close/a_npcList.php create mode 100644 twe_close/a_status.php create mode 100644 twe_close/a_traffic.php create mode 100644 twe_close/a_vote.php create mode 100644 twe_close/analytics.php create mode 100644 twe_close/b_auction.php create mode 100644 twe_close/b_battleCenter.php create mode 100644 twe_close/b_betting.php create mode 100644 twe_close/b_chiefboard.php create mode 100644 twe_close/b_chiefcenter.php create mode 100644 twe_close/b_currentCity.php create mode 100644 twe_close/b_dipcenter.php create mode 100644 twe_close/b_diplomacy.php create mode 100644 twe_close/b_genList.php create mode 100644 twe_close/b_myBossInfo.php create mode 100644 twe_close/b_myCityInfo.php create mode 100644 twe_close/b_myGenInfo.php create mode 100644 twe_close/b_myKingdomInfo.php create mode 100644 twe_close/b_myPage.php create mode 100644 twe_close/b_nationboard.php create mode 100644 twe_close/b_nationrule.php create mode 100644 twe_close/b_tournament.php create mode 100644 twe_close/b_troop.php create mode 100644 twe_close/c_auction.php create mode 100644 twe_close/c_betting.php create mode 100644 twe_close/c_chiefboard.php create mode 100644 twe_close/c_dipcenter.php create mode 100644 twe_close/c_double.php create mode 100644 twe_close/c_msgsubmit.php create mode 100644 twe_close/c_myBossInfo.php create mode 100644 twe_close/c_nationboard.php create mode 100644 twe_close/c_nationrule.php create mode 100644 twe_close/c_tournament.php create mode 100644 twe_close/c_troop.php create mode 100644 twe_close/c_vacation.php create mode 100644 twe_close/c_vote.php create mode 100644 twe_close/commandlist.php create mode 100644 twe_close/confirm.png create mode 100644 twe_close/d_ally.php create mode 100644 twe_close/d_cancel.php create mode 100644 twe_close/d_cease.php create mode 100644 twe_close/d_merge.php create mode 100644 twe_close/d_scout.php create mode 100644 twe_close/d_setting/.htaccess create mode 100644 twe_close/d_setting/_common.php create mode 100644 twe_close/d_surrender.php create mode 100644 twe_close/data/.htaccess create mode 100644 twe_close/data/connected.php create mode 100644 twe_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 create mode 100644 twe_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 create mode 100644 twe_close/error.php create mode 100644 twe_close/event_1.php create mode 100644 twe_close/event_2.php create mode 100644 twe_close/event_3.php create mode 100644 twe_close/event_4.php create mode 100644 twe_close/func.php create mode 100644 twe_close/func_auction.php create mode 100644 twe_close/func_history.php create mode 100644 twe_close/func_http.php create mode 100644 twe_close/func_npc.php create mode 100644 twe_close/func_process.php create mode 100644 twe_close/func_string.php create mode 100644 twe_close/func_tournament.php create mode 100644 twe_close/gen.xlsx create mode 100644 twe_close/genDatabase.txt create mode 100644 twe_close/index.php create mode 100644 twe_close/install.php create mode 100644 twe_close/install1.php create mode 100644 twe_close/install2.php create mode 100644 twe_close/install2_ok.php create mode 100644 twe_close/install3_ok.php create mode 100644 twe_close/install_ok.php create mode 100644 twe_close/join.php create mode 100644 twe_close/join_post.php create mode 100644 twe_close/join_post.php.orig create mode 100644 twe_close/join_token.php create mode 100644 twe_close/jquery-1.11.0.min.js create mode 100644 twe_close/lib.php create mode 100644 twe_close/license.txt create mode 100644 twe_close/lock.txt create mode 100644 twe_close/login_process.php create mode 100644 twe_close/logout_process.php create mode 100644 twe_close/logs/.htaccess create mode 100644 twe_close/main.php create mode 100644 twe_close/map.php create mode 100644 twe_close/map_history.php create mode 100644 twe_close/msglist.php create mode 100644 twe_close/mysql_opt.txt create mode 100644 twe_close/new_lib.php create mode 100644 twe_close/npc_login.php create mode 100644 twe_close/npc_login_process.php create mode 100644 twe_close/phpinfo.php create mode 100644 twe_close/preprocessing.php create mode 100644 twe_close/proc.php create mode 100644 twe_close/proc.sh create mode 100644 twe_close/process_war.php create mode 100644 twe_close/processing.php create mode 100644 twe_close/queue.php create mode 100644 twe_close/reset.php create mode 100644 twe_close/scenario_1.php create mode 100644 twe_close/scenario_10.php create mode 100644 twe_close/scenario_11.php create mode 100644 twe_close/scenario_12.php create mode 100644 twe_close/scenario_2.php create mode 100644 twe_close/scenario_20.php create mode 100644 twe_close/scenario_21.php create mode 100644 twe_close/scenario_22.php create mode 100644 twe_close/scenario_23.php create mode 100644 twe_close/scenario_24.php create mode 100644 twe_close/scenario_25.php create mode 100644 twe_close/scenario_26.php create mode 100644 twe_close/scenario_27.php create mode 100644 twe_close/scenario_28.php create mode 100644 twe_close/scenario_3.php create mode 100644 twe_close/scenario_4.php create mode 100644 twe_close/scenario_5.php create mode 100644 twe_close/scenario_6.php create mode 100644 twe_close/scenario_7.php create mode 100644 twe_close/scenario_8.php create mode 100644 twe_close/scenario_9.php create mode 100644 twe_close/schema.php create mode 100644 twe_close/schema.sql.orig create mode 100644 twe_close/select_npc.php create mode 100644 twe_close/select_npc_post.php create mode 100644 twe_close/selection.php create mode 100644 twe_close/start.php create mode 100644 twe_close/stylesheet.php create mode 100644 twe_close/templates/.htaccess create mode 100644 twe_close/turn.php create mode 100644 twe_close/turn_pop_core.php create mode 100644 twe_close/turn_push_core.php diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..4e440b66 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. + // 기존 특성에 대한 설명을 보려면 가리킵니다. + // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/che_close/_119.php b/che_close/_119.php index 18c6cc66..e25e0f8e 100644 --- a/che_close/_119.php +++ b/che_close/_119.php @@ -8,7 +8,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " diff --git a/che_close/_119_b.php b/che_close/_119_b.php index 2f3b9668..365c3a7e 100644 --- a/che_close/_119_b.php +++ b/che_close/_119_b.php @@ -8,7 +8,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } diff --git a/che_close/_admin1.php b/che_close/_admin1.php index ae57c86f..c36a2f8a 100644 --- a/che_close/_admin1.php +++ b/che_close/_admin1.php @@ -9,7 +9,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -43,7 +43,7 @@ $admin = getAdmin($connect);
임관 권유 메세지
장수 선택
장수 /1001.jpg border=0 name=picture width=64 height=64>
- - + +
- + > diff --git a/i_entrance/logoutPost.php b/i_entrance/logoutPost.php index f9ed1d11..5d9a5bf6 100644 --- a/i_entrance/logoutPost.php +++ b/i_entrance/logoutPost.php @@ -1,4 +1,4 @@ - diff --git a/i_entrance/manage/Get.php b/i_entrance/manage/Get.php index e49e8b59..41d73e00 100644 --- a/i_entrance/manage/Get.php +++ b/i_entrance/manage/Get.php @@ -1,4 +1,4 @@ - diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index 085e5f17..dac7382c 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -1,4 +1,4 @@ -Select('REG, LOGIN', 'SYSTEM', "NO='1'"); $system = $DB->Get($rs); ?> - - + +
심의
- +
- +
- +
- diff --git a/i_popup/_common.php b/i_popup/_common.php index c5e87709..ccba7f48 100644 --- a/i_popup/_common.php +++ b/i_popup/_common.php @@ -1,4 +1,4 @@ - 삼국지 모의전투 유기체서버 - + diff --git a/install.php b/install.php index 8f084eb4..c364afb1 100644 --- a/install.php +++ b/install.php @@ -1,4 +1,4 @@ - From ee4f52443743d1a0dc32ad64ffcbd6d30ec9440a Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 20:30:48 +0900 Subject: [PATCH 004/622] =?UTF-8?q?=EC=A4=80=EB=B9=84=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che/index.html | 8 ++++++++ che_close/d_setting/.htaccess | 1 + che_close/data/.htaccess | 1 + che_close/join.php | 1 + che_close/lib.php | 8 ++++---- che_close/logs/.htaccess | 1 + che_close/new_lib.php | 13 +++++++++++++ d_session/.htaccess | 1 + d_setting/.htaccess | 1 + f_config/config.php | 8 ++++---- 10 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 che_close/d_setting/.htaccess create mode 100644 che_close/data/.htaccess create mode 100644 che_close/logs/.htaccess create mode 100644 che_close/new_lib.php create mode 100644 d_session/.htaccess create mode 100644 d_setting/.htaccess diff --git a/che/index.html b/che/index.html index f39c8363..2a5d662e 100644 --- a/che/index.html +++ b/che/index.html @@ -1 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/che_close/d_setting/.htaccess b/che_close/d_setting/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/che_close/d_setting/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/che_close/data/.htaccess b/che_close/data/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/che_close/data/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/che_close/join.php b/che_close/join.php index 8b335c04..f6462cbc 100644 --- a/che_close/join.php +++ b/che_close/join.php @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/d_session/.htaccess b/d_session/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/d_session/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/d_setting/.htaccess b/d_setting/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/d_setting/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/f_config/config.php b/f_config/config.php index 338ac1e9..a6307aed 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -5,10 +5,10 @@ ob_start(); // 주요 환경변수들 define(W, '/'); -//define(IMAGE, '../../image'); -//define(IMAGES, '../../images'); -define(IMAGE, 'http://115.68.28.99/image'); -define(IMAGES, 'http://115.68.28.99/images'); +define(IMAGE, '../../image'); +define(IMAGES, '../../images'); +//define(IMAGE, 'http://115.68.28.99/image'); +//define(IMAGES, 'http://115.68.28.99/images'); define(JQUERY, 'jquery-1.6.4.min.js'); define(MD5, 'md5-min.js'); From 3a025cfa701b25292ff764a306d5d39c85c06f1c Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 21:40:21 +0900 Subject: [PATCH 005/622] =?UTF-8?q?template=20=EC=97=94=EC=A7=84=20'?= =?UTF-8?q?=EC=9D=BC=EB=8B=A8'=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/c_tournament.php | 2 +- che_close/func_tournament.php | 6 +- e_lib/plates/Engine.php | 279 ++++++++++++++ e_lib/plates/Extension/Asset.php | 85 +++++ e_lib/plates/Extension/ExtensionInterface.php | 13 + e_lib/plates/Extension/URI.php | 113 ++++++ e_lib/plates/Template/Data.php | 93 +++++ e_lib/plates/Template/Directory.php | 53 +++ e_lib/plates/Template/FileExtension.php | 45 +++ e_lib/plates/Template/Folder.php | 109 ++++++ e_lib/plates/Template/Folders.php | 75 ++++ e_lib/plates/Template/Func.php | 107 ++++++ e_lib/plates/Template/Functions.php | 78 ++++ e_lib/plates/Template/Name.php | 202 ++++++++++ e_lib/plates/Template/Template.php | 346 ++++++++++++++++++ e_lib/plates/example.php | 20 + e_lib/plates/plates.php | 14 + e_lib/plates/templates/layout.php | 12 + e_lib/plates/templates/profile.php | 12 + e_lib/plates/templates/sidebar.php | 6 + 20 files changed, 1666 insertions(+), 4 deletions(-) create mode 100644 e_lib/plates/Engine.php create mode 100644 e_lib/plates/Extension/Asset.php create mode 100644 e_lib/plates/Extension/ExtensionInterface.php create mode 100644 e_lib/plates/Extension/URI.php create mode 100644 e_lib/plates/Template/Data.php create mode 100644 e_lib/plates/Template/Directory.php create mode 100644 e_lib/plates/Template/FileExtension.php create mode 100644 e_lib/plates/Template/Folder.php create mode 100644 e_lib/plates/Template/Folders.php create mode 100644 e_lib/plates/Template/Func.php create mode 100644 e_lib/plates/Template/Functions.php create mode 100644 e_lib/plates/Template/Name.php create mode 100644 e_lib/plates/Template/Template.php create mode 100644 e_lib/plates/example.php create mode 100644 e_lib/plates/plates.php create mode 100644 e_lib/plates/templates/layout.php create mode 100644 e_lib/plates/templates/profile.php create mode 100644 e_lib/plates/templates/sidebar.php diff --git a/che_close/c_tournament.php b/che_close/c_tournament.php index 875c85d3..157dc74a 100644 --- a/che_close/c_tournament.php +++ b/che_close/c_tournament.php @@ -182,7 +182,7 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { } elseif($btn == "예선전부" && $me[userlevel] >= 5) { qualifyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); } elseif($btn == "추첨" && $me[userlevel] >= 5) { selection($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); } elseif($btn == "추첨전부" && $me[userlevel] >= 5) { selectionAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "본선" && $me[userlevel] >= 5) { finally($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "본선" && $me[userlevel] >= 5) { finallySingle($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); } elseif($btn == "본선전부" && $me[userlevel] >= 5) { finallyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); } elseif($btn == "배정" && $me[userlevel] >= 5) { final16set($connect); } elseif($btn == "베팅마감" && $me[userlevel] >= 5) { diff --git a/che_close/func_tournament.php b/che_close/func_tournament.php index 97fe7a50..89809095 100644 --- a/che_close/func_tournament.php +++ b/che_close/func_tournament.php @@ -42,7 +42,7 @@ function processTournament($connect) { if($phase >= 32) { $tnmt = 4; $phase = 0; } break; case 4: //본선중 - finally($connect, $type, $tnmt, $phase); $phase++; + finallySingle($connect, $type, $tnmt, $phase); $phase++; if($phase >= 6) { $tnmt = 5; $phase = 0; } break; case 5: //배정중 @@ -454,7 +454,7 @@ function selectionAll($connect, $tnmt_type, $tnmt, $phase) { } } -function finally($connect, $tnmt_type, $tnmt, $phase) { +function finallySingle($connect, $tnmt_type, $tnmt, $phase) { $cand = getTwo($tnmt, $phase); //각 그룹 페이즈 실행 @@ -484,7 +484,7 @@ function finallyAll($connect, $tnmt_type, $tnmt, $phase) { $start = $phase; $end = $phase - ($phase % 2) + 2; for($i=$start; $i < $end; $i++) { - finally($connect, $tnmt_type, $tnmt, $i); + finallySingle($connect, $tnmt_type, $tnmt, $i); } } diff --git a/e_lib/plates/Engine.php b/e_lib/plates/Engine.php new file mode 100644 index 00000000..6c89642b --- /dev/null +++ b/e_lib/plates/Engine.php @@ -0,0 +1,279 @@ +directory = new Directory($directory); + $this->fileExtension = new FileExtension($fileExtension); + $this->folders = new Folders(); + $this->functions = new Functions(); + $this->data = new Data(); + } + + /** + * Set path to templates directory. + * @param string|null $directory Pass null to disable the default directory. + * @return Engine + */ + public function setDirectory($directory) + { + $this->directory->set($directory); + + return $this; + } + + /** + * Get path to templates directory. + * @return string + */ + public function getDirectory() + { + return $this->directory->get(); + } + + /** + * Set the template file extension. + * @param string|null $fileExtension Pass null to manually set it. + * @return Engine + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension->set($fileExtension); + + return $this; + } + + /** + * Get the template file extension. + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension->get(); + } + + /** + * Add a new template folder for grouping templates under different namespaces. + * @param string $name + * @param string $directory + * @param boolean $fallback + * @return Engine + */ + public function addFolder($name, $directory, $fallback = false) + { + $this->folders->add($name, $directory, $fallback); + + return $this; + } + + /** + * Remove a template folder. + * @param string $name + * @return Engine + */ + public function removeFolder($name) + { + $this->folders->remove($name); + + return $this; + } + + /** + * Get collection of all template folders. + * @return Folders + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Add preassigned template data. + * @param array $data; + * @param null|string|array $templates; + * @return Engine + */ + public function addData(array $data, $templates = null) + { + $this->data->add($data, $templates); + + return $this; + } + + /** + * Get all preassigned template data. + * @param null|string $template; + * @return array + */ + public function getData($template = null) + { + return $this->data->get($template); + } + + /** + * Register a new template function. + * @param string $name; + * @param callback $callback; + * @return Engine + */ + public function registerFunction($name, $callback) + { + $this->functions->add($name, $callback); + + return $this; + } + + /** + * Remove a template function. + * @param string $name; + * @return Engine + */ + public function dropFunction($name) + { + $this->functions->remove($name); + + return $this; + } + + /** + * Get a template function. + * @param string $name + * @return Func + */ + public function getFunction($name) + { + return $this->functions->get($name); + } + + /** + * Check if a template function exists. + * @param string $name + * @return boolean + */ + public function doesFunctionExist($name) + { + return $this->functions->exists($name); + } + + /** + * Load an extension. + * @param ExtensionInterface $extension + * @return Engine + */ + public function loadExtension(ExtensionInterface $extension) + { + $extension->register($this); + + return $this; + } + + /** + * Load multiple extensions. + * @param array $extensions + * @return Engine + */ + public function loadExtensions(array $extensions = array()) + { + foreach ($extensions as $extension) { + $this->loadExtension($extension); + } + + return $this; + } + + /** + * Get a template path. + * @param string $name + * @return string + */ + public function path($name) + { + $name = new Name($this, $name); + + return $name->getPath(); + } + + /** + * Check if a template exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + $name = new Name($this, $name); + + return $name->doesPathExist(); + } + + /** + * Create a new template. + * @param string $name + * @return Template + */ + public function make($name) + { + return new Template($this, $name); + } + + /** + * Create a new template and render it. + * @param string $name + * @param array $data + * @return string + */ + public function render($name, array $data = array()) + { + return $this->make($name)->render($data); + } +} diff --git a/e_lib/plates/Extension/Asset.php b/e_lib/plates/Extension/Asset.php new file mode 100644 index 00000000..91d39f66 --- /dev/null +++ b/e_lib/plates/Extension/Asset.php @@ -0,0 +1,85 @@ +path = rtrim($path, '/'); + $this->filenameMethod = $filenameMethod; + } + + /** + * Register extension function. + * @param Engine $engine + * @return null + */ + public function register(Engine $engine) + { + $engine->registerFunction('asset', array($this, 'cachedAssetUrl')); + } + + /** + * Create "cache busted" asset URL. + * @param string $url + * @return string + */ + public function cachedAssetUrl($url) + { + $filePath = $this->path . '/' . ltrim($url, '/'); + + if (!file_exists($filePath)) { + throw new LogicException( + 'Unable to locate the asset "' . $url . '" in the "' . $this->path . '" directory.' + ); + } + + $lastUpdated = filemtime($filePath); + $pathInfo = pathinfo($url); + + if ($pathInfo['dirname'] === '.') { + $directory = ''; + } elseif ($pathInfo['dirname'] === '/') { + $directory = '/'; + } else { + $directory = $pathInfo['dirname'] . '/'; + } + + if ($this->filenameMethod) { + return $directory . $pathInfo['filename'] . '.' . $lastUpdated . '.' . $pathInfo['extension']; + } + + return $directory . $pathInfo['filename'] . '.' . $pathInfo['extension'] . '?v=' . $lastUpdated; + } +} diff --git a/e_lib/plates/Extension/ExtensionInterface.php b/e_lib/plates/Extension/ExtensionInterface.php new file mode 100644 index 00000000..0164d1ea --- /dev/null +++ b/e_lib/plates/Extension/ExtensionInterface.php @@ -0,0 +1,13 @@ +uri = $uri; + $this->parts = explode('/', $this->uri); + } + + /** + * Register extension functions. + * @param Engine $engine + * @return null + */ + public function register(Engine $engine) + { + $engine->registerFunction('uri', array($this, 'runUri')); + } + + /** + * Perform URI check. + * @param null|integer|string $var1 + * @param mixed $var2 + * @param mixed $var3 + * @param mixed $var4 + * @return mixed + */ + public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null) + { + if (is_null($var1)) { + return $this->uri; + } + + if (is_numeric($var1) and is_null($var2)) { + return array_key_exists($var1, $this->parts) ? $this->parts[$var1] : null; + } + + if (is_numeric($var1) and is_string($var2)) { + return $this->checkUriSegmentMatch($var1, $var2, $var3, $var4); + } + + if (is_string($var1)) { + return $this->checkUriRegexMatch($var1, $var2, $var3); + } + + throw new LogicException('Invalid use of the uri function.'); + } + + /** + * Perform a URI segment match. + * @param integer $key + * @param string $string + * @param mixed $returnOnTrue + * @param mixed $returnOnFalse + * @return mixed + */ + protected function checkUriSegmentMatch($key, $string, $returnOnTrue = null, $returnOnFalse = null) + { + if (array_key_exists($key, $this->parts) && $this->parts[$key] === $string) { + return is_null($returnOnTrue) ? true : $returnOnTrue; + } + + return is_null($returnOnFalse) ? false : $returnOnFalse; + } + + /** + * Perform a regular express match. + * @param string $regex + * @param mixed $returnOnTrue + * @param mixed $returnOnFalse + * @return mixed + */ + protected function checkUriRegexMatch($regex, $returnOnTrue = null, $returnOnFalse = null) + { + if (preg_match('#^' . $regex . '$#', $this->uri) === 1) { + return is_null($returnOnTrue) ? true : $returnOnTrue; + } + + return is_null($returnOnFalse) ? false : $returnOnFalse; + } +} diff --git a/e_lib/plates/Template/Data.php b/e_lib/plates/Template/Data.php new file mode 100644 index 00000000..aa4d1e1e --- /dev/null +++ b/e_lib/plates/Template/Data.php @@ -0,0 +1,93 @@ +shareWithAll($data); + } + + if (is_array($templates)) { + return $this->shareWithSome($data, $templates); + } + + if (is_string($templates)) { + return $this->shareWithSome($data, array($templates)); + } + + throw new LogicException( + 'The templates variable must be null, an array or a string, ' . gettype($templates) . ' given.' + ); + } + + /** + * Add data shared with all templates. + * @param array $data; + * @return Data + */ + public function shareWithAll($data) + { + $this->sharedVariables = array_merge($this->sharedVariables, $data); + + return $this; + } + + /** + * Add data shared with some templates. + * @param array $data; + * @param array $templates; + * @return Data + */ + public function shareWithSome($data, array $templates) + { + foreach ($templates as $template) { + if (isset($this->templateVariables[$template])) { + $this->templateVariables[$template] = array_merge($this->templateVariables[$template], $data); + } else { + $this->templateVariables[$template] = $data; + } + } + + return $this; + } + + /** + * Get template data. + * @param null|string $template; + * @return array + */ + public function get($template = null) + { + if (isset($template, $this->templateVariables[$template])) { + return array_merge($this->sharedVariables, $this->templateVariables[$template]); + } + + return $this->sharedVariables; + } +} diff --git a/e_lib/plates/Template/Directory.php b/e_lib/plates/Template/Directory.php new file mode 100644 index 00000000..f5de5374 --- /dev/null +++ b/e_lib/plates/Template/Directory.php @@ -0,0 +1,53 @@ +set($path); + } + + /** + * Set path to templates directory. + * @param string|null $path Pass null to disable the default directory. + * @return Directory + */ + public function set($path) + { + if (!is_null($path) and !is_dir($path)) { + throw new LogicException( + 'The specified path "' . $path . '" does not exist.' + ); + } + + $this->path = $path; + + return $this; + } + + /** + * Get path to templates directory. + * @return string + */ + public function get() + { + return $this->path; + } +} diff --git a/e_lib/plates/Template/FileExtension.php b/e_lib/plates/Template/FileExtension.php new file mode 100644 index 00000000..57646bdd --- /dev/null +++ b/e_lib/plates/Template/FileExtension.php @@ -0,0 +1,45 @@ +set($fileExtension); + } + + /** + * Set the template file extension. + * @param null|string $fileExtension + * @return FileExtension + */ + public function set($fileExtension) + { + $this->fileExtension = $fileExtension; + + return $this; + } + + /** + * Get the template file extension. + * @return string + */ + public function get() + { + return $this->fileExtension; + } +} diff --git a/e_lib/plates/Template/Folder.php b/e_lib/plates/Template/Folder.php new file mode 100644 index 00000000..01fcbdd2 --- /dev/null +++ b/e_lib/plates/Template/Folder.php @@ -0,0 +1,109 @@ +setName($name); + $this->setPath($path); + $this->setFallback($fallback); + } + + /** + * Set the folder name. + * @param string $name + * @return Folder + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get the folder name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the folder path. + * @param string $path + * @return Folder + */ + public function setPath($path) + { + if (!is_dir($path)) { + throw new LogicException('The specified directory path "' . $path . '" does not exist.'); + } + + $this->path = $path; + + return $this; + } + + /** + * Get the folder path. + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set the folder fallback status. + * @param boolean $fallback + * @return Folder + */ + public function setFallback($fallback) + { + $this->fallback = $fallback; + + return $this; + } + + /** + * Get the folder fallback status. + * @return boolean + */ + public function getFallback() + { + return $this->fallback; + } +} diff --git a/e_lib/plates/Template/Folders.php b/e_lib/plates/Template/Folders.php new file mode 100644 index 00000000..9bf266a7 --- /dev/null +++ b/e_lib/plates/Template/Folders.php @@ -0,0 +1,75 @@ +exists($name)) { + throw new LogicException('The template folder "' . $name . '" is already being used.'); + } + + $this->folders[$name] = new Folder($name, $path, $fallback); + + return $this; + } + + /** + * Remove a template folder. + * @param string $name + * @return Folders + */ + public function remove($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template folder "' . $name . '" was not found.'); + } + + unset($this->folders[$name]); + + return $this; + } + + /** + * Get a template folder. + * @param string $name + * @return Folder + */ + public function get($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template folder "' . $name . '" was not found.'); + } + + return $this->folders[$name]; + } + + /** + * Check if a template folder exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + return isset($this->folders[$name]); + } +} diff --git a/e_lib/plates/Template/Func.php b/e_lib/plates/Template/Func.php new file mode 100644 index 00000000..79141f46 --- /dev/null +++ b/e_lib/plates/Template/Func.php @@ -0,0 +1,107 @@ +setName($name); + $this->setCallback($callback); + } + + /** + * Set the function name. + * @param string $name + * @return Func + */ + public function setName($name) + { + if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name) !== 1) { + throw new LogicException( + 'Not a valid function name.' + ); + } + + $this->name = $name; + + return $this; + } + + /** + * Get the function name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the function callback + * @param callable $callback + * @return Func + */ + public function setCallback($callback) + { + if (!is_callable($callback, true)) { + throw new LogicException( + 'Not a valid function callback.' + ); + } + + $this->callback = $callback; + + return $this; + } + + /** + * Get the function callback. + * @return callable + */ + public function getCallback() + { + return $this->callback; + } + + /** + * Call the function. + * @param Template $template + * @param array $arguments + * @return mixed + */ + public function call(Template $template = null, $arguments = array()) + { + if (is_array($this->callback) and + isset($this->callback[0]) and + $this->callback[0] instanceof ExtensionInterface + ) { + $this->callback[0]->template = $template; + } + + return call_user_func_array($this->callback, $arguments); + } +} diff --git a/e_lib/plates/Template/Functions.php b/e_lib/plates/Template/Functions.php new file mode 100644 index 00000000..e0e4c2c1 --- /dev/null +++ b/e_lib/plates/Template/Functions.php @@ -0,0 +1,78 @@ +exists($name)) { + throw new LogicException( + 'The template function name "' . $name . '" is already registered.' + ); + } + + $this->functions[$name] = new Func($name, $callback); + + return $this; + } + + /** + * Remove a template function. + * @param string $name; + * @return Functions + */ + public function remove($name) + { + if (!$this->exists($name)) { + throw new LogicException( + 'The template function "' . $name . '" was not found.' + ); + } + + unset($this->functions[$name]); + + return $this; + } + + /** + * Get a template function. + * @param string $name + * @return Func + */ + public function get($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template function "' . $name . '" was not found.'); + } + + return $this->functions[$name]; + } + + /** + * Check if a template function exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + return isset($this->functions[$name]); + } +} diff --git a/e_lib/plates/Template/Name.php b/e_lib/plates/Template/Name.php new file mode 100644 index 00000000..a999d74d --- /dev/null +++ b/e_lib/plates/Template/Name.php @@ -0,0 +1,202 @@ +setEngine($engine); + $this->setName($name); + } + + /** + * Set the engine. + * @param Engine $engine + * @return Name + */ + public function setEngine(Engine $engine) + { + $this->engine = $engine; + + return $this; + } + + /** + * Get the engine. + * @return Engine + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Set the original name and parse it. + * @param string $name + * @return Name + */ + public function setName($name) + { + $this->name = $name; + + $parts = explode('::', $this->name); + + if (count($parts) === 1) { + $this->setFile($parts[0]); + } elseif (count($parts) === 2) { + $this->setFolder($parts[0]); + $this->setFile($parts[1]); + } else { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. ' . + 'Do not use the folder namespace separator "::" more than once.' + ); + } + + return $this; + } + + /** + * Get the original name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the parsed template folder. + * @param string $folder + * @return Name + */ + public function setFolder($folder) + { + $this->folder = $this->engine->getFolders()->get($folder); + + return $this; + } + + /** + * Get the parsed template folder. + * @return string + */ + public function getFolder() + { + return $this->folder; + } + + /** + * Set the parsed template file. + * @param string $file + * @return Name + */ + public function setFile($file) + { + if ($file === '') { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. ' . + 'The template name cannot be empty.' + ); + } + + $this->file = $file; + + if (!is_null($this->engine->getFileExtension())) { + $this->file .= '.' . $this->engine->getFileExtension(); + } + + return $this; + } + + /** + * Get the parsed template file. + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Resolve template path. + * @return string + */ + public function getPath() + { + if (is_null($this->folder)) { + return $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; + } + + $path = $this->folder->getPath() . DIRECTORY_SEPARATOR . $this->file; + + if (!is_file($path) and $this->folder->getFallback() and is_file($this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file)) { + $path = $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; + } + + return $path; + } + + /** + * Check if template path exists. + * @return boolean + */ + public function doesPathExist() + { + return is_file($this->getPath()); + } + + /** + * Get the default templates directory. + * @return string + */ + protected function getDefaultDirectory() + { + $directory = $this->engine->getDirectory(); + + if (is_null($directory)) { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. '. + 'The default directory has not been defined.' + ); + } + + return $directory; + } +} diff --git a/e_lib/plates/Template/Template.php b/e_lib/plates/Template/Template.php new file mode 100644 index 00000000..0a88c8cf --- /dev/null +++ b/e_lib/plates/Template/Template.php @@ -0,0 +1,346 @@ +engine = $engine; + $this->name = new Name($engine, $name); + + $this->data($this->engine->getData($name)); + } + + /** + * Magic method used to call extension functions. + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + return $this->engine->getFunction($name)->call($this, $arguments); + } + + /** + * Alias for render() method. + * @throws \Throwable + * @throws \Exception + * @return string + */ + public function __toString() + { + return $this->render(); + } + + /** + * Assign or get template data. + * @param array $data + * @return mixed + */ + public function data(array $data = null) + { + if (is_null($data)) { + return $this->data; + } + + $this->data = array_merge($this->data, $data); + } + + /** + * Check if the template exists. + * @return boolean + */ + public function exists() + { + return $this->name->doesPathExist(); + } + + /** + * Get the template path. + * @return string + */ + public function path() + { + return $this->name->getPath(); + } + + /** + * Render the template and layout. + * @param array $data + * @throws \Throwable + * @throws \Exception + * @return string + */ + public function render(array $data = array()) + { + $this->data($data); + unset($data); + extract($this->data); + + if (!$this->exists()) { + throw new LogicException( + 'The template "' . $this->name->getName() . '" could not be found at "' . $this->path() . '".' + ); + } + + try { + $level = ob_get_level(); + ob_start(); + + include $this->path(); + + $content = ob_get_clean(); + + if (isset($this->layoutName)) { + $layout = $this->engine->make($this->layoutName); + $layout->sections = array_merge($this->sections, array('content' => $content)); + $content = $layout->render($this->layoutData); + } + + return $content; + } catch (Throwable $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } catch (Exception $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } + } + + /** + * Set the template's layout. + * @param string $name + * @param array $data + * @return null + */ + public function layout($name, array $data = array()) + { + $this->layoutName = $name; + $this->layoutData = $data; + } + + /** + * Start a new section block. + * @param string $name + * @return null + */ + public function start($name) + { + if ($name === 'content') { + throw new LogicException( + 'The section name "content" is reserved.' + ); + } + + if ($this->sectionName) { + throw new LogicException('You cannot nest sections within other sections.'); + } + + $this->sectionName = $name; + + ob_start(); + } + + /** + * Start a new append section block. + * @param string $name + * @return null + */ + public function push($name) + { + $this->appendSection = true; + + $this->start($name); + } + + /** + * Stop the current section block. + * @return null + */ + public function stop() + { + if (is_null($this->sectionName)) { + throw new LogicException( + 'You must start a section before you can stop it.' + ); + } + + if (!isset($this->sections[$this->sectionName])) { + $this->sections[$this->sectionName] = ''; + } + + $this->sections[$this->sectionName] = $this->appendSection ? $this->sections[$this->sectionName] . ob_get_clean() : ob_get_clean(); + $this->sectionName = null; + $this->appendSection = false; + } + + /** + * Alias of stop(). + * @return null + */ + public function end() + { + $this->stop(); + } + + /** + * Returns the content for a section block. + * @param string $name Section name + * @param string $default Default section content + * @return string|null + */ + public function section($name, $default = null) + { + if (!isset($this->sections[$name])) { + return $default; + } + + return $this->sections[$name]; + } + + /** + * Fetch a rendered template. + * @param string $name + * @param array $data + * @return string + */ + public function fetch($name, array $data = array()) + { + return $this->engine->render($name, $data); + } + + /** + * Output a rendered template. + * @param string $name + * @param array $data + * @return null + */ + public function insert($name, array $data = array()) + { + echo $this->engine->render($name, $data); + } + + /** + * Apply multiple functions to variable. + * @param mixed $var + * @param string $functions + * @return mixed + */ + public function batch($var, $functions) + { + foreach (explode('|', $functions) as $function) { + if ($this->engine->doesFunctionExist($function)) { + $var = call_user_func(array($this, $function), $var); + } elseif (is_callable($function)) { + $var = call_user_func($function, $var); + } else { + throw new LogicException( + 'The batch function could not find the "' . $function . '" function.' + ); + } + } + + return $var; + } + + /** + * Escape string. + * @param string $string + * @param null|string $functions + * @return string + */ + public function escape($string, $functions = null) + { + static $flags; + + if (!isset($flags)) { + $flags = ENT_QUOTES | (defined('ENT_SUBSTITUTE') ? ENT_SUBSTITUTE : 0); + } + + if ($functions) { + $string = $this->batch($string, $functions); + } + + return htmlspecialchars($string, $flags, 'UTF-8'); + } + + /** + * Alias to escape function. + * @param string $string + * @param null|string $functions + * @return string + */ + public function e($string, $functions = null) + { + return $this->escape($string, $functions); + } +} diff --git a/e_lib/plates/example.php b/e_lib/plates/example.php new file mode 100644 index 00000000..7e30a6a1 --- /dev/null +++ b/e_lib/plates/example.php @@ -0,0 +1,20 @@ +addData(['company' => 'The Company Name'], 'layout'); + +// Render a template +echo $templates->render('profile', ['name' => 'Jonathan']); diff --git a/e_lib/plates/plates.php b/e_lib/plates/plates.php new file mode 100644 index 00000000..8000a7ce --- /dev/null +++ b/e_lib/plates/plates.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/e_lib/plates/templates/layout.php b/e_lib/plates/templates/layout.php new file mode 100644 index 00000000..5b5847cf --- /dev/null +++ b/e_lib/plates/templates/layout.php @@ -0,0 +1,12 @@ + + + <?=$this->e($title)?> | <?=$this->e($company)?> + + + +section('content')?> + +section('scripts')?> + + + \ No newline at end of file diff --git a/e_lib/plates/templates/profile.php b/e_lib/plates/templates/profile.php new file mode 100644 index 00000000..0797e463 --- /dev/null +++ b/e_lib/plates/templates/profile.php @@ -0,0 +1,12 @@ +layout('layout', ['title' => 'User Profile']) ?> + +

User Profile

+

Hello, e($name)?>!

+ +insert('sidebar') ?> + +push('scripts') ?> + +end() ?> \ No newline at end of file diff --git a/e_lib/plates/templates/sidebar.php b/e_lib/plates/templates/sidebar.php new file mode 100644 index 00000000..13d9ea83 --- /dev/null +++ b/e_lib/plates/templates/sidebar.php @@ -0,0 +1,6 @@ + \ No newline at end of file From 91a5ff805cfad4d4c40d8ce204454d8c26f107c0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 11 Jan 2018 22:14:36 +0900 Subject: [PATCH 006/622] =?UTF-8?q?=EC=9D=B4=EC=A0=84=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=9D=BC=EB=B6=80=20=EC=9D=B4=EC=A0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- che_close/func_tournament.php | 2 - che_close/install.php | 2 +- che_close/new_lib.php | 3 +- che_close/templates/.htaccess | 1 + d_log/.htaccess | 1 + d_log/err.txt | 1 + e_lib/includes.php | 4 + e_lib/meekrodb.2.3.class.php | 956 ++++++++++++++++++++++++++++++++++ e_lib/plates/plates.php | 20 +- f_config/_common.php | 4 +- f_config/app.php | 24 +- f_config/config.css | 6 +- f_config/config.php | 79 +-- f_install/_common.php | 4 +- 15 files changed, 1037 insertions(+), 72 deletions(-) create mode 100644 che_close/templates/.htaccess create mode 100644 d_log/.htaccess create mode 100644 e_lib/includes.php create mode 100644 e_lib/meekrodb.2.3.class.php diff --git a/.gitignore b/.gitignore index 9f209b3d..66d12619 100644 --- a/.gitignore +++ b/.gitignore @@ -112,7 +112,7 @@ venv.bak/ # 체섭 ignore logs/*.txt -d_log/* +d_log/*.txt d_setting/set.php set.php config.php diff --git a/che_close/func_tournament.php b/che_close/func_tournament.php index 89809095..569fc988 100644 --- a/che_close/func_tournament.php +++ b/che_close/func_tournament.php @@ -989,5 +989,3 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { pushFightLog($group, $log); } - -?> diff --git a/che_close/install.php b/che_close/install.php index 55f8fb18..8deff41b 100644 --- a/che_close/install.php +++ b/che_close/install.php @@ -74,7 +74,7 @@ if(!$check) {
- /inst_b_1.gif border=0 align=absmiddle> +
- + @@ -55,7 +55,7 @@ $admin = getAdmin($connect); - + diff --git a/che_close/lib.php b/che_close/lib.php index 4cf324a7..7166d844 100644 --- a/che_close/lib.php +++ b/che_close/lib.php @@ -7,8 +7,8 @@ // @header ("P3P : CP=\"ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC\""); //디버그용 매크로 -define(__OLINE__,__LINE__); -define(__LINE__,__FILE__." ".__FUNCTION__." ".__LINE__." : "); +define('__OLINE__',__LINE__); +define('__LINE__',__FILE__." ".__FUNCTION__." ".__LINE__." : "); ini_set("session.cache_expire", 10080); // minutes ini_set("session.gc_maxlifetime", 604800); // seconds @@ -17,8 +17,8 @@ ob_start(); include "MYDB.php"; // 각종 변수 -define(STEP_LOG, true); -define(PROCESS_LOG, true); +define('STEP_LOG', true); +define('PROCESS_LOG', true); $_startTime = getMicroTime(); $_ver = "서비스중"; $_version = "삼국지 모의전투 PHP v2.29.1"; @@ -76,21 +76,21 @@ session_cache_expire(60); // 60분 session_start(); //첫 등장 -if($_SESSION[p_ip] == "") { - $_SESSION[p_ip] = getenv("REMOTE_ADDR"); - $_SESSION[p_time] = time(); +if($_SESSION['p_ip'] == "") { + $_SESSION['p_ip'] = getenv("REMOTE_ADDR"); + $_SESSION['p_time'] = time(); } //id, 이름, 국가는 로그인에서 //초과된 세션은 로그아웃(1시간) -if($_SESSION[p_time]+3600 < time()) { - $_SESSION[p_id] = ""; - $_SESSION[p_name] = ""; - $_SESSION[p_nation] = 0; - $_SESSION[p_time] = time(); +if($_SESSION['p_time']+3600 < time()) { + $_SESSION['p_id'] = ""; + $_SESSION['p_name'] = ""; + $_SESSION['p_nation'] = 0; + $_SESSION['p_time'] = time(); session_destroy(); } else { - $_SESSION[p_time] = time(); + $_SESSION['p_time'] = time(); } // DB가 설정이 되었는지를 검사 @@ -114,11 +114,25 @@ function dbconn($table = "") { // 에러 메세지 출력 function Error($message, $url="") { global $setup, $connect, $dir, $config_dir; + $message .= '
'.var_dump(debug_backtrace()).'
'; include "error.php"; if($connect) @MYDB_close($connect); exit; } +function getPost($str){ + if(!isset($_POST[$str])){ + return ''; + } + $temp = $_POST[$str]; + $temp=str_replace(" ","",$temp); + $temp=str_replace("\n","",$temp); + $temp=strip_tags($temp); + $temp=str_replace(" ","",$temp); + $temp=str_replace(" ","",$temp); + return $temp; +} + // 게시판의 생성유무 검사 function isTable($connect, $str, $dbname='') { if(!$dbname) { diff --git a/che_close/license.txt b/che_close/license.txt index ceed7e73..354bdf83 100644 --- a/che_close/license.txt +++ b/che_close/license.txt @@ -1,36 +1 @@ -ZeroBoard에 대한 라이센스 명시입니다. - -아래 라이센스에 동의하시는 분만 제로보드를 사용할수 있습니다. - -프로그램명 : Zeroboard -배포버젼 : 4.1 pl 8 (2006. 3. 15) -개발자 : zero -Homepage : http://zeroboard.com - -1. 제로보드의 배포권은 ZEROBOARD.COM에서 허용한 곳에만 있습니다. - (허락 맡지 않은 재배포는 허용하지 않습니다.) - -2. 제로보드는 저작권을 아래 3번항목에 의해 표기하는 한도내에서 - 개인홈페이지 및 학교나 교회등의 비영리단체, 기업이나 기타 영리단체에서 사용할수 있습니다. - (반국가 단체나 불법 싸이트에서의 사용은 금지합니다) - -3. 제로보드 사용시 저작권 명시부분을 훼손하면 안됩니다. - 프로그램 소스, html소스상의 라이센스 및 웹상 출력물 하단에 있는 카피라이트와 링크를 수정하지 마십시요. - (저작권 표시는 게시판 배포시 작성된 형식만을 허용합니다. 임의 수정은 금지합니다) - -4. 단, 정식 등록버젼은 저작권 표시를 삭제할수 있습니다. - 정식 등록버젼에 대한 문의는 http://zeroboard.com 에서 문의 방법을 찾아주시기 바랍니다. - -5. 링크서비스등의 기본 용도에 맞지 않는 사용은 금지합니다. - -6. 제로보드의 사용으로 인한 데이타 손실 및 기타 손해등 어떠한 사고나 문제에 대해서 ZEROBOARD.COM은 절대 책임을 지지 않습니다. - -7. 제로보드에 대해 ZEROBOARD.COM은 유지/ 보수의 의무가 없습니다. - -8. 제로보드 소스는 개인적으로 사용시 수정하여 사용할수 있지만 수정된 프로그램의 재배포는 금지합니다. - (저작권 관련 부분은 수정금지입니다) - -9. 제로보드에 쓰인 스킨의 저작권은 스킨 제작자에게 있으며 제작자의 동의하에 수정배포가 가능합니다. - -10. 기타 의문사항은 http://zeroboard.com 을 이용해 주시기 바랍니다. - (질문등에 대한 내용은 메일로 받지 않습니다) +Let's GO \ No newline at end of file diff --git a/che_close/main.php b/che_close/main.php index 352962ed..4e774ffa 100644 --- a/che_close/main.php +++ b/che_close/main.php @@ -12,7 +12,7 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); //그새 사망이면 -if($me[no] == 0) { +if($me['no'] == 0) { echo "a"; echo ""; exit(0); diff --git a/i_login/Post.php b/i_login/Post.php index 1532c246..b6575890 100644 --- a/i_login/Post.php +++ b/i_login/Post.php @@ -30,7 +30,7 @@ if($DB->Count($rs) == 1) { $rs = $DB->Select('LOGIN', 'SYSTEM', "NO='1'"); $system = $DB->Get($rs); - if($system['LOGIN'] == Y || $member['GRADE'] >= 5) { + if($system['LOGIN'] == 'Y' || $member['GRADE'] >= 5) { $SESSION->Login($member['NO']); $DB->Update('MEMBER', "CONMSG='{$conmsg}', IP='{$_SERVER['REMOTE_ADDR']}'", "NO='{$member['NO']}'"); diff --git a/twe/index.html b/twe/index.html new file mode 100644 index 00000000..2a5d662e --- /dev/null +++ b/twe/index.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/twe_close/MYDB.php b/twe_close/MYDB.php new file mode 100644 index 00000000..fff8a763 --- /dev/null +++ b/twe_close/MYDB.php @@ -0,0 +1,41 @@ + diff --git a/twe_close/_119.php b/twe_close/_119.php new file mode 100644 index 00000000..18c6cc66 --- /dev/null +++ b/twe_close/_119.php @@ -0,0 +1,54 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select turntime,tnmt_time from game"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$query = "select plock from plock"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$plock = MYDB_fetch_array($result); +?> + + + +삼국지 모의전투 PHP (유기체서버) + + + + + + 시간조정 : 최종갱신 :
+ 시간조정 : 토너먼트 :
+ 봉급지급 :
+ 락 풀 기 : 현재 : 0?"동결중":"가동중";?>
+ + + + diff --git a/twe_close/_119_b.php b/twe_close/_119_b.php new file mode 100644 index 00000000..2f3b9668 --- /dev/null +++ b/twe_close/_119_b.php @@ -0,0 +1,57 @@ +location.replace('_119.php');"; +} + +switch($btn) { +case "분당김": + $query = "update game set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE),starttime=DATE_SUB(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update auction set expire=DATE_SUB(expire, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case "분지연": + $query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case "토너분당김": + $query = "update game set tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute2 MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case "토너분지연": + $query = "update game set tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute2 MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case "금지급": + processGoldIncome($connect); + break; +case "쌀지급": + processRiceIncome($connect); + break; +case "락걸기": + $query = "update plock set plock=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case "락풀기": + $query = "update plock set plock=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +} + +echo ""; +?> diff --git a/twe_close/_admin1.php b/twe_close/_admin1.php new file mode 100644 index 00000000..ae57c86f --- /dev/null +++ b/twe_close/_admin1.php @@ -0,0 +1,223 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$admin = getAdmin($connect); +?> + + +게임관리 + + + + +
운영자메세지'>
중원정세추가 시작시간변경 현재도시훈사
최대 장수
+ +
게 임 관 리
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
운영자메세지
중원정세추가
쿼리 요청
시작시간변경현재도시훈사
최대 장수>최대 국가>
기준 장수수>현재 수입률%
시작 년도최근 갱신 시간 
턴시간
+ + + + + + + + + + + + + + + + + + + + "; + } + echo " + "; + + for($i=10; $i <= 14; $i++) { + $att = $admin["att{$i}"]; + $def = $admin["def{$i}"]; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $cst = $admin["cst{$i}"]; + $ric = $admin["ric{$i}"]; + echo " + + + + + + + + + "; + } + echo " + "; + + for($i=20; $i <= 27; $i++) { + $att = $admin["att{$i}"]; + $def = $admin["def{$i}"]; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $cst = $admin["cst{$i}"]; + $ric = $admin["ric{$i}"]; + echo " + + + + + + + + + "; + } + echo " + "; + + for($i=30; $i <= 38; $i++) { + $att = $admin["att{$i}"]; + $def = $admin["def{$i}"]; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $cst = $admin["cst{$i}"]; + $ric = $admin["ric{$i}"]; + echo " + + + + + + + + + "; + } + echo " + "; + + for($i=40; $i <= 43; $i++) { + $att = $admin["att{$i}"]; + $def = $admin["def{$i}"]; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $cst = $admin["cst{$i}"]; + $ric = $admin["ric{$i}"]; + echo " + + + + + + + + + "; + } + echo " + "; +?> +
공격방어기동회피가격군량
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
+
+
+ + + + + + + + + + + + + +
리 셋 요 청
HOSTNAMEDB_IDPASSWORDDB_NAME
+
+ + + +
+ + diff --git a/twe_close/_admin1_submit.php b/twe_close/_admin1_submit.php new file mode 100644 index 00000000..3f3bd5b2 --- /dev/null +++ b/twe_close/_admin1_submit.php @@ -0,0 +1,180 @@ +location.replace('_admin1.php');"; +} + +switch($btn) { + case "변경": + $msg = addslashes(SQ2DQ($msg)); + $query = "update game set msg='$msg' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "요청": + $query = $q; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "로그쓰기": + $lognum = $admin[historyindex] + 1; + if($lognum >= 29) { $lognum = 0; } + $history[0] = "{$log}"; + pushHistory($connect, $history); + break; + case "변경1": + $query = "update game set starttime='$starttime' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "변경2": + $query = "update game set maxgeneral='$maxgeneral' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "변경3": + $query = "update game set maxnation='$maxnation' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "변경4": + $query = "update game set startyear='$startyear' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "변경5": + $query = "update game set normgeneral='$gen_rate' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "1분턴": + case "2분턴": + case "5분턴": + case "10분턴": + case "20분턴": + case "30분턴": + case "60분턴": + case "120분턴": + switch($btn) { + case "1분턴": $turnterm = 7; $unit = 60; break; + case "2분턴": $turnterm = 6; $unit = 120; break; + case "5분턴": $turnterm = 5; $unit = 300; break; + case "10분턴": $turnterm = 4; $unit = 600; break; + case "20분턴": $turnterm = 3; $unit = 1200; break; + case "30분턴": $turnterm = 2; $unit = 1800; break; + case "60분턴": $turnterm = 1; $unit = 3600; break; + case "120분턴": $turnterm = 0; $unit = 7200; break; + } + $turn = ($admin[year] - $admin[startyear]) * 12 + $admin[month] - 1; + $starttime = date("Y-m-d H:i:s", strtotime($admin[turntime]) - $turn * $unit); + $starttime = cutTurn($starttime, $turnterm); + $query = "update game set turnterm='$turnterm',starttime='$starttime' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 턴시간이 길어지는 경우 랜덤턴 배정 + 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 = floor((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),""); + } + } + } + $history[count($history)] = "★턴시간이 $btn으로 변경됩니다."; + pushHistory($connect, $history); + break; + case "변경6": + $query = "update game set att0='$att0',def0='$def0',spd0='$spd0',avd0='$avd0',ric0='$ric0',cst0='$cst0' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att1='$att1',def1='$def1',spd1='$spd1',avd1='$avd1',ric1='$ric1',cst1='$cst1' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att2='$att2',def2='$def2',spd2='$spd2',avd2='$avd2',ric2='$ric2',cst2='$cst2' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att3='$att3',def3='$def3',spd3='$spd3',avd3='$avd3',ric3='$ric3',cst3='$cst3' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att4='$att4',def4='$def4',spd4='$spd4',avd4='$avd4',ric4='$ric4',cst4='$cst4' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att5='$att5',def5='$def5',spd5='$spd5',avd5='$avd5',ric5='$ric5',cst5='$cst5' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update game set att10='$att10',def10='$def10',spd10='$spd10',avd10='$avd10',ric10='$ric10',cst10='$cst10' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att11='$att11',def11='$def11',spd11='$spd11',avd11='$avd11',ric11='$ric11',cst11='$cst11' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att12='$att12',def12='$def12',spd12='$spd12',avd12='$avd12',ric12='$ric12',cst12='$cst12' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att13='$att13',def13='$def13',spd13='$spd13',avd13='$avd13',ric13='$ric13',cst13='$cst13' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att14='$att14',def14='$def14',spd14='$spd14',avd14='$avd14',ric14='$ric14',cst14='$cst14' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update game set att20='$att20',def20='$def20',spd20='$spd20',avd20='$avd20',ric20='$ric20',cst20='$cst20' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att21='$att21',def21='$def21',spd21='$spd21',avd21='$avd21',ric21='$ric21',cst21='$cst21' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att22='$att22',def22='$def22',spd22='$spd22',avd22='$avd22',ric22='$ric22',cst22='$cst22' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att23='$att23',def23='$def23',spd23='$spd23',avd23='$avd23',ric23='$ric23',cst23='$cst23' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att24='$att24',def24='$def24',spd24='$spd24',avd24='$avd24',ric24='$ric24',cst24='$cst24' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att25='$att25',def25='$def25',spd25='$spd25',avd25='$avd25',ric25='$ric25',cst25='$cst25' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att26='$att26',def26='$def26',spd26='$spd26',avd26='$avd26',ric26='$ric26',cst26='$cst26' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att27='$att27',def27='$def27',spd27='$spd27',avd27='$avd27',ric27='$ric27',cst27='$cst27' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update game set att30='$att30',def30='$def30',spd30='$spd30',avd30='$avd30',ric30='$ric30',cst30='$cst30' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att31='$att31',def31='$def31',spd31='$spd31',avd31='$avd31',ric31='$ric31',cst31='$cst31' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att32='$att32',def32='$def32',spd32='$spd32',avd32='$avd32',ric32='$ric32',cst32='$cst32' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att33='$att33',def33='$def33',spd33='$spd33',avd33='$avd33',ric33='$ric33',cst33='$cst33' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att34='$att34',def34='$def34',spd34='$spd34',avd34='$avd34',ric34='$ric34',cst34='$cst34' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att35='$att35',def35='$def35',spd35='$spd35',avd35='$avd35',ric35='$ric35',cst35='$cst35' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att36='$att36',def36='$def36',spd36='$spd36',avd36='$avd36',ric36='$ric36',cst36='$cst36' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att37='$att37',def37='$def37',spd37='$spd37',avd37='$avd37',ric37='$ric37',cst37='$cst37' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att38='$att38',def38='$def38',spd38='$spd38',avd38='$avd38',ric38='$ric38',cst38='$cst38' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update game set att40='$att40',def40='$def40',spd40='$spd40',avd40='$avd40',ric40='$ric40',cst40='$cst40' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att41='$att41',def41='$def41',spd41='$spd41',avd41='$avd41',ric41='$ric41',cst41='$cst41' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att42='$att42',def42='$def42',spd42='$spd42',avd42='$avd42',ric42='$ric42',cst42='$cst42' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set att43='$att43',def43='$def43',spd43='$spd43',avd43='$avd43',ric43='$ric43',cst43='$cst43' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +} + +echo ""; +?> + diff --git a/twe_close/_admin2.php b/twe_close/_admin2.php new file mode 100644 index 00000000..5cc7ca07 --- /dev/null +++ b/twe_close/_admin2.php @@ -0,0 +1,149 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select conlimit,conweight from game where no=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); +?> + + +회원관리 + + + + + + +
회 원 관 리
+
+ + + + + + + + + +
접속제한
제한등급 + style=color:white;background-color:black;font-size:13;> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
+"; + +$query = "select no,name,npc,userlevel,block from general order by npc,binary(name)"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + $style = "style=;"; + if($general[block] > 0) { $style .= "background-color:red;"; } + if($general[npc] >= 2) { $style .= "color:cyan;"; } + elseif($general[npc] == 1) { $style .= "color:skyblue;"; } + if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } + if($general[userlevel] > 2) { $style .= "color:blue;"; } + + echo " + "; +} + +echo " + + 아이템 지급 + + + + + +
블럭 +
+ 1단계:발언권, 2단계:턴블럭 +
강제 사망
이벤트
이벤트2
특별회원
접속제한
턴설정
NPC해제
메세지 전달
+
+ + + +
+ + diff --git a/twe_close/_admin2_submit.php b/twe_close/_admin2_submit.php new file mode 100644 index 00000000..295d675e --- /dev/null +++ b/twe_close/_admin2_submit.php @@ -0,0 +1,432 @@ +location.replace('_admin2.php');"; +} + +switch($btn) { + case "전체 접속허용": + $query = "update general set con=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "전체 접속제한": + $query = "update general set con=1000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "접속가중치": + $query = "update game set conweight='$conweight' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case "블럭 해제": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=0 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "1단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "2단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set gold=0,rice=0,block=2,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "3단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set gold=0,rice=0,block=3,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "무한삭턴": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set killturn=8000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "강제 사망": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "특기 부여": + $query = "select year,month from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = $btn." 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select no,leader,power,intel,history from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel]); + + $query = "update general set specage2=age,special2='$special2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + pushGenLog($general, $log); + } + break; + case "경험치1000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = $btn." 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set experience=experience+1000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "공헌치1000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = $btn." 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dedication=dedication+1000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "보숙10000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = "보병숙련도+10000 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dex0=dex0+10000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "궁숙10000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = "궁병숙련도+10000 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dex10=dex10+10000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "기숙10000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = "기병숙련도+10000 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dex20=dex20+10000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "귀숙10000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = "귀병숙련도+10000 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dex30=dex30+10000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "차숙10000": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + $msg = "차병숙련도+10000 지급!"; + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set dex40=dex40+10000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "특별회원 임명": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set userlevel=3 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "특별회원 해제": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set userlevel=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "접속 허용": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set con=0 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "접속 제한": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set con=1000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "메세지 전달": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "무기지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "무기 회수!"; } + else { $msg = getWeapName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set weap='0' where no='$genlist[$i]'"; + } else { + $query = "update general set weap='$weap' where no='$genlist[$i]' and weap<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "책지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "서적 회수!"; } + else { $msg = getBookName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set book='0' where no='$genlist[$i]'"; + } else { + $query = "update general set book='$weap' where no='$genlist[$i]' and book<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "말지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "말 회수!"; } + else { $msg = getHorseName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set horse='0' where no='$genlist[$i]'"; + } else { + $query = "update general set horse='$weap' where no='$genlist[$i]' and horse<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "도구지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "특수도구 회수!"; } + else { $msg = getItemName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set item='0' where no='$genlist[$i]'"; + } else { + $query = "update general set item='$weap' where no='$genlist[$i]' and item<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "NPC해제": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set npc=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "하야입력": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set turn0='00000000000045' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "방랑해산": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set turn0='00000000000047',turn1='00000000000056' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "NPC설정": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set npc=2 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "00턴": + $query = "select turnterm from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + for($i=0; $i < sizeof($genlist); $i++) { + $turntime = getRandTurn($admin[turnterm]); + $cutTurn = cutTurn($turntime, $admin[turnterm]); + $query = "update general set turntime='$cutTurn' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "랜덤턴": + $query = "select turnterm from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + for($i=0; $i < sizeof($genlist); $i++) { + $turntime = getRandTurn($admin[turnterm]); + $query = "update general set turntime='$turntime' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; +} + +echo ""; +?> + diff --git a/twe_close/_admin3.php b/twe_close/_admin3.php new file mode 100644 index 00000000..6849cfee --- /dev/null +++ b/twe_close/_admin3.php @@ -0,0 +1,100 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} +//$admin = getAdmin($connect); +?> + + +특별회원 + + + + + + +
특 별 회 원
+
+ + + + + + + + + + + + + + + +
회원선택

무장
지장
+"; + +$query = "select no,name,power,intel from general where userlevel>2 order by npc,binary(name)"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + if($general[power] >= $general[intel]) { + echo " + "; + } else { + echo " + "; + } +} + +echo " + + 아이템 지급 + + + + + +
특별회원
메세지 전달
+
+ + + +
+ + diff --git a/twe_close/_admin3_submit.php b/twe_close/_admin3_submit.php new file mode 100644 index 00000000..60ed41b5 --- /dev/null +++ b/twe_close/_admin3_submit.php @@ -0,0 +1,134 @@ +location.replace('_admin3.php');"; +} + +switch($btn) { + case "무기지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "무기 회수!"; } + else { $msg = getWeapName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set weap='0' where no='$genlist[$i]'"; + } else { + $query = "update general set weap='$weap' where no='$genlist[$i]' and weap<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "책지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "서적 회수!"; } + else { $msg = getBookName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set book='0' where no='$genlist[$i]'"; + } else { + $query = "update general set book='$weap' where no='$genlist[$i]' and book<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "말지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "말 회수!"; } + else { $msg = getHorseName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set horse='0' where no='$genlist[$i]'"; + } else { + $query = "update general set horse='$weap' where no='$genlist[$i]' and horse<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "도구지급": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + if($weap == 0) { $msg = "특수도구 회수!"; } + else { $msg = getItemName($weap)." 지급!"; } + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + for($i=0; $i < sizeof($genlist); $i++) { + if($weap == 0) { + $query = "update general set item='0' where no='$genlist[$i]'"; + } else { + $query = "update general set item='$weap' where no='$genlist[$i]' and item<'$weap'"; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "특별회원 해제": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set userlevel=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "메세지 전달": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; +} + +echo ""; +?> + diff --git a/twe_close/_admin4.php b/twe_close/_admin4.php new file mode 100644 index 00000000..20a2588b --- /dev/null +++ b/twe_close/_admin4.php @@ -0,0 +1,193 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select conlimit from game where no=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); +?> + + +멀티관리 + + + + + + +
멀 티 관 리
+
+ + + + + + + + + + + + + + + +
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
+"; + +$query = "select no,name,npc,userlevel,block from general where ip!='' order by npc,ip"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + $style = "style=;"; + if($general[block] > 0) { $style .= "background-color:red;"; } + if($general[npc] >= 2) { $style .= "color:cyan;"; } + elseif($general[npc] == 1) { $style .= "color:skyblue;"; } + if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } + if($general[userlevel] > 2) { $style .= "color:blue;"; } + + echo " + "; +} + +echo " + "; +?> + 블럭 +
+ 1단계:발언권, 2단계:턴블럭 +
강제 사망
메세지 전달
+ + + + + + + + + +1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$ipCount = MYDB_num_rows($result); +$genName = ""; +$genDate = ""; +$genIP = ""; +$genID = ""; +$conMsg = ""; +for($i=0; $i < $ipCount; $i++) { + $ip = MYDB_fetch_array($result); + + $query = "select name,ip,lastconnect,user_id,block,conmsg 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 .= "{$gen[name]}
"; + else $genName .= $gen[name]."
"; + $genDate .= $gen[lastconnect]."
"; + $genIP .= $gen[ip]."
"; + $genID .= $gen[user_id]."
"; + $conMsg .= $gen[conmsg]."
"; + } + $genName .= "
"; + $genDate .= "
"; + $genIP .= "
"; + $genID .= "
"; + $conMsg .= "
"; +} +echo " + + + + + "; +?> + +
장수명최근로그인IPID-
$genName$genDate$genIP$genID$conMsg
+ + + + + + + + + +1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$ipCount = MYDB_num_rows($result); +$genName = ""; +$genDate = ""; +$genIP = ""; +$genID = ""; +$conMsg = ""; +for($i=0; $i < $ipCount; $i++) { + $ip = MYDB_fetch_array($result); + + $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='$ip[password]' and npc<2"; + $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 .= "{$gen[name]}
"; + else $genName .= $gen[name]."
"; + $genDate .= $gen[lastconnect]."
"; + $genIP .= substr($gen[password],0,10)." ...
"; + $genID .= $gen[user_id]."
"; + $conMsg .= $gen[conmsg]."
"; + } + $genName .= "
"; + $genDate .= "
"; + $genIP .= "
"; + $genID .= "
"; + $conMsg .= "
"; +} +echo " + + + + + "; +?> + +
장수명최근로그인PasswordID-
$genName$genDate$genIP$genID$conMsg
+
+ + + +
+ + diff --git a/twe_close/_admin4_submit.php b/twe_close/_admin4_submit.php new file mode 100644 index 00000000..344f7def --- /dev/null +++ b/twe_close/_admin4_submit.php @@ -0,0 +1,107 @@ +location.replace('_admin4.php');"; +} + +switch($btn) { + case "블럭 해제": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=0 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "1단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "2단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=2,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "3단계 블럭": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set block=3,killturn=24 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select user_id from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $uid[$i] = $gen[user_id]; + } + $connect = dbConn("sammo"); + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($uid); $i++) { + //블럭정보 + $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "무한삭턴": + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set killturn=8000 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "강제 사망": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; + case "메세지 전달": + $date = date('Y-m-d H:i:s'); + for($i=0; $i < sizeof($genlist); $i++) { + $query = "select msgindex from general where no='$genlist[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; +} + +echo ""; +?> + diff --git a/twe_close/_admin5.php b/twe_close/_admin5.php new file mode 100644 index 00000000..d1e021ab --- /dev/null +++ b/twe_close/_admin5.php @@ -0,0 +1,313 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +if($type == 0) { + $type = 0; +} +if($type2 == 0) { + $type2 = 0; +} +$sel[$type] = "selected"; +$sel2[$type2] = "selected"; + +$query = "select conlimit from game where no=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); +?> + + +일제정보 + + + + + + + +
일 제 정 보
+
정렬순서 : + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; +} + +?> +
국명접률단접국력단합장수속령기술전략국고병량평금평쌀평통평무평지평Lv보숙궁숙기숙귀숙차숙총병인구인구율농업상업치안성벽수비국명
$nation[name] {$nation[connect]}  {$nation[con]}  {$nation[power]}  {$nation[chemi]}  {$gen[cnt]}  {$city[cnt]}  {$nation[tech]}  {$nation[tricklimit]}  {$nation[gold]}  {$nation[rice]}  {$gen[avgg]}  {$gen[avgr]}  {$gen[avgl]}  {$gen[avgp]}  {$gen[avgi]}  {$gen[avge]}  {$nation[dex0]}  {$nation[dex10]}  {$nation[dex20]}  {$nation[dex30]}  {$nation[dex40]}  {$gen[crew]}/{$gen[leader]}00  {$city[pop]}/{$city[pop2]}  {$city[rate]}%  {$city[agri]}%  {$city[comm]}%  {$city[secu]}%  {$city[wall]}%  {$city[def]}% $nation[name]
+ + +
+ + + + + + + +국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)"; break; +case 1: echo ""; break; +case 2: echo ""; break; +case 3: echo ""; break; +case 4: echo ""; break; +case 5: echo ""; break; +case 6: echo ""; break; +} +?> + + + + + + +"; + switch($type2) { + default: + case 0: echo ""; break; + case 1: echo ""; break; + case 2: echo ""; break; + case 3: echo ""; break; + case 4: echo ""; break; + case 5: echo ""; break; + case 6: echo ""; break; + } + + echo " + +"; +} +?> +
국가수장수수국가별성향국가성향장수성격장수특기병종수기타
{$stat[year]}{$stat[month]}{$stat[nation_count]}{$stat[gen_count]}{$stat[power_hist]}{$stat[nation_name]}{$stat[nation_hist]}{$stat[personal_hist]}{$stat[special_hist]}{$stat[crewtype]}{$stat[etc]}
+ + + + +
+ + diff --git a/twe_close/_admin5_submit.php b/twe_close/_admin5_submit.php new file mode 100644 index 00000000..3a6bcb98 --- /dev/null +++ b/twe_close/_admin5_submit.php @@ -0,0 +1,30 @@ +location.replace('_admin5.php');"; +} + +switch($btn) { + case "국가변경": + if($nation == 0) { + $query = "update general set nation=0,level=0 where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set nation='{$nation}',level=1 where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + break; +} + +echo ""; +?> + diff --git a/twe_close/_admin6.php b/twe_close/_admin6.php new file mode 100644 index 00000000..8b003b99 --- /dev/null +++ b/twe_close/_admin6.php @@ -0,0 +1,101 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +if($type == 0) { + $type = 0; +} +$sel[$type] = "selected"; + +?> + + +접속정보 + + + + + + + +
접 속 정 보
정렬순서 : + +
+
+ + + + + + + + + + + + + + + + + + + + + "; +} + +?> +
장수명접속률시작연령연령총갱신갱신/턴총로그인갱신/로그인
$gen[name]$gen[connect]$gen[startage]$gen[age]".round($gen[refcnt]/2, 1)."".round($gen[ref]/2,1)."$gen[logcnt]".round($gen[log]/2,1)."
+ + + +
+ + diff --git a/twe_close/_admin7.php b/twe_close/_admin7.php new file mode 100644 index 00000000..c2013275 --- /dev/null +++ b/twe_close/_admin7.php @@ -0,0 +1,133 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +if($btn == '정렬하기') { + $gen = 0; +} + +if($type == 0) { + $type = 0; +} +$sel[$type] = "selected"; +?> + + +로그정보 + + + + + + + +
로 그 정 보
+
+ 정렬순서 : + + + 대상장수 : + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
장 수 정 보-
+ +   +
개인 기록전투 기록
+ + + +
장수 열전전투 결과
+ + + +
+ + + +
+ + diff --git a/twe_close/_admin8.php b/twe_close/_admin8.php new file mode 100644 index 00000000..3bc04662 --- /dev/null +++ b/twe_close/_admin8.php @@ -0,0 +1,156 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +if($btn == '정렬하기') { + $gen = 0; +} + +if($type == 0) { + $type = 0; +} +$sel[$type] = "selected"; +?> + + +외교정보 + + + + + + + +
외 교 정 보
+
+ 정렬순서 : + + +
+
+ + + + + + + + + +교 전"; break; + case 1: $state = "선포중"; break; + case 2: $state = "통 상"; break; + case 3: $state = "통합수락중"; break; + case 4: $state = "통합제의중"; break; + case 5: $state = "합병수락중"; break; + case 6: $state = "합병제의중"; break; + case 7: $state = "불가침"; break; + } + + $date = date('Y-m-d H:i:s'); + $note = ""; + if($dip[fixed] != "") { + if($dip[state] == 7) { + $note .= $dip[fixed]; + } else { + $note .= "{$dip[fixed]}"; + } + if($dip[reserved] != "" || $dip2[reserved] != "") { + $note .= "
"; + } + } + if($dip[reserved] != "") { + if($dip[showing] >= $date) { + $note .= "아국측 제의: {$dip[reserved]}"; + } else { + $note .= "아국측 제의: {$dip[reserved]}"; + } + if($dip2[reserved] != "") { + $note .= "
"; + } + } + if($dip2[reserved] != "") { + if($dip2[showing] >= $date) { + $note .= "상대측 제의: {$dip2[reserved]}"; + } else { + $note .= "상대측 제의: {$dip2[reserved]}"; + } + } + if($note == "") { $note = " "; } + + echo " + + + + + + + "; +} +?> +
외 교 관 계
국 가 명국 가 명상 태기 간비 고
$nationName[$me]$nationName[$you]$state$dip[term] 개월{$note}
+ + + +
+ + diff --git a/twe_close/_simul.php b/twe_close/_simul.php new file mode 100644 index 00000000..b993bd97 --- /dev/null +++ b/twe_close/_simul.php @@ -0,0 +1,1562 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +if($me[userlevel] < 3) { + echo "특별회원이 아닙니다."; + exit(); +} + +$mydeathnumSum = 0; +$mykillnumSum = 0; +$expSum = 0; +$ricingSum = 0; +$expSum2 = 0; +$ricingSum2 = 0; + +if($isgen == "장수평균" || $isgen == "성벽평균") { + $simulCount = 1000; +} else { + $simulCount = 1; +} + +if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평균" || $isgen == "성벽평균") { + $msg2 = ""; + for($i=0; $i < $simulCount; $i++) { + $general[leader] = $leader1; + $general[power] = $power1; + $general[intel] = $intel1; + $general[crewtype] = $type1; + $general[crew] = $crew1; + $general[train] = $train1; + $general[atmos] = $atmos1; + $general[level] = $level1; + $general[explevel] = $explevel1; + $general[dex0] = $dex10; + $general[dex10] = $dex110; + $general[dex20] = $dex120; + $general[dex30] = $dex130; + $general[dex40] = $dex140; + + $oppose[leader] = $leader2; + $oppose[power] = $power2; + $oppose[intel] = $intel2; + $oppose[crewtype] = $type2; + $oppose[crew] = $crew2; + $oppose[train] = $train2; + $oppose[atmos] = $atmos2; + $oppose[level] = $level2; + $oppose[explevel] = $explevel2; + $oppose[dex0] = $dex20; + $oppose[dex10] = $dex210; + $oppose[dex20] = $dex220; + $oppose[dex30] = $dex230; + $oppose[dex40] = $dex240; + + $city[def] = $def; + $city[wall] = $wall; + + if($isgen == "장수공격" || $isgen == "장수평균") { + $opposecount = 1; + } else { + $opposecount = 0; + } + + $warphase = getRate($game, $general[crewtype], "spd"); //병종간 페이즈 수 얻기 + + // 우선 스케일링 + $city[def] *= 10; + $city[wall] *= 10; + + $msg = ""; + $msg .= "●1월:공격장수가 공격합니다.
"; + + $exp = 0; //병사 소진 시킨 만큼 + $opexp = 0; + $exp2 = 1; //능력경험치 + $phase = 0; + while($phase < $warphase) { + // 장수가 없어서 도시 공격 + if($opposecount == 0) { + $msg .= "●".getTypename($general[crewtype])."(으)로 성을 공격합니다.
"; + + $mykillnum = 0; $mydeathnum = 0; + while($phase < $warphase) { + $phase++; + $myAtt = getAtt($game, $general, $tech1); + $myDef = getDef($game, $general, $tech1); + $cityAtt = getCityAtt($city); + $cityDef = getCityDef($city); + + // 감소할 병사 수 + $cityCrew = $_armperphase + $myAtt - $cityDef; + $myCrew = $_armperphase + $cityAtt - $myDef; + $cityweight = $myAtt - $cityDef; + $myweight = $cityAtt - $myDef; + + //훈련 사기따라 + $myCrew = getCrew($myCrew, $atmos3, $general[train]); + $cityCrew = getCrew($cityCrew, $general[atmos], $train3); + //숙련도 따라 + $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexDef = getGenDex($general, 40); + $cityCrew *= getDexLog($genDexAtt, ($train3-60)*7200); + $myCrew *= getDexLog(($atmos3-60)*7200, $genDexDef); + + $avoid = 1; + // 병종간 특성 + if(floor($general[crewtype]/10) == 3) { // 귀병 + $int = $general[intel] + getBookEff($general[book]); + if($general[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($general[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; // 0~99 + if($ratio >= 30) { + $type = rand() % 3; + switch($type) { + case 0: + $msg .= "급습을 성공했다!
"; + $cityCrew *= 1.2; + break; + case 1: + $msg .= "위보를 성공했다!
"; + $cityCrew *= 1.4; + break; + case 2: + $msg .= "혼란을 성공했다!
"; + $cityCrew *= 1.6; + break; + } + } else { + $type = rand() % 3; + switch($type) { + case 0: + $msg .= "급습을 실패했다!
"; + $cityCrew /= 1.2; + $myCrew *= 1.2; + break; + case 1: + $msg .= "위보를 실패했다!
"; + $cityCrew /= 1.4; + $myCrew *= 1.4; + break; + case 2: + $msg .= "혼란을 실패했다!
"; + $cityCrew /= 1.6; + $myCrew *= 1.6; + break; + } + } + } + } elseif($general[crewtype] == 40) { // 정란 + $cityCrew = $cityCrew * 1.5; + } elseif($general[crewtype] == 41) { // 충차 + $cityCrew = $cityCrew * 2.0; + } elseif($general[crewtype] == 42) { // 벽력거 + $cityCrew = $cityCrew * 1.5; + } + //군주, 참모, 장군 공격 보정 5% + if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + $cityCrew = $cityCrew * 1.05; + } + //레벨 보정 + $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; + + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + if($ratio >= $rd && $avoid == 1) { + $msg .= "필살공격!
"; + $cityCrew = CriticalScore2($cityCrew); + $avoid = 0; + } + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + if($ratio < $ratio2 && $avoid == 1) { + $msg .= "회피했다!
"; + $myCrew /= 10; // 10%만 소모 + $avoid = 0; + } + + //랜타추가 + $cityCrew *= (rand() % 21 + 90)/100; // 90~110% + $myCrew *= (rand() % 21 + 90)/100; // 90~110% + + $general[crew] -= round($myCrew); + $city[def] -= round($cityCrew); + $city[wall] -= round($cityCrew); + + $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; + $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; + + if($city[wall] <= 0) { $city[wall] = 0; } + + if($city[def] < 0) { + $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $cityCrew += $tempCityDef; + $city[def] = 0; + } + if($general[crew] < 0) { + $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); + $cityCrew += $offset; + $city[def] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + + $exp += $cityCrew; + $opexp += $myCrew; + $general[crew] = round($general[crew]); + $cityCrew = round($cityCrew); + $myCrew = round($myCrew); + $myAtt = round($myAtt, 2); + $myDef = round($myDef, 2); + $cityAtt = round($cityAtt, 2); + $cityDef = round($cityDef, 2); + $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【성벽】
"; + + $mykillnum += $cityCrew; $mydeathnum += $myCrew; + + if($city[def] <= 0) { break; } + if($general[crew] <= 0) { break; } + } + + // 도시쌀 소모 계산 + $opexp = round($opexp / 50); + $rice = round($opexp * 4 * getCrewtypeRice($game, 0, 0) * ($train3/100 - 0.2)); + + //원래대로 스케일링 + $city[def] = round($city[def] / 10); + $city[wall] = round($city[wall] / 10); + //내정 감소 + $dec = round($cityCrew / 10); + $city[agri] -= $dec; + $city[comm] -= $dec; + $city[secu] -= $dec; + if($city[agri] < 0) { $city[agri] = 0; } + if($city[comm] < 0) { $city[comm] = 0; } + if($city[secu] < 0) { $city[secu] = 0; } + $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; + $msg .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; + +// $msg2 .= "★병사수 변화 : -$mydeathnum vs -$mykillnum   "; +// $msg2 .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; + + if($city[def] == 0 || $general[crew] == 0) { + break; + } + // 장수 대결 + } else { + $msg .= "●".getTypename($general[crewtype])."(으)로 수비장수의 ".getTypename($oppose[crewtype])."(을)를 공격합니다.
"; + + $mykillnum = 0; $mydeathnum = 0; + while($phase < $warphase) { + $phase++; + + $myAtt = getAtt($game, $general, $tech1); + $myDef = getDef($game, $general, $tech1); + $opAtt = getAtt($game, $oppose, $tech2); + $opDef = getDef($game, $oppose, $tech2); + // 감소할 병사 수 + $myCrew = $_armperphase + $opAtt - $myDef; + $opCrew = $_armperphase + $myAtt - $opDef; + //훈련 사기따라 + $myCrew = getCrew($myCrew, $oppose[atmos], $general[train]); + $opCrew = getCrew($opCrew, $general[atmos], $oppose[train]); + //숙련도 따라 + $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexDef = getGenDex($general, $oppose[crewtype]); + $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); + $oppDexDef = getGenDex($oppose, $general[crewtype]); + $opCrew *= getDexLog($genDexAtt, $oppDexDef); + $myCrew *= getDexLog($oppDexAtt, $genDexDef); + + $myAvoid = 1; + $opAvoid = 1; + // 병종간 특성 + if(floor($general[crewtype]/10) == 3) { // 귀병 + $int = $general[intel] + getBookEff($general[book]); + if($general[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($general[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; + if($ratio >= 30) { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $msg .= "위보를 성공했다!
"; + $opCrew *= 1.2; + break; + case 1: + $msg .= "매복을 성공했다!
"; + $opCrew *= 1.4; + break; + case 2: + $msg .= "반목을 성공했다!
"; + $opCrew *= 1.6; + break; + case 3: + $msg .= "화계를 성공했다!
"; + $opCrew *= 1.8; + break; + case 4: + $msg .= "혼란을 성공했다!
"; + $opCrew *= 2.0; + break; + } + } else { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $msg .= "위보를 실패했다!
"; + $opCrew /= 1.1; + $myCrew *= 1.1; + break; + case 1: + $msg .= "매복을 실패했다!
"; + $opCrew /= 1.2; + $myCrew *= 1.2; + break; + case 2: + $msg .= "반목을 실패했다!
"; + $opCrew /= 1.3; + $myCrew *= 1.3; + break; + case 3: + $msg .= "화계를 실패했다!
"; + $opCrew /= 1.4; + $myCrew *= 1.4; + break; + case 4: + $msg .= "혼란을 실패했다!
"; + $opCrew /= 1.5; + $myCrew *= 1.5; + break; + } + } + } + } + + // 상대 장수 병종간 특성 + if(floor($oppose[crewtype]/10) == 3) { // 귀병 + $int = $oppose[intel] + getBookEff($oppose[book]); + if($oppose[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($oppose[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($oppose[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($oppose[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; + if($ratio >= 30) { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $msg .= "위보에 당했다!
"; + $myCrew *= 1.2; + break; + case 1: + $msg .= "매복에 당했다!
"; + $myCrew *= 1.4; + break; + case 2: + $msg .= "반목에 당했다!
"; + $myCrew *= 1.6; + break; + case 3: + $msg .= "화계에 당했다!
"; + $myCrew *= 1.8; + break; + case 4: + $msg .= "혼란에 당했다!
"; + $myCrew *= 2.0; + break; + } + } else { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $msg .= "위보를 간파했다!
"; + $myCrew /= 1.1; + $opCrew *= 1.1; + break; + case 1: + $msg .= "매복을 간파했다!
"; + $myCrew /= 1.2; + $opCrew *= 1.2; + break; + case 2: + $msg .= "반목을 간파했다!
"; + $myCrew /= 1.3; + $opCrew *= 1.3; + break; + case 3: + $msg .= "화계를 간파했다!
"; + $myCrew /= 1.4; + $opCrew *= 1.4; + break; + case 4: + $msg .= "혼란을 간파했다!
"; + $myCrew /= 1.5; + $opCrew *= 1.5; + break; + } + } + } + } + + if($oppose[crewtype] == 43) { // 목우 + $r = 0; + $r += $oppose[atmos]; + $r += $oppose[train]; + $ratio = rand() % 400; // 최대 50% 저지 + if($ratio < $r && $opAvoid == 1) { + $msg .= "저지당했다!
"; + $opAvoid = 0; + continue; + } + } + + // my 입장 상성 + // 보병계열 > 궁병계열 + if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 궁병계열 > 기병계열 + if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 기병계열 > 보병계열 + if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 차병계열 + if(floor($general[crewtype]/10) == 4) { + $myCrew *= 1.2; + $opCrew *= 0.8; + } + + // op 입장 상성 + // 보병계열 > 궁병계열 + if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 궁병계열 > 기병계열 + if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 기병계열 > 보병계열 + if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 차병계열 + if(floor($oppose[crewtype]/10) == 4) { + $opCrew *= 1.2; + $myCrew *= 0.8; + } + + //군주, 참모, 장군 공격 보정 5% + if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + $opCrew = $opCrew * 1.05; + } + //상대장수 관직 보정 + //군주, 참모, 모사 방어 보정 5% + if($oppose[level] == 12 || $oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 + $opCrew = $opCrew * 0.95; + } + + //레벨 보정 + $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); + $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); + $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); + $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); + + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + if($ratio >= $rd && $myAvoid == 1) { + $msg .= "필살공격!
"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + } + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($oppose[leader], $oppose[power], $oppose[intel]); + if($ratio >= $rd && $opAvoid == 1) { + $msg .= "●상대의 필살공격!
"; + $myCrew = CriticalScore2($myCrew); + $opAvoid = 0; + } + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + if($ratio < $ratio2 && $myAvoid == 1) { + $msg .= "회피했다!
"; + $myCrew /= 10; // 10%만 소모 + $myAvoid = 0; + } + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 + if($ratio < $ratio2 && $opAvoid == 1) { + $msg .= "●상대가 회피했다!
"; + $opCrew /= 10; // 10%만 소모 + $opAvoid = 0; + } + + //랜타추가 + $opCrew *= (rand() % 21 + 90)/100; // 90~110% + $myCrew *= (rand() % 21 + 90)/100; // 90~110% + + $general[crew] -= round($myCrew); + $oppose[crew] -= round($opCrew); + $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; + $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; + if($general[crew] <= 0 && $oppose[crew] <= 0) { + $r1 = $tempGeneralCrew / $tempMyCrew; + $r2 = $tempOpposeCrew / $tempOpCrew; + + if($r1 > $r2) { + $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $opCrew += $tempOpposeCrew; + $oppose[crew] = 0; + } else { + $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); + $opCrew += $offset; + $oppose[crew] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } elseif($general[crew] * $oppose[crew] <= 0) { + if($oppose[crew] < 0) { + $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $opCrew += $tempOpposeCrew; + $oppose[crew] = 0; + } + if($general[crew] < 0) { + $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); + $opCrew += $offset; + $oppose[crew] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } + + $exp += $opCrew; + $opexp += $myCrew; + $general[crew] = round($general[crew]); + $oppose[crew] = round($oppose[crew]); + $myCrew = round($myCrew); + $opCrew = round($opCrew); + $myAtt = round($myAtt, 2); + $myDef = round($myDef, 2); + $opAtt = round($opAtt, 2); + $opDef = round($opDef, 2); + $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【수비장수】
"; + + $mykillnum += $opCrew; $mydeathnum += $myCrew; + + if($oppose[crew] <= 0) { break; } + if($general[crew] <= 0) { break; } + } + + $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; +// $msg2 .= "★병사수 변화 : -$mydeathnum vs -$mykillnum   "; + } + } + + // 공헌, 명성 상승 + $exp = round($exp / 50); + $ricing = ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $tech1)); + $msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; +// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; + + $msg = ConvertLog($msg, 1); + + $mydeathnumSum += $mydeathnum; + $mykillnumSum += $mykillnum; + $expSum += $exp; + $ricingSum += $ricing; + $expSum2 += $dec; + $ricingSum2 += $rice; + } + + $mydeathnumSum /= $simulCount; + $mykillnumSum /= $simulCount; + $expSum /= $simulCount; + $ricingSum /= $simulCount; + $expSum2 /= $simulCount; + $ricingSum2 /= $simulCount; + if($isgen == "성벽평균") { + $msg2 .= "{$simulCount}회 평균
"; + $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; + $msg2 .= "★【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2
"; + $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; + } elseif($isgen == "장수평균") { + $msg2 .= "{$simulCount}회 평균
"; + $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; + $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; + } + + $msg2 = ConvertLog($msg2, 1); +} else { + $leader1 = 70; + $power1 = 70; + $intel1 = 10; + $type1 = 0; + $crew1 = 7000; + $train1 = 100; + $atmos1 = 100; + $level1 = 1; + $explevel1 = 20; + + $leader2 = 70; + $power2 = 70; + $intel2 = 10; + $type2 = 0; + $crew2 = 7000; + $train2 = 100; + $atmos2 = 100; + $level2 = 1; + $explevel2 = 20; + + $def = 7000; + $wall = 7000; + $train3 = $game[city_rate]; + $atmos3 = $game[city_rate]; +} + +switch($level1) { + case 12: $sellevel1[12] = "selected"; break; + case 11: $sellevel1[11] = "selected"; break; + case 10: $sellevel1[10] = "selected"; break; + case 9: $sellevel1[9] = "selected"; break; + case 8: $sellevel1[8] = "selected"; break; + case 7: $sellevel1[7] = "selected"; break; + case 6: $sellevel1[6] = "selected"; break; + case 5: $sellevel1[5] = "selected"; break; + case 1: $sellevel1[1] = "selected"; break; +} +switch($level2) { + case 12: $sellevel2[12] = "selected"; break; + case 11: $sellevel2[11] = "selected"; break; + case 10: $sellevel2[10] = "selected"; break; + case 9: $sellevel2[9] = "selected"; break; + case 8: $sellevel2[8] = "selected"; break; + case 7: $sellevel2[7] = "selected"; break; + case 6: $sellevel2[6] = "selected"; break; + case 5: $sellevel2[5] = "selected"; break; + case 1: $sellevel2[1] = "selected"; break; +} + +switch($type1) { + case 0: $sel1[0] = "selected"; break; + case 1: $sel1[1] = "selected"; break; + case 2: $sel1[2] = "selected"; break; + case 3: $sel1[3] = "selected"; break; + case 4: $sel1[4] = "selected"; break; + case 5: $sel1[5] = "selected"; break; + case 10: $sel1[10] = "selected"; break; + case 11: $sel1[11] = "selected"; break; + case 12: $sel1[12] = "selected"; break; + case 13: $sel1[13] = "selected"; break; + case 14: $sel1[14] = "selected"; break; + case 20: $sel1[20] = "selected"; break; + case 21: $sel1[21] = "selected"; break; + case 22: $sel1[22] = "selected"; break; + case 23: $sel1[23] = "selected"; break; + case 24: $sel1[24] = "selected"; break; + case 25: $sel1[25] = "selected"; break; + case 26: $sel1[26] = "selected"; break; + case 27: $sel1[27] = "selected"; break; + case 30: $sel1[30] = "selected"; break; + case 31: $sel1[31] = "selected"; break; + case 32: $sel1[32] = "selected"; break; + case 33: $sel1[33] = "selected"; break; + case 34: $sel1[34] = "selected"; break; + case 35: $sel1[35] = "selected"; break; + case 36: $sel1[36] = "selected"; break; + case 37: $sel1[37] = "selected"; break; + case 38: $sel1[38] = "selected"; break; + case 40: $sel1[40] = "selected"; break; + case 41: $sel1[41] = "selected"; break; + case 42: $sel1[42] = "selected"; break; + case 43: $sel1[43] = "selected"; break; +} +switch($type2) { + case 0: $sel2[0] = "selected"; break; + case 1: $sel2[1] = "selected"; break; + case 2: $sel2[2] = "selected"; break; + case 3: $sel2[3] = "selected"; break; + case 4: $sel2[4] = "selected"; break; + case 5: $sel2[5] = "selected"; break; + case 10: $sel2[10] = "selected"; break; + case 11: $sel2[11] = "selected"; break; + case 12: $sel2[12] = "selected"; break; + case 13: $sel2[13] = "selected"; break; + case 14: $sel2[14] = "selected"; break; + case 20: $sel2[20] = "selected"; break; + case 21: $sel2[21] = "selected"; break; + case 22: $sel2[22] = "selected"; break; + case 23: $sel2[23] = "selected"; break; + case 24: $sel2[24] = "selected"; break; + case 25: $sel2[25] = "selected"; break; + case 26: $sel2[26] = "selected"; break; + case 27: $sel2[27] = "selected"; break; + case 30: $sel2[30] = "selected"; break; + case 31: $sel2[31] = "selected"; break; + case 32: $sel2[32] = "selected"; break; + case 33: $sel2[33] = "selected"; break; + case 34: $sel2[34] = "selected"; break; + case 35: $sel2[35] = "selected"; break; + case 36: $sel2[36] = "selected"; break; + case 37: $sel2[37] = "selected"; break; + case 38: $sel2[38] = "selected"; break; + case 40: $sel2[40] = "selected"; break; + case 41: $sel2[41] = "selected"; break; + case 42: $sel2[42] = "selected"; break; + case 43: $sel2[43] = "selected"; break; +} +switch($tech1) { + case 0: $tch1[0] = "selected"; break; + case 1000: $tch1[1] = "selected"; break; + case 2000: $tch1[2] = "selected"; break; + case 3000: $tch1[3] = "selected"; break; + case 4000: $tch1[4] = "selected"; break; + case 5000: $tch1[5] = "selected"; break; + case 6000: $tch1[6] = "selected"; break; + case 7000: $tch1[7] = "selected"; break; + case 8000: $tch1[8] = "selected"; break; + case 9000: $tch1[9] = "selected"; break; + case 10000: $tch1[10] = "selected"; break; +} +switch($tech2) { + case 0: $tch2[0] = "selected"; break; + case 1000: $tch2[1] = "selected"; break; + case 2000: $tch2[2] = "selected"; break; + case 3000: $tch2[3] = "selected"; break; + case 4000: $tch2[4] = "selected"; break; + case 5000: $tch2[5] = "selected"; break; + case 6000: $tch2[6] = "selected"; break; + case 7000: $tch2[7] = "selected"; break; + case 8000: $tch2[8] = "selected"; break; + case 9000: $tch2[9] = "selected"; break; + case 10000: $tch2[10] = "selected"; break; +} +switch($dex10) { + case 0: $dx10[0] = "selected"; break; + case 2500: $dx10[1] = "selected"; break; + case 7500: $dx10[2] = "selected"; break; + case 15000: $dx10[3] = "selected"; break; + case 25000: $dx10[4] = "selected"; break; + case 37500: $dx10[5] = "selected"; break; + case 52500: $dx10[6] = "selected"; break; + case 70000: $dx10[7] = "selected"; break; + case 90000: $dx10[8] = "selected"; break; + case 112500: $dx10[9] = "selected"; break; + case 137500: $dx10[10] = "selected"; break; + case 165000: $dx10[11] = "selected"; break; + case 195000: $dx10[12] = "selected"; break; + case 227500: $dx10[13] = "selected"; break; + case 262500: $dx10[14] = "selected"; break; + case 300000: $dx10[15] = "selected"; break; + case 340000: $dx10[16] = "selected"; break; + case 382500: $dx10[17] = "selected"; break; + case 427500: $dx10[18] = "selected"; break; +} +switch($dex110) { + case 0: $dx110[0] = "selected"; break; + case 2500: $dx110[1] = "selected"; break; + case 7500: $dx110[2] = "selected"; break; + case 15000: $dx110[3] = "selected"; break; + case 25000: $dx110[4] = "selected"; break; + case 37500: $dx110[5] = "selected"; break; + case 52500: $dx110[6] = "selected"; break; + case 70000: $dx110[7] = "selected"; break; + case 90000: $dx110[8] = "selected"; break; + case 112500: $dx110[9] = "selected"; break; + case 137500: $dx110[10] = "selected"; break; + case 165000: $dx110[11] = "selected"; break; + case 195000: $dx110[12] = "selected"; break; + case 227500: $dx110[13] = "selected"; break; + case 262500: $dx110[14] = "selected"; break; + case 300000: $dx110[15] = "selected"; break; + case 340000: $dx110[16] = "selected"; break; + case 382500: $dx110[17] = "selected"; break; + case 427500: $dx110[18] = "selected"; break; +} +switch($dex120) { + case 0: $dx120[0] = "selected"; break; + case 2500: $dx120[1] = "selected"; break; + case 7500: $dx120[2] = "selected"; break; + case 15000: $dx120[3] = "selected"; break; + case 25000: $dx120[4] = "selected"; break; + case 37500: $dx120[5] = "selected"; break; + case 52500: $dx120[6] = "selected"; break; + case 70000: $dx120[7] = "selected"; break; + case 90000: $dx120[8] = "selected"; break; + case 112500: $dx120[9] = "selected"; break; + case 137500: $dx120[10] = "selected"; break; + case 165000: $dx120[11] = "selected"; break; + case 195000: $dx120[12] = "selected"; break; + case 227500: $dx120[13] = "selected"; break; + case 262500: $dx120[14] = "selected"; break; + case 300000: $dx120[15] = "selected"; break; + case 340000: $dx120[16] = "selected"; break; + case 382500: $dx120[17] = "selected"; break; + case 427500: $dx120[18] = "selected"; break; +} +switch($dex130) { + case 0: $dx130[0] = "selected"; break; + case 2500: $dx130[1] = "selected"; break; + case 7500: $dx130[2] = "selected"; break; + case 15000: $dx130[3] = "selected"; break; + case 25000: $dx130[4] = "selected"; break; + case 37500: $dx130[5] = "selected"; break; + case 52500: $dx130[6] = "selected"; break; + case 70000: $dx130[7] = "selected"; break; + case 90000: $dx130[8] = "selected"; break; + case 112500: $dx130[9] = "selected"; break; + case 137500: $dx130[10] = "selected"; break; + case 165000: $dx130[11] = "selected"; break; + case 195000: $dx130[12] = "selected"; break; + case 227500: $dx130[13] = "selected"; break; + case 262500: $dx130[14] = "selected"; break; + case 300000: $dx130[15] = "selected"; break; + case 340000: $dx130[16] = "selected"; break; + case 382500: $dx130[17] = "selected"; break; + case 427500: $dx130[18] = "selected"; break; +} +switch($dex140) { + case 0: $dx140[0] = "selected"; break; + case 2500: $dx140[1] = "selected"; break; + case 7500: $dx140[2] = "selected"; break; + case 15000: $dx140[3] = "selected"; break; + case 25000: $dx140[4] = "selected"; break; + case 37500: $dx140[5] = "selected"; break; + case 52500: $dx140[6] = "selected"; break; + case 70000: $dx140[7] = "selected"; break; + case 90000: $dx140[8] = "selected"; break; + case 112500: $dx140[9] = "selected"; break; + case 137500: $dx140[10] = "selected"; break; + case 165000: $dx140[11] = "selected"; break; + case 195000: $dx140[12] = "selected"; break; + case 227500: $dx140[13] = "selected"; break; + case 262500: $dx140[14] = "selected"; break; + case 300000: $dx140[15] = "selected"; break; + case 340000: $dx140[16] = "selected"; break; + case 382500: $dx140[17] = "selected"; break; + case 427500: $dx140[18] = "selected"; break; +} +switch($dex20) { + case 0: $dx20[0] = "selected"; break; + case 2500: $dx20[1] = "selected"; break; + case 7500: $dx20[2] = "selected"; break; + case 15000: $dx20[3] = "selected"; break; + case 25000: $dx20[4] = "selected"; break; + case 37500: $dx20[5] = "selected"; break; + case 52500: $dx20[6] = "selected"; break; + case 70000: $dx20[7] = "selected"; break; + case 90000: $dx20[8] = "selected"; break; + case 112500: $dx20[9] = "selected"; break; + case 137500: $dx20[10] = "selected"; break; + case 165000: $dx20[11] = "selected"; break; + case 195000: $dx20[12] = "selected"; break; + case 227500: $dx20[13] = "selected"; break; + case 262500: $dx20[14] = "selected"; break; + case 300000: $dx20[15] = "selected"; break; + case 340000: $dx20[16] = "selected"; break; + case 382500: $dx20[17] = "selected"; break; + case 427500: $dx20[18] = "selected"; break; +} +switch($dex210) { + case 0: $dx210[0] = "selected"; break; + case 2500: $dx210[1] = "selected"; break; + case 7500: $dx210[2] = "selected"; break; + case 15000: $dx210[3] = "selected"; break; + case 25000: $dx210[4] = "selected"; break; + case 37500: $dx210[5] = "selected"; break; + case 52500: $dx210[6] = "selected"; break; + case 70000: $dx210[7] = "selected"; break; + case 90000: $dx210[8] = "selected"; break; + case 112500: $dx210[9] = "selected"; break; + case 137500: $dx210[10] = "selected"; break; + case 165000: $dx210[11] = "selected"; break; + case 195000: $dx210[12] = "selected"; break; + case 227500: $dx210[13] = "selected"; break; + case 262500: $dx210[14] = "selected"; break; + case 300000: $dx210[15] = "selected"; break; + case 340000: $dx210[16] = "selected"; break; + case 382500: $dx210[17] = "selected"; break; + case 427500: $dx210[18] = "selected"; break; +} +switch($dex220) { + case 0: $dx220[0] = "selected"; break; + case 2500: $dx220[1] = "selected"; break; + case 7500: $dx220[2] = "selected"; break; + case 15000: $dx220[3] = "selected"; break; + case 25000: $dx220[4] = "selected"; break; + case 37500: $dx220[5] = "selected"; break; + case 52500: $dx220[6] = "selected"; break; + case 70000: $dx220[7] = "selected"; break; + case 90000: $dx220[8] = "selected"; break; + case 112500: $dx220[9] = "selected"; break; + case 137500: $dx220[10] = "selected"; break; + case 165000: $dx220[11] = "selected"; break; + case 195000: $dx220[12] = "selected"; break; + case 227500: $dx220[13] = "selected"; break; + case 262500: $dx220[14] = "selected"; break; + case 300000: $dx220[15] = "selected"; break; + case 340000: $dx220[16] = "selected"; break; + case 382500: $dx220[17] = "selected"; break; + case 427500: $dx220[18] = "selected"; break; +} +switch($dex230) { + case 0: $dx230[0] = "selected"; break; + case 2500: $dx230[1] = "selected"; break; + case 7500: $dx230[2] = "selected"; break; + case 15000: $dx230[3] = "selected"; break; + case 25000: $dx230[4] = "selected"; break; + case 37500: $dx230[5] = "selected"; break; + case 52500: $dx230[6] = "selected"; break; + case 70000: $dx230[7] = "selected"; break; + case 90000: $dx230[8] = "selected"; break; + case 112500: $dx230[9] = "selected"; break; + case 137500: $dx230[10] = "selected"; break; + case 165000: $dx230[11] = "selected"; break; + case 195000: $dx230[12] = "selected"; break; + case 227500: $dx230[13] = "selected"; break; + case 262500: $dx230[14] = "selected"; break; + case 300000: $dx230[15] = "selected"; break; + case 340000: $dx230[16] = "selected"; break; + case 382500: $dx230[17] = "selected"; break; + case 427500: $dx230[18] = "selected"; break; +} +switch($dex240) { + case 0: $dx240[0] = "selected"; break; + case 2500: $dx240[1] = "selected"; break; + case 7500: $dx240[2] = "selected"; break; + case 15000: $dx240[3] = "selected"; break; + case 25000: $dx240[4] = "selected"; break; + case 37500: $dx240[5] = "selected"; break; + case 52500: $dx240[6] = "selected"; break; + case 70000: $dx240[7] = "selected"; break; + case 90000: $dx240[8] = "selected"; break; + case 112500: $dx240[9] = "selected"; break; + case 137500: $dx240[10] = "selected"; break; + case 165000: $dx240[11] = "selected"; break; + case 195000: $dx240[12] = "selected"; break; + case 227500: $dx240[13] = "selected"; break; + case 262500: $dx240[14] = "selected"; break; + case 300000: $dx240[15] = "selected"; break; + case 340000: $dx240[16] = "selected"; break; + case 382500: $dx240[17] = "selected"; break; + case 427500: $dx240[18] = "selected"; break; +} + +?> + + + + +전투시뮬레이션 + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
공격장수상대장수상대성벽
관직 + + 관직 + + -
Lv >Lv >-
통솔 >통솔 >-
무력 >무력 >-
지력 >지력 >-
병종 + + 병종 + + 성벽 >
병력 >병력 >수비 >
훈련 >훈련 >훈련 >
사기 >사기 >사기 >
기술 + + 기술 + + -
보 + + 궁 + + 기 + + 귀 + + 차 + + 보 + + 궁 + + 기 + + 귀 + + 차 + + -
- + + ';?> + + + ';?> +
+ +
+ + + + + + + + + + + + +"; + + for($i=10; $i <= 14; $i++) { + printSimul($game, $i); + } + echo " + "; + + for($i=20; $i <= 27; $i++) { + printSimul($game, $i); + } + echo " + "; + + for($i=30; $i <= 38; $i++) { + printSimul($game, $i); + } + echo " + "; + + for($i=40; $i <= 43; $i++) { + printSimul($game, $i); + } + echo " + "; +?> +
공격방어기동회피가격군량-
+
+ + + + + ".getTypename($i)." + $att + $def + $spd + $avd + $cst + $ric + - + "; +} + +?> diff --git a/twe_close/a_bestGeneral.php b/twe_close/a_bestGeneral.php new file mode 100644 index 00000000..718d1b91 --- /dev/null +++ b/twe_close/a_bestGeneral.php @@ -0,0 +1,279 @@ += 2) { printLimitMsg($me[turntime]); exit(); } +?> + + + + +명장일람 + + + + + + + +
명 장 일 람
+ + + + +
+ + +
+ +=2"; } +else { $sel = "npc<2"; } + +$query = "select nation,name,color from nation"; +$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); + $nationName[$nation[nation]] = $nation[name]; + $nationColor[$nation[nation]] = $nation[color]; +} + +$type = array( + "명 성", + "계 급", + "계 략 성 공", + "전 투 횟 수", + "승 리", + "승 률", + "사 살", + "살 상 률", + "보 병 숙 련 도", + "궁 병 숙 련 도", + "기 병 숙 련 도", + "귀 병 숙 련 도", + "차 병 숙 련 도", + "전 력 전 승 률", + "통 솔 전 승 률", + "일 기 토 승 률", + "설 전 승 률", + "베 팅 투 자 액", + "베 팅 당 첨", + "베 팅 수 익 금", + "베 팅 수 익 률" +); +for($i=0; $i < 21; $i++) { + switch($i) { + case 0: $query = "select nation,no,name,picture,imgsvr,experience as data from general where $sel order by data desc limit 0,10"; break; + case 1: $query = "select nation,no,name,picture,imgsvr,dedication as data from general where $sel order by data desc limit 0,10"; break; + case 2: $query = "select nation,no,name,picture,imgsvr,firenum as data from general where $sel order by data desc limit 0,10"; break; + case 3: $query = "select nation,no,name,picture,imgsvr,warnum as data from general where $sel order by data desc limit 0,10"; break; + case 4: $query = "select nation,no,name,picture,imgsvr,killnum as data from general where $sel order by data desc limit 0,10"; break; + case 5: $query = "select nation,no,name,picture,imgsvr,killnum/warnum*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break; + case 6: $query = "select nation,no,name,picture,imgsvr,killcrew as data from general where $sel order by data desc limit 0,10"; break; + case 7: $query = "select nation,no,name,picture,imgsvr,killcrew/deathcrew*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break; + case 8: $query = "select nation,no,name,picture,imgsvr,dex0 as data from general where $sel order by data desc limit 0,10"; break; + case 9: $query = "select nation,no,name,picture,imgsvr,dex10 as data from general where $sel order by data desc limit 0,10"; break; + case 10: $query = "select nation,no,name,picture,imgsvr,dex20 as data from general where $sel order by data desc limit 0,10"; break; + case 11: $query = "select nation,no,name,picture,imgsvr,dex30 as data from general where $sel order by data desc limit 0,10"; break; + case 12: $query = "select nation,no,name,picture,imgsvr,dex40 as data from general where $sel order by data desc limit 0,10"; break; + case 13: $query = "select nation,no,name,picture,imgsvr,ttw/(ttw+ttd+ttl)*10000 as data from general where $sel and (ttw+ttd+ttl)>=50 order by data desc limit 0,10"; break; + case 14: $query = "select nation,no,name,picture,imgsvr,tlw/(tlw+tld+tll)*10000 as data from general where $sel and (tlw+tld+tll)>=50 order by data desc limit 0,10"; break; + case 15: $query = "select nation,no,name,picture,imgsvr,tpw/(tpw+tpd+tpl)*10000 as data from general where $sel and (tpw+tpd+tpl)>=50 order by data desc limit 0,10"; break; + case 16: $query = "select nation,no,name,picture,imgsvr,tiw/(tiw+tid+til)*10000 as data from general where $sel and (tiw+tid+til)>=50 order by data desc limit 0,10"; break; + case 17: $query = "select nation,no,name,picture,imgsvr,betgold as data from general where $sel order by data desc limit 0,10"; break; + case 18: $query = "select nation,no,name,picture,imgsvr,betwin as data from general where $sel order by data desc limit 0,10"; break; + case 19: $query = "select nation,no,name,picture,imgsvr,betwingold as data from general where $sel order by data desc limit 0,10"; break; + case 20: $query = "select nation,no,name,picture,imgsvr,betwingold/betgold*10000 as data from general where $sel and betgold >= 1000 order by data desc limit 0,10"; break; + } + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + echo " + + + "; + + for($k=0; $k < 10; $k++) { + $gen = MYDB_fetch_array($result); + if($i != 2) { + $name[$k] = $gen[name]; + $nation[$k] = $nationName[$gen[nation]]; + $data[$k] = $gen[data]; + $color[$k] = $nationColor[$gen[nation]]; + $pic[$k] = $gen[picture]; + } else { + $name[$k] = "???"; + $nation[$k] = "???"; + $data[$k] = $gen[data]; + $color[$k] = $_basecolor4; + $gen[imgsvr] = 0; + $pic[$k] = "9999.jpg"; + } + if($color[$k] == "") $color[$k] = $_basecolor4; + if($nation[$k] == "") $nation[$k] = " "; + if($pic[$k] == "") { + echo ""; + } else { + $imageTemp = GetImageURL($gen[imgsvr]); + echo ""; + } + } + + echo ""; + + for($k=0; $k < 10; $k++) { + echo ""; + } + + echo ""; + + for($k=0; $k < 10; $k++) { + echo ""; + } + + echo ""; + + for($k=0; $k < 10; $k++) { + if($i == 5 || $i == 7 || $i == 20) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } + if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } + echo ""; + } + echo ""; +} + +echo " +
$type[$i]
1위2위3위4위5위6위7위8위9위10위
 
{$nation[$k]}
{$name[$k]}
{$data[$k]}
+
+ +"; + +$type = array( + "명 마", + "명 검", + "명 서", + "도 구" +); + +$call = array( + "horse", + "weap", + "book", + "item" +); + +$func = array( + "getHorseName", + "getWeapName", + "getBookName", + "getItemName" +); + +for($i=0; $i < 4; $i++) { + echo " + + "; + for($k=26; $k > 16; $k--) { + $str = $func[$i]($k); + echo ""; + } + + echo ""; + + for($k=26; $k > 16; $k--) { + $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $name[$k] = $gen[name]; + $nation[$k] = $nationName[$gen[nation]]; + $color[$k] = $nationColor[$gen[nation]]; + $pic[$k] = $gen[picture]; + if($color[$k] == "") $color[$k] = $_basecolor4; + if($nation[$k] == "") $nation[$k] = " "; + if($pic[$k] == "") { + echo ""; + } else { + $imageTemp = GetImageURL($gen[imgsvr]); + echo ""; + } + } + + echo ""; + + for($k=26; $k > 16; $k--) { + echo ""; + } + + echo ""; + + for($k=26; $k > 16; $k--) { + echo ""; + } + + echo ""; + + echo " + "; + for($k=16; $k > 6; $k--) { + $str = $func[$i]($k); + echo ""; + } + + echo ""; + + for($k=16; $k > 6; $k--) { + $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + $name[$k] = $gen[name]; + $nation[$k] = $nationName[$gen[nation]]; + $color[$k] = $nationColor[$gen[nation]]; + $pic[$k] = $gen[picture]; + if($color[$k] == "") $color[$k] = $_basecolor4; + if($nation[$k] == "") $nation[$k] = " "; + if($pic[$k] == "") { + echo ""; + } else { + $imageTemp = GetImageURL($gen[imgsvr]); + echo ""; + } + } + + echo ""; + + for($k=16; $k > 6; $k--) { + echo ""; + } + + echo ""; + + for($k=16; $k > 6; $k--) { + echo ""; + } + + echo ""; +} + +?> +
$type[$i]
".$str."
 
{$nation[$k]}
{$name[$k]}
".$str."
 
{$nation[$k]}
{$name[$k]}
+ + + +
+ + + + diff --git a/twe_close/a_emperior.php b/twe_close/a_emperior.php new file mode 100644 index 00000000..6159ac2e --- /dev/null +++ b/twe_close/a_emperior.php @@ -0,0 +1,199 @@ + + + + + + +왕조일람 + + + + + + + +
역 대 왕 조
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ $emperior[phase] + + +
+ $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) +
국 력$emperior[power]장 수$emperior[gennum]속 령$emperior[citynum]성 향$emperior[type]
황 제$emperior[l12name]승 상$emperior[l11name]위 장 군$emperior[l10name]사 공$emperior[l9name]
+"; + } +} else { + $query = "select * from emperior where no='$select'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $emperior = MYDB_fetch_array($result); + +//background={$image}/{$emperior[l12pic]} + + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ $emperior[phase] + + +
국 가 수
(최종 / 최대)
$emperior[nation_count]장 수 수
(최종 / 최대)
$emperior[gen_count]
등 장 국 가$emperior[nation_name]
국가별 성향$emperior[nation_hist]
장 수 성 격$emperior[personal_hist]
장 수 특 기$emperior[special_hist]
+ $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) +
국 력$emperior[power]성 향$emperior[type]
장 수$emperior[gennum]속 령$emperior[citynum]
총 인 구$emperior[pop]인 구 율$emperior[poprate]
국 고$emperior[gold]병 량$emperior[rice]
황 제 $emperior[l12name]승 상 $emperior[l11name]
위 장 군 $emperior[l10name]사 공 $emperior[l9name]
표 기 장 군 $emperior[l8name]태 위 $emperior[l7name]
거 기 장 군 $emperior[l6name]사 도 $emperior[l5name]
오 호 장 군$emperior[tiger]
건 안 칠 자$emperior[eagle]
장 수 들
(공헌도 순서)
$emperior[gen]
역 사 기 록".ConvertLog($emperior[history], 1)."
+"; +} +?> + + + + +
+ + + + diff --git a/twe_close/a_emperior2.php b/twe_close/a_emperior2.php new file mode 100644 index 00000000..c3d9e8c5 --- /dev/null +++ b/twe_close/a_emperior2.php @@ -0,0 +1,200 @@ + + + + + + +왕조일람 + + + + + + + +
역 대 왕 조
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ $emperior[phase] + + +
+ $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) +
국 력$emperior[power]장 수$emperior[gennum]속 령$emperior[citynum]성 향$emperior[type]
황 제$emperior[l12name]승 상$emperior[l11name]위 장 군$emperior[l10name]사 공$emperior[l9name]
+"; + } +} 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); + +//background={$image}/{$emperior[l12pic]} + + echo " +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ $emperior[phase] + + +
국 가 수
(최종 / 최대)
$emperior[nation_count]장 수 수
(최종 / 최대)
$emperior[gen_count]
등 장 국 가$emperior[nation_name]
국가별 성향$emperior[nation_hist]
장 수 성 격$emperior[personal_hist]
장 수 특 기$emperior[special_hist]
+ $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) +
국 력$emperior[power]성 향$emperior[type]
장 수$emperior[gennum]속 령$emperior[citynum]
총 인 구$emperior[pop]인 구 율$emperior[poprate]
국 고$emperior[gold]병 량$emperior[rice]
황 제 $emperior[l12name]승 상 $emperior[l11name]
위 장 군 $emperior[l10name]사 공 $emperior[l9name]
표 기 장 군 $emperior[l8name]태 위 $emperior[l7name]
거 기 장 군 $emperior[l6name]사 도 $emperior[l5name]
오 호 장 군$emperior[tiger]
건 안 칠 자$emperior[eagle]
장 수 들
(공헌도 순서)
$emperior[gen]
역 사 기 록".ConvertLog($emperior[history], 1)."
+
"; +} +?> + + + + +
+ + + + diff --git a/twe_close/a_genList.php b/twe_close/a_genList.php new file mode 100644 index 00000000..21c54ed7 --- /dev/null +++ b/twe_close/a_genList.php @@ -0,0 +1,182 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +if($type == 0) { + $type = 9; +} +$sel[$type] = "selected"; + +?> + + + + +장수일람 + + + + + + + + +
장 수 일 람
정렬순서 : + +
+
+ + + 얼 굴 + 이 름 + 연령 + 성격 + 특기 + 레 벨 + 국 가 + 명 성 + 계 급 + 관 직 + 통솔 + 무력 + 지력 + 삭턴 + 벌점 + "; +for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $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) { + $lbonus = "+{$lbonus}"; + } else { + $lbonus = ""; + } + + if($general[injury] > 0) { + $leader = floor($general[leader] * (100 - $general[injury])/100); + $power = floor($general[power] * (100 - $general[injury])/100); + $intel = floor($general[intel] * (100 - $general[injury])/100); + $leader = "{$leader}{$lbonus}"; + $power = "{$power}"; + $intel = "{$intel}"; + } else { + $leader = "{$general[leader]}{$lbonus}"; + $power = "{$general[power]}"; + $intel = "{$general[intel]}"; + } + + if($general[npc] >= 2) { $name = "$general[name]"; } + elseif($general[npc] == 1) { $name = "$general[name]"; } + else { $name = "$general[name]"; } + + $general[connect] = round($general[connect] / 10, 0) * 10; + + $imageTemp = GetImageURL($general[imgsvr]); + echo " + + + $name + $general[age]세 + ".getGenChar($general[personal])." + ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." + Lv ".getExpLevel($general[experience])." + {$nation} + ".getHonor($general[experience])." + ".getDed($general[dedication])." + "; echo getLevel($general[level]); echo " + $leader + $power + $intel + $general[killturn] + $general[connect]"; echo "
【".getConnect($general[connect])."】 + "; +} +echo " + +"; + +MYDB_close($connect); +?> + + + + +
+ + + + diff --git a/twe_close/a_hallOfFame.php b/twe_close/a_hallOfFame.php new file mode 100644 index 00000000..3eecaadd --- /dev/null +++ b/twe_close/a_hallOfFame.php @@ -0,0 +1,103 @@ + + + + + +명예의 전당 + + + + + + + +
명 예 의 전 당
+ + + + "; + + for($k=0; $k < 10; $k++) { + $gen = MYDB_fetch_array($result); + $name[$k] = $gen[name]; + $nation[$k] = $gen[nation]; + $data[$k] = $gen[data]; + $color[$k] = $gen[color]; + $pic[$k] = $gen[picture]; + if($color[$k] == "") $color[$k] = $_basecolor4; + if($nation[$k] == "") $nation[$k] = " "; +/* + if($pic[$k] == "") { + echo ""; + } else { + $imageTemp = GetImageURL($gen[imgsvr]); + echo ""; + } +*/ + } + +// echo ""; + + for($k=0; $k < 10; $k++) { + echo ""; + } + + echo ""; + + for($k=0; $k < 10; $k++) { + echo ""; + } + + echo ""; + + for($k=0; $k < 10; $k++) { + if($i == 5 || $i == 7 || $i == 20) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } + if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } + echo ""; + } + echo ""; +} +?> +
$type[$i]
1위2위3위4위5위6위7위8위9위10위
 
{$nation[$k]}
{$name[$k]}
{$data[$k]}
+ + + +
+ + + + diff --git a/twe_close/a_history.php b/twe_close/a_history.php new file mode 100644 index 00000000..83cfe509 --- /dev/null +++ b/twe_close/a_history.php @@ -0,0 +1,137 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +$query = "select year,month from history order by no limit 1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$history = MYDB_fetch_array($result); +$s = ($history[year]*12) + $history[month]; + +$query = "select year,month from history order by no desc limit 1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$history = MYDB_fetch_array($result); +$e = ($history[year]*12) + $history[month]; + +if(!$yearmonth) { + $year = $admin['year']; + $month = $admin['month'] - 1; +} else { + $year = substr($yearmonth, 0, 3) - 0; + $month = substr($yearmonth, 3, 2) - 0; + + if($btn == "◀◀ 이전달") { + $month -= 1; + } elseif($btn == "다음달 ▶▶") { + $month += 1; + } +} +$now = ($year*12) + $month; + +if($now < $s) { $now = $s; } +if($now > $e) { $now = $e; } + +$year = floor($now / 12); +$month = $now % 12; +if($month <= 0) { + $year -= 1; + $month += 12; +} + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + + +연감 + + + + + + + + +
연 감
+
+ 년월 선택 : + + + + +
+
+ + + + + + + + + + + + + + + + + +
중 원 지 도
+ +
중 원 정 세
+ +
장 수 동 향
+ +
+ + + +
+ + + + diff --git a/twe_close/a_kingdomList.php b/twe_close/a_kingdomList.php new file mode 100644 index 00000000..108b78cf --- /dev/null +++ b/twe_close/a_kingdomList.php @@ -0,0 +1,246 @@ += 2) { printLimitMsg($me[turntime]); exit(); } +?> + + + + +세력일람 + + + + + + + +
세 력 일 람
+= 2) { $l12 = "$level12[name]"; } + elseif($level12[npc] == 1) { $l12 = "$level12[name]"; } + else { $l12 = $level12[name]; } + + if($level11[name] == "") { $l11 = "-"; } + elseif($level11[npc] >= 2) { $l11 = "$level11[name]"; } + elseif($level11[npc] == 1) { $l11 = "$level11[name]"; } + else { $l11 = $level11[name]; } + + if($level10[name] == "") { $l10 = "-"; } + elseif($level10[npc] >= 2) { $l10 = "$level10[name]"; } + elseif($level10[npc] == 1) { $l10 = "$level10[name]"; } + else { $l10 = $level10[name]; } + + if($level9[name] == "") { $l9 = "-"; } + elseif($level9[npc] >= 2) { $l9 = "$level9[name]"; } + elseif($level9[npc] == 1) { $l9 = "$level9[name]"; } + else { $l9 = $level9[name]; } + + if($level8[name] == "") { $l8 = "-"; } + elseif($level8[npc] >= 2) { $l8 = "$level8[name]"; } + elseif($level8[npc] == 1) { $l8 = "$level8[name]"; } + else { $l8 = $level8[name]; } + + if($level7[name] == "") { $l7 = "-"; } + elseif($level7[npc] >= 2) { $l7 = "$level7[name]"; } + elseif($level7[npc] == 1) { $l7 = "$level7[name]"; } + else { $l7 = $level7[name]; } + + if($level6[name] == "") { $l6 = "-"; } + elseif($level6[npc] >= 2) { $l6 = "$level6[name]"; } + elseif($level6[npc] == 1) { $l6 = "$level6[name]"; } + else { $l6 = $level6[name]; } + + if($level5[name] == "") { $l5 = "-"; } + elseif($level5[npc] >= 2) { $l5 = "$level5[name]"; } + elseif($level5[npc] == 1) { $l5 = "$level5[name]"; } + else { $l5 = $level5[name]; } + + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
【 {$nation[name]} 】
성 향".getNationType($nation[type])."작 위".getNationLevel($nation[level])."국 력{$nation[power]}장수 / 속령{$gencount} / {$citycount}
".getLevel(12, $nation[level])."$l12".getLevel(11, $nation[level])."$l11".getLevel(10, $nation[level])."$l10".getLevel( 9, $nation[level])."$l9
".getLevel( 8, $nation[level])."$l8".getLevel( 7, $nation[level])."$l7".getLevel( 6, $nation[level])."$l6".getLevel( 5, $nation[level])."$l5
"; + if($nation[level] > 0) { + echo "속령 일람 : "; + + for($j=0; $j < $citycount; $j++) { + $city = MYDB_fetch_array($cityresult); + if($city[city] == $nation[capital]) { + echo "[{$city[name]}], "; + } else { + echo "$city[name], "; + } + } + } 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 "현재 위치 : $city[name]"; + } + echo" +
장수 일람 : "; + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + if($general[npc] >= 2) { echo "$general[name], "; } + elseif($general[npc] == 1) { echo "$general[name], "; } + else { echo "$general[name], "; } + } + 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 " + + + + + + + + + + + + + + + + + +
【 재 야 】
 장 수{$gencount}속 령{$citycount}
속령 일람 : "; +for($j=0; $j < $citycount; $j++) { + $city = MYDB_fetch_array($cityresult); + echo "$city[name], "; +} +echo" +
장수 일람 : "; + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + if($general[npc] >= 2) { echo "$general[name], "; } + elseif($general[npc] == 1) { echo "$general[name], "; } + else { echo "$general[name], "; } + } + echo" +
"; + +?> + + + + +
+ + + + diff --git a/twe_close/a_npcList.php b/twe_close/a_npcList.php new file mode 100644 index 00000000..2a94a39d --- /dev/null +++ b/twe_close/a_npcList.php @@ -0,0 +1,117 @@ + + + + + +빙의일람 + + + + + + + + +
빙 의 일 람
정렬순서 : + +
+
+ + + 희생된 장수 + 악령 이름 + 레벨 + 국가 + 성격 + 특기 + 종능 + 통솔 + 무력 + 지력 + 명성 + 계급 + "; +for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $nation = $nationname[$general[nation]]; + + if($general[npc] >= 2) { $name = "$general[name]"; } + elseif($general[npc] == 1) { $name = "$general[name]"; } + else { $name = "$general[name]"; } + + echo " + + {$name} + {$general[name2]} + Lv {$general[explevel]} + {$nation} + ".getGenChar($general[personal])." + ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." + $general[sum] + $general[leader] + $general[power] + $general[intel] + {$general[experience]} + {$general[dedication]} + "; +} +echo " + +"; + +MYDB_close($connect); +?> + + + + +
+ + + + diff --git a/twe_close/a_status.php b/twe_close/a_status.php new file mode 100644 index 00000000..c9dafa4c --- /dev/null +++ b/twe_close/a_status.php @@ -0,0 +1,58 @@ += 2) { printLimitMsg($me[turntime]); exit(); } +?> + + + + +세력도 + + + + + + + +
세 력 도
+ + + + + + + + +
+ + + +
+ +
+ + + +
+ + + + + diff --git a/twe_close/a_traffic.php b/twe_close/a_traffic.php new file mode 100644 index 00000000..3731917b --- /dev/null +++ b/twe_close/a_traffic.php @@ -0,0 +1,257 @@ +"; } +echo $str; + +$curonline = onlinenum($connect); +for($i=0; $i < 11; $i++) { + $parse = explode("|", $log[count($log)-12+$i]); + $date[$i] = trim($parse[0]); + $year[$i] = trim($parse[1]); + $month[$i] = trim($parse[2]); + $refresh[$i] = trim($parse[3]); + $online[$i] = trim($parse[4]); +} +if($game[maxrefresh] == 0) { $game[maxrefresh] = 1; } +if($game[maxrefresh] < $game[refresh]) { $game[maxrefresh] = $game[refresh]; } +if($game[maxonline] == 0) { $game[maxonline] = 1; } +if($game[maxonline] < $curonline) { $game[maxonline] = $curonline; } +?> + + +트래픽정보 + + + + + + + +
트 래 픽 정 보
+
+ + + +
+ + += 100) { $w -= 0.1; } + if($refresh[$i] < 10 && $w < 3) { $w = 3; } + elseif($refresh[$i] < 100 && $w < 6) { $w = 6; } + elseif($refresh[$i] < 1000 && $w < 9) { $w = 9; } + $w2 = round(100 - $w, 1); + $color = getColor($w); + $dt = substr($date[$i], 11, 5); + echo " + + + + + + + "; +} +$w = round($game[refresh] / $game[maxrefresh] * 100, 1); +if($w >= 100) { $w -= 0.1; } +if($game[refresh] < 10 && $w < 3) { $w = 3; } +elseif($game[refresh] < 100 && $w < 6) { $w = 6; } +elseif($game[refresh] < 1000 && $w < 9) { $w = 9; } +$w2 = round(100 - $w, 1); +$color = getColor($w); +$dt = date('H:i'); +echo " + + + + + + + + + + +"; +?> +
접 속 량
{$year[$i]}년 {$month[$i]}월{$dt} + + + + + +
{$refresh[$i]}  
+
{$game[year]}년 {$game[month]}월{$dt} + + + + + +
{$game[refresh]}  
+
최고기록: {$game[maxrefresh]}
+
+ + += 100) { $w -= 0.1; } + if($online[$i] < 10 && $w < 3) { $w = 3; } + elseif($online[$i] < 100 && $w < 6) { $w = 6; } + elseif($online[$i] < 1000 && $w < 9) { $w = 9; } + $w2 = round(100 - $w, 1); + $color = getColor($w); + $dt = substr($date[$i], 11, 5); + echo " + + + + + + + "; +} +$w = round($curonline / $game[maxonline] * 100, 1); +if($w >= 100) { $w -= 0.1; } +if($curonline < 10 && $w < 3) { $w = 3; } +elseif($curonline < 100 && $w < 6) { $w = 6; } +elseif($curonline < 1000 && $w < 9) { $w = 9; } +$w2 = round(100 - $w, 1); +$color = getColor($w); +$dt = date('H:i'); +echo " + + + + + + + + + + +"; +?> +
접 속 자
{$year[$i]}년 {$month[$i]}월{$dt} + + + + + +
{$online[$i]}  
+
{$game[year]}년 {$game[month]}월{$dt} + + + + + +
{$curonline}  
+
최고기록: {$game[maxonline]}
+
+
+ + + + + + + + + + + + +"; + +$query = "select name,refresh,connect from general order by refresh desc limit 0,5"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $user = MYDB_fetch_array($result); + + $w = round($user[refresh] / $maxrefresh * 100, 1); + $w2 = round(100 - $w, 1); + $color = getColor($w); + echo " + + + + + + "; +} +?> +
주 의 대 상 자 (순간과도갱신)
주의대상자벌점(순간갱신)전체 대비
접속자 총합{$user[connect]}({$maxrefresh}) + + + + + +
  
+
{$user[name]}{$user[connect]}({$user[refresh]}) + + + + + +
  
+
+
+ + + +
+ + + + + diff --git a/twe_close/a_vote.php b/twe_close/a_vote.php new file mode 100644 index 00000000..b6acb56c --- /dev/null +++ b/twe_close/a_vote.php @@ -0,0 +1,338 @@ + + + +설문조사 + + + + + + + + +
설 문 조 사
+ + + += 5) { + echo " + + + + + + "; +} + +$vote[0] = Tag2Code($vote[0]); +echo " + + + + +"; + +$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); + +$query = "select no from general where npc<2"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$allCount = MYDB_num_rows($result); + +$percentage = round($voteCount / $allCount * 100, 1); + +$voteTypeCount = count($vote); +for($i=1; $i < $voteTypeCount; $i++) { + echo " + + + + + + "; +} + +echo " + +"; +if($me[vote] == 0 && $me[no] > 0) { + echo " + + + "; +} else { + echo " + + "; +} +echo " + + +"; + +if($me[userlevel] >= 5) { + echo " + + + + + + "; +} + +if($admin[votecomment] != "") { + $comment = explode("|", $admin[votecomment]); + $commentCount = count($comment); +} else { + $commentCount = 0; +} +echo " +
설 문 조 사 (금과 추첨으로 유니크템 증정!)
제 목 {$vote[0]}
{$i}. + "; + if($me[vote] == 0 && $me[no] > 0) { + echo " + + "; + } elseif($admin[voteopen] >= 1 || $me[userlevel] >= 5) { + $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 " +  {$vote[$i]}
투표결산 투표율 : {$voteCount} / {$allCount} ({$percentage} %)
+ + + + +"; +for($i=0; $i < $commentCount; $i++) { + $cmt = explode(":", $comment[$i]); + $cmt[2] = Tag2Code($cmt[2]); + $j = $i+1; + echo " + + + + + + + "; +} +if($me[no] > 0) { + echo " + + + + + + "; +} +?> +
댓 글
{$j}.{$cmt[0]}{$cmt[1]} {$cmt[2]}
-
+
+ + "; + +if($admin[voteopen] >= 1 || $me[userlevel] >= 5) { + echo " + + + + + + "; +} + +if($admin[voteopen] >= 2 || $me[userlevel] >= 5) { + $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(!$nationVoteCount[0]) { $nationVoteCount[0] = 0; } + $percentage = @round($nationVoteCount[0] / $memCount * 100, 1); + + echo " + + + + + + "; + + $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); + + if(!$nationVoteCount[$nation[nation]]) { $nationVoteCount[$nation[nation]] = 0; } + $percentage = @round($nationVoteCount[$nation[nation]] / $memCount * 100, 1); + + echo " + + + + + + "; + } +} +?> + +
+ 전 체 통 계 += 5) { + echo " + + + "; +} +echo " +
전 체{$voteCount} / {$allCount} ({$percentage} %) + + + "; + + $query = "select no from general where npc<2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $memCount = MYDB_num_rows($result); + + $query = "select nation,vote from general where npc<2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $vote = MYDB_fetch_array($result); + + $totalVote[$vote[vote]]++; + if($vote[vote] > 0) { $nationVoteCount[$vote[nation]]++; } + $nationVote[$vote[nation]][$vote[vote]]++; + } + + for($i=0; $i < $voteTypeCount; $i++) { + $per = @round($totalVote[$i] / $memCount * 100, 1); +// if($per < 5) { $vote[cnt] = " "; } + echo " + + "; + } + + echo " + +
{$totalVote[$i]}
+
재 야{$nationVoteCount[0]} / {$memCount} ({$percentage} %) + + + "; + + for($i=0; $i < $voteTypeCount; $i++) { + $per = @round($nationVote[0][$i] / $memCount * 100, 1); +// if($per < 5) { $vote[cnt] = " "; } + echo " + + "; + } + + echo " + +
{$nationVote[0][$i]}
+
{$nation[name]}{$nationVoteCount[$nation[nation]]} / {$memCount} ({$percentage} %) + + + "; + + for($k=0; $k < $voteTypeCount; $k++) { + $per = @round($nationVote[$nation[nation]][$k] / $memCount * 100, 1); +// if($per < 5) { $vote[cnt] = " "; } + echo " + + "; + } + + echo " + +
{$nationVote[$nation[nation]][$k]}
+
+ + + +
+ + + + + 0) { + $type = (($type - 1) % 7) + 1; + } + + switch($type) { + 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; +} + +function getNewColor($type) { + if($type > 0) { + $type = (($type - 1) % 7) + 1; + } + + switch($type) { + case 2: $color = "black"; break; + case 3: $color = "black"; break; + default:$color = "white"; break; + } + + return $color; +} + +?> diff --git a/twe_close/analytics.php b/twe_close/analytics.php new file mode 100644 index 00000000..bf3f0d19 --- /dev/null +++ b/twe_close/analytics.php @@ -0,0 +1,13 @@ + diff --git a/twe_close/b_auction.php b/twe_close/b_auction.php new file mode 100644 index 00000000..57ef9961 --- /dev/null +++ b/twe_close/b_auction.php @@ -0,0 +1,260 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +$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($me[userlevel] >= 5 || ($me[special] != 30 && $btCount < 1) || ($me[special] == 30 && $btCount < 3)) { + $btn = "submit"; +} else { + $btn = "hidden"; +} + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} + +if($msg == "") $msg = "-"; +if($msg2 == "") $msg2 = "-"; +?> + + +거래장 + + + + + + + + +
거 래 장
거 래 장
+ + + + + + + + + + + + + + + + + 0 && $auction[amount] * 2 <= $auction[value] && $auction[stuff] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($auction[no2] > 0 && $auction[topv] <= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($chk == 0) { $radio = " checked"; $chk = 1; } + $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; + $pv = substr($pv, 0, 4); + if($auction[stuff] != 0) { $pv = '-'; } + echo " + + + + + + + + + + + + + + "; +} +?> + + + + + + + + + + + + + + + + +
팝 니 다
거래번호선택판매자물품수량시작판매가현재판매가즉시판매가단가구매 예정자거래종료
{$auction[no]}{$auction[name1]}{$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$alert}{$pv}{$alert2}{$alert}{$auction[name2]}{$alert2}{$auction[expire]}
등록결과
입찰등록 +  지불할 금액: + name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'> +
거래등록 +  종료: 턴 후 +  물품: +  판매량: +  시작가: +  즉구가: + name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'> +
+ ㆍHint) 거래자가 판매(물품 판매, 금 수령), 입찰자가 구매(물품 구입, 금 지불).
+ ㆍHint) 단가가 1.00보다 높을수록 판매자 유리.
+ ㆍHint) 단가가 1.00보다 낮을수록 입찰자 유리.
+
+
+ + + + + + + + + + + + + + + + + 0 && $auction[amount] >= $auction[value] * 2 && $auction[stuff] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($auction[no2] > 0 && $auction[topv] >= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($chk == 0) { $radio = " checked"; $chk = 1; } + $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; + $pv = substr($pv, 0, 4); + if($auction[stuff] != 0) { $pv = '-'; } + echo " + + + + + + + + + + + + + + "; +} +?> + + + + + + + + + + + + + + + + +
삽 니 다
거래번호선택구매자물품수량시작구매가현재구매가즉시구매가단가판매 예정자거래종료
{$auction[no]}{$auction[name1]}{$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$alert}{$pv}{$alert2}{$alert}{$auction[name2]}{$alert2}{$auction[expire]}
등록결과
입찰등록 +  수령할 금액: + name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'> +
거래등록 +  종료: 턴 후 +  물품: +  구입량: +  시작가: +  즉구가: + name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'> +
+ ㆍHint) 거래자가 구매(물품 구매, 금 지불), 입찰자가 판매(물품 판매, 금 수령).
+ ㆍHint) 단가가 1.00보다 낮을수록 구매자 유리.
+ ㆍHint) 단가가 1.00보다 높을수록 입찰자 유리.
+
+
+ + + + + + + +
최 근 기 록
+ +
도 움 말
+ +ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.
+ㆍHint) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)
+ㆍHint) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 겁니다.
+ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.
+ㆍHint) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)
+ㆍHint) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 겁니다.
+ㆍ마감임박때 입찰하는 경우 입찰후 1턴 후로 종료시간이 연장됩니다.
+ㆍ즉시구매가로 입찰하는 경우 입찰후 1턴 후로 종료시간이 결정됩니다.
+ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.
+ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.
+ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.
+ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다. 거상 특기 소유자는 1인당 도합 3건입니다.
+ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.
+ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.
+ㆍ10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.
+ㆍ★ 최고가 거래 ★ 혹은 ★ 최저가 거래 ★ 는 암거래 및 악용의 가능성이니 감시 부탁드립니다.
+ㆍ거래와 입찰은 취소가 불가능하니 주의하세요!
+ㆍHint) 단가는 금/쌀로 쌀1을 거래하기 위한 금의 양입니다.
+ㆍHint) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.
+ㆍHint) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.
+ㆍ즐거운 거래! +
+
+ + + diff --git a/twe_close/b_battleCenter.php b/twe_close/b_battleCenter.php new file mode 100644 index 00000000..f61d9645 --- /dev/null +++ b/twe_close/b_battleCenter.php @@ -0,0 +1,142 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +//재야인 경우 +$meLevel = $me[level]; +if($meLevel == 0 || ($meLevel == 1 && $me[belong] < $nation[secretlimit])) { + echo "수뇌부가 아니거나 사관년도가 부족합니다."; + exit(); +} + +//잘못된 접근 +if($general[nation] != $me[nation]) { + $gen = 0; +} + +if($btn == '정렬하기') { + $gen = 0; +} + +if($type == 0) { + $type = 0; +} +$sel[$type] = "selected"; + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + +감찰부 + + + + + + + + + +
감 찰 부
+
+ 정렬순서 : + + + 대상장수 : + + +
+
+ + + + + + + + + + + + + + + + + +
장 수 정 보장 수 열 전
+ + + +
전투 기록전투 결과
+ + + +
+ + + +
+ + + diff --git a/twe_close/b_betting.php b/twe_close/b_betting.php new file mode 100644 index 00000000..0e4963d9 --- /dev/null +++ b/twe_close/b_betting.php @@ -0,0 +1,339 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +switch($admin[tnmt_type]) { +case 0: $tnmt_type = "전력전"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break; +case 1: $tnmt_type = "통솔전"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break; +case 2: $tnmt_type = "일기토"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break; +case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break; +} + +$str1 = getTournament($admin[tournament]); +$str2 = getTournamentTime($connect); +$str3 = getTournamentTerm($connect); + +?> + + + + +베팅장 + + + + + + + +
베 팅 장
+ + + + +
()
16강 상황
(전체 금액 : / 내 투자 금액 : )
+ + + +=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); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + echo ""; +} + +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),""); +for($i=0; $i < 1; $i++) { $cent[$i] = ""; } +for($i=0; $i < 2; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 1; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 2; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 4; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 2; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 4; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 8; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 4; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 8; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 16; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 8; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 16; $i++) { + echo ""; +} + +$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='$_SESSION[p_id]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$me = MYDB_fetch_array($result); +for($i=0; $i < 16; $i++) { + $myBet[$i] = $me["bet{$i}"]; +} + +for($i=0; $i < 16; $i++) { + $bet[$i] = @round($admin[bet] / $admin["bet{$i}"], 2); + if($bet[$i] == 0) { $bet[$i] = "∞"; } +} + +for($i=0; $i < 16; $i++) { + $gold[$i] = round($myBet[$i] * $bet[$i]); +} +?> + +
{$general[name]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
+ + +"; + +for($i=0; $i < 16; $i++) { + echo ""; +} +?> + + + + + + +{$myBet[$i]}"; +} +?> + + + + + + +{$gold[$i]}"; +} + +echo " + + "; + +if($admin[tournament] == 6) { + echo " + + "; + + for($i=0; $i < 16; $i++) { + echo " + "; + } + + echo " + + "; + + for($i=0; $i < 16; $i++) { + echo " + "; + } + + echo " + +"; +} + +?> + + + + +
{$bet[$i]}
××××××××××××××××
+ +
+ 배당률 × 베팅금 = 적중시 환수금
+ ( 베팅후 500원 이하일땐 베팅이 불가능합니다. ) +
+ + + + + +
토너먼트 랭킹
순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수
+ + "; + + $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 " +
{$type1[$i]}
장수{$type2[$i]}
+ "; +} + +?> + + + +ㆍ토너먼트의 16강 대진표가 완성되면, 베팅 기간이 주어집니다.
+ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 알 수 있습니다.
+ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 금 1000씩 베팅 가능합니다.
+ㆍ소지금 500원 이하일땐 베팅이 불가능합니다. +ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!
+ + + + + + +
+ + + diff --git a/twe_close/b_chiefboard.php b/twe_close/b_chiefboard.php new file mode 100644 index 00000000..9e783b9d --- /dev/null +++ b/twe_close/b_chiefboard.php @@ -0,0 +1,71 @@ + + + +기밀실 + + + + + + + + + + + + + +
기 밀 실
+ 제목 +
+
+ + +
+
+ + + + + +
+ + + + diff --git a/twe_close/b_chiefcenter.php b/twe_close/b_chiefcenter.php new file mode 100644 index 00000000..0cc44cb3 --- /dev/null +++ b/twe_close/b_chiefcenter.php @@ -0,0 +1,175 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { + echo "수뇌부가 아니거나 사관년도가 부족합니다."; + exit(); +} + +if($me[level] >= 5) { $btn = "submit"; $btn2 = "button"; } +else { $btn = "hidden"; $btn2 = "hidden"; } + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} + +$date = date('Y-m-d H:i:s'); + +// 명령 목록 +$query = "select year,month,turnterm from game where no='1'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$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]); +for($i=12; $i >= $lv; $i--) { + $turn[$i] = getCoreTurn($connect, $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); +} + +?> + + + +사령부 + + + + + + + + +
사 령 부
+ + + + + + + + + + + "; + + 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] == "") ? "-" : $turndate[$l4]; + $td3 = ($turndate[$l3] == "") ? "-" : $turndate[$l3]; + $td2 = ($turndate[$l2] == "") ? "-" : $turndate[$l2]; + $td1 = ($turndate[$l1] == "") ? "-" : $turndate[$l1]; + $tn4 = ($turn[$l4][$i] == "") ? "-" : $turn[$l4][$i]; + $tn3 = ($turn[$l3][$i] == "") ? "-" : $turn[$l3][$i]; + $tn2 = ($turn[$l2][$i] == "") ? "-" : $turn[$l2][$i]; + $tn1 = ($turn[$l1][$i] == "") ? "-" : $turn[$l1][$i]; + echo " + + + + + + + + + + + + + "; + 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 ""; + } +} + +?> +
수뇌부 일정
+= $lv; $i--) { + $totaldate[$i] = $gen[$i][turntime]; + $turntime[$i] = substr($gen[$i][turntime], 14); +} + +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] = "".$gen[$l4][name].""; } + elseif($gen[$l4][npc] == 1) { $gen[$l4][name] = "".$gen[$l4][name].""; } + if ($gen[$l3][npc] >= 2) { $gen[$l3][name] = "".$gen[$l3][name].""; } + elseif($gen[$l3][npc] == 1) { $gen[$l3][name] = "".$gen[$l3][name].""; } + if ($gen[$l2][npc] >= 2) { $gen[$l2][name] = "".$gen[$l2][name].""; } + elseif($gen[$l2][npc] == 1) { $gen[$l2][name] = "".$gen[$l2][name].""; } + if ($gen[$l1][npc] >= 2) { $gen[$l1][name] = "".$gen[$l1][name].""; } + elseif($gen[$l1][npc] == 1) { $gen[$l1][name] = "".$gen[$l1][name].""; } + + echo " +
.".getLevel($l4, $nation[level])." : {$gen[$l4][name]}".getLevel($l3, $nation[level])." : {$gen[$l3][name]}".getLevel($l2, $nation[level])." : {$gen[$l2][name]}".getLevel($l1, $nation[level])." : {$gen[$l1][name]}.
$j$td4$tn4$td3$tn3$td2$tn2$td1$tn1$j
"; + CoreTurnTable(); + echo " + + +
"; + CoreCommandTable($connect); + echo "
+ + + +
+ + + + diff --git a/twe_close/b_currentCity.php b/twe_close/b_currentCity.php new file mode 100644 index 00000000..40ab67c5 --- /dev/null +++ b/twe_close/b_currentCity.php @@ -0,0 +1,352 @@ + + + + +도시정보 + + + + + + + + +
도 시 정 보
+ + + + + +
+
도시선택 : + + +

명령 화면에서 도시를 클릭하셔도 됩니다.

+
+
+
"; + +// 첩보된 도시까지만 허용 +if($valid == 0 && $me[userlevel] < 5) { + $_POST[citylist] = $me[city]; +} + +$query = "select * from city where city='$_POST[citylist]'"; // 도시 이름 목록 +$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$city = MYDB_fetch_array($cityresult); + +$query = "select nation,name,color from nation where nation='$city[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$nation = MYDB_fetch_array($result); + +$query = "select name from general where no='$city[gen1]'"; // 태수 이름 +$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gen1 = MYDB_fetch_array($genresult); + +$query = "select name from general where no='$city[gen2]'"; // 군사 이름 +$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gen2 = MYDB_fetch_array($genresult); + +$query = "select name from general where no='$city[gen3]'"; // 시중 이름 +$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$gen3 = MYDB_fetch_array($genresult); + +if($city[trade] == 0) { + $city[trade] = "- "; +} +?> + + + +
+ + + + 【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name] + + + 주민 + $city[pop]/$city[pop2] + 농업 + $city[agri]/$city[agri2] + 상업 + $city[comm]/$city[comm2] + 치안 + $city[secu]/$city[secu2] + 수비 + $city[def]/$city[def2] + 성벽 + $city[wall]/$city[wall2] + + + 민심 + $city[rate] + 시세 + {$city[trade]}% + 인구 + ".round($city[pop]/$city[pop2]*100, 2)." % + 태수 + ";echo $gen1[name]==''?"-":"$gen1[name]";echo " + 군사 + ";echo $gen2[name]==''?"-":"$gen2[name]";echo " + 시중 + ";echo $gen3[name]==''?"-":"$gen3[name]";echo " + + + 장수 + "; + $query = "select name from general where city='$city[city]' and nation='$city[nation]'"; // 장수 목록 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + if($gencount == 0) echo "-"; + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($genresult); + echo "$general[name], "; + } + echo " + + +"; + +$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 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); + +$query = "select nation,level,name from nation"; // 국가 이름 목록 +$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); + $nationname[$nation[nation]] = $nation[name]; + $nationlevel[$nation[nation]] = $nation[level]; +} + +if($gencount != 0) { + echo " +
+ + + + + + + + + + + + + + + "; +} + +for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + + if($general[level] == 12) { + $lbonus = $nationlevel[$general[nation]] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nationlevel[$general[nation]]; + } else { + $lbonus = 0; + } + if($lbonus > 0) { + $lbonus = "+{$lbonus}"; + } else { + $lbonus = ""; + } + + if($general[injury] > 0) { + $leader = floor($general[leader] * (100 - $general[injury])/100); + $power = floor($general[power] * (100 - $general[injury])/100); + $intel = floor($general[intel] * (100 - $general[injury])/100); + $leader = "{$leader}{$lbonus}"; + $power = "{$power}"; + $intel = "{$intel}"; + } else { + $leader = "{$general[leader]}{$lbonus}"; + $power = "{$general[power]}"; + $intel = "{$general[intel]}"; + } + + if($general[npc] >= 2) { $general[name] = "{$general[name]}"; } + elseif($general[npc] == 1) { $general[name] = "{$general[name]}"; } + $imageTemp = GetImageURL($general[imgsvr]); + echo " + + + + + + + "; + //아국장수이거나 보는 사람이 운영자일때 보여줌 + if(($general[nation] != 0 && $general[nation] == $myNation[nation]) || $me[userlevel] >= 5) { + switch($general[mode]) { + case 0: $mode = "×"; break; + case 1: $mode = "○"; break; + case 2: $mode = "◎"; break; + } + + echo " + + + + + "; + if($general[npc] >= 2) { + echo " + + + + + + + + + + + + "; +} +?> +
얼 굴이 름통솔무력지력관 직병 종병 사훈련사기명 령
$general[name]$leader$power$intel".getLevel($general[level])."$mode".getTypename($general[crewtype])."$general[crew]$general[train]$general[atmos]NPC 장수"; + } else { + echo " + + "; + $turn = getTurn($connect, $general, 1); + + for($i=0; $i < 5; $i++) { + $k = $i+1; + echo " +   $k : $turn[$i]
"; + } + echo " +
"; + } + } elseif($general[nation] != 0) { + echo " +
??$general[crew]??【{$nationname[$general[nation]]}】 장수"; + } else { + echo " + ??$general[crew]??  재 야"; + } + + echo " +
+ + + + +
+ + + + diff --git a/twe_close/b_dipcenter.php b/twe_close/b_dipcenter.php new file mode 100644 index 00000000..4b08eeb7 --- /dev/null +++ b/twe_close/b_dipcenter.php @@ -0,0 +1,298 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { + echo "수뇌부가 아니거나 사관년도가 부족합니다."; + exit(); +} + +if($me[level] >= 5) { $btn = "submit"; $read = ""; } +else { $btn = "hidden"; $read = "readonly"; } + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + +내무부 + + + + + + + +
내 무 부
+ + + + + + + + + + + + + + + + + + + + + + "; + + continue; + } + + $query = "select state,term,fixed,reserved,showing from diplomacy where me='$me[nation]' and you='$nation[nation]'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result2); + + $query = "select reserved,showing from diplomacy where you='$me[nation]' and me='$nation[nation]'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip2 = MYDB_fetch_array($result2); + //속령수 + $query = "select city from city where nation='$nation[nation]'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result2); + switch($dip[state]) { + case 0: $state = "교 전"; break; + case 1: $state = "선포중"; break; + case 2: $state = "통 상"; break; + case 3: $state = "통합수락중"; break; + case 4: $state = "통합제의중"; break; + case 5: $state = "합병수락중"; break; + case 6: $state = "합병제의중"; break; + case 7: $state = "불가침"; break; + } + + $term = $admin[year] * 12 + $admin[month] + $dip[term]; + $year = floor($term / 12); + $month = $term % 12; + + if($month == 0) { + $month = 12; + $year--; + } + + $date = date('Y-m-d H:i:s'); + $note = ""; + if($dip[fixed] != "") { + if($dip[state] == 7) { + $note .= $dip[fixed]; + } else { + $note .= "{$dip[fixed]}"; + } + if($dip[reserved] != "" || $dip2[reserved] != "") { + $note .= "
"; + } + } + if($dip[showing] >= $date) { + if($dip[reserved] != "") { + $note .= "아국측 제의: ".$dip[reserved]; + if($dip2[reserved] != "") { + $note .= "
"; + } + } + } + if($dip2[showing] >= $date) { + if($dip2[reserved] != "") { + $note .= "상대측 제의: ".$dip2[reserved]; + } + } + if($note == "") { $note = " "; } + + echo " + + + + + + "; + if($dip[term] != 0) { + echo" + + "; + } else { + echo" + + "; + } + echo " + + "; +} +echo " +
외 교 관 계
국 가 명국력장수속령상태기간종 료 시 점비 고
$nation[name]$nation[power]$nation[gennum]$citycount----
$nation[name]$nation[power]$nation[gennum]$citycount$state$dip[term] 개월{$year}年 {$month}月--{$note}
+"; + +$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$nation = MYDB_fetch_array($result); + +$query = "select gold_rate,rice_rate from game where no='1'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); +// 금 수지 +$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); + +$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); +$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; +$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); +$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); +$riceincome = $riceincomeList[0] + $riceincomeList[1]; +$riceoutcome = getRiceOutcome($connect, $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"; } + +?> + + + + + + + + + + + + + +
국 가 방 침 & 임관 권유 메세지
국가 방침 maxlength=500 style=color:white;background-color:black;width:830; name=msg value=''> name=btn value=국가방침>
임관 권유 maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value=''> name=btn value=임관권유>
900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.
예 산 & 정 책
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "; +?> + + + + + + + + + + + + + + + +
자금 예산병량 예산
현 재   $nation[gold]현 재   $nation[rice]
단기수입   +$deadIncome둔전수입   +$riceincomeList[1]
세 금   +$goldincomeList[0]세 곡   +$riceincomeList[0]
수입 / 지출   +$goldincome / -$goldoutcome수입 / 지출   +$riceincome / -$riceoutcome
국고 예산   {$budgetgold} ({$budgetgolddiff})병량 예산   {$budgetrice} ({$budgetricediff})
세율 (5 ~ 30%)    name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율>봉급 지급율 (20 ~ 200%)    name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급율>
기밀 권한 (1 ~ 99년)    name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한>임관&전쟁 변경 가능
+ 0) { + if($nation[scout] == 0) { + echo " + "; + } else { + echo " + "; + } + + if($nation[war] == 0) { + echo " + "; + } else { + echo " + "; + } +} +?> +
+
기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.
+ + + +
+ + + diff --git a/twe_close/b_diplomacy.php b/twe_close/b_diplomacy.php new file mode 100644 index 00000000..6d134326 --- /dev/null +++ b/twe_close/b_diplomacy.php @@ -0,0 +1,222 @@ +0 order by power desc"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$nationcount = MYDB_num_rows($result); + +$nationStr = ""; +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[count($nationnum)] = $nation[nation]; + $nationname[$nation[nation]] = $nation[name]; + $nationcolor[$nation[nation]] = $nation[color]; + + $nationStr .= " $nation[name]
"; + $powerStr .= "국력 $nation[power]
"; + $genStr .= "장수 $nation[gennum]
"; + $cityStr .= "속령 $citycount
"; +} + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + + +중원정보 + + + + + + + +
중 원 정 보
+
+ + + + "; + +if($nationcount != 0) { + $width = floor(888 / $nationcount); +} + +for($i=0; $i < $nationcount; $i++) { + echo " + "; +} +echo " + "; + +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 " + + "; + + for($k=0; $k < $nationcount; $k++) { + if($i == $k) { + $str = "\"; + } else { + switch($state[$nationnum[$k]]) { + case 0: $str = ""; break; + case 1: $str = ""; break; + case 2: + if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "ㆍ"; } + else { $str = "?"; } +// $str = "ㆍ"; + break; + case 3: $str = ""; break; + case 4: $str = ""; break; + case 5: $str = ""; break; + case 6: $str = ""; break; + case 7: + if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "@"; } + else { $str = "?"; } +// $str = "@"; + break; + } + } + + if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation]) { $backcolor = "style=background-color:$_basecolor3;"; } + else { $backcolor = ""; } + + echo " + "; + } + echo " + +"; +} +?> + +
align=center bgcolor=blue>외 교 현 황
 {$nationname[$nationnum[$i]]}
{$nationname[$nationnum[$i]]}$str
align=center>불가침 : @, 통합 : , 합병 : , 통상 : ㆍ, 선포 : , 교전 :
+ + + "; +} + +for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($result); + + if($city[conflict] != "") { + $nation = explode("|", $city[conflict]); + $killnum = explode("|", $city[conflict2]); + + $seq = mySort($killnum); // 큰 순서대로 순서를 구한다. + + $sum = 0; + for($k=0; $k < count($killnum); $k++) { + $sum += $killnum[$k]; + } + echo " + + + + + "; + } +} + +function mySort($killnum) { + for($i=0; $i < count($killnum); $i++) { + $seq[$i] = $i; + } + for($i=0; $i < count($killnum); $i++) { + $max = 0; + for($k=0; $k < count($killnum); $k++) { + if($max < $killnum[$k]) { + $max = $killnum[$k]; + $index = $k; + } + } + $seq[$i] = $index; + $killnum[$index] = 0; + } + return $seq; +} + +echo " +
분 쟁 현 황
$city[name]"; + for($k=0; $k < count($nation); $k++) { + $per = 100*$killnum[$seq[$k]] / $sum; + $graph1 = $per / 100 * 798; + $per = round($per, 1); + echo " + + + + + + + +
{$nationname[$nation[$seq[$k]]]} {$per}% 
"; + } + echo " +
+
"; + +echo " + + + + + + + + + + + +
중 원 지 도
+ + $nationStr$powerStr$genStr$cityStr
+
"; +?> + + + + +
+ + + diff --git a/twe_close/b_genList.php b/twe_close/b_genList.php new file mode 100644 index 00000000..afe6f440 --- /dev/null +++ b/twe_close/b_genList.php @@ -0,0 +1,199 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { + echo "수뇌부가 아니거나 사관년도가 부족합니다."; + exit(); +} + +if($type == 0) { + $type = 7; +} +$sel[$type] = "selected"; + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + + +암행부 + + + + + + + + +
암 행 부
정렬순서 : + +
+
+ + + 이 름 + 통무지 + 부 대 + 자 금 + 군 량 + 도시 + 守 + 병 종 + 병 사 + 훈련 + 사기 + 명 령 + 삭턴 + 턴 + "; +for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $city = $cityname[$general[city]]; + $troop = $troopName[$general[troop]] == "" ? "-" : $troopName[$general[troop]]; + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + if($lbonus > 0) { + $lbonus = "+{$lbonus}"; + } else { + $lbonus = ""; + } + + if($general[injury] > 0) { + $leader = floor($general[leader] * (100 - $general[injury])/100); + $power = floor($general[power] * (100 - $general[injury])/100); + $intel = floor($general[intel] * (100 - $general[injury])/100); + $leader = "{$leader}{$lbonus}"; + $power = "{$power}"; + $intel = "{$intel}"; + } else { + $leader = "{$general[leader]}{$lbonus}"; + $power = "{$general[power]}"; + $intel = "{$general[intel]}"; + } + + if($general[npc] >= 2) { $name = "$general[name]"; } + elseif($general[npc] == 1) { $name = "$general[name]"; } + else { $name = "$general[name]"; } + + switch($general[mode]) { + case 0: $mode = "×"; break; + case 1: $mode = "○"; break; + case 2: $mode = "◎"; break; + } + + echo " + + $name
Lv ".getExpLevel($general[experience])." + {$leader}∥{$power}∥{$intel} + $troop + $general[gold] + $general[rice] + $city + $mode + ".getTypename($general[crewtype])." + $general[crew] + $general[train] + $general[atmos]"; + if($general[npc] >= 2) { + echo " + + NPC 장수"; + } else { + echo " + + "; + $turn = getTurn($connect, $general, 1, 0); + + for($i=0; $i < 5; $i++) { + $turn[$i] = _String::SubStrForWidth($turn[$i], 0, 20); + $k = $i+1; + echo " +  $k : $turn[$i]
"; + } + } + echo " +
+ + $general[killturn] + ".substr($general[turntime],14,5)." + "; +} +echo " + +"; + +MYDB_close($connect); +?> + + + + +
+ + + diff --git a/twe_close/b_myBossInfo.php b/twe_close/b_myBossInfo.php new file mode 100644 index 00000000..acd0eea9 --- /dev/null +++ b/twe_close/b_myBossInfo.php @@ -0,0 +1,503 @@ + + + + + +인사부 + + + + + + + + +
인 사 부
+
+ += 5) { $btn = "submit"; } +else { $btn = "hidden"; } + +$query = "select name,level,picture,imgsvr,belong from general where nation='$nation[nation]' and level>={$lv} order by level desc"; +$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +for($i=12; $i >= $lv; $i--) { + $levels = MYDB_fetch_array($genresult); + $level[$levels[level]] = $levels; +} + +$query = "select name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 +$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +$query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 +$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +echo " + + + + +"; +for($i=12; $i >= $lv; $i-=2) { + $i1 = $i; $i2 = $i - 1; + $imageTemp1 = GetImageURL($level[$i1][imgsvr]); + $imageTemp2 = GetImageURL($level[$i2][imgsvr]); + echo " + + + + + + + + + "; +} + +echo " + + + + + + + + +
+ 【 $nation[name] 】 +
".getLevel($i1, $nation[level])." ";echo $level[$i1][name]==''?"-":$level[$i1][name]; echo " ({$level[$i1][belong]}년)".getLevel($i2, $nation[level])." ";echo $level[$i2][name]==''?"-":$level[$i2][name]; echo " ({$level[$i2][belong]}년)
오호장군【승전】 +"; + +$tigernum = MYDB_num_rows($tigerresult); +for($i=0; $i < $tigernum; $i++) { + $tiger = MYDB_fetch_array($tigerresult); + + if($tiger[killnum] > 0) { + echo "{$tiger[name]}【{$tiger[killnum]}】, "; + } +} + +echo " +
건안칠자【계략】 +"; + +$eaglenum = MYDB_num_rows($eagleresult); +for($i=0; $i < $eaglenum; $i++) { + $eagle = MYDB_fetch_array($eagleresult); + + if($eagle[firenum] > 0) { + echo "{$eagle[name]}【{$eagle[firenum]}】, "; + } +} + +echo " +
+ + + + + + + + + +
추 방
대상 장수 +"; + +if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) { + echo " + + "; +} + +$query = "select name,city from general where nation='$me[nation]' and level=12"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$general = MYDB_fetch_array($result); +echo " +
+ + + + + + + + + + + +"; + +$querys[10] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[9] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[8] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[7] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[6] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[5] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; + +for($i=10; $i >= $lv; $i--) { + if($i % 2 == 0) { echo ""; } + echo " + + + "; + if($i % 2 == 1) { echo ""; } +} +echo " + +
수 뇌 부 임 명
".getLevel(12, $nation[level])."{$general[name]} 【{$cityNames[$general[city]]}】".getLevel(11, $nation[level])."
+"; + +if($meLevel >= 5 && $nation[l11set] == 0) { + echo " + + + "; +} else { + $query = "select name,city from general where nation='$me[nation]' and level='11'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + echo "{$general[name]} 【{$cityNames[$general[city]]}】"; +} +echo " +
".getLevel($i, $nation[level])."
+ "; + + if($meLevel >= 5 && $nation["l{$i}set"] == 0) { + echo " + + + "; + } else { + $query = "select name,city from general where nation='$me[nation]' and level={$i}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + echo "{$general[name]} 【{$cityNames[$general[city]]}】"; + } + echo "
빨간색은 현재 임명중인 장수, 노란색은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.
+ + +"; +if($meLevel >= 5) { + echo " + + + + + + + + + + + + + + + + + + + + + "; +} +echo " + + + + + + +"; + +$citylevel[1] = "수"; +$citylevel[2] = "진"; +$citylevel[3] = "관"; +$citylevel[4] = "이"; +$citylevel[5] = "소"; +$citylevel[6] = "중"; +$citylevel[7] = "대"; +$citylevel[8] = "특"; + +$query = "select city,name,gen1,gen2,gen3,level,region,gen1set,gen2set,gen3set from city where nation='$nation[nation]' order by region,level desc,binary(name)"; // 도시 이름 목록 +$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$citycount = MYDB_num_rows($cityresult); + +$region = 0; +for($j=0; $j < $citycount; $j++) { + $city = MYDB_fetch_array($cityresult); + + $query = "select name,belong,city from general where no='$city[gen1]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($genresult); + $query = "select name,belong,city from general where no='$city[gen2]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($genresult); + $query = "select name,belong,city from general where no='$city[gen3]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen3 = MYDB_fetch_array($genresult); + + if($region != $city[region]) { + echo " + + "; + $region = $city[region]; + } + + $gen1[name] = $gen1[name]==""?"-":$gen1[name]." ({$gen1[belong]}년) 【{$cityNames[$gen1[city]]}】"; + $gen2[name] = $gen2[name]==""?"-":$gen2[name]." ({$gen2[belong]}년) 【{$cityNames[$gen2[city]]}】"; + $gen3[name] = $gen3[name]==""?"-":$gen3[name]." ({$gen3[belong]}년) 【{$cityNames[$gen3[city]]}】"; + if($city[gen1set] == 1) { $gen1[name] = "".$gen1[name].""; } + if($city[gen2set] == 1) { $gen2[name] = "".$gen2[name].""; } + if($city[gen3set] == 1) { $gen3[name] = "".$gen3[name].""; } + echo " + + + + + + + + "; +} +?> + +
도 시 관 직 임 명
태 수 임 명 + + + + +
군 사 임 명 + + + + +
시 중 임 명 + + + + +
빨간색은 현재 임명중인 장수, 노란색은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.
도 시태 수 (사관) 【현재도시】군 사 (사관) 【현재도시】시 중 (사관) 【현재도시】
【 ".getRegion($city[region])." 】
【{$citylevel[$city[level]]}】$city[name]  $gen1[name]$gen2[name]$gen3[name]
노란색은 변경 불가능, 하얀색은 변경 가능 관직입니다.
+
+ + + +
+ + + diff --git a/twe_close/b_myCityInfo.php b/twe_close/b_myCityInfo.php new file mode 100644 index 00000000..618d7898 --- /dev/null +++ b/twe_close/b_myCityInfo.php @@ -0,0 +1,173 @@ + + + + + +세력도시 + + + + + + + + +
세 력 도 시
정렬순서 : + +
+
+[{$city[name]}]
"; } + $query = "select name from general where no='$city[gen1]'"; // 태수 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($genresult); + + $query = "select name from general where no='$city[gen2]'"; // 군사 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($genresult); + + $query = "select name from general where no='$city[gen3]'"; // 시중 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen3 = MYDB_fetch_array($genresult); + + if($type == 10 && $city[region] != $region) { + echo "
"; + $region = $city[region]; + } elseif($type == 11 && $city[level] != $level) { + echo "
"; + $level = $city[level]; + } + + if($city[trade] == 0) { + $city[trade] = "- "; + } + + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 {$city[name]}
주민$city[pop]/$city[pop2]농업$city[agri]/$city[agri2]상업$city[comm]/$city[comm2]치안$city[secu]/$city[secu2]수비$city[def]/$city[def2]성벽$city[wall]/$city[wall2]
민심$city[rate]시세{$city[trade]}%인구".round($city[pop]/$city[pop2]*100, 2)." %태수";echo $gen1[name]==''?"-":"$gen1[name]";echo "군사";echo $gen2[name]==''?"-":"$gen2[name]";echo "시중";echo $gen3[name]==''?"-":"$gen3[name]";echo "
장수"; + $query = "select npc,name from general where city='$city[city]' and nation='$me[nation]'"; // 장수 목록 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + if($gencount == 0) echo "-"; + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($genresult); + if($general[npc] >= 2) { echo "{$general[name]}, "; } + elseif($general[npc] == 1) { echo "{$general[name]}, "; } + else { echo "$general[name], "; } + } + echo " +
+"; +} +?> + + + + +
+ + + + + diff --git a/twe_close/b_myGenInfo.php b/twe_close/b_myGenInfo.php new file mode 100644 index 00000000..a0912ef1 --- /dev/null +++ b/twe_close/b_myGenInfo.php @@ -0,0 +1,173 @@ + + + + + +세력장수 + + + + + + + + +
세 력 장 수
정렬순서 : + +
+
+ + + 얼 굴 + 이 름 + 관 직 + 계 급 + 명 성 + 봉 록 + 통솔 + 무력 + 지력 + 자 금 + 군 량 + 성 격 + 특 기 + 사 관 + 벌점 + "; +for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + if($lbonus > 0) { + $lbonus = "+{$lbonus}"; + } else { + $lbonus = ""; + } + + if($general[injury] > 0) { + $leader = floor($general[leader] * (100 - $general[injury])/100); + $power = floor($general[power] * (100 - $general[injury])/100); + $intel = floor($general[intel] * (100 - $general[injury])/100); + $leader = "{$leader}{$lbonus}"; + $power = "{$power}"; + $intel = "{$intel}"; + } else { + $leader = "{$general[leader]}{$lbonus}"; + $power = "{$general[power]}"; + $intel = "{$general[intel]}"; + } + + if($general[npc] >= 2) { $name = "$general[name]"; } + elseif($general[npc] == 1) { $name = "$general[name]"; } + else { $name = "$general[name]"; } + + $imageTemp = GetImageURL($general[imgsvr]); + echo " + + 0?" background={$imageTemp}/{$general[picture]}":""; echo " height=64> + $name + "; echo getLevel($general[level], $nation[level]); echo " + ".getDed($general[dedication])." + ".getHonor($general[experience])." + ".getBill($general[dedication])." + $leader + $power + $intel + $general[gold] + $general[rice] + ".getGenChar($general[personal])." + ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." + $general[belong] + $general[connect]"; echo "
(".getConnect($general[connect]).") + "; +} + echo " + +"; + +?> + + + + +
+ + + + + diff --git a/twe_close/b_myKingdomInfo.php b/twe_close/b_myKingdomInfo.php new file mode 100644 index 00000000..50e11922 --- /dev/null +++ b/twe_close/b_myKingdomInfo.php @@ -0,0 +1,156 @@ + + + + + +세력정보 + + + + + + + +
세 력 정 보
+
+[{$city[name]}]
"; } + else { $cityname[$j] = $city[name]; } + $totalpop += $city[pop]; + $maxpop += $city[pop2]; +} + +$query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general where nation='$nation[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$general = MYDB_fetch_array($result); + +$query = "select gold_rate,rice_rate from game where no='1'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); +// 금 수지 +$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); + +$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); +$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; +$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); +$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); +$riceincome = $riceincomeList[0] + $riceincomeList[1]; +$riceoutcome = getRiceOutcome($connect, $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"; } + +echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
【 ";echo $me[nation]==0?"공 백 지":"$nation[name]";echo " 】
총주민{$totalpop}/{$maxpop}총병사{$general[totcrew]}/{$general[maxcrew]}국 력$nation[power]
국 고"; echo $nation[gold]==0?"-":"$nation[gold]"; echo "병 량"; echo $nation[rice]==0?"-":"$nation[rice]"; echo "세 율"; echo $me[nation]==0?"해당 없음":"$nation[rate] %"; echo "
세금/단기+$goldincomeList[0] / +$deadIncome세곡/둔전+$riceincomeList[0] / +$riceincomeList[1]지급율"; echo $me[nation]==0?"해당 없음":"$nation[bill] %"; echo "
수입/지출+$goldincome / -$goldoutcome수입/지출+$riceincome / -$riceoutcome속 령$citycount장 수$nation[gennum]
국고 예산{$budgetgold} ({$budgetgolddiff})병량 예산{$budgetrice} ({$budgetricediff})기술력$nation[tech]작 위".getNationLevel($nation[level])."
속령일람 :"; +for($j=0; $j < $citycount; $j++) { + echo "$cityname[$j], "; +} +echo" +
국가열전".ConvertLog($nation[history], $me[skin])."
+
"; + +?> + + + + +
+ + + + + diff --git a/twe_close/b_myPage.php b/twe_close/b_myPage.php new file mode 100644 index 00000000..494d8519 --- /dev/null +++ b/twe_close/b_myPage.php @@ -0,0 +1,139 @@ + 0) { + $submit = 'submit'; +} else { + $submit = 'hidden'; +} + +if($btn == "설정저장" && $me['myset'] > 0) { + if($me['myset'] > 1) { + $submit = 'submit'; + } else { + $submit = 'hidden'; + } + + $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +$query = "select no,skin,map,mode,tnmt,myset from general where user_id='$_SESSION[p_id]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$me = MYDB_fetch_array($result); + +if($me[skin] < 1) { + $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; + $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; +} +?> + + + +내정보 + type=text/css> + + + + + + + +
내 정 보
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+     스킨 【 +

+     지도수준 【 + >상세 + >간단 + >생략 + 】

+     토너먼트 【 + >수동참여 + >자동참여 + 】
+     ∞개막직전 남는자리가 있을경우 랜덤하게 참여합니다.

+     수비 【 + >◎(훈사80) + >○(훈사60) + >× + 】

+      name=btn style=background-color:;color:white;width:160;height:30;font-size:13; value=설정저장>
+     ∞설정저장은 이달중 회 남았습니다.

+
+     휴 가 신 청
+     ;color:white;width:160;height:30;font-size:13; value=휴가신청 onclick='go(0)'> +
개인 기록전투 기록
+ + + +
장수 열전전투 결과
+ + + +
+ + + +
+ + + + diff --git a/twe_close/b_nationboard.php b/twe_close/b_nationboard.php new file mode 100644 index 00000000..7f69c734 --- /dev/null +++ b/twe_close/b_nationboard.php @@ -0,0 +1,66 @@ + + + +회의실 + + + + + + + + + + + + + +
회 의 실
+ 제목 +
+
+ + +
+
+ + + + + +
+ + + + diff --git a/twe_close/b_nationrule.php b/twe_close/b_nationrule.php new file mode 100644 index 00000000..e5124562 --- /dev/null +++ b/twe_close/b_nationrule.php @@ -0,0 +1,50 @@ + + + +국법 + + + + + + + + + + + +
국 법
+ += 5) { + echo " +
+
+ +
"; +} else { + echo " +
"; +} + +?> +
+ + + + diff --git a/twe_close/b_tournament.php b/twe_close/b_tournament.php new file mode 100644 index 00000000..e98a210f --- /dev/null +++ b/twe_close/b_tournament.php @@ -0,0 +1,405 @@ += 2) { printLimitMsg($me[turntime]); exit(); } + +switch($admin[tnmt_type]) { +case 0: $tnmt_type = "전력전"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break; +case 1: $tnmt_type = "통솔전"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break; +case 2: $tnmt_type = "일기토"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break; +case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break; +} + +?> + + + + +토너먼트 + + + + + + + +
삼모전 토너먼트
+ += 5) { + echo " + + + +"; +} elseif($me[no] > 0 && $me[tournament] == 0 && $admin[tournament] == 1) { + echo ""; +} else { + echo ""; +} + +$str1 = getTournament($admin[tournament]); +$str2 = getTournamentTime($connect); +$str3 = getTournamentTerm($connect); +?> + + + + + + + "; + +if($admin[tournament] >= 7 || $admin[tournament] == 0) { printFighting($admin[tournament], $admin[phase]); } +echo " + + + "; + +$num = Array("一", "二", "三", "四", "五", "六", "七", "八"); + +for($i=0; $i < 8; $i++) { + $grp = $i + 10; + echo " + "; +} +echo ""; +if($admin[tournament] == 4 || $admin[tournament] == 5) { printFighting($admin[tournament], $admin[phase]); } +echo " + + "; + +for($i=0; $i < 8; $i++) { + $grp = $i; + echo " + "; +} + +if($admin[tournament] == 2 || $admin[tournament] == 3) { printFighting($admin[tournament], $admin[phase]); } + +?> + + +
+ "; + + switch($admin[tnmt_trig]) { + case 0: $sel[0] = "selected"; break; + case 1: $sel[1] = "selected"; break; + case 2: $sel[2] = "selected"; break; + case 3: $sel[3] = "selected"; break; + case 4: $sel[4] = "selected"; break; + case 5: $sel[5] = "selected"; break; + case 6: $sel[6] = "selected"; break; + case 7: $sel[7] = "selected"; break; + } + + if($admin[tournament] == 0) { + echo " + + + + + + + "; } + else { + echo ""; + } + + switch($admin[tournament]) { + case 1: + echo " + + + + + + + + + + + "; + break; + case 2: echo ""; break; + case 3: echo ""; break; + case 4: echo ""; break; + case 5: echo ""; break; + case 6: echo ""; break; + case 7: echo ""; break; + case 8: echo ""; break; + case 9: echo ""; break; + case 10: echo ""; break; + } + + echo " +
운영자 메세지 :
()
16강 승자전
+ + "; + +$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); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + echo ""; +} + +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),""); +for($i=0; $i < 1; $i++) { $cent[$i] = ""; } +for($i=0; $i < 2; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 1; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 2; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 4; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 2; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 4; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 8; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 4; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━━━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 8; $i++) { + echo ""; +} + +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] = ""; } +for($i=0; $i < 16; $i++) { + $general = MYDB_fetch_array($result); + if($general[name] == "") { $general[name] = "-"; } + if($general[npc] >= 2) { $general[name] = "".$general[name].""; } + elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } + if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + else { $line[$i] = ""; } + $gen[$i] = $general[name]; +} +for($i=0; $i < 8; $i++) { + $cent[$i] = $cent[$i]."┻".""; + $line[$i*2] = $line[$i*2]."┏━━━━".""; + $line[$i*2+1] = $line[$i*2+1]."━━━━┓".""; + echo ""; +} +echo " + + "; + +for($i=0; $i < 16; $i++) { + echo ""; +} + +echo" + "; + +$query = "select tournament,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game where no=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$betting = MYDB_fetch_array($result); +for($i=0; $i < 16; $i++) { + $bet[$i] = @round($betting[bet] / $betting["bet{$i}"], 2); + if($bet[$i] == 0) { $bet[$i] = "∞"; } +} + +echo " + "; + +for($i=0; $i < 16; $i++) { + echo ""; +} + +echo " + + + +
{$general[name]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$bet[$i]}
배당률이 낮을수록 베팅된 금액이 많고 유저들이 우승후보로 많이 선택한 장수입니다.
+
조별 본선 순위
+ + + "; + + $query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + for($k=1; $k <= 4; $k++) { + $general = MYDB_fetch_array($result); + printRow($k, $general[npc], $general[name], $general[$tp], $general[game], $general[win], $general[draw], $general[lose], $general[gd], $general[gl], $general[prmt]); + } + echo " +
{$num[$i]}조
장수{$tp2}
+
조별 예선 순위
+ + + "; + + $query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + for($k=1; $k <= 8; $k++) { + $general = MYDB_fetch_array($result); + printRow($k, $general[npc], $general[name], $general[$tp], $general[game], $general[win], $general[draw], $general[lose], $general[gd], $general[gl], $general[prmt]); + } + echo " +
{$num[$i]}조
장수{$tp2}
+
+ +ㆍ예선은 홈&어웨이 풀리그로 진행됩니다. (총 14경기)
+ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.
+ㆍ각 조1위가 시드1로 랜덤하게 조에 배정되며, 역시 각 조2위가 시드2로 랜덤하게 조에 배정됩니다.
+ㆍ그후 남은 3, 4위는 완전 랜덤하게 모든 조에 랜덤하게 배정됩니다.
+ㆍ본선은 개인당 3경기를 치르게 되며 승점(승3, 무1, 패0), 득실, 참가순서(시드)에 따라 순위를 매깁니다.
+ㆍ각 조 1, 2위는 16강에 지정된 위치에 배정됩니다.
+ㆍ16강부터는 1경기 토너먼트로 진행됩니다.
+ㆍ참가비는 금20~140이며, 성적에 따라 금과 약간의 명성이 포상으로 주어집니다.
+ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)
+ㆍ즐거운 삼토! +
+
+ + + +
+ + + diff --git a/twe_close/b_troop.php b/twe_close/b_troop.php new file mode 100644 index 00000000..9807b772 --- /dev/null +++ b/twe_close/b_troop.php @@ -0,0 +1,161 @@ + + + + +부대편성 + + + + + + + +
부 대 편 성
+
+ + + + + + + + +"; + } else { + $turn .= " $m : ∼
"; + } + } + } + } + $genlist .= "({$gencount}명)"; + + if($me[troop] == 0) { + echo " + + + + + + + + + + + + + + + + + +
선 택부 대 정 보부 대 장장 수부대장행동
$troop[name]
【 $cityname 】
 $genlist$turn
【턴】".substr($turntime, 14)."$name
"; + } else { + echo " +
 $troop[name]
【 $cityname 】
 $genlist"; + + if($troop[no] == $me[no]) { + $query = "select no,name from general where troop='$troop[troop]' and no!='$me[no]' order by binary(name)"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($genresult); + echo " +
+ "; + } else { + echo $turn; + } + + echo " +
【턴】".substr($turntime, 14)."$name
"; + } +} + +if($me[troop] == 0) { + echo" +"; +} else { + echo" +"; +} + +echo " +
+
"; + +echo " + + + + "; +if($me[troop] == 0) { + echo " + "; +} else { + echo " + "; +} +echo " + +
부 대 명
"; + +MYDB_close($connect); +?> + + + +
+
+ + + + diff --git a/twe_close/c_auction.php b/twe_close/c_auction.php new file mode 100644 index 00000000..99db948f --- /dev/null +++ b/twe_close/c_auction.php @@ -0,0 +1,216 @@ + 24) $term = 24; + +$valid = 1; +if($me[userlevel] >= 5 || ($me[special] != 30 && $btCount < 1) || ($me[special] == 30 && $btCount < 3)) { +} else { + $msg = "ㆍ더이상 등록할 수 없습니다."; + $msg2 = "ㆍ더이상 등록할 수 없습니다."; + $valid = 0; + $btn = "hidden"; +} + +if($btn == "판매") { + if($stuff != 0) { + $msg = "ㆍ현재 쌀만 거래 가능합니다."; + $valid = 0; + } + if($term < 0 || $term > 24) { + $msg = "ㆍ종료기한은 1 ~ 24 턴 이어야 합니다."; + $valid = 0; + } + if($amount < 100 || $amount > 10000) { + $msg = "ㆍ거래량은 100 ~ 10000 이어야 합니다."; + $valid = 0; + } + if($cost > $amount * 2 || $cost * 2 < $amount) { + $msg = "ㆍ시작판매가는 50% ~ 200% 이어야 합니다."; + $valid = 0; + } + if($topv < $amount*1.1 || $topv > $amount * 2) { + $msg = "ㆍ즉시판매가는 110% ~ 200% 이어야 합니다."; + $valid = 0; + } + if($topv < $cost*1.1) { + $msg = "ㆍ즉시판매가는 시작판매가의 110% 이상이어야 합니다."; + $valid = 0; + } + if($amount > $me[rice] - 1000) { + $msg = "ㆍ기본 군량 1000은 거래할 수 없습니다."; + $valid = 0; + } + if($valid == 1) { + $msg = "ㆍ등록 성공."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '$me[no]', '$me[name]', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif($btn == "구매시도") { + $query = "select no2,value,topv,expire,amount from auction where no='$sel'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $auction = MYDB_fetch_array($result); + + if($value == $auction[topv]) { + $valid = 2; + } + if(!$auction) { + $msg = "ㆍ종료된 거래입니다."; + $valid = 0; + } +/* + if($stuff != 0) { + $msg = "ㆍ현재 쌀만 거래 가능합니다."; + $valid = 0; + } +*/ + if($auction[no2] > 0 && $value <= $auction[value]) { + $msg = "ㆍ현재판매가보다 높게 입찰해야 합니다."; + $valid = 0; + } + if($value < $auction[value]) { + $msg = "ㆍ현재판매가보다 높게 입찰해야 합니다."; + $valid = 0; + } + if($value > $auction[topv]) { + $msg = "ㆍ즉시판매가보다 높을 수 없습니다."; + $valid = 0; + } + if($value > $me[gold] - 1000) { + $msg = "ㆍ기본 자금 1000은 거래할 수 없습니다."; + $valid = 0; + } + if($valid == 1) { + $msg = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); + if($auction[expire] > $date) $date = $auction[expire]; + $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($valid == 2) { + $msg = "ㆍ즉시판매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); + $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif($btn == "구매") { + if($stuff != 0) { + $msg2 = "ㆍ현재 쌀만 거래 가능합니다."; + $valid = 0; + } + if($term < 0 || $term > 24) { + $msg2 = "ㆍ종료기한은 1 ~ 24 턴 이어야 합니다."; + $valid = 0; + } + if($amount < 100 || $amount > 10000) { + $msg2 = "ㆍ거래량은 100 ~ 10000 이어야 합니다."; + $valid = 0; + } + if($cost > $amount * 2 || $cost * 2 < $amount) { + $msg2 = "ㆍ시작구매가는 50% ~ 200% 이어야 합니다."; + $valid = 0; + } + if($topv < $amount * 0.5 || $topv > $amount * 0.9) { + $msg2 = "ㆍ즉시구매가는 50% ~ 90% 이어야 합니다."; + $valid = 0; + } + if($topv > $cost * 0.9) { + $msg2 = "ㆍ즉시구매가는 시작구매가의 90% 이하이어야 합니다."; + $valid = 0; + } + if($cost > $me[gold] - 1000) { + $msg2 = "ㆍ기본 자금 1000은 거래할 수 없습니다."; + $valid = 0; + } + if($valid == 1) { + $msg2 = "ㆍ등록 성공."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '$me[no]', '$me[name]', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif($btn == "판매시도") { + $query = "select no2,value,topv,expire,amount from auction where no='$sel'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $auction = MYDB_fetch_array($result); + + if($value == $auction[topv]) { + $valid = 2; + } + if(!$auction) { + $msg2 = "ㆍ종료된 거래입니다."; + $valid = 0; + } + if($stuff != 0) { + $msg2 = "ㆍ현재 쌀만 거래 가능합니다."; + $valid = 0; + } + if($auction[no2] > 0 && $value >= $auction[value]) { + $msg2 = "ㆍ현재구매가보다 낮게 입찰해야 합니다."; + $valid = 0; + } + if($value > $auction[value]) { + $msg2 = "ㆍ현재구매가보다 낮게 입찰해야 합니다."; + $valid = 0; + } + if($value < $auction[topv]) { + $msg2 = "ㆍ즉시구매가보다 낮을 수 없습니다."; + $valid = 0; + } + if($value > $me[rice] - 1000) { + $msg2 = "ㆍ기본 군량 1000은 거래할 수 없습니다."; + $valid = 0; + } + if($valid == 1) { + $msg2 = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); + if($auction[expire] > $date) $date = $auction[expire]; + $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($valid == 2) { + $msg2 = "ㆍ즉시구매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); + $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +Submit("b_auction.php", $msg, $msg2); +?> diff --git a/twe_close/c_betting.php b/twe_close/c_betting.php new file mode 100644 index 00000000..7383a23f --- /dev/null +++ b/twe_close/c_betting.php @@ -0,0 +1,41 @@ +location.replace('b_betting.php');"; + exit(); +} + +$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION[p_id]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$me = MYDB_fetch_array($result); + +for($i=0; $i < 16; $i++) { + if(${"btn{$i}"} == "베팅!") { + $gold = ${"gold{$i}"}; + $mebet = $me["bet{$i}"]; + if($gold >= 10 && $gold <= 1000) { + if($gold + 500 <= $me[gold] && $gold + $mebet <= 1000 && $gold + $me[bet] <= 1000) { + $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update game set bet{$i}=bet{$i}+'$gold' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } +} + +?> + + diff --git a/twe_close/c_chiefboard.php b/twe_close/c_chiefboard.php new file mode 100644 index 00000000..2f0fa578 --- /dev/null +++ b/twe_close/c_chiefboard.php @@ -0,0 +1,51 @@ += 20) { $num = 0; } + $msg = $title."|".$msg; + $msg = addslashes(SQ2DQ($msg)); + $date = date('Y-m-d H:i:s'); + $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='$me[no]',coreboard{$num}_when='$date' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set coreindex='$num' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //$num에 댓글시 + } elseif($num >= 0 && $reply != "") { + $newmsg = $nation["coreboard{$num}"]."|".$me[no]."|".$reply; + $newmsg = addslashes(SQ2DQ($newmsg)); + + $query = "update nation set coreboard{$num}='$newmsg' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +echo ""; + +?> + + + + diff --git a/twe_close/c_dipcenter.php b/twe_close/c_dipcenter.php new file mode 100644 index 00000000..65334296 --- /dev/null +++ b/twe_close/c_dipcenter.php @@ -0,0 +1,62 @@ +location.replace('b_myBossInfo.php');"; + exit(); +} + +if($btn == "국가방침") { + $msg = BadTag2Code(addslashes(SQ2DQ($msg))); + $query = "update nation set msg='$msg' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "임관권유") { + $scoutmsg = BadTag2Code(addslashes(SQ2DQ($scoutmsg))); + $query = "update nation set scoutmsg='$scoutmsg' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "세율") { + if($rate < 5) { $rate = 5; } + if($rate > 30) { $rate = 30; } + $query = "update nation set rate='$rate' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "지급율") { + if($bill < 20) { $bill = 20; } + if($bill > 200) { $bill = 200; } + $query = "update nation set bill='$bill' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "기밀권한") { + if($secretlimit < 1) { $secretlimit = 1; } + if($secretlimit > 99) { $secretlimit = 99; } + $query = "update nation set secretlimit='$secretlimit' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "임관 금지") { + $query = "update nation set myset=myset-1,scout='1' where nation='$me[nation]' and myset>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "임관 허가") { + $query = "update nation set myset=myset-1,scout='0' where nation='$me[nation]' and myset>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "전쟁 금지") { + $query = "update nation set myset=myset-1,war='1' where nation='$me[nation]' and myset>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "전쟁 허가") { + $query = "update nation set myset=myset-1,war='0' where nation='$me[nation]' and myset>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +echo ""; + +?> + diff --git a/twe_close/c_double.php b/twe_close/c_double.php new file mode 100644 index 00000000..8c99759b --- /dev/null +++ b/twe_close/c_double.php @@ -0,0 +1,128 @@ + 99) { $command = 0; } +if($double > 9999) { $double = 9999; } +if($third > 9999) { $third = 9999; } +if($fourth > 9999) { $fourth = 9999; } + +$comStr = EncodeCommand($fourth, $third, $double, $command); + +// 건국 +if($command == 46) { + $name = addslashes(SQ2DQ($name)); + $name = str_replace("|", "", $name); + $name = str_replace(" ", "", $name); + $name = str_replace(" ", "뷁", $name); + if($name == "") { $name = "무명"; } + $name = _String::SubStrForWidth($name, 0, 12); + + $query = "update general set makenation='{$name}' where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $count = sizeof($turn); + $str = "con=con"; + for($i=0; $i < $count; $i++) { + $str .= ",turn{$turn[$i]}='{$comStr}'"; + } + $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + echo ""; +//통합제의 +} elseif($command == 53) { + $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[level] >= 5) { + $nationname = addslashes(SQ2DQ($nationname)); + $nationname = str_replace("|", "", $nationname); + $nationname = str_replace(" ", "", $nationname); + $nationname = str_replace(" ", "뷁", $nationname); + if($nationname == "") { $nationname = "무명"; } + $nationname = _String::SubStrForWidth($nationname, 0, 12); + + $query = "update general set makenation='{$nationname}' where level>=5 and nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $count = sizeof($turn); + $str = "type=type"; + for($i=0; $i < $count; $i++) { + $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + } + $query = "update nation set {$str} where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + echo ""; +//불가침 +} elseif($command == 61) { + $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[level] >= 5) { + $note = addslashes(SQ2DQ($note)); + $note = str_replace("|", "", $note); + $note = str_replace(" ", "", $note); + $note = str_replace(" ", "뷁", $note); + $note = _String::SubStrForWidth($note, 0, 90); + + $query = "update diplomacy set reserved='{$note}' where me='$me[nation]' and you='$double'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $count = sizeof($turn); + $str = "type=type"; + for($i=0; $i < $count; $i++) { + $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + } + $query = "update nation set {$str} where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + echo ""; +//포상, 몰수, 발령, 항복권고, 원조 +//선전포고, 종전, 파기, 초토화, 천도, 증축, 감축 +//백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 +//국기변경 +} elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) { + $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if(($command == 23 || $command == 24 || $command == 27) && $me[no] == $third) { + // 자기자신에게 악용 금지 + } elseif($me[level] >= 5) { + $count = sizeof($turn); + $str = "type=type"; + for($i=0; $i < $count; $i++) { + $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + } + $query = "update nation set {$str} where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + echo ""; +} else { + $count = sizeof($turn); + $str = "con=con"; + for($i=0; $i < $count; $i++) { + $str .= ",turn{$turn[$i]}='{$comStr}'"; + } + $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + echo ""; +} + +?> + diff --git a/twe_close/c_msgsubmit.php b/twe_close/c_msgsubmit.php new file mode 100644 index 00000000..4a0eba39 --- /dev/null +++ b/twe_close/c_msgsubmit.php @@ -0,0 +1,119 @@ += 2) { echo ""; exit(); } + +$msg = str_replace("|", "", $msg); +$msg = trim($msg); + +$msg = _String::SubStrForWidth($msg, $s, 198); + +$date = date('Y-m-d H:i:s'); + +// 전체 메세지 +if($genlist == 9999 && str_replace(" ", "", $msg) != "") { + if($me[nation] == 0) { + $nation[name] = '재야'; + $nation[color] = 'FFFFFF'; + } else { + $query = "select nation,name,color from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + PushMsg(1, 0, $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $nation[name], $nation[color], $msg); +// 국가 메세지 +} elseif($genlist >= 9000 && $msg != "") { + if($me[nation] == 0) { + $nation[name] = '재야'; + $nation[color] = 'FFFFFF'; + } else { + $query = "select nation,name,color from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + + $genlist -= 9000; + $query = "select nation,name,color from nation where nation='$genlist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dest = MYDB_fetch_array($result); + + if($nation[nation] == $dest[nation]) { + PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $dest[name], $dest[color], $msg); + } else { + //타국에 보내는 경우 + PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); + // 수뇌이면 발송, 아니면 자국으로 돌림 + if($me[level] >= 5) { + PushMsg(3, $dest[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); + } else { + PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], "반송"); + } + } +// 개인 메세지 +} elseif($genlist > 0 && $msg != "") { + $query = "select name,msgindex from general where no='$genlist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + //발신, 수신인 코딩 + $who = $me[no] * 10000 + $genlist; + + $msg = addslashes(SQ2DQ($msg)); + + $query = "select msg{$me[msgindex]}_when as priv_when from general where no='$me[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $prev_msg = MYDB_fetch_array($result); + $diff_second = strtotime($date) - strtotime($prev_msg[priv_when]); + + if($diff_second < 3) { + $who = 1 * 10000 + $me[no]; // 운영자가 본인에게 + $msg = "개인메세지는 3초당 1건만 보낼 수 있습니다!"; + //자신에게 표시 + $me[msgindex]++; + if($me[msgindex] >= 10) { $me[msgindex] = 0; } + $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='10',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date',newmsg=1 where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //자신에게 표시 + $me[msgindex]++; + if($me[msgindex] >= 10) { $me[msgindex] = 0; } + $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='9',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 상대에게 발송 + $you[msgindex]++; + if($you[msgindex] >= 10) { $you[msgindex] = 0; } + $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_type='10',msg{$you[msgindex]}_who='$who',msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $fp = fopen("logs/_gen_msg.txt", "a"); + //로그 파일에 기록 + fwrite($fp, _String::Fill($me[name],12," ")." > "._String::Fill($you[name],12," ")." | {$msg}\r\n"); + fclose($fp); +} + +echo ""; + +?> + diff --git a/twe_close/c_myBossInfo.php b/twe_close/c_myBossInfo.php new file mode 100644 index 00000000..f12bee51 --- /dev/null +++ b/twe_close/c_myBossInfo.php @@ -0,0 +1,256 @@ +location.replace('b_myBossInfo.php');"; + exit(); + } +} elseif($btn == "추방") { + $query = "select no,name,gold,rice,nation,troop,level,history,npc,picture,imgsvr from general where no='$outlist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + //추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 + if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $outlist != 0)) { + echo ""; + exit(); + } +} + +if($btn == "추방") { + $query = "select name,l{$meLevel}set,chemi from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + //이미 지정했다면 무시 + if($nation["l{$meLevel}set"] == 0 && $general[level] > 0 && $general[level] < 12) { + $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount1 = MYDB_num_rows($dipresult); + + $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount2 = MYDB_num_rows($dipresult); + + $gold = 0; + $rice = 0; + // 금쌀1000이상은 남김 + if($general[gold] > 1000) { + $gold = $general[gold] - 1000; + $general[gold] = 1000; + } + if($general[rice] > 1000) { + $rice = $general[rice] - 1000; + $general[rice] = 1000; + } + + if($dipcount1 > 0) { + $alllog[count($alllog)] = "●{$admin[month]}월:통합에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; + $log[count($log)] = "●통합에 반대하다가 $nation[name]에서 숙청당했습니다."; + + // 재야로, 국가 무소속으로 + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($dipcount2 > 0) { + $alllog[count($alllog)] = "●{$admin[month]}월:합병에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; + $log[count($log)] = "●합병에 반대하다가 $nation[name]에서 숙청당했습니다."; + + // 재야로, 국가 무소속으로 + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 추방당하였습니다."; + $log[count($log)] = "$nation[name]에서 추방당하였습니다."; + + // 재야로, 국가 무소속으로, 명성/공헌 N*10%감소 + $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='$general[gold]',rice='$general[rice]',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + // 부대 처리 + $query = "select no from troop where troop='$general[troop]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $troop = MYDB_fetch_array($result); + + //부대장일 경우 + if($troop[no] == $general[no]) { + // 모두 탈퇴 + $query = "update general set troop='0' where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대 삭제 + $query = "delete from troop where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set troop='0' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 도시관직해제 + $query = "update city set gen1='0' where gen1='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2='0' where gen2='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3='0' where gen3='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general[npc] >= 2 && ($admin[scenario] == 0 || rand()%100 == 0)) { + switch(rand()%5) { + case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break; + case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break; + case 2: $str = "어디 추방해가면서 잘되나 보자... 꼭 복수하겠다..."; break; + case 3: $str = "인덕이 제일이거늘... 추방이 웬말인가... 저주한다!"; break; + case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break; + } + + PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $str); + } + + //국가 기술력 그대로 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $nation[chemi] -= 1; + if($nation[chemi] < 0) { $nation[chemi] = 0; } + + if($admin[year] < $admin[startyear]+3) { + //초반엔 군주 부상 증가(엔장 임관지양) + $query = "update general set injury=injury+1 where no='$ruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //이번분기는 추방불가(초반 제외) + $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 추방됨"); + + pushGenLog($general, $log); + pushAllLog($alllog); + } +} elseif($btn == "임명" && $level >= 5 && $level <= 11) { + $query = "select l{$level}set,level,chemi from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + // 임명가능 레벨 + $lv = getNationChiefLevel($nation[level]); + + //이미 지정했다면 무시 + if($nation["l{$level}set"] == 0 && $lv <= $level) { + $nation[chemi] -= 1; + if($nation[chemi] < 0) { $nation[chemi] = 0; } + + $query = "update nation set chemi='$nation[chemi]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //기존 장수 일반으로 + $query = "update general set level=1 where nation='$me[nation]' and level='$level'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + if($genlist != 0) { + $valid = 0; + switch($level) { + case 10: if($general[power] >= $_goodgenpower) { $valid = 1; } break; + case 9: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + case 8: if($general[power] >= $_goodgenpower) { $valid = 1; } break; + case 7: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + case 6: if($general[power] >= $_goodgenpower) { $valid = 1; } break; + case 5: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + default: $valid = 1; break; + } + if($valid == 1) { + // 신임 장수의 원래 자리 해제 + $query = "update city set gen1=0 where gen1='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2=0 where gen2='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3=0 where gen3='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //신임 장수 + $query = "update general set level='$level' where no='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //이번분기는 불가 + $query = "update nation set l{$level}set=1 where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } +} elseif($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { + switch($level) { + case 4: $lv = 1; break; + case 3: $lv = 2; break; + case 2: $lv = 3; break; + } + + $query = "select gen{$lv} from city where city='$citylist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + $oldlist = $city["gen{$lv}"]; + if($oldlist != 0) { + //기존 장수 일반으로 + $query = "update general set level=1 where no='$oldlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //기존 자리 공석으로 + $query = "update city set gen{$lv}=0 where city='$citylist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + if($genlist != 0) { + $valid = 0; + switch($level) { + case 4: if($general[power] >= $_goodgenpower) { $valid = 1; } break; + case 3: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + default: $valid = 1; break; + } + if($valid == 1) { + // 신임 장수의 원래 자리 해제 + $query = "update city set gen1=0 where gen1='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2=0 where gen2='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3=0 where gen3='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //신임 장수 + $query = "update general set level='$level' where no='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen{$lv}='$genlist',gen{$lv}set='1' where city='$citylist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } +} + +echo ""; + +?> + diff --git a/twe_close/c_nationboard.php b/twe_close/c_nationboard.php new file mode 100644 index 00000000..6d3544d3 --- /dev/null +++ b/twe_close/c_nationboard.php @@ -0,0 +1,51 @@ += 20) { $num = 0; } + $msg = $title."|".$msg; + $msg = addslashes(SQ2DQ($msg)); + $date = date('Y-m-d H:i:s'); + $query = "update nation set board{$num}='$msg',board{$num}_who='$me[no]',board{$num}_when='$date' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set boardindex='$num' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //$num에 댓글시 + } elseif($num >= 0 && $reply != "") { + $newmsg = $nation["board{$num}"]."|".$me[no]."|".$reply; + $newmsg = addslashes(SQ2DQ($newmsg)); + + $query = "update nation set board{$num}='$newmsg' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +echo ""; + +?> + + + + diff --git a/twe_close/c_nationrule.php b/twe_close/c_nationrule.php new file mode 100644 index 00000000..9744f007 --- /dev/null +++ b/twe_close/c_nationrule.php @@ -0,0 +1,22 @@ +location.replace('b_nationrule.php');"; + +?> + diff --git a/twe_close/c_tournament.php b/twe_close/c_tournament.php new file mode 100644 index 00000000..157dc74a --- /dev/null +++ b/twe_close/c_tournament.php @@ -0,0 +1,205 @@ +location.replace('b_tournament.php');"; exit(); } + +if($btn == "자동개최설정" && $me[userlevel] >= 5) { + $query = "update game set tnmt_trig={$trig}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "개최" && $me[userlevel] >= 5) { + startTournament($connect, $auto, $type); +} elseif($btn == "중단" && $me[userlevel] >= 5) { + $query = "update game set tnmt_auto=0, tournament=0, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif((($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") && $me[userlevel] >= 5) || $btn == "참가") { + if($btn == "투입") { + $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[gold] -= $admin[develcost]; + } elseif($btn == "무명투입") { + $general[no] = 0; + $general[name] = "무명장수"; + $general[npc] = 2; + $general[leader] = 10; + $general[power] = 10; + $general[intel] = 10; + $general[explevel] = 10; + $general[gold] = 0; + } elseif($btn == "쪼렙투입") { + $sel = rand() % 32; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[gold] -= $admin[develcost]; + } elseif($btn == "일반투입") { + //참가한 사람 평균치 + $query = "select AVG({$tp3}) as av from general where tournament=1"; + $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $avgGen = MYDB_fetch_array($genResult); + + //그 장수보다 높은장수 수 + $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; + $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($genResult); + + $sel = rand() % 32 + $genCount - 8; + + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[gold] -= $admin[develcost]; + } elseif($btn == "굇수투입") { + $sel = rand() % 32; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[gold] -= $admin[develcost]; + } elseif($btn == "랜덤투입") { + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[gold] -= $admin[develcost]; + //참가 + } else { + $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$me[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + //$admin[develcost]원 참가비 + if($general[gold] < $admin[develcost]) { echo ""; exit(1); } + $general[gold] -= $admin[develcost]; + } + + $query = "select grp from tournament where grp<10 group by grp having count(*)=8"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $grpCount = MYDB_num_rows($result); + for($i=0; $i < $grpCount; $i++) { + $grp = MYDB_fetch_array($result); + $occupied[$grp[grp]] = 1; + } + for($i=0; $i < 8; $i++) { + if($occupied[$i] == 0) { + $map[count($map)] = $i; + } + } + + if($grpCount < 8) { + $grp = $map[rand() % count($map)]; + $query = "select grp from tournament where grp='$grp'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $grpCount = MYDB_num_rows($result); + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grpCount', '$general[horse]', '$general[weap]', '$general[book]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set tournament=1,gold='$general[gold]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $query = "select grp from tournament where grp<10 group by grp having count(*)=8"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $grpCount = MYDB_num_rows($result); + if($grpCount >= 8) { + $query = "update game set tournament=2, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif(($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") && $me[userlevel] >= 5) { + $z = 0; + for($i=0; $i < 8; $i++) { + $query = "select grp from tournament where grp='$i'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $grpCount = MYDB_num_rows($result); + for($k=$grpCount; $k < 8; $k++) { + $code[$z++] = $i * 10 + $k; + } + } + //섞기 + for($i=0; $i < $z; $i++) { + $index = rand() % $z; + $temp = $code[$i]; + $code[$i] = $code[$index]; + $code[$index] = $temp; + } + + for($i=0; $i < $z; $i++) { + $sel = rand() % 32; + if($btn == "쪼렙전부투입") { + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; + } elseif($btn == "일반전부투입") { + //참가한 사람 평균치 + $query = "select AVG({$tp3}) as av from general where tournament=1"; + $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $avgGen = MYDB_fetch_array($genResult); + + //그 장수보다 높은장수 수 + $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; + $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($genResult); + + $sel += $genCount - 8; + + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + } elseif($btn == "굇수전부투입") { + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + } else { + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; + } + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $grp = floor($code[$i] / 10); + $grp_no = $code[$i] % 10; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grp_no', '$general[horse]', '$general[weap]', '$general[book]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set tournament=1,gold=gold-'$admin[develcost]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $query = "update game set tournament=2, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "무명전부투입" && $me[userlevel] >= 5) { fillLowGenAll($connect); +} elseif($btn == "예선" && $me[userlevel] >= 5) { qualify($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "예선전부" && $me[userlevel] >= 5) { qualifyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "추첨" && $me[userlevel] >= 5) { selection($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "추첨전부" && $me[userlevel] >= 5) { selectionAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "본선" && $me[userlevel] >= 5) { finallySingle($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "본선전부" && $me[userlevel] >= 5) { finallyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "배정" && $me[userlevel] >= 5) { final16set($connect); +} elseif($btn == "베팅마감" && $me[userlevel] >= 5) { + $dt = date("Y-m-d H:i:s", time() + 60); + $query = "update game set tournament='7',phase='0',tnmt_time='$dt' where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "16강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 16); +} elseif($btn == "8강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 8); +} elseif($btn == "4강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 4); +} elseif($btn == "결승" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 2); +} elseif($btn == "포상" && $me[userlevel] >= 5) { setGift($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); +} elseif($btn == "회수" && $me[userlevel] >= 5) { setRefund($connect); +} elseif($btn == "메시지" && $me[userlevel] >= 5) { + $msg = addslashes(SQ2DQ($msg)); + $query = "update game set tnmt_msg='$msg'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} +?> + + diff --git a/twe_close/c_troop.php b/twe_close/c_troop.php new file mode 100644 index 00000000..5dbdfb79 --- /dev/null +++ b/twe_close/c_troop.php @@ -0,0 +1,58 @@ +location.replace('b_troop.php');"; + +MYDB_close($connect); +?> + diff --git a/twe_close/c_vacation.php b/twe_close/c_vacation.php new file mode 100644 index 00000000..b4062169 --- /dev/null +++ b/twe_close/c_vacation.php @@ -0,0 +1,20 @@ +location.replace('b_myPage.php');"; + +?> + diff --git a/twe_close/c_vote.php b/twe_close/c_vote.php new file mode 100644 index 00000000..c9e0d242 --- /dev/null +++ b/twe_close/c_vote.php @@ -0,0 +1,76 @@ += 5) { + if($title != "") { + $vote = explode("|", $admin[vote]); + $vote[0] = addslashes(SQ2DQ($title)); + $admin[vote] = implode("|", $vote); + $query = "update game set vote='{$admin[vote]}' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif($btn == "추가" && $me[userlevel] >= 5) { + if($str != "") { + $str = addslashes(SQ2DQ($str)); + $admin[vote] .= "|{$str}"; + $query = "update game set vote='{$admin[vote]}' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} elseif($btn == "리셋" && $me[userlevel] >= 5) { + $query = "update game set voteopen=1,vote='',votecomment='' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set vote='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "알림" && $me[userlevel] >= 5) { + $query = "update general set newvote='1' where vote=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "숨김" && $me[userlevel] >= 5) { + $query = "update game set voteopen=0 where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "전체통계만" && $me[userlevel] >= 5) { + $query = "update game set voteopen=1 where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "전부" && $me[userlevel] >= 5) { + $query = "update game set voteopen=2 where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($btn == "투표" && $me[vote] == 0 && $sel > 0) { + $develcost = $admin[develcost] * 5; + $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = array(); + $log = uniqueItem($connect, $me, $log, 1); + pushGenLog($me, $log); +} elseif($btn == "댓글" && $comment != "") { + $comment = str_replace("|", " ", $comment); + $comment = str_replace(":", " ", $comment); + $comment = trim($comment); + $comment = addslashes(SQ2DQ($comment)); + + $query = "select name from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + if($nation[name] == "") { $nation[name] = "재야"; } + + if($admin[votecomment] != "") { $admin[votecomment] .= "|"; } + $admin[votecomment] .= "{$nation[name]}:{$me[name]}:{$comment}"; + + $query = "update game set votecomment='{$admin[votecomment]}' where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} +?> + + diff --git a/twe_close/commandlist.php b/twe_close/commandlist.php new file mode 100644 index 00000000..2239349c --- /dev/null +++ b/twe_close/commandlist.php @@ -0,0 +1,113 @@ + + + + +커맨드리스트 + + + + + + + +
+ + - 명령 목록 - + "; + + $year = $admin[year]; + $month = $admin[month]; + // 실행된 턴시간이면 +1 + $cutTurn = cutTurn($me[turntime], $admin[turnterm]); + if($date <= $cutTurn) { $month++; } + + $totaldate = $me[turntime]; + + for($i=0; $i < 24; $i++) { + if($month == 13) { + $month = 1; + $year++; + } + $j = $i + 1; + $turndate = substr($totaldate,11, 5); + echo " + + $j + {$year}年 {$month}月 + $turndate + $turn[$i] + "; + $month++; + $totaldate = addTurn($totaldate, $admin[turnterm]); + } + + echo " +
+ +"; +} +?> + + + diff --git a/twe_close/confirm.png b/twe_close/confirm.png new file mode 100644 index 0000000000000000000000000000000000000000..073c46422f3f23a6deceb6b691d29ec5b1b51a70 GIT binary patch literal 582 zcmeAS@N?(olHy`uVBq!ia0vp^{2&ni9{gXR(7=$ypvlAatNzoI zdNwv7ui-`03N{V}wh0C9>;V!WZEgRrumA7w&0H7}$;i~f=)(BZ%E}>?fsy6fVTLds z5hf*tW=0hb0SASt0kKb?{*R4WFbk|wFy-Fw?>wQQJm23LE?I8O!DS>N!Qk1zz$DGe z;_$jLD)Aiy6OiYaV|A96XL6aG zxgn9lX%w-A!$nJ*nMI&&cVk{F1IOW;k~i-%FuFv|U|^A8NIRLc*nC=R6fhw$c)I$z JtaD0e0ssqy$vyx8 literal 0 HcmV?d00001 diff --git a/twe_close/d_ally.php b/twe_close/d_ally.php new file mode 100644 index 00000000..3e6b36f4 --- /dev/null +++ b/twe_close/d_ally.php @@ -0,0 +1,120 @@ +●수뇌부가 아니므로 불가능합니다. 불가침 실패."; + } elseif($dip[term] == $when*12 && $dip[state] == 7) { + $mylog[count($mylog)] = "●이미 수락했습니다. 불가침 실패."; + } elseif($losecitynum == 0) { + $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 불가침 실패."; + } elseif($wincitynum == 0) { + $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 불가침 실패."; + } elseif($dip[state] == 0) { + $mylog[count($mylog)] = "●아국과 교전중입니다. 불가침 실패."; + } elseif($dip[state] == 1) { + $mylog[count($mylog)] = "●아국과 선포중입니다. 불가침 실패."; + } elseif($dip[state] == 3 || $dip[state] == 4) { + $mylog[count($mylog)] = "●아국과 합병중입니다. 불가침 실패."; + } elseif($mynation[dipmsg] == "") { + $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; + } else { +// $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 불가침에 합의."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【불가침】$mynation[name](이)가 $younation[name](와)과 불가침 조약을 체결했습니다."; + + $youlog[count($youlog)] = "$mynation[name](와)과 $when년 불가침에 성공했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 $when년 불가침에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 성공"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 수락"); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; + + PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + + $when = $when * 12; + //외교 변경 + $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$me[nation]' and you='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$you[nation]' and you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //조건 지움 + $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$mynation[name](이)가 불가침을 거부했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 불가침을 거부했습니다."; + + //조건 지움 + $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +//pushAllLog($alllog); +//pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/d_cancel.php b/twe_close/d_cancel.php new file mode 100644 index 00000000..94281351 --- /dev/null +++ b/twe_close/d_cancel.php @@ -0,0 +1,99 @@ +●수뇌부가 아니므로 불가능합니다. 파기 실패."; + } elseif($losecitynum == 0) { + $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 파기 실패."; + } elseif($wincitynum == 0) { + $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 파기 실패."; + } elseif($dip[state] != 7) { + $mylog[count($mylog)] = "●아국과 불가침중이 아닙니다. 파기 실패."; + } elseif($mynation[dipmsg] == "") { + $mylog[count($mylog)] = "●이미 거절했습니다. 파기 실패."; + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 조약 파기에 합의."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【파기】$mynation[name](이)가 $younation[name](와)과 불가침을 파기 하였습니다."; + $youlog[count($youlog)] = "$mynation[name](와)과 파기에 성공했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 파기에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 파기 성공"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 파기 수락"); + + //외교 변경 + $query = "update diplomacy set state='2',term='0' where me='$me[nation]' and you='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update diplomacy set state='2',term='0' where me='$you[nation]' and you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 불가침 파기 동의"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 불가침 파기 동의"; + + PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + } + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$mynation[name](이)가 파기를 거부했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 파기를 거부했습니다."; + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +pushAllLog($alllog); +pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/d_cease.php b/twe_close/d_cease.php new file mode 100644 index 00000000..76c125f7 --- /dev/null +++ b/twe_close/d_cease.php @@ -0,0 +1,104 @@ +●수뇌부가 아니므로 불가능합니다. 종전 실패."; + } elseif($losecitynum == 0) { + $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 종전 실패."; + } elseif($wincitynum == 0) { + $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 종전 실패."; + } elseif($dip[state] != 0 && $dip[state] != 1) { + $mylog[count($mylog)] = "●아국과 교전중이 아닙니다. 종전 실패."; + } elseif($mynation[dipmsg] == "") { + $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【종전】$mynation[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; + $youlog[count($youlog)] = "$mynation[name](와)과 종전에 성공했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 종전에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 성공"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 종전 수락"); + + //외교 변경 + $query = "update diplomacy set state='2',term='0' where me='$mynation[nation]' and you='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update diplomacy set state='2',term='0' where me='$younation[nation]' and you='$mynation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //외교제한 + $query = "update nation set surlimit=24 where nation='$mynation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set surlimit=24 where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 종전 동의"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 동의"; + + PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + } + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$mynation[name](이)가 종전을 거부했습니다."; + $mylog[count($mylog)] = "$younation[name](와)과 종전을 거부했습니다."; + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +pushAllLog($alllog); +pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/d_merge.php b/twe_close/d_merge.php new file mode 100644 index 00000000..d57c213e --- /dev/null +++ b/twe_close/d_merge.php @@ -0,0 +1,138 @@ +=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$avgnation = MYDB_fetch_array($result); + +$query = "select round(std(power)) as power,round(std(gennum)) as gennum from nation where level>=1"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$stdnation = MYDB_fetch_array($result); + +$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='$you[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$younation = MYDB_fetch_array($result); + +$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$mynation = MYDB_fetch_array($result); + +$query = "select city from city where nation='$me[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$losecitynum = MYDB_num_rows($result); + +$query = "select city from city where nation='$you[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$wincitynum = MYDB_num_rows($result); + +//아국과의 관계 +$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$dip = MYDB_fetch_array($result); +//대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 +$query = "select state from diplomacy where me='$you[nation]' and (state='0' or state='1' or state='3' or state='5')"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$dipcount = MYDB_num_rows($result); +//대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) +$query = "select you,state from diplomacy where me='$me[nation]' and (state='0' or state='1')"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$warcount = MYDB_num_rows($result); +// 아국과 교전중인 국가 골라냄 +$valid = 1; +for($i=0; $i < $warcount; $i++) { + $acdip = MYDB_fetch_array($result); + //교전중 국가A와 대상국B 외교 확인 + $query = "select state from diplomacy where me='$acdip[you]' and you='$you[nation]'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $abdip = MYDB_fetch_array($dipresult); + + if($abdip[state] == 7) { + $valid = 0; + } +} + +if($ok == "수락") { + // 서신 보낸 후 멸망 했을때. + if($me[level] < 5) { + $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 통합 실패."; + } elseif($mynation[surlimit] > 0) { + $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 통합 실패."; + } elseif($younation[surlimit] > 0) { + $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 통합 실패."; + } elseif($losecitynum == 0) { + $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 통합 실패."; + } elseif($wincitynum == 0) { + $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 통합 실패."; + } elseif($mynation[power]+$younation[power] > $avgnation[power]+$stdnation[power]) { + $mylog[count($mylog)] = "●양국 국력이 너무 높습니다. 통합 실패."; + } elseif($mynation[gennum]+$younation[gennum] > $avgnation[gennum]+$stdnation[gennum]) { + $mylog[count($mylog)] = "●양국 장수가 많습니다. 통합 실패."; + } elseif(!isClose($connect, $younation[nation], $mynation[nation])) { + $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 통합 실패."; + } elseif($dip[state] == 0) { + $mylog[count($mylog)] = "●아국과 교전중입니다. 통합 실패."; + } elseif($dipcount != 0) { + $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 통합 실패."; + } elseif($valid == 0) { + $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 통합 실패."; + } elseif($mynation[dipmsg] == "") { + $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; + } else { + $youlog[count($youlog)] = "$mynation[name](이)가 통합에 동의했습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합시도】$mynation[name](와)과 $younation[name](이)가 통합을 시도합니다."; + $mylog[count($mylog)] = "$younation[name](와)과 통합에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 통합에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 통합 시도"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 통합 시도"); + + //외교 변경 + $query = "update diplomacy set state='3',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update diplomacy set state='4',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 통합에 합의"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 통합에 합의"; + + PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + } + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +pushAllLog($alllog); +pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/d_scout.php b/twe_close/d_scout.php new file mode 100644 index 00000000..9900e98f --- /dev/null +++ b/twe_close/d_scout.php @@ -0,0 +1,164 @@ + 0 && $nation[scout] == 0 && $me[nation] != $nation[nation] && $admin[year] >= $admin[startyear]+3 && strpos($me['nations'], ",{$nation['nation']},") === false) { + $youlog[count($youlog)] = "$me[name] 등용에 성공했습니다."; + $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $nation[name](으)로 망명하였습니다."; + $mylog[count($mylog)] = "$nation[name](으)로 망명하여 수도로 이동합니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$me[name] 등용에 성공"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$nation[name](으)로 망명"); + + // 임관내역 추가 + $me['nations'] .= "{$nation['nation']},"; + + // 국가 변경, 도시 변경, 일반으로, 수도로 + $query = "update general set killturn='$admin[killturn]',belong=1,nation='$you[nation]',nations='{$me['nations']}',level=1,city='$nation[capital]' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 재야가 아니면 명성N*10% 공헌N*10%감소 + if($me[level] > 0) { + // 1000 1000 남기고 환수 + if($me[gold] > 1000) { $gold = $me[gold] - 1000; $me[gold] = 1000; } else { $gold = 0; } + if($me[rice] > 1000) { $rice = $me[rice] - 1000; $me[rice] = 1000; } else { $rice = 0; } + $query = "update general set gold='$me[gold]',rice='$me[rice]',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //재야이면 100 100 증가 + $query = "update general set dedication=dedication+100,experience=experience+100 where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //유저이면 삭턴 리셋 + if($me[npc] < 2) { + $query = "update general set killturn='$admin[killturn]' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //태수 군사 시중 해제 + switch($me[level]) { + case 4: + $query = "update city set gen1=0 where gen1='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 3: + $query = "update city set gen2=0 where gen2='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 2: + $query = "update city set gen3=0 where gen3='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } + + //등용자 명성, 공헌 상승 + $query = "update general set dedication=dedication+100,experience=experience+100 where no='$you[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 부대 처리 + $query = "select no from troop where troop='$me[troop]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $troop = MYDB_fetch_array($result); + + //부대장일 경우 + if($troop[no] == $me[no]) { + // 모두 탈퇴 + $query = "update general set troop='0' where troop='$me[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대 삭제 + $query = "delete from troop where troop='$me[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set troop='0' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //국가 기술력 그대로 + $query = "select no from general where nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //기존 국가 기술력 그대로 + $query = "select no from general where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //현 메세지 수정 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($me[level] == 12) { + $mylog[count($mylog)] = "●군주입니다. 등용 수락 불가."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($nation[level] == 0) { + $mylog[count($mylog)] = "●없는 국가이거나 방랑군입니다. 등용 수락 불가."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($nation[scout] != 0) { + $mylog[count($mylog)] = "●임관 금지중입니다. 등용 수락 불가."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif($admin[year] < $admin[startyear]+3) { + $mylog[count($mylog)] = "●초반 제한중입니다. 등용 수락 불가."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { + $mylog[count($mylog)] = "●이미 임관했었던 국가입니다. 등용 수락 불가."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$me[name](이)가 등용을 거부했습니다."; + $mylog[count($mylog)] = "$nation[name](으)로 망명을 거부했습니다."; + + //현 메세지 지움 + $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 거부',msg{$num}_type='10' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +pushAllLog($alllog); +pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/d_setting/.htaccess b/twe_close/d_setting/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/twe_close/d_setting/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/twe_close/d_setting/_common.php b/twe_close/d_setting/_common.php new file mode 100644 index 00000000..90e4756f --- /dev/null +++ b/twe_close/d_setting/_common.php @@ -0,0 +1,10 @@ + diff --git a/twe_close/d_surrender.php b/twe_close/d_surrender.php new file mode 100644 index 00000000..729fe7fa --- /dev/null +++ b/twe_close/d_surrender.php @@ -0,0 +1,128 @@ +●수뇌부가 아니므로 불가능합니다. 투항 실패."; + } elseif($mynation[surlimit] > 0) { + $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 투항 실패."; + } elseif($younation[surlimit] > 0) { + $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 투항 실패."; +// } elseif($losecitynum == 0) { +// $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 투항 실패."; + } elseif($wincitynum == 0) { + $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 투항 실패."; + } elseif($younation[power] / $mynation[power] <= 3) { + $mylog[count($mylog)] = "●아국과 상대국의 국력차이가 크지 않습니다. 투항 실패."; + } elseif($losecitynum != 0 && !isClose($connect, $younation[nation], $mynation[nation])) { + $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 투항 실패."; + } elseif($dip[state] == 0) { + $mylog[count($mylog)] = "●아국과 교전중입니다. 투항 실패."; + } elseif($dipcount != 0) { + $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 투항 실패."; + } elseif($valid == 0) { + $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 투항 실패."; + } elseif($mynation[dipmsg] == "") { + $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; + } else { + $youlog[count($youlog)] = "$mynation[name](이)가 합병에 동의했습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【합병시도】$mynation[name](와)과 $younation[name](이)가 합병을 시도합니다."; + $mylog[count($mylog)] = "$younation[name](와)과 합병에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 합병에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병 시도"); + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 합병 시도"); + + //외교 변경 + $query = "update diplomacy set state='5',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update diplomacy set state='6',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 합병에 동의"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 합병에 동의"; + + PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + } + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; + + //현 메세지 지움 + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +pushGenLog($me, $mylog); +pushGenLog($you, $youlog); +pushAllLog($alllog); +pushHistory($connect, $history); + +echo ""; + +?> + diff --git a/twe_close/data/.htaccess b/twe_close/data/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/twe_close/data/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/twe_close/data/connected.php b/twe_close/data/connected.php new file mode 100644 index 00000000..caaabefa --- /dev/null +++ b/twe_close/data/connected.php @@ -0,0 +1 @@ + diff --git a/twe_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 b/twe_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 new file mode 100644 index 00000000..788e8886 --- /dev/null +++ b/twe_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 @@ -0,0 +1 @@ +p_ip|s:14:"125.209.213.87";p_time|i:1457326503; \ No newline at end of file diff --git a/twe_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 b/twe_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 new file mode 100644 index 00000000..e2a88960 --- /dev/null +++ b/twe_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 @@ -0,0 +1 @@ +p_ip|s:14:"125.209.213.86";p_time|i:1457326490; \ No newline at end of file diff --git a/twe_close/error.php b/twe_close/error.php new file mode 100644 index 00000000..e715fc70 --- /dev/null +++ b/twe_close/error.php @@ -0,0 +1,32 @@ + + + + + +에러 + + + + +




+ + + + + + + + +
서 버 에 러
+ 두가지 중 한가지 이유일 수 있습니다.

+ 1. 현재 서버가 처리중입니다. 몇초 후 아래 버튼을 눌러주세요.

+ 2. 오랫동안 이 메세지가 뜰 경우는 서버에 에러가 발생하여 잠시 중단된 상태입니다.
+    운영자가 처리할 때까지 기다려주세요.
+
잠시 후 아래의 버튼을 눌러주세요.
+ + + diff --git a/twe_close/event_1.php b/twe_close/event_1.php new file mode 100644 index 00000000..7dea2813 --- /dev/null +++ b/twe_close/event_1.php @@ -0,0 +1,248 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select year,month,turnterm,isUnited from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +if($admin[isUnited] == 0) { + $query = "select no from general where npc<2 and age>50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + CheckHall($connect, $general[no]); + } +} + +// 수도가 이성인경우 옆으로 이전, 또는 랜덤 +$query = "select nation from nation where capital=63 or capital=64 or capital=65 or capital=66 or capital=67 or capital=68 or capital=69"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); + +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + + $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; + $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result2); + + $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +} + +//이벤트1 : 이민족침범 +$name = Array( "강족", "저족", "흉노족", "남만족", "산월족", "오환족", "왜족"); +$cap = Array( 63, 64, 65, 66, 67, 68, 69); + +$query = "select no from general where npc<5"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$eachCount = MYDB_num_rows($result); +$eachCount = round($eachCount / 7) * 2; + +for($i=0; $i < 7; $i++) { + RegNation($connect, $name[$i], "800000", 999999, 999999, "중원의 부패를 물리쳐라! 이민족 침범!", 15000, $eachCount, "병가", 0); +} + +//////////////////////////외교////////////////////////////////////////////////// +$query = "update game set isUnited=1"; +MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + +//-------------------------------------------------------------------- +for($i=0; $i < 7; $i++) { + $query = "select nation from nation where name='{$name[$i]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $nationNum[$i] = $nation[nation]; + + $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + //태수,군사,시중 해제 + $query = "select gen1,gen2,gen3 from city where city='{$cap[$i]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + //태수 해제 + $query = "update general set level=1 where no='{$city[gen1]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + //군사 해제 + $query = "update general set level=1 where no='{$city[gen2]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + //시중 해제 + $query = "update general set level=1 where no='{$city[gen3]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + $query = "select nation,level from nation where nation!='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($k=0; $k < $count; $k++) { + $your = MYDB_fetch_array($result); + if($your[level] > 0) { + $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } +} + +for($i=0; $i < 7; $i++) { + $query = "update nation set level=1 where nation='$nationNum[$i]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +} +//-------------------------------------------------------------------- + +//////////////////////////장수////////////////////////////////////////////////// +// 이름 통 무 지 꿈 특기 +$gencount = 2001; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } + else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +//////////////////////////장수 끝/////////////////////////////////////////////// + +// 전장수 금쌀 999999 +$query = "update general set gold=999999,rice=999999"; +MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 이민족들이 궐기합니다!"; +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓞ".$name; + $genid = "npc{$gencount}"; + $turntime = getRandTurn2($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%94 + 1; + $age = 15; + $specage = $age; + $specage2 = $age; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 5; + $npcmatch = 999; + $picture = 'default.jpg'; + $crew = $leader * 100; + $crewtype = rand() % 3; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos,tnmt, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$leader','$power','$intel','$experience','$dedication', + '$level','99999','99999','$crew','$crewtype','100','100','0', + '6','6','6','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0', + 450000, 450000, 450000, 450000, 450000 + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> + diff --git a/twe_close/event_2.php b/twe_close/event_2.php new file mode 100644 index 00000000..94bcc518 --- /dev/null +++ b/twe_close/event_2.php @@ -0,0 +1,257 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select year,month,turnterm,isUnited from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +if($admin[isUnited] == 0) { + $query = "select no from general where npc<2 and age>50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + CheckHall($connect, $general[no]); + } +} + +// 수도가 이성인경우 옆으로 이전, 또는 랜덤 +$query = "select nation from nation where capital=63 or capital=64 or capital=65 or capital=66 or capital=67 or capital=68 or capital=69"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); + +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + + $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; + $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result2); + + $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +} + +//이벤트2 : 오랑캐궐기 +$name = Array( "강족", "저족", "흉노족", "남만족", "산월족", "오환족", "왜족"); +$cap = Array( 63, 64, 65, 66, 67, 68, 69); + +$query = "select no from general where npc<5"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$eachCount = MYDB_num_rows($result); +$eachCount = round($eachCount / 7) * 2; + +$query = "select avg(tech) as tch from nation where level>0"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$info = MYDB_fetch_array($result); + +for($i=0; $i < 7; $i++) { + RegNation($connect, $name[$i], "800000", 99999, 99999, "오랑캐여 일어서라! 오랑캐 궐기!", $info[tch]+500, $eachCount, "병가", 0); +} + +//////////////////////////외교////////////////////////////////////////////////// +$query = "update game set isUnited=1"; +MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + +//-------------------------------------------------------------------- +for($i=0; $i < 7; $i++) { + $query = "select nation from nation where name='{$name[$i]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $nationNum[$i] = $nation[nation]; + + $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + //태수,군사,시중 해제 + $query = "select gen1,gen2,gen3 from city where city='{$cap[$i]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + //태수 해제 + $query = "update general set level=1 where no='{$city[gen1]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + //군사 해제 + $query = "update general set level=1 where no='{$city[gen2]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + //시중 해제 + $query = "update general set level=1 where no='{$city[gen3]}'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + + $query = "select nation,level from nation where nation!='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($k=0; $k < $count; $k++) { + $your = MYDB_fetch_array($result); + if($your[level] > 0) { + $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } +} + +for($i=0; $i < 7; $i++) { + $query = "update nation set level=1 where nation='$nationNum[$i]'"; + MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +} +//-------------------------------------------------------------------- + +//////////////////////////장수////////////////////////////////////////////////// +// 이름 통 무 지 꿈 특기 +$gencount = 2001; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +for($k=1; $k <= $eachCount; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +//////////////////////////장수 끝/////////////////////////////////////////////// + +// 전장수 금쌀 999999 +$query = "update general set gold=999999,rice=999999"; +MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 오랑캐들이 궐기합니다!"; +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓞ".$name; + $genid = "npc{$gencount}"; + $turntime = getRandTurn2($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%94 + 1; + $age = 15; + $specage = $age; + $specage2 = $age; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 5; + $npcmatch = 999; + $picture = 'default.jpg'; + $crew = $leader * 100; + $crewtype = rand() % 3; + $dex0 = 0; + $dex10 = 0; + $dex20 = 0; + $dex30 = 0; + $dex40 = 0; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos,tnmt, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$leader','$power','$intel','$experience','$dedication', + '$level','99999','99999','$crew','$crewtype','100','100','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0', + '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> + diff --git a/twe_close/event_3.php b/twe_close/event_3.php new file mode 100644 index 00000000..48fd3d51 --- /dev/null +++ b/twe_close/event_3.php @@ -0,0 +1,118 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select year,month,turnterm,isUnited from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +if($admin[isUnited] == 0) { + $query = "select no from general where npc<2 and age>50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + CheckHall($connect, $general[no]); + } +} + +//이벤트3 : NPC추가 +//////////////////////////장수////////////////////////////////////////////////// +// 이름 통 무 지 꿈 특기 +$gencount = 2001; +for($k=1; $k <= 200; $k++) { + if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } + else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } + RegGeneral3($connect,$admin[turnterm],$gencount, 0, 0, "무명장{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; +} + +//////////////////////////장수 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지에서 인재들이 등장합니다!"; +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓝ".$name; + $genid = "npc{$gencount}"; + $turntime = getRandTurn($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%94 + 1; + $age = 15; + $specage = $age; + $specage2 = $age; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 2; + $npcmatch = rand() % 150 + 1; + $picture = 'default.jpg'; + $crew = 0; + $crewtype = rand() % 3; + $dex0 = rand() % 18000; + $dex10 = rand() % 18000; + $dex20 = rand() % 18000; + $dex30 = rand() % 18000; + $dex40 = rand() % 18000; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos,tnmt, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$leader','$power','$intel','$experience','$dedication', + '$level','1000','1000','$crew','$crewtype','100','100','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0', + '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> + diff --git a/twe_close/event_4.php b/twe_close/event_4.php new file mode 100644 index 00000000..9d3b1c10 --- /dev/null +++ b/twe_close/event_4.php @@ -0,0 +1,147 @@ + + +관리메뉴 + + + + +관리자가 아닙니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +//중복체크 +$query = "select no from general where user_id='jwh1807'"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$general = MYDB_fetch_array($result); + +if($general[no] > 0) { + echo " + + +관리메뉴 + + + + +이미 있습니다.
+"; + banner(); + echo " + +"; + + exit(); +} + +$query = "select year,month,turnterm,isUnited from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$query = "select round(avg(specage)) as specage,round(avg(specage2)) as specage2 from general where npc<2"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$general = MYDB_fetch_array($result); + +//이벤트4 : 유기체 추가 +//////////////////////////장수////////////////////////////////////////////////// +// 이름 통 무 지 꿈 특기 +$gencount = 2000; + +$personal = rand()%10; +$personal = getGenChar($personal); + +$leader = 65 + rand()%11; +if(rand()%2 == 0) { + $intel = 10 + rand()%6; + $power = 150 - $leader - $intel; +} else { + $power= 10 + rand()%6; + $intel = 150 - $leader - $power; +} + +RegGeneral4($connect,$admin[turnterm],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general[specage], $general[specage2], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; + +//////////////////////////장수 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$log[0] = "●{$admin[month]}월:ⓝ유기체가 천하에 이름을 알립니다."; +pushAllLog($log); + +$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral4($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$specage,$specage2,$msg="") { + $name = "ⓝ".$name; + $genid = "jwh1807"; + $turntime = getRandTurn($turnterm); + $personal = CharCall($personal); + $city = rand()%94 + 1; + $age = 20; + + //전특 + $special2 = 0; + //내특 + $special = 0; + + $killturn = 720; + $experience = 0; + $dedication = 0; + $npc = 3; + $npcmatch = rand() % 150 + 1; + $picture = 'pic_3.jpg'; + $crew = 0; + $crewtype = rand() % 3; + $dex0 = 0; + $dex10 = 0; + $dex20 = 0; + $dex30 = 0; + $dex40 = 0; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$leader','$power','$intel','$experience','$dedication', + '$level','1000','1000','$crew','$crewtype','100','100', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0', + '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> + diff --git a/twe_close/func.php b/twe_close/func.php new file mode 100644 index 00000000..31577742 --- /dev/null +++ b/twe_close/func.php @@ -0,0 +1,7419 @@ + $leader, 'power' => $power, 'intel' => $intel); +} + +// 14 ~ 75 +function abilityLeadpow() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 6.0; + $power = (rand()%100 + 1) / 100.0 + 6.0; + $intel = (rand()%100 + 1) / 100.0 + 1.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +function abilityLeadint() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 6.0; + $power = (rand()%100 + 1) / 100.0 + 1.0; + $intel = (rand()%100 + 1) / 100.0 + 6.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +function abilityPowint() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 1.0; + $power = (rand()%100 + 1) / 100.0 + 6.0; + $intel = (rand()%100 + 1) / 100.0 + 6.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +function delInDir($dir) { + $handle = opendir($dir); + while(false !== ($FolderOrFile = readdir($handle))) { + if($FolderOrFile != "." && $FolderOrFile != "..") { + if(is_dir("$dir/$FolderOrFile")) { + deldir("$dir/$FolderOrFile"); + } // recursive + else { + unlink("$dir/$FolderOrFile"); + } + } + } + closedir($handle); +// if(rmdir($dir)) { +// $success = true; +// } + return $success; +} + +function GetImageURL($imgsvr) { + global $image, $image1; + if($imgsvr == 0) { + return $image; + } else { + return $image1; + } +} + +function CheckLogin($type=0) { + if($_SESSION[p_id] == "") { + if($type == 0) { echo ""; } + else { echo ""; } + exit(); + } +} + +function checkLimit($userlevel, $con, $conlimit) { + //운영자 + if($userlevel >= 5) { return 0; } + //특회이면 3배 + if($userlevel >= 3) { $conlimit *= 3; } + //접속률 이상이면 제한 + if($con > $conlimit) { + return 2; + //접속제한 90%이면 경고문구 + } elseif($con > $conlimit * 0.9) { + return 1; + } else { + return 0; + } +} + +function bar($per, $skin=1, $h=7) { + global $images; + if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } + else { $bd = 1; $h = 12; $h2 = 8; } + + $per = round($per, 1); + if($per < 1 || $per > 99) { $per = round($per); } + $str1 = " "; + $str2 = " "; + if($per <= 0) { $str1 = ""; } + elseif($per >= 100) { $str2 = ""; } + if($skin == 0) { + $str = "-"; + } else { + $str = " + + {$str1}{$str2} +
"; + } + return $str; +} + +function printLimitMsg($turntime) { + echo " + + +접속제한 + + +"; +require('analytics.php'); +echo " + + + +접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$turntime})
+(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)
+
+ + +"; +} +// (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
+ +function getScenario($connect) { + $query = "select scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + switch($admin[scenario]) { + case 0: $str = "공백지모드"; break; + case 1: $str = "역사모드1 : 184년 황건적의 난"; break; + case 2: $str = "역사모드2 : 190년 반동탁연합"; break; + case 3: $str = "역사모드3 : 194년 군웅할거"; break; + case 4: $str = "역사모드4 : 196년 황제는 허도로"; break; + case 5: $str = "역사모드5 : 200년 관도대전"; break; + case 6: $str = "역사모드6 : 202년 원가의 분열"; break; + case 7: $str = "역사모드7 : 207년 적벽대전"; break; + case 8: $str = "역사모드8 : 213년 익주 공방전"; break; + case 9: $str = "역사모드9 : 219년 삼국정립"; break; + case 10: $str = "역사모드10 : 225년 칠종칠금"; break; + case 11: $str = "역사모드11 : 228년 출사표"; break; + + case 12: $str = "IF모드1 : 191년 백마장군의 위세"; break; + + case 20: $str = "가상모드1 : 180년 영웅 난무"; break; + case 21: $str = "가상모드1 : 180년 영웅 집결"; break; + case 22: $str = "가상모드2 : 179년 훼신 집결"; break; + case 23: $str = "가상모드3 : 180년 영웅 시대"; break; + case 24: $str = "가상모드4 : 180년 결사항전"; break; + case 25: $str = "가상모드5 : 180년 영웅독존"; break; + case 26: $str = "가상모드6 : 180년 무풍지대"; break; + case 27: $str = "가상모드7 : 180년 가요대잔치"; break; + case 28: $str = "가상모드8 : 180년 확산성 밀리언 아서"; break; + default: $str = "시나리오?"; break; + } + return $str; +} + +function CheckBlock($connect) { + $query = "select block from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + return $me[block]; +} + +function NationCharCall($call) { + switch($call) { + case "명가": $type =13; break; + case "음양가": $type =12; break; + case "종횡가": $type =11; break; + case "불가": $type =10; break; + case "도적": $type = 9; break; + case "오두미도":$type = 8; break; + case "태평도": $type = 7; break; + case "도가": $type = 6; break; + case "묵가": $type = 5; break; + case "덕가": $type = 4; break; + case "병가": $type = 3; break; + case "유가": $type = 2; break; + case "법가": $type = 1; break; + default: $type = 0; break; + } + return $type; +} + +function getRandGenName() { + $first = array('가', '간', '감', '강', '고', '공', '공손', '곽', '관', '괴', '교', '금', '노', '뇌', '능', '도', '동', '두', + '등', '마', '맹', '문', '미', '반', '방', '부', '비', '사', '사마', '서', '설', '성', '소', '손', '송', '순', '신', '심', + '악', '안', '양', '엄', '여', '염', '오', '왕', '요', '우', '원', '위', '유', '육', '윤', '이', '장', '저', '전', '정', + '제갈', '조', '종', '주', '진', '채', '태사', '하', '하후', '학', '한', '향', '허', '호', '화', '황', + '공손', '손', '왕', '유', '장', '조'); + $last = array('가', '간', '강', '거', '건', '검', '견', '경', '공', '광', '권', '규', '녕', '단', '대', '도', '등', '람', + '량', '례', '로', '료', '모', '민', '박', '범', '보', '비', '사', '상', '색', '서', '소', '속', '송', '수', '순', '습', + '승', '양', '연', '영', '온', '옹', '완', '우', '웅', '월', '위', '유', '윤', '융', '이', '익', '임', '정', '제', '조', + '주', '준', '지', '찬', '책', '충', '탁', '택', '통', '패', '평', '포', '합', '해', '혁', '현', '화', '환', '회', '횡', + '후', '훈', '휴', '흠', '흥'); + + $firstname = $first[rand()%count($first)]; + $lastname = $last[rand()%count($last)]; + + $fullname = "{$firstname}{$lastname}"; + return $fullname; +} + +function CityNameArray() { + $cityNames = array( + "","업","허창","낙양","장안","성도","양양","건업","북평","남피","완","수춘","서주","강릉","장사", + "시상","위례","계","복양","진류","여남","하비","서량","하내","한중","상용","덕양","강주","건녕", + "남해","계양","오","평양","사비","계림","진양","평원","북해","초","패","천수","안정","홍농", + "하변","자동","영안","귀양","주시","운남","남영","교지","신야","강하","무릉","영릉","상동","여강", + "회계","고창","대","안평","졸본","이도","강","저","흉노","남만","산월","오환","왜","호관", + "호로","사곡","함곡","사수","양평","가맹","역경","계교","동황","관도","정도","합비","광릉","적도", + "가정","기산","면죽","이릉","장판","백랑","적벽","파양","탐라","유구" + ); + return $cityNames; +} + +function CityCall($call) { + switch($call) { + case "업": $type = 1; break; case "허창": $type = 2; break; + case "낙양": $type = 3; break; case "장안": $type = 4; break; + case "성도": $type = 5; break; case "양양": $type = 6; break; + case "건업": $type = 7; break; case "북평": $type = 8; break; + case "남피": $type = 9; break; case "완": $type = 10; break; + case "수춘": $type = 11; break; case "서주": $type = 12; break; + case "강릉": $type = 13; break; case "장사": $type = 14; break; + case "시상": $type = 15; break; case "위례": $type = 16; break; + case "계": $type = 17; break; case "복양": $type = 18; break; + case "진류": $type = 19; break; case "여남": $type = 20; break; + case "하비": $type = 21; break; case "서량": $type = 22; break; + case "하내": $type = 23; break; case "한중": $type = 24; break; + case "상용": $type = 25; break; case "덕양": $type = 26; break; + case "강주": $type = 27; break; case "건녕": $type = 28; break; + case "남해": $type = 29; break; case "계양": $type = 30; break; + case "오": $type = 31; break; case "평양": $type = 32; break; + case "사비": $type = 33; break; case "계림": $type = 34; break; + case "진양": $type = 35; break; case "평원": $type = 36; break; + case "북해": $type = 37; break; case "초": $type = 38; break; + case "패": $type = 39; break; case "천수": $type = 40; break; + case "안정": $type = 41; break; case "홍농": $type = 42; break; + case "하변": $type = 43; break; case "자동": $type = 44; break; + case "영안": $type = 45; break; case "귀양": $type = 46; break; + case "주시": $type = 47; break; case "운남": $type = 48; break; + case "남영": $type = 49; break; case "교지": $type = 50; break; + case "신야": $type = 51; break; case "강하": $type = 52; break; + case "무릉": $type = 53; break; case "영릉": $type = 54; break; + case "상동": $type = 55; break; case "여강": $type = 56; break; + case "회계": $type = 57; break; case "고창": $type = 58; break; + case "대": $type = 59; break; case "안평": $type = 60; break; + case "졸본": $type = 61; break; case "이도": $type = 62; break; + case "강": $type = 63; break; case "저": $type = 64; break; + case "흉노": $type = 65; break; case "남만": $type = 66; break; + case "산월": $type = 67; break; case "오환": $type = 68; break; + case "왜": $type = 69; break; case "호관": $type = 70; break; + case "호로": $type = 71; break; case "사곡": $type = 72; break; + case "함곡": $type = 73; break; case "사수": $type = 74; break; + case "양평": $type = 75; break; case "가맹": $type = 76; break; + case "역경": $type = 77; break; case "계교": $type = 78; break; + case "동황": $type = 79; break; case "관도": $type = 80; break; + case "정도": $type = 81; break; case "합비": $type = 82; break; + case "광릉": $type = 83; break; case "적도": $type = 84; break; + case "가정": $type = 85; break; case "기산": $type = 86; break; + case "면죽": $type = 87; break; case "이릉": $type = 88; break; + case "장판": $type = 89; break; case "백랑": $type = 90; break; + case "적벽": $type = 91; break; case "파양": $type = 92; break; + case "탐라": $type = 93; break; case "유구": $type = 94; break; + } + return $type; +} + +function CityNum($num) { + switch($num) { + case 1: $call = "업" ; break; case 2: $call = "허창"; break; + case 3: $call = "낙양"; break; case 4: $call = "장안"; break; + case 5: $call = "성도"; break; case 6: $call = "양양"; break; + case 7: $call = "건업"; break; case 8: $call = "북평"; break; + case 9: $call = "남피"; break; case 10: $call = "완" ; break; + case 11: $call = "수춘"; break; case 12: $call = "서주"; break; + case 13: $call = "강릉"; break; case 14: $call = "장사"; break; + case 15: $call = "시상"; break; case 16: $call = "위례"; break; + case 17: $call = "계" ; break; case 18: $call = "복양"; break; + case 19: $call = "진류"; break; case 20: $call = "여남"; break; + case 21: $call = "하비"; break; case 22: $call = "서량"; break; + case 23: $call = "하내"; break; case 24: $call = "한중"; break; + case 25: $call = "상용"; break; case 26: $call = "덕양"; break; + case 27: $call = "강주"; break; case 28: $call = "건녕"; break; + case 29: $call = "남해"; break; case 30: $call = "계양"; break; + case 31: $call = "오" ; break; case 32: $call = "평양"; break; + case 33: $call = "사비"; break; case 34: $call = "계림"; break; + case 35: $call = "진양"; break; case 36: $call = "평원"; break; + case 37: $call = "북해"; break; case 38: $call = "초" ; break; + case 39: $call = "패" ; break; case 40: $call = "천수"; break; + case 41: $call = "안정"; break; case 42: $call = "홍농"; break; + case 43: $call = "하변"; break; case 44: $call = "자동"; break; + case 45: $call = "영안"; break; case 46: $call = "귀양"; break; + case 47: $call = "주시"; break; case 48: $call = "운남"; break; + case 49: $call = "남영"; break; case 50: $call = "교지"; break; + case 51: $call = "신야"; break; case 52: $call = "강하"; break; + case 53: $call = "무릉"; break; case 54: $call = "영릉"; break; + case 55: $call = "상동"; break; case 56: $call = "여강"; break; + case 57: $call = "회계"; break; case 58: $call = "고창"; break; + case 59: $call = "대" ; break; case 60: $call = "안평"; break; + case 61: $call = "졸본"; break; case 62: $call = "이도"; break; + case 63: $call = "강" ; break; case 64: $call = "저" ; break; + case 65: $call = "흉노"; break; case 66: $call = "남만"; break; + case 67: $call = "산월"; break; case 68: $call = "오환"; break; + case 69: $call = "왜" ; break; case 70: $call = "호관"; break; + case 71: $call = "호로"; break; case 72: $call = "사곡"; break; + case 73: $call = "함곡"; break; case 74: $call = "사수"; break; + case 75: $call = "양평"; break; case 76: $call = "가맹"; break; + case 77: $call = "역경"; break; case 78: $call = "계교"; break; + case 79: $call = "동황"; break; case 80: $call = "관도"; break; + case 81: $call = "정도"; break; case 82: $call = "합비"; break; + case 83: $call = "광릉"; break; case 84: $call = "적도"; break; + case 85: $call = "가정"; break; case 86: $call = "기산"; break; + case 87: $call = "면죽"; break; case 88: $call = "이릉"; break; + case 89: $call = "장판"; break; case 90: $call = "백랑"; break; + case 91: $call = "적벽"; break; case 92: $call = "파양"; break; + case 93: $call = "탐라"; break; case 94: $call = "유구"; break; + } + return $call; +} + +function CharCall($call) { + switch($call) { + case "은둔": $type =10; break; + case "안전"; $type = 9; break; + case "유지"; $type = 8; break; + case "재간"; $type = 7; break; + case "출세"; $type = 6; break; + case "할거"; $type = 5; break; + case "정복"; $type = 4; break; + case "패권"; $type = 3; break; + case "의협"; $type = 2; break; + case "대의"; $type = 1; break; + case "왕좌"; $type = 0; break; + } + return $type; +} + +function SpecCall($call) { + switch($call) { + case "-": $type = 0; break; + case "경작": $type = 1; break; + case "상재": $type = 2; break; + case "발명": $type = 3; break; + + case "축성": $type = 10; break; + case "수비": $type = 11; break; + case "통찰": $type = 12; break; + + case "인덕": $type = 20; break; + + case "거상": $type = 30; break; + case "귀모": $type = 31; break; + + case "귀병": $type = 40; break; + case "신산": $type = 41; break; + case "환술": $type = 42; break; + case "집중": $type = 43; break; + case "신중": $type = 44; break; + case "반계": $type = 45; break; + + case "보병": $type = 50; break; + case "궁병": $type = 51; break; + case "기병": $type = 52; break; + case "공성": $type = 53; break; + + case "돌격": $type = 60; break; + case "무쌍": $type = 61; break; + case "견고": $type = 62; break; + case "위압": $type = 63; break; + + case "저격": $type = 70; break; + case "필살": $type = 71; break; + case "징병": $type = 72; break; + case "의술": $type = 73; break; + case "격노": $type = 74; break; + case "척사": $type = 75; break; + } + return $type; +} + +// 0 1 2 3 4 5 6 7 +// 0 -, 경작, 상재, 발명 = 3 지력내정 +// 10 축성, 수비, 통찰 = 3 무력내정 +// 20 인덕 = 1 통솔내정 +// 30 거상, 귀모 = 2 공통내정 + +function getSpecial($connect, $leader, $power, $intel) { + //통장 + if($leader*0.9 > $power && $leader*0.9 > $intel) { + $type = array(20, 30, 31); + $special = $type[rand()%3]; + // 거상, 귀모는 33% * 6% = 2% + if(($special == 30 || $special == 31) && rand()%100 > 6) { + $type = array(20, 20); + $special = $type[rand()%2]; + } + //무장 + } elseif($power >= $intel) { + $type = array(10, 11, 12, 30, 31); + $special = $type[rand()%5]; + // 거상, 귀모는 그중에 20% * 10% = 2% + if(($special == 30 || $special == 31) && rand()%100 > 10) { + $type = array(10, 11, 12); + $special = $type[rand()%3]; + } + //지장 + } elseif($intel > $power) { + $type = array(1, 2, 3, 30, 31); + $special = $type[rand()%5]; + // 거상, 귀모는 그중에 20% * 10% = 2% + if(($special == 30 || $special == 31) && rand()%100 > 10) { + $type = array(1, 2, 3); + $special = $type[rand()%3]; + } + } else { + $type = array(30, 31); + $special = $type[rand()%2]; + } + return $special; +} + +// 0 1 2 3 4 5 6 7 +// 40 귀병, 신산, 환술, 집중, 신중, 반계 = 6 지력전투 +// 50 보병, 궁병, 기병, 공성 = 4 무력전투 +// 60 돌격, 무쌍, 견고, 위압 = 4 무장전투 +// 70 저격, 필살, 징병, 의술, 격노, 척사 = 6 공통전투 + +function getSpecial2($connect, $leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex20=0, $dex30=0, $dex40=0) { + $special2 = 70; + // 숙련 10,000: 25%, 40,000: 50%, 100,000: 79%, 160,000: 100% + $dex = sqrt($dex0 + $dex10 + $dex20 + $dex30 + $dex40); + $dex = round($dex / 4); + // 숙련 10,000: 75%, 40,000: 50%, 100,000: 21%, 160,000: 0% + // 그중 20%만 + if($nodex == 0 && rand()%100 < 20 && rand()%100 > $dex) { + if(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex0) { + $special2 = 50; + // 숙련이 아얘 없을시 재분배 + if($dex0 <= 0) { + if($power >= $intel) { + $special2 = 50 + rand()%4; + } else { + $special2 = 40; + } + } + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex10) { + $special2 = 51; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex20) { + $special2 = 52; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex30) { + $special2 = 40; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex40) { + $special2 = 53; + } + //무장 + } elseif($power >= $intel) { + $type = array(60, 61, 62, 63, 70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%10]; + // 의술은 그중에 10% * 20% = 2% + if(($special2 == 73) && rand()%100 > 20) { + $type = array(60, 61, 62, 63, 70, 71, 72, 74, 75); + $special2 = $type[rand()%9]; + } + //지장 + } elseif($intel > $power) { + $type = array(41, 42, 43, 44, 45, 70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%11]; + // 환술은 그중에 9% * 50% = 4.5% + if(($special2 == 42) && rand()%100 > 50) { + $type = array(41, 43, 44, 45, 70, 71, 72, 74, 75); + $special2 = $type[rand()%9]; + } + // 의술은 그중에 9% * 20% = 1.8% + if(($special2 == 73) && rand()%100 > 20) { + $type = array(41, 42, 43, 44, 45, 70, 71, 72, 74, 75); + $special2 = $type[rand()%10]; + } + } else { + $type = array(70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%6]; + } + return $special2; +} + +function getConnect($con) { + if($con < 50) $conname = "안함"; + elseif($con < 100) $conname = "무관심"; + elseif($con < 200) $conname = "가끔"; + elseif($con < 400) $conname = "보통"; + elseif($con < 800) $conname = "자주"; + elseif($con < 1600) $conname = "열심"; + elseif($con < 3200) $conname = "중독"; + elseif($con < 6400) $conname = "폐인"; + elseif($con < 12800) $conname = "경고"; + else $conname = "헐..."; + + return $conname; +} + +function getCityLevel($level) { + switch($level) { + case 8: $call = "특"; break; + case 7: $call = "대"; break; + case 6: $call = "중"; break; + case 5: $call = "소"; break; + case 4: $call = "이"; break; + case 3: $call = "관"; break; + case 2: $call = "진"; break; + case 1: $call = "수"; break; + default:$call = "?"; break; + } + return $call; +} + +function getRegion($region) { + switch($region) { + case 8: $call = "동이"; break; + case 7: $call = "오월"; break; + case 6: $call = "초"; break; + case 5: $call = "남중"; break; + case 4: $call = "서촉"; break; + case 3: $call = "서북"; break; + case 2: $call = "중원"; break; + case 1: $call = "하북"; break; + default:$call = "?"; break; + } + return $call; +} + +function getNationChiefLevel($level) { + switch($level) { + case 7: $lv = 5; break; + case 6: $lv = 5; break; + case 5: $lv = 7; break; + case 4: $lv = 7; break; + case 3: $lv = 9; break; + case 2: $lv = 9; break; + case 1: $lv = 11; break; + case 0: $lv = 11; break; + } + return $lv; +} + +function getNationLevel($level) { + switch($level) { + case 7: $call = "황제"; break; + case 6: $call = "왕"; break; + case 5: $call = "공"; break; + case 4: $call = "주목"; break; + case 3: $call = "주자사"; break; + case 2: $call = "군벌"; break; + case 1: $call = "호족"; break; + case 0: $call = "방랑군"; break; + } + return $call; +} + +function getGenChar($type) { + switch($type) { + case 10: $call = "은둔"; break; + case 9: $call = "안전"; break; + case 8: $call = "유지"; break; + case 7: $call = "재간"; break; + case 6: $call = "출세"; break; + case 5: $call = "할거"; break; + case 4: $call = "정복"; break; + case 3: $call = "패권"; break; + case 2: $call = "의협"; break; + case 1: $call = "대의"; break; + case 0: $call = "왕좌"; break; + } + return $call; +} + +function getGenSpecial($type) { + switch($type) { + case 0: $call = "-"; break; + case 1: $call = "경작"; break; + case 2: $call = "상재"; break; + case 3: $call = "발명"; break; + + case 10: $call = "축성"; break; + case 11: $call = "수비"; break; + case 12: $call = "통찰"; break; + + case 20: $call = "인덕"; break; + + case 30: $call = "거상"; break; + case 31: $call = "귀모"; break; + + case 40: $call = "귀병"; break; + case 41: $call = "신산"; break; + case 42: $call = "환술"; break; + case 43: $call = "집중"; break; + case 44: $call = "신중"; break; + case 45: $call = "반계"; break; + + case 50: $call = "보병"; break; + case 51: $call = "궁병"; break; + case 52: $call = "기병"; break; + case 53: $call = "공성"; break; + + case 60: $call = "돌격"; break; + case 61: $call = "무쌍"; break; + case 62: $call = "견고"; break; + case 63: $call = "위압"; break; + + case 70: $call = "저격"; break; + case 71: $call = "필살"; break; + case 72: $call = "징병"; break; + case 73: $call = "의술"; break; + case 74: $call = "격노"; break; + case 75: $call = "척사"; break; + } + return $call; +} + +function getNationType($type) { + switch($type) { + case 13: $call = "명 가"; break; + case 12: $call = "음 양 가"; break; + case 11: $call = "종 횡 가"; break; + case 10: $call = "불 가"; break; + case 9: $call = "도 적"; break; + case 8: $call = "오 두 미 도"; break; + case 7: $call = "태 평 도"; break; + case 6: $call = "도 가"; break; + case 5: $call = "묵 가"; break; + case 4: $call = "덕 가"; break; + case 3: $call = "병 가"; break; + case 2: $call = "유 가"; break; + case 1: $call = "법 가"; break; + case 0: $call = "-"; break; + } + return $call; +} + +function getNationType2($type, $skin) { + switch($type) { + case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; + case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; + case 11: $call = "전략↑ 수성↑ 금수입↓ 내정↓"; break; + case 10: $call = "민심↑ 수성↑ 금수입↓"; break; + case 9: $call = "계략↑ 금수입↓ 치안↓ 민심↓"; break; + case 8: $call = "쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓"; break; + case 7: $call = "인구↑ 민심↑ 기술↓ 수성↓"; break; + case 6: $call = "인구↑ 기술↓ 치안↓"; break; + case 5: $call = "수성↑ 기술↓"; break; + case 4: $call = "치안↑인구↑ 민심↑ 쌀수입↓ 수성↓"; break; + case 3: $call = "기술↑ 수성↑ 인구↓ 민심↓"; break; + case 2: $call = "내정↑ 민심↑ 쌀수입↓"; break; + case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; + case 0: $call = "-"; break; + } + if($skin == 0) { + $call = str_replace("","", $call); + $call = str_replace("","", $call); + $call = str_replace("","", $call); + } + return $call; +} + +function getLevel($level, $nlevel=8) { + if($level >= 0 && $level <= 4) { $nlevel = 0; } + $code = $nlevel * 100 + $level; + switch($code) { + case 812: $call = "군주"; break; + case 811: $call = "참모"; break; + case 810: $call = "제1장군"; break; + case 809: $call = "제1모사"; break; + case 808: $call = "제2장군"; break; + case 807: $call = "제2모사"; break; + case 806: $call = "제3장군"; break; + case 805: $call = "제3모사"; break; + + case 712: $call = "황제"; break; case 612: $call = "왕"; break; + case 711: $call = "승상"; break; case 611: $call = "광록훈"; break; + case 710: $call = "위장군"; break; case 610: $call = "전장군"; break; + case 709: $call = "사공"; break; case 609: $call = "상서령"; break; + case 708: $call = "표기장군"; break; case 608: $call = "좌장군"; break; + case 707: $call = "태위"; break; case 607: $call = "중서령"; break; + case 706: $call = "거기장군"; break; case 606: $call = "우장군"; break; + case 705: $call = "사도"; break; case 605: $call = "비서령"; break; + + case 512: $call = "공"; break; case 412: $call = "주목"; break; + case 511: $call = "광록대부"; break; case 411: $call = "태사령"; break; + case 510: $call = "안국장군"; break; case 410: $call = "아문장군"; break; + case 509: $call = "집금오"; break; case 409: $call = "낭중"; break; + case 508: $call = "파로장군"; break; case 408: $call = "호군"; break; + case 507: $call = "소부"; break; case 407: $call = "종사중랑"; break; + + case 312: $call = "주자사"; break; case 212: $call = "군벌"; break; + case 311: $call = "주부"; break; case 211: $call = "참모"; break; + case 310: $call = "편장군"; break; case 210: $call = "비장군"; break; + case 309: $call = "간의대부"; break; case 209: $call = "부참모"; break; + + case 112: $call = "영주"; break; case 12: $call = "두목"; break; + case 111: $call = "참모"; break; case 11: $call = "부두목"; break; + + case 4: $call = "태수"; break; + case 3: $call = "군사"; break; + case 2: $call = "시중"; break; + case 1: $call = "일반"; break; + case 0: $call = "재야"; break; + default: $call = "-"; break; + } + return $call; +} + +function getCall($leader, $power, $intel) { + global $_goodgenleader, $_goodgenpower, $_goodgenintel; + + $call = "평범"; + if($leader >= $_goodgenleader && $power >= $_goodgenpower && $intel >= $_goodgenintel) { + $call = "만능"; + } elseif($leader >= $_goodgenleader && $power >= $_goodgenpower) { + $call = "용장"; + } elseif($leader >= $_goodgenleader && $intel >= $_goodgenintel) { + $call = "지장"; + } elseif($power >= $_goodgenpower && $intel >= $_goodgenintel) { + $call = "명장"; + } elseif($leader >= $_goodgenleader) { + $call = "명사"; + } elseif($power >= $_goodgenpower) { + $call = "용맹"; + } elseif($intel >= $_goodgenintel) { + $call = "현명"; + } + return $call; +} + +function getDed($dedication) { + if($dedication < 1 ) $level2 = "무품관"; + elseif($dedication < 10*10) $level2 = "30품관"; + elseif($dedication < 20*20) $level2 = "29품관"; + elseif($dedication < 30*30) $level2 = "28품관"; + elseif($dedication < 40*40) $level2 = "27품관"; + elseif($dedication < 50*50) $level2 = "26품관"; + elseif($dedication < 60*60) $level2 = "25품관"; + elseif($dedication < 70*70) $level2 = "24품관"; + elseif($dedication < 80*80) $level2 = "23품관"; + elseif($dedication < 90*90) $level2 = "22품관"; + elseif($dedication < 100*100) $level2 = "21품관"; + elseif($dedication < 110*110) $level2 = "20품관"; + elseif($dedication < 120*120) $level2 = "19품관"; + elseif($dedication < 130*130) $level2 = "18품관"; + elseif($dedication < 140*140) $level2 = "17품관"; + elseif($dedication < 150*150) $level2 = "16품관"; + elseif($dedication < 160*160) $level2 = "15품관"; + elseif($dedication < 170*170) $level2 = "14품관"; + elseif($dedication < 180*180) $level2 = "13품관"; + elseif($dedication < 190*190) $level2 = "12품관"; + elseif($dedication < 200*200) $level2 = "11품관"; // 40000 + elseif($dedication < 210*210) $level2 = "10품관"; // 44100 + elseif($dedication < 220*220) $level2 = "9품관"; // 48400 + elseif($dedication < 230*230) $level2 = "8품관"; // 52900 + elseif($dedication < 240*240) $level2 = "7품관"; // 57600 + elseif($dedication < 250*250) $level2 = "6품관"; // 62500 + elseif($dedication < 260*260) $level2 = "5품관"; // 67600 + elseif($dedication < 270*270) $level2 = "4품관"; // 72900 + elseif($dedication < 280*280) $level2 = "3품관"; // 78400 + elseif($dedication < 290*290) $level2 = "2품관"; // 84100 + else { + $level2 = "1품관"; + } + + return $level2; +} + +function getExpLevel($experience) { + if($experience < 1000) { + $level = floor($experience / 100); + } else { + for($level = 0; $experience > (($level+1)*($level+1)*10); $level++) { + } + } + + return $level; +} + +function getDedLevel($dedication) { + for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { + } + + return $level; +} + +function expStatus($exp) { + global $_upgradeLimit; + return $exp / $_upgradeLimit * 100; +} + +function getLevelPer($exp, $level) { + if($exp < 100) { $per = $exp; } + elseif($exp < 1000) { $per = $exp - ($level)*100; } + else { $per = ($exp - 10*$level*$level) / (2*$level+1) * 10; } + return $per; +} + +function getBill($dedication) { + for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { + } + + return ($level * 200 + 400); +} + +function getHonor($experience) { + if($experience < 640 ) $honor = "전무"; + elseif($experience < 2560) $honor = "무명"; + elseif($experience < 5760) $honor = "신동"; + elseif($experience < 10240) $honor = "약간"; + elseif($experience < 16000) $honor = "평범"; + elseif($experience < 23040) $honor = "지역적"; + elseif($experience < 31360) $honor = "전국적"; + elseif($experience < 40960) $honor = "세계적"; + elseif($experience < 45000) $honor = "유명"; + elseif($experience < 51840) $honor = "명사"; + elseif($experience < 55000) $honor = "호걸"; + elseif($experience < 64000) $honor = "효웅"; + elseif($experience < 77440) $honor = "영웅"; + else $honor = "구세주"; + + return $honor; +} + +function getTypename($type) { + switch($type) { + case 0: $typename = "보병"; break; + case 1: $typename = "청주병"; break; + case 2: $typename = "수병"; break; + case 3: $typename = "자객병"; break; + case 4: $typename = "근위병"; break; + case 5: $typename = "등갑병"; break; + + case 10: $typename = "궁병"; break; + case 11: $typename = "궁기병"; break; + case 12: $typename = "연노병"; break; + case 13: $typename = "강궁병"; break; + case 14: $typename = "석궁병"; break; + + case 20: $typename = "기병"; break; + case 21: $typename = "백마병"; break; + case 22: $typename = "중장기병"; break; + case 23: $typename = "돌격기병"; break; + case 24: $typename = "철기병"; break; + case 25: $typename = "수렵기병"; break; + case 26: $typename = "맹수병"; break; + case 27: $typename = "호표기병"; break; + + case 30: $typename = "귀병"; break; + case 31: $typename = "신귀병"; break; + case 32: $typename = "백귀병"; break; + case 33: $typename = "흑귀병"; break; + case 34: $typename = "악귀병"; break; + case 35: $typename = "남귀병"; break; + case 36: $typename = "황귀병"; break; + case 37: $typename = "천귀병"; break; + case 38: $typename = "마귀병"; break; + + case 40: $typename = "정란"; break; + case 41: $typename = "충차"; break; + case 42: $typename = "벽력거"; break; + case 43: $typename = "목우"; break; + } + return $typename; +} + +function getCost($connect, $armtype) { + $query = "select cst{$armtype} from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + return $admin["cst{$armtype}"]; +} + +function TechLimit($startyear, $year, $tech) { + $limit = 0; + if($year < $startyear+ 5 && $tech >= 1000) { $limit = 1; } + if($year < $startyear+10 && $tech >= 2000) { $limit = 1; } + if($year < $startyear+15 && $tech >= 3000) { $limit = 1; } + if($year < $startyear+20 && $tech >= 4000) { $limit = 1; } + if($year < $startyear+25 && $tech >= 5000) { $limit = 1; } + if($year < $startyear+30 && $tech >= 6000) { $limit = 1; } + if($year < $startyear+35 && $tech >= 7000) { $limit = 1; } + if($year < $startyear+40 && $tech >= 8000) { $limit = 1; } + if($year < $startyear+45 && $tech >= 9000) { $limit = 1; } + if($year < $startyear+50 && $tech >= 10000) { $limit = 1; } + if($year < $startyear+55 && $tech >= 11000) { $limit = 1; } + if($year < $startyear+60 && $tech >= 12000) { $limit = 1; } + return $limit; +} + +function getTechAbil($tech) { + if($tech < 1000) { $abil = 0; } + elseif($tech < 2000) { $abil = 25; } + elseif($tech < 3000) { $abil = 50; } + elseif($tech < 4000) { $abil = 75; } + elseif($tech < 5000) { $abil = 100; } + elseif($tech < 6000) { $abil = 125; } + elseif($tech < 7000) { $abil = 150; } + elseif($tech < 8000) { $abil = 175; } + elseif($tech < 9000) { $abil = 200; } + elseif($tech < 10000) { $abil = 225; } + elseif($tech < 11000) { $abil = 250; } + elseif($tech < 12000) { $abil = 275; } + else { $abil = 300; } + return $abil; +} + +function getTechCost($tech) { + if($tech < 1000) { $cost = 1.00; } + elseif($tech < 2000) { $cost = 1.15; } + elseif($tech < 3000) { $cost = 1.30; } + elseif($tech < 4000) { $cost = 1.45; } + elseif($tech < 5000) { $cost = 1.60; } + elseif($tech < 6000) { $cost = 1.75; } + elseif($tech < 7000) { $cost = 1.90; } + elseif($tech < 8000) { $cost = 2.05; } + elseif($tech < 9000) { $cost = 2.20; } + elseif($tech < 10000) { $cost = 2.35; } + elseif($tech < 11000) { $cost = 2.50; } + elseif($tech < 12000) { $cost = 2.65; } + else { $cost = 2.80; } + return $cost; +} + +function getTechCall($tech) { + if($tech < 1000) { $str = "0등급"; } + elseif($tech < 2000) { $str = "1등급"; } + elseif($tech < 3000) { $str = "2등급"; } + elseif($tech < 4000) { $str = "3등급"; } + elseif($tech < 5000) { $str = "4등급"; } + elseif($tech < 6000) { $str = "5등급"; } + elseif($tech < 7000) { $str = "6등급"; } + elseif($tech < 8000) { $str = "7등급"; } + elseif($tech < 9000) { $str = "8등급"; } + elseif($tech < 10000) { $str = "9등급"; } + elseif($tech < 11000) { $str = "10등급"; } + elseif($tech < 12000) { $str = "11등급"; } + else { $str = "12등급"; } + return $str; +} + +function getDexCall($dex) { + if($dex < 2500) { $str = "F-"; } + elseif($dex < 7500) { $str = "F"; } + elseif($dex < 15000) { $str = "F+"; } + elseif($dex < 25000) { $str = "E-"; } + elseif($dex < 37500) { $str = "E"; } + elseif($dex < 52500) { $str = "E+"; } + elseif($dex < 70000) { $str = "D-"; } + elseif($dex < 90000) { $str = "D"; } + elseif($dex < 112500) { $str = "D+"; } + elseif($dex < 137500) { $str = "C-"; } + elseif($dex < 165000) { $str = "C"; } + elseif($dex < 195000) { $str = "C+"; } + elseif($dex < 227500) { $str = "B-"; } + elseif($dex < 262500) { $str = "B"; } + elseif($dex < 300000) { $str = "B+"; } + elseif($dex < 340000) { $str = "A-"; } + elseif($dex < 382500) { $str = "A"; } + elseif($dex < 427500) { $str = "A+"; } + elseif($dex < 475000) { $str = "S-"; } + elseif($dex < 525000) { $str = "S"; } + elseif($dex < 577500) { $str = "S+"; } + elseif($dex < 632500) { $str = "SS-"; } + elseif($dex < 690000) { $str = "SS"; } + elseif($dex < 750000) { $str = "SS+"; } + elseif($dex < 812500) { $str = "SSS-"; } + elseif($dex < 877500) { $str = "SSS"; } + elseif($dex < 945000) { $str = "SSS+"; } + elseif($dex < 1015000) { $str = "Z-"; } + elseif($dex < 1087500) { $str = "Z"; } + elseif($dex < 1162500) { $str = "Z+"; } + else { $str = "?"; } + return $str; +} + +function getDexLevel($dex) { + if($dex < 2500) { $lvl = 0; } + elseif($dex < 7500) { $lvl = 1; } + elseif($dex < 15000) { $lvl = 2; } + elseif($dex < 25000) { $lvl = 3; } + elseif($dex < 37500) { $lvl = 4; } + elseif($dex < 52500) { $lvl = 5; } + elseif($dex < 70000) { $lvl = 6; } + elseif($dex < 90000) { $lvl = 7; } + elseif($dex < 112500) { $lvl = 8; } + elseif($dex < 137500) { $lvl = 9; } + elseif($dex < 165000) { $lvl = 10; } + elseif($dex < 195000) { $lvl = 11; } + elseif($dex < 227500) { $lvl = 12; } + elseif($dex < 262500) { $lvl = 13; } + elseif($dex < 300000) { $lvl = 14; } + elseif($dex < 340000) { $lvl = 15; } + elseif($dex < 382500) { $lvl = 16; } + elseif($dex < 427500) { $lvl = 17; } + elseif($dex < 475000) { $lvl = 18; } + elseif($dex < 525000) { $lvl = 19; } + elseif($dex < 577500) { $lvl = 20; } + elseif($dex < 632500) { $lvl = 21; } + elseif($dex < 690000) { $lvl = 22; } + elseif($dex < 750000) { $lvl = 23; } + elseif($dex < 812500) { $lvl = 24; } + elseif($dex < 877500) { $lvl = 25; } + elseif($dex < 945000) { $lvl = 26; } + elseif($dex < 1015000) { $lvl = 27; } + elseif($dex < 1087500) { $lvl = 28; } + elseif($dex < 1162500) { $lvl = 29; } + else { $lvl = 30; } + return $lvl; +} + +function getDexLog($dex1, $dex2) { + $ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1; + return $ratio; +} + +function getGenDex($general, $type) { + $type = floor($type / 10) * 10; + return $general["dex{$type}"]; +} + +function addGenDex($connect, $no, $type, $exp) { + $type = floor($type / 10) * 10; + $dexType = "dex{$type}"; + if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율 + elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율 + + $query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function getWeapName($weap) { + switch($weap) { + case 0: $weapname = "-"; break; + case 1: $weapname = "단도(+1)"; break; + case 2: $weapname = "단궁(+2)"; break; + case 3: $weapname = "단극(+3)"; break; + case 4: $weapname = "목검(+4)"; break; + case 5: $weapname = "죽창(+5)"; break; + case 6: $weapname = "소부(+6)"; break; + + case 7: $weapname = "동추(+7)"; break; + case 8: $weapname = "철편(+7)"; break; + case 9: $weapname = "철쇄(+7)"; break; + case 10: $weapname = "맥궁(+7)"; break; + case 11: $weapname = "유성추(+8)"; break; + case 12: $weapname = "철질여골(+8)"; break; + case 13: $weapname = "쌍철극(+9)"; break; + case 14: $weapname = "동호비궁(+9)"; break; + case 15: $weapname = "삼첨도(+10)"; break; + case 16: $weapname = "대부(+10)"; break; + case 17: $weapname = "고정도(+11)"; break; + case 18: $weapname = "이광궁(+11)"; break; + case 19: $weapname = "철척사모(+12)"; break; + case 20: $weapname = "칠성검(+12)"; break; + case 21: $weapname = "사모(+13)"; break; + case 22: $weapname = "양유기궁(+13)"; break; + case 23: $weapname = "언월도(+14)"; break; + case 24: $weapname = "방천화극(+14)"; break; + case 25: $weapname = "청홍검(+15)"; break; + case 26: $weapname = "의천검(+15)"; break; + } + return $weapname; +} + +function getWeapEff($weap) { + switch($weap) { + case 7: $weap = 7; break; + case 8: $weap = 7; break; + case 9: $weap = 7; break; + case 10: $weap = 7; break; + case 11: $weap = 8; break; + case 12: $weap = 8; break; + case 13: $weap = 9; break; + case 14: $weap = 9; break; + case 15: $weap = 10; break; + case 16: $weap = 10; break; + case 17: $weap = 11; break; + case 18: $weap = 11; break; + case 19: $weap = 12; break; + case 20: $weap = 12; break; + case 21: $weap = 13; break; + case 22: $weap = 13; break; + case 23: $weap = 14; break; + case 24: $weap = 14; break; + case 25: $weap = 15; break; + case 26: $weap = 15; break; + default: break; + } + return $weap; +} + +function getBookName($book) { + switch($book) { + case 0: $bookname = "-"; break; + case 1: $bookname = "효경전(+1)"; break; + case 2: $bookname = "회남자(+2)"; break; + case 3: $bookname = "변도론(+3)"; break; + case 4: $bookname = "건상역주(+4)"; break; + case 5: $bookname = "여씨춘추(+5)"; break; + case 6: $bookname = "사민월령(+6)"; break; + + case 7: $bookname = "위료자(+7)"; break; + case 8: $bookname = "사마법(+7)"; break; + case 9: $bookname = "한서(+7)"; break; + case 10: $bookname = "논어(+7)"; break; + case 11: $bookname = "전론(+8)"; break; + case 12: $bookname = "사기(+8)"; break; + case 13: $bookname = "장자(+9)"; break; + case 14: $bookname = "역경(+9)"; break; + case 15: $bookname = "시경(+10)"; break; + case 16: $bookname = "구국론(+10)"; break; + case 17: $bookname = "상군서(+11)"; break; + case 18: $bookname = "춘추전(+11)"; break; + case 19: $bookname = "산해경(+12)"; break; + case 20: $bookname = "맹덕신서(+12)"; break; + case 21: $bookname = "관자(+13)"; break; + case 22: $bookname = "병법24편(+13)"; break; + case 23: $bookname = "한비자(+14)"; break; + case 24: $bookname = "오자병법(+14)"; break; + case 25: $bookname = "노자(+15)"; break; + case 26: $bookname = "손자병법(+15)"; break; + } + return $bookname; +} + +function getBookEff($book) { + switch($book) { + case 7: $book = 7; break; + case 8: $book = 7; break; + case 9: $book = 7; break; + case 10: $book = 7; break; + case 11: $book = 8; break; + case 12: $book = 8; break; + case 13: $book = 9; break; + case 14: $book = 9; break; + case 15: $book = 10; break; + case 16: $book = 10; break; + case 17: $book = 11; break; + case 18: $book = 11; break; + case 19: $book = 12; break; + case 20: $book = 12; break; + case 21: $book = 13; break; + case 22: $book = 13; break; + case 23: $book = 14; break; + case 24: $book = 14; break; + case 25: $book = 15; break; + case 26: $book = 15; break; + default: break; + } + return $book; +} + +function getHorseName($horse) { + switch($horse) { + case 0: $horsename = "-"; break; + case 1: $horsename = "노기(+1)"; break; + case 2: $horsename = "조랑(+2)"; break; + case 3: $horsename = "노새(+3)"; break; + case 4: $horsename = "나귀(+4)"; break; + case 5: $horsename = "갈색마(+5)"; break; + case 6: $horsename = "흑색마(+6)"; break; + + case 7: $horsename = "백마(+7)"; break; + case 8: $horsename = "백마(+7)"; break; + case 9: $horsename = "기주마(+7)"; break; + case 10: $horsename = "기주마(+7)"; break; + case 11: $horsename = "양주마(+8)"; break; + case 12: $horsename = "양주마(+8)"; break; + case 13: $horsename = "과하마(+9)"; break; + case 14: $horsename = "과하마(+9)"; break; + case 15: $horsename = "대완마(+10)"; break; + case 16: $horsename = "대완마(+10)"; break; + case 17: $horsename = "서량마(+11)"; break; + case 18: $horsename = "서량마(+11)"; break; + case 19: $horsename = "사륜거(+12)"; break; + case 20: $horsename = "사륜거(+12)"; break; + case 21: $horsename = "절영(+13)"; break; + case 22: $horsename = "적로(+13)"; break; + case 23: $horsename = "적란마(+14)"; break; + case 24: $horsename = "조황비전(+14)"; break; + case 25: $horsename = "한혈마(+15)"; break; + case 26: $horsename = "적토마(+15)"; break; + } + return $horsename; +} + +function getHorseEff($horse) { + switch($horse) { + case 7: $horse = 7; break; + case 8: $horse = 7; break; + case 9: $horse = 7; break; + case 10: $horse = 7; break; + case 11: $horse = 8; break; + case 12: $horse = 8; break; + case 13: $horse = 9; break; + case 14: $horse = 9; break; + case 15: $horse = 10; break; + case 16: $horse = 10; break; + case 17: $horse = 11; break; + case 18: $horse = 11; break; + case 19: $horse = 12; break; + case 20: $horse = 12; break; + case 21: $horse = 13; break; + case 22: $horse = 13; break; + case 23: $horse = 14; break; + case 24: $horse = 14; break; + case 25: $horse = 15; break; + case 26: $horse = 15; break; + default: break; + } + return $horse; +} + +function getItemName($item) { + switch($item) { + case 0: $itemname = "-"; break; + case 1: $itemname = "환약(치료)"; break; + case 2: $itemname = "수극(저격)"; break; + case 3: $itemname = "탁주(사기)"; break; + case 4: $itemname = "청주(훈련)"; break; + case 5: $itemname = "이추(계략)"; break; + case 6: $itemname = "향낭(계략)"; break; + + case 7: $itemname = "오석산(치료)"; break; + case 8: $itemname = "무후행군(치료)"; break; + case 9: $itemname = "도소연명(치료)"; break; + case 10: $itemname = "칠엽청점(치료)"; break; + case 11: $itemname = "정력견혈(치료)"; break; + case 12: $itemname = "과실주(훈련)"; break; + case 13: $itemname = "이강주(훈련)"; break; + case 14: $itemname = "의적주(사기)"; break; + case 15: $itemname = "두강주(사기)"; break; + case 16: $itemname = "보령압주(사기)"; break; + case 17: $itemname = "철벽서(훈련)"; break; + case 18: $itemname = "단결도(훈련)"; break; + case 19: $itemname = "춘화첩(사기)"; break; + case 20: $itemname = "초선화(사기)"; break; + case 21: $itemname = "육도(계략)"; break; + case 22: $itemname = "삼략(계략)"; break; + case 23: $itemname = "청낭서(의술)"; break; + case 24: $itemname = "태평청령(의술)"; break; + case 25: $itemname = "태평요술(회피)"; break; + case 26: $itemname = "둔갑천서(회피)"; break; + } + return $itemname; +} + +function getItemCost2($weap) { + switch($weap) { + case 0: $weapcost = 0; break; + case 1: $weapcost = 100; break; + case 2: $weapcost = 1000; break; + case 3: $weapcost = 1000; break; + case 4: $weapcost = 1000; break; + case 5: $weapcost = 1000; break; + case 6: $weapcost = 3000; break; + default: $weapcost = 200; break; + } + return $weapcost; +} + +function getItemCost($weap) { + switch($weap) { + case 0: $weapcost = 0; break; + case 1: $weapcost = 1000; break; + case 2: $weapcost = 3000; break; + case 3: $weapcost = 6000; break; + case 4: $weapcost = 10000; break; + case 5: $weapcost = 15000; break; + case 6: $weapcost = 21000; break; + default: $weapcost = 200; break; + } + return $weapcost; +} + +function getTurn($connect, $general, $type, $font=1) { + $turn[0] = $general[turn0]; + + if($type >= 1) { + $turn[1] = $general[turn1]; + $turn[2] = $general[turn2]; + $turn[3] = $general[turn3]; + $turn[4] = $general[turn4]; + $turn[5] = $general[turn5]; + } + if($type >= 2) { + $turn[6] = $general[turn6]; + $turn[7] = $general[turn7]; + $turn[8] = $general[turn8]; + $turn[9] = $general[turn9]; + $turn[10] = $general[turn10]; + $turn[11] = $general[turn11]; + $turn[12] = $general[turn12]; + $turn[13] = $general[turn13]; + $turn[14] = $general[turn14]; + $turn[15] = $general[turn15]; + $turn[16] = $general[turn16]; + $turn[17] = $general[turn17]; + $turn[18] = $general[turn18]; + $turn[19] = $general[turn19]; + $turn[20] = $general[turn20]; + $turn[21] = $general[turn21]; + $turn[22] = $general[turn22]; + $turn[23] = $general[turn23]; + } + + if($type == 0) { $count = 1; } + elseif($type == 1) { $count = 5; } + elseif($type == 2) { $count = 24; } + + for($i=0; $i < $count; $i++) { + $command = DecodeCommand($turn[$i]); + + switch($command[0]) { + case 0: $str[$i] = "휴식"; break; //휴식 + case 1: $str[$i] = "농지 개간"; break; //농업 + case 2: $str[$i] = "상업 투자"; break; //상업 + case 3: $str[$i] = "기술 연구"; break; //기술 + case 4: $str[$i] = "주민 선정"; break; //선정 + case 5: $str[$i] = "수비 강화"; break; //수비 + case 6: $str[$i] = "성벽 보수"; break; //성벽 + case 7: $str[$i] = "정착 장려"; break; //정착 장려 + case 8: $str[$i] = "치안 강화"; break; //치안 + case 9: $str[$i] = "물자 조달"; break; //조달 + + case 11: //징병 + $third = getTypename($command[2]); + $double = $command[1]; + $str[$i] = "【{$third}】 {$double}00명 징병"; + break; + case 12: //모병 + $third = getTypename($command[2]); + $double = $command[1]; + $str[$i] = "【{$third}】 {$double}00명 모병"; + break; + case 13: //훈련 + $str[$i] = "훈련"; + break; + case 14: //사기진작 + $str[$i] = "사기진작"; + break; + case 15: //전투태세 + $str[$i] = "전투태세"; + break; + case 16: //전쟁 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(으)로 출병"; + break; + case 17: //소집해제 + $str[$i] = "소집 해제"; + break; + + case 21: //이동 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(으)로 이동"; + break; + case 22: //등용 + $double = $command[1]; + + $query = "select name from general where no='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $str[$i] = "【{$general[name]}】(을)를 등용"; + break; + case 25: //임관 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if(!$nation[name]) { $nation[name] = '????'; } + + $str[$i] = "【{$nation[name]}】(으)로 임관"; + break; + case 26: //집합 + $str[$i] = "집합"; + break; + case 28: //귀환 + $str[$i] = "담당 도시로 귀환"; + break; + case 29: //인재탐색 + $str[$i] = "인재 탐색"; + break; + case 30: //강행 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(으)로 강행"; + break; + + case 31: //첩보 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 첩보 실행"; + break; + case 32: //화계 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 화계 실행"; + break; + case 33: //탈취 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 탈취 실행"; + break; + case 34: //파괴 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 파괴 실행"; + break; + case 35: //선동 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 선동 실행"; + break; + case 36: //기습 + $double = $command[1]; + $city= getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 기습 실행"; + break; + + case 41: //단련 + $str[$i] = "숙련도를 단련"; + break; + case 42: //견문 + $str[$i] = "견문"; + break; + case 43: //증여 + $fourth = $command[3]; + $third = $command[2]; + $double = $command[1]; + + $query = "select name from general where no='$third'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 증여"; } + else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 증여"; } + break; + case 44: //헌납 + $third = $command[2]; + $double = $command[1]; + + if($third == 1) { $str[$i] = "금 {$double}00을 헌납"; } + else { $str[$i] = "쌀 {$double}00을 헌납"; } + break; + case 45: //하야 + $str[$i] = "하야"; + break; + case 46: //건국 + $query = "select makenation from general where no='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $str[$i] = "【{$general[makenation]}】(을)를 건국"; + break; + case 47: //방랑 + $str[$i] = "방랑"; + break; + case 48: //장비 구입 + $double = $command[1]; + if($double == 0) { + $str[$i] = "무기를 판매"; + } elseif($double == 100) { + $str[$i] = "서적을 판매"; + } elseif($double == 200) { + $str[$i] = "명마를 판매"; + } elseif($double == 300) { + $str[$i] = "도구를 판매"; + } elseif($double < 100) { + $str[$i] = "【".getWeapName($double)."】(을)를 구입"; + } elseif($double < 200) { + $str[$i] = "【".getBookName($double-100)."】(을)를 구입"; + } elseif($double < 300) { + $str[$i] = "【".getHorseName($double-200)."】(을)를 구입"; + } elseif($double < 400) { + $str[$i] = "【".getItemName($double-300)."】(을)를 구입"; + } + break; + case 49: //군량 매매 + $third = $command[2]; + $double = $command[1]; + + if($third == 1) { $str[$i] = "군량 {$double}00을 판매"; } + else { $str[$i] = "군량 {$double}00을 구입"; } + break; + case 50: //요양 + $str[$i] = "요양"; + break; + + case 54: //선양 + $double = $command[1]; + + $query = "select name from general where no='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $str[$i] = "【{$general[name]}】에게 선양"; + break; + case 55: //거병 + $str[$i] = "방랑군 결성"; + break; + case 56: //해산 + $str[$i] = "방랑군 해산"; + break; + case 57: //모반 시도 + $str[$i] = "모반 시도"; + break; + + default: + $str[$i] = "????"; + break; + } + } + + if($font == 1) { + for($i=0; $i < count($str); $i++) { + $str[$i] = getFont($str[$i]); + } + } + return $str; +} + +function getCoreTurn($connect, $nation, $level) { + $turn[0] = $nation["l{$level}turn0"]; + $turn[1] = $nation["l{$level}turn1"]; + $turn[2] = $nation["l{$level}turn2"]; + $turn[3] = $nation["l{$level}turn3"]; + $turn[4] = $nation["l{$level}turn4"]; + $turn[5] = $nation["l{$level}turn5"]; + $turn[6] = $nation["l{$level}turn6"]; + $turn[7] = $nation["l{$level}turn7"]; + $turn[8] = $nation["l{$level}turn8"]; + $turn[9] = $nation["l{$level}turn9"]; + $turn[10] = $nation["l{$level}turn10"]; + $turn[11] = $nation["l{$level}turn11"]; + + $count = 12; + for($i=0; $i < $count; $i++) { + $command = DecodeCommand($turn[$i]); + + switch($command[0]) { + case 99: //휴식 + $str[$i] = "휴식"; + break; + case 23: //포상 + $fourth = $command[3]; + $third = $command[2]; + $double = $command[1]; + + $query = "select name from general where no='$third'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 포상"; } + else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 포상"; } + break; + case 24: //몰수 + $fourth = $command[3]; + $third = $command[2]; + $double = $command[1]; + + $query = "select name from general where no='$third'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($fourth == 1) { $str[$i] = "【{$general[name]}】에게서 금 {$double}00을 몰수"; } + else { $str[$i] = "【{$general[name]}】에게서 쌀 {$double}00을 몰수"; } + break; + case 27: //발령 + $third = $command[2]; + $double = $command[1]; + + $query = "select name from general where no='$third'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $city = getCity($connect, $double, "name"); + + $str[$i] = "【{$general[name]}】【{$city[name]}】(으)로 발령"; + break; + case 51: //항복권고 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에게 항복 권고"; + break; + case 52: //원조 + $fourth = $command[3]; + $third = $command[2]; + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $fourth *= 1000; + $third *= 1000; + $str[$i] = "【{$nation[name]}】에게 국고 {$third} 병량 {$fourth} 원조"; + break; + case 53: //통합제의 + $query = "select makenation from general where level='$level' and nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 【{$general[makenation]}】(으)로 통합 제의"; + break; + case 61: //불가침제의 + $third = $command[2]; + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 {$third}년 불가침 제의"; + break; + case 62: //선전 포고 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 선전 포고"; + break; + case 63: //종전 제의 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 종전 제의"; + break; + case 64: //파기 제의 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 파기 제의"; + break; + case 65: //초토 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(을)를 초토화"; + break; + case 66: //천도 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(으)로 천도"; + break; + case 67: //증축 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(을)를 증축"; + break; + case 68: //감축 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(을)를 감축"; + break; + case 71: //필사즉생 + $str[$i] = "필사즉생"; + break; + case 72: //백성동원 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 백성동원"; + break; + case 73: //수몰 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】(을)를 수몰"; + break; + case 74: //허보 + $double = $command[1]; + $city = getCity($connect, $double, "name"); + $str[$i] = "【{$city[name]}】에 허보"; + break; + case 75: //피장파장 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 피장파장"; + break; + case 76: //의병모집 + $str[$i] = "의병모집"; + break; + case 77: //이호경식 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 이호경식"; + break; + case 78: //급습 + $double = $command[1]; + + $query = "select name from nation where nation='$double'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $str[$i] = "【{$nation[name]}】에 급습"; + break; + case 81: //국기변경 + $double = $command[1]; + $colors = GetNationColors(); + $color = $colors[$double]; + + $str[$i] = "【국기】를 변경"; + break; + default: + $str[$i] = "????"; + break; + } + } + + for($i=0; $i < count($str); $i++) { + $str[$i] = getFont($str[$i]); + } + + return $str; +} + +function turnTable() { + echo " + +"; +} + +function CoreTurnTable() { + echo " + +"; +} + +function cityInfo($connect) { + global $_basecolor, $_basecolor2, $images; + + $query = "select no,city,skin from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + // 도시 정보 + $city = getCity($connect, $me[city]); + + $query = "select name,color from nation where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $pop = $city[pop] / $city[pop2] * 100; + $rate = $city[rate]; + $agri = $city[agri] / $city[agri2] * 100; + $comm = $city[comm] / $city[comm2] * 100; + $secu = $city[secu] / $city[secu2] * 100; + $def = $city[def] / $city[def2] * 100; + $wall = $city[wall] / $city[wall2] * 100; + if($city[trade] == 0) { + $trade = 0; + $tradeStr = "상인없음"; + } else { + $trade = ($city[trade]-95) * 10; + $tradeStr = $city[trade] . "%"; + } + + if($nation[color] == "" || $me[skin] < 1) { $nation[color] = "000000"; } + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name]
"; + + if($city[nation] == 0) { + echo "공 백 지"; + } else { + echo "지배 국가 【 {$nation[name]} 】"; + } + + if($city[gen1] > 0) { + $query = "select name from general where no='$city[gen1]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($result); + } else { + $gen1[name] = '-'; + } + + if($city[gen2] > 0) { + $query = "select name from general where no='$city[gen2]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($result); + } else { + $gen2[name] = '-'; + } + + if($city[gen3] > 0) { + $query = "select name from general where no='$city[gen3]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen3 = MYDB_fetch_array($result); + } else { + $gen3[name] = '-'; + } + + echo " +
주민".bar($pop, $me[skin])."민심".bar($rate, $me[skin])."태수{$gen1[name]}
{$city[pop]}/{$city[pop2]}{$city[rate]}
농업".bar($agri, $me[skin])."상업".bar($comm, $me[skin])."치안".bar($secu, $me[skin])."군사{$gen2[name]}
{$city[agri]}/{$city[agri2]}{$city[comm]}/{$city[comm2]}{$city[secu]}/{$city[secu2]}
수비".bar($def, $me[skin])."성벽".bar($wall, $me[skin])."시세".bar($trade, $me[skin])."시중{$gen3[name]}
{$city[def]}/{$city[def2]}{$city[wall]}/{$city[wall2]}{$tradeStr}
+"; +} + +function myNationInfo($connect) { + global $_basecolor, $_basecolor2, $images; + + $query = "select startyear,year from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select skin,no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='$nation[nation]'"; // 장수 목록 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name from general where nation='$nation[nation]' and level='12'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $level12 = MYDB_fetch_array($genresult); + + $query = "select name from general where nation='$nation[nation]' and level='11'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $level11 = MYDB_fetch_array($genresult); + + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
【재 야】"; } + else { echo "style=font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } + } else { + if($me[nation] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13;>【재 야】"; } + else { echo "style=color:".newColor($nation[color]).";background-color:{$nation[color]};font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } + } + + echo " +
성 향".getNationType($nation[type])." (".getNationType2($nation[type], $me[skin]).")
".getLevel(12, $nation[level])."";echo $level12==''?"-":"$level12[name]"; echo "".getLevel(11, $nation[level])."";echo $level11==''?"-":"$level11[name]"; echo "
총주민";echo $me[nation]==0?"해당 없음":"$city[totpop]/$city[maxpop]";echo "총병사";echo $me[nation]==0?"해당 없음":"$general[totcrew]/$general[maxcrew]"; echo "
국 고";echo $me[nation]==0?"해당 없음":"$nation[gold]";echo "병 량";echo $me[nation]==0?"해당 없음":"$nation[rice]";echo "
지급율"; + if($me[nation] == 0) { + echo "해당 없음"; + } else { + echo $nation[bill]==0?"0 %":"$nation[bill] %"; + } + echo " + 세 율"; + if($me[nation] == 0) { + echo "해당 없음"; + } else { + echo $nation[rate]==0?"0 %":"$nation[rate] %"; + } + + $techCall = getTechCall($nation[tech]); + + if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $nation[tech] = "{$nation[tech]}"; } + else { $nation[tech] = "{$nation[tech]}"; } + + $nation[tech] = "$techCall / $nation[tech]"; + + if($nation[tricklimit] != 0) { $nation[tricklimit] = "$nation[tricklimit]턴"; } + else { $nation[tricklimit] = "가 능"; } + + if($nation[surlimit] != 0) { $nation[surlimit] = "$nation[surlimit]턴"; } + else { $nation[surlimit] = "가 능"; } + + if($nation[scout] != 0) { $nation[scout] = "금 지"; } + else { $nation[scout] = "허 가"; } + + if($nation[war] != 0) { $nation[war] = "금 지"; } + else { $nation[war] = "허 가"; } + + if($me[skin] == 0) { + $nation[tech] = unfont($nation[tech]); + $nation[tricklimit] = unfont($nation[tricklimit]); + $nation[surlimit] = unfont($nation[surlimit]); + $nation[scout] = unfont($nation[scout]); + $nation[war] = unfont($nation[war]); + } + + echo " +
속 령";echo $me[nation]==0?"-":"$city[cnt]"; echo "장 수";echo $me[nation]==0?"-":"$general[cnt]"; echo "
국 력$nation[power]기술력";echo $me[nation]==0?"-":"$nation[tech]"; echo "
전 략$nation[tricklimit]외 교$nation[surlimit]
임 관$nation[scout]전 쟁$nation[war]
+"; +} + +function addCommand($typename, $value, $valid = 1, $color=0) { + if($valid == 1) { + switch($color) { + case 0: + echo " + "; + break; + case 1: + echo " + "; + break; + case 2: + echo " + "; + break; + } + } else { + echo " + "; + } +} + +function commandGroup($typename, $type=0) { + if($type == 0) { + echo " + "; + } else { + echo " + "; + } +} + +function commandTable($connect) { + $query = "select startyear,year,develcost,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $troop = getTroop($connect, $me[troop]); + $city = getCity($connect, $me[city]); + + $query = "select nation from nation"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + $query = "select city from city where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + $query = "select no from general where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + $query = "select type,level from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $develcost = $admin[develcost]; + $develcostA = $admin[develcost]; $colorA = 0; + $develcostB = $admin[develcost]; $colorB = 0; + $develcostC = $admin[develcost]; $colorC = 0; + $develcostD = $admin[develcost]; $colorD = 0; + $develcostE = $admin[develcost]*2; $colorE = 0; + $develcost3 = $admin[develcost]*3; + $develcost5 = $admin[develcost]*5; + + // 농상 국가보정 + if($nation[type] == 2 || $nation[type] == 12) { $develcostA *= 0.8; $colorA = 1; } + if($nation[type] == 8 || $nation[type] == 11) { $develcostA *= 1.2; $colorA = 2; } + // 기술 국가보정 + if($nation[type] == 3 || $nation[type] == 13) { $develcostB *= 0.8; $colorB = 1; } + if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $develcostB *= 1.2; $colorB = 2; } + // 수성 국가보정 + if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $develcostC *= 0.8; $colorC = 1; } + if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $develcostC *= 1.2; $colorC = 2; } + // 치안 국가보정 + if($nation[type] == 1 || $nation[type] == 4) { $develcostD *= 0.8; $colorD = 1; } + if($nation[type] == 6 || $nation[type] == 9) { $develcostD *= 1.2; $colorD = 2; } + // 민심,정착장려 국가보정 + if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $develcostE *= 0.8; $colorE = 1; } + if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $develcostE *= 1.2; $colorE = 2; } + + $develcostA = round($develcostA); + $develcostB = round($develcostB); + $develcostC = round($develcostC); + $develcostD = round($develcostD); + $develcostE = round($develcostE); + + echo " + +"; +} + +function CoreCommandTable($connect) { + $query = "select develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,nation,city,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select level,colset from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select no from general where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $query = "select supply from city where city='$me[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + if($nation[level] > 0) { $valid = 1; } + else { $valid = 0; } + if($city[supply] == 0) { $valid = 0; } + + echo " + +"; +} + +function commandButton($connect) { + global $_basecolor, $_basecolor2; + + $query = "select skin,no,nation,level,belong from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select nation,color,secretlimit from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[color] == "" || $me[skin] < 1) { $nation[color] = "000000"; } + + echo " + + "; + + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 5) { echo ""; } + else { echo ""; } + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + else { echo ""; } + if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + else { echo ""; } + if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + else { echo ""; } + echo ""; + echo ""; + echo " + +
【회 의 실】【기 밀 실】【부대 편성】【인 사 부】【내 무 부】【사 령 부】【암 행 부】
"; + + echo " + + "; + + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 1) { echo ""; } + else { echo ""; } + if($me[level] >= 1) { echo ""; } + else { echo ""; } + echo ""; + echo ""; + if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + else { echo ""; } + echo ""; + echo ""; + echo " + +
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; +} + +function myInfo($connect) { + $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + generalInfo($connect, $me[no], $me[skin]); +} + +function generalInfo($connect, $no, $skin) { + global $_basecolor, $_basecolor2, $image, $images; + + $query = "select img from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select skin from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select block,userlevel,no,name,picture,imgsvr,injury,nation,city,troop,leader,leader2,power,power2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select nation,level,color from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + if($lbonus > 0) { + $lbonus = "+{$lbonus}"; + } else { + $lbonus = ""; + } + + $troop = getTroop($connect, $general[troop]); + + $level = getLevel($general[level], $nation[level]); + if($general[level] == 2) { + $query = "select name from city where gen3='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + $level = $city[name]." ".$level; + } elseif($general[level] == 3) { + $query = "select name from city where gen2='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + $level = $city[name]." ".$level; + } elseif($general[level] == 4) { + $query = "select name from city where gen1='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + $level = $city[name]." ".$level; + } + $call = getCall($general[leader], $general[power], $general[intel]); + $typename = getTypename($general[crewtype]); + $weapname = getWeapName($general[weap]); + $bookname = getBookName($general[book]); + $horsename = getHorseName($general[horse]); + $itemname = getItemName($general[item]); + if($general[injury] > 0) { + $leader = floor($general[leader] * (100 - $general[injury])/100); + $power = floor($general[power] * (100 - $general[injury])/100); + $intel = floor($general[intel] * (100 - $general[injury])/100); + } else { + $leader = $general[leader]; + $power = $general[power]; + $intel = $general[intel]; + } + if($general[injury] > 60) { $color = ""; $injury = "위독"; } + elseif($general[injury] > 40) { $color = ""; $injury = "심각"; } + elseif($general[injury] > 20) { $color = ""; $injury = "중상"; } + elseif($general[injury] > 0) { $color = ""; $injury = "경상"; } + else { $color = ""; $injury = "건강"; } + + $remaining = substr($general[turntime], 14, 2) - date('i'); + if($remaining < 0) { $remaining = 60 + $remaining; } + + if($general[userlevel] > 2) { $specUser = "특별"; } + else { $specUser = "일반"; } + if($general[block] > 0) { $specUser = "블럭"; } + $specUser = ''; + + if($nation[color] == "" || $skin < 1) { $nation[color] = "000000"; } + + if($general[age] < 60) { $general[age] = "$general[age] 세"; } + elseif($general[age] < 80) { $general[age] = "$general[age] 세"; } + else { $general[age] = "$general[age] 세"; } + + $general[connect] = round($general[connect] / 10, 0) * 10; + $special = $general[special] == 0 ? "{$general[specage]}세" : "".getGenSpecial($general[special]).""; + $special2 = $general[special2] == 0 ? "{$general[specage2]}세" : "".getGenSpecial($general[special2]).""; + + switch($general[personal]) { + case 2: case 4: + $atmos = "{$general[atmos]} (+5)"; break; + case 0: case 9: case 10: + $atmos = "{$general[atmos]} (-5)"; break; + default: + $atmos = "$general[atmos]"; break; + } + switch($general[personal]) { + case 3: case 5: + $train = "{$general[train]} (+5)"; break; + case 1: case 8: case 10: + $train = "{$general[train]} (-5)"; break; + default: + $train = "$general[train]"; break; + } + if($general[troop] == 0) { $troop[name] = "-"; } + if($general[mode] == 2) { $general[mode] = "수비 함(훈사80)"; } + elseif($general[mode] == 1) { $general[mode] = "수비 함(훈사60)"; } + else { $general[mode] = "수비 안함"; } + + if($skin == 0) { + $general[age] = unfont($general[age]); + $special = unfont($special); + $special2 = unfont($special2); + $atmos = unfont($atmos); + $train = unfont($train); + $general[mode] = unfont($general[mode]); + } + + $weapImage = "{$images}/weap{$general[crewtype]}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; }; + $imageTemp = GetImageURL($general[imgsvr]); + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
0?" background={$imageTemp}/{$general[picture]}":""; echo "> {$specUser} {$general[name]} 【 {$level} | {$call} | {$color}{$injury} 】 ".substr($general[turntime], 11)."
통솔 {$color}{$leader}{$lbonus} ".bar(expStatus($general[leader2]), $skin, 20)."무력 {$color}{$power} ".bar(expStatus($general[power2]), $skin, 20)."지력 {$color}{$intel} ".bar(expStatus($general[intel2]), $skin, 20)."
명마$horsename무기$weapname서적$bookname
0?" background={$weapImage}":""; echo "> 자금$general[gold]군량$general[rice]도구$itemname
병종$typename병사$general[crew]성격".getGenChar($general[personal])."
훈련$train사기$atmos특기$special / $special2
Lv {$general[explevel]} ".bar(getLevelPer($general[experience], $general[explevel]), $skin, 20)."연령$general[age]
수비$general[mode]삭턴$general[killturn] 턴실행$remaining 분 남음
부대$troop[name]벌점".getConnect($general[connect])." $general[connect]($general[con])
"; +} + +function myInfo2($connect) { + $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + generalInfo2($connect, $me[no], $me[skin]); +} + +function generalInfo2($connect, $no, $skin) { + global $_basecolor, $_basecolor2, $image, $images, $_dexLimit; + + $query = "select personal,experience,dedication,firenum,warnum,killnum,deathnum,killcrew,deathcrew,belong,killnum*100/warnum as winrate,killcrew/deathcrew*100 as killrate,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $general[winrate] = round($general[winrate], 2); + $general[killrate] = round($general[killrate], 2); + + switch($general[personal]) { + case 0: case 1; case 6: + $experience = "".getHonor($general[experience])." ($general[experience])"; break; + case 4: case 5: case 7: case 10: + $experience = "".getHonor($general[experience])." ($general[experience])"; break; + default: + $experience = getHonor($general[experience])." ($general[experience])"; break; + } + switch($general[personal]) { + case 10: + $dedication = "".getDed($general[dedication])." ($general[dedication])"; break; + default: + $dedication = getDed($general[dedication])." ($general[dedication])"; break; + } + + if($skin == 0) { + $experience = unfont($experience); + $dedication = unfont($dedication); + } + + $dex0 = $general[dex0] / $_dexLimit * 100; + $dex10 = $general[dex10] / $_dexLimit * 100; + $dex20 = $general[dex20] / $_dexLimit * 100; + $dex30 = $general[dex30] / $_dexLimit * 100; + $dex40 = $general[dex40] / $_dexLimit * 100; + + if($dex0 > 100) { $dex0 = 100; } + if($dex10 > 100) { $dex10 = 100; } + if($dex20 > 100) { $dex20 = 100; } + if($dex30 > 100) { $dex30 = 100; } + if($dex40 > 100) { $dex40 = 100; } + + $general[dex0] = getDexCall($general[dex0]); + $general[dex10] = getDexCall($general[dex10]); + $general[dex20] = getDexCall($general[dex20]); + $general[dex30] = getDexCall($general[dex30]); + $general[dex40] = getDexCall($general[dex40]); + + echo " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
추 가 정 보
명성$experience계급$dedication
전투$general[warnum]계략$general[firenum]사관$general[belong]년
승률$general[winrate] %승리$general[killnum]패배$general[deathnum]
살상률$general[killrate] %사살$general[killcrew]피살$general[deathcrew]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
숙 련 도
보병  $general[dex0]".bar($dex0, $skin, 16)."
궁병  $general[dex10]".bar($dex10, $skin, 16)."
기병  $general[dex20]".bar($dex20, $skin, 16)."
귀병  $general[dex30]".bar($dex30, $skin, 16)."
차병  $general[dex40]".bar($dex40, $skin, 16)."
"; +} + +function pushTrickLog($connect, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/_tricklog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushProcessLog($connect, $log) { + $size = count($log); + if($size > 0) { + $date = date('Y_m_d'); + $fp = fopen("logs/_{$date}_processlog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function delStepLog() { + $date = date('Y_m_d'); + @unlink("logs/_{$date}_steplog.txt"); +} + +function pushStepLog($log) { + $date = date('Y_m_d'); + $fp = fopen("logs/_{$date}_steplog.txt", "a"); + fwrite($fp, $log."\r\n"); + fclose($fp); +} + +function pushLockLog($connect, $log) { + $size = count($log); + if($size > 0) { + $date = date('Y_m_d'); + $fp = fopen("logs/_{$date}_locklog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushAdminLog($connect, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/_adminlog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushAuctionLog($connect, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/_auctionlog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushGenLog($general, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/gen{$general[no]}.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushBatRes($general, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/batres{$general[no]}.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushBatLog($general, $log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/batlog{$general[no]}.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushAllLog($log) { + $size = count($log); + if($size > 0) { + $fp = fopen("logs/_alllog.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); + } +} + +function pushHistory($connect, $history) { + $size = count($history); + if($size > 0) { + $fp = fopen("logs/_history.txt", "a"); + for($i=0; $i < $size; $i++) { + fwrite($fp, $history[$i]."\r\n"); + } + fclose($fp); + } +} + +function TrickLog($count, $skin) { + $fp = @fopen("logs/_tricklog.txt", "r"); + @fseek($fp, -$count*150, SEEK_END); + $file = @fread($fp, $count*150); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function AllLog($count, $skin) { + $fp = @fopen("logs/_alllog.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function AuctionLog($count, $skin) { + $fp = @fopen("logs/_auctionlog.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function History($count, $skin) { + $fp = @fopen("logs/_history.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function MyLog($no, $count, $skin) { + $fp = @fopen("logs/gen{$no}.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function MyBatRes($no, $count, $skin) { + $fp = @fopen("logs/batres{$no}.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function MyBatLog($no, $count, $skin) { + $fp = @fopen("logs/batlog{$no}.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + $str = ""; + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + echo $str; +} + +function MyHistory($connect, $no, $skin) { + $query = "select history from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + echo ConvertLog($general[history], $skin); +} + +function addHistory($connect, $me, $history) { + $me[history] = "{$history}
{$me[history]}"; + $query = "update general set history='$me[history]' where no='$me[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + return $me; +} + +function addNationHistory($connect, $nation, $history) { + $nation[history] = "{$nation[history]}{$history}
"; + $query = "update nation set history='$nation[history]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + return $nation; +} + +function adminMsg($connect, $skin=1) { + $query = "select msg from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + echo "운영자 메세지 : "; + echo $admin[msg].""; +} + +function allButton($connect) { + global $_basecolor2; + $query = "select npcmode from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + if($admin[npcmode] == 1) { + $site = "a_npcList.php"; + $call = "빙의일람"; + } else { + $site = "a_vote.php"; + $call = "설문조사"; + } + + echo " + + + + + + + + + + + + + + + + + + + + + +
"; +} + +function onlinenum($connect) { + $query = "select online from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + return $game[online]; +} + +function onlinegen($connect) { + $onlinegen = ""; + if($_SESSION[p_nation] == 0) { + $query = "select onlinegen from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + + $onlinegen = $game[onlinegen]; + } else { + $query = "select onlinegen from nation where nation='$_SESSION[p_nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $onlinegen = $nation[onlinegen]; + } + return $onlinegen; +} + +function onlineNation($connect) { + $query = "select onlinenation from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + return $game[onlinenation]; +} + +function nationMsg($connect) { + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select msg from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + echo "".$nation[msg].""; +} + +function genList($connect) { + $query = "select no,nation,level,msgindex,userlevel from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select msg{$me[msgindex]}_who as reply,msg{$me[msgindex]}_type as type from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $reply = MYDB_fetch_array($result); + if($reply[type] % 100 == 9) { + $reply[reply] %= 10000; + $query = "select no,name from general where no={$reply[reply]}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } elseif($reply[type] % 100 == 10) { + $reply[reply] = floor($reply[reply]/10000); + $query = "select no,name from general where no={$reply[reply]}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } + + $query = "select nation,color,name from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + echo " + +"; +} + +function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { + $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function MsgMe($connect, $bg) { + $query = "select no,nation,msgindex, + msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, + msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, + msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, + msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when + from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $index = $me[msgindex]; + for($i=0; $i < 10; $i++) { + if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } + $index--; + if($index < 0) { $index = 9; } + } +} + +function MsgDip($connect, $bg) { + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[dip0]) { echo "\n"; DecodeMsg($connect, $nation[dip0], $nation[dip0_type], $nation[dip0_who], $nation[dip0_when], $bg, 0); } + if($nation[dip1]) { echo "\n"; DecodeMsg($connect, $nation[dip1], $nation[dip1_type], $nation[dip1_who], $nation[dip1_when], $bg, 1); } + if($nation[dip2]) { echo "\n"; DecodeMsg($connect, $nation[dip2], $nation[dip2_type], $nation[dip2_who], $nation[dip2_when], $bg, 2); } + if($nation[dip3]) { echo "\n"; DecodeMsg($connect, $nation[dip3], $nation[dip3_type], $nation[dip3_who], $nation[dip3_when], $bg, 3); } + if($nation[dip4]) { echo "\n"; DecodeMsg($connect, $nation[dip4], $nation[dip4_type], $nation[dip4_who], $nation[dip4_when], $bg, 4); } +} + +// type : xx,xx(불가침기간,타입) +// who : xxxx,xxxx(발신인, 수신인) +function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { + $query = "select skin,no,nation,name,picture,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 + // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 + // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 + $category = $type % 100; + $term = floor($type / 100); + $from = floor($who / 10000); + $to = $who % 10000; + + $query = "select name,picture,imgsvr,nation from general where no='$from'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndr = MYDB_fetch_array($result); + + if($sndr[nation] == 0) { + $sndrnation[name] = '재야'; + $sndrnation[color] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='$sndr[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndrnation = MYDB_fetch_array($result); + } + + switch($bg) { + case 2: + case 4: $bgcolor = "CC6600"; break; + } + + if($category == 6) { + $query = "select reserved from diplomacy where me='$sndr[nation]' and you='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], $sndr[name], $sndrnation[color], $msg, $date, $num, $from, $term, $me[level], $dip[reserved]); + } elseif($category <= 8) { + $query = "select name,color from nation where nation='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + + ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], $rcvrnation[name], $rcvrnation[color], $msg, $date, $num, $from, $term, $me[level]); + } elseif($category <= 11) { + $query = "select name,picture,nation from general where no='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvr = MYDB_fetch_array($result); + + if($rcvr[nation] == 0) { + $rcvrnation[name] = '재야'; + $rcvrnation[color] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='$rcvr[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + } + ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], "{$rcvr[name]}:{$rcvrnation[name]}", $rcvrnation[color], $msg, $date, $num, $from, $term); + } +} + +function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) { + if($nation == 0) { $nation = 0; } + if($fromcolor == "") { $fromcolor = "FFFFFF"; } + if($to == "") { $to = "재야"; } + if($tocolor == "") { $tocolor = "FFFFFF"; } + + $date = date('Y-m-d H:i:s'); + if($type == 1) { $file = "_all_msg.txt"; } + else { $file = "_nation_msg{$nation}.txt"; } + $fp = fopen("logs/{$file}", "a"); + //로그 파일에 기록 + $str = "{$type}|"._String::Fill($from,12," ")."|"._String::Fill($to,12," ")."|".$date."|".$msg."|".$fromcolor."|".$tocolor."|".$picture."|".$imgsvr; + fwrite($fp, "{$str}\r\n"); + fclose($fp); +} + +function MsgFile($skin, $bg, $nation=0, $level=0) { + switch($bg) { + case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; + case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; + } + + $fp = @fopen("logs/{$fl}", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $code = explode("\r\n",$file); + for($i=0; $i < $count; $i++) { + $msg = explode("|", $code[count($code)-2-$i]); + + $cnt = count($msg); + for($k=0; $k < $cnt; $k++) { $msg[$k] = trim($msg[$k]); } + + ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); + } +} + +function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { + if($msg == "") return; + + $msg = Tag2Code($msg); + + $site = ""; $form = ""; $form2 = ""; + if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { + $corebutton = " "; + } else { + $corebutton = " 【수락】【거절】"; + } + if($type == 6) { + $corebutton .= "
비고: {$note}"; + } + switch($type) { + case 1: $sign = ""; $corebutton = ""; break; + case 2: $sign = ""; $corebutton = ""; break; + case 3: $sign = ""; $corebutton = ""; break; + case 4: $sign = ""; $site = "d_surrender.php"; break; + case 5: $sign = ""; $site = "d_merge.php"; break; + case 6: $sign = ""; $site = "d_ally.php"; break; + case 7: $sign = ""; $site = "d_cease.php"; break; + case 8: $sign = ""; $site = "d_cancel.php"; break; + case 9: $sign = ""; $corebutton = ""; break; + case 10: $sign = ""; $corebutton = ""; break; + case 11: $sign = ""; $site = "d_scout.php"; break; + } + if($skin == 0) { + $bgcolor = "000000"; $picture = ""; + $naming = "[{$me}{$sign}{$you}]"; + } else { + $imageTemp = GetImageURL($imgsvr); + $naming = "[$me{$sign}$you]"; + $picture = ""; + } + if($site != "") { + $form = "
"; + $form2 = "
"; + } + if($num >= 0) { $num = ""; } + else { $num = ""; } + if($who > 0) { $who = ""; } + else { $who = ""; } + if($when > 0) { $when = ""; } + else { $when = ""; } + echo " + + + + $form + + $num + $who + $when + $form2 + +
$picture$naming<$date>
{$msg}{$corebutton}
+ "; +} + +function msgprint($connect, $msg, $name, $picture, $imgsvr, $when, $num, $type) { + global $_basecolor2, $_basecolor4, $images; + + $message = explode("|", $msg); + $count = (count($message) - 2)/2; + $message[0] = Tag2Code($message[0]); + $message[1] = Tag2Code($message[1]); +// $message[0] = str_replace("\n", "
", $message[0]); +// $message[1] = str_replace("\n", "
", $message[1]); + + if($type == 0) { $board = "c_nationboard.php"; } + else { $board = "c_chiefboard.php"; } + + $imageTemp = GetImageURL($imgsvr); + echo " + + + + + + + + + + "; + for($i=0; $i < $count; $i++) { + $who = Tag2Code($message[2+$i*2]); + $reply = Tag2Code($message[3+$i*2]); + $query = "select name from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $regen = MYDB_fetch_array($result); + echo " + + + + "; + } + echo " + + + + + + +
$name$message[0]$when
$message[1]
$regen[name]$reply
댓글달기 + + + +
+
"; +} + +function banner() { + global $_version, $_banner, $_helper; + echo "$_version / $_banner
$_helper
"; +} + +function addTurn($date, $turnterm=1) { + $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); + + $year = $date[0].$date[1].$date[2].$date[3]; + $month = floor($date[5].$date[6]); + $day = $date[8].$date[9]; + $hour = $date[11].$date[12]; + $min = $date[14].$date[15]; + $sec = $date[17].$date[18]; + + //윤년계산 + if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } + + if($turnterm == 0) { $hour += 2; } + elseif($turnterm == 1) { $hour += 1; } + elseif($turnterm == 2) { $min += 30; } + elseif($turnterm == 3) { $min += 20; } + elseif($turnterm == 4) { $min += 10; } + elseif($turnterm == 5) { $min += 5; } + elseif($turnterm == 6) { $min += 2; } + elseif($turnterm == 7) { $min += 1; } + + if($min >= 60) { $min %= 60; $hour++; } + if($hour >= 24) { $hour %= 24; $day++; } + if($day > $lastday[$month]) { $month++; $day = 1; } + if($month >= 13) { $year++; $month = 1; } + + $month = _String::Fill2($month, 2, "0"); + $day = _String::Fill2($day, 2, "0"); + $hour = _String::Fill2($hour, 2, "0"); + $min = _String::Fill2($min, 2, "0"); + $sec = _String::Fill2($sec, 2, "0"); + + return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; +} + +function add12Turn($date, $turnterm=1) { + $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); + + $year = $date[0].$date[1].$date[2].$date[3]; + $month = floor($date[5].$date[6]); + $day = $date[8].$date[9]; + $hour = $date[11].$date[12]; + $min = $date[14].$date[15]; + $sec = $date[17].$date[18]; + + //윤년계산 + if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } + + if($turnterm == 0) { $day += 1; } + elseif($turnterm == 1) { $hour += 12; } + elseif($turnterm == 2) { $hour += 6; } + elseif($turnterm == 3) { $hour += 4; } + elseif($turnterm == 4) { $hour += 2; } + elseif($turnterm == 5) { $hour += 1; } + elseif($turnterm == 6) { $min += 24; } + elseif($turnterm == 7) { $min += 12; } + + if($min >= 60) { $min %= 60; $hour++; } + if($hour >= 24) { $hour %= 24; $day++; } + if($day > $lastday[$month]) { $month++; $day = 1; } + if($month >= 13) { $year++; $month = 1; } + + $month = _String::Fill2($month, 2, "0"); + $day = _String::Fill2($day, 2, "0"); + $hour = _String::Fill2($hour, 2, "0"); + $min = _String::Fill2($min, 2, "0"); + $sec = _String::Fill2($sec, 2, "0"); + + return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; +} + +function subTurn($date, $turnterm=1) { + $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); + + $year = $date[0].$date[1].$date[2].$date[3]; + $month = floor($date[5].$date[6]); + $day = $date[8].$date[9]; + $hour = $date[11].$date[12]; + $min = $date[14].$date[15]; + $sec = $date[17].$date[18]; + + if($turnterm == 0) { $hour -= 2; } + elseif($turnterm == 1) { $hour -= 1; } + elseif($turnterm == 2) { $min -= 30; } + elseif($turnterm == 3) { $min -= 20; } + elseif($turnterm == 4) { $min -= 10; } + elseif($turnterm == 5) { $min -= 5; } + elseif($turnterm == 6) { $min -= 2; } + elseif($turnterm == 7) { $min -= 1; } + + //윤년계산 + if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } + + if($min < 0) { $min = 60 + $min; $hour--; } + if($hour < 0) { $hour = 24 + $hour; $day--; } + if($day <= 0) { $month--; $day = $lastday[$month]; } + if($month <= 0) { $year--; $month = 12; } + + $year = _String::Fill2($year, 2, "0"); + $month = _String::Fill2($month, 2, "0"); + $day = _String::Fill2($day, 2, "0"); + $hour = _String::Fill2($hour, 2, "0"); + $min = _String::Fill2($min, 2, "0"); + $sec = _String::Fill2($sec, 2, "0"); + + return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; +} + +function cutTurn($date, $turnterm=1) { + // 0123456789012345678 + // $date = "2000-01-01 00:00:00"; + // 0 : 120분, 1 : 60분, 2 : 30분, 3 : 10분, 4 : 5분 + switch($turnterm) { + case 0: + $hour = $date[11].$date[12]; + if($hour % 2 == 1) { $hour--; } + $date[11] = floor($hour / 10); + $date[12] = $hour % 10; + $date[14] = "0"; + $date[15] = "0"; + $date[17] = "0"; + $date[18] = "0"; + break; + case 1: + $date[14] = "0"; + $date[15] = "0"; + $date[17] = "0"; + $date[18] = "0"; + break; + case 2: + $min = $date[14].$date[15]; + if($min < 30) { $min = 0; } + else { $min = 30; } + $date[14] = floor($min / 10); + $date[15] = $min % 10; + $date[17] = "0"; + $date[18] = "0"; + break; + case 3: + $min = $date[14].$date[15]; + if($min < 20) { $min = 0; } + elseif($min < 40) { $min = 20; } + else { $min = 40; } + $date[14] = floor($min / 10); + $date[15] = $min % 10; + $date[17] = "0"; + $date[18] = "0"; + break; + case 4: + $min = $date[14].$date[15]; + if($min < 10) { $min = 0; } + elseif($min < 20) { $min = 10; } + elseif($min < 30) { $min = 20; } + elseif($min < 40) { $min = 30; } + elseif($min < 50) { $min = 40; } + else { $min = 50; } + $date[14] = floor($min / 10); + $date[15] = $min % 10; + $date[17] = "0"; + $date[18] = "0"; + break; + case 5: + $min = $date[14].$date[15]; + if($min < 5) { $min = 0; } + elseif($min < 10) { $min = 5; } + elseif($min < 15) { $min = 10; } + elseif($min < 20) { $min = 15; } + elseif($min < 25) { $min = 20; } + elseif($min < 30) { $min = 25; } + elseif($min < 35) { $min = 30; } + elseif($min < 40) { $min = 35; } + elseif($min < 45) { $min = 40; } + elseif($min < 50) { $min = 45; } + elseif($min < 55) { $min = 50; } + else { $min = 55; } + $date[14] = floor($min / 10); + $date[15] = $min % 10; + $date[17] = "0"; + $date[18] = "0"; + break; + case 6: + $min = $date[14].$date[15]; + $min = floor($min / 2) * 2; + $date[14] = floor($min / 10); + $date[15] = $min % 10; + $date[17] = "0"; + $date[18] = "0"; + break; + case 7: + $date[17] = "0"; + $date[18] = "0"; + break; + } + + return $date; +} + +function CutDay($date) { + $hour = $date[11].$date[12]; + if($hour >= 19) { + $date[11] = "0"; + $date[12] = "1"; + + $date = add12Turn($date, 1); + $date = add12Turn($date, 1); + } elseif($hour < 07) { + $date[11] = "0"; + $date[12] = "1"; + } else { + $date[11] = "1"; + $date[12] = "3"; + } + $date[14] = "0"; + $date[15] = "0"; + $date[17] = "0"; + $date[18] = "0"; + return $date; +} + +function increaseRefresh($connect, $type="", $cnt=1) { + $date = date('Y-m-d H:i:s'); + + $query = "update game set refresh=refresh+'$cnt' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($_SESSION[p_id] != "") { + $query = "update general set lastrefresh='$date',con=con+'$cnt',connect=connect+'$cnt',refcnt=refcnt+'$cnt',refresh=refresh+'$cnt' where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $date = date('Y_m_d H:i:s'); + $date2 = substr($date, 0, 10); + $online = onlinenum($connect); + $fp = fopen("logs/_{$date2}_refresh.txt", "a"); + $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION[p_id],13," ")._String::Fill2($_SESSION[p_name],13," ")._String::Fill2($_SESSION[p_ip],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; + fwrite($fp, $msg."\r\n"); + fclose($fp); + + $proxy_headers = array( + 'HTTP_VIA', + 'HTTP_X_FORWARDED_FOR', + 'HTTP_FORWARDED_FOR', + 'HTTP_X_FORWARDED', + 'HTTP_FORWARDED', + 'HTTP_CLIENT_IP', + 'HTTP_FORWARDED_FOR_IP', + 'VIA', + 'X_FORWARDED_FOR', + 'FORWARDED_FOR', + 'X_FORWARDED', + 'FORWARDED', + 'CLIENT_IP', + 'FORWARDED_FOR_IP', + 'HTTP_PROXY_CONNECTION' + ); + + $str = ""; + foreach($proxy_headers as $x) { + if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}"; + } + if($str != "") { + $fp2 = fopen("logs/_{$date2}_ipcheck.txt", "a"); + $str = "ID:{$_SESSION[p_id]}//name:{$_SESSION[p_name]}//REMOTE_ADDR:{$_SERVER[REMOTE_ADDR]}" . $str; + fwrite($fp2, $str."\r\n"); + fclose($fp2); + } +} + +function updateTraffic($connect) { + $online = onlinenum($connect); + + $query = "select year,month,refresh,maxonline,maxrefresh from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + + //최다갱신자 + $query = "select name,refresh from general order by refresh desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $user = MYDB_fetch_array($result); + + if($game[maxrefresh] < $game[refresh]) { + $game[maxrefresh] = $game[refresh]; + } + if($game[maxonline] < $online) { + $game[maxonline] = $online; + } + $query = "update game set refresh=0,maxrefresh={$game[maxrefresh]},maxonline={$game[maxonline]} where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set refresh=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $date = date('Y-m-d H:i:s'); + $fp = fopen("logs/_traffic.txt", "a"); + //일시|년|월|총갱신|접속자|최다갱신자 + $msg = _String::Fill2($date,20," ")."|"._String::Fill2($game[year],3," ")."|"._String::Fill2($game[month],2," ")."|"._String::Fill2($game[refresh],8," ")."|"._String::Fill2($online,5," ")."|"._String::Fill2($user[name]."(".$user[refresh].")",20," "); + fwrite($fp, $msg."\r\n"); + fclose($fp); +} + +function CheckOverhead($connect) { + //서버정보 + $query = "select conweight,turnterm,conlimit from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $onlineNumber = onlinenum($connect); + switch($admin[turnterm]) { + case 0: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 120분턴 + case 1: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 60분턴 + case 2: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 360; $con2 = 240; $con3 = 120; $con4 = 60; break; // 30분턴 + case 3: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 240; $con2 = 180; $con3 = 120; $con4 = 60; break; // 20분턴 + case 4: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 240; $con2 = 180; $con3 = 120; $con4 = 60; break; // 10분턴 + case 5: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 120; $con2 = 90; $con3 = 60; $con4 = 30; break; // 5분턴 + case 6: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 90; $con2 = 60; $con3 = 40; $con4 = 30; break; // 2분턴 + case 7: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 90; $con2 = 60; $con3 = 40; $con4 = 30; break; // 1분턴 + } + + $thr1 *= $admin[conweight] / 100; + $thr2 *= $admin[conweight] / 100; + $thr3 *= $admin[conweight] / 100; + $con1 *= $admin[conweight] / 100; + $con2 *= $admin[conweight] / 100; + $con3 *= $admin[conweight] / 100; + $con4 *= $admin[conweight] / 100; + + //if($onlineNumber > $thr2) { $me[map] = 1; } + if ($onlineNumber > $thr3 && $admin[conlimit] != $con4) { + $query = "update game set conlimit='$con4' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($onlineNumber > $thr2 && $admin[conlimit] != $con3) { + $query = "update game set conlimit='$con3' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($onlineNumber > $thr1 && $admin[conlimit] != $con2) { + $query = "update game set conlimit='$con2' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($onlineNumber <= $thr1 && $admin[conlimit] != $con1) { + $query = "update game set conlimit='$con1' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + } +} + +function isLock($connect) { + $query = "select plock from plock where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $plock = MYDB_fetch_array($result); + + if($plock[plock] == 0) { return 0; } // 열려있음 + else { return 1; } // 사용중 +} + +function lock($connect) { + //테이블 락 + $query = "lock tables plock write"; + @MYDB_query($query, $connect); + // 잠금 + $query = "update plock set plock=1 where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //테이블 언락 + $query = "unlock tables"; + @MYDB_query($query, $connect); +} + +function unlock($connect) { + // 풀림 + $query = "update plock set plock=0 where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function timeover($connect) { + $query = "select turnterm,TIMESTAMPDIFF(SECOND,turntime,now()) as diff from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + switch($admin[turnterm]) { + case 0: $t = 20; break; // 120분턴 + case 1: $t = 10; break; // 60분턴 + case 2: $t = 10; break; // 30분턴 + case 3: $t = 10; break; // 20분턴 + case 4: $t = 10; break; // 10분턴 + case 5: $t = 5; break; // 5분턴 + case 6: $t = 2; break; // 2분턴 + case 7: $t = 1; break; // 1분턴 + } + + $term = $admin[diff]; + if($term >= $t || $term < 0) { return 1; } + else { return 0; } +} + +function checkDelay($connect) { + //서버정보 + $query = "select turnterm,now() as now,TIMESTAMPDIFF(MINUTE,turntime,now()) as offset from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + // 1턴이상 갱신 없었으면 서버 지연 + switch($admin[turnterm]) { + case 0: $term = 120; $threshold = 1; break; + case 1: $term = 60; $threshold = 1; break; + case 2: $term = 30; $threshold = 1; break; + case 3: $term = 20; $threshold = 1; break; + case 4: $term = 10; $threshold = 2; break; + case 5: $term = 5; $threshold = 3; break; + case 6: $term = 2; $threshold = 3; break; + case 7: $term = 1; $threshold = 3; break; + } + //지연 해야할 밀린 턴 횟수 + $iter = floor($admin[offset] / $term); + if($iter > $threshold) { + $minute = $iter * $term; + $query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE) where turntime<=DATE_ADD(turntime, INTERVAL $term MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function updateOnline($connect) { + $query = "select nation,name from nation"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + //국가별 이름 매핑 + for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + $nationname[$nation[nation]] = $nation[name]; + } + $nationname[0] = "재야"; + + //동접수 + $query = "select no,name,nation from general where lastrefresh > DATE_SUB(NOW(), INTERVAL 5 MINUTE)"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $onlinenum = MYDB_num_rows($result); + + //국가별 접속중인 장수 + for($i=0; $i < $onlinenum; $i++) { + $general = MYDB_fetch_array($result); + $onnation[$general[nation]] .= $general[name].', '; + } + + foreach($onnation as $key => $val) { + $onnationstr .= "【{$nationname[$key]}】, "; + + if($key == 0) { + $query = "update game set onlinegen='$onnation[0]' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update nation set onlinegen='$onnation[$key]' where nation='$key'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + + //접속중인 국가 + $query = "update game set online='$onlinenum',onlinenation='$onnationstr' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function checkTurn($connect) { + // 잦은 갱신 금지 현재 10초당 1회 + if(!timeover($connect)) { return; } + // 현재 처리중이면 접근 불가 + if(isLock($connect)) { return; } + + $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + pushLockLog($connect, $locklog); + + // 파일락 획득 + $fp = fopen('lock.txt', 'r'); + if(!flock($fp, LOCK_EX)) { return; } + // 세마포어 획득(윈도우서버 불가) + //$sema = @sem_get(fileinode('stylesheet.php')); + //if(!@sem_acquire($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } + + // 현재 처리중이면 접근 불가 + if(isLock($connect)) { return; } + // 락 걸고 처리 + lock($connect); + + // 파일락 해제 + if(!flock($fp, LOCK_UN)) { return; } + // 세마포어 해제 + //if(!@sem_release($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } + + $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + pushLockLog($connect, $locklog); + + //if(STEP_LOG) delStepLog(); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', 진입'); + + //천통시에는 동결 + $query = "select turntime from game where isUnited=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $down = MYDB_num_rows($result); + if($down > 0) { + $query = "update plock set plock=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; + } + // 1턴이상 갱신 없었으면 서버 지연 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay'); + checkDelay($connect); + // 접속자수, 접속국가, 국가별 접속장수 갱신 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay'); + updateOnline($connect); + //접속자 수 따라서 갱신제한 변경 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', CheckOverhead'); + CheckOverhead($connect); + //서버정보 + $query = "select startyear,year,month,turntime,turnterm,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $date = date('Y-m-d H:i:s'); + // 최종 처리 월턴의 다음 월턴시간 구함 + $prevTurn = cutTurn($admin[turntime], $admin[turnterm]); + $nextTurn = addTurn($prevTurn, $admin[turnterm]); + // 현재 턴 이전 월턴까지 모두처리. + //최종 처리 이후 다음 월턴이 현재 시간보다 전이라면 + while($nextTurn <= $date) { + // 월턴이전 장수 모두 처리 + $query = "select no,name,turntime,turn0,npc from general where turntime < '$nextTurn' order by turntime"; + $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(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) pushProcessLog($connect, $processlog); + + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); + if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); + PreprocessCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); + processCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); + updateCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); + updateTurntime($connect, $general[no]); + + } + + // 트래픽 업데이트 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTraffic'); + updateTraffic($connect); + // 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', preUpdateMonthly'); + $result = preUpdateMonthly($connect); + if($result == false) { + $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + pushLockLog($connect, $locklog); + + // 잡금 해제 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); + unlock($connect); + return false; + } + + // 그 시각 년도,월 저장 + $dt = turnDate($connect, $nextTurn); + $admin[year] = $dt[0]; $admin[month] = $dt[1]; + + $locklog[0] = "-- checkTurn() ".$admin[month]."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + pushLockLog($connect, $locklog); + // 분기계산. 장수들 턴보다 먼저 있다면 먼저처리 + if($admin[month] == 1) { + // NPC 등장 + if($admin[scenario] > 0 && $admin[scenario] < 20) { RegNPC($connect); } + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processGoldIncome'); + processGoldIncome($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processSpring'); + processSpring($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateYearly'); + updateYearly($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); + updateQuaterly($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); + disaster($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate'); + tradeRate($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge'); + addAge($connect); + // 새해 알림 + $alllog[count($alllog)] = "◆{$admin[month]}월:$admin[year]년이 되었습니다."; + pushAllLog($alllog); + } elseif($admin[month] == 4) { + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); + updateQuaterly($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); + disaster($connect); + } elseif($admin[month] == 7) { + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processRiceIncome'); + processRiceIncome($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processFall'); + processFall($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); + updateQuaterly($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); + disaster($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate'); + tradeRate($connect); + } elseif($admin[month] == 10) { + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); + updateQuaterly($connect); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); + disaster($connect); + } + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', postUpdateMonthly'); + postUpdateMonthly($connect); + + // 다음달로 넘김 + $prevTurn = $nextTurn; + $nextTurn = addTurn($prevTurn, $admin[turnterm]); + } + + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); + + // 이시각 정각 시까지 업데이트 완료했음 + $query = "update game set turntime='$prevTurn' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 그 시각 년도,월 저장 + $dt = turnDate($connect, $prevTurn); + $admin[year] = $dt[0]; $admin[month] = $dt[1]; + // 현재시간의 월턴시간 이후 분단위 장수 처리 + do { + $query = "select no,name,turntime,turn0,npc from general where turntime<='$date' order by turntime"; + $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(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) pushProcessLog($connect, $processlog); + + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); + if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); + PreprocessCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); + processCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); + updateCommand($connect, $general[no]); + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); + updateTurntime($connect, $general[no]); + } + } while($gencount > 0); + + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); + + $query = "update game set turntime='$date' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 3턴 전 시간 + $letterdate = $date; + $letterdate = subTurn($letterdate, $admin[turnterm]); + $letterdate = subTurn($letterdate, $admin[turnterm]); + $letterdate = subTurn($letterdate, $admin[turnterm]); + //기한 지난 외교 메세지 지움(3개월 유지) + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); + for($i=0; $i < 5; $i++) { + $query = "update nation set dip{$i}='',dip{$i}_who='0',dip{$i}_type='0',dip{$i}_when='' where dip{$i}_when < '$letterdate'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + // 부상 과도 제한 + $query = "update general set injury='80' where injury>'80'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //토너먼트 처리 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processTournament'); + processTournament($connect); + //거래 처리 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAuction'); + processAuction($connect); + // 잡금 해제 + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); + unlock($connect); + + $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + pushLockLog($connect, $locklog); + + //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', finish'); + + return true; +} + +function addAge($connect) { + //나이와 호봉 증가 + $query = "update general set age=age+1,belong=belong+1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + if($admin[year] >= $admin[startyear]+3) { + $query = "select no,name,nation,leader,power,intel,history from general where specage<=age and special='0'"; + $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); + $special = getSpecial($connect, $general[leader], $general[power], $general[intel]); + $query = "update general set special='$special' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●특기 【".getGenSpecial($special)."】(을)를 익혔습니다!"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special)."】(을)를 습득"); + pushGenLog($general, $log); + } + + $query = "select no,name,nation,leader,power,intel,history,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'"; + $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); + $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + + $query = "update general set special2='$special2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + pushGenLog($general, $log); + } + } +} + +function turnDate($connect, $curtime) { + $query = "select startyear,starttime,turnterm,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $turn = $admin[starttime]; + $curturn = cutTurn($curtime, $admin[turnterm]); + $num = 0; + switch($admin[turnterm]) { + case 0: $term = 7200; break; + case 1: $term = 3600; break; + case 2: $term = 1800; break; + case 3: $term = 1200; break; + case 4: $term = 600; break; + case 5: $term = 300; break; + case 6: $term = 120; break; + case 7: $term = 60; break; + } + $num = floor((strtotime($curturn) - strtotime($turn)) / $term); + + $year = $admin[startyear] + floor($num / 12); + $month = 1 + (12+$num) % 12; + + // 바뀐 경우만 업데이트 + if($admin[month] != $month || $admin[year] != $year) { + $query = "update game set year='$year',month='$month' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $value[0] = $year; + $value[1] = $month; + return $value; +} + +//한국가의 전체 전방 설정 +function SetNationFront($connect, $nationNo) { + if(!$nationNo) { return; } + // 도시소유 국가와 선포,교전중인 국가 + $query = "select me,you from diplomacy where me={$nationNo} and (state=0 or (state=1 and term<=3))"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipNum = MYDB_num_rows($result); + if($dipNum > 0) { + for($i=0; $i < $dipNum; $i++) { + $dip = MYDB_fetch_array($result); + + $query = "select city,path from city where nation={$dip[you]}"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result2); + for($k=0; $k < $cityNum; $k++) { + $city = MYDB_fetch_array($result2); + $path = explode("|", $city[path]); + $cnt = count($path); + for($j=0; $j < $cnt; $j++) { + $adj[$path[$j]] = 1; + } + } + } + } else { + //평시이면 공백지 + $query = "select city,path from city where nation=0"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result2); + for($k=0; $k < $cityNum; $k++) { + $city = MYDB_fetch_array($result2); + $path = explode("|", $city[path]); + $cnt = count($path); + for($j=0; $j < $cnt; $j++) { + $adj[$path[$j]] = 1; + } + } + } + $str = "city=0"; $valid = 0; + $query = "select city from city where nation={$nationNo}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + for($i=0; $i < $cityNum; $i++) { + $city = MYDB_fetch_array($result); + if($adj[$city[city]] == 1) { $str .= " or city={$city[city]}"; $valid = 1; } + } + $query = "update city set front=0 where nation={$nationNo}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + if($valid == 1) { + $query = "update city set front=1 where {$str}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function checkSupply($connect) { + include_once("queue.php"); + + $query = "select city,nation,path from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + for($i=0; $i < $cityNum; $i++) { + $city = MYDB_fetch_array($result); + $cityPath[$city[city]] = $city[path]; + $cityNation[$city[city]] = $city[nation]; + $label[$city[city]] = 0; + } + + $select = 0; + $queue = new Queue(20); + $queue2 = new Queue(20); + $labelling = 0; + $marked = 0; + + //모든 도시 마크할 때까지 + while($marked < $cityNum) { + $queue->clear(); $queue2->clear(); + $q = $queue; $q2 = $queue2; + + $labelling++; + //마크 되지 않은 도시부터 라벨링 시작 + for($i=1; $i <= $cityNum; $i++) { + if($label[$i] == 0) { + $label[$i] = $labelling; + $labelMapping[$labelling] = $cityNation[$i]; + $comCount[$cityNation[$i]]++; + $q->push($i); + $marked++; + break; + } + } + + while($q->getSize() > 0 || $q2->getSize() > 0) { + while($q->getSize() > 0) { + $city = $q->pop(); + unset($path); + $path = explode("|", $cityPath[$city]); + for($i=0; $i < count($path); $i++) { + if($label[$path[$i]] == 0 && $cityNation[$path[$i]] == $cityNation[$city]) { + $label[$path[$i]] = $labelling; + $q2->push($path[$i]); + $marked++; + } + } + } + if($select == 0) { + $q2 = $queue; + $q = $queue2; + } else { + $q = $queue; + $q2 = $queue2; + } + $select = 1 - $select; + } + } + + //공백지는 다 보급상태 + $query = "update city set supply='1' where nation='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //우선 다 미보급 상태로 + $query = "update city set supply='0' where nation!='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //도시 있는 국가들 + $query = "select nation,capital from nation where level>'0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationNum = MYDB_num_rows($result); + + $str = "city='0'"; + for($i=0; $i < $nationNum; $i++) { + $nation = MYDB_fetch_array($result); + //수도 있는 덩어리 도시들 1로 세팅 + $lbl = $label[$nation[capital]]; + + for($k=1; $k <= $cityNum; $k++) { + if($lbl == $label[$k]) { + $str .= " or city='{$k}'"; + } + } + } + $query = "update city set supply='1' where {$str}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function updateYearly($connect) { + //통계 + checkStatistic($connect); +} + +//관직 변경 해제 +function updateQuaterly($connect) { + //천도 제한 해제, 관직 변경 제한 해제 + $query = "update nation set capset='0',l12set='0',l11set='0',l10set='0',l9set='0',l8set='0',l7set='0',l6set='0',l5set='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //관직 변경 제한 해제 + $query = "update city set gen1set='0',gen2set='0',gen3set='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정 +function preUpdateMonthly($connect) { + //연감 월결산 + $result = LogHistory($connect); + if($result == false) { return false; } + + $query = "select startyear,year,month,normgeneral from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //배신 횟수 최대 10회 미만 + $query = "update general set betray=9 where betray>9"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //보급선 체크 + checkSupply($connect); + //미보급도시 10% 감소 + $query = "update city set pop=pop*0.9,rate=rate*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,def=def*0.9,wall=wall*0.9 where supply='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //미보급도시 장수 5% 감소 + $query = "select city,nation from city where supply='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + for($i=0; $i < $cityCount; $i++) { + $city = MYDB_fetch_array($result); + //병 훈 사 5%감소 + $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='$city[city]' and nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //민심30이하 공백지 처리 + $query = "select city,name,gen1,gen2,gen3 from city where rate<='30' and supply='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + for($i=0; $i < $cityCount; $i++) { + $city = MYDB_fetch_array($result); + + $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【고립】$city[name](이)가 보급이 끊겨 미지배 도시가 되었습니다."; + } + pushHistory($connect, $history); + //민심30이하 공백지 처리 + $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 우선 병사수/100 만큼 소비 + $query = "update general set rice=rice-round(crew/100) where crew>=100"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 쌀이 마이너스인 장수들 소집해제 + $query = "select no,name,rice,crew,city from general where rice<0"; + $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); + + // 주민으로 돌아감 + $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set crew=0,rice=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; + pushGenLog($general, $log); + } + + //접률감소 + $query = "update general set connect=floor(connect*0.99)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //건국제한, 전략제한, 외교제한-1 + $query = "update general set makelimit=makelimit-1 where makelimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set tricklimit=tricklimit-1 where tricklimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set surlimit=surlimit-1 where surlimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //세율 동기화 목적 + $query = "update nation set rate_tmp=rate"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //도시훈사 180년 60, 220년 87, 240년 100 + $rate = round(($admin[year] - $admin[startyear]) / 1.5) + 60; + if($rate > 100) $rate = 100; + + //금률 쌀률, 내정비용 +// $query = "select count(*) as cnt from general"; +// $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $gencount = MYDB_fetch_array($result); // 전체 등록자 수 +// $ratio = 50 + round($gencount[cnt] / $admin[normgeneral] * 100 / 2); // 300명 등록시에 100% 지급 + $ratio = 100; + // 20 ~ 140원 + $develcost = ($admin[year] - $admin[startyear] + 10) * 2; + $query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //매달 사망자 수입 결산 + processDeadIncome($connect, $ratio); + + //계략, 전쟁표시 해제 + $query = "update city set state=0 where state=31 or state=33"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=state-1 where state=32 or state=34"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set term=term-1 where term>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set conflict='',conflict2='' where term=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=0 where state=41"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=41 where state=42"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=42 where state=43"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 계급 검사 및 승,강급 + $query = "select no,name,dedication,dedlevel,experience,explevel from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + + unset($log); + $log = checkDedication($connect, $general, $log); + $log = checkExperience($connect, $general, $log); + pushGenLog($general, $log); + } + + //첩보-1 + $query = "select nation,spy from nation where spy!=''"; + $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); + $spy = ""; $k = 0; unset($citys); + if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } + while(count($citys)) { + $citys[$k]--; + if($citys[$k]%10 != 0) { $spy .= "$citys[$k]"; } + $k++; + if($k >= count($citys)) { break; } + if($citys[$k-1]%10 != 0) { $spy .= "|"; } + } + $query = "update nation set spy='$spy' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + return true; +} + +// 외교 로그처리, 외교 상태 처리 +function postUpdateMonthly($connect) { + $query = "select startyear,year,month,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //각 국가 전월 장수수 대비 당월 장수수로 단합도 산정 + //각 국가 장수수를 구하고 국력 산정 +// $query = "select nation,gennum from nation where level>0"; +// 국력= +// 자원(국가/장수의 금,쌀) +// 기술력 +// 인구수*내정% +// 장수능력 +// 접속률 +// 숙련도 +// 명성,공헌 + $query = " +select +A.nation, +A.gennum, A.gennum2, A.chemi, +round(( + round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100) + +A.tech + +if(A.level=0,0,( + select round( + sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100 + ) from city where nation=A.nation and supply=1 + )) + +(select sum(leader+power+intel) from general where nation=A.nation) + +(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation) + +(select round(sum(experience+dedication)/100) from general where nation=A.nation) + +(select round(avg(connect)) from general where nation=A.nation) +)/10) +as power +from nation A +group by A.nation +"; + $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); + $genNum[$nation[nation]] = $nation[gennum]; + + if($nation[gennum] > $nation[gennum2]) { + // 장수가 증가했을때 + $nation[chemi] -= ceil(($nation[gennum] - $nation[gennum2]) / $nation[gennum] * 100); + } else { + // 장수가 감소했을때 + $nation[chemi] -= ceil(($nation[gennum2] - $nation[gennum]) / $nation[gennum2] * 100); + } + // 매달 2씩 증가 + $nation[chemi] += 2; + if($nation[chemi] < 0) { $nation[chemi] = 0; } + if($nation[chemi] > 100) { $nation[chemi] = 100; } + + //약간의 랜덤치 부여 (95% ~ 105%) + $nation[power] = round($nation[power] * (rand()%101 + 950) / 1000); + $query = "update nation set power='$nation[power]',gennum2='$nation[gennum]',chemi='$nation[chemi]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 전쟁기한 세팅 + $query = "select me,you,dead,term from diplomacy where state='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + for($i=0; $i < $dipCount; $i++) { + $dip = MYDB_fetch_array($result); + $genCount = $genNum[$dip[me]]; + // 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산 + // 4000 / 10 * 0.25 = 100 + $term = round($dip[dead] / 100 / $genCount) + 1; + if($dip[term] > $term) { $term = $dip[term]; } + if($term > 13) { $term = 13; } + $query = "update diplomacy set term='{$term}' where (me='$dip[me]' and you='$dip[you]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //개전국 로그 + $query = "select me,you from diplomacy where state='1' and term<='1' and me= $admin[startyear]+3) { + checkWander($connect); + } + // 작위 업데이트 + updateNationState($connect); + // 천통여부 검사 + checkEmperior($connect); + //토너먼트 개시 + triggerTournament($connect); + // 시스템 거래건 등록 + registerAuction($connect); + //전방설정 + $query = "select nation from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); + } +} + +function triggerTournament($connect) { + $query = "select tournament,tnmt_trig from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률 + if($admin[tournament] == 0 && $admin[tnmt_trig] > 0 && rand() % 100 < 40) { + $type = rand() % 6; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전 + //전력전 50%, 통, 일, 설 각 17% + if($type > 3) { $type = 0; } + startTournament($connect, $admin[tnmt_trig], $type); + } +} + +function checkWander($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + // 국가정보, 장수수 + $query = "select nation from nation where level=0"; + $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); + + $query = "select no,name,nation,level,history,turntime from general where nation='$nation[nation]' and level=12"; + $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($kingResult); + + $log[0] = "●초반 제한후 방랑군은 자동 해산됩니다."; + pushGenLog($king, $log); + + process_56($connect, $king); + } +} + +function checkMerge($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from diplomacy where state='3' and term='0'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($dipresult); + + for($i=0; $i < $dipcount; $i++) { + $dip = MYDB_fetch_array($dipresult); + + // 아국군주 + $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + // 상대군주 + $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 모국 + $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + // 아국 + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + //양국 NPC수 + $query = "select no from general where nation='$you[nation]' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + //양국 NPC수 + $query = "select no from general where nation='$me[nation]' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount2 = MYDB_num_rows($result); + + //피항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='$you[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "$mynation[name](와)과 통합에 성공했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합에 성공"); + } + //항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount2 = MYDB_num_rows($result); + $genlog[0] = "$younation[name](와)과 통합에 성공했습니다."; + for($i=0; $i < $gencount2; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$younation[name]$you[makenation]로 통합에 성공"); + } + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합】$mynation[name](와)과 $younation[name](이)가 $you[makenation](으)로 통합하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $you[makenation]에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합"); + + $newGenCount = $gencount + $gencount2; + if($newGenCount < 10) { $newGenCount = 10; } + $newTotalTech = $younation[totaltech] + $mynation[totaltech]; + $newTech = round($newTotalTech / $newGenCount); + // 자금 통합, 외교제한 5년, 기술유지 + $query = "update nation set name='$you[makenation]',gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //국가 삭제 + $query = "delete from nation where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 도시들 상대국 소속으로 + $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 + $query = "update general set belong=1,level=1,nation='$you[nation]' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 공헌도0.9, 명성0.9 + $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대도 모두 국가 소속 변경 + $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 통합국 모든 도시 5% 감소 + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) + $resignCount = 0; + if($npccount >= $npccount2) { + $resignCount = round($npccount*(rand()%21+90)/100); + } else { + $resignCount = round($npccount2*(rand()%21+90)/100); + } + $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 + $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($me, $mylog); + pushGenLog($you, $youlog); + pushHistory($connect, $history); + unset($mylog); + unset($youlog); + unset($history); + } +} + +function checkSurrender($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from diplomacy where state='5' and term='0'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($dipresult); + + for($i=0; $i < $dipcount; $i++) { + $dip = MYDB_fetch_array($dipresult); + + // 아국군주 + $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + // 상대군주 + $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 모국 + $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + // 아국 + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + //양국 NPC수 + $query = "select no from general where nation='$you[nation]' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + //양국 NPC수 + $query = "select no from general where nation='$me[nation]' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount2 = MYDB_num_rows($result); + + //피항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='$you[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "$mynation[name] 합병에 성공했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name] 합병에 성공"); + } + //항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount2 = MYDB_num_rows($result); + $genlog[0] = "$younation[name](으)로 항복하여 수도로 이동합니다."; + for($i=0; $i < $gencount2; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$younation[name](으)로 항복"); + } + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【투항】$mynation[name] (이)가 $younation[name](으)로 항복하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $younation[name]에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병"); + + $newGenCount = $gencount + $gencount2; + if($newGenCount < 10) { $newGenCount = 10; } + $newTotalTech = $younation[totaltech] + $mynation[totaltech]; + $newTech = round($newTotalTech / $newGenCount); + // 자금 통합, 외교제한 5년, 기술유지 + $query = "update nation set gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //합병 당한국 모든 도시 10%감소 + $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //합병 시도국 모든 도시 5%감소 + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //국가 삭제 + $query = "delete from nation where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 군주가 있는 위치 구함 + $query = "select city from general where nation='$you[nation]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($result); + // 아국 모든 도시들 상대국 소속으로 + $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 제의국 모든 장수들 공헌도0.95, 명성0.95 + $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='$you[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 + $query = "update general set belong=1,level=1,nation='$you[nation]',city='$king[city]',dedication=dedication*1.1,experience=experience*0.9 where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대도 모두 국가 소속 변경 + $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) + $resignCount = 0; + if($npccount >= $npccount2) { + $resignCount = round($npccount*(rand()%21+90)/100); + } else { + $resignCount = round($npccount2*(rand()%21+90)/100); + } + $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 + $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($me, $mylog); + pushGenLog($you, $youlog); + pushHistory($connect, $history); + unset($mylog); + unset($youlog); + unset($history); + } +} + +function updateNationState($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,level,history from nation"; + $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 city,level,secu from city where nation='$nation[nation]' and level>=4"; + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($cityresult); + + $query = "select no from general where nation='$nation[nation]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + if($citycount == 0) { + $nationlevel = 0; // 방랑군 + } elseif($citycount == 1) { + $nationlevel = 1; // 호족 + } elseif($citycount <= 4) { + $nationlevel = 2; // 군벌 + } elseif($citycount <= 7) { + $nationlevel = 3; // 주자사 + } elseif($citycount <= 10) { + $nationlevel = 4; // 주목 + } elseif($citycount <= 15) { + $nationlevel = 5; // 공 + } elseif($citycount <= 20) { + $nationlevel = 6; // 왕 + } else { + $nationlevel = 7; // 황제 + } + + if($nationlevel > $nation[level]) { + $nation[level] = $nationlevel; + + switch($nationlevel) { + case 7: + $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); + break; + case 6: + $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극"); + break; + case 5: + case 4: + case 3: + $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); + break; + case 2: + $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."로 나서다"); + break; + } + + //작위 상승 + $query = "update nation set level='$nation[level]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + //기술 및 변경횟수 업데이트 + $myset = $nation[level] + 1; + $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushHistory($connect, $history); +} + +function checkStatistic($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $etc = ''; + + $query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general[avggold] = round($general[avggold]); + $general[avgrice] = round($general[avgrice]); + $general[avgdex] = round($general[avgdex]); + $general[avgexpded] = round($general[avgexpded]); + $etc .= "평균 금/쌀 ({$general[avggold]}/{$general[avgrice]}), 평균/최고 숙련({$general[avgdex]}/{$general[maxdex]}), 평균/최고 경험공헌({$general[avgexpded]}/{$general[maxexpded]}), "; + + $query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + $nation[avgtech] = round($nation[avgtech]); + $nation[avgpower] = round($nation[avgpower]); + $etc .= "최저/평균/최고 기술({$nation[mintech]}/{$nation[avgtech]}/{$nation[maxtech]}), "; + $etc .= "최저/평균/최고 국력({$nation[minpower]}/{$nation[avgpower]}/{$nation[maxpower]}), "; + + $nationName = ''; + $power_hist = ''; + + $query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice 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); + for($i=0; $i < $nationCount; $i++) { + $nation = MYDB_fetch_array($result); + + $query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result2); + + $query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result2); + + $nationName .= $nation['name'].'('.getNationType($nation['type']).'), '; + $power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), "; + $nationHists[$nation['type']]++; + } + + $nationHist = ''; + for($i=1; $i <= 13; $i++) { + if(!$nationHists[$i]) { $nationHists[$i] = '-'; } + $nationHist .= getNationType($i)."({$nationHists[$i]}), "; + } + + $query = "select no from general where npc <= 1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $query = "select no from general where npc > 1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npcCount = MYDB_num_rows($result); + + $query = "select personal,special,special2 from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $generalCount = MYDB_num_rows($result); + for($i=0; $i < $generalCount; $i++) { + $general = MYDB_fetch_array($result); + + $personalHists[$general['personal']]++; + $specialHists[$general['special']]++; + $specialHists2[$general['special2']]++; + } + + $generalCountStr = "{$generalCount}({$genCount}+{$npcCount})"; + + $personalHist = ''; + for($i=0; $i < 11; $i++) { + if(!$personalHists[$i]) { $personalHists[$i] = '-'; } + $personalHist .= getGenChar($i)."({$personalHists[$i]}), "; + } + $specialHist = ''; + for($i=0; $i < 40; $i++) { + $call = getGenSpecial($i); + if($call) { + if(!$specialHists[$i]) { $specialHists[$i] = '-'; } + + $specialHist .= $call."({$specialHists[$i]}), "; + } + } + $specialHist .= '// '; + $specialHist .= "-({$specialHists2[0]}), "; + for($i=40; $i < 80; $i++) { + $call = getGenSpecial($i); + if($call) { + if(!$specialHists2[$i]) { $specialHists2[$i] = '-'; } + + $specialHist .= $call."({$specialHists2[$i]}), "; + } + } + + $crewtype = ''; + $types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43); + $count = count($types); + for($i=0; $i < $count; $i++) { + $query = "select count(*) as type from general where crewtype={$types[$i]} and crew>=100"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $crewtype .= getTypeName($types[$i])."({$general[type]}), "; + } + + $query = " + insert into statistic ( + year, month, + nation_count, nation_name, nation_hist, + gen_count, personal_hist, special_hist, power_hist, + crewtype, etc + ) values ( + '$admin[year]', '$admin[month]', + '$nationCount', '$nationName', '$nationHist', + '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', + '$crewtype', '$etc' + )"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function checkEmperior($connect) { + $query = "select year,month,isUnited from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + if($count == 1 && $admin[isUnited] == 0) { + $nation = MYDB_fetch_array($result); + + $query = "select city from city where nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + $query = "select city from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $allcount = MYDB_num_rows($result); + + if($count == $allcount) { + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name](이)가 전토를 통일"); + + $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no from general where npc<2 and age>50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + CheckHall($connect, $general[no]); + } + + $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($cityresult); + $pop = "{$city[totalpop]} / {$city[maxpop]}"; + $poprate = round($city[totalpop]/$city[maxpop]*100, 2); + $poprate .= " %"; + + $query = "select name,picture,belong from general where nation='$nation[nation]' and level='12'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $level12 = MYDB_fetch_array($genresult); + + $query = "select name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 + $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $tigernum = MYDB_num_rows($tigerresult); + for($i=0; $i < $tigernum; $i++) { + $tiger = MYDB_fetch_array($tigerresult); + if($tiger[killnum] > 0) { + $tigerstr .= "{$tiger[name]}【{$tiger[killnum]}】, "; + } + } + + $query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 + $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $eaglenum = MYDB_num_rows($eagleresult); + for($i=0; $i < $eaglenum; $i++) { + $eagle = MYDB_fetch_array($eagleresult); + if($eagle[firenum] > 0) { + $eaglestr .= "{$eagle[name]}【{$eagle[firenum]}】, "; + } + } + + $log[0] = "●$admin[year]년 $admin[month]월: $nation[name](이)가 전토를 통일하였습니다."; + + $query = "select no,name from general where nation='$nation[nation]' order by dedication desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + $gen .= "{$general[name]}, "; + + pushGenLog($general, $log); + } + + $nation[type] = getNationType($nation[type]); + + $query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $stat = MYDB_fetch_array($result); + + $query = "select count(*) as cnt from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_fetch_array($result); + + $statNC = "1 / {$stat[nc]}"; + $statGC = "{$gencount[cnt]} / {$stat[gc]}"; + + $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='$stat[nc]' limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $statNation = MYDB_fetch_array($result); + + $query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $statGeneral = MYDB_fetch_array($result); + + $query = " + insert into emperior ( + phase, + nation_count, nation_name, nation_hist, + gen_count, personal_hist, special_hist, + name, type, color, year, month, power, gennum, citynum, + pop, poprate, gold, rice, + l12name, l12pic, l11name, l11pic, + l10name, l10pic, l9name, l9pic, + l8name, l8pic, l7name, l7pic, + l6name, l6pic, l5name, l5pic, + tiger, eagle, gen, history + ) values ( + '-', + '$statNC', '$statNation[nation_name]', '$statNation[nation_hist]', + '$statGC', '$statGeneral[personal_hist]', '$statGeneral[special_hist]', + '$nation[name]', '$nation[type]', '$nation[color]', '$admin[year]', '$admin[month]', '$nation[power]', '$nation[gennum]', '$allcount', + '$pop', '$poprate', '$nation[gold]', '$nation[rice]', + '$level12[name]', '$level12[picture]', '$level11[name]', '$level11[picture]', + '$level10[name]', '$level10[picture]', '$level9[name]', '$level9[picture]', + '$level8[name]', '$level8[picture]', '$level7[name]', '$level7[picture]', + '$level6[name]', '$level6[picture]', '$level5[name]', '$level5[picture]', + '$tigerstr', '$eaglestr', '$gen', '$nation[history]' + )"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【통일】$nation[name](이)가 전토를 통일하였습니다."; + pushHistory($connect, $history); + + //연감 월결산 + LogHistory($connect); + } + } +} + +function PreprocessCommand($connect, $no) { + $query = "select no,name,city,injury,special2,item,turn0 from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) { + //특기보정 : 의술 + //의서 사용 + if($general[injury] > 0) { + $general[injury] = 0; + $query = "update general set injury=0 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "의술을 펼쳐 스스로 치료합니다!"; + pushGenLog($general, $log); + } + + $query = "select no,name,injury from general where city='$general[city]' and injury>10 order by rand()"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $patientCount = MYDB_num_rows($result); + + if($patientCount > 0) { + // 50% 확률로 치료 + $patientCount = round($patientCount * 0.5); + + $patientName = ""; + for($i=0; $i < $patientCount; $i++) { + $patient = MYDB_fetch_array($result); + + //부상 치료 + $query = "update general set injury=0 where no='$patient[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "{$general['name']}(이)가 의술로써 치료해줍니다!"; + pushGenLog($patient, $log); + + if($patientName == "") { + $patientName = $patient['name']; + } + } + + if($patientCount == 1) { + $log[0] = "의술을 펼쳐 도시의 장수 {$patientName}(을)를 치료합니다!"; + } else { + $patientCount -= 1; + $log[0] = "의술을 펼쳐 도시의 장수들 {$patientName} 외 {$patientCount}명을 치료합니다!"; + } + pushGenLog($general, $log); + } + } + + if($general[injury] > 0) { + if($general[item] >=7 && $general[item] <= 11) { + //영구약 사용 + $query = "update general set injury=0 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "".getItemName($general[item])."(을)를 사용하여 치료합니다!"; + pushGenLog($general, $log); + } elseif($general[injury] > 10 && $general[item] == 1 && $general[turn0] != EncodeCommand(0, 0, 0, 50)) { + //환약 사용 + $query = "update general set injury=0,item=0 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "환약을 사용하여 치료합니다!"; + pushGenLog($general, $log); + } elseif($general[injury] > 10) { + //부상 감소 + $query = "update general set injury=injury-10 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //부상 감소 + $query = "update general set injury=0 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } +} + +function processCommand($connect, $no) { + $query = "select npc,no,name,userlevel,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,history,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select month,killturn from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + // 블럭자는 미실행. 삭턴 감소 + if($general[block] == 2) { + $date = substr($general[turntime],11,5); + $log[count($log)] = "●{$admin[month]}월:현재 멀티, 또는 비매너로 인한블럭 대상자입니다. <1>$date"; + pushGenLog($general, $log); + + $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($general[block] == 3) { + $date = substr($general[turntime],11,5); + $log[count($log)] = "●{$admin[month]}월:현재 악성유저로 분류되어 블럭, 발언권 무효 대상자입니다. <1>$date"; + pushGenLog($general, $log); + + $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + if($general[level] >= 5 && $general[level] <= 12) { + $query = "select l{$general[level]}turn0,l{$general[level]}term from nation where nation='$general[nation]'"; + $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $core = MYDB_fetch_array($coreresult); + $corecommand = DecodeCommand($core["l{$general[level]}turn0"]); + //연속턴 아닌경우 텀 리셋 + if($core["l{$general[level]}term"]%100 != $corecommand[0]) { + $query = "update nation set l{$general[level]}term=0 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + switch($corecommand[0]) { + case 23: process_23($connect, $general); break; //포상 + case 24: process_24($connect, $general); break; //몰수 + case 27: process_27($connect, $general); break; //발령 + case 51: process_51($connect, $general); break; //항복권고 + case 52: process_52($connect, $general); break; //원조 + case 53: process_53($connect, $general); break; //통합제의 + case 61: process_61($connect, $general); break; //불가침제의 + case 62: process_62($connect, $general); break; //선전 포고 + case 63: process_63($connect, $general); break; //종전 제의 + case 64: process_64($connect, $general); break; //파기 제의 + case 65: process_65($connect, $general); break; //초토화 + case 66: process_66($connect, $general); break; //천도 + case 67: process_67($connect, $general); break; //증축 + case 68: process_68($connect, $general); break; //감축 + case 71: process_71($connect, $general); break; //필사즉생 + case 72: process_72($connect, $general); break; //백성동원 + case 73: process_73($connect, $general); break; //수몰 + case 74: process_74($connect, $general); break; //허보 + case 75: process_75($connect, $general); break; //피장파장 + case 76: process_76($connect, $general); break; //의병모집 + case 77: process_77($connect, $general); break; //이호경식 + case 78: process_78($connect, $general); break; //급습 + case 81: process_81($connect, $general); break; //국기변경 + case 99: break; //수뇌부휴식 + } + + //장수정보 재로드 + $query = "select npc,no,name,userlevel,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,history,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + } + + $command = DecodeCommand($general[turn0]); + //삭턴 처리 + if($general[npc] >= 2 || $general[killturn] > $admin[killturn]) { + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif(floor($command[0]) == 0 && $general[userlevel] < 5) { + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='$admin[killturn]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //연속턴 아닌경우 텀 리셋 + if($general[term]%100 != $command[0]) { + $query = "update general set term=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //턴 처리 + switch($command[0]) { + case 0: //휴식 + $date = substr($general[turntime],11,5); + $log[count($log)] = "●{$admin[month]}월:아무것도 실행하지 않았습니다. <1>$date"; + pushGenLog($general, $log); + break; + case 1: process_1($connect, $general, 1); break; //농업 + case 2: process_1($connect, $general, 2); break; //상업 + case 3: process_3($connect, $general); break; //기술 + case 4: process_4($connect, $general); break; //선정 + case 5: process_5($connect, $general, 1); break; //수비 + case 6: process_5($connect, $general, 2); break; //성벽 + case 7: process_7($connect, $general); break; //정착 장려 + case 8: process_8($connect, $general); break; //치안 + case 9: process_9($connect, $general); break; //조달 + + case 11: process_11($connect, $general, 1); break; //징병 + case 12: process_11($connect, $general, 2); break; //모병 + case 13: process_13($connect, $general); break; //훈련 + case 14: process_14($connect, $general); break; //사기진작 + case 15: process_15($connect, $general); break; //전투태세 + case 16: process_16($connect, $general); break; //전쟁 + case 17: process_17($connect, $general); break; //소집해제 + + case 21: process_21($connect, $general); break; //이동 + case 22: process_22($connect, $general); break; //등용 + case 25: process_25($connect, $general); break; //임관 + case 26: process_26($connect, $general); break; //집합 + case 28: process_28($connect, $general); break; //귀환 + case 29: process_29($connect, $general); break; //인재탐색 + case 30: process_30($connect, $general); break; //강행 + + case 31: process_31($connect, $general); break; //첩보 + case 32: process_32($connect, $general); break; //화계 + case 33: process_33($connect, $general); break; //탈취 + case 34: process_34($connect, $general); break; //파괴 + case 35: process_35($connect, $general); break; //선동 + case 36: process_36($connect, $general); break; //기습 + + case 41: process_41($connect, $general); break; //단련 + case 42: process_42($connect, $general); break; //견문 + case 43: process_43($connect, $general); break; //증여 + case 44: process_44($connect, $general); break; //헌납 + case 45: process_45($connect, $general); break; //하야 + case 46: process_46($connect, $general); break; //건국 + case 47: process_47($connect, $general); break; //방랑 + case 48: process_48($connect, $general); break; //장비매매 + case 49: process_49($connect, $general); break; //군량매매 + case 50: process_50($connect, $general); break; //요양 + + case 54: process_54($connect, $general); break; //선양 + case 55: process_55($connect, $general); break; //거병 + case 56: process_56($connect, $general); break; //해산 + case 57: process_57($connect, $general); break; //모반 시도 + } + } +} + +function updateCommand($connect, $no, $type=0) { + $query = "select no,nation,level from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($type == 0 || $type == 1) { // 턴처리후, 당기기 + $query = " +update general set +turn0=turn1,turn1=turn2,turn2=turn3,turn3=turn4,turn4=turn5,turn5=turn6,turn6=turn7,turn7=turn8,turn8=turn9, +turn9=turn10,turn10=turn11,turn11=turn12,turn12=turn13,turn13=turn14,turn14=turn15,turn15=turn16,turn16=turn17, +turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='00000000000000' +where no='$general[no]' +"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + if($type == 2 || ($general[level] >= 5 && $general[level] <= 12 && $type == 0)) { // 턴 처리후 수뇌부, 수뇌부 당기기 + $turn = "l{$general[level]}turn"; + $query = " +update nation set +{$turn}0={$turn}1,{$turn}1={$turn}2, +{$turn}2={$turn}3,{$turn}3={$turn}4, +{$turn}4={$turn}5,{$turn}5={$turn}6, +{$turn}6={$turn}7,{$turn}7={$turn}8, +{$turn}8={$turn}9,{$turn}9={$turn}10, +{$turn}10={$turn}11,{$turn}11='00000000000099' +where nation='$general[nation]' +"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function backupdateCommand($connect, $no, $type=0) { + $query = "select no,nation,level from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($type == 1) { // 미루기 + $query = " +update general set +turn23=turn22,turn22=turn21, +turn21=turn20,turn20=turn19, +turn19=turn18,turn18=turn17, +turn17=turn16,turn16=turn15, +turn15=turn14,turn14=turn13, +turn13=turn12,turn12=turn11, +turn11=turn10,turn10=turn9, +turn9=turn8,turn8=turn7, +turn7=turn6,turn6=turn5, +turn5=turn4,turn4=turn3, +turn3=turn2,turn2=turn1, +turn1=turn0,turn0='00000000000000' +where no='$no' +"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($type == 2) { // 수뇌부 미루기 + $turn = "l{$general[level]}turn"; + $query = " +update nation set +{$turn}11={$turn}10,{$turn}10={$turn}9, +{$turn}9={$turn}8,{$turn}8={$turn}7, +{$turn}7={$turn}6,{$turn}6={$turn}5, +{$turn}5={$turn}4,{$turn}4={$turn}3, +{$turn}3={$turn}2,{$turn}2={$turn}1, +{$turn}1={$turn}0,{$turn}0='00000000000099' +where nation='$general[nation]' +"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function updateTurntime($connect, $no) { + $query = "select year,month,isUnited,turnterm from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,name,name2,nation,troop,age,turntime,history,killturn,level,deadyear,npc,npc_org,npcmatch,npcid from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + // 삭턴장수 삭제처리 + if($general[killturn] <= 0) { + // npc유저 삭턴시 npc로 전환 + if($general[npc] == 1 && $general[deadyear] > $admin[year]) { + $npcid = "gen" . $general[npcid]; + $pw = md5("18071807"); + $general[killturn] = ($general[deadyear] - $admin[year]) * 12; + $general[npc] = $general[npc_org]; + $query = "update general set user_id='$npcid',password='$pw',npc='$general[npc]',killturn='$general[killturn]',mode=2 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[0] = "●{$admin[month]}월:$general[name2](이)가 $general[name]의 육체에서 유체이탈합니다!"; + pushAllLog($alllog); + + if($admin[isUnited] == 0) { + CheckHall($connect, $no); + } + } else { + // 군주였으면 유지 이음 + if($general[level] == 12) { + nextRuler($connect, $general); + } + + //도시의 태수, 군사, 시중직도 초기화 + $query = "update city set gen1='0' where gen1='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2='0' where gen2='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3='0' where gen3='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 부대 처리 + $query = "select no from troop where troop='$general[troop]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $troop = MYDB_fetch_array($result); + + //부대장일 경우 + if($troop[no] == $general[no]) { + // 모두 탈퇴 + $query = "update general set troop='0' where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대 삭제 + $query = "delete from troop where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set troop='0' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + // 장수 삭제 + $query = "delete from general where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //기존 국가 기술력 그대로 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견 + switch(rand()%42) { + case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 역병에 걸려 죽고 말았습니다."; break; + case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 요절하고 말았습니다."; break; + case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 거리에서 갑자기 객사하고 말았습니다."; break; + case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; + case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; + case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; + case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; + case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; + case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 수영을 하다 익사하고 말았습니다."; break; + case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 황제를 모독하다가 처형당하고 말았습니다."; break; + case 10: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; + case 11: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; + case 12: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; + case 13: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 우울증에 걸려 자살하고 말았습니다."; break; + case 14: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; + case 15: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; + case 16: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; + case 17: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 누군가의 사주로 자객에게 암살당했습니다."; break; + case 18: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 바람난 배우자에게 독살당하고 말았습니다."; break; + case 19: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; + case 20: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 죽고말았습니다."; break; + case 21: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; + case 22: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; + case 23: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; + case 24: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; + case 25: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; + case 26: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; + case 27: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; + case 28: $alllog[0] = "●{$admin[month]}월:운좋기로 소문난 $general[name](이)가 불운하게도 죽고말았습니다."; break; + case 29: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 무리하게 단련을 하다가 죽고말았습니다."; break; + case 30: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고를 비관하며 자살하고 말았습니다."; break; + case 31: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; + case 32: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 과식하다 배가 터져 죽고 말았습니다."; break; + case 33: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; + case 34: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; + case 35: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; + case 36: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; + case 37: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; + case 38: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; + case 39: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; + case 40: $alllog[0] = "●{$admin[month]}월:희대의 사기꾼 $general[name](이)가 사망했습니다."; break; + case 41: $alllog[0] = "●{$admin[month]}월:희대의 호색한 $general[name](이)가 사망했습니다."; break; + default: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; break; + } + // 엔피씨,엠피씨,의병 사망로그 + if($general[npc] == 2) { + $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; + } elseif($general[npc] >= 3) { + switch(rand()%10) { + case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 푸대접에 실망하여 떠났습니다."; break; + case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 화를 내며 떠났습니다."; break; + case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 의견차이를 좁히지 못하고 떠났습니다."; break; + case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 판단 착오였다며 떠났습니다."; break; + case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고가 나아지지 않는다며 떠났습니다."; break; + case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 기대가 너무 컸다며 떠났습니다."; break; + case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 떠났습니다."; break; + case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기 목적은 달성했다며 떠났습니다."; break; + case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기가 없어도 될것 같다며 떠났습니다."; break; + case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 처자식이 그립다며 떠났습니다."; break; + } + } + + pushAllLog($alllog); + + return; + } + } + + if($general[age] >= 80 && $general[npc] == 0) { + if($admin[isUnited] == 0) { + CheckHall($connect, $no); + } + + $query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[0] = "●{$admin[month]}월:$general[name](이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; + pushAllLog($alllog); + + $log[0] = "●나이가 들어 은퇴하고 자손에게 자리를 물려줍니다."; + pushGenLog($general, $log); + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); + } + + $turntime = addTurn($general[turntime], $admin[turnterm]); + + $query = "update general set turntime='$turntime' where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function CheckHall($connect, $no) { + $type = array( + "experience", + "dedication", + "firenum", + "warnum", + "killnum", + "winrate", + "killcrew", + "killrate", + "dex0", + "dex10", + "dex20", + "dex30", + "dex40", + "ttrate", + "tlrate", + "tprate", + "tirate", + "betgold", + "betwin", + "betwingold", + "betrate" + ); + + $query = "select name,nation,picture, + experience,dedication,warnum,firenum,killnum, + killnum/warnum*10000 as winrate,killcrew,killcrew/deathcrew*10000 as killrate, + dex0,dex10,dex20,dex30,dex40, + ttw/(ttw+ttd+ttl)*10000 as ttrate, ttw+ttd+ttl as tt, + tlw/(tlw+tld+tll)*10000 as tlrate, tlw+tld+tll as tl, + tpw/(tpw+tpd+tpl)*10000 as tprate, tpw+tpd+tpl as tp, + tiw/(tiw+tid+til)*10000 as tirate, tiw+tid+til as ti, + betgold, betwin, betwingold, betwingold/betgold*10000 as betrate + from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select nation,name,color from nation where nation='$general[nation]'"; + $nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($nationresult); + + for($k=0; $k < 21; $k++) { + $query = "select * from hall where type='$k' order by data desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + //승률,살상률인데 10회 미만 전투시 스킵 + if(($k == 5 || $k == 7) && $general[warnum]<10) { continue; } + //토너승률인데 50회 미만시 스킵 + if($k == 13 && $general[tt] < 50) { continue; } + //토너승률인데 50회 미만시 스킵 + if($k == 14 && $general[tl] < 50) { continue; } + //토너승률인데 50회 미만시 스킵 + if($k == 15 && $general[tp] < 50) { continue; } + //토너승률인데 50회 미만시 스킵 + if($k == 16 && $general[ti] < 50) { continue; } + //수익률인데 1000미만시 스킵 + if($k == 20 && $general[betgold] < 1000) { continue; } + + $rank = 10; + for($i=0; $i < $count; $i++) { + $ranker = MYDB_fetch_array($result); + + if($general[$type[$k]] >= $ranker[data]) { + $rank = $i; + break; + } + } + for($i=8; $i >= $rank; $i--) { + $j = $i + 1; + $query = "select * from hall where type='$k' and rank='$i'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $ranker = MYDB_fetch_array($result); + + $query = "update hall set name='$ranker[name]', nation='$ranker[nation]', data='$ranker[data]', color='$ranker[color]', picture='$ranker[picture]' where type='$k' and rank='$j'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $query = "update hall set name='$general[name]', nation='{$nation[name]}', data='{$general[$type[$k]]}', color='{$nation[color]}', picture='$general[picture]' where type='$k' and rank='$rank'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function info($connect, $type=0, $skin=1) { + $query = "select year,month,turnterm,maxgeneral from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + switch($admin[turnterm]) { + case 0: $termtype="120분 턴"; break; + case 1: $termtype="60분 턴"; break; + case 2: $termtype="30분 턴"; break; + case 3: $termtype="20분 턴"; break; + case 4: $termtype="10분 턴"; break; + case 5: $termtype="5분 턴"; break; + case 6: $termtype="2분 턴"; break; + case 7: $termtype="1분 턴"; break; + } + + $query = "select no from general where npc<2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + $query = "select no from general where npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + + switch($type) { + case 0: + echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + break; + case 1: + echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + break; + case 2: + echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)"; + break; + case 3: + echo "등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + break; + } +} + +function uniqueItem($connect, $general, $log, $vote=0) { + if($general[npc] >= 2 || $general[betray] > 1) { return $log; } + if($general[weap] > 6 || $general[book] > 6 || $general[horse] > 6 || $general[item] > 6) { return $log; } + + $query = "select year,month,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + + $query = "select count(*) as cnt from general where npc<2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + if($game[scenario] == 0) { $prob = $gen[cnt] * 5; } // 5~6개월에 하나씩 등장 + else { $prob = $gen[cnt]; } // 1~2개월에 하나씩 등장 + + if($vote == 1) { $prob = round($gen[cnt] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장 + elseif($vote == 2) { $prob = round($gen[cnt] / 10 / 2); } // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?) + elseif($vote == 3) { $prob = round($gen[cnt] / 10 / 4); } // 건국시 4개(20%) 등장(200명시 20국 정도 됨) + + if($prob < 3) { $prob = 3; } + //아이템 습득 상황 + if(rand() % $prob == 0) { + //셋중 선택 + $sel = rand() % 4; + switch($sel) { + case 0: $type = "weap"; break; + case 1: $type = "book"; break; + case 2: $type = "horse"; break; + case 3: $type = "item"; break; + } + $query = "select no,{$type} from general where {$type}>6"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + if($count < 20) { + for($i=0; $i < $count; $i++) { + $gen = MYDB_fetch_array($result); + $occupied[$gen[$type]] = 1; + } + for($i=7; $i <= 26; $i++) { + if($occupied[$i] == 0) { + $item[count($item)] = $i; + } + } + $it = $item[rand() % count($item)]; + + $query = "update general set {$type}='$it' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select name from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[name] == "") { + $nation[name] = "재야"; + } + + switch($sel) { + case 0: + $log[count($log)] = "".getWeapName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getWeapName($it)."(을)를 습득"); + if($vote == 0) { + $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + } elseif($vote == 1) { + $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + } elseif($vote == 2) { + $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + } elseif($vote == 3) { + $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + } + break; + case 1: + $log[count($log)] = "".getBookName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getBookName($it)."(을)를 습득"); + if($vote == 0) { + $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + } elseif($vote == 1) { + $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + } elseif($vote == 2) { + $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + } elseif($vote == 3) { + $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + } + break; + case 2: + $log[count($log)] = "".getHorseName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getHorseName($it)."(을)를 습득"); + if($vote == 0) { + $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + } elseif($vote == 1) { + $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + } elseif($vote == 2) { + $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + } elseif($vote == 3) { + $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + } + break; + case 3: + $log[count($log)] = "".getItemName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getItemName($it)."(을)를 습득"); + if($vote == 0) { + $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + } elseif($vote == 1) { + $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + } elseif($vote == 2) { + $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + } elseif($vote == 3) { + $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + } + break; + } + pushAllLog($alllog); + pushHistory($connect, $history); + } + } + return $log; +} + +function checkAbility($connect, $general, $log) { + global $_upgradeLimit; + + $limit = $_upgradeLimit; + + $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + if($general[leader2] < 0) { + $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "통솔이 1 떨어졌습니다!"; + } elseif($general[leader2] >= $limit) { + $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "통솔이 1 올랐습니다!"; + } + + if($general[power2] < 0) { + $query = "update general set power2='$limit'+power2,power=power-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "무력이 1 떨어졌습니다!"; + } elseif($general[power2] >= $limit) { + $query = "update general set power2=power2-'$limit',power=power+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "무력이 1 올랐습니다!"; + } + + if($general[intel2] < 0) { + $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "지력이 1 떨어졌습니다!"; + } elseif($general[intel2] >= $limit) { + $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "지력이 1 올랐습니다!"; + } + + return $log; +} + +function checkDedication($connect, $general, $log) { + $dedlevel = getDedLevel($general[dedication]); + + $query = "update general set dedlevel='$dedlevel' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 승급했다면 + if($general[dedlevel] < $dedlevel) { + $log[count($log)] = "".getDed($general[dedication])."(으)로 승급하여 봉록이 ".getBill($general[dedication])."(으)로 상승했습니다!"; + // 강등했다면 + } elseif($general[dedlevel] > $dedlevel) { + $log[count($log)] = "".getDed($general[dedication])."(으)로 강등되어 봉록이 ".getBill($general[dedication])."(으)로 하락했습니다!"; + } + + return $log; +} + +function checkExperience($connect, $general, $log) { + $explevel = getExpLevel($general[experience]); + + $query = "update general set explevel='$explevel' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 승급했다면 + if($general[explevel] < $explevel) { + $log[count($log)] = "Lv $explevel로 레벨업!"; + // 강등했다면 + } elseif($general[explevel] > $explevel) { + $log[count($log)] = "Lv $explevel로 레벨다운!"; + } + + return $log; +} + +//1월마다 실행 +function processSpring($connect) { + //인구 증가 + popIncrease($connect); + // 1월엔 무조건 내정 1% 감소 + $query = "update city set dead=0,agri=agri*0.99,comm=comm*0.99,secu=secu*0.99,def=def*0.99,wall=wall*0.99"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 유지비 3% 거상 1.5% + $query = "update general set gold=gold*0.97 where gold>10000 and special!=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set gold=gold*0.985 where gold>10000 and special=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 1% 거상 0.5% + $query = "update general set gold=gold*0.99 where gold>1000 and gold<=10000 and special!=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set gold=gold*0.995 where gold>1000 and gold<=10000 and special=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 5% + $query = "update nation set gold=gold*0.95 where gold>100000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 3% + $query = "update nation set gold=gold*0.97 where gold>10000 and gold<=100000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 1% + $query = "update nation set gold=gold*0.99 where gold>1000 and gold<=10000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $history[0] = "★{$admin['year']}년 {$admin['month']}월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~"; + pushHistory($connect, $history); +} + +function processGoldIncome($connect) { + global $_basegold; + + $query = "select year,month,gold_rate from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name,nation,gold,rate_tmp,bill,type from nation"; + $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); + + $incomeList = getGoldIncome($connect, $nation[nation], $nation[rate_tmp], $admin[gold_rate], $nation[type]); + $income = $incomeList[0] + $incomeList[1]; + $originoutcome = getGoldOutcome($connect, $nation[nation], 100); // 100%의 지급량 + $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 + // 실제 지급량 계산 + $nation[gold] += $income; + // 기본량도 안될경우 + if($nation[gold] < $_basegold) { + $realoutcome = 0; + // 실지급율 + $ratio = 0; + //기본량은 넘지만 요구량이 안될경우 + } elseif($nation[gold] - $_basegold < $outcome) { + $realoutcome = $nation[gold] - $_basegold; + $nation[gold] = $_basegold; + // 실지급율 + $ratio = $realoutcome / $originoutcome; + } else { + $realoutcome = $outcome; + $nation[gold] -= $realoutcome; + // 실지급율 + $ratio = $realoutcome / $originoutcome; + } + $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세금 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과금 : ".tab2($nation[gold],6," "); + + $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; + $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $corecount = MYDB_num_rows($coreresult); + $corelog[0] = "●이번 수입은 금 $income입니다."; + for($j=0; $j < $corecount; $j++) { + $coregen = MYDB_fetch_array($coreresult); + pushGenLog($coregen, $corelog); + } + + $query = "update nation set gold='$nation[gold]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name,nation,dedication,gold from general where nation='$nation[nation]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + // 각 장수들에게 지급 + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $gold = round(getBill($general[dedication])*$ratio); + $general[gold] += $gold; + + $query = "update general set gold='$general[gold]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●봉급으로 금 $gold을 받았습니다."; + pushGenLog($general, $log); + } + } + + $history[0] = "●$admin[year]년 $admin[month]월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; + pushHistory($connect, $history); + pushAdminLog($connect, $adminLog); +} + +function popIncrease($connect) { + $query = "select nation,rate_tmp,type from nation"; + $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); + $rate[$nation[nation]] = $nation[rate_tmp]; + $type[$nation[nation]] = $nation[type]; + } + + $query = "select * from city where supply='1'"; // 도시 목록 + $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); + + $pop = $city[pop]; + if($city[nation] == 0) { + $pop = $city[pop]; // 공백지는 증가하지 않게 + $cityrate = 50; + + $ratio = 0.99; // 공백지는 수비 빼고 약간씩 감소 + $agri = floor($city[agri] * $ratio); + $comm = floor($city[comm] * $ratio); + $secu = floor($city[secu] * $ratio); + $def = $city[def]; + $wall = $city[wall]; + } else { + $ratio = (20 - $rate[$city[nation]])/200; // 20일때 0% 0일때 10% 100일때 -40% + $agri = $city[agri] + floor($city[agri] * $ratio); //내정도 증감 + $comm = $city[comm] + floor($city[comm] * $ratio); + $secu = $city[secu] + floor($city[secu] * $ratio); + $def = $city[def] + floor($city[def] * $ratio); + $wall = $city[wall] + floor($city[wall] * $ratio); + $ratio = (30 - $rate[$city[nation]])/200; // 20일때 5% 5일때 12.5% 50일때 -10% + if($ratio >= 0) { + // 국가보정 + if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 1.2; } + if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 0.8; } + $ratio *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + } else { + // 국가보정 + if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 0.8; } + if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 1.2; } + $ratio *= (1 - $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 경감 + } + + $pop = $city[pop] + floor($city[pop] * $ratio) + 5000; // 기본 5000명은 증가 + + $ratio = round($ratio*100, 2); + $cityrate = $city[rate]; + $cityrate = $cityrate + (20 - $rate[$city[nation]]); + if($cityrate > 100) { $cityrate = 100; } + if($cityrate < 0) { $cityrate = 0; } + } + if($pop > $city[pop2]) { $pop = $city[pop2]; } + if($pop < 0) { $pop = 0; } + if($agri > $city[agri2]) { $agri = $city[agri2]; } + if($comm > $city[comm2]) { $comm = $city[comm2]; } + if($secu > $city[secu2]) { $secu = $city[secu2]; } + if($def > $city[def2]) { $def= $city[def2]; } + if($wall > $city[wall2]) { $wall = $city[wall2]; } + + //시세 + $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function getGoldIncome($connect, $nationNo, $rate, $admin_rate, $type) { + $query = "select no,city from general where nation='$nationNo' and level=4"; // 태수 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level4[$gen[no]] = $gen[city]; + } + $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level3[$gen[no]] = $gen[city]; + } + $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level2[$gen[no]] = $gen[city]; + } + + $query = "select capital,level from nation where nation='$nationNo'"; // 수도 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($cityresult); + + $query = "select * from city where nation='$nationNo' and supply='1'"; // 도시 목록 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($cityresult); + + //총 수입 구함 + $income[0] = 0; $income[1] = 0; // income[0] : 세수, income[1] : 수비병 세수 + for($j=0; $j < $citycount; $j++) { + $city = MYDB_fetch_array($cityresult); + + //민충 0~100 : 50~100 수입 + $ratio = $city[rate] / 2 + 50; + $tax1 = ($city[pop] * $city[comm] / $city[comm2] * $ratio / 1000) / 3; +// $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; + $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 +// $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + //도시 관직 추가 세수 + if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + //수도 추가 세수 130%~105% + if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } + + $income[0] += $tax1; +// $income[1] += $tax2; + } + $income[0] *= ($rate / 20); + + // 국가보정 + if($type == 1) { $income[0] *= 1.1; $income[1] *= 1.1; } + if($type == 9 || $type == 10 || $type == 11) { $income[0] *= 0.9; $income[1] *= 0.9; } + + $income[0] = round($income[0] * ($admin_rate/100)); + $income[1] = round($income[1] * ($admin_rate/100)); + + return $income; +} + +function processDeadIncome($connect, $admin_rate) { + $query = "select nation,type from nation where level>0"; // 도시 가진 국가 + $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); + + $income = getDeadIncome($connect, $nation[nation], $nation[type], $admin_rate); + +// 단기수입 금만적용 +// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='$nation[nation]'"; + $query = "update nation set gold=gold+'$income' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + // 10%수입, 20%부상병 + $query = "update city set pop=pop+dead*0.2,dead='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function getDeadIncome($connect, $nation, $type, $admin_rate) { + $query = "select dead from city where nation='$nation' and dead>'0' and supply='1'"; // 도시 목록 + $cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($cityResult); + + $income = 0; // 단기수입 + if($cityCount > 0) { + for($k=0; $k < $cityCount; $k++) { + $city = MYDB_fetch_array($cityResult); + + $income += $city[dead]; + } + $income /= 10; + + // 국가보정 + if($type == 1) { $income *= 1.1; } + if($type == 9 || $type == 10) { $income *= 0.9; } + + $income = round($income * $admin_rate / 100); + } + return $income; +} + +function getGoldOutcome($connect, $nation, $bill) { + $query = "select dedication from general where nation='$nation'"; // 장수 목록 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + //총 지출 구함 + $outcome = 0; + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $outcome += getBill($general[dedication]); + } + + $outcome = round($outcome * $bill / 100); + + return $outcome; +} + +//7월마다 실행 +function processFall($connect) { + //인구 증가 + popIncrease($connect); + // 7월엔 무조건 내정 1% 감소 + $query = "update city set dead=0,agri=agri*0.99,comm=comm*0.99,secu=secu*0.99,def=def*0.99,wall=wall*0.99"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 유지비 3% 거상 1.5% + $query = "update general set rice=rice*0.97 where rice>10000 and special!=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set rice=rice*0.985 where rice>10000 and special=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 1% 거상 0.5% + $query = "update general set rice=rice*0.99 where rice>1000 and rice<=10000 and special!=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set rice=rice*0.995 where rice>1000 and rice<=10000 and special=30"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 5% + $query = "update nation set rice=rice*0.95 where rice>100000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 3% + $query = "update nation set rice=rice*0.97 where rice>10000 and rice<=100000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 유지비 1% + $query = "update nation set rice=rice*0.99 where rice>2000 and rice<=10000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function processRiceIncome($connect) { + global $_baserice; + + $query = "select year,month,rice_rate from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name,nation,rice,rate_tmp,bill,type from nation"; + $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); + + $incomeList = getRiceIncome($connect, $nation[nation], $nation[rate_tmp], $admin[rice_rate], $nation[type]); + $income = $incomeList[0] + $incomeList[1]; + $originoutcome = getRiceOutcome($connect, $nation[nation], 100); // 100%의 지급량 + $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 + + // 실제 지급량 계산 + $nation[rice] += $income; + // 기본량도 안될경우 + if($nation[rice] < $_baserice) { + $realoutcome = 0; + // 실지급율 + $ratio = 0; + //기본량은 넘지만 요구량이 안될경우 + } elseif($nation[rice] - $_baserice < $outcome) { + $realoutcome = $nation[rice] - $_baserice; + $nation[rice] = $_baserice; + // 실지급율 + $ratio = $realoutcome / $originoutcome; + } else { + $realoutcome = $outcome; + $nation[rice] -= $realoutcome; + // 실지급율 + $ratio = $realoutcome / $originoutcome; + } + $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세곡 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과곡 : ".tab2($nation[rice],6," "); + + $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; + $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $corecount = MYDB_num_rows($coreresult); + $corelog[0] = "●이번 수입은 쌀 $income입니다."; + for($j=0; $j < $corecount; $j++) { + $coregen = MYDB_fetch_array($coreresult); + pushGenLog($coregen, $corelog); + } + + $query = "update nation set rice='$nation[rice]' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name,nation,dedication,rice from general where nation='$nation[nation]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + // 각 장수들에게 지급 + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $rice = round(getBill($general[dedication])*$ratio); + $general[rice] += $rice; + + $query = "update general set rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●봉급으로 쌀 $rice을 받았습니다."; + pushGenLog($general, $log); + } + } + + $history[0] = "●$admin[year]년 $admin[month]월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; + pushHistory($connect, $history); + pushAdminLog($connect, $adminLog); +} + +function getRiceIncome($connect, $nationNo, $rate, $admin_rate, $type) { + $query = "select no,city from general where nation='$nationNo' and level=4"; // 태수 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level4[$gen[no]] = $gen[city]; + } + $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level3[$gen[no]] = $gen[city]; + } + $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($j=0; $j < $count; $j++) { + $gen = MYDB_fetch_array($result); + $level2[$gen[no]] = $gen[city]; + } + + $query = "select capital,level from nation where nation='$nationNo'"; // 수도 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($cityresult); + + $query = "select * from city where nation='$nationNo' and supply='1'"; // 도시 목록 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($cityresult); + + //총 수입 구함 + $income[0] = 0; $income[1] = 0; // income[0] : 세수, income[1] : 수비병 세수 + for($j=0; $j < $citycount; $j++) { + $city = MYDB_fetch_array($cityresult); + + //민충 0~100 : 50~100 수입 + $ratio = $city[rate] / 2 + 50; + $tax1 = ($city[pop] * $city[agri] / $city[agri2] * $ratio / 1000) / 3; + $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; + $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + //도시 관직 추가 세수 + if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + //수도 추가 세수 130%~105% + if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } + $income[0] += $tax1; + $income[1] += $tax2; + } + $income[0] *= ($rate / 20); + + // 국가보정 + if($type == 8) { $income[0] *= 1.1; $income[1] *= 1.1; } + if($type == 2 || $type == 4 || $type == 13) { $income[0] *= 0.9; $income[1] *= 0.9; } + + $income[0] = round($income[0] * ($admin_rate/100)); + $income[1] = round($income[1] * ($admin_rate/100)); + + return $income; +} + +function getRiceOutcome($connect, $nation, $bill) { + $query = "select dedication from general where nation='$nation'"; // 장수 목록 + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + //총 지출 구함 + $outcome = 0; + for($j=0; $j < $gencount; $j++) { + $general = MYDB_fetch_array($genresult); + $outcome += getBill($general[dedication]); + } + + $outcome = round($outcome * $bill / 100); + + return $outcome; +} + +function tradeRate($connect) { + $query = "select city,level,trade from city"; // 도시 목록 + $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); + //시세 + switch($city[level]) { + case 1: $per = 0; break; + case 2: $per = 0; break; + case 3: $per = 0; break; + case 4: $per = 20; break; + case 5: $per = 40; break; + case 6: $per = 60; break; + case 7: $per = 80; break; + case 8: $per = 100; break; + default:$per = 0; break; + } + if($per > rand()%100) { + $trade = rand() % 11 + 95; + } else { + $trade = 0; + } + $query = "update city set trade='$trade' where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function disaster($connect) { + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //재난표시 초기화 + $query = "update city set state=0 where state<=10"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 초반 3년은 스킵 + if($admin[startyear] + 3 > $admin[year]) return; + + $query = "select city,name,secu,secu2 from city"; // 도시 목록 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($cityresult); + + $disastertype = rand() % 4; + $isgood = 0; + if($admin[month] == 4 && $disastertype == 3) { $isgood = 1; } + if($admin[month] == 7 && $disastertype == 3) { $isgood = 1; } + + for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($cityresult); + //호황 발생 도시 선택 ( 기본 3% 이므로 약 3개 도시 ) + //재해 발생 도시 선택 ( 기본 6% 이므로 약 6개 도시 ) + if($isgood == 1) { $ratio = 3 + round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% + else { $ratio = 6 - round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% + + if(rand()%100+1 < $ratio) { + $disastercity[count($disastercity)] = $city[city]; + $disasterratio[count($disastercity)] = 1.0 * $city[secu] / $city[secu2]; + $disastername .= $city[name]." "; + } + } + + $disastername = "{$disastername}"; + + //재해 처리 + if(count($disastercity)) { + $state = 0; + switch($admin[month]) { + //봄 + case 1: + switch($disastertype) { + case 0: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; + $state = 4; + break; + case 1: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $state = 5; + break; + case 2: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; + $state = 3; + break; + case 3: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $state = 9; + break; + } + break; + //여름 + case 4: + switch($disastertype) { + case 0: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; + $state = 7; + break; + case 1: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $state = 5; + break; + case 2: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; + $state = 6; + break; + case 3: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; + $state = 2; + $isGood = 1; + break; + } + break; + //가을 + case 7: + switch($disastertype) { + case 0: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; + $state = 8; + break; + case 1: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $state = 5; + break; + case 2: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; + $state = 8; + break; + case 3: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; + $state = 1; + $isGood = 1; + break; + } + break; + //겨울 + case 10: + switch($disastertype) { + case 0: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; + $state = 3; + break; + case 1: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $state = 5; + break; + case 2: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; + $state = 3; + break; + case 3: + $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $state = 9; + break; + } + break; + } + + if($isgood == 0) { + for($i=0; $i < count($disastercity); $i++) { + $ratio = 15 * $disasterratio[$i]; + $ratio = (80 + $ratio) / 100.0; // 치안률 따라서 80~95% + + $query = "update city set state='$state',pop=pop*{$ratio},rate=rate*{$ratio},agri=agri*{$ratio},comm=comm*{$ratio},secu=secu*{$ratio},def=def*{$ratio},wall=wall*{$ratio} where city='$disastercity[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + TrickInjury($connect, $disastercity[$i], 1); + } + } else { + for($i=0; $i < count($disastercity); $i++) { + $ratio = 4 * $disasterratio[$i]; + $ratio = (101 + $ratio) / 100.0; // 치안률 따라서 101~105% + + $city = getCity($connect, $disastercity[$i]); + $city[pop] *= $ratio; $city[rate] *= $ratio; $city[agri] *= $ratio; + $city[comm] *= $ratio; $city[secu] *= $ratio; $city[def] *= $ratio; + $city[wall] *= $ratio; + + if($city[pop] > $city[pop2]) { $city[pop] = $city[pop2]; } + if($city[rate] > 100) { $city[rate] = 100; } + if($city[agri] > $city[agri2]) { $city[agri] = $city[agri2]; } + if($city[comm] > $city[comm2]) { $city[comm] = $city[comm2]; } + if($city[secu] > $city[secu2]) { $city[secu] = $city[secu2]; } + if($city[def] > $city[def2]) { $city[def] = $city[def2]; } + if($city[wall] > $city[wall2]) { $city[wall] = $city[wall2]; } + + $query = "update city set state='$state',pop='$city[pop]',rate='$city[rate]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]',def='$city[def]',wall='$city[wall]' where city='$disastercity[$i]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } + + pushHistory($connect, $disaster); +} + +function getAdmin($connect) { + $query = "select * from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + return $admin; +} + +function getMe($connect) { + $query = "select * from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + return $me; +} + +function getTroop($connect, $troop) { + $query = "select * from troop where troop='$troop'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $troop = MYDB_fetch_array($result); + + return $troop; +} + +function getCity($connect, $city, $sel="*") { + $query = "select {$sel} from city where city='$city'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + return $city; +} + +function getNation($connect, $nation) { + $query = "select * from nation where nation='$nation'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + return $nation; +} + +function newColor($color) { + switch($color) { + case "": + case "330000": + case "FF0000": + case "800000": + case "A0522D": + case "FF6347": + case "808000": + case "008000": + case "2E8B57": + case "008080": + case "6495ED": + case "0000FF": + case "000080": + case "483D8B": + case "7B68EE": + case "800080": + case "A9A9A9": + case "000000": + $color = "FFFFFF"; break; + default: + $color = "000000"; break; + } + return $color; +} + +function backColor($color) { + return newColor($color); +} + +function ConvertLog($str, $type=1) { + if($type > 0) { + $str = str_replace("<1>", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + //$str = str_replace("", "", $str); + //$str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + } else { + $str = str_replace("<1>", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + } + + return $str; +} + +function deleteNation($connect, $general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【멸망】$nation[name]은(는) 멸망했습니다."; + + // 전 장수 재야로 // 전 장수 소속 무소속으로 + $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 도시 공백지로 + $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대 삭제 + $query = "delete from troop where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 국가 삭제 + $query = "delete from nation where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='$general[nation]' or you='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushHistory($connect, $history); +} + +function nextRuler($connect, $general) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select no,name from general where nation='$general[nation]' and level!='12' and level>='9' order by level desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $corecount = MYDB_num_rows($result); + + //npc or npc유저인 경우 후계 찾기 + if($general[npc] > 0) { + $query = "select no,name,nation,IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]')) as npcmatch2 from general where nation='$general[nation]' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; + $npcresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($npcresult); + } else { + $npccount = 0; + } + + // 수뇌부가 없으면 공헌도 최고 장수 + if($npccount > 0) { + $nextruler = MYDB_fetch_array($npcresult); + //국명 교체 + //$query = "update nation set name='$nextruler[name]' where nation='$general[nation]'"; + //MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($corecount == 0) { + $query = "select no,name from general where nation='$general[nation]' and level!='12' order by dedication desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $corecount = MYDB_num_rows($result); + + // 아무도 없으면 국가 삭제 + if($corecount == 0) { + //분쟁기록 모두 지움 + DeleteConflict($connect, $general[nation]); + deleteNation($connect, $general); + return; + } else { + $nextruler = MYDB_fetch_array($result); + } + } else { + $nextruler = MYDB_fetch_array($result); + } + + //군주 교체 + $query = "update general set level='12' where no='$nextruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //도시관직해제 + $query = "update city set gen1=0 where gen1='$nextruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //도시관직해제 + $query = "update city set gen2=0 where gen2='$nextruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //도시관직해제 + $query = "update city set gen3=0 where gen3='$nextruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받았습니다"; + + pushHistory($connect, $history); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받음."); + // 장수 삭제 및 부대처리는 checkTurn에서 +} + +function printCitysName($connect, $cityNo, $distance=1) { + $dist = distance($connect, $cityNo, $distance); + + $citynames = CityNameArray(); + $citynum = 94; + + $citystr = ""; + for($i=1; $i <= $citynum; $i++) { + + if($dist[$i] == $distance) { + $citystr = $citystr.$citynames[$i].", "; + } + } + + switch($distance) { + case 1: $color = "magenta"; break; + case 2: $color = "orange"; break; + default: $color = "yellow"; break; + } + echo "{$distance}칸 떨어진 도시 : {$citystr}
"; +} + +function backButton() { + echo " +
+"; +} + +function CoreBackButton() { + echo " +
+"; +} + +function closeButton() { + echo " +
+"; +} + +function distance($connect, $from, $maxDist=99) { + include_once("queue.php"); + + $query = "select city,path from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + for($i=0; $i < $cityNum; $i++) { + $city = MYDB_fetch_array($result); + $cityPath[$city[city]] = $city[path]; + $dist[$city[city]] = 99; + } + + $select = 0; + $queue = new Queue(20); + $queue2 = new Queue(20); + $q = $queue; + $q2 = $queue2; + $distance = $dist[$from] = 0; + $q->push($from); + while($q->getSize() > 0 || $q2->getSize() > 0) { + $distance++; + if($distance > $maxDist) return $dist; + while($q->getSize() > 0) { + $city = $q->pop(); + unset($path); + $path = explode("|", $cityPath[$city]); + for($i=0; $i < count($path); $i++) { + if($dist[$path[$i]] > $distance) { + $dist[$path[$i]] = $distance; + $q2->push($path[$i]); + } + } + } + if($select == 0) { + $q2 = $queue; + $q = $queue2; + } else { + $q = $queue; + $q2 = $queue2; + } + $select = 1 - $select; + } + + return $dist; +} + +function isClose($connect, $nation1, $nation2) { + $isClose = 0; + // $nation1의 모든 도시 + $query = "select path from city where nation='$nation1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + // 국가의 모든 도시 검색 + for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($result); + + // 각 도시당 모든 인접 도시 플래그 세팅 + $path = explode("|", $city[path]); + for($j=0; $j < count($path); $j++) { + $barrier[$path[$j]] = 1; + } + } + + // $nation2의 모든 도시 선택 + $query = "select city from city where nation='$nation2'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($result); + + if($barrier[$city[city]] == 1) { + $isClose = 1; + } + } + + return $isClose; +} + +function CharExperience($exp, $personal) { + switch($personal) { + case 0: case 1; case 6: + $exp *= 1.1; break; + case 4: case 5: case 7: case 10: + $exp *= 0.9; break; + } + $exp = round($exp); + + return $exp; +} + +function CharDedication($ded, $personal) { + switch($personal) { + case 10: + $ded *= 0.9; break; + } + $ded = round($ded); + + return $ded; +} + +function CharAtmos($atmos, $personal) { + switch($personal) { + case 2: case 4: + $atmos += 5; break; + case 0: case 9: case 10: + $atmos -= 5; break; + } + + return $atmos; +} + +function CharTrain($train, $personal) { + switch($personal) { + case 3: case 5: + $train += 5; break; + case 1: case 8: case 10: + $train -= 5; break; + } + + return $train; +} + +function CharCost($cost, $personal) { + switch($personal) { + case 7: case 8: case 9: + $cost *= 0.8; break; + case 2: case 3: case 6: + $cost *= 1.2; break; + } + + return $cost; +} + +function CharCritical($rate, $personal) { + switch($personal) { + case 10: + $rate += 10; break; + } + + return $rate; +} + +function TrickInjury($connect, $city, $type=0) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,name,nation from general where city='$city'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + if($type == 0) { + $log[0] = "●{$admin[month]}월:계략으로 인해 부상을 당했습니다."; + } else { + $log[0] = "●{$admin[month]}월:재난으로 인해 부상을 당했습니다."; + } + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + + $injury = rand() % 100; + if($injury < 30) { // 부상률 30% + $injury = floor($injury / 2) + 1; // 부상 1~16 + + $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($general, $log); + } + } +} + +function getRandTurn($term) { + switch($term) { + case 0: $randtime = rand() % 7200; break; + case 1: $randtime = rand() % 3600; break; + case 2: $randtime = rand() % 1800; break; + case 3: $randtime = rand() % 1200; break; + case 4: $randtime = rand() % 600; break; + case 5: $randtime = rand() % 300; break; + case 6: $randtime = rand() % 120; break; + case 7: $randtime = rand() % 60; break; + default:$randtime = rand() % 3600; break; + } + + $turntime = date('Y-m-d H:i:s', strtotime('now') + $randtime); + + return $turntime; +} + +function getRandTurn2($term) { + switch($term) { + case 0: $randtime = rand() % 7200; break; + case 1: $randtime = rand() % 3600; break; + case 2: $randtime = rand() % 1800; break; + case 3: $randtime = rand() % 1200; break; + case 4: $randtime = rand() % 600; break; + case 5: $randtime = rand() % 300; break; + case 6: $randtime = rand() % 120; break; + case 7: $randtime = rand() % 60; break; + default:$randtime = rand() % 3600; break; + } + + $turntime = date('Y-m-d H:i:s', strtotime('now') - $randtime); + + return $turntime; +} + +function ScoutMsg($connect, $genNum, $nationName, $who, $msgIndex) { + // 상대에게 발송 + $msgIndex++; + if($msgIndex >= 10) { $msgIndex = 0; } + + $date = date('Y-m-d H:i:s'); + //등용 서신시 장수번호/내 번호 + $me = $genNum * 10000 + $who; + $query = "update general set msgindex='$msgIndex',msg{$msgIndex}='{$nationName}(으)로 망명 권유 서신',msg{$msgIndex}_who='$me',msg{$msgIndex}_when='$date',msg{$msgIndex}_type='11' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function command_Single($connect, $turn, $command) { + $command = EncodeCommand(0, 0, 0, $command); + + $count = sizeof($turn); + $str = "con=con"; + for($i=0; $i < $count; $i++) { + $str .= ",turn{$turn[$i]}='{$command}'"; + } + $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + echo ""; + +} + +function command_Chief($connect, $turn, $command) { + $command = EncodeCommand(0, 0, 0, $command); + + $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[level] >= 5) { + $count = sizeof($turn); + $str = "type=type"; + for($i=0; $i < $count; $i++) { + $str .= ",l{$me[level]}turn{$turn[$i]}='{$command}'"; + } + $query = "update nation set {$str} where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + echo ""; +} + +function command_Other($connect, $turn, $commandtype) { + echo "
"; + $count = sizeof($turn); + for($i=0; $i < $count; $i++) { + echo ""; + } + echo ""; + echo "
"; + echo "a"; // 없으면 파폭에서 아래 스크립트 실행 안됨 + echo ""; +} + +function GetNationColors() { + $colors = array("FF0000", "800000", "A0522D", "FF6347", "FFA500", "FFDAB9", "FFD700", "FFFF00", + "7CFC00", "00FF00", "808000", "008000", "2E8B57", "008080", "20B2AA", "6495ED", "7FFFD4", + "AFEEEE", "87CEEB", "00FFFF", "00BFFF", "0000FF", "000080", "483D8B", "7B68EE", "BA55D3", + "800080", "FF00FF", "FFC0CB", "F5F5DC", "E0FFFF", "FFFFFF", "A9A9A9"); + return $colors; +} + +function EncodeCommand($fourth, $third, $double, $command) { + $str = _String::Fill2($fourth, 4, "0"); + $str .= _String::Fill2($third, 4, "0"); + $str .= _String::Fill2($double, 4, "0"); + $str .= _String::Fill2($command, 2, "0"); + return $str; +} + +function DecodeCommand($str) { + $command[3] = floor(substr($str, 0, 4)); + $command[2] = floor(substr($str, 4, 4)); + $command[1] = floor(substr($str, 8, 4)); + $command[0] = floor(substr($str, 12, 2)); + return $command; +} + +function OptionsForCitys() { + $citynames = CityNameArray(); + + for($i=1; $i <= 94; $i++) { + echo " + "; + } +} + +function Submit($url, $msg="", $msg2="") { + echo "a"; // 파폭 버그 때문 + echo " +
+ + +
+ + "; +} + +?> diff --git a/twe_close/func_auction.php b/twe_close/func_auction.php new file mode 100644 index 00000000..9ffd729c --- /dev/null +++ b/twe_close/func_auction.php @@ -0,0 +1,348 @@ + 20000) { $general[gold] = 20000; } + if($general[rice] < 1000) { $general[rice] = 1000; } + if($general[rice] > 20000) { $general[rice] = 20000; } + +/* + // 유닉템 등록 + $query = "select * from auction where stuff!='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + // 유닉템 거래가 없을 경우 1% 확률로 등장 + if($count == 0 && rand()%100 < 1) { + // 유닉템 선택 + $sel = rand() % 4 + 1; + switch($sel) { + case 1: $type = "weap"; break; + case 2: $type = "book"; break; + case 3: $type = "horse"; break; + case 4: $type = "item"; break; + } + $query = "select no,{$type} from general where {$type}>6"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + if($count < 20) { + for($i=0; $i < $count; $i++) { + $gen = MYDB_fetch_array($result); + $occupied[$gen[$type]] = 1; + } + for($i=7; $i <= 26; $i++) { + if($occupied[$i] == 0) { + $item[count($item)] = $i; + } + } + $it = $item[rand() % count($item)]; + $stuff = $it * 10 + $sel; + + //평균 금의 100% + $amount = 1; + $cost = $general[gold]; + $topv = $general[maxgold] * 10; + if($cost < 5000) { $cost = 5000; } + if($topv < 10000) { $topv = 10000; } + + $cost = round($cost / 10) * 10; + $topv = round($topv / 10) * 10; + + $term = 12; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ암시장상인', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[0] = "●{$admin[month]}월:".GetStuffName($stuff)."(이)가 거래장에 등장했습니다!"; + $history[0] = "●$admin[year]년 $admin[month]월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; + pushAllLog($alllog); + pushHistory($connect, $history); + } + } +*/ + + $query = "select * from auction where type='0' and stuff='0' and no1='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + $count += 5; + // 판매건 등록 + if(rand()%$count == 0) { + //평균 쌀의 5% ~ 25% + $mul = rand() % 5 + 1; + $amount = $general[rice] / 20 * $mul; + $cost = $general[gold] / 20 * 0.9 * $mul; + $topv = $amount * 2; + if($cost <= $amount*0.8) { $cost = $amount*0.8; } + if($cost >= $amount*1.2) { $cost = $amount*1.2; } + + $amount = round($amount / 10) * 10; + $cost = round($cost / 10) * 10; + $topv = round($topv / 10) * 10; + + $term = 3 + rand() % 10; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ상인', '0', '$amount', '$cost', '$cost', '$topv', '$date')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $query = "select * from auction where type='1' and stuff='0' and no1='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + $count += 5; + // 구매건 등록 + if(rand()%$count == 0) { + //평균 쌀의 5% ~ 25% + $mul = rand() % 5 + 1; + $amount = $general[rice] / 20 * $mul; + $cost = $general[gold] / 20 * 1.1 * $mul; + $topv = $amount * 0.5; + if($cost <= $amount*0.8) { $cost = $amount*0.8; } + if($cost >= $amount*1.2) { $cost = $amount*1.2; } + + $amount = round($amount / 10) * 10; + $cost = round($cost / 10) * 10; + $topv = round($topv / 10) * 10; + + $term = 3 + rand() % 10; + $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '0', 'ⓝ상인', '0', '$amount', '$cost', '$cost', '$topv', '$date')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function processAuction($connect) { + $date = date("Y-m-d H:i:s"); + + $query = "select year,month from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from auction where expire<='$date'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count2 = MYDB_num_rows($result2); + + for($i=0; $i < $count2; $i++) { + $auction = MYDB_fetch_array($result2); + + // 유닉템 처리 + if($auction[stuff] != 0) { + if($auction[no2] == 0) { + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, 그러나 입찰자 부재"; + pushAuctionLog($connect, $auctionLog); + } else { + $trader[no] = 0; + $trader[name] = 'ⓝ암시장상인'; + $trader[gold] = 99999999; + $trader[rice] = 99999999; + + $query = "select no,name,gold,rice from general where no='$auction[no2]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $bidder = MYDB_fetch_array($result); + + $sel1 = $auction[stuff] % 10; + $sel2 = floor($auction[stuff] / 10); + switch($sel1) { + case 1: $type = "weap"; break; + case 2: $type = "book"; break; + case 3: $type = "horse"; break; + case 4: $type = "item"; break; + } + // 이미 유닉템이 풀렸는지 검사 + $query = "select no from general where {$type}='$sel2'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + // 판매거래만 존재 + if($count > 0) { + $traderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; + $bidderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 아이템 이미 매진!"; + } elseif($auction[value] > $bidder[gold] - 1000) { + $gold = round($auction[value] * 0.01); + $bidder[gold] -= $gold; + if($bidder[gold] < 0) $bidder[gold] = 0; + $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + } else { + $traderLog[0] = "◆{$auction[no]}번 거래 성사로 ".GetStuffName($auction[stuff])."(을)를 판매, 금 {$auction[value]}(을)를 획득!"; + $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, ".GetStuffName($auction[stuff])." 구입!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; + $auctionLog[0] .= " ★ 아이템 거래 ★"; + + $query = "update general set gold=gold-'$auction[value]',{$type}='$sel2' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[0] = "●{$admin[month]}월:$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; + $history[0] = "●$admin[year]년 $admin[month]월:【암시장】$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; + pushAllLog($alllog); + pushHistory($connect, $history); + } + pushGenLog($trader, $traderLog); + pushGenLog($bidder, $bidderLog); + pushAuctionLog($connect, $auctionLog); + } + } else { + // 쌀 처리 + if($auction[no2] == 0) { + // 상인건수가 아닌것만 출력 + if($auction[no1] != 0) { + $query = "select no from general where no='$auction[no1]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $trader = MYDB_fetch_array($result); + + $traderLog[0] = "◆입찰자 부재로 {$auction[no]}번 거래 유찰!"; + if($auction[type] == 0) { + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, 그러나 입찰자 부재"; + } else { + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, 그러나 입찰자 부재"; + } + pushGenLog($trader, $traderLog); + pushAuctionLog($connect, $auctionLog); + } + } else { + if($auction[no1] == 0) { + $trader[no] = 0; + $trader[name] = 'ⓝ상인'; + $trader[gold] = 99999; + $trader[rice] = 99999; + } else { + $query = "select no,name,gold,rice from general where no='$auction[no1]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $trader = MYDB_fetch_array($result); + } + + $query = "select no,name,gold,rice from general where no='$auction[no2]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $bidder = MYDB_fetch_array($result); + //판매거래 + if($auction[type] == 0) { + if($auction[amount] > $trader[rice] - 1000) { + $gold = round($auction[value] * 0.01); + $trader[gold] -= $gold; + if($trader[gold] < 0) $trader[gold] = 0; + $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $traderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; + $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; + } elseif($auction[value] > $bidder[gold] - 1000) { + $gold = round($auction[value] * 0.01); + $bidder[gold] -= $gold; + if($bidder[gold] < 0) $bidder[gold] = 0; + $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + } else { + $traderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; + $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; + if($auction[value] >= $auction[amount] * 2) { + $auctionLog[0] .= " ★ 최고가 거래 ★"; + } elseif($auction[value] >= $auction[topv]) { + $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; + } elseif($auction[value] * 2 <= $auction[amount]) { + $auctionLog[0] .= " ★ 최저가 거래 ★"; + } + $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no1]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushGenLog($trader, $traderLog); + pushGenLog($bidder, $bidderLog); + pushAuctionLog($connect, $auctionLog); + //구매거래 + } else { + if($auction[amount] > $bidder[rice] - 1000) { + $gold = round($auction[value] * 0.01); + $bidder[gold] -= $gold; + if($bidder[gold] < 0) $bidder[gold] = 0; + $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; + } elseif($auction[value] > $trader[gold] - 1000) { + $gold = round($auction[value] * 0.01); + $trader[gold] -= $gold; + if($trader[gold] < 0) $trader[gold] = 0; + $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $traderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; + $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; + } else { + $traderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; + $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; + $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 판매"; + if($auction[value] >= $auction[amount] * 2) { + $auctionLog[0] .= " ★ 최고가 거래 ★"; + } elseif($auction[value] * 2 <= $auction[amount]) { + $auctionLog[0] .= " ★ 최저가 거래 ★"; + } elseif($auction[value] <= $auction[topv]) { + $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; + } + + $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no1]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushGenLog($trader, $traderLog); + pushGenLog($bidder, $bidderLog); + pushAuctionLog($connect, $auctionLog); + } + } + } + } + + $query = "delete from auction where expire<='$date'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +?> diff --git a/twe_close/func_history.php b/twe_close/func_history.php new file mode 100644 index 00000000..bd18360c --- /dev/null +++ b/twe_close/func_history.php @@ -0,0 +1,131 @@ +{$year}년 {$month}월:"; + for($i=0; $i < $count; $i++) { + $line = $log[count($log)-2-$i]; + if($line == "") { + continue; + } + + if(strpos($line, $prefix) || $isFirst == 1) { + $str = ConvertLog($line).'
'.$str; + } else { + break; + } + } + if($str == "") { + $str = "●{$year}년 {$month}월: 기록 없음"; + $str = ConvertLog($str); + } + return $str; +} + +function getGenHistory($count, $year, $month, $isFirst=0) { + $fp = @fopen("logs/_alllog.txt", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $log = explode("\r\n",$file); + + $str = ""; + $prefix = "{$month}월:"; + $year -= 1; + $prefixYear = "{$month}월:{$year}"; + for($i=0; $i < $count; $i++) { + $line = $log[count($log)-2-$i]; + if($line == "") { + continue; + } + + if(strpos($line, $prefixYear)) { + break; + } elseif(strpos($line, $prefix) || $isFirst == 1) { + $str = ConvertLog($line).'
'.$str; + } else { + break; + } + } + if($str == "") { + $str = "●{$month}월: 기록 없음"; + $str = ConvertLog($str); + } + return $str; +} + +function LogHistory($connect, $isFirst=0) { + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Start'); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + if($isFirst == 1) { + $admin['year'] -= 1; + $admin['month'] = 12; + } + + $file = explode('/', __FILE__); + $url = '/'.$file[count($file)-3].'/'.$file[count($file)-2].'/map.php?type=2&graphic=0'; + + /* 소켓 통신을 통하여 필요한 html정보를 가져옴 */ + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Start HTTP'); + $http = new HTTP("62che.com", 80, 10); + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Connect end, '.$http->GetError()); + if($http->GetErr() == true) { return false; } + $http->setHttpVersion("1.1"); + $cookie = ""; + $http->Get($url, $cookie); + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Response end, '.$http->GetError()); + if($http->GetErr() == true) { return false; } + $map = $http->Response["body"]; + $map = str_replace("'", '<_quot_>', $map); + $map = str_replace('"', '<_dquot_>', $map); + $http->Close(); + if($http->GetErr() == true) { return false; } + + $log = getHistory(20, $admin['year'], $admin['month'], $isFirst); + $genlog = getGenHistory(50, $admin['year'], $admin['month'], $isFirst); + + $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); + + $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); + + $nationStr .= " $nation[name]
"; + $powerStr .= "국력 $nation[power]
"; + $genStr .= "장수 $nation[gennum]
"; + $cityStr .= "속령 $citycount
"; + } + + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', contents collected'); + + @MYDB_query(" + insert into history ( + year, month, map, log, genlog, nation, power, gen, city + ) values ( + '$admin[year]', '$admin[month]', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' + )", + $connect) or Error(__LINE__.MYDB_error($connect),""); + + if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Finish'); + return true; +} +?> diff --git a/twe_close/func_http.php b/twe_close/func_http.php new file mode 100644 index 00000000..09dd69d3 --- /dev/null +++ b/twe_close/func_http.php @@ -0,0 +1,288 @@ +Server = $Server; + $this->Port = $Port; + $this->Timeout = $Timeout; + + $this->Socket = @fsockopen ($this->Server, $this->Port, $errno, $errstr, $this->Timeout); + if(!$this->Socket){ + $this->Error(0, "Socket Connection Fail"); + } + } + + function setTimeout($Timeout){ + $this->Timeout = $Timeout; + } + + function setHttpVersion($HttpVersion){ + $this->HttpVersion = $HttpVersion; + } + + function Head($Url = "/") { + $this->Url = $Url; + $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + + return $this->Read(); + } + + function isHead($Url = "/"){ + $this->Url = $Url; + $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + if($Cookie != ""){ + $msg .= $this->PutCookie($Cookie); + } + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + + return $this->isOK(); + } + + function GetHead($Url = "/") { + $this->Url = $Url; + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + $out = $this->ReadHeader(); + return $out; + } + + function Get($Url = "/", $Cookie="") { + $this->Url = $Url; + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + if($Cookie != ""){ + $msg .= $this->PutCookie($Cookie); + } + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + return $this->Read(); + } + + function isGet($Url = "/", $Cookie=""){ + $this->Url = $Url; + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + if($Cookie != ""){ + $msg .= $this->PutCookie($Cookie); + } + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + return $this->isOK(); + } + + function isGetAll($Url = "/", $Cookie=""){ + $this->Url = $Url; + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + if($Cookie != ""){ + $msg .= $this->PutCookie($Cookie); + } + $msg .= $this->PutHead(); + $msg .= "\n\n"; + fputs($this->Socket, $msg); + + $data = $this->Read(); + $this->Length = strlen($data); + return $this->isOK($data); + } + + function Post($Url, $Data, $Cookie = ""){ + $this->Url = $Url; + fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); + if($Cookie != ""){ + $this->PutCookie($Cookie); + } + $this->PutHead(); + fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); + $out = ""; + while (list ($k, $v) = each ($Data)) { + if(strlen($out) != 0) $out .= "&"; + $out .= rawurlencode($k). "=" .rawurlencode($v); + } + fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); + fputs ($this->Socket, "$out"); + fputs ($this->Socket, "\n"); + return $this->Read(); + } + + function IsPost($Url, $Data, $Cookie = ""){ + $this->Url = $Url; + fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); + if($Cookie != ""){ + $this->PutCookie($Cookie); + } + $this->PutHead(); + fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); + $out = ""; + while (list ($k, $v) = each ($Data)) { + if(strlen($out) != 0) $out .= "&"; + $out .= rawurlencode($k). "=" .rawurlencode($v); + } + fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); + fputs ($this->Socket, "$out"); + fputs ($this->Socket, "\n"); + return $this->isOk(); + } + + function PutHead(){ + $msg = ""; + $msg .= "Accept: */*\r\n"; + $msg .= "Accept-Language: ko\r\n"; + $msg .= "Accept-Encoding: gzip, deflate\r\n"; + $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\r\n"; + while (list($name, $value) = each ($this->headers)) { + $msg .= "$name: $value\r\n"; + } + $msg .= "Host: ".$this->Server.":".$this->Port."\r\n"; + $msg .= "Connection: close\r\n"; + return $msg; + } + + function AddHeader($name, $value){ + $this->headers[$name] = $value; + } + + function PutCookie($cookie){ + $msg = ""; + if(is_array($cookie)){ + $out = ""; + while (list ($k, $v) = each ($cookie)) { + if(strlen($out) != 0) $out .= ";"; + $out .= rawurlencode($k). "=" .rawurlencode($v); + } + $msg = "Cookie: $out\n"; + } else { + $msg = "Cookie: $cookie\n"; + } + return $msg; + } + + function Read(){ + $out = $this->ReadHeader(); + $chunked = isset($this->Response['transfer-encoding']) && ('chunked' == $this->Response['transfer-encoding']); + $gzipped = isset($this->Response['content-encoding']) && ('gzip' == $this->Response['content-encoding']); + $body = ''; + while(!feof($this->Socket)){ + if ($chunked) { + $buf = $this->_readChunked(); + } else { + $buf = fread($this->Socket, 4096); + } + $body .= $buf; + } + if($gzipped){ + $body = gzinflate(substr($body, 10)); + } + $this->Response['body'] = $body; + $out .= $body; + return $out; + } + + function ReadHeader(){ + $out = ''; + $buf = $this->_readLine(); + if (sscanf($buf, 'HTTP/%s %s', $http_version, $returncode) != 2) { + $this->Error(0,"Malformed response"); + return false; + } else { + $this->Response["protocol"] = 'HTTP/' . $http_version; + $this->Response["code"] = intval($returncode); + } + $out .= $buf; + while(!feof($this->Socket)){ + $buf = $this->_readLine(); + $out .= $buf; + + if($buf == "\n" || $buf == "\r\n"){ + break; + } + + list($name,$value) = split(":",rtrim($buf,"\r\n"),2); + $this->Response[strtolower($name)] = trim($value); + } + $this->Response["header"] = $out; + return $out; + } + + function isOk($buffer = ""){ + if($buffer == "") $buffer .= fgets($this->Socket, 128); + if(preg_match('/^HTTP\/.* (2\d{2}|3\d{2}).*/', $buffer)){ + return true; + } + return false; + } + + function _readLine(){ + $line = ''; + while(!feof($this->Socket)){ + $line .= fgets($this->Socket, 4096); + if (substr($line, -2) == "\r\n" || substr($line, -1) == "\n") { + return $line; + } + } + return $line; + } + + function _readAll(){ + $data = ''; + while(!feof($this->Socket)){ + $data .= fread($this->Socket, 4096); + } + return $data; + } + + function _readChunked(){ + // at start of the next chunk? + if (0 == $this->_chunkLength) { + $line = $this->_readLine(); + if (preg_match('/^([0-9a-f]+)/i', $line, $matches)) { + $this->_chunkLength = hexdec($matches[1]); + // Chunk with zero length indicates the end + if (0 == $this->_chunkLength) { + $this->_readAll(); // make this an eof() + return ''; + } + } + } + $data = fread($this->Socket, $this->_chunkLength); + $this->_chunkLength -= strlen($data); + if (0 == $this->_chunkLength) { + $this->_readLine(); // Trailing CRLF + } + return $data; + } + + function Close(){ + fclose($this->Socket); + } + + function Error($errnum, $errmsg){ + $this->Err = true; + $this->ErrNum = $errnum; + $this->ErrMsg = $errmsg; + } + + function GetErr() { + return $this->Err; + } + + function GetError() { + if($this->Err == true) { + return "{$this->ErrNum}, {$this->ErrMsg}"; + } else { + return "No Err"; + } + } +} +?> \ No newline at end of file diff --git a/twe_close/func_npc.php b/twe_close/func_npc.php new file mode 100644 index 00000000..9c8f7d1d --- /dev/null +++ b/twe_close/func_npc.php @@ -0,0 +1,1864 @@ + 0) { + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1492, 123, "가화",$img,1492, 0, "-", 50, 66, 40, 0, 176, 224, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1493, 999, "건석",$img,1493, 0, "-", 21, 12, 61, 0, 155, 189, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1494, 999, "견씨",$img,1494, 0, "-", 35, 24, 58, 0, 182, 221, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1495, 40, "견홍",$img,1495, 0, "-", 76, 72, 66, 0, 224, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1496, 120, "고담",$img,1496, 0, "-", 33, 21, 69, 0, 203, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1497, 101, "고유",$img,1497, 0, "-", 56, 44, 73, 0, 174, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1498, 132, "곽마",$img,1498, 0, "-", 68, 71, 49, 0, 239, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1499, 39, "관구수",$img,1499, 0, "-", 58, 63, 35, 0, 206, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1500, 39, "관구전",$img,1500, 0, "-", 63, 58, 68, 0, 224, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1501, 999, "관로",$img,1501, 0, "-", 62, 21, 75, 0, 191, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1502, 65, "관정",$img,1502, 0, "-", 35, 50, 73, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1503, 137, "교수",$img,1503, 0, "-", 67, 69, 39, 0, 143, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1504, 33, "구건",$img,1504, 0, "-", 43, 56, 69, 0, 239, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1505, 41, "구본",$img,1505, 0, "-", 52, 41, 70, 0, 232, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1506, 12, "구성",$img,1506, 0, "-", 56, 71, 31, 0, 157, 187, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1507, 21, "국연",$img,1507, 0, "-", 52, 21, 71, 0, 160, 219, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1508, 99, "국의",$img,1508, 0, "-", 83, 79, 50, 0, 146, 191, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1509, 34, "금의",$img,1509, 0, "-", 18, 40, 63, 0, 177, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1510, 76, "나헌",$img,1510, 0, "-", 86, 67, 75, 0, 218, 270, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1511, 999, "남두",$img,1511, 0, "-", 35, 25, 54, 0, 130, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1512, 54, "냉포",$img,1512, 0, "-", 70, 82, 69, 0, 176, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1513, 124, "노숙2",$img,1513, 0, "-", 70, 55, 76, 0, 208, 274, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1514, 42, "누규",$img,1514, 0, "-", 54, 19, 88, 0, 143, 212, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1515, 6, "누반",$img,1515, 0, "-", 65, 76, 39, 0, 178, 207, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1516, 130, "누현",$img,1516, 0, "-", 23, 20, 68, 0, 223, 275, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1517, 40, "당균",$img,1517, 0, "-", 33, 19, 81, 0, 229, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1518, 32, "당빈",$img,1518, 0, "-", 70, 74, 62, 0, 235, 294, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1519, 999, "대교",$img,1519, 0, "-", 42, 10, 54, 0, 177, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1520, 28, "대릉",$img,1520, 0, "-", 64, 75, 45, 0, 199, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1521, 129, "동조",$img,1521, 0, "-", 16, 15, 51, 0, 221, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1522, 114, "등수",$img,1522, 0, "-", 35, 20, 44, 0, 228, 288, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1523, 50, "마막",$img,1523, 0, "-", 22, 17, 5, 0, 221, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1524, 116, "만욱",$img,1524, 0, "-", 20, 18, 66, 0, 240, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1525, 120, "맹종",$img,1525, 0, "-", 48, 48, 67, 0, 216, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1526, 38, "문호",$img,1526, 0, "-", 65, 74, 45, 0, 227, 279, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1527, 999, "미씨",$img,1527, 0, "-", 59, 15, 68, 0, 176, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1528, 39, "반림",$img,1528, 0, "-", 66, 79, 8, 0, 168, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1529, 129, "반장",$img,1529, 0, "-", 77, 78, 69, 0, 177, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1530, 94, "방열",$img,1530, 0, "-", 58, 82, 28, 0, 153, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1531, 55, "방희",$img,1531, 0, "-", 59, 38, 69, 0, 153, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1532, 30, "배수",$img,1532, 0, "-", 10, 11, 77, 0, 223, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1533, 8, "번능",$img,1533, 0, "-", 70, 61, 47, 0, 158, 194, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1534, 999, "번씨",$img,1534, 0, "-", 32, 17, 45, 0, 176, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1535, 49, "보도근",$img,1535, 0, "-", 64, 73, 50, 0, 170, 233, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1536, 129, "보천",$img,1536, 0, "-", 68, 60, 72, 0, 222, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1537, 121, "보협",$img,1537, 0, "-", 73, 53, 75, 0, 216, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1538, 28, "부하",$img,1538, 0, "-", 44, 36, 85, 0, 209, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1539, 26, "비요",$img,1539, 0, "-", 70, 65, 73, 0, 192, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1540, 31, "사마주",$img,1540, 0, "-", 63, 53, 62, 0, 227, 283, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1541, 41, "사찬",$img,1541, 0, "-", 61, 71, 54, 0, 215, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1542, 128, "설후",$img,1542, 0, "-", 16, 14, 71, 0, 221, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1543, 36, "성공영",$img,1543, 0, "-", 73, 58, 80, 0, 172, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1544, 126, "성만",$img,1544, 0, "-", 61, 69, 66, 0, 225, 276, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1545, 999, "소교",$img,1545, 0, "-", 57, 23, 66, 0, 178, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1546, 46, "소유",$img,1546, 0, "-", 51, 61, 48, 0, 164, 210, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1547, 31, "소제2",$img,1547, 0, "-", 22, 16, 78, 0, 224, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1548, 126, "손교",$img,1548, 0, "-", 77, 60, 69, 0, 181, 219, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1549, 116, "손기",$img,1549, 0, "-", 62, 65, 52, 0, 227, 276, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1550, 999, "손상향",$img,1550, 0, "-", 72, 62, 42, 0, 193, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1551, 125, "손익",$img,1551, 0, "-", 69, 75, 26, 0, 184, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1552, 125, "손진",$img,1552, 0, "-", 64, 71, 48, 0, 234, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1553, 123, "송겸",$img,1553, 0, "-", 61, 48, 44, 0, 175, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1554, 85, "순심",$img,1554, 0, "-", 20, 21, 79, 0, 164, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1555, 31, "순욱2",$img,1555, 0, "-", 10, 16, 77, 0, 225, 289, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1556, 31, "순의",$img,1556, 0, "-", 16, 11, 73, 0, 207, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1557, 129, "시삭",$img,1557, 0, "-", 36, 66, 44, 0, 226, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1558, 29, "신창",$img,1558, 0, "-", 51, 29, 46, 0, 210, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1559, 999, "악신",$img,1559, 0, "-", 53, 12, 46, 0, 175, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1560, 138, "악취",$img,1560, 0, "-", 56, 68, 58, 0, 157, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1561, 138, "양강",$img,1561, 0, "-", 62, 70, 42, 0, 160, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1562, 21, "양부",$img,1562, 0, "-", 68, 55, 85, 0, 178, 239, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1563, 72, "양서",$img,1563, 0, "-", 56, 62, 66, 0, 198, 260, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1564, 34, "양습",$img,1564, 0, "-", 67, 49, 73, 0, 168, 230, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1565, 16, "양앙",$img,1565, 0, "-", 65, 70, 39, 0, 172, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1566, 17, "양임",$img,1566, 0, "-", 71, 78, 56, 0, 170, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1567, 32, "양제",$img,1567, 0, "-", 69, 63, 71, 0, 226, 291, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1568, 33, "양조2",$img,1568, 0, "-", 65, 61, 67, 0, 223, 286, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1569, 48, "양추2",$img,1569, 0, "-", 66, 67, 61, 0, 172, 238, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1570, 140, "양홍",$img,1570, 0, "-", 19, 17, 76, 0, 152, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1571, 31, "양혼",$img,1571, 0, "-", 60, 67, 63, 0, 220, 278, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1572, 123, "여거",$img,1572, 0, "-", 71, 58, 69, 0, 196, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1573, 130, "여대",$img,1573, 0, "-", 83, 72, 70, 0, 161, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1574, 136, "염상",$img,1574, 0, "-", 29, 27, 69, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1575, 36, "염행",$img,1575, 0, "-", 70, 86, 38, 0, 159, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1576, 73, "영수",$img,1576, 0, "-", 69, 70, 74, 0, 234, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1577, 39, "오거",$img,1577, 0, "-", 49, 63, 32, 0, 151, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1578, 126, "오경",$img,1578, 0, "-", 73, 60, 57, 0, 159, 203, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1579, 999, "오국태",$img,1579, 0, "-", 31, 11, 60, 0, 161, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1580, 126, "오찬",$img,1580, 0, "-", 69, 41, 78, 0, 181, 245, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1581, 23, "온회",$img,1581, 0, "-", 42, 40, 78, 0, 178, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1582, 21, "왕기2",$img,1582, 0, "-", 70, 66, 63, 0, 217, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1583, 32, "왕도",$img,1583, 0, "-", 48, 44, 70, 0, 210, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1584, 123, "왕돈",$img,1584, 0, "-", 60, 65, 41, 0, 198, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1585, 34, "왕릉",$img,1585, 0, "-", 73, 60, 71, 0, 172, 251, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1586, 63, "왕문",$img,1586, 0, "-", 64, 67, 32, 0, 162, 205, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1587, 32, "왕상",$img,1587, 0, "-", 25, 19, 65, 0, 180, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1588, 34, "왕숙",$img,1588, 0, "-", 35, 21, 80, 0, 195, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1589, 33, "왕업",$img,1589, 0, "-", 32, 6, 46, 0, 220, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1590, 35, "왕충",$img,1590, 0, "-", 42, 58, 21, 0, 152, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1591, 1, "우보",$img,1591, 0, "-", 43, 63, 12, 0, 159, 192, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1592, 122, "우사",$img,1592, 0, "-", 70, 33, 79, 0, 217, 273, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1593, 138, "원요",$img,1593, 0, "-", 44, 42, 45, 0, 177, 206, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1594, 95, "원유",$img,1594, 0, "-", 57, 38, 73, 0, 150, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1595, 31, "위관",$img,1595, 0, "-", 69, 45, 81, 0, 220, 291, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1596, 129, "위막",$img,1596, 0, "-", 58, 62, 60, 0, 221, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1597, 55, "유괴",$img,1597, 0, "-", 75, 72, 66, 0, 165, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1598, 129, "유략",$img,1598, 0, "-", 72, 68, 59, 0, 206, 260, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1599, 45, "유반",$img,1599, 0, "-", 74, 79, 48, 0, 168, 210, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1600, 29, "유복",$img,1600, 0, "-", 54, 50, 73, 0, 164, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1601, 78, "유선2",$img,1601, 0, "-", 9, 21, 39, 0, 224, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1602, 139, "유섭",$img,1602, 0, "-", 62, 79, 26, 0, 158, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1603, 28, "유소",$img,1603, 0, "-", 66, 51, 73, 0, 195, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1604, 128, "유승",$img,1604, 0, "-", 46, 69, 29, 0, 215, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1605, 129, "유찬",$img,1605, 0, "-", 74, 75, 66, 0, 172, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1606, 129, "유평",$img,1606, 0, "-", 65, 70, 67, 0, 218, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1607, 138, "유훈",$img,1607, 0, "-", 51, 64, 50, 0, 163, 216, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1608, 48, "이감",$img,1608, 0, "-", 59, 67, 33, 0, 176, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1609, 19, "이승",$img,1609, 0, "-", 13, 26, 32, 0, 201, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1610, 22, "이통",$img,1610, 0, "-", 75, 84, 52, 0, 168, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1611, 138, "이풍2",$img,1611, 0, "-", 72, 77, 50, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1612, 20, "이풍3",$img,1612, 0, "-", 23, 25, 71, 0, 204, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1613, 29, "장구",$img,1613, 0, "-", 69, 71, 47, 0, 201, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1614, 21, "장기",$img,1614, 0, "-", 77, 35, 79, 0, 170, 223, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1615, 74, "장남",$img,1615, 0, "-", 71, 64, 38, 0, 187, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1616, 100, "장막",$img,1616, 0, "-", 53, 52, 70, 0, 155, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1617, 7, "장만성",$img,1617, 0, "-", 73, 83, 47, 0, 143, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1618, 135, "장반",$img,1618, 0, "-", 56, 73, 66, 0, 227, 282, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1619, 78, "장빈",$img,1619, 0, "-", 30, 28, 67, 0, 216, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1620, 124, "장승",$img,1620, 0, "-", 75, 68, 75, 0, 178, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1621, 999, "장양2",$img,1621, 0, "-", 58, 50, 47, 0, 130, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1622, 68, "장억",$img,1622, 0, "-", 82, 80, 54, 0, 190, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1623, 75, "장준",$img,1623, 0, "-", 65, 67, 66, 0, 224, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1624, 20, "장집",$img,1624, 0, "-", 31, 27, 74, 0, 196, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1625, 39, "장특",$img,1625, 0, "-", 71, 53, 74, 0, 209, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1626, 96, "저곡",$img,1626, 0, "-", 57, 53, 67, 0, 184, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1627, 128, "전기",$img,1627, 0, "-", 51, 69, 55, 0, 231, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1628, 23, "전만",$img,1628, 0, "-", 52, 74, 38, 0, 181, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1629, 128, "전상",$img,1629, 0, "-", 5, 6, 11, 0, 208, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1630, 130, "전역",$img,1630, 0, "-", 60, 62, 37, 0, 212, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1631, 75, "전예",$img,1631, 0, "-", 80, 62, 83, 0, 171, 252, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1632, 64, "전해",$img,1632, 0, "-", 71, 63, 57, 0, 154, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1633, 123, "정봉2",$img,1633, 0, "-", 67, 68, 52, 0, 198, 266, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1634, 22, "정의",$img,1634, 0, "-", 17, 3, 66, 0, 184, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1635, 81, "제갈교",$img,1635, 0, "-", 55, 17, 77, 0, 204, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1636, 40, "제갈서",$img,1636, 0, "-", 45, 43, 27, 0, 218, 286, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1637, 25, "조충",$img,1637, 0, "-", 14, 7, 80, 0, 196, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1638, 121, "종리목",$img,1638, 0, "-", 84, 68, 75, 0, 214, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1639, 22, "종육",$img,1639, 0, "-", 27, 11, 71, 0, 223, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1640, 122, "좌혁",$img,1640, 0, "-", 60, 66, 51, 0, 232, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1641, 36, "주령",$img,1641, 0, "-", 77, 70, 69, 0, 170, 236, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1642, 115, "주앙",$img,1642, 0, "-", 75, 64, 64, 0, 162, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1643, 52, "주포",$img,1643, 0, "-", 59, 72, 12, 0, 191, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1644, 11, "주흔",$img,1644, 0, "-", 67, 53, 77, 0, 159, 196, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1645, 140, "진기",$img,1645, 0, "-", 58, 67, 46, 0, 165, 198, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1646, 142, "진란",$img,1646, 0, "-", 65, 70, 43, 0, 157, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1647, 25, "진랑",$img,1647, 0, "-", 57, 70, 38, 0, 192, 234, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1648, 12, "진응",$img,1648, 0, "-", 62, 69, 49, 0, 172, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1649, 124, "진표",$img,1649, 0, "-", 62, 49, 74, 0, 204, 237, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1650, 999, "채염",$img,1650, 0, "-", 40, 22, 64, 0, 168, 237, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1651, 999, "초선",$img,1651, 0, "-", 66, 15, 72, 0, 176, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1652, 135, "초이",$img,1652, 0, "-", 54, 65, 55, 0, 219, 266, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1653, 65, "추단",$img,1653, 0, "-", 63, 71, 36, 0, 148, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1654, 999, "추씨",$img,1654, 0, "-", 36, 13, 54, 0, 165, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1655, 71, "추정",$img,1655, 0, "-", 67, 65, 66, 0, 144, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1656, 145, "파재",$img,1656, 0, "-", 69, 75, 52, 0, 145, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1657, 22, "포신",$img,1657, 0, "-", 78, 60, 83, 0, 152, 192, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1658, 114, "하식",$img,1658, 0, "-", 18, 38, 29, 0, 230, 284, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1659, 36, "하안",$img,1659, 0, "-", 6, 27, 72, 0, 190, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1660, 999, "하후씨",$img,1660, 0, "-", 29, 16, 47, 0, 186, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1661, 5, "학맹",$img,1661, 0, "-", 57, 66, 41, 0, 156, 197, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1662, 98, "한거자",$img,1662, 0, "-", 53, 59, 30, 0, 158, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1663, 19, "한덕",$img,1663, 0, "-", 62, 79, 24, 0, 171, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1664, 140, "한윤",$img,1664, 0, "-", 27, 24, 68, 0, 155, 197, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1665, 999, "허소",$img,1665, 0, "-", 53, 27, 60, 0, 150, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1666, 30, "호열",$img,1666, 0, "-", 77, 69, 76, 0, 225, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1667, 76, "호제",$img,1667, 0, "-", 58, 42, 68, 0, 207, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1668, 149, "호진",$img,1668, 0, "-", 65, 77, 13, 0, 146, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1669, 29, "호질",$img,1669, 0, "-", 73, 50, 75, 0, 192, 250, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1670, 7, "환계",$img,1670, 0, "-", 12, 25, 67, 0, 156, 221, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1671, 56, "황숭",$img,1671, 0, "-", 68, 64, 74, 0, 208, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1672, 999, "황승언",$img,1672, 0, "-", 68, 17, 81, 0, 165, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1673, 999, "황월영",$img,1673, 0, "-", 58, 14, 75, 0, 186, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1674, 45, "황조",$img,1674, 0, "-", 74, 65, 57, 0, 148, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1675, 48, "후선",$img,1675, 0, "-", 56, 66, 35, 0, 175, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1676, 8, "휴고",$img,1676, 0, "-", 61, 72, 40, 0, 151, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1677, 98, "휴원진",$img,1677, 0, "-", 53, 63, 38, 0, 155, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1678, 22, "희지재",$img,1678, 0, "-", 24, 5, 86, 0, 157, 194, "-", "-"); + } +} + +function RegGeneral($connect,$init,$life,$fiction,$turnterm,$startyear,$year,$gencount,$npcmatch,$name,$img,$picture,$nation, + $city,$leader,$power,$intel,$level, + $bornyear,$deadyear,$personal,$special, + $msg="") { + $name = "ⓝ".$name; + $npc = 2; + if($city == "-") { + $city = rand() % 94 + 1; + } else { + $city = CityCall($city); + } + if($npcmatch == 0 || $fiction == 1) { $npcmatch = rand() % 150 + 1; } + if($life == 1) { $bornyear = 160; $deadyear = 300; } + if($init != 0 && $startyear > $bornyear+14 && $startyear <= $deadyear) { + if($deadyear <= $startyear+3) $deadyear += 5; + + $genid = "gen{$gencount}"; + $turntime = getRandTurn($turnterm); + if($personal != "-") { $personal = CharCall($personal); } + else { $personal = rand() % 10; } + if($fiction == 1) { $special = SpecCall("-"); } + else { $special = SpecCall($special); } + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + if($picture == 0) { $picture = 1001 + rand() % 400; } + if($picture == -1) { $picture = 'default'; } + $picture = "{$picture}.jpg"; + if($img < 3) { $picture = 'default.jpg'; } + $age = $startyear - $bornyear; + $specage = $age + 1; + $specage2 = $age + 1; + $killturn = ($deadyear - $startyear) * 12 + (rand() % 12); + $experience = $age * 100; + $dedication = $age * 100; + if($nation != 0 && $level == 0) $level = 1; + $pw = md5("18071807"); + + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city,leader,power,intel, + experience,dedication,level,gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit,bornyear,deadyear + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation', + '$city','$leader','$power','$intel','$experience','$dedication', + '$level','1000','1000','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0','$bornyear','$deadyear' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); + } elseif($year == $bornyear+14 && $year < $deadyear) { + $genid = "gen{$gencount}"; + + $query = "select no from general where npcid='$gencount'"; + $result = MYDB_query($query, $connect) or Error("func_npc ".MYDB_error($connect),""); + $count = MYDB_num_rows($result); + if($count == 0) { + $turntime = getRandTurn($turnterm); + if($personal != "-") { $personal = CharCall($personal); } + else { $personal = rand() % 10; } + if($fiction == 1) { $special = SpecCall("-"); } + else { $special = SpecCall($special); } + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + if($picture == 0) { $picture = 1001 + rand() % 400; } + $picture = "{$picture}.jpg"; + if($img < 3) { $picture = 'default.jpg'; } + $age = $year - $bornyear; + $specage = $age + 1; + $specage2 = $age + 1; + $killturn = ($deadyear - $year) * 12 + (rand() % 12); + $experience = $age * 100; + $dedication = $age * 100; + $pw = md5("18071807"); + + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city,leader,power,intel, + experience,dedication,level,gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit,bornyear,deadyear + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', + '$city','$leader','$power','$intel','$experience','$dedication', + '0','1000','1000','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0','$bornyear','$deadyear' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[0] = "●1월:$name(이)가 성인이 되어 등장했습니다."; + pushAllLog($alllog); + } + } +} + +function SetDevelop($connect, $genType, $no, $city, $tech) { + $query = "select rate,pop/pop2*100 as po,comm/comm2*100 as co,def/def2*100 as de,wall/wall2*100 as wa,secu/secu2*100 as se,agri/agri2*100 as ag from city where city='$city'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + // 우선 선정 + if($city[rate] < 95) { + $command = EncodeCommand(0, 0, 0, 4); // 우선 선정 + + $query = "update general set turn0='$command' where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; + } + + $prob = rand() % 100; + $command = EncodeCommand(0, 0, 0, 9); //조달 + switch($genType) { + case 0: //무장 + case 2: //무내정장 + if($prob < 30) { + if($city[de] < 99) { $command = EncodeCommand(0, 0, 0, 5); } //수비 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } elseif($prob < 60) { + if($city[wa] < 99) { $command = EncodeCommand(0, 0, 0, 6); } //성벽 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } elseif($prob < 90) { + if($city[se] < 99) { $command = EncodeCommand(0, 0, 0, 8); } //치안 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } else { + $command = EncodeCommand(0, 0, 0, 29); + } + break; + case 1: //지장 + case 3: //지내정장 + if($prob < 40) { + if($city[ag] < 99) { $command = EncodeCommand(0, 0, 0, 1); } //농업 + elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } elseif($prob < 80) { + if($city[co] < 99) { $command = EncodeCommand(0, 0, 0, 2); } //상업 + elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } elseif($prob < 90) { + if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 + elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + else { $command = EncodeCommand(0, 0, 0, 9); } //조달 + } else { + if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3 + (rand() % 2) * 6); } //기술, 조달 + else { $command = EncodeCommand(0, 0, 0, 29); } + } + break; + } + + // 장수수가 너무 많으면 탐색 확률 감소 + if($command == EncodeCommand(0, 0, 0, 29)) { + $query = "select no from general"; + $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $ratio = round($genCount / 600 * 100); + + if(rand() % 100 < $ratio) { + $command = EncodeCommand(0, 0, 0, 9); + } + } + + $query = "update general set turn0='$command' where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; +} + +function SetCrew($connect, $no, $personal, $gold, $leader, $genType, $tech, $region, $city, $dex0, $dex10, $dex20, $dex30, $dex40) { + switch($genType) { + case 0: //무장 + case 2: //무내정장 + $dex0 = $dex0 + rand()%1000; + $dex10 = $dex10 + rand()%1000; + $dex20 = $dex20 + rand()%1000; + $sel = 0; + // 보궁기 선택 + if($dex0 > $dex10) { + if($dex0 > $dex20) { + $sel = 0; + } else { + $sel = 2; + } + } else { + if($dex10 > $dex20) { + $sel = 1; + } else { + $sel = 2; + } + } + + switch($sel) { + case 0: + $type = 0; //보병 + if($tech >= 3000 && $city == 3) { $type = 4; } //근위병 + elseif($tech >= 2000 && $city == 64) { $type = 3; } //자객병 + elseif($tech >= 1000 && $region == 2) { $type = 1; } //청주병 + elseif($tech >= 1000 && $region == 5) { $type = 5; } //등갑병 + elseif($tech >= 1000 && $region == 7) { $type = 2; } //수병 + break; + case 1: + $type = 10; //궁병 + if($tech >= 3000 && $city == 7) { $type = 14; } //석궁병 + elseif($tech >= 3000 && $city == 6) { $type = 13; } //강궁병 + elseif($tech >= 1000 && $region == 4) { $type = 12; } //연노병 + elseif($tech >= 1000 && $region == 8) { $type = 11; } //궁기병 + break; + case 2: + $type = 20; //기병 + if($tech >= 3000 && $city == 2) { $type = 27; } //호표기병 + elseif($tech >= 2000 && $city == 63) { $type = 24; } //철기병 + elseif($tech >= 2000 && $city == 67) { $type = 25; } //수렵기병 + elseif($tech >= 2000 && $city == 65) { $type = 23; } //돌격기병 + elseif($tech >= 2000 && $city == 66) { $type = 26; } //맹수병 + elseif($tech >= 1000 && $region == 1) { $type = 21; } //백마병 + elseif($tech >= 1000 && $region == 3) { $type = 22; } //중장기병 + break; + } + break; + case 1: //지장 + case 3: //지내정장 + $type = 30; //귀병 + if($tech >= 3000 && $city == 4) { $type = 34; } //악귀병 + elseif($tech >= 3000 && $city == 5) { $type = 37; } //천귀병 + elseif($tech >= 3000 && $city == 1) { $type = 38; } //마귀병 + elseif($tech >= 2000 && $city == 69) { $type = 33; } //흑귀병 + elseif($tech >= 2000 && $city == 68) { $type = 32; } //백귀병 + elseif($tech >= 1000 && $region == 6) { $type = 31; } //신귀병 + elseif($tech >= 3000 && $city == 3) { $type = 36; } //황귀병 + elseif($tech >= 1000 && rand()%100 < 50) { $type = 35; } //남귀병 + break; + } + + $gold -= 200; // 사기비용 + + $cost = getCost($connect, $type) * getTechCost($tech); + $cost = CharCost($cost, $personal); + + $crew = floor($gold / $cost); + if($leader < $crew) { $crew = $leader; } + $command = EncodeCommand(0, $type, $crew, 11); + + $query = "update general set turn0='$command' where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; +} + +function processAI($connect, $no) { + global $_baserice; + + $query = "select startyear,year,month,turnterm,scenario,gold_rate,rice_rate from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("processAI00 ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + // 초반 여부 + if($admin[startyear]+2 > $admin[year] || ($admin[startyear]+2 == $admin[year] && $admin[month] < 5)) { + $isStart = 1; + } else { + $isStart = 0; + } + + $query = "select no,turn0,npcid,name,nation,nations,city,level,npcmsg,personal,leader,intel,power,gold,rice,crew,train,atmos,npc,npcmatch,mode,injury,picture,imgsvr,killturn,makelimit,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; + $result = MYDB_query($query, $connect) or Error("processAI01 ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + // 입력된 턴이 있으면 그것 실행 + if($general[turn0] != "00000000000000") { + return; + } + + $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] >= 5) { + $query = "select l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); + $coreCommand = MYDB_fetch_array($result); + } + + $attackable = 0; + $query = "select city from city where nation='$general[nation]' and supply='1' and front=1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + // 공격가능도시 있으면 1 + if($cityCount > 0) { $attackable = 1; } + + $dipState = 0; + $query = "select no from diplomacy where me='$general[nation]' and state=1 and term>8"; + $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + // 선포중이면 1상태 + if($dipCount > 0) { $dipState = 1; } + + $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=8"; + $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + // 전쟁준비 선포중이면 2상태 + if($dipCount > 0) { $dipState = 2; } + + $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=3"; + $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + // 교전 직전이면 3상태 + if($dipCount > 0) { $dipState = 3; } + + $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + // 교전중이면 4상태 + if($dipCount > 0) { $dipState = 4; } + + //무장 + if($general[power] >= $general[intel]) { + $genType = 0; + if($general[intel] >= $general[power] * 0.8) { //무지장 + switch(rand() % 5) { + case 0: case 1: case 2: case 3: $genType = 0; break; + case 4: $genType = 1; break; + } + } + //지장 + } else { + $genType = 1; + if($general[power] >= $general[intel] * 0.8) { //지무장 + switch(rand() % 5) { + case 0: $genType = 0; break; + case 1: case 2: case 3: case 4: $genType = 1; break; + } + } + } + + //내정장 + if($general[leader] < 40) { + $genType += 2; + //$genType = 2; // 무내정장 + //$genType = 3; // 지내정장 + } + + $tech = getTechCost($nation[tech]); + + if($general[atmos] >= 90 && $general[train] >= 90) { + if($general[mode] == 0) { + $query = "update general set mode=1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); + } + } else { + if($general[mode] == 1) { + $query = "update general set mode=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); + } + } + + //유기체메시지 출력 하루 6번 + //특별 메세지 있는 경우 출력 하루 4번 + switch($admin[turnterm]) { + case 0: $term = 1; break; + case 1: $term = 1; break; + case 2: $term = 2; break; + case 3: $term = 3; break; + case 4: $term = 6; break; + case 5: $term = 12; break; + case 6: $term = 30; break; + case 7: $term = 60; break; + } + if($general[npcid] == 2000 && rand()%(24*$term) < 6) { + PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); + } elseif($general[npcmsg] != "" && rand()%(24*$term) < 3) { + PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); + } + + //재야인경우 + if($general[npc] == 5 && $general[level] == 0) { + // 오랑캐는 바로 임관 + $query = "select nation from general where level=12 and npc=5 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $rulerCount = MYDB_num_rows($result); + if($rulerCount > 0) { + $ruler = MYDB_fetch_array($result); + $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + } else { + $command = EncodeCommand(0, 0, 0, 42); //견문 + } + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); + return; + } elseif($general[npc] < 5 && $general[level] == 0) { + switch(rand()%5) { + //임관 40% + case 0: case 1: + if($admin[scenario] == 0 || $admin[scenario] >= 20) { + // 가상모드엔 랜덤임관, 초반엔 부상 적은 군주 우선 70% + if($admin[startyear]+3 > $admin[year] && rand()%100 < 70) { + $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by injury,rand() limit 0,1"; + } else { + $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; + } + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $rulerCount = MYDB_num_rows($result); + if($rulerCount > 0 && $general[npcmatch] != 999 && $general[makelimit] == 0) { + $ruler = MYDB_fetch_array($result); + $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + } else { + $command = EncodeCommand(0, 0, 0, 42); //견문 + } + } else { + $query = "select nation from general where level=12 and npc=0"; + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $nonCount = MYDB_num_rows($result); + $query = "select nation from general where level=12 and npc>0"; + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $npcCount = MYDB_num_rows($result); + $ratio = round($npcCount / ($nonCount + $npcCount) * 100); + $ratio = round($ratio * 1.0); + //NPC우선임관 + $query = "select nation,ABS(IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $rulerCount = MYDB_num_rows($result); + if($rulerCount > 0 && $general[npcmatch] != 999 && rand()%100 < $ratio && $general[makelimit] == 0) { // 엔국 비율대로 임관(50% : 50%) + $ruler = MYDB_fetch_array($result); + $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + } elseif($general[npcmatch] != 999 && $general[makelimit] == 0) { // NPC국가 없으면 유저국 임관 + $query = "select nation from general where level=12 and npc=0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); + $ruler = MYDB_fetch_array($result); + $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + } else { + $command = EncodeCommand(0, 0, 0, 42); //견문 + } + } + break; + case 2: case 3: //거병이나 견문 40% + // 초반이면서 능력이 좋은놈 위주로 1%확률로 거병 (300명 재야시 2년간 약 10개 거병 예상) + $prop = rand() % 100; + $ratio = round(($general[leader] + $general[power] + $general[intel]) / 3); + if($admin[startyear]+2 > $admin[year] && $prop < $ratio && rand()%100 < 1 && $general[makelimit] == 0) { + //거병 + $command = EncodeCommand(0, 0, 0, 55); + } else { + //견문 + $command = EncodeCommand(0, 0, 0, 42); + } + break; + case 4: //이동 20% + $paths = explode("|", $city[path]); + $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); + break; + } + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); + return; + } + + $rulerCommand = 0; + //군주가 할일 + if($general[level] == 12) { + //오랑캐인데 공격 못하면 바로 방랑/해산 + if($general[npc] == 5 && $dipState == 0 && $attackable == 0) { + //방랑군이냐 아니냐 + if($nation[level] == 0) { + // 해산 + $command = EncodeCommand(0, 0, 0, 56); + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + return; + } else { + // 방랑 + $command = EncodeCommand(0, 0, 0, 47); + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + return; + } + } + //분기마다 + if($admin[month] == 1 || $admin[month] == 4 || $admin[month] == 7 || $admin[month] == 10) { + //관직임명 + Promotion($connect, $general[nation], $nation[level]); + } elseif($admin[month] == 12) { + //세율 + $nation[rate] = TaxRate($connect, $general[nation]); + //지급율 + GoldBillRate($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type], $nation[gold]); + } elseif($admin[month] == 6) { + //세율 + $nation[rate] = TaxRate($connect, $general[nation]); + //지급율 + RiceBillRate($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type], $nation[rice]); + } + + //방랑군이냐 아니냐 + if($nation[level] == 0) { + if($admin[startyear]+2 <= $admin[year]) { + // 해산 + $command = EncodeCommand(0, 0, 0, 56); + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + return; + } elseif($city[nation] == 0 && ($city[level] == 5 || $city[level] == 6)) { + $type = rand()%9 + 1; + $colors = GetNationColors(); + $color = rand() % count($colors); + $command = EncodeCommand(0, $type, $color, 46); + $nationName = "㉿"._String::SubStr($general[name], 1); + //건국 + $query = "update general set turn0='$command',makenation='$nationName' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI08 ".MYDB_error($connect),""); + return; + } elseif(rand()%4 > 0) { + //이동 + $paths = explode("|", $city[path]); + $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + return; + } else { + //조달 + $command = EncodeCommand(0, 0, 0, 9); + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + return; + } + } else { + //외교 평시에 선포 + if($dipState == 0 && $attackable == 0) { + //전방 체크 먼저 + SetNationFront($connect, $nation[nation]); + + $query = "select city from city where nation='$general[nation]' and front=1 limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); + $frontCount = MYDB_num_rows($result); + //근접 공백지 없을때 + if($frontCount == 0) { + $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $devRate = MYDB_fetch_array($result); + //내정이 80% 이상일때 + if($devRate[dev] > 80) { + $query = "select nation from nation where level>0 order by rand()"; + $result = MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + $nationCount = MYDB_num_rows($result); + for($i=0; $i < $nationCount; $i++) { + $youNation = MYDB_fetch_array($result); + + if(isClose($connect, $general[nation], $youNation[nation])) { + $command = EncodeCommand(0, 0, $youNation[nation], 62); + $query = "update nation set l12turn0='$command' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + $rulerCommand = 1; + break; + } + } + } + } + } + } + } + + // 입력된 턴이 있으면 + if($coreCommand["l{$general[level]}turn0"] != EncodeCommand(0, 0, 0, 99)) { + $rulerCommand = 1; + } + + //방랑군 아니고, 입력된 턴이 없을때 수뇌부가 할일 + if($nation[level] != 0 && $general[level] >= 5 && $rulerCommand == 0) { + $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation!='$general[nation]' and A.no!='$general[no]' order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); + $curGen = MYDB_fetch_array($result); + + if($curGen[no] != 0) { // 타도시에 있는 경우 국내로 발령 + if($dipState >= 3) { + $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + if($selCity[city] > 0) { + // 발령 + $command = EncodeCommand(0, $curGen[no], $selCity[city], 27); + } else { + // 발령 + $command = EncodeCommand(0, $curGen[no], $city[city], 27); + } + } else { + // 발령 + $command = EncodeCommand(0, $curGen[no], $city[city], 27); + } + $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + } elseif($dipState <= 1) { // 평시엔 균등 발령만 + //발령, 최소장수 도시 선택, 최다장수도시의 장수 선택 + $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.supply=1 group by A.city"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + //도시 2개 이상일때만 + if($cityCount > 1) { + $min = 500; $minCity = 0; + $max = 0; $maxCity = 0; + $devCity = 0; + for($i=0; $i < $cityCount; $i++) { + $curCity = MYDB_fetch_array($result); + if($curCity[cnt] >= $max) { $max = $curCity[cnt]; $maxCity = $curCity[city]; } + if($curCity[cnt] <= $min) { $min = $curCity[cnt]; $minCity = $curCity[city]; } + if($curCity[dev] < 70) { $devCity = $curCity[city]; } // 개발이 안된 곳 우선 + } + if($devCity != 0) { $minCity = $devCity; } + if($maxCity != $minCity) { + $query = "select no from general where city='$maxCity' and nation='$general[nation]' and no!='$general[no]' and npc>=2 limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); + $curGen = MYDB_fetch_array($result); + + if($curGen[no] != 0) { + // 발령 + $command = EncodeCommand(0, $curGen[no], $minCity, 27); + $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + } + //계속 진행 + } + } + } else { + // 병사있고 쌀있고 후방에 있는 장수 + $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selGen = MYDB_fetch_array($result); + // 전방 도시, 30% 확률로 태수 있는 전방으로 발령 + if(rand()%100 < 30) { + $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; + } else { + $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; + } + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 + // 발령 + $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); + } else { + //병사 없고 인구없는 전방에 있는 장수 + $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selGen = MYDB_fetch_array($result); + // 인구많은도시 + $query = "select city from city where nation='$general[nation]' and supply=1 order by pop desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 + // 발령 + $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); + } else { + // 발령할 장수 없으면 몰포 + if(rand() % 2 == 0) { $type = "gold"; $type2 = 1; } + else { $type = "rice"; $type2 = 2; } + + if($nation[$type] < 1000) { // 몰수 + // 몰수 대상 + $query = "select no,{$type} from general where nation='$general[nation]' and no!='$general[no]' and {$type}>3000 order by {$type} desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $SelGen = MYDB_fetch_array($result); + if($SelGen[no] != 0) { + $amount = floor($SelGen[$type] / 5000)*10 + 10; + if($amount > 100) $amount = 100; + // 몰수 + $command = EncodeCommand($type2, $SelGen[no], $amount, 24); // 금,쌀 1000단위 몰수 + } + } else { // 포상 + // 포상 대상 + $query = "select no from general where nation='$general[nation]' and no!='$general[no]' and killturn>=5 order by {$type} limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $SelGen = MYDB_fetch_array($result); + if($SelGen[no] != 0) { + $amount = floor(($nation[$type]-$_baserice) / 5000)*10 + 10; + if($amount > 100) $amount = 100; + // 포상 + $command = EncodeCommand($type2, $SelGen[no], $amount, 23); // 금 1000단위 포상 + } + } + } + } + $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); + } + } + + $command = EncodeCommand(0, 0, 0, 1); + //일반 할일 + if($general[killturn] < 5) { + if($general[gold] + $general[rice] == 0) { + $command = EncodeCommand(0, 0, 0, 9); //조달 + } elseif($general[gold] > $general[rice]) { + $command = EncodeCommand(0, 1, 100, 44); //헌납 + } else { + $command = EncodeCommand(0, 2, 100, 44); //헌납 + } + } elseif($general[injury] > 10) { + // 부상 2달 이상이면 요양 + $command = EncodeCommand(0, 0, 0, 50); //요양 + } elseif($nation[level] == 0) { + //방랑군일때 + if($admin[startyear]+3 <= $admin[year]) { + $command = EncodeCommand(0, 0, 0, 45); //하야 + } else { + switch(rand()%5) { + case 0: + $command = EncodeCommand(0, 0, 0, 42); break; //견문 20% + case 1: case 2: case 3: case 4: + $command = EncodeCommand(0, 0, 0, 9); break; //조달 80% + } + } + } else { + //국가일때 + //아국땅 아니면 귀환 + if($general[nation] != $city[nation] || $city[supply] == 0) { + $command = EncodeCommand(0, 0, 0, 28); //귀환 + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } + //국가 병량이 없을때 바로 헌납 + if($nation[rice] < 2000 && $general[rice] > 200) { + $amount = floor(($general[rice] - 200)/100) + 1; + if($amount > 20) { $amount = 20; } + $command = EncodeCommand(0, 2, $amount, 44); //헌납 + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } + +// R +// ┃ ┃ 공격/내정 +// 700┃쌀┣━━━━┓ +// ┃팜┃ ┃ +// 100┣━┫ 내정 ┣━━━ +// ┃조┃ ┃쌀삼 +// 0┗━┻━━━━┻━━━> G +// 100 700 + $resrc = $tech * 700; + // 평시거나 초반아니면서 공격가능 없으면서 병사 있으면 해제(25%) + if($dipState == 0 && $isStart == 0 && $attackable == 0 && $general[crew] > 0 && rand()% 100 < 25) { + $command = EncodeCommand(0, 0, 0, 17); //소집해제 + } elseif($dipState <= 1 || $isStart == 1) { + //평시이거나 선포있어도 초반이면 + if($general[gold] + $general[rice] < 200) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달9 + elseif($general[rice] > 100 && $city[rate] < 95) { $command = EncodeCommand(0, 0, 0, 4); } //우선 선정 + elseif($general[gold] < 100) { //금없으면 쌀팜 + $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + $command = EncodeCommand(0, 1, $amount, 49); //팜 + } elseif($general[gold] < 700 && $general[rice] < 700) { $command = EncodeCommand(0, 0, 0, 1); } //금쌀되면 내정 + elseif($general[rice] < 100) { //쌀없으면 쌀삼 + $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + $command = EncodeCommand(0, 2, $amount, 49); //삼 + } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 + else { + //현도시가 전방이면 공격 가능성 체크 + if($city[front] > 0) { + //주변도시 체크 + $paths = explode("|", $city[path]); + for($i=0; $i < count($paths); $i++) { + $query = "select city,nation from city where city='$paths[$i]'"; + $result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),""); + $targetCity = MYDB_fetch_array($result); + //공백지이면 타겟에 포함 + if($targetCity[nation] == 0) { $target[count($target)] = $targetCity[city]; } + } + if(count($target) == 0 || $isStart == 1 || $nation[war] == 1) { $command = EncodeCommand(0, 0, 0, 1); } //공격 가능도시가 없으면 내정 + else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 + } else { + //전방 아니면 내정 + $command = EncodeCommand(0, 0, 0, 1); + } + + if($command == EncodeCommand(0, 0, 0, 1)) { // 공격아닌 경우 + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("processAI19 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + + $sel = rand() % 10; + if($selCity[dev] > 95) { $sel = 9; } + elseif($selCity[dev] < 70) { $sel = 0; } + switch($sel) { + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: // 그대로 내정 80 % + $command = EncodeCommand(0, 0, 0, 1); + break; + case 8: case 9: // 저개발 도시로 워프 20% + //도시 선택, 30% 확률로 군사 있는 곳으로 워프 + if(rand()%100 < 30) { + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by gen2 desc,dev limit 0,1"; + } else { + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by dev limit 0,1"; + } + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + //이미 그 도시이거나, 그 도시도 고개발이면 내정 + if($selCity[city] == $general[city] || $selCity[dev] > 95) { + $command = EncodeCommand(0, 0, 0, 1); + } else { + //워프 + $query = "update general set city='$selCity[city]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); + + $command = EncodeCommand(0, 0, 0, 50); //요양 + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } + break; + } + +// ┃ ┃ +// ┃ 쌀팜 ┃ 공격 +// ┃ ┃ +// 700t┣━━━━╋━━━━━━━━━ +// ┃내조 ↗┃ +// ┃ ↗ ┃ +// ┣━┓내조┃ 쌀삼 +// ┃**┃ ┃ +// 0 ┗━┻━━━━━━━> G +// 700t + + } else { // 공격인 경우 + if($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { //자원되고, 병사없을때 + if($city[pop] > 40000) { $command = EncodeCommand(0, 0, 0, 11); } + else { $command = EncodeCommand(0, 0, 0, 1); } + } elseif($general[rice] < $resrc && $general[rice] <= $general[gold]) { + //금이 더 많으면 매매 + $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }//삼 + else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 + } elseif($general[gold] < $resrc && $general[rice] > $general[gold]) { + //쌀이 더 많으면 매매 + $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }//팜 + else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 + //자원, 병사 모두 충족 + } elseif($general[crew] >= 700 && $general[train] < 90) { + $command = EncodeCommand(0, 0, 0, 13); //훈련 + } elseif($general[crew] >= 700 && $general[atmos] < 90) { + $command = EncodeCommand(0, 0, 0, 14); //사기진작 + } else { + //공격 + //$command = $target[rand()%count($target)] * 100 + 16; //있으면 공격 + } + } + } + } else { +// R +// ┃ ┃ +// ┃쌀┃ +// ┃팜┃ 공격 +// 700t┣━╋━━━━━ +// ┃조┃ 쌀삼 +// 0┗━┻━━━━━> G +// 700t + + //전시일때 + if($general[gold] + $general[rice] < $resrc*2) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달 + elseif($general[rice] > $resrc && $city[rate] < 95 && $city[front] == 0) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 + elseif($general[rice] > $resrc && $city[rate] < 50 && $city[front] == 1) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 + elseif($general[gold] < $resrc) { // 금없으면 쌀팜 + $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }// 팜 + else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 + } elseif($general[rice] < $resrc) { // 쌀없으면 쌀삼 + $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }// 팜 + else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 + } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 + elseif($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $query = "select no from general where nation='$general[nation]' and city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $genCount2 = MYDB_num_rows($result); + + $query = "select sum(pop) as sum from city where nation='$general[nation]' and supply='1'"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $sumCity = MYDB_fetch_array($result); + // 현도시 인구 비율 + $ratio = round($city[pop] / $sumCity[sum] * 100); + // 현도시 장수 비율 + $ratio2 = round($genCount2 / $genCount * 100); + $ratio3 = rand() % 100; + // 전체 인구 대비 확률로 현지에서 징병 + if($city[pop] > 40000 && 100 + $ratio - $ratio2 > $ratio3) { + $command = EncodeCommand(0, 0, 0, 11); //인구 되면 징병 + } else { + // 인구 안되면 4만 이상인 도시로 워프 + $query = "select city from city where nation='$general[nation]' and pop>40000 and supply='1' order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + if($cityCount > 0) { + $selCity = MYDB_fetch_array($result); + //워프 + $query = "update general set city='$selCity[city]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); + + $command = EncodeCommand(0, 0, 0, 50); //요양 + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } else { + $command = EncodeCommand(0, 0, 0, 7); //인구 안되면 정장 + } + } + } elseif($general[crew] >= 700 && $general[train] < 90) { + if($general[atmos] >= 90 && $general[train] >= 60 && $general[mode] == 0) { + $query = "update general set mode=1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); + } + $command = EncodeCommand(0, 0, 0, 13); //훈련 + } elseif($general[crew] >= 700 && $general[atmos] < 90) { + if($general[atmos] >= 60 && $general[train] >= 90 && $general[mode] == 0) { + $query = "update general set mode=1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); + } + $command = EncodeCommand(0, 0, 0, 14); //사기진작 + } elseif($dipState <= 3) { + $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달 + } else { + //공격 & 내정 + $paths = explode("|", $city[path]); + for($i=0; $i < count($paths); $i++) { + $query = "select city,nation from city where city='$paths[$i]'"; + $result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),""); + $targetCity = MYDB_fetch_array($result); + //소유국이 있는 경우 + if($targetCity[nation] != 0 && $targetCity[nation] != $general[nation]) { + $query = "select state from diplomacy where me='$general[nation]' and you='$targetCity[nation]'"; + $dipResult = MYDB_query($query, $connect) or Error("processAI22 ".MYDB_error($connect),""); + $dip = MYDB_fetch_array($dipResult); + //전쟁중인 국가이면 타겟에 포함 + if($dip[state] == 0) $target[count($target)] = $targetCity[city]; + } + } + if(count($target) == 0) { + //전방 도시 선택, 30% 확률로 태수 있는 전방으로 워프 + if(rand()%100 < 30) { + $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; + } else { + $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by rand() limit 0,1"; + } + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + if($cityCount == 0) { + //도시 수, 랜덤(상위 20%) 선택, 저개발 도시 선택 + $query = "select city from city where nation='$general[nation]' and supply='1'"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + $citySelect = rand() % (round($cityCount/5) + 1); + + $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='$general[nation]' and supply='1' order by dev limit {$citySelect},1"; + $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + } else { + $selCity = MYDB_fetch_array($result); + } + + if($general[city] != $selCity[city]) { + //워프 + $query = "update general set city='$selCity[city]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); + + $command = EncodeCommand(0, 0, 0, 50); //요양 + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } else { + $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //공격 가능도시가 없고 워프도 안되면 내정, 조달 + } + } elseif($nation[war] == 1) { + //전금이면 내정, 조달 + $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //내정, 조달 + } else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 + } + } + } + + switch($command) { + case "00000000000001": //내정 + SetDevelop($connect, $genType, $general[no], $general[city], $nation[tech]); + return; + case "00000000000011": //징병 + $query = "select region from city where nation='$general[nation]' order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $selRegion = MYDB_fetch_array($result); + + $selCity[city] = 0; + // 90% 확률로 이민족 또는 특성병 + if(rand()%100 < 90) { + $query = "select city from city where nation='$general[nation]' and (level='4' or level='8') order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); + $selCity = MYDB_fetch_array($result); + } + // 특병 없으면 원래대로 + if($selCity[city] == 0) { + $selCity[city] = $general[city]; + } + SetCrew($connect, $general[no], $general[personal], $general[gold], $general[leader], $genType, $nation[tech], $selRegion[region], $selCity[city], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + return; + default: + $query = "update general set turn0='$command' where no='$general[no]'"; + MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); + return; + } +} +//종전하기, 지급율 +//$command = $fourth * 100000000 + $type * 100000 + $crew * 100 + 11; + +function RegNation($connect, + $name, $color, $gold, $rice, $scoutmsg, $tech, $gencount, $type, $level) { + $type = NationCharCall($type); + $totaltech = $tech * $gencount; + + @MYDB_query(" + insert into nation ( + name,color,gold,rice,bill,rate,scout,war,tricklimit,surlimit, + scoutmsg,tech,totaltech,type,level,gennum + ) values ( + '$name','$color','$gold','$rice','100','15','0','0','24','72', + '$scoutmsg','$tech','$totaltech','$type','$level','$gencount' + )", $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +function RegCity($connect, $nation, $name, $cap=0) { + $city = CityCall($name); + @MYDB_query("update city set nation='$nation' where city='$city'",$connect) or Error(__LINE__.MYDB_error($connect),""); + if($cap > 0) { + @MYDB_query("update nation set capital='$city' where nation='$nation'",$connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function Promotion($connect, $nation, $level) { + $lv = getNationChiefLevel($level); + + $query = "select scenario,killturn from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("processAI00 ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //우선 수뇌 해제 (승상 뺴고) + $query = "update general set level=1 where level<11 and level>4 and nation='$nation'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + + //유저 후보 선택 + $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='$admin[killturn]' order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); + $userCandidate = MYDB_fetch_array($result); + // 유저수뇌 안함 + //$userCandidate[no] = 0; + + //NPC 후보 선택 + $query = "select no from general where nation='$nation' and npc>=2 and level=1 order by intel desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); + $npcCandidate = MYDB_fetch_array($result); + + //현재 참모 + $query = "select no,intel,npc,killturn from general where nation='$nation' and level=11"; + $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); + $level11 = MYDB_fetch_array($result); + + //공석이거나 삭턴 유저 참모인 경우 + if($level11[no] == 0 || ($level11[npc] < 2 && $level11[killturn] < $admin[killturn])) { + if($userCandidate[no] > 0) { + //기존 참모 해임 + $query = "update general set level=1 where nation='$nation' and level=11"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + //유저 후보 있으면 임명 + $query = "update general set level=11 where no='$userCandidate[no]'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + } elseif($npcCandidate[no] > 0) { + //기존 참모 해임 + $query = "update general set level=1 where nation='$nation' and level=11"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + //NPC 후보 있으면 임명 + $query = "update general set level=11 where no='$npcCandidate[no]'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + } + } elseif($level11[npc] >= 2 && $userCandidate[no] > 0) { + //NPC 참모인데 삭턴 아닌 유저장이 있는 경우 + //기존 참모 해임 + $query = "update general set level=1 where nation='$nation' and level=11"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + //유저 후보 있으면 임명 + $query = "update general set level=11 where no='$userCandidate[no]'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + } + + for($i=10; $i >= $lv; $i-=2) { + $i1 = $i; $i2 = $i - 1; + //무관임명 + $query = "select no from general where nation='$nation' and level=1 order by power desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); + $level = MYDB_fetch_array($result); + $query = "update general set level={$i1} where no='$level[no]'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + //문관임명 + $query = "select no from general where nation='$nation' and level=1 order by intel desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); + $level = MYDB_fetch_array($result); + $query = "update general set level={$i2} where no='$level[no]'"; + MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); + } +} + +function TaxRate($connect, $nation) { + //도시 + $query = "select city from city where nation='$nation'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + + if($cityCount == 0) { + $query = "update nation set war=0,rate=15 where nation='$nation'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return 15; + } else { + $query = "select sum(pop)/sum(pop2)*100 as rate,(sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$nation'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $devRate = MYDB_fetch_array($result); + + $avg = ($devRate[rate] + $devRate[dev]) / 2; + + if($avg > 95) $rate = 25; + elseif($avg > 70) $rate = 20; + elseif($avg > 50) $rate = 15; + else $rate = 10; + + $query = "update nation set war=0,rate='$rate' where nation='$nation'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return $rate; + } +} + +function GoldBillRate($connect, $nation, $rate, $gold_rate, $type, $gold) { + $incomeList = getGoldIncome($connect, $nation, $rate, $gold_rate, $type); + $income = $gold + $incomeList[0] + $incomeList[1]; + $outcome = getGoldOutcome($connect, $nation, 100); // 100%의 지급량 + $bill = floor($income / $outcome * 90); // 수입의 90% 만 지급 + + if($bill < 20) { $bill = 20; } + if($bill > 200) { $bill = 200; } + + $query = "update nation set bill='$bill' where nation='$nation'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function RiceBillRate($connect, $nation, $rate, $rice_rate, $type, $rice) { + $incomeList = getRiceIncome($connect, $nation, $rate, $rice_rate, $type); + $income = $rice + $incomeList[0] + $incomeList[1]; + $outcome = getRiceOutcome($connect, $nation, 100); // 100%의 지급량 + $bill = floor($income / $outcome * 90); // 수입의 90% 만 지급 + + if($bill < 20) { $bill = 20; } + if($bill > 200) { $bill = 200; } + + $query = "update nation set bill='$bill' where nation='$nation'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +?> diff --git a/twe_close/func_process.php b/twe_close/func_process.php new file mode 100644 index 00000000..7c25f4ff --- /dev/null +++ b/twe_close/func_process.php @@ -0,0 +1,6148 @@ + 1) $ratio = 1; + + $r[fail] = (0.2 / $ratio - 0.1) * 100; + $r[succ] = ($ratio - 0.5) * 100; + + if($r[fail] < 0) { $r[fail] = 0; } + $r[succ] += $r[fail]; + if($r[succ] > 100) { $r[succ] = 100; } + + return $r; +} + +function CriticalScore($score, $type) { + switch($type) { + case 0: + $ratio = (rand()%9 + 20)/10; // 2.0~2.8 + break; + case 1: + $ratio = (rand()%3 + 2)/10; // 0.2~0.4 + break; + } + return round($score * $ratio); +} + +function process_1($connect, &$general, $type) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + if($type == 1) { $dtype = "농지 개간"; $atype = "을"; $btype = "은"; $stype = "agri"; } + elseif($type == 2) { $dtype = "상업 투자"; $atype = "를"; $btype = "는"; $stype = "comm"; } + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($city["$stype"] >= $city["$stype"."2"]) { + $log[count($log)] = "●{$admin[month]}월:{$dtype}{$btype} 충분합니다. $dtype 실패. <1>$date"; + } else { + // 민심 50 이하이면 50과 같게 + if($city[rate] < $_develrate) { $city[rate] = $_develrate; } + $rate = $city[rate] / 100; + + $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])) * $rate; + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 2 || $nation[type] == 12) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 8 || $nation[type] == 11) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모, 모사 보정 + if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } + // 군사 보정 + if($general[level] == 3 && $general[no] == $city[gen2]) { $score *= 1.05; } + + $rd = rand() % 100; + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 2); + + // 특기보정 : 경작, 상재 + if($type == 1 && $general[special] == 1) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($type == 2 && $general[special] == 2) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 성공하여 $score 상승했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 하여 $score 상승했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $score += $city["$stype"]; + if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } + // 내정 상승 + $query = "update city set {$stype}='$score' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 하락, 경험치 상승 + $general[gold] -= $admin[develcost]; + $general[intel2]++; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_3($connect, &$general) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dtype = "기술 연구"; + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type,tech from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + } else { + $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])); + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 3 || $nation[type] == 13) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모, 모사 보정 + if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } + + $rd = rand() % 100; + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + // 특기보정 : 발명 + if($general[special] == 3) { $score *= 1.1; $admin[develcost] *= 0.8; $r[succ] += 10; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 부드러운 기술 제한 + if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $score = floor($score/4); } + + //장수수 구함 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + if($gencount < 10) $gencount = 10; + // 내정 상승 + $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 하락, 경험치 상승 // 공헌도, 명성 상승 = $score * 10 + $general[gold] -= $admin[develcost]; + + $general[intel2]++; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_4($connect, &$general) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 주민 선정 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 주민 선정 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 주민 선정 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 주민 선정 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*2) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 주민 선정 실패. <1>$date"; + } elseif($city[rate] >= 100) { + $log[count($log)] = "●{$admin[month]}월:민심은 충분합니다. 주민 선정 실패. <1>$date"; + } else { + $score = ($general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus) / 10; + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모 보정 + if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } + // 시중 보정 + if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } + + $rd = rand() % 100; + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + // 특기보정 : 인덕 + if($general[special] == 20) { $r[succ] += 10; $admin[develcost] *= 0.8; $score *= 1.1; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:선정을 실패하여 민심이 $score 상승했습니다. <1>$date"; + } elseif($r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:선정을 성공하여 민심이 $score 상승했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:민심이 $score 상승했습니다. <1>$date"; + } + + $exp = $score * 7; + $ded = $score * 10; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $score += $city[rate]; + if($score > 100) { $score = 100; } + // 민심 상승 + $query = "update city set rate='$score' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 + $general[rice] -= $admin[develcost] * 2; + $general[leader2]++; + $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_5($connect, &$general, $type) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + if($type == 1) { $dtype = "수비 강화"; $stype = "def"; } + elseif($type == 2) { $dtype = "성벽 보수"; $stype = "wall"; } + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($city["$stype"] >= $city["$stype"."2"]) { + $log[count($log)] = "●{$admin[month]}월:{$dtype}는 충분합니다. $dtype 실패. <1>$date"; + } else { + // 민심 50 이하이면 50과 같게 + if($city[rate] < $_develrate) { $city[rate] = $_develrate; } + $rate = $city[rate] / 100; + + $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모, 장군 보정 + if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } + // 태수 보정 + if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } + + $rd = rand() % 100; // 현재 20% + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + // 특기보정 : 수비, 축성 + if($type == 1 && $general[special] == 11) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($type == 2 && $general[special] == 10) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $score += $city["$stype"]; + if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } + // 내정 상승 + $query = "update city set {$stype}='$score' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 하락, 무력 경험 경험, 공헌 상승 + $general[gold] -= $admin[develcost]; + $general[power2]++; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_7($connect, &$general) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 정착 장려 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 정착 장려 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 정착 장려 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 정착 장려 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost] * 2) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 정착 장려 실패. <1>$date"; + } elseif($city[pop] >= $city[pop2]) { + $log[count($log)] = "●{$admin[month]}월:이미 포화상태입니다. 정착 장려 실패. <1>$date"; + } else { + $score = $general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus; + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모 보정 + if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } + // 시중 보정 + if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } + + $rd = rand() % 100; // 현재 20% + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + // 특기보정 : 인덕 + if($general[special] == 20) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:장려를 실패하여 주민이 {$score}0명 증가했습니다. <1>$date"; + } elseif($r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:장려를 성공하여 주민이 {$score}0명 증가했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:주민이 {$score}0명 증가했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $score = $city[pop] + ($score * 10); + if($score > $city[pop2]) { $score = $city[pop2]; } + // 민심 상승 + $query = "update city set pop='$score' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 + $general[rice] -= $admin[develcost] * 2; + $general[leader2]++; + $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_8($connect, &$general) { + global $_develrate; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dtype = "치안"; $stype = "secu"; + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 강화 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 강화 실패. <1>$date"; + } elseif($city[nation] != $general[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 강화 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 강화 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 강화 실패. <1>$date"; + } elseif($city[secu] >= $city[secu2]) { + $log[count($log)] = "●{$admin[month]}월:치안은 충분합니다. $dtype 강화 실패. <1>$date"; + } else { + // 민심 50 이하이면 50과 같게 + if($city[rate] < $_develrate) { $city[rate] = $_develrate; } + $rate = $city[rate] / 100; + + $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + // 국가보정 + if($nation[type] == 1 || $nation[type] == 4) { $score *= 1.1; $admin[develcost] *= 0.8; } + if($nation[type] == 6 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + + // 군주, 참모, 장군 보정 + if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } + // 태수 보정 + if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } + + $rd = rand() % 100; // 현재 20% + $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + // 특기보정 : 통찰 + if($general[special] == 12) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + + //버그방지 + if($score < 1) $score = 1; + + if($r[fail] > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:{$dtype}을 실패하여 $score 강화했습니다. <1>$date"; + } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:{$dtype}을 성공하여 $score 강화했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:{$dtype}을 $score 강화했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $score += $city["$stype"]; + if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } + // 내정 상승 + $query = "update city set {$stype}='$score' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 하락, 무력 경험 경험, 공헌 상승 + $general[gold] -= $admin[develcost]; + $general[power2]++; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_9($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 물자 조달 실패. <1>$date"; + } elseif($nation[level] > 0 && $city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 물자 조달 실패. <1>$date"; + } elseif($city[supply] == 0 && $city[nation] == $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 물자 조달 실패. <1>$date"; + } else { + if(rand() % 2 == 0) { $dtype = 0; $stype = "금"; } + else { $dtype = 1; $stype = "쌀"; } + + $score = (($general[leader]+$general[power]+$general[intel]) * (100 - $general[injury])/100 + getHorseEff($general[horse])+$lbonus+getWeapEff($general[weap])+getBookEff($general[book])); + $score = $score * (100 + $general[explevel]/5)/100; + $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% + + $rd = rand() % 100; // 현재 20% + + //버그방지 + if($score < 1) $score = 1; + + if(30 > $rd) { + $score = CriticalScore($score, 1); + $log[count($log)] = "●{$admin[month]}월:조달을 실패하여 {$stype}을 $score 조달했습니다. <1>$date"; + } elseif(40 > $rd) { + $score = CriticalScore($score, 0); + $log[count($log)] = "●{$admin[month]}월:조달을 성공하여 {$stype}을 $score 조달했습니다. <1>$date"; + } else { + $score = round($score); + $log[count($log)] = "●{$admin[month]}월:{$stype}을 $score 조달했습니다. <1>$date"; + } + + $exp = $score * 0.7; + $ded = $score * 1.0; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 물자 상승 + if($dtype == 0) { + $query = "update nation set gold=gold+'$score' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update nation set rice=rice+'$score' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + switch(rand()%3) { + case 0: + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + break; + case 1: + $general[power2]++; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + break; + case 2: + $general[intel2]++; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + break; + } + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_11($connect, &$general, $type) { + global $_defaultatmos, $_defaulttrain, $_defaultatmos2, $_defaulttrain2; + $date = substr($general[turntime],11,5); + + if($type == 1) { $defaultatmos = $_defaultatmos; $defaulttrain = $_defaulttrain; } + else { $defaultatmos = $_defaultatmos2; $defaulttrain = $_defaulttrain2; } + + $query = "select year,month,startyear from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select level,tech from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $armtype = $command[2]; + $crew = $command[1]; + + if($armtype != $general[crewtype]) { $general[crew] = 0; $general[train] = $defaulttrain; $general[atmos] = $defaultatmos; } + + if($crew*100 + $general[crew] > (floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100) { $crew = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 - $general[crew])/100, 0); } + if($crew < 0) { $crew = 0; } + $cost = $crew * getCost($connect, $armtype); + //기술로 가격 + $cost *= getTechCost($nation[tech]); + //성격 보정 + $cost = CharCost($cost, $general[personal]); + $cost = round($cost); + + //특기 보정 : 보병, 궁병, 기병, 귀병, 공성, 징병 + if(floor($armtype/10) == 0 && $general[special2] == 50) { $cost *= 0.9; } + if(floor($armtype/10) == 1 && $general[special2] == 51) { $cost *= 0.9; } + if(floor($armtype/10) == 2 && $general[special2] == 52) { $cost *= 0.9; } + if(floor($armtype/10) == 3 && $general[special2] == 40) { $cost *= 0.9; } + if(floor($armtype/10) == 4 && $general[special2] == 43) { $cost *= 0.9; } + if($general[special2] == 72) { $cost *= 0.5; } + + if($type == 1) { $dtype = "징병"; } + elseif($type == 2) { $dtype = "모병"; $cost *= 2; } + if($general[crew] != 0) { $dtype = "추가".$dtype; } + + //현재 가능한지 검사 + switch($armtype) { + case 0: case 10: case 20: case 30: case 35: // 보병 궁병 기병 귀병 남귀병 + $sel = 0; break; + + case 1: $sel = 1; $rg = 2; break; // 청주병(중원) + case 2: $sel = 1; $rg = 7; break; // 수병(오월) + case 3: $sel = 2; $ct = 64; break; // 자객병(저) + case 4: $sel = 2; $ct = 3; break; // 근위병(낙양) + case 5: $sel = 1; $rg = 5; break; // 등갑병(남중) + + case 11: $sel = 1; $rg = 8; break; // 궁기병(동이) + case 12: $sel = 1; $rg = 4; break; // 연노병(서촉) + case 13: $sel = 2; $ct = 6; break; // 강궁병(양양) + case 14: $sel = 2; $ct = 7; break; // 석궁병(건업) + + case 21: $sel = 1; $rg = 1; break; // 백마병(하북) + case 22: $sel = 1; $rg = 3; break; // 중장기병(서북) + case 23: $sel = 2; $ct = 65; break; // 돌격기병(흉노) + case 24: $sel = 2; $ct = 63; break; // 철기병(강) + case 25: $sel = 2; $ct = 67; break; // 수렵기병(산월) + case 26: $sel = 2; $ct = 66; break; // 맹수병(남만) + case 27: $sel = 2; $ct = 2; break; // 호표기병(허창) + + case 31: $sel = 1; $rg = 6; break; // 신귀병(초) + case 32: $sel = 2; $ct = 68; break; // 백귀병(오환) + case 33: $sel = 2; $ct = 69; break; // 흑귀병(왜) + case 34: $sel = 2; $ct = 4; break; // 악귀병(장안) + case 36: $sel = 2; $ct = 3; break; // 황귀병(낙양) + case 37: $sel = 2; $ct = 5; break; // 천귀병(성도) + case 38: $sel = 2; $ct = 1; break; // 마귀병(업) + + case 40: $sel = 0; break; // 정란 + case 41: $sel = 0; break; // 충차 + case 42: $sel = 2; $ct = 1; break; // 벽력거(업) + case 43: $sel = 2; $ct = 5; break; // 목우(성도) + + default: $sel = 0; $armtype = 0; break; + } + if($sel == 0) { + // 남귀병은 기술1등급부터 + // 충차는 기술1등급부터 + if($armtype == 35 && $nation[tech] < 1000) { + $cnt = 0; + } elseif($armtype == 41 && $nation[tech] < 1000) { + $cnt = 0; + } else { + $cnt = 1; + } + } elseif($sel == 1) { + $query = "select city,level from city where nation='$general[nation]' and region='$rg'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $rgcity = MYDB_fetch_array($result); + // 기술 1000 이상부터 지역병 + if($cnt > 0 && $nation[tech] < 1000) { + $cnt = 0; + } + } else { + $query = "select city,level from city where nation='$general[nation]' and city='$ct'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $ctcity = MYDB_fetch_array($result); + // 기술 2000 이상부터 이민족병 + if($cnt > 0 && $ctcity[level] == 4 && $nation[tech] < 2000) { + $cnt = 0; + } + // 기술 3000 이상부터 특수병 + if($cnt > 0 && $ctcity[level] == 8 && $nation[tech] < 3000) { + $cnt = 0; + } + } + if($cnt > 0) { $valid = 1; } + else { $valid = 0; } + + // 초반 제한중 차병 불가 + if($admin[year] < $admin[startyear]+3 && floor($armtype/10) == 4) { + $valid = 0; + } + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; +// } elseif($city[supply] == 0) { +// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($crew <= 0) { + $log[count($log)] = "●{$admin[month]}월:더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date"; + } elseif($general[gold] < $cost) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($general[rice] < $crew) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($valid == 0) { + $log[count($log)] = "●{$admin[month]}월:현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date"; + } elseif($city[pop]-30000 < $crew*100) { // 주민 30000명 이상만 가능 + $log[count($log)] = "●{$admin[month]}월:주민이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($city[rate] < 20) { + $log[count($log)] = "●{$admin[month]}월:민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:".getTypename($armtype)."을(를) {$crew}00명 {$dtype}했습니다. <1>$date"; + $exp = $crew; + $ded = $crew; + // 숙련도 증가 + addGenDex($connect, $general[no], $armtype, $crew); + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $atmos = round(($general[atmos] * $general[crew] + $defaultatmos * $crew*100) / ($general[crew] + $crew*100)); + $train = round(($general[train] * $general[crew] + $defaulttrain * $crew*100) / ($general[crew] + $crew*100)); + $general[crew] += $crew*100; + $general[gold] -= $cost; + // 주민수 감소 // 민심 김소 + if($type == 1) { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*100); } + else { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*50); } + if($city[rate] < 0) { $city[rate] = 0; } + $query = "update city set pop=pop-({$crew}*100),rate='$city[rate]' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='$general[crew]',train='$train',atmos='$atmos',gold='$general[gold]',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_13($connect, &$general) { + global $_maxtrain, $_training, $_atmosing; + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 훈련 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 훈련 실패. <1>$date"; +// } elseif($city[supply] == 0) { +// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 훈련 실패. <1>$date"; + } elseif($general[crew] == 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 훈련 실패. <1>$date"; + } elseif($general[train] >= $_maxtrain) { + $log[count($log)] = "●{$admin[month]}월:병사들은 이미 정예병사들입니다. <1>$date"; +// } elseif(floor($general[crewtype]/10) == 4) { +// $log[count($log)] = "●{$admin[month]}월:병기는 훈련이 불가능합니다. <1>$date"; + } else { + // 훈련시 + $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); + + $log[count($log)] = "●{$admin[month]}월:훈련치가 $score 상승했습니다. <1>$date"; + $exp = 100; + $ded = 70; + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 훈련치 변경 + $score += $general[train]; + if($score > $_maxtrain) { $score = $_maxtrain; } + $query = "update general set train='$score' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 사기 약간 감소 + $score = floor($general[atmos] * $_atmosing); + if($score < 0 ) { $score = 0; } + $query = "update general set atmos='$score' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 경험치 상승 // 공헌도, 명성 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_14($connect, &$general) { + global $_maxatmos, $_training; + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 사기진작 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 사기진작 실패. <1>$date"; +// } elseif($city[supply] == 0) { +// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 사기진작 실패. <1>$date"; + } elseif($general[crew] == 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 사기진작 실패. <1>$date"; + } elseif($general[gold] < $general[crew]/100) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 사기진작 실패. <1>$date"; + } elseif($general[atmos] >= $_maxatmos) { + $log[count($log)] = "●{$admin[month]}월:이미 사기는 하늘을 찌를듯 합니다. <1>$date"; +// } elseif(floor($general[crewtype]/10) == 4) { +// $log[count($log)] = "●{$admin[month]}월:병기는 사기 진작이 불가능합니다. <1>$date"; + } else { + $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); + $gold = $general[gold] - round($general[crew]/100); + + $log[count($log)] = "●{$admin[month]}월:사기치가 $score 상승했습니다. <1>$date"; + $exp = 100; + $ded = 70; + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 + $score += $general[atmos]; + if($score > $_maxatmos) { $score = $_maxatmos; } + $general[leader2]++; + $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_15($connect, &$general) { + global $_maxatmos, $_maxtrain; + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,tech from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + if($general[term]%100 == 15) { + $term = floor($general[term]/100) + 1; + $code = $term * 100 + 15; + } else { + $term = 1; + $code = 100 + 15; + } + + $cost = round($general[crew]/100 * 3 * getTechCost($nation[tech])); + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 전투태세 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 전투태세 실패. <1>$date"; +// } elseif($city[supply] == 0) { +// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 전투태세 실패. <1>$date"; + } elseif($general[crew] == 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 전투태세 실패. <1>$date"; + } elseif($general[atmos] >= 90 && $general[train] >= 90) { + $log[count($log)] = "●{$admin[month]}월:이미 병사들은 날쌔고 용맹합니다. <1>$date"; + } elseif($general[gold] < $cost) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 전투태세 실패. <1>$date"; + } elseif($term < 3) { + $log[count($log)] = "●{$admin[month]}월:병사들을 열심히 훈련중... ({$term}/3) <1>$date"; + + $query = "update general set resturn='ONGOING',term={$code} where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //기술로 가격 + $gold = $general[gold] - $cost; + + $log[count($log)] = "●{$admin[month]}월:전투태세 완료! <1>$date"; + $exp = 100 * 3; + $ded = 70 * 3; + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100 * 3)); + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 + $general[leader2]+=3; + $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_16($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,war,tricklimit,tech from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select path,nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $path = explode("|", $city[path]); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select * from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select nation,tricklimit,tech from nation where nation='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dnation = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + for($i=0; $i < count($path); $i++) { + if($path[$i] == $destination) { $valid = 1; } + } + + if($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. $destcity[name](으)로 출병 실패. <1>$date"; +// } elseif($city[supply] == 0) { +// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif(!$valid) { + $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($general[crew] <= 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($general[rice] <= round($general[crew]/100)) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($dip[state] != 0) { + $log[count($log)] = "●{$admin[month]}월:교전중인 국가가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($general[nation] != $city[nation]) { + $log[count($log)] = "●{$admin[month]}월:본국에서만 출병가능합니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($nation[war] == 1) { + $log[count($log)] = "●{$admin[month]}월:현재 전쟁 금지입니다. $destcity[name](으)로 출병 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:본국입니다. $destcity[name](으)로 출병 실패. <1>$date"; + pushGenLog($general, $log); + process_21($connect, $general); + return; + } else { + // 전쟁 표시 + $query = "update city set state=43,term=3 where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + // 전투 처리 + $dead = processWar($connect, $general, $destcity); + + // 기술력 따라서 보정 + $dead[att] = round($dead[att] * getTechCost($nation[tech])); + $dead[def] = round($dead[def] * getTechCost($dnation[tech])); + + // 사상자 누적 + if($nation[nation] > 0 && $dnation[nation] > 0) { + $query = "update diplomacy set dead=dead+'$dead[att]' where me='$nation[nation]' and you='$dnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update diplomacy set dead=dead+'$dead[def]' where you='$nation[nation]' and me='$dnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $log = uniqueItem($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_17($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + if($general[crew] == 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 소집해제 실패. <1>$date"; + } else { + // 주민으로 돌아감 + $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set crew='0' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●{$admin[month]}월:병사들을 소집해제하였습니다. <1>$date"; + + // 경험, 공헌 상승 + $exp = 70; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_21($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $path = explode("|", $city[path]); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select name from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + for($i=0; $i < count($path); $i++) { + if($path[$i] == $destination) { $valid = 1; } + } + + if(!$valid) { + $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 이동 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 이동 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 이동했습니다. <1>$date"; + $exp = 50; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + + // 이동, 경험치 상승, 명성 상승, 사기 감소 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general[level] == 12) { + $query = "select level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[level] == 0) { + $query = "update general set city='$destination' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name from general where nation='$general[nation]' and level<'12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 이동했습니다."; + for($j=0; $j < $gencount; $j++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + } + } + } + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_22($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select name from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $who = $command[1]; + + $query = "select * from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + + $cost = round($admin[develcost] + ($you[experience] + $you[dedication])/1000) * 10; + + if(!$you) { + $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 등용 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:초반 제한중입니다. 등용 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 등용 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 등용 실패. <1>$date"; + } elseif($general[gold] < $cost) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 등용 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$you[name]에게 등용 권유 서신을 보냈습니다. <1>$date"; + $exp = 100; + $ded = 200; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + ScoutMsg($connect, $general[no], $nation[name], $who, $you[msgindex]); + + $general[intel2]++; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_23($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $what = $command[3]; + $who = $command[2]; + $amount = $command[1]; + $amount *= 100; // 100~10000까지 + + if($amount > 10000) { $amount = 10000; } + if($amount < 100) { $amount = 100; } + if($what == 1) { + $dtype = "금"; + if($nation[gold]-$_basegold < $amount) { $amount = $nation[gold] - $_basegold; } + } elseif($what == 2) { + $dtype = "쌀"; + if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } + } else { + $what = 2; + $dtype = "쌀"; + if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } + } + + $query = "select no,nation,level,name,gold,rice from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + if(!$gen) { + $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 포상 실패. <1>$date"; + } elseif($general[no] == $who) { + $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 포상 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 포상 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 포상 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 포상 실패. <1>$date"; + } elseif($what == 1 && $amount <= 0) { + $log[count($log)] = "●{$admin[month]}월:국고가 부족합니다. 포상 실패. <1>$date"; + } elseif($what == 2 && $amount <= 0) { + $log[count($log)] = "●{$admin[month]}월:병량이 부족합니다. 포상 실패. <1>$date"; + } elseif($gen[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 포상 실패. <1>$date"; + } else { + $genlog[count($genlog)] = "●$dtype $amount을 포상으로 받았습니다."; + $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 수여했습니다. <1>$date"; + $exp = 1; + $ded = 1; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + if($what == 1) { + $gen[gold] += $amount; + $query = "update general set gold='$gen[gold]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[gold] -= $amount; + $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($what == 2) { + $gen[rice] += $amount; + $query = "update general set rice='$gen[rice]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[rice] -= $amount; + $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 경험치 상승 + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); + pushGenLog($gen, $genlog); +} + +function process_24($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,scenario,startyear from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,color,gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $what = $command[3]; + $who = $command[2]; + $amount = $command[1]; + $amount *= 100; // 100~10000까지 + + $query = "select no,nation,level,name,gold,rice,npc,picture,imgsvr from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + if($amount > 10000) { $amount = 10000; } + if($amount < 100) { $amount = 100; } + if($what == 1) { + $dtype = "금"; + if($gen[gold] < $amount) { $amount = $gen[gold]; } + } elseif($what == 2) { + $dtype = "쌀"; + if($gen[rice] < $amount) { $amount = $gen[rice]; } + } else { + $what = 2; + $dtype = "쌀"; + if($gen[rice] < $amount) { $amount = $gen[rice]; } + } + + if(!$gen) { + $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 몰수 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 몰수 실패. <1>$date"; + } elseif($general[no] == $who) { + $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 몰수 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 몰수 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 몰수 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 몰수 실패. <1>$date"; + } elseif($gen[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 몰수 실패. <1>$date"; + } else { + if($gen[npc] >= 2 && rand()%100 == 0) { + switch(rand()%5) { + case 0: $str = "몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까..."; break; + case 1: $str = "사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요..."; break; + case 2: $str = "내 돈 내놔라! 내 돈! 몰수가 왠 말이냐!"; break; + case 3: $str = "몰수해간 내 자금... 언젠가 몰래 다시 빼내올 것이다..."; break; + case 4: $str = "몰수로 인한 사기 저하는 몰수로 얻은 물자보다 더 손해란걸 모른단 말인가!"; break; + } + + PushMsg(1, 0, $gen[picture], $gen[imgsvr], "{$gen[name]}:", $nation[color], $nation[name], $nation[color], $str); + } + + $genlog[count($genlog)] = "●$dtype {$amount}을 몰수 당했습니다."; + $log[count($log)] = "●{$admin[month]}월:$gen[name]에게서 $dtype $amount을 몰수했습니다. <1>$date"; + $exp = 1; + $ded = 1; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + if($what == 1) { + $gen[gold] -= $amount; + $query = "update general set gold='$gen[gold]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[gold] += $amount; + $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($what == 2) { + $gen[rice] -= $amount; + $query = "update general set rice='$gen[rice]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[rice] += $amount; + $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 경험치 상승 + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); + pushGenLog($gen, $genlog); +} + +function process_25($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $where = $command[1]; + + // 랜덤임관인 경우 + if($where == 99) { + // 초반시 10명이하, 임관금지없음 국가 + if($admin[year] < $admin[startyear]+3) { + $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } else { + $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and scout=0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + } elseif($where == 98) { + // 초반시 10명이하, 임관금지없음 국가, 방랑군 제외 + if($admin[year] < $admin[startyear]+3) { + $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 and level>0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } else { + $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and scout=0 and level>0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + } else { + $query = "select name,nation,scout,level from nation where nation='$where'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + $query = "select no from general where nation='$nation[nation]'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + if(!$nation) { + $log[count($log)] = "●{$admin[month]}월:임관할 국가가 없습니다. 임관 실패. <1>$date"; + } elseif($general[nation] != 0) { + $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 임관 실패. <1>$date"; + } elseif($nation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 임관 실패. <1>$date"; + } elseif($nation[level] == 0 && $gencount >= 10) { + $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; + } elseif($admin[year] < $admin[startyear]+3 && $gencount >= 10) { + $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; + } elseif($nation[scout] == 1 && $general[npc] < 5) { + $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 금지되어 있습니다. 임관 실패."; + } elseif($general[makelimit] > 0 && $general[npc] < 5) { + $log[count($log)] = "●{$admin[month]}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; + } elseif(strpos($general['nations'], ",{$nation['nation']},") > 0) { + $log[count($log)] = "●{$admin[month]}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]임관했습니다."; + $log[count($log)] = "●{$admin[month]}월:$nation[name]에 임관했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에 임관"); + + if($gencount < 10) { $exp = 700; } + else { $exp = 100; } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 군주가 있는 곳으로 이동 + $query = "select city from general where nation='$nation[nation]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($result); + + // NPC초반시 임관기록 추가 안함 + if($general[npc] > 1 && $admin[year] < $admin[startyear]+3) { + } else { + $general['nations'] .= "{$nation['nation']},"; + } + + // 국적 바꾸고 등급 일반으로 // 명성 상승 + $query = "update general set resturn='SUCCESS',nation='$nation[nation]',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='$king[city]',belong=1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국가 기술력 그대로 + $query = "select no from general where nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($where < 99) { + $log = uniqueItem($connect, $general, $log); + } else { + $log = uniqueItem($connect, $general, $log, 2); + } + } + + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_26($connect, &$general) { + $date = substr($general[turntime],11,5); + + $troop = getTroop($connect, $general[troop]); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select no,name,nation,city from general where troop='$general[troop]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + if($general[nation] != $city[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 집합 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 집합 실패. <1>$date"; + } elseif($general[no] != $troop[no]) { + $log[count($log)] = "●{$admin[month]}월:부대장이 아닙니다. 집합 실패. <1>$date"; + } elseif($gencount == 0) { + $log[count($log)] = "●{$admin[month]}월:집합 가능한 부대원이 없습니다. 집합 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$city[name]에서 집합을 실시했습니다. <1>$date"; + $exp = 70; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + //부대원에게 로그 전달 + $genlog[count($genlog)] = "$troop[name]의 부대원들은 $city[name](으)로 집합되었습니다."; + + for($i=0; $i < $gencount; $i++) { + $troopgen = MYDB_fetch_array($result); + if($general[city] != $troopgen[city]) { + pushGenLog($troopgen, $genlog); + } + } + + // 같은 부대원 모두 집합 + $query = "update general set city='$general[city]' where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 경험치 명성 공헌 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_27($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $who = $command[2]; + $where = $command[1]; + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select no,name,nation,level from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + + $query = "select name,nation,supply from city where city='$where'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + if(!$you) { + $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 발령 실패. <1>$date"; + } elseif($general[no] == $who) { + $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. $you[name] 발령 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. $you[name] 발령 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $you[name] 발령 실패. <1>$date"; + } elseif($destcity[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; + } elseif($destcity[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 도시가 아닙니다. $you[name] 발령 실패. <1>$date"; + } elseif($general[nation] != $you[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. $you[name] 발령 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$you[name](을)를 $destcity[name](으)로 발령했습니다. <1>$date"; + $youlog[count($youlog)] = "$general[name]에 의해 $destcity[name](으)로 발령됐습니다. <1>$date"; + $exp = 1; + $ded = 1; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 발령 + $query = "update general set city='$where' where no='$you[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 경험치 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +// $log = checkAbility($connect, $general, $log); + } + + pushGenLog($general, $log); + pushGenLog($you, $youlog); +} + +function process_28($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select level,capital from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 귀환 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 귀환 실패. <1>$date"; + } elseif(($general[level] == 1 || $general[level] >= 5) && $general[city] == $nation[capital]) { + $log[count($log)] = "●{$admin[month]}월:이미 수도입니다. 귀환 실패. <1>$date"; + } else { + if($general[level] == 2) { + $query = "select city,name from city where gen3='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } elseif($general[level] == 3) { + $query = "select city,name from city where gen2='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } elseif($general[level] == 4) { + $query = "select city,name from city where gen1='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } else { + $query = "select city,name from city where city='$nation[capital]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } + + $log[count($log)] = "●{$admin[month]}월:$city[name](으)로 귀환했습니다. <1>$date"; + $exp = 70; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 귀환 + $query = "update general set city='$city[city]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 경험치 상승 // 명성,공헌 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + + pushGenLog($general, $log); + pushGenLog($you, $youlog); +} + +function process_29($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost,npccount,turnterm,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,level,gennum,scout from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 인재탐색 실패. <1>$date"; + } elseif($nation[level] <= 0) { + $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 인재탐색 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3 && $nation[gennum] >= 10) { + $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; + } else { + $query = "select no from general where nation='$general[nation]' and npc<2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + $query = "select no from general where nation='$general[nation]' and npc=3"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + + $query = "select no from general where nation!='$general[nation]' and npc=3"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $otherNpccount = MYDB_num_rows($result); + $otherNpccount = round(sqrt($otherNpccount + 1)) - 1; + + if($gencount <= 0) { $gencount = 1; } + if($npccount <= 0) { $npccount = 1; } + $criteria = $gencount * $npccount + $otherNpccount; + + // 탐색 실패 + if(rand() % $criteria > 0) { + $exp = 100; + $ded = 70; + switch(rand()%3) { + case 0: $general[leader2] += 1; break; + case 1: $general[power2] += 1; break; + case 2: $general[intel2] += 1; break; + } + $log[count($log)] = "●{$admin[month]}월:인재를 찾을 수 없었습니다. <1>$date"; + } else { + // 탐색 성공 + $exp = 200; + $ded = 300; + switch(rand()%3) { + case 0: $general[leader2] += 3; break; + case 1: $general[power2] += 3; break; + case 2: $general[intel2] += 3; break; + } + + $name = getRandGenName(); + $name = 'ⓜ'.$name; + //중복장수 처리 + $query = "select no from general where name like '{$name}%'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + $count++; + if($count > 1) { + $name = "{$name}{$count}"; + } + + if($nation[scout] != 0) { + $scoutType = "발견"; + $scoutLevel = 0; + $scoutNation = 0; + } else { + $scoutType = "영입"; + $scoutLevel = 1; + $scoutNation = $nation[nation]; + } + + $log[count($log)] = "●{$admin[month]}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$name(이)라는 인재를 {$scoutType}"); + + $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $avgGen = MYDB_fetch_array($result); + + // 체섭시 무장 20%, 지장 20%, 무지장 60% + // 마이너 무장 40%, 지장 40%, 무지장 20% + $type = rand() % 10; + if($admin[scenario] == 0) { + switch($type) { + case 0: case 1: + $leader = 65 + rand()%11; + $intel = 10 + rand()%6; + $power = 150 - $leader - $intel; + break; + case 2: case 3: + $leader = 65 + rand()%11; + $power = 10 + rand()%6; + $intel = 150 - $leader - $power; + break; + case 4: case 5: case 6: case 7: case 8: case 9: + $leader = 10 + rand()%6; + $power = 65 + rand()%11; + $intel = 150 - $leader - $power; + break; + } + } else { + switch($type) { + case 0: case 1: case 2: case 3: + $leader = 65 + rand()%11; + $intel = 10 + rand()%6; + $power = 150 - $leader - $intel; + break; + case 4: case 5: case 6: case 7: + $leader = 65 + rand()%11; + $power = 10 + rand()%6; + $intel = 150 - $leader - $power; + break; + case 8: case 9: + $leader = 10 + rand()%6; + $power = 65 + rand()%11; + $intel = 150 - $leader - $power; + break; + } + } + // 국내 최고능치 기준으로 랜덤성 스케일링 + if($avgGen[lpi] > 210) { + $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); + $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); + } elseif($avgGen[lpi] > 180) { + $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); + $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); + } else { + $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); + } + $over1 = 0; + $over2 = 0; + $over3 = 0; + // 너무 높은 능치는 다른 능치로 분산 + if($leader > 90) { + $over1 = rand() % ($leader - 90) + 5; + $leader -= $over1; + } + if($power > 90) { + $over2 = rand() % ($power - 90) + 5; + $power -= $over2; + } + if($intel > 90) { + $over3 = rand() % ($intel - 90) + 5; + $intel -= $over3; + } + // 낮은 능치쪽으로 합산 + if($type == 0) { + $intel = $intel + $over1 + $over2 + $over3; + } else { + $power = $power + $over1 + $over2 + $over3; + } + // 너무 높은 능치는 제한 + if($leader > 95) { + $leader = 95; + } + if($power > 95) { + $power = 95; + } + if($intel > 95) { + $intel = 95; + } + + //인재추가 + $npc = 3; + $npcid = $admin[npccount]; + $npccount = 10000 + $npcid; + $npcmatch = rand() % 150 + 1; + $genid = "gen{$npccount}"; + $pw = md5("18071807"); + $picture = 'default.jpg'; + $turntime = getRandTurn($admin[turnterm]); + $personal = rand() % 10; + $bornyear = $admin[year]; + $deadyear = $admin[year] + 3; + $age = 20; + $specage = round((80 - $age)/12) + $age; + $specage2 = round((80 - $age)/3) + $age; + //$specage = $age + 1 + rand() % 3; + //$specage2 = $age + 5 + rand() % 5; + // 10년 ~ 50년 + $killturn = rand()%480 + 120; + + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, + city,leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos,tnmt, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit,bornyear,deadyear, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$scoutNation', + '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', + '$scoutLevel','100','100','0','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', + '0','$bornyear','$deadyear', + '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); + + $npcid++; + + //npccount + $query = "update game set npccount={$npcid} where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국가 기술력 그대로 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //국가 기술력 그대로 + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + } + + //기술로 가격 + $gold = $general[gold] - $admin[develcost]; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 + $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + $log = uniqueItem($connect, $general, $log); + } + + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_30($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 3); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select name from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $cost = $admin[develcost] * 5; + + if($dist[$destination] > 3) { + $log[count($log)] = "●{$admin[month]}월:거리가 멉니다. $destcity[name](으)로 강행 실패. <1>$date"; + } elseif($general[gold] < $cost) { + $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 강행 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 강행했습니다. <1>$date"; + $exp = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + + // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general[level] == 12) { + $query = "select level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation[level] == 0) { + $query = "update general set city='$destination' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name from general where nation='$general[nation]' and level<'12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 강행했습니다."; + for($j=0; $j < $gencount; $j++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + } + } + } + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_31($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 2); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select * from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + if(!$city) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 첩보 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*3) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*3) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; + } elseif($general[nation] == $city[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $city[name]에 첩보 실패. <1>$date"; +// } elseif($dist[$destination] > 3) { +// $log[count($log)] = "●{$admin[month]}월:너무 멉니다. $city[name]에 첩보 실패. <1>$date"; + } else { + $query = "select crew,crewtype from general where city='$destination' and nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $crew = 0; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + if($gen[crew] != 0) { $typecount[$gen[crewtype]]++; $crew += $gen[crew]; } + } + if($dist[$destination] > 2) { + $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin[month]}월:$city[name]의 소문만 들을 수 있었습니다. <1>$date"; + $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + } elseif($dist[$destination] == 2) { + $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin[month]}월:$city[name]의 어느정도 정보를 얻었습니다. <1>$date"; + $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; + $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin[month]}월:$city[name]의 많은 정보를 얻었습니다. <1>$date"; + $msg[count($msg)] = "【병종】"; + for($i=0; $i <= 5; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } + for($i=10; $i <= 14; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } + for($i=20; $i <= 27; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } + for($i=30; $i <= 38; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } + for($i=40; $i <= 43; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } + + $count = ceil(count($msg) / 8) * 8; + for($i=$count; $i > 0; $i-=8) { + $log[count($log)] = "{$msg[$i-8]} {$msg[$i-7]} {$msg[$i-6]} {$msg[$i-5]} {$msg[$i-4]} {$msg[$i-3]} {$msg[$i-2]} {$msg[$i-1]}"; + } + $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; + $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + + if($general[nation] != 0 && $city[nation] != 0) { + $query = "select name,tech from nation where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $yourTech = MYDB_fetch_array($result); + + $query = "select tech from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $myTech = MYDB_fetch_array($result); + + $diff = $yourTech[tech] - $myTech[tech]; // 차이 + if($diff >= 1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↑압도"; } + elseif($diff >= 250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▲우위"; } + elseif($diff >= -250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↕대등"; } + elseif($diff >= -1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▼열위"; } + else { $log[count($log)] = "【$yourTech[name]】아국대비기술:↓미미"; } + } + } + + // 자금 하락 // 경험치 상승 // 공헌도, 명성 상승 + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[leader2]++; + $general[gold] -= $admin[develcost]*3; + $general[rice] -= $admin[develcost]*3; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select spy from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } + for($i=0; $i < count($citys); $i++) { + if(floor($citys[$i]/10) == $destination) { + $exist = 1; + break; + } + } + // 기존 첩보 목록에 없으면 새로 등록, 있으면 갱신 + if($exist == 0) { + $citys[count($citys)] = $destination * 10 + 3; + } else { + $citys[$i] = $destination * 10 + 3; + } + $spy = implode("|", $citys); + $query = "update nation set spy='$spy' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_32($connect, &$general) { + global $_firing, $_basefiring, $_firingpower; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 5); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select * from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + if(!$destcity) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 화계 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($city[supply] == 0 && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 화계 실패. <1>$date"; + } elseif($dip[state] >= 7) { + $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 화계 실패. <1>$date"; + } else { + $query = "select intel,book from general where city='$destination' and nation='$destcity[nation]' order by intel desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $intelgen = MYDB_fetch_array($result); + + $ratio = round((($general[intel]+getBookEff($general[book]) - $intelgen[intel]-getBookEff($intelgen[book])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio2 = rand() % 100; + + if($general[item] == 5) { + // 이추 사용 + $ratio += 10; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] == 6) { + // 향낭 사용 + $ratio += 20; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 21 && $general[item] <= 22) { + // 육도, 삼략 사용 + $ratio += 20; + } + + // 특기보정 : 신산, 귀모 + if($general[special2] == 41) { $ratio += 10; } + if($general[special] == 31) { $ratio += 20; } + + // 국가보정 + if($nation[type] == 9) { $ratio += 10; } + + // 거리보정 + $ratio /= $dist[$destination]; + + if($ratio > $ratio2) { + $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 불타고 있습니다."; + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 성공했습니다. <1>$date"; + + $destcity[agri] -= rand() % $_firingpower + $_firingbase; + $destcity[comm] -= rand() % $_firingpower + $_firingbase; + if($destcity[agri] < 0) { $destcity[agri] = 0; } + if($destcity[comm] < 0) { $destcity[comm] = 0; } + $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]' where city='$destination'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set firenum=firenum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + TrickInjury($connect, $destination); + $exp = rand() % 100 + 201; + $ded = rand() % 70 + 141; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 실패했습니다. <1>$date"; + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[intel2]++; + $general[gold] -= $admin[develcost]*5; + $general[rice] -= $admin[develcost]*5; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_33($connect, &$general) { + global $_firing, $_basefiring, $_firingpower; + global $_basegold, $_baserice; + //탈취는 0까지 무제한 + $_basegold = 0; $_baserice = 0; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 5); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select name,level,nation,secu,secu2 from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select gold,rice from nation where nation='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + if(!$destcity) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 탈취 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($city[supply] == 0 && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 탈취 실패. <1>$date"; + } elseif($dip[state] >= 7) { + $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 탈취 실패. <1>$date"; + } else { + $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $powergen = MYDB_fetch_array($result); + + $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio2 = rand() % 100; + + if($general[item] == 5) { + // 이추 사용 + $ratio += 10; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] == 6) { + // 향낭 사용 + $ratio += 20; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 21 && $general[item] <= 22) { + // 육도, 삼략 사용 + $ratio += 20; + } + + // 특기보정 : 신산, 귀모 + if($general[special2] == 41) { $ratio += 10; } + if($general[special] == 31) { $ratio += 20; } + + // 국가보정 + if($mynation[type] == 9) { $ratio += 10; } + + // 거리보정 + $ratio /= $dist[$destination]; + + if($ratio > $ratio2) { + $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]에서 금과 쌀을 도둑맞았습니다."; + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 성공했습니다. <1>$date"; + + // 탈취 최대 400 * 8 + $gold = (rand() % $_firingpower + $_firingbase) * $destcity[level]; + $rice = (rand() % $_firingpower + $_firingbase) * $destcity[level]; + + $nation[gold] -= $gold; + $nation[rice] -= $rice; + if($nation[gold] < $_basegold) { $gold += ($nation[gold] - $_basegold); $nation[gold] = $_basegold; } + if($nation[rice] < $_baserice) { $rice += ($nation[rice] - $_baserice); $nation[rice] = $_baserice; } + $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$destcity[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=34 where city='$destination'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set firenum=firenum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 본국으로 회수, 재야이면 본인이 소유 + if($general[nation] != 0) { + $query = "select gold,rice from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + $nation[gold] += $gold; + $nation[rice] += $rice; + $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $general[gold] += $gold; + $general[rice] += $rice; + $query = "update general set gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $log[count($log)] = "●금$gold 쌀$rice을 획득했습니다."; + +// TrickInjury($connect, $destination); + $exp = rand() % 100 + 201; + $ded = rand() % 70 + 141; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 실패했습니다. <1>$date"; + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[power2]++; + $general[gold] -= $admin[develcost]*5; + $general[rice] -= $admin[develcost]*5; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_34($connect, &$general) { + global $_firing, $_basefiring, $_firingpower; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 5); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select name,nation,def,wall,secu,secu2 from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + if(!$destcity) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 파괴 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($city[supply] == 0 && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 파괴 실패. <1>$date"; + } elseif($dip[state] >= 7) { + $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 파괴 실패. <1>$date"; + } else { + $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $powergen = MYDB_fetch_array($result); + + $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio2 = rand() % 100; + + if($general[item] == 5) { + // 이추 사용 + $ratio += 10; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] == 6) { + // 향낭 사용 + $ratio += 20; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 21 && $general[item] <= 22) { + // 육도, 삼략 사용 + $ratio += 20; + } + + // 특기보정 : 신산, 귀모 + if($general[special2] == 41) { $ratio += 10; } + if($general[special] == 31) { $ratio += 20; } + + // 국가보정 + if($mynation[type] == 9) { $ratio += 10; } + + // 거리보정 + $ratio /= $dist[$destination]; + + if($ratio > $ratio2) { + $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $destcity[name]의 성벽을 허물었습니다."; + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 성공했습니다. <1>$date"; + + // 파괴 + $destcity[def] -= rand() % $_firingpower + $_firingbase; + $destcity[wall] -= rand() % $_firingpower + $_firingbase; + if($destcity[def] < 100) { $destcity[def] = 100; } + if($destcity[wall] < 100) { $destcity[wall] = 100; } + $query = "update city set state=34,def='$destcity[def]',wall='$destcity[wall]' where city='$destination'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set firenum=firenum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + TrickInjury($connect, $destination); + $exp = rand() % 100 + 201; + $ded = rand() % 70 + 141; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 실패했습니다. <1>$date"; + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[power2]++; + $general[gold] -= $admin[develcost]*5; + $general[rice] -= $admin[develcost]*5; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_35($connect, &$general) { + global $_firing, $_basefiring, $_firingpower; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 5); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select name,nation,rate,secu,secu2 from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $mynation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $mynation[level]; + } else { + $lbonus = 0; + } + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + if(!$destcity) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 선동 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($city[supply] == 0 && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 선동 실패. <1>$date"; + } elseif($dip[state] >= 7) { + $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 선동 실패. <1>$date"; + } else { + $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + $ratio = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus - ($gen[sum]-$gen[horse]+getHorseEff($gen[horse]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio2 = rand() % 100; + + if($general[item] == 5) { + // 이추 사용 + $ratio += 10; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] == 6) { + // 향낭 사용 + $ratio += 20; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 21 && $general[item] <= 22) { + // 육도, 삼략 사용 + $ratio += 20; + } + + // 특기보정 : 신산, 귀모 + if($general[special2] == 41) { $ratio += 10; } + if($general[special] == 31) { $ratio += 20; } + + // 국가보정 + if($mynation[type] == 9) { $ratio += 10; } + + // 거리보정 + $ratio /= $dist[$destination]; + + if($ratio > $ratio2) { + $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]의 백성들이 동요하고 있습니다."; + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 성공했습니다. <1>$date"; + + // 선동 최대 10 + $destcity[secu] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; + if($destcity[secu] < 0) { $destcity[secu] = 0; } + if($destcity[rate] < 0) { $destcity[rate] = 0; } + $query = "update city set state=32,rate='$destcity[rate]',secu='$destcity[secu]' where city='$destination'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set firenum=firenum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + TrickInjury($connect, $destination); + $exp = rand() % 100 + 201; + $ded = rand() % 70 + 141; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 실패했습니다. <1>$date"; + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[leader2]++; + $general[gold] -= $admin[develcost]*5; + $general[rice] -= $admin[develcost]*5; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_36($connect, &$general) { + global $_firing, $_basefiring, $_firingpower; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $dist = distance($connect, $general[city], 5); + $command = DecodeCommand($general[turn0]); + $destination = $command[1]; + + $query = "select * from city where city='$destination'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select level,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + if($general[level] == 12) { + $lbonus = $mynation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $mynation[level]; + } else { + $lbonus = 0; + } + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + if(!$destcity) { + $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 기습 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($city[supply] == 0 && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]*5) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($general[nation] == $destcity[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 기습 실패. <1>$date"; + } elseif($dip[state] >= 7) { + $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 기습 실패. <1>$date"; + } else { + $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + $ratio = round(((floor(($general[leader]+$general[intel]+$general[power]) * (100 - $general[injury])/100)+getWeapEff($general[weap])+getHorseEff($general[horse])+$lbonus+getBookEff($general[book]) - ($gen[sum]-$gen[weap]-$gen[horse]-$gen[book]+getWeapEff($gen[weap])+getHorseEff($gen[horse])+getBookEff($gen[book]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio2 = rand() % 100; + + if($general[item] == 5) { + // 이추 사용 + $ratio += 10; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] == 6) { + // 향낭 사용 + $ratio += 20; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 21 && $general[item] <= 22) { + // 육도, 삼략 사용 + $ratio += 20; + } + + // 특기보정 : 신산, 귀모 + if($general[special2] == 41) { $ratio += 10; } + if($general[special] == 31) { $ratio += 20; } + + // 국가보정 + if($mynation[type] == 9) { $ratio += 10; } + + // 거리보정 + $ratio /= $dist[$destination]; + + if($ratio > $ratio2) { + $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 누군가에게 공격 받았습니다."; + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 성공했습니다. <1>$date"; + + // 기습 + $destcity[agri] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity[comm] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity[secu] -= rand() % round($_firingpower/4) + $_firingbase; + $destcity[def] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity[wall] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; + if($destcity[agri] < 0) { $destcity[agri] = 0; } + if($destcity[comm] < 0) { $destcity[comm] = 0; } + if($destcity[secu] < 0) { $destcity[secu] = 0; } + if($destcity[def] < 0) { $destcity[def] = 0; } + if($destcity[wall] < 0) { $destcity[wall] = 0; } + if($destcity[rate] < 0) { $destcity[rate] = 0; } + $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]',secu='$destcity[secu]',def='$destcity[def]',wall='$destcity[wall]',rate='$destcity[rate]' where city='$destination'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set firenum=firenum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + TrickInjury($connect, $destination); + $exp = rand() % 100 + 201; + $ded = rand() % 70 + 141; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 실패했습니다. <1>$date"; + $exp = rand() % 100 + 1; + $ded = rand() % 70 + 1; + } + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $general[leader2]++; + $general[intel2]++; + $general[power2]++; + $general[gold] -= $admin[develcost]*5; + $general[rice] -= $admin[develcost]*5; + $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_41($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $ratio = rand() % 100; + $exp = $general[crew] / 400; + $crewexp = $general[crew] * $general[train] * $general[atmos] / 20 / 10000; + // 랜덤치 + $exp = round($exp * (80 + rand() % 41)/100); // 80 ~ 120% + $crewexp = round($crewexp * (80 + rand() % 41)/100); // 80 ~ 120% + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ratio = CharCritical($ratio, $general[personal]); + + if($general[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 단련 실패. <1>$date"; + } elseif($general[gold] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 단련 실패. <1>$date"; + } elseif($general[rice] < $admin[develcost]) { + $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 단련 실패. <1>$date"; + } elseif($general[train] < 40) { + $log[count($log)] = "●{$admin[month]}월:훈련이 너무 낮습니다. 단련 실패. <1>$date"; + } elseif($general[atmos] < 40) { + $log[count($log)] = "●{$admin[month]}월:사기가 너무 낮습니다. 단련 실패. <1>$date"; + } elseif($crewexp == 0) { + $log[count($log)] = "●{$admin[month]}월:병사가 모자랍니다. 단련 실패. <1>$date"; + } else { + $type = floor($general[crewtype] / 10) * 10; + switch($type) { + case 0: $crewstr = '보병'; break; + case 1: $crewstr = '궁병'; break; + case 2: $crewstr = '기병'; break; + case 3: $crewstr = '귀병'; break; + case 4: $crewstr = '차병'; break; + } + + if($ratio < 33) { + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], $crewexp); + $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도 향상이 지지부진했습니다. <1>$date"; + } elseif($ratio < 66) { + $exp = $exp * 2; + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], $crewexp * 2); + $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 향상되었습니다. <1>$date"; + } else { + $exp = $exp * 3; + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], $crewexp * 3); + $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 일취월장했습니다. <1>$date"; + } + + // 경험치 상승 // 명성 상승 + $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',rice=rice-'$admin[develcost]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushGenLog($general, $log); +} + +function process_42($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $type = rand() % 27 + 1; + $exp = 30; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $exp2 = $exp * 2; + + switch($type) { + case 1: + $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 금을 300 받았습니다. <1>$date"; + // 자금 상승 // 명성 상승 + $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 2: + $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 쌀을 300 받았습니다. <1>$date"; + // 군량 상승 // 명성 상승 + $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 3: + $log[count($log)] = "●{$admin[month]}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[intel2] += 2; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 4: + $log[count($log)] = "●{$admin[month]}월:명사와 설전을 벌였으나 망신만 당했습니다. <1>$date"; + // 명성 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 5: + $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[power2] += 2; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 6: + $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 했지만 망신만 당했습니다. <1>$date"; + // 명성 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 7: + $log[count($log)] = "●{$admin[month]}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; + // 자금 상승 // 경험치 상승 // 명성 상승 + $general[power2] += 2; + $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 8: + $log[count($log)] = "●{$admin[month]}월:산적을 만나 금 200을 빼앗겼습니다. <1>$date"; + $general[gold] -= 200; + if($general[gold] <= 0) { $general[gold] = 0; } + // 자금 하락 // 경험 상승 + $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 9: + $log[count($log)] = "●{$admin[month]}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; + // 군량 상승 // 경험치 상승 + $general[power2] += 2; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 10: + $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 다쳤습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 10 + 10; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 11: + $log[count($log)] = "●{$admin[month]}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; + // 군량 상승 // 경험치 상승 // 명성 상승 + $general[power2] += 2; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 12: + $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 다쳤습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 10 + 10; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 13: + $log[count($log)] = "●{$admin[month]}월:주점에서 사람들과 어울려 술을 마셨습니다. <1>$date"; + // 명성 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 14: + $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주었습니다. <1>$date"; + // 명성 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 15: + $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주다가 다쳤습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 10 + 10; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 16: + $log[count($log)] = "●{$admin[month]}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[intel2]++; + $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 17: + $log[count($log)] = "●{$admin[month]}월:돈을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; + $general[gold] -= 200; + if($general[gold] <= 0) { $general[gold] = 0; } + // 명성 상승 + $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 18: + $log[count($log)] = "●{$admin[month]}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[intel2]++; + $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 19: + $log[count($log)] = "●{$admin[month]}월:쌀을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; + $general[rice] -= 200; + if($general[rice] <= 0) { $general[rice] = 0; } + // 명성 상승 + $query = "update general set resturn='SUCCESS',rice='$general[rice]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 20: + $log[count($log)] = "●{$admin[month]}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[intel2] += 2; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 21: + $log[count($log)] = "●{$admin[month]}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[leader2] += 2; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 22: + $log[count($log)] = "●{$admin[month]}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[power2] += 2; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 23: + $log[count($log)] = "●{$admin[month]}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; + // 경험치 상승 // 명성 상승 + $general[leader2] += 2; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 24: + $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 크게 다쳤습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 30 + 20; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 25: + $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 크게 다쳤습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 30 + 20; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 26: + $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구하다가 죽을뻔 했습니다. <1>$date"; + // 경험치 하락 // 명성 상승 + $injury = rand() % 50 + 30; + $general[power2]--; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + default: + $log[count($log)] = "●{$admin[month]}월:아무일도 일어나지 않았습니다. <1>$date"; + // 명성 상승 + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } + + $log = checkAbility($connect, $general, $log); + pushGenLog($general, $log); +} + +function process_43($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $what = $command[3]; + $who = $command[2]; + $amount = $command[1]; + $amount *= 100; // 100~10000까지 + + if($amount > 10000) { $amount = 10000; } + if($amount < 100) { $amount = 100; } + if($what == 1) { $dtype = "금"; } + elseif($what == 2) { $dtype = "쌀"; } + else { $what = 2; $dtype = "쌀"; } + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select no,name,nation,gold,rice from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen = MYDB_fetch_array($result); + + if($what == 1 && $general[gold] < $amount) { $amount = $general[gold]; } + if($what == 2 && $general[rice] < $amount) { $amount = $general[rice]; } + + if(!$gen) { + $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 증여 실패. <1>$date"; + } elseif($what == 1 && $general[gold] <= 0) { + $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 증여 실패. <1>$date"; + } elseif($what == 2 && $general[rice] <= 0) { + $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 증여 실패. <1>$date"; + } elseif($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야는 불가능합니다. 증여 실패. <1>$date"; + } elseif($general[nation] != $city[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; + } elseif($general[nation] != $gen[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 증여 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; + } else { + $genlog[count($genlog)] = "●{$admin[month]}월:$general[name]에게서 $dtype $amount을 증여 받았습니다."; + $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 증여했습니다. <1>$date"; + + if($what == 1) { + $gen[gold] += $amount; + $query = "update general set gold='$gen[gold]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $general[gold] -= $amount; + $query = "update general set gold='$general[gold]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($what == 2) { + $gen[rice] += $amount; + $query = "update general set rice='$gen[rice]' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $general[rice] -= $amount; + $query = "update general set rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $exp = 70; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 경험치 상승 // 공헌도, 명성 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); + pushGenLog($gen, $genlog); +} + +function process_44($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name,gold,rice from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $what = $command[2]; + $amount = $command[1]; + $amount *= 100; // 100~10000까지 + + if($amount > 10000) { $amount = 10000; } + if($amount < 100) { $amount = 100; } + if($what == 1) { + $dtype = "금"; + if($general[gold] < $amount) { $amount = $general[gold]; } + } elseif($what == 2) { + $dtype = "쌀"; + if($general[rice] < $amount) { $amount = $general[rice]; } + } else { + $what = 2; + $dtype = "쌀"; + if($general[rice] < $amount) { $amount = $general[rice]; } + } + + if($general[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 헌납 실패. <1>$date"; + } elseif($what == 1 && $general[gold] <= 0) { + $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 헌납 실패. <1>$date"; + } elseif($what == 2 && $general[rice] <= 0) { + $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 헌납 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; + } else { +// $alllog[count($alllog)] = "●{$admin[month]}월:$nation[name]에서 장수들이 재산을 헌납 하고 있습니다."; + $log[count($log)] = "●{$admin[month]}월: $dtype $amount을 헌납했습니다. <1>$date"; + + if($what == 1) { + $general[gold] -= $amount; + $query = "update general set gold='$general[gold]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[gold] += $amount; + $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($what == 2) { + $general[rice] -= $amount; + $query = "update general set rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $nation[rice] += $amount; + $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $exp = 70; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 경험치 상승 // 공헌도, 명성 상승 + $general[leader2]++; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_45($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name,chemi from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($general[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야입니다. 하야 실패. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:초반제한중 하야는 불가능합니다. 하야 실패. <1>$date"; + } elseif($general[level] == 12) { + $log[count($log)] = "●{$admin[month]}월:군주입니다. 하야 실패. <1>$date"; + } else { + $exp = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount1 = MYDB_num_rows($dipresult); + + $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount2 = MYDB_num_rows($dipresult); + + $gold = 0; + $rice = 0; + // 금쌀1000이상은 남김 + if($general[gold] > 1000) { + $gold = $general[gold] - 1000; + $general[gold] = 1000; + } + if($general[rice] > 1000) { + $rice = $general[rice] - 1000; + $general[rice] = 1000; + } + + if($dipcount1 > 0) { + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 통합에 반대하며 $nation[name](을)를 떠났습니다."; + $log[count($log)] = "●{$admin[month]}월:통합에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:통합에 반대하며 $nation[name](을)를 떠남"); + + // 국적 바꾸고 등급 재야로 + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } elseif($dipcount2 > 0) { + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 합병에 반대하며 $nation[name](을)를 떠났습니다."; + $log[count($log)] = "●{$admin[month]}월:합병에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:합병에 반대하며 $nation[name](을)를 떠남"); + + // 국적 바꾸고 등급 재야로 + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 하야했습니다."; + $log[count($log)] = "●{$admin[month]}월:$nation[name]에서 하야했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 하야"); + + // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 + $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //도시의 태수, 군사, 시중직도 초기화 + $query = "update city set gen1='0' where gen1='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2='0' where gen2='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3='0' where gen3='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no from troop where troop='$general[troop]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $troop = MYDB_fetch_array($result); + + //부대장일 경우 + if($troop[no] == $general[no]) { + // 모두 탈퇴 + $query = "update general set troop='0' where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대 삭제 + $query = "delete from troop where troop='$general[troop]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update general set troop='0' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //국가 기술력 그대로 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + $nation[chemi] -= 1; + if($nation[chemi] < 0) { $nation[chemi] = 0; } + + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_46($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + $query = "select nation from nation where name='$general[makenation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + $command = DecodeCommand($general[turn0]); + $color = $command[1]; + $type = $command[2]; // 1 ~ 13 + + $colors = GetNationColors(); + if($color >= count($colors)) { $color = 0; } + $color = $colors[$color]; + + if($type < 1) { $type = 9; } + elseif($type > 13) { $type = 9; } + + if($gencount < 2) { + $log[count($log)] = "●{$admin[month]}월:수하 장수가 부족합니다. 건국 실패. <1>$date"; + } elseif($admin[year] >= $admin[startyear]+2) { + $log[count($log)] = "●{$admin[month]}월:건국 기간이 지났습니다. 건국 실패. <1>$date"; + } elseif($city[nation] != 0) { + $log[count($log)] = "●{$admin[month]}월:공백지가 아닙니다. 건국 실패. <1>$date"; + } elseif($nationcount > 0) { + $log[count($log)] = "●{$admin[month]}월:존재하는 국가명입니다. 건국 실패. <1>$date"; + } elseif($general[makelimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 건국 실패. <1>$date"; + } elseif($general[level] != 12) { + $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 건국 실패. <1>$date"; + } elseif($city[level] != 5 && $city[level] != 6) { + $log[count($log)] = "●{$admin[month]}월:중, 소 도시에서만 가능합니다. 건국 실패. <1>$date"; + } else { + $query = "update nation set name='$general[makenation]',color='$color',level=1,type='$type',capital='$general[city]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select nation,name,history from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + // 현 도시 소속지로 + $query = "update city set nation='$nation[nation]',conflict='',conflict2='' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "●{$admin[month]}월:$nation[name](을)를 건국하였습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에 국가를 건설하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【건국】".getNationType($type)." $nation[name](이)가 새로이 등장하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 건국"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nation[name](을)를 건국"); + + $exp = 1000; + $ded = 1000; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 명성 상승 + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = uniqueItem($connect, $general, $log, 3); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_47($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name,level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + //현재 외교 진행중(평시, 불가침만 제외)일때 + $query = "select state from diplomacy where me='$general[nation]' and state!='2' and state!='7'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($result); + + + if($general[level] != 12) { + $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; + } elseif($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:초반제한중에는 방랑이 불가능합니다. 방랑 실패."; + } elseif($dipcount != 0) { + $log[count($log)] = "●{$admin[month]}월:방랑할 수 없는 외교상태입니다. 방랑 실패."; + } elseif($nation[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:이미 방랑군입니다. 방랑 실패."; + } else { + $log[count($log)] = "●{$admin[month]}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 방랑의 길을 떠납니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 버리고 방랑"); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【방랑】$general[name]은(는) 방랑의 길을 떠납니다."; + + //분쟁기록 모두 지움 + DeleteConflict($connect, $general[nation]); + // 국명, 색깔 바꿈 국가 레벨 0, 성향리셋, 기술0 + $query = "update nation set name='$general[name]',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 본인 빼고 건국/임관제한 + $query = "update general set makelimit='12' where no!='$general[no]' and nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 건국/임관제한 + $query = "update general set resturn='SUCCESS',makelimit='12' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 관직장수 일반으로 + $query = "update general set level=1 where nation='$general[nation]' and level <= 11"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 전 도시 공백지로 + $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 리셋 + $query = "update diplomacy set state='2',term='0' where me='$general[nation]' or you='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushHistory($connect, $history); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_48($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $city = getCity($connect, $general[city]); + + $command = DecodeCommand($general[turn0]); + $type = $command[1]; + + if($type < 100) { $isweap = 0; } + elseif($type < 200) { $type -= 100; $isweap = 1; } + elseif($type < 300) { $type -= 200; $isweap = 2; } + elseif($type < 400) { $type -= 300; $isweap = 3; } + else { $type = 7; } + + if($isweap == 3) { $cost = getItemCost2($type); } + else { $cost = getItemCost($type); } + + //특기 보정 : 거상 + if($general[special] == 30 && $type != 0) { $cost *= 0.5; } + + if($city[trade] == 0 && $general[special] != 30) { + $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. 장비매매 실패. <1>$date"; + } elseif($city[secu]/1000 < $type) { + $log[count($log)] = "●{$admin[month]}월:이 도시에서는 구할 수 없었습니다. 구입 실패. <1>$date"; + } elseif($type > 6 || $type < 0) { + $log[count($log)] = "●{$admin[month]}월:구입할 수 있는 물건이 아닙니다. 구입 실패. <1>$date"; + } elseif($general[gold] < $cost && $type != 0) { + $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 구입 실패. <1>$date"; + } elseif($general[weap] == 0 && $isweap == 0 && $type == 0) { + $log[count($log)] = "●{$admin[month]}월:무기가 없습니다. 판매 실패. <1>$date"; + } elseif($general[book] == 0 && $isweap == 1 && $type == 0) { + $log[count($log)] = "●{$admin[month]}월:서적이 없습니다. 판매 실패. <1>$date"; + } elseif($general[horse] == 0 && $isweap == 2 && $type == 0) { + $log[count($log)] = "●{$admin[month]}월:명마가 없습니다. 판매 실패. <1>$date"; + } elseif($general[item] == 0 && $isweap == 3 && $type == 0) { + $log[count($log)] = "●{$admin[month]}월:도구가 없습니다. 판매 실패. <1>$date"; + } else { + if($isweap == 0) { + if($type != 0) { + $log[count($log)] = "●{$admin[month]}월:".getWeapName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $cost = round(getItemCost($general[weap]) / 2, 0); + $log[count($log)] = "●{$admin[month]}월:".getWeapName($general[weap])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } elseif($isweap == 1) { + if($type != 0) { + $log[count($log)] = "●{$admin[month]}월:".getBookName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $cost = round(getItemCost($general[book]) / 2, 0); + $log[count($log)] = "●{$admin[month]}월:".getBookName($general[book])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } elseif($isweap == 2) { + if($type != 0) { + $log[count($log)] = "●{$admin[month]}월:".getHorseName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $cost = round(getItemCost($general[horse]) / 2, 0); + $log[count($log)] = "●{$admin[month]}월:".getHorseName($general[horse])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } elseif($isweap == 3) { + if($type != 0) { + $log[count($log)] = "●{$admin[month]}월:".getItemName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $cost = round(getItemCost2($general[item]) / 2, 0); + $log[count($log)] = "●{$admin[month]}월:".getItemName($general[item])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } + + $exp = 10; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 명성 상승 + $query = "update general set experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($general, $log); +} + +function process_49($connect, &$general) { + global $_taxrate; + + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select level from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $city = getCity($connect, $general[city]); + + $command = DecodeCommand($general[turn0]); + $type = $command[2]; + $amount = $command[1]; + $amount *= 100; + + if($type != 1 && $type != 2) { $type = 1; } + if($amount < 100) { $amount = 100; } + elseif($amount > 10000) { $amount = 10000; } + + if($city[trade] == 0 && ($general[special] == 30 || $general[npc] >= 2)) { + $city[trade] = 100; + } + + // 거상 f배 이득시 금 계산 + // a : 쌀, b : 물가, f : 배수, c : 금 + // (0.7 ~1.3) : c = a((1+f)b-f) + // (0.99~1.01) : c = a((1-f)b+f) + if($type == 1) { + $dtype = "군량 판매"; + if($general[rice] < $amount) { $amount = $general[rice]; } + $cost = $amount * $city[trade] / 100; + //특기 보정 : 거상 + if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 + if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + $tax = $cost * $_taxrate; + $cost = $cost - $tax; + } elseif($type == 2) { + $dtype = "군량 구입"; + $cost = $amount * $city[trade] / 100; + //특기 보정 : 거상 + if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 + if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + $tax = $cost * $_taxrate; + $cost = $cost + $tax; + if($general[gold] < $cost) { + $cost = $general[gold]; + $tax = $cost * $_taxrate; + $amount = ($cost-$tax) * 100 / $city[trade]; + //특기 보정 : 거상 + if($general[special] == 30 && $city[trade] < 100) { $amount = ($cost-$tax) / (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 + if($general[special] == 30 && $city[trade] > 100) { $amount = ($cost-$tax) / (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + } + } + + $cost = round($cost); + $amount = round($amount); + $tax = round($tax); + + if($city[trade] == 0 && $general[special] != 30 && $general[npc] < 2) { + $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. $dtype 실패. <1>$date"; + } elseif($general[nation] != $city[nation] && $nation[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($type == 1 && $general[rice] <= 0) { + $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. $dtype 실패. <1>$date"; + } elseif($type == 2 && $general[gold] <= 0) { + $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. $dtype 실패. <1>$date"; + } else { + // 판매 + if($type == 1) { + $log[count($log)] = "●{$admin[month]}월:군량 $amount을 팔아 자금 $cost을 얻었습니다. <1>$date"; + // 군량 감소 + $query = "update general set rice=rice-{$amount} where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 증가 + $query = "update general set gold=gold+{$cost} where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 구입 + } elseif($type == 2) { + $log[count($log)] = "●{$admin[month]}월:군량 $amount을 사서 자금 $cost을 썼습니다. <1>$date"; + // 군량 증가 + $query = "update general set rice=rice+{$amount} where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 자금 감소 + $query = "update general set gold=gold-{$cost} where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 세금 국고로 + $query = "update nation set gold=gold+'$tax' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $exp = 30; + $ded = 50; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 공헌도, 명성 상승 + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 경험치 상승 + switch(rand()%3) { + case 0: + $general[leader2]++; + $query = "update general set leader2='$general[leader2]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 1: + $general[power2]++; + $query = "update general set power2='$general[power2]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 2: + $general[intel2]++; + $query = "update general set intel2='$general[intel2]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } + + $log = checkAbility($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_50($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $log[count($log)] = "●{$admin[month]}월:건강 회복을 위해 요양합니다. <1>$date"; + // 경험치 상승 // 공헌도, 명성 상승 + $exp = 10; + $ded = 7; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($general, $log); +} + +function process_51($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 권고 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 권고 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 권고 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 권고 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 항복 권고 서신을 보냈습니다.<1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 상대에게 발송 + //먼저 삭제된 칸 중 가장 오래된 칸 찾음 + $deleted = 4; + for($i=0; $i < 5; $i++) { + if($younation["dip{$i}"] == "") { $deleted = $i; } + } + //기존 메세지 한칸씩 뒤로 미룸 + for($i=$deleted-1; $i >=0; $i--) { + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + } + //권고 서신시 장수번호/상대국 번호 + $me = $general[no] * 10000 + $younation[nation]; + $date = date('Y-m-d H:i:s'); + $query = "update nation set dip0='{$nation[name]}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $log = checkAbility($connect, $general, $log); + } + + pushGenLog($general, $log); +} + +function process_52($connect, &$general) { + global $_basegold, $_baserice; + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,level,gold,rice,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + $command = DecodeCommand($mynation["l{$general[level]}turn0"]); + $rice = $command[3]; + $gold = $command[2]; + $which = $command[1]; + $rice *= 1000; + $gold *= 1000; + $limit = $mynation[level] * 10000; + + if($gold < 0) { $gold = 0; } + if($rice < 0) { $rice = 0; } + + $query = "select nation,name,gold,rice,surlimit,history from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($gold > $mynation[gold]-$_basegold) { $gold = $mynation[gold] - $_basegold; } + if($rice > $mynation[rice]-$_baserice) { $rice = $mynation[rice] - $_baserice; } + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 원조 실패. <1>$date"; + } elseif($gold == 0 && $rice == 0) { + $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; + } elseif($gold < 0 || $rice < 0) { + $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; + } elseif($gold > $limit || $rice > $limit) { + $log[count($log)] = "●{$admin[month]}월:작위 제한량 이상은 보낼 수 없습니다. 원조 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 원조 실패. <1>$date"; + } elseif($mynation[surlimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:외교제한중입니다. 원조 실패. <1>$date"; + } elseif($younation[surlimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:상대국이 외교제한중입니다. 원조 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 원조 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 원조 실패. <1>$date"; + } else { + // 본국 자원 감소 + $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 상대국 자원 증가 + $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$which'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //아국 수뇌부에게 로그 전달 + $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + $genlog[0] = "$younation[name](으)로 금$gold 쌀$rice을 지원했습니다."; + pushGenLog($gen, $genlog); + } + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name](으)로 금$gold 쌀$rice을 지원"); + $mynation = addNationHistory($connect, $mynation, "●{$admin[year]}년 {$admin[month]}월:$younation[name](으)로 금$gold 쌀$rice을 지원"); + $younation = addNationHistory($connect, $younation, "●{$admin[year]}년 {$admin[month]}월:$mynation[name](으)로부터 금$gold 쌀$rice을 지원 받음"); + + //상대국 수뇌부에게 로그 전달 + $query = "select no,name,nation from general where nation='$which' and level>='9'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + $genlog[0] = "$mynation[name]에서 금$gold 쌀$rice을 원조 했습니다."; + pushGenLog($gen, $genlog); + } + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【원조】$mynation[name]에서 $younation[name](으)로 물자를 지원합니다."; + $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 물자를 지원합니다. <1>$date"; + + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 경험치 상승 // 공헌도, 명성 상승 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +// $log = checkAbility($connect, $general, $log); + } + pushHistory($connect, $history); + pushGenLog($general, $log); +} + +function process_53($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 통합 제의 서신을 보냈습니다.<1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 상대에게 발송 + //먼저 삭제된 칸 중 가장 오래된 칸 찾음 + $deleted = 4; + for($i=0; $i < 5; $i++) { + if($younation["dip{$i}"] == "") { $deleted = $i; } + } + //기존 메세지 한칸씩 뒤로 미룸 + for($i=$deleted-1; $i >=0; $i--) { + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + } + //권고 서신시 장수번호/상대국 번호 + $me = $general[no] * 10000 + $younation[nation]; + $date = date('Y-m-d H:i:s'); + $query = "update nation set dip0='{$nation[name]}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_54($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $command = DecodeCommand($general[turn0]); + $who = $command[1]; + + $query = "select no,name,nation,history from general where no='$who'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nextruler = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + //현재 외교 진행중(통합제의중)일때 + $query = "select state from diplomacy where me='$general[nation]' and state='4'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($result); + + if($nextruler[name] == "") { + $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; + } elseif($general[level] != 12) { + $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 선양 실패. <1>$date"; + } elseif($nextruler[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; + } elseif($dipcount != 0) { + $log[count($log)] = "●{$admin[month]}월:현재 통합 진행중입니다. 선양 실패."; + } else { + //군주 교체 + $query = "update general set level='12' where no='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 태수,군사,시중이었다면 해제 + $query = "update city set gen1='0' where gen1='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2='0' where gen2='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3='0' where gen3='$who'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●$admin[year]년 $admin[month]월:【선양】$general[name](이)가 $nation[name]의 군주 자리를 $nextruler[name]에게 선양했습니다."; + $log[count($log)] = "●{$admin[month]}월:$nextruler[name]에게 군주의 자리를 물려줍니다. <1>$date"; + $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 물려받습니다."; + + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 $nextruler[name]에게 선양"); + $nextruler = addHistory($connect, $nextruler, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 물려 받음"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nextruler[name]에게 선양"); + } + pushGenLog($general, $log); + pushGenLog($nextruler, $youlog); + pushHistory($connect, $history); +} + +function process_55($connect, &$general) { + global $_baserice; + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation from nation where name='$general[name]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + if($nationcount > 0) { $makename = _String::SubStr("$nationcount".$general[name], 0, 6); } + else { $makename = $general[name]; } + + if($general[level] != 0) { + $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 거병 실패. <1>$date"; + } elseif($admin[year] >= $admin[startyear]+2) { + $log[count($log)] = "●{$admin[month]}월:거병 기간이 지났습니다. 거병 실패. <1>$date"; + } elseif($general[makelimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 거병 실패. <1>$date"; + } else { + $query = "insert into nation (name, color, gold, rice, rate, bill, tricklimit, surlimit, type, gennum) values ('$makename', '330000', '0', '$_baserice', '20' ,'100', '36', '72', '0', '1')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select nation,name,history from nation where name='$makename'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $exp = 100; + $ded = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 명성 상승 + // 군주로 + // 현 국가 소속으로 + $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='$nation[nation]',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "●{$admin[month]}월:거병에 성공하였습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에서 거병하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【거병】$general[name](이)가 세력을 결성하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$city[name]에서 거병"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $city[name]에서 거병"); + + // 외교테이블 추가 + $query = "select nation from nation where nation!='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + for($i=0; $i < $nationcount; $i++) { + $younation = MYDB_fetch_array($result); + $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$younation[nation]', '2', '0')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "insert into diplomacy (me, you, state, term) values ('$younation[nation]', '$nation[nation]', '2', '0')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_56($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select name from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select city from city where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + if($general[level] != 12) { + $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; + } elseif($citycount != 0) { + $log[count($log)] = "●{$admin[month]}월:방랑군이 아닙니다. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:세력을 해산했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 세력을 해산했습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 해산"); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + // 수동 해산인 국가 페널티, 자금, 군량 + if($genCount > 1) { + $query = "update general set resturn='SUCCESS' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set gold=1000 where nation='$general[nation]' and gold>1000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set rice=1000 where nation='$general[nation]' and rice>1000"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //분쟁기록 모두 지움 + DeleteConflict($connect, $general[nation]); + deleteNation($connect, $general); + } + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_57($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month,killturn from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select npc,no,name,killturn,history from general where nation='$general[nation]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $ruler = MYDB_fetch_array($result); + + if($general[level] == 0) { + $log[count($log)] = "●{$admin[month]}월:재야 입니다. 모반 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부 이상만 가능합니다. 모반 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 모반 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 모반 실패. <1>$date"; + } elseif($general[level] == 12) { + $log[count($log)] = "●{$admin[month]}월:이미 군주 입니다. 모반 실패. <1>$date"; + } elseif($ruler[killturn] >= $admin[killturn]) { + $log[count($log)] = "●{$admin[month]}월:군주가 활동중입니다. 모반 실패. <1>$date"; + } elseif($ruler[npc] >= 2) { + $log[count($log)] = "●{$admin[month]}월:군주가 NPC입니다. 모반 실패. <1>$date"; + } else { + //군주 교체 + $query = "update general set resturn='SUCCESS',level='12' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 태수,군사,시중이었다면 해제 + $query = "update city set gen1='0' where gen1='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen2='0' where gen2='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set gen3='0' where gen3='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set level='1',experience=experience*0.7 where no='$ruler[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[count($log)] = "●{$admin[month]}월:모반에 성공했습니다. <1>$date"; + $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 뺏겼습니다."; + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 모반에 성공했습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【모반】$general[name](이)가 $nation[name]의 군주 자리를 찬탈했습니다."; + + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:모반으로 $nation[name]의 군주자리를 찬탈"); + $ruler = addHistory($connect, $ruler, "●$admin[year]년 $admin[month]월:$general[name]의 모반으로 인해 $nation[name]의 군주자리를 박탈당함"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $ruler[name]에게서 군주자리를 찬탈"); + } + pushGenLog($general, $log); + pushGenLog($ruler, $youlog); + pushAllLog($alllog); + pushHistory($connect, $history); +} + +function process_61($connect, &$general) { + global $_basegold, $_baserice; + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost,turnterm from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select gold,rice,name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $when = $command[2]; + $which = $command[1]; + + if($when < 1) { $when = 1; } + elseif($when > 20) { $when = 20; } + + $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; +// } elseif($nation[gold]-$_basegold < $admin[develcost] || $nation[rice]-$_baserice < $admin[develcost]) { +// $log[count($log)] = "●{$admin[month]}월:증정할 물자가 부족합니다. 제의 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 불가침 제의 서신을 보냈습니다.<1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 상대에게 발송 + //먼저 삭제된 칸 중 가장 오래된 칸 찾음 + $deleted = 4; + for($i=0; $i < 5; $i++) { + if($younation["dip{$i}"] == "") { $deleted = $i; } + } + //기존 메세지 한칸씩 뒤로 미룸 + for($i=$deleted-1; $i >=0; $i--) { + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + } + //권고 서신시 장수번호/상대국 번호 + $me = $general[no] * 10000 + $younation[nation]; + $type = $when * 100 + 6; + $date = date('Y-m-d H:i:s'); + $query = "update nation set dip0='{$nation[name]}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 3턴후 + $date = addTurn($date, $admin[turnterm]); + $date = addTurn($date, $admin[turnterm]); + $date = addTurn($date, $admin[turnterm]); + //조건 표시기한 설정 + $query = "update diplomacy set showing='{$date}' where me='$general[nation]' and you='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // $admin[develcost]*10씩 차감 +// $amount = $admin[develcost]; +// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; +// MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_62($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,history,l{$general[level]}turn0,color from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,color,history from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + $query = "select * from general where nation='$younation[nation]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($result); + + //아국과의 관계 + $query = "select state from diplomacy where me='$nation[nation]' and you='$younation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + //대상국이 외교 진행중(합병수락중,통합수락중)일때 + $query = "select state from diplomacy where me='$younation[nation]' and (state='3' or state='5')"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 선포 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 선포 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 선포 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 선포 실패. <1>$date"; + } elseif($dip[state] == 0) { + $log[count($log)] = "●{$admin[month]}월:아국과 이미 교전중입니다. 선포 실패. <1>$date"; + } elseif($dip[state] == 1) { + $log[count($log)] = "●{$admin[month]}월:아국과 이미 선포중입니다. 선포 실패. <1>$date"; + } elseif($dip[state] == 7) { + $log[count($log)] = "●{$admin[month]}월:아국과 불가침중입니다. 선포 실패. <1>$date"; + } elseif($dipcount != 0) { + $log[count($log)] = "●{$admin[month]}월:상대국이 외교 진행중입니다. 선포 실패. <1>$date"; + } elseif(!isClose($connect, $nation[nation], $younation[nation])) { + $log[count($log)] = "●{$admin[month]}월:인접하지 않았습니다. 선포 실패. <1>$date"; + } elseif($admin['year'] <= $admin['startyear']) { + $log[count($log)] = "●{$admin[month]}월:초반제한 해제 2년전부터 가능합니다. 선포 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 선전 포고 했습니다.<1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $younation[name]선전 포고 하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【선포】$nation[name](이)가 $younation[name]에 선전 포고 하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name]에 선전 포고"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $younation[name]에 선전 포고"); + $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 선전 포고"); + + //외교 변경 + $query = "update diplomacy set state='1',term='24' where me='$nation[nation]' and you='$younation[nation]'"; + MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); + $query = "update diplomacy set state='1',term='24' where me='$younation[nation]' and you='$nation[nation]'"; + MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국메로 저장 + $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name]에 선전포고"; + $youmsg = "【외교】$admin[year]년 $admin[month]월:$nation[name]에서 선전포고"; + + PushMsg(2, $nation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $msg); + PushMsg(3, $younation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $youmsg); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_63($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 종전 제의 서신을 보냈습니다. <1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 상대에게 발송 + //먼저 삭제된 칸 중 가장 오래된 칸 찾음 + $deleted = 4; + for($i=0; $i < 5; $i++) { + if($younation["dip{$i}"] == "") { $deleted = $i; } + } + //기존 메세지 한칸씩 뒤로 미룸 + for($i=$deleted-1; $i >=0; $i--) { + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + } + //권고 서신시 장수번호/상대국 번호 + $me = $general[no] * 10000 + $younation[nation]; + $date = date('Y-m-d H:i:s'); + $query = "update nation set dip0='{$nation[name]}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_64($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + + if($younation[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 파기 제의 서신을 보냈습니다. <1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 상대에게 발송 + //먼저 삭제된 칸 중 가장 오래된 칸 찾음 + $deleted = 4; + for($i=0; $i < 5; $i++) { + if($younation["dip{$i}"] == "") { $deleted = $i; } + } + //기존 메세지 한칸씩 뒤로 미룸 + for($i=$deleted-1; $i >=0; $i--) { + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + } + //권고 서신시 장수번호/상대국 번호 + $me = $general[no] * 10000 + $younation[nation]; + $date = date('Y-m-d H:i:s'); + $query = "update nation set dip0='{$nation[name]}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $log = checkAbility($connect, $general, $log); + } + pushGenLog($general, $log); +} + +function process_65($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select city from city where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + $query = "select nation,capital,name,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation,pop,gen1,gen2,gen3 from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + //아국이 외교중(교전, 선포, 합병, 통합 // 즉 !통상, !불가침)일때 + $query = "select state from diplomacy where me='$nation[nation]' and (state!='2' and state!='7')"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($result); + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 초토화 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 초토화 실패. <1>$date"; + } elseif($nation[capital] == $destcity[city]) { + $log[count($log)] = "●{$admin[month]}월:수도입니다. 초토화 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 초토화 실패. <1>$date"; + } elseif($destcity[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 초토화 실패. <1>$date"; + } elseif($citycount <= 4) { + $log[count($log)] = "●{$admin[month]}월:더이상 물러날 수 없습니다. 초토화 실패. <1>$date"; + } elseif($dipcount != 0) { + $log[count($log)] = "●{$admin[month]}월:평시에만 가능합니다. 초토화 실패. <1>$date"; + } elseif($nation[surlimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:제한 턴이 있습니다. 초토화 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 초토화했습니다. <1>$date"; + $exp = 5; + $ded = 5; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]초토화를 명령하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【초토화】$nation[name](이)가 $destcity[name](을)를 초토화하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]초토화를 명령"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]초토화를 명령"); + + //외교제한 24 + $amount = round($destcity[pop] * 0.1); + $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //직위해제 + $query = "update general set level=1 where no='$destcity[gen1]' or no='$destcity[gen2]' or no='$destcity[gen3]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //성 공백지로 + $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //전장수 10% 삭감 + $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_66($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $dist = distance($connect, $nation[capital], 1); + $amount = $admin[develcost] * 10; + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 66) { + $term = floor($code/100) + 1; + $code = $term * 100 + 66; + } else { + $term = 1; + $code = 100 + 66; + } + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 천도 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 천도 실패. <1>$date"; + } elseif($city[supply] == 0) { + $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 천도 실패. <1>$date"; + } elseif($destcity[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 천도 실패. <1>$date"; + } elseif($dist[$destcity[city]] != 1) { + $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. 천도 실패. <1>$date"; + } elseif($nation[capset] == 1) { + $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 천도 실패. <1>$date"; + } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { + $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 천도 실패. <1>$date"; + } elseif($term < 3) { + $log[count($log)] = "●{$admin[month]}월:천도중... ({$term}/3) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 천도했습니다. <1>$date"; + $exp = 15; + $ded = 15; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](으)로 천도를 명령하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【천도】$nation[name](이)가 $destcity[name](으)로 천도하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](으)로 천도 명령"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](으)로 천도 명령"); + + //수도 변경 + $query = "update nation set l{$general[level]}term='0',capital='$destcity[city]',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_67($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation,level from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $amount = $admin[develcost] * 500 + 60000; // 7만~13만 + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 67) { + $term = floor($code/100) + 1; + $code = $term * 100 + 67; + } else { + $term = 1; + $code = 100 + 67; + } + + if($nation[capital] != $general[city]) { + $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 증축 실패. <1>$date"; + } elseif($nation[capital] != $destcity[city]) { + $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 증축 실패. <1>$date"; + } elseif($destcity[level] <= 3) { + $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 증축 실패. <1>$date"; + } elseif($destcity[level] >= 8) { + $log[count($log)] = "●{$admin[month]}월:더이상 증축할 수 없습니다. 증축 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 증축 실패. <1>$date"; + } elseif($nation[capset] == 1) { + $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 증축 실패. <1>$date"; + } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { + $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 증축 실패. <1>$date"; + } elseif($term < 6) { + $log[count($log)] = "●{$admin[month]}월:증축중... ({$term}/6) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 증축했습니다. <1>$date"; + $exp = 5 * 6; + $ded = 5 * 6; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 증축하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【증축】$nation[name](이)가 $destcity[name](을)를 증축하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 증축"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 증축"); + + //물자 감소 + $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //수도 증축 + $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_68($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation,level,pop,agri,comm,def,wall,secu,upgrading from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $amount = $admin[develcost] * 500 + 30000; // 4만~10만 + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 68) { + $term = floor($code/100) + 1; + $code = $term * 100 + 68; + } else { + $term = 1; + $code = 100 + 68; + } + + if($nation[capital] != $general[city]) { + $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 감축 실패. <1>$date"; + } elseif($nation[capital] != $destcity[city]) { + $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 감축 실패. <1>$date"; + } elseif($destcity[level] <= 3) { + $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 감축 실패. <1>$date"; + } elseif($destcity[level] <= 6) { + $log[count($log)] = "●{$admin[month]}월:더이상 감축할 수 없습니다. 감축 실패. <1>$date"; + } elseif($destcity[upgrading] <= 0) { + $log[count($log)] = "●{$admin[month]}월:증축된 도시가 아닙니다. 감축 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 감축 실패. <1>$date"; + } elseif($nation[capset] == 1) { + $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 감축 실패. <1>$date"; +// } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { +// $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 감축 실패. <1>$date"; + } elseif($term < 6) { + $log[count($log)] = "●{$admin[month]}월:감축중... ({$term}/6) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 감축했습니다. <1>$date"; + $exp = 5 * 6; + $ded = 5 * 6; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 감축하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【감축】$nation[name](이)가 $destcity[name](을)를 감축하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 감축"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 감축"); + + //물자 증가 + $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $pop = $destcity[pop] - 100000; + $agri = $destcity[agri] - 2000; + $comm = $destcity[comm] - 2000; + $def = $destcity[def] - 2000; + $wall = $destcity[wall] - 2000; + $secu = $destcity[secu] - 2000; + if($pop < 30000) { $pop = 30000; } + if($agri < 0) { $agri = 0; } + if($comm < 0) { $comm = 0; } + if($def < 0) { $def = 0; } + if($wall < 0) { $wall = 0; } + if($secu < 0) { $secu = 0; } + //수도 감축 + $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_71($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 10); + //if($term2 == 0) { $term2 = 1; } + $term2 = 3; + $term3 = round(sqrt($genCount*8)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 71) { + $term = floor($code/100) + 1; + $code = $term * 100 + 71; + } else { + $term = 1; + $code = 100 + 71; + } + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 필사즉생 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 필사즉생 실패. <1>$date"; + } elseif($dipCount == 0) { + $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 필사즉생 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 필사즉생 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:필사즉생 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:필사즉생 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 필사즉생(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 필사즉생(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:필사즉생(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 필사즉생(을)를 발동"); + + //전장수 훈사100 + $query = "update general set atmos=100,train=100 where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_72($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 20); + //if($term2 == 0) { $term2 = 1; } + $term2 = 1; + $term3 = round(sqrt($genCount*4)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 72) { + $term = floor($code/100) + 1; + $code = $term * 100 + 72; + } else { + $term = 1; + $code = 100 + 72; + } + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 백성동원 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 백성동원 실패. <1>$date"; + } elseif($dipCount == 0) { + $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 백성동원 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 백성동원 실패. <1>$date"; + } elseif($destcity[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국 도시만 가능합니다. 백성동원 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:백성동원 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:백성동원 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]백성동원(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]백성동원(을)를 발동"); + + //도시 성수 80% + $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_73($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where nation='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 20); + //if($term2 == 0) { $term2 = 1; } + $term2 = 3; + $term3 = round(sqrt($genCount*4)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 73) { + $term = floor($code/100) + 1; + $code = $term * 100 + 73; + } else { + $term = 1; + $code = 100 + 73; + } + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 수몰 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 수몰 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. 수몰 실패. <1>$date"; + } elseif($destcity[nation] == $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 수몰 실패. <1>$date"; + } elseif($dip[state] > 0) { + $log[count($log)] = "●{$admin[month]}월:전쟁중인 상대국에만 가능합니다. 수몰 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 수몰 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:수몰 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:수몰 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + + $query = "select no,name from general where nation='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$destcity[name]수몰이 발동되었습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]수몰(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]수몰(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]수몰(을)를 발동"); + + //도시 성수 80% 감소 + $query = "update city set def=def*0.2,wall=wall*0.2 where city='$destcity[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_74($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select city,name,nation from city where city='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destcity = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where nation='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 20); + //if($term2 == 0) { $term2 = 1; } + $term2 = 2; + $term3 = round(sqrt($genCount*4)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 74) { + $term = floor($code/100) + 1; + $code = $term * 100 + 74; + } else { + $term = 1; + $code = 100 + 74; + } + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 허보 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 허보 실패. <1>$date"; + } elseif($destcity[nation] == 0) { + $log[count($log)] = "●{$admin[month]}월:공백지입니다. 허보 실패. <1>$date"; + } elseif($destcity[nation] == $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 허보 실패. <1>$date"; + } elseif($dip[state] > 1) { + $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 허보 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 허보 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:허보 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:허보 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]허보(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]허보(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]허보(을)를 발동"); + + //상대국 도시 전부 검색 + $query = "select city from city where nation='$destcity[nation]' and supply=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + for($i=0; $i < $cityCount; $i++) { + $dCity = MYDB_fetch_array($result); + $citys[$i] = $dCity[city]; + } + //상대국 유저 랜덤 배치 + $query = "select no,name from general where nation='$destcity[nation]' and city='$destcity[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + $opplog[0] = "●상대국의 허보에 당했다! <1>$date"; + for($i=0; $i < $count; $i++) { + $gen = MYDB_fetch_array($result); + $selCity = $citys[rand() % $cityCount]; + //현재도시이면 한번 다시 랜덤추첨 + if($selCity == $destcity[city]) { $selCity = $citys[rand() % $cityCount]; } + + $query = "update general set city={$selCity} where no='$gen[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($gen, $opplog); + } + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_75($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,history from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + $query = "select state from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 40); + //if($term2 == 0) { $term2 = 1; } + $term2 = 3; + $term3 = round(sqrt($genCount*2)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 75) { + $term = floor($code/100) + 1; + $code = $term * 100 + 75; + } else { + $term = 1; + $code = 100 + 75; + } + + if(!$destnation) { + $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 피장파장 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 피장파장 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 피장파장 실패. <1>$date"; + } elseif($dip[state] > 1) { + $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 피장파장 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 피장파장 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:피장파장 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:피장파장 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + + $query = "select no,name from general where nation='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "●아국에 피장파장이 발동되었습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]피장파장(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]피장파장(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 피장파장(을)를 발동"); + + //전략기한+60 + $query = "update nation set tricklimit=tricklimit+60 where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한, 최소72 + if($term3 < 72) { $term3 = 72; } + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_76($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select startyear,year,month,develcost,npccount,turnterm from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + //$term2 = round($genCount / 10); + //if($term2 == 0) { $term2 = 1; } + $term2 = 3; + $term3 = round(sqrt($genCount*10)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 76) { + $term = floor($code/100) + 1; + $code = $term * 100 + 76; + } else { + $term = 1; + $code = 100 + 76; + } + + if($admin[year] < $admin[startyear]+3) { + $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 의병모집 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 의병모집 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 의병모집 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 의병모집 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:의병모집 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:의병모집 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 의병모집(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 의병모집(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:의병모집(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 의병모집(을)를 발동"); + + $query = "select avg(gennum) as gennum from nation"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $avgNation = MYDB_fetch_array($result); + $gencount = 5 + round($avgNation[gennum] / 10); + + $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $avgGen = MYDB_fetch_array($result); + + //의병추가 + $npc = 4; + $npcid = $admin[npccount]; + for($i=0; $i < $gencount; $i++) { + // 무장 40%, 지장 40%, 무지장 20% + $type = rand() % 10; + switch($type) { + case 0: case 1: case 2: case 3: + $leader = 65 + rand()%11; + $intel = 10 + rand()%6; + $power = 150 - $leader - $intel; + break; + case 4: case 5: case 6: case 7: + $leader = 65 + rand()%11; + $power = 10 + rand()%6; + $intel = 150 - $leader - $power; + break; + case 8: case 9: + $leader = 10 + rand()%6; + $power = 65 + rand()%11; + $intel = 150 - $leader - $power; + break; + } + // 국내 최고능치 기준으로 랜덤성 스케일링 + if($avgGen[lpi] > 210) { + $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); + $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); + } elseif($avgGen[lpi] > 180) { + $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); + $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); + } else { + $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); + } + $over1 = 0; + $over2 = 0; + $over3 = 0; + // 너무 높은 능치는 다른 능치로 분산 + if($leader > 90) { + $over1 = rand() % ($leader - 90) + 5; + $leader -= $over1; + } + if($power > 90) { + $over2 = rand() % ($power - 90) + 5; + $power -= $over2; + } + if($intel > 90) { + $over3 = rand() % ($intel - 90) + 5; + $intel -= $over3; + } + // 낮은 능치쪽으로 합산 + if($type == 0) { + $intel = $intel + $over1 + $over2 + $over3; + } else { + $power = $power + $over1 + $over2 + $over3; + } + // 너무 높은 능치는 제한 + if($leader > 95) { + $leader = 95; + } + if($power > 95) { + $power = 95; + } + if($intel > 95) { + $intel = 95; + } + + $npccount = 10000 + $npcid; + $npcmatch = rand() % 150 + 1; + $genid = "gen{$npccount}"; + $pw = md5("18071807"); + $name = "ⓖ의병장{$npcid}"; + $picture = 'default.jpg'; + $turntime = getRandTurn($admin[turnterm]); + $personal = rand() % 10; + $bornyear = $admin[year]; + $deadyear = $admin[year] + 3; + $killturn = 64 + rand()%7; + + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, + city,leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos,tnmt, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit,bornyear,deadyear, + dex0, dex10, dex20, dex30, dex40 + ) values ( + '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation[nation]', + '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', + '1','100','100','0','0','0','0','0', + '0','0','0','$turntime','$killturn','$avgGen[age]','1','$personal','0','0','0','0','', + '0','$bornyear','$deadyear', + '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); + + $npcid++; + } + //npccount + $query = "update game set npccount={$npcid} where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //국가 기술력 그대로 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한, 국가 기술력 그대로 + $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_77($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,history from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + $term2 = 1; + $term3 = round(sqrt($genCount*16)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 77) { + $term = floor($code/100) + 1; + $code = $term * 100 + 77; + } else { + $term = 1; + $code = 100 + 77; + } + + if(!$destnation) { + $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 이호경식 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 이호경식 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 이호경식 실패. <1>$date"; + } elseif($dip[state] > 1) { + $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 이호경식 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 이호경식 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:이호경식 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:이호경식 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + + $query = "select no,name from general where nation='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "●아국에 이호경식이 발동되었습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]이호경식(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]이호경식(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 이호경식(을)를 발동"); + + //선포+3개월 + if($dip[state] == 0) { + $query = "update diplomacy set state=1,term=3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update diplomacy set term=term+3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_78($connect, &$general) { + global $_basegold, $_baserice; + + $date = substr($general[turntime],11,5); + + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,supply from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + + $query = "select nation,name,history from nation where nation='$which'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + if($genCount < 10) { $genCount = 10; } + + $term2 = 1; + $term3 = round(sqrt($genCount*16)*10); + + $code = $nation["l{$general[level]}term"]; + if($code%100 == 78) { + $term = floor($code/100) + 1; + $code = $term * 100 + 78; + } else { + $term = 1; + $code = 100 + 78; + } + + if(!$destnation) { + $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 급습 실패. <1>$date"; + } elseif($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 급습 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 급습 실패. <1>$date"; + } elseif($dip[state] != 1) { + $log[count($log)] = "●{$admin[month]}월:선포중인 상대국에만 가능합니다. 급습 실패. <1>$date"; + } elseif($dip[term] < 12) { + $log[count($log)] = "●{$admin[month]}월:선포 12개월 이상인 상대국에만 가능합니다. 급습 실패. <1>$date"; + } elseif($nation[tricklimit] > 0) { + $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 급습 실패. <1>$date"; + } elseif($term < $term2) { + $log[count($log)] = "●{$admin[month]}월:급습 수행중... ({$term}/{$term2}) <1>$date"; + + $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $log[count($log)] = "●{$admin[month]}월:급습 발동! <1>$date"; + $exp = 5 * $term2; + $ded = 5 * $term2; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + + $query = "select no,name from general where nation='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $alllog[0] = "●아국에 급습이 발동되었습니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $alllog); + } + +// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]급습(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]급습(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 급습(을)를 발동"); + + //선포-3개월 + $query = "update diplomacy set term=term-3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 국가보정 + if($nation[type] == 11) { $term3 = round($term3 / 2); } + if($nation[type] == 12) { $term3 = $term3 * 2; } + + //전략기한 + $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + +// pushHistory($connect, $history); +// pushAllLog($alllog); + pushTrickLog($connect, $tricklog); + pushGenLog($general, $log); +} + +function process_81($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + + $query = "select nation,colset,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $which = $command[1]; + $colors = GetNationColors(); + if($which >= count($colors)) { $which = 0; } + $color = $colors[$which]; + + if($city[nation] != $general[nation]) { + $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 국기변경 실패. <1>$date"; + } elseif($general[level] < 5) { + $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 국기변경 실패. <1>$date"; + } elseif($nation[colset] <= 0) { + $log[count($log)] = "●{$admin[month]}월:더이상 변경이 불가능합니다. 국기변경 실패. <1>$date"; + } else { + $log[count($log)] = "●{$admin[month]}월:국기를 변경합니다. <1>$date"; + $exp = 10; + $ded = 10; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cnt = MYDB_num_rows($result); + $genlog[0] = "$general[name](이)가 국기를 변경합니다."; + for($i=0; $i < $cnt; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + } + + $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 국기를 변경하였습니다."; + $history[count($history)] = "●$admin[year]년 $admin[month]월:【국기변경】$nation[name](이)가 국기를 변경하였습니다."; + $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:국기를 변경"); + $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 국기를 변경"); + + //국기변경 + $query = "update nation set color='$color',colset=colset-1 where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //경험치, 공헌치 + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + pushHistory($connect, $history); + pushAllLog($alllog); + pushGenLog($general, $log); +} + +function process_99($connect, &$general) { + $date = substr($general[turntime],11,5); + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $log[count($log)] = "●{$admin[month]}월:아직 구현되지 않았습니다. <1>$date"; + + $exp = 100; + + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + $ded = CharDedication($ded, $general[personal]); + + // 명성 상승 + $query = "update general set experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($general, $log); +} + +?> diff --git a/twe_close/func_string.php b/twe_close/func_string.php new file mode 100644 index 00000000..6c8c0c27 --- /dev/null +++ b/twe_close/func_string.php @@ -0,0 +1,304 @@ += 22) { $str = "{$str}"; } + + return $str; +} + +function unfont($str) { + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + return $str; +} + +function SQ2DQ($str) { + return str_replace("'", "'", $str); +} + +function Tag2Code($str) { +// return htmlspecialchars(nl2br(str_replace(" ", " ", $str))); +// $str = str_replace("&", "&", $str); + $str = str_replace("'", "'", $str); + $str = str_replace("\"", """, $str); + $str = str_replace("<", "<", $str); + $str = str_replace(">", ">", $str); +// $str = str_replace(" ", " ", $str); +// return htmlspecialchars(nl2br($str)); + return nl2br($str); +} + +function BadTag2Code($str) { + $str = str_replace("= 0xf0) { + $len++; + $i += 4; + } elseif($code >= 0xe0) { + $len++; + $i += 3; + } elseif($code >= 0xc2) { + $len++; + $i += 2; + } else { + $len++; + $i += 1; + } + } + return $len; + } + + public static function SubStr($str, $s, $l=1000) { + $count = strlen($str); + $startByte = 0; $isSet = 0; + $endByte = $count; + $len = 0; + for($i=0; $i < $count; ) { + $code = ord($str[$i]); + + if($isSet == 0 && $len >= $s) { + $startByte = $i; $isSet = 1; + } + if($isSet == 1 && $len-$s >= $l) { + $endByte = $i; + break; + } + + if($code >= 0xf0) { + $len++; + $i += 4; + } elseif($code >= 0xe0) { + $len++; + $i += 3; + } elseif($code >= 0xc2) { + $len++; + $i += 2; + } else { + $len++; + $i += 1; + } + } + $str = substr($str, $startByte, $endByte-$startByte); + return $str; + } + + public static function SubStrForWidth($str, $s, $w) { + $count = strlen($str); + $startByte = 0; $isSet = 0; + $endByte = $count; $last = 0; + $len = 0; + $width = 0; + for($i=0; $i < $count; ) { + $code = ord($str[$i]); + + if($isSet == 0 && $len >= $s) { + $startByte = $i; $isSet = 1; + $width = 0; + } + if($isSet == 1 && $width == $w) { + $endByte = $i; + break; + } + if($isSet == 1 && $width > $w) { + $endByte = $i - $last; + break; + } + + if($code >= 0xf0) { + $len++; + $width += 2; + $last = 4; + $i += 4; + } elseif($code >= 0xe0) { + $len++; + $width += 2; + $last = 3; + $i += 3; + } elseif($code >= 0xc2) { + $len++; + $width += 2; + $last = 2; + $i += 2; + } else { + $len++; + $width += 1; + $last = 1; + $i += 1; + } + } + $str = substr($str, $startByte, $endByte-$startByte); + return $str; + } + + public static function CutStrForWidth($str, $s, $w, $ch='..') { + $isCut = 0; + $count = strlen($str); + $startByte = 0; $isSet = 0; + $endByte = $count; $last = 0; + $len = 0; + $width = 0; + for($i=0; $i < $count; ) { + $code = ord($str[$i]); + + if($isSet == 0 && $len >= $s) { + $startByte = $i; $isSet = 1; + $width = 0; + } + if($isSet == 1 && $width >= $w) { + $endByte = $i - $last; + $isCut = 1; + break; + } + + if($code >= 0xf0) { + $len++; + $width += 2; + $last = 4; + $i += 4; + } elseif($code >= 0xe0) { + $len++; + $width += 2; + $last = 3; + $i += 3; + } elseif($code >= 0xc2) { + $len++; + $width += 2; + $last = 2; + $i += 2; + } else { + $len++; + $width += 1; + $last = 1; + $i += 1; + } + } + if($isCut != 0) { + $str = substr($str, $startByte, $endByte-$startByte) . $ch; + } + return $str; + } + + //중간정렬 + function Fill($str, $maxsize, $ch) { + $size = strlen($str); + + $count = ($maxsize - $size) / 2; + + for($i=0; $i < $count; $i++) { + $string = $string.$ch; + } + $string = $string.$str; + for($i=0; $i < $count; $i++) { + $string = $string.$ch; + } + return $string; + } + + //우측정렬 + function Fill2($str, $maxsize, $ch='0') { + $size = strlen($str); + + $count = ($maxsize - $size); + + for($i=0; $i < $count; $i++) { + $string = $string.$ch; + } + $string = $string.$str; + + return $string; + } + + public static function EscapeTag($str) { + $str = htmlspecialchars($str); + $str = str_replace("\r\n", "
", $str); + $str = str_replace("\n", "
", $str); +// return nl2br(htmlspecialchars($str)); +// return htmlspecialchars($str); + return $str; + } + + public static function NoSpecialCharacter($str) { + $str = str_replace(" ", "", $str); + $str = str_replace("\"", "", $str); + $str = str_replace("'", "", $str); + $str = str_replace("ⓝ", "", $str); + $str = str_replace("ⓜ", "", $str); + $str = str_replace("ⓖ", "", $str); + $str = str_replace("\\", "", $str); + $str = str_replace("/", "", $str); + $str = str_replace("`", "", $str); + $str = str_replace("-", "", $str); + $str = str_replace("=", "", $str); + $str = str_replace("[", "", $str); + $str = str_replace("]", "", $str); + $str = str_replace(";", "", $str); + $str = str_replace(",", "", $str); + $str = str_replace(".", "", $str); + $str = str_replace("~", "", $str); + $str = str_replace("!", "", $str); + $str = str_replace("@", "", $str); + $str = str_replace("#", "", $str); + $str = str_replace("$", "", $str); + $str = str_replace("%", "", $str); + $str = str_replace("^", "", $str); + $str = str_replace("&", "", $str); + $str = str_replace("*", "", $str); + $str = str_replace("(", "", $str); + $str = str_replace(")", "", $str); + $str = str_replace("_", "", $str); + $str = str_replace("+", "", $str); + $str = str_replace("|", "", $str); + $str = str_replace("{", "", $str); + $str = str_replace("}", "", $str); + $str = str_replace(":", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("<", "", $str); + $str = str_replace(">", "", $str); + $str = str_replace("?", "", $str); + $str = str_replace(" ", "", $str); + return $str; + } +} + +?> diff --git a/twe_close/func_tournament.php b/twe_close/func_tournament.php new file mode 100644 index 00000000..569fc988 --- /dev/null +++ b/twe_close/func_tournament.php @@ -0,0 +1,991 @@ += 0) { + switch($admin[tnmt_auto]) { + case 1: $unit = 720; break; + case 2: $unit = 420; break; + case 3: $unit = 180; break; + case 4: $unit = 60; break; + case 5: $unit = 30; break; + case 6: $unit = 15; break; + case 7: $unit = 5; break; + } + + //업데이트 횟수 + $iter = floor($admin[offset] / $unit) + 1; + + for($i=0; $i < $iter; $i++) { + switch($tnmt) { + case 1: //신청 마감 + fillLowGenAll($connect); + $tnmt = 2; $phase = 0; + break; + case 2: //예선중 + qualify($connect, $type, $tnmt, $phase); $phase++; + if($phase >= 56) { $tnmt = 3; $phase = 0; } + break; + case 3: //추첨중 + selectionAll($connect, $type, $tnmt, $phase); $phase+=8; + if($phase >= 32) { $tnmt = 4; $phase = 0; } + break; + case 4: //본선중 + finallySingle($connect, $type, $tnmt, $phase); $phase++; + if($phase >= 6) { $tnmt = 5; $phase = 0; } + break; + case 5: //배정중 + final16set($connect); + $tnmt = 6; $phase = 0; + break; + case 6: //베팅중 + $tnmt = 7; $phase = 0; + break; + case 7: //16강중 + finalFight($connect, $type, $tnmt, $phase, 16); $phase++; + if($phase >= 8) { $tnmt = 8; $phase = 0; } + break; + case 8: //8강중 + finalFight($connect, $type, $tnmt, $phase, 8); $phase++; + if($phase >= 4) { $tnmt = 9; $phase = 0; } + break; + case 9: //4강중 + finalFight($connect, $type, $tnmt, $phase, 4); $phase++; + if($phase >= 2) { $tnmt = 10; $phase = 0; } + break; + case 10: //결승중 + finalFight($connect, $type, $tnmt, $phase, 2); + $tnmt = 0; $phase = 0; + setGift($connect, $type, $tnmt, $phase); + $i = $iter; + break; + } + + //베팅은 무조건 60페이즈후 진행(최대 1시간) + if($tnmt == 6) { + $betTerm = $unit * 60; + if($betTerm > 3600) { $betTerm = 3600; } + //처리 초 더한 날짜 + $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i + $betTerm); + $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time='$dt' where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; + } + + if($admin[tnmt_auto] == 1) { + //처리 초 더한 날짜 + $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i); + $hr = substr($dt, 11, 2); + //지정시간대 넘어가면 중단 20~24시 + if($hr < 20) { + $dt = substr($dt, 0, 11)."20:00:00"; + $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time='$dt' where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + return; + } + } + } + + $second = $unit * $iter; + $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time=DATE_ADD(tnmt_time, INTERVAL {$second} SECOND) where no=1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function getTournamentTerm($connect) { + $query = "select tnmt_auto from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + switch($admin[tnmt_auto]) { + case 1: $str = "경기당 12분"; break; + case 2: $str = "경기당 7분"; break; + case 3: $str = "경기당 3분"; break; + case 4: $str = "경기당 1분"; break; + case 5: $str = "경기당 30초"; break; + case 6: $str = "경기당 15초"; break; + case 7: $str = "경기당 5초"; break; + } + return $str; +} + +function getTournamentTime($connect) { + $query = "select tournament,tnmt_time from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $tnmt = $admin[tournament]; + $dt = substr($admin[tnmt_time], 11, 5); + switch($tnmt) { + case 1: $tnmt = "개막시간 {$dt}"; break; + case 2: $tnmt = "다음경기 {$dt}"; break; + case 3: $tnmt = "다음추첨 {$dt}"; break; + case 4: $tnmt = "다음경기 {$dt}"; break; + case 5: $tnmt = "16강배정 {$dt}"; break; + case 6: $tnmt = "베팅마감 {$dt}"; break; + case 7: case 8: case 9: case 10: + $tnmt = "다음경기 {$dt}"; break; + default: $tnmt = ""; break; + } + return $tnmt; +} + +function getTournament($tnmt) { + switch($tnmt) { + case 0: $tnmt = "경기 없음"; break; + case 1: $tnmt = "참가 모집중"; break; + case 2: $tnmt = "예선 진행중"; break; + case 3: $tnmt = "본선 추첨중"; break; + case 4: $tnmt = "본선 진행중"; break; + case 5: $tnmt = "16강 배정중"; break; + case 6: $tnmt = "베팅 진행중"; break; + case 7: $tnmt = "16강 진행중"; break; + case 8: $tnmt = "8강 진행중"; break; + case 9: $tnmt = "4강 진행중"; break; + case 10: $tnmt = "결승 진행중"; break; + } + return $tnmt; +} + +function printRow($k, $npc, $name, $abil, $game, $win, $draw, $lose, $gd, $gl, $prmt) { + if($prmt > 0) { $name = "".$name.""; } + elseif($npc >= 2) { $name = "".$name.""; } + elseif($npc == 1) { $name = "".$name.""; } + echo "$k$name$abil$game$win$draw$lose$gd$gl"; +} + +function printFightLog($group) { + $fp = @fopen("logs/fight{$group}.txt", "r"); + $file = @fread($fp, 3000); + @fclose($fp); + $log = explode("\r\n", $file); + $str = ""; + for($i=0; $i < count($log); $i++) { $str .= ConvertLog($log[$i], 1)."
"; } + return substr($str, 0, -4); +} + +function pushFightLog($group, $log) { + $fp = fopen("logs/fight{$group}.txt", "w"); + $size = count($log); + for($i=0; $i < $size; $i++) { + fwrite($fp, $log[$i]."\r\n"); + } + fclose($fp); +} + +function printFighting($tournament, $phase) { + $code = $tournament * 100 + $phase; + if($code == 0) { + echo ""; + echo " "; + echo " "; + echo " "; + echo "".printFightLog(50).""; + echo " "; + echo " "; + echo " "; + echo " "; + echo ""; + } elseif($code <= 300) { + echo ""; + for($i=0; $i < 8; $i++) { + echo "".printFightLog($i).""; + } + echo ""; + } elseif($code < 400) { + } elseif($code <= 500) { + echo ""; + for($i=10; $i < 18; $i++) { + echo "".printFightLog($i).""; + } + echo ""; + } elseif($code < 700) { + } elseif($code <= 800) { + echo ""; + for($i=20; $i < 28; $i++) { + echo "".printFightLog($i).""; + } + echo ""; + } elseif($code <= 900) { + echo ""; + for($i=30; $i < 34; $i++) { + echo " "; + echo "".printFightLog($i).""; + } + echo ""; + } elseif($code <= 1000) { + echo ""; + for($i=40; $i < 42; $i++) { + echo " "; + echo " "; + echo "".printFightLog($i).""; + echo " "; + } + echo ""; + } +} + +function startTournament($connect, $auto, $type) { + for($i=0; $i < 8; $i++) { + @unlink("logs/fight{$i}.txt"); + @unlink("logs/fight1{$i}.txt"); + @unlink("logs/fight2{$i}.txt"); + @unlink("logs/fight3{$i}.txt"); + @unlink("logs/fight4{$i}.txt"); + @unlink("logs/fight5{$i}.txt"); + } + + switch($auto) { + case 1: $unit = 60; break; + case 2: $unit = 60; break; + case 3: $unit = 60; break; + case 4: $unit = 60; break; + case 5: $unit = 30; break; + case 6: $unit = 15; break; + case 7: $unit = 5; break; + default:$unit = 60; break; + } + + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "update game set tnmt_auto='$auto',tnmt_time=DATE_ADD(now(), INTERVAL {$unit} MINUTE),tournament=1,tnmt_type='$type',phase=0,bet0=0,bet1=0,bet2=0,bet3=0,bet4=0,bet5=0,bet6=0,bet7=0,bet8=0,bet9=0,bet10=0,bet11=0,bet12=0,bet13=0,bet14=0,bet15=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set tournament=0,bet0=0,bet1=0,bet2=0,bet3=0,bet4=0,bet5=0,bet6=0,bet7=0,bet8=0,bet9=0,bet10=0,bet11=0,bet12=0,bet13=0,bet14=0,bet15=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "truncate tournament"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + switch($type) { + case 0: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다!"; break; + case 1: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다!"; break; + case 2: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다!"; break; + case 3: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다!"; break; + } + pushHistory($connect, $history); +} + +function fillLowGenAll($connect) { + $query = "select develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $general[no] = 0; + $general[name] = "무명장수"; + $general[npc] = 2; + $general[leader] = 10; + $general[power] = 10; + $general[intel] = 10; + $general[explevel] = 10; + + for($i=0; $i < 8; $i++) { + $query = "select grp from tournament where grp='$i'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $grpCount[$i] = MYDB_num_rows($result); + } + + //자동신청하고, 돈 있고, 아직 참가 안한 장수 + $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='$admin[develcost]' order by rand() limit 0,64"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $valid = 1; + while($valid == 1) { + $valid = 0; + //조마다 돌아가며 + for($i=0; $i < 8; $i++) { + //비었으면 채우기 + if($grpCount[$i] < 8) { + //자동신청 장수 있으면 채우기 + if($genCount > 0) { + $genCount--; + $gen = MYDB_fetch_array($result); + $query = "update general set gold=gold-'$admin[develcost]',tournament='1' where no='$gen[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$gen[no]', '$gen[npc]', '$gen[name]', '$gen[leader]', '$gen[power]', '$gen[intel]', '$gen[explevel]', '$i', '$grpCount[$i]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //자동신청 장수 없으면 무명장수 + } else { + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$i', '$grpCount[$i]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $grpCount[$i]++; + } + //덜 찼으면 루프 다시 + if($grpCount[$i] < 8) { + $valid = 1; + } + } + } + + $query = "update game set tournament=2, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +//0 경기없음 +//1 모집중 +//2 예선중 28페이즈 +//3 본선추첨중 +//4 본선중 6페이즈 +//5 16강 배정중 +//6 베팅 +//6 16강 +//7 8강 +//8 4강 +//9 결승 +function getTwo($tournament, $phase) { + switch($tournament) { + case 2: + //예선 + switch($phase%28) { + case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; case 2: $cand[0] = 4; $cand[1] = 5; break; case 3: $cand[0] = 6; $cand[1] = 7; break; + case 4: $cand[0] = 0; $cand[1] = 2; break; case 5: $cand[0] = 1; $cand[1] = 3; break; case 6: $cand[0] = 4; $cand[1] = 6; break; case 7: $cand[0] = 5; $cand[1] = 7; break; + case 8: $cand[0] = 0; $cand[1] = 3; break; case 9: $cand[0] = 1; $cand[1] = 6; break; case 10: $cand[0] = 2; $cand[1] = 5; break; case 11: $cand[0] = 4; $cand[1] = 7; break; + case 12: $cand[0] = 0; $cand[1] = 4; break; case 13: $cand[0] = 1; $cand[1] = 5; break; case 14: $cand[0] = 2; $cand[1] = 6; break; case 15: $cand[0] = 3; $cand[1] = 7; break; + case 16: $cand[0] = 0; $cand[1] = 5; break; case 17: $cand[0] = 1; $cand[1] = 4; break; case 18: $cand[0] = 2; $cand[1] = 7; break; case 19: $cand[0] = 3; $cand[1] = 6; break; + case 20: $cand[0] = 0; $cand[1] = 6; break; case 21: $cand[0] = 1; $cand[1] = 7; break; case 22: $cand[0] = 2; $cand[1] = 4; break; case 23: $cand[0] = 3; $cand[1] = 5; break; + case 24: $cand[0] = 0; $cand[1] = 7; break; case 25: $cand[0] = 1; $cand[1] = 2; break; case 26: $cand[0] = 3; $cand[1] = 4; break; case 27: $cand[0] = 5; $cand[1] = 6; break; + } + if($phase >= 28) { + $temp = $cand[0]; + $cand[0] = $cand[1]; + $cand[1] = $temp; + } + break; + case 4: + //본선 + switch($phase%6) { + case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; + case 2: $cand[0] = 0; $cand[1] = 2; break; case 3: $cand[0] = 1; $cand[1] = 3; break; + case 4: $cand[0] = 0; $cand[1] = 3; break; case 5: $cand[0] = 1; $cand[1] = 2; break; + } + break; + } + return $cand; +} + +function qualify($connect, $tnmt_type, $tnmt, $phase) { + $cand = getTwo($tnmt, $phase); + + //각 그룹 페이즈 실행 + for($i=0; $i < 8; $i++) { + fight($connect, $tnmt_type, $tnmt, $phase, $i, $cand[0], $cand[1], 0); + } + if($phase < 55) { + $query = "update game set phase=phase+1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update game set tournament=3, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + for($i=0; $i < 8; $i++) { + $query = "select grp,grp_no,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$i' order by gd desc, gl desc, seq limit 0,4"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + for($k=1; $k <= 4; $k++) { + $gen = MYDB_fetch_array($result); + $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } +} + +function qualifyAll($connect, $tnmt_type, $tnmt, $phase) { + $start = $phase; + $end = $phase - ($phase % 4) + 4; + for($i=$start; $i < $end; $i++) { + qualify($connect, $tnmt_type, $tnmt, $i); + } +} + +function selection($connect, $tnmt_type, $tnmt, $phase) { + //시드1 배정 + if($phase < 8) { + $grp = $phase + 10; $grp_no = 0; + $query = "select * from tournament where prmt=1 order by rand() limit 0,1"; + //시드2 배정 + } elseif($phase < 16) { + $grp = $phase - 8 + 10; $grp_no = 1; + $query = "select * from tournament where prmt=2 order by rand() limit 0,1"; + } elseif($phase < 24) { + $grp = $phase - 16 + 10; $grp_no = 2; + $query = "select * from tournament where prmt>2 order by rand() limit 0,1"; + } else { + $grp = $phase - 24 + 10; $grp_no = 3; + $query = "select * from tournament where prmt>2 order by rand() limit 0,1"; + } + //해당 시드에서 랜덤 선택 + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + //본선에 추가 + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //시드 삭제 + $query = "update tournament set prmt=0 where grp='$general[grp]' and grp_no='$general[grp_no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($phase < 31) { + $query = "update game set phase=phase+1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update game set tournament=4, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function selectionAll($connect, $tnmt_type, $tnmt, $phase) { + $start = $phase; + $end = $phase - ($phase % 8) + 8; + for($i=$start; $i < $end; $i++) { + selection($connect, $tnmt_type, $tnmt, $i); + } +} + +function finallySingle($connect, $tnmt_type, $tnmt, $phase) { + $cand = getTwo($tnmt, $phase); + + //각 그룹 페이즈 실행 + for($i=10; $i < 18; $i++) { + fight($connect, $tnmt_type, $tnmt, $phase, $i, $cand[0], $cand[1], 0); + } + if($phase < 5) { + $query = "update game set phase=phase+1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update game set tournament=5, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + for($i=10; $i < 18; $i++) { + $query = "select grp,grp_no,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$i' order by gd desc, gl desc, seq limit 0,2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + for($k=1; $k <= 2; $k++) { + $gen = MYDB_fetch_array($result); + $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } +} + +function finallyAll($connect, $tnmt_type, $tnmt, $phase) { + $start = $phase; + $end = $phase - ($phase % 2) + 2; + for($i=$start; $i < $end; $i++) { + finallySingle($connect, $tnmt_type, $tnmt, $i); + } +} + +function final16set($connect) { + //1조1-5조2, 2조1-6조2, 3조1-7조2, 4조1-8조2, 5조1-1조2, 6조1-2조2, 7조1-3조2, 8조1-4조2 + $grp = Array(10, 14, 11, 15, 12, 16, 13, 17, 14, 10, 15, 11, 16, 12, 17, 13); + $prmt = Array( 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2); + for($i=0; $i < 16; $i++) { + $query = "select * from tournament where grp='$grp[$i]' and prmt='$prmt[$i]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + //16강에 추가 + $newGrp = 20 + floor($i / 2); + $newGrp_no = $i % 2; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $query = "update tournament set prmt=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update game set tournament=6, phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function finalFight($connect, $tnmt_type, $tnmt, $phase, $type) { + switch($type) { + case 16: $offset = 20; $turn = 7; $next = 7; break; + case 8: $offset = 30; $turn = 3; $next = 8; break; + case 4: $offset = 40; $turn = 1; $next = 9; break; + case 2: $offset = 50; $turn = 0; $next = 0; break; + } + + $grp = $phase + $offset; + fight($connect, $tnmt_type, $tnmt, $phase, $grp, 0, 1, 1); + + $query = "update game set phase=phase+1"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select * from tournament where grp='$grp' and win>0 and (grp_no=0 or grp_no=1)"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + //x강에 추가 + $newGrp = floor($phase / 2) + $offset + 10; + $newGrp_no = $phase % 2; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($phase >= $turn) { + $query = "update game set tournament='$next', phase=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function setGift($connect, $tnmt_type, $tnmt, $phase) { + $query = "select year,month,develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + switch($tnmt_type) { + case 0: $tp = "전력전"; $tp2 = "tt"; break; + case 1: $tp = "통솔전"; $tp2 = "tl"; break; + case 2: $tp = "일기토"; $tp2 = "tp"; break; + case 3: $tp = "설전"; $tp2 = "ti"; break; + } + + //16강자 명성 돈 + $cost = $admin[develcost]; + $query = "select no,name from tournament where grp>=20 and grp<30"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //포상 장수 이름, 금액 + $genNo[$i] = $general[no]; + $genName[$i] = $general[name]; + $genGold[$general[no]] = $cost; + $genCall[$general[no]] = "16강 진출"; + } + //8강자 명성 돈 + $cost = $admin[develcost] * 2; + $query = "select no from tournament where grp>=30 and grp<40"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //포상 장수 이름, 금액 + $genGold[$general[no]] += $cost; + $genCall[$general[no]] = "8강 진출"; + } + //4강자 명성 돈 + $cost = $admin[develcost] * 3; + $query = "select no from tournament where grp>=40 and grp<50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //포상 장수 이름, 금액 + $genGold[$general[no]] += $cost; + $genCall[$general[no]] = "4강 진출"; + } + //결승자 명성 돈 + $cost = $admin[develcost] * 6; + $query = "select no from tournament where grp>=50 and grp<60"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //포상 장수 이름, 금액 + $genGold[$general[no]] += $cost; + $genCall[$general[no]] = "준우승으"; + } + //우승자 명성 돈 + $cost = $admin[develcost] * 8; + $query = "select no from tournament where grp>=60"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //포상 장수 이름, 금액 + $genGold[$general[no]] += $cost; + $genCall[$general[no]] = "우승으"; + } + //우승자 이름 + $query = "select no,name from tournament where grp=60"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + //준우승자 이름 + $query = "select no,name from tournament where grp=50 and lose=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general2 = MYDB_fetch_array($result); + + //자동진행 끝 + $query = "update game set tnmt_auto=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //장수열전 기록 + $query = "select no,history from general where no={$general[no]}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($result); + $query = "select no,history from general where no={$general2[no]}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($result); + $gen1 = addHistory($connect, $gen1, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 우승"); + $gen2 = addHistory($connect, $gen2, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 준우승"); + + $cost = $admin[develcost] * 20; + $cost2 = $admin[develcost] * 12; + $history[0] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회에서 {$general[name]}(이)가 우승, {$general2[name]}(이)가 준우승을 차지하여 천하에 이름을 떨칩니다!"; + $history[1] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회의 우승자에게는 {$cost}, 준우승자에겐 {$cost2}의 상금과 약간의 명성이 주어집니다!"; + pushHistory($connect, $history); + + for($i=0; $i < count($genNo); $i++) { + $general[no] = $genNo[$i]; + $general[name] = $genName[$i]; + $log[0] = "{$tp} 대회의 {$genCall[$genNo[$i]]}로 {$genGold[$genNo[$i]]}의 상금, 약간의 명성 획득!"; + pushGenLog($general, $log); + } + + //우승자 번호 + $query = "select no from tournament where grp=60"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + //16강 목록에서 검색 + $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='$general[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $no = ($general[grp] - 20) * 2 + $general[grp_no]; + + $query = "select bet{$no},bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game where no=1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + $bet = @round($admin[bet] / $admin["bet{$no}"], 2); + + //당첨칸에 베팅한 사람들만 + $query = "select no,name,gold,bet{$no} as bet from general where bet{$no}>0"; + $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); + $gold = round($gen[bet] * $bet); + //금 지급 + $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='$gen[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //로그 + $log[0] = "{$tp} 대회의 베팅 당첨으로 {$gold}의 금 획득!"; + pushGenLog($gen, $log); + } +} + +function setRefund($connect) { + $query = "select develcost from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //16강자 명성 돈 + $cost = $admin[develcost]; + $query = "select no from tournament where grp<10"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + $query = "update general set gold=gold+'$cost' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //자동진행 끝 + $query = "update game set tnmt_auto=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //베팅금 환수 + $query = "update general set gold=gold+bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +//10차이 1.1, 50 차이 1.17, 100차이 1.2 +function getLog($lvl1, $lvl2) { + if($lvl1 >= $lvl2) { + $ratio = 1 + log(1+$lvl1-$lvl2, 10) / 10; + } else { + $ratio = 1 - log(1+$lvl2-$lvl1, 10) / 10; + } + return $ratio; +} + +//0 : 승무패, 1 : 승패 +function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { + $query = "select *,(ldr+pwr+itl)*7/15 as tot,h,w,b from tournament where grp='$group' and grp_no='$g1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($result); + + $query = "select *,(ldr+pwr+itl)*7/15 as tot,h,w,b from tournament where grp='$group' and grp_no='$g2'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($result); + + if($type == 0) { $turn = 10; } + else { $turn = 100; } + + if($tnmt_type == 0) { $tp = "tot"; $tp2 = "tt"; } + elseif($tnmt_type == 1) { $tp = "ldr"; $tp2 = "tl"; } + elseif($tnmt_type == 2) { $tp = "pwr"; $tp2 = "tp"; } + elseif($tnmt_type == 3) { $tp = "itl"; $tp2 = "ti"; } + + $e1 = $energy1 = round($gen1[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); + $e2 = $energy2 = round($gen2[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); + + //아이템 로그 + if($gen1[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getHorseName($gen1[h])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 갈기를 휘날립니다!"; break; + } + } + if($gen1[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getWeapName($gen1[w])."(이)가 쥐어져 있습니다!"; break; + } + } + if($gen1[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getBookName($gen1[b])."(이)가 쥐어져 있습니다!"; break; + } + } + if($gen2[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getHorseName($gen2[h])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 갈기를 휘날립니다!"; break; + } + } + if($gen2[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getWeapName($gen2[w])."(이)가 쥐어져 있습니다!"; break; + } + } + if($gen2[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { + switch(rand()%4) { + case 0: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getBookName($gen2[b])."(이)가 쥐어져 있습니다!"; break; + } + } + + $log[count($log)] = "{$gen1[name]} ({$energy1}) vs ({$energy2}) {$gen2[name]}"; + + $gd1 = 0; $gd2 = 0; + $phase = 0; $sel = 2; + while($phase < $turn) { + $phase++; + //평타 + $damage1 = round($gen2[$tp] * (rand() % 21 + 90) / 130); // 90~110% + $damage2 = round($gen1[$tp] * (rand() % 21 + 90) / 130); // 90~110% + //보너스타 + $ratio = rand() % 100; + if($gen1[$tp] >= $ratio) { $damage2 += round($gen1[$tp] * (rand() % 41 + 10) / 130); } // 10~50 + $ratio = rand() % 100; + if($gen2[$tp] >= $ratio) { $damage1 += round($gen2[$tp] * (rand() % 41 + 10) / 130); } // 10~50 + $critical1 = 0; $critical2 = 0; + //막판 분노 + $ratio = rand() % 300; + if($e1 / 5 > $energy1 && $damage1 > $damage2 && $gen1[$tp] >= $ratio) { + $damage2 *= round((rand() % 301 + 200) / 100); // 200 ~ 500% + $critical1 = 1; + if ($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } + elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } + elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } + elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } + $log[count($log)] = "{$gen1[name]}의 분노의 {$str} 공격!"; + } + $ratio = rand() % 300; + if($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) { + $damage1 *= round((rand() % 301 + 200) / 100); // 200 ~ 500% + $critical2 = 1; + if($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } + elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } + elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } + elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } + $log[count($log)] = "{$gen2[name]}의 분노의 {$str} 공격!"; + } + //1합 승부 + if($phase == 1) { + $ratio = rand() % 400; + if($gen1[$tp]*0.9 > $gen2[$tp] && $gen1[$tp] >= $ratio) { + $damage1 = 0; $damage2 = $e2; + if ($tnmt_type == 0) { $log[count($log)] = "{$gen1[name]}의 압도!"; } + elseif($tnmt_type == 1) { $log[count($log)] = "{$gen1[name]}의 팔문금쇄진!"; } + elseif($tnmt_type == 2) { $log[count($log)] = "{$gen1[name]}의 일격 필살!"; } + elseif($tnmt_type == 3) { $log[count($log)] = "{$gen1[name]}의 모독 욕설!"; } + } + if($gen2[$tp]*0.9 > $gen1[$tp] && $gen2[$tp] >= $ratio) { + $damage2 = 0; $damage1 = $e1; + if ($tnmt_type == 0) { $log[count($log)] = "{$gen2[name]}의 압도!"; } + elseif($tnmt_type == 1) { $log[count($log)] = "{$gen2[name]}의 팔문금쇄진!"; } + elseif($tnmt_type == 2) { $log[count($log)] = "{$gen2[name]}의 일격 필살!"; } + elseif($tnmt_type == 3) { $log[count($log)] = "{$gen2[name]}의 모독 욕설!"; } + } + } else { + $ratio = rand() % 1000; + if($critical1 == 0 && $gen1[$tp] >= $ratio) { + $damage2 *= round((rand() % 151 + 150) / 100); // 150 ~ 300% + $critical1 = 1; + if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } + elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } + elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } + elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } + $log[count($log)] = "{$gen1[name]}의 {$str}!"; + } + $ratio = rand() % 1000; + if($critical2 == 0 && $gen2[$tp] >= $ratio) { + $damage1 *= round((rand() % 151 + 150) / 100); // 150 ~ 300% + $critical2 = 1; + if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } + elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } + elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } + elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } + $log[count($log)] = "{$gen2[name]}의 {$str}!"; + } + } + + $energy1 -= $damage1; + $energy2 -= $damage2; + $tDamage1 = $damage1; $tDamage2 = $damage2; + $tEnergy1 = $energy1; $tEnergy2 = $energy2; + if($energy1 <= 0 && $energy2 <= 0) { + $r1 = $tEnergy1 / $tDamage1; + $r2 = $tEnergy2 / $tDamage2; + + if($r1 > $r2) { + $offset = round($tEnergy2*$tDamage1/$tDamage2); + $damage1 += $offset; $energy1 -= $offset; + $damage2 += $tEnergy2; $energy2 = 0; + } else { + $offset = round($tEnergy1*$tDamage2/$tDamage1); + $damage2 += $offset; $energy2 -= $offset; + $damage1 += $tEnergy1; $energy1 = 0; + } + } elseif($energy1 * $energy2 <= 0) { + if($energy2 < 0) { + $offset = round($tEnergy2*$tDamage1/$tDamage2); + $damage1 += $offset; $energy1 -= $offset; + $damage2 += $tEnergy2; $energy2 = 0; + } + if($energy1 < 0) { + $offset = round($tEnergy1*$tDamage2/$tDamage1); + $damage2 += $offset; $energy2 -= $offset; + $damage1 += $tEnergy1; $energy1 = 0; + } + } + $gd1 += $damage1; $gd2 += $damage2; + $energy1 = round($energy1); $energy2 = round($energy2); + $damage1 = round($damage1); $damage2 = round($damage2); + + $log[count($log)] = "● "._String::Fill2($phase, 2, "0")."合 : "._String::Fill2($energy1, 3, "0")." (-"._String::Fill2($damage1, 3, "0").") vs (-"._String::Fill2($damage2, 3, "0").") "._String::Fill2($energy2, 3, "0").""; + + if($energy1 <= 0 && $energy2 <= 0) { + if($type == 0) { $sel = 2; break; } + else { + $energy1 = round($e1 / 2); $energy2 = round($e2 / 2); + $log[count($log)] = "재대결!"; + } + } + if($energy1 <= 0) { $sel = 1; break; } + if($energy2 <= 0) { $sel = 0; break; } + } + + $query = "select {$tp2}g as gl from general where no='$gen1[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general1 = MYDB_fetch_array($result); + + $query = "select {$tp2}g as gl from general where no='$gen2[no]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general2 = MYDB_fetch_array($result); + + switch($sel) { + case 0: + $log[count($log)] = "{$gen1[name]} 승리!"; + + $gl = round(($gd2 - $gd1) / 50); + $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g2'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general1[gl] > $general2[gl]) { $gl1 = "+1"; $gl2 = "+0"; } + elseif($general1[gl] == $general2[gl]) { $gl1 = "+2"; $gl2 = "-1"; } + else { $gl1 = "+3"; $gl2 = "-2"; } + + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 1: + $log[count($log)] = "{$gen2[name]} 승리!"; + + $gl = round(($gd1 - $gd2) / 50); + $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g2'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general2[gl] > $general1[gl]) { $gl2 = "+1"; $gl1 = "+0"; } + elseif($general2[gl] == $general1[gl]) { $gl2 = "+2"; $gl1 = "-1"; } + else { $gl2 = "+3"; $gl1 = "-2"; } + + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + case 2: + $log[count($log)] = "● 무승부!"; + + $query = "update tournament set draw=draw+1 where grp='$group' and (grp_no='$g1' or grp_no='$g2')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + if($general1[gl] > $general2[gl]) { $gl2 = "-1"; $gl1 = "+1"; } + elseif($general1[gl] == $general2[gl]) { $gl2 = "+0"; $gl1 = "+0"; } + else { $gl2 = "+1"; $gl1 = "-1"; } + + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } + + if(($tnmt == 2 && $phs < 55) || ($tnmt == 4 && $phs < 5)) { + $cand = getTwo($tnmt, $phs+1); + + $query = "select name from tournament where grp='$group' and grp_no='$cand[0]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen1 = MYDB_fetch_array($result); + + $query = "select name from tournament where grp='$group' and grp_no='$cand[1]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gen2 = MYDB_fetch_array($result); + + $log[count($log)] = "--------------- 다음경기 ---------------
{$gen1[name]} vs {$gen2[name]}"; + } + + pushFightLog($group, $log); +} diff --git a/twe_close/gen.xlsx b/twe_close/gen.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fffcc37dd64f4fa17bcc503d679114895d095d83 GIT binary patch literal 61653 zcmeEu^;cKjx-Z?G(jX<>EiK)kba!`2cS%Y&NQrcJcQ;6Pmq_G8F9i;P0RjaA0|Ej<0@CJ*VPOFZ0`d+L1Oy#q0aQcS#@f-y+EM58 zS6d?oEqYfgOX451pdYe8z<_`M|G)mPsz7m^jBFPpO5nBl63JgIa_c4m7`9`-O!Ch^ z@Y{dK_Wm-^AgrsdGxk7j zFIS5Jtf*c*$SH6dfR`8O^agNy659NKKOBrfEHCk*<}?Fv;LiH@^Ms4?abR%7r?1NQ)tqB3$TP;4$fR&&dmk zOS37t+e~TvF^(1&n;O2j=yaFeSwy!+ESNdFPG>j|u9^1wnI2dl7@!m0`?!7cwGRG96q~u= z`7x4*M9b$K+Mbig$*GUx&yIGgC%~=eXK)bt|HitSFN~y@0Fk>ax<9ZMhsn-sk``|w`ApbOc0yDWkwYeMeH8%i zCuy)aakV?fud#BnWA>Q{U!Os?tMP+i1&hA>oVjaBrZRGt{(BQMj6U2*d_9%r6-yo0 z+_+Tzx%;1$-@f5C#yybgvl7T*z@Hu2=fyB84C$t0lu5++A$!E%a?{EM7e3ALv88Kp$Yt|Jz^9-$%^584&_b16%zk zTI{|*$q#b7Qw6rvEy-$fdVK2{39M2(RJ!cv=zUR8wARu*Gq54pX z57D@gI$8s#eJ!VQO&n6g(s+%887^L4LeIcH_S-^M&ag?~eIci!ZgQ7@+-D7ZRwKSF zsl?tsK?hs|8vjz{MiI50+w|}@wyYGhuyh3!mmS=0FNA?x8>>}Tt%#^rFTC+H9Qc7y z_}HvSx=KH@2W>1hFvzbN*_yHIU47tcpZM(XRmcjY8X%M&ScdhP>nu8>XHZAr`#$q= z=doxokULaSBSd)~+*Q!9j__aED?cB=|8K~Fh_3G)2GF1YAO{(M1c03XikUQ}G3zPD zcWtC+NWBN~`LHtBzbMd6rH`0N6lyoOdUbFuA_?YCCR;!me7fnI?8G)IP5h1tuI9C4^Ve;-fu}>veNxH?Zg5eM@u5n)@WFTccJEDVXij$!Rc=#f2I~%hkMXcI1WA+}B zp7j%?uuA-gb@9YhsJKPnchSSy9va_fC-oIzVNH0%0&0$_Eab1172hX2oz~m7J8<_X zy8Kb;vRtUcBY8CAPM-MrJM}>qCOFJ0SK~(uA;Gz1z66@}-G@;K$E&euhJh>152ZW- z!;A}ut=!^N`<(*~Yo(&ODr(KAEzlLETC!7WLA=V`c92rFof_JoS=Zpq-kYd~!YO;N zcs^flo;+PGKJJ#?oO!HJ?os7;4?|iH!yv1{-Gf%;@Wd6 z{4sKUkk_@QT>|eqE_05|wDyM5A1QHG3FPmr-ILFVJ)}Te|EFY#vXZ0h1C3{b00BXK zYrKQwS4$&@7pbUL8VZ{hz*vTV5>{}hO!w&uCrj4y&mxwFw=RnPm77JFeULAqIl_Rj zC)*LY27RM4I?V4%6EEAy;TMv+)jHM?HE07>((lW|P(o$uR*@Z$IygJY3hCLl*joRi z8=QqrY4(p_aU1fWeZMViPrCH>w-{YKRAKJlDZ)mri49Rt(=u79AR=45iX>&c9Ca zIjUT-@LVD*dzc5RJ$?R%knvXzXHIB;i_qeN`skQTX3zK!tpryi?nR z7ep&9%#yp-A#7WnfDAZtFBC|D!3k2?fT-;=c?Z>;wZ>{euUe*C#|hs! zX!DiM-LvIWODr_JQm9|)-_-Ks3;V{n%aX*l|1~lh<_-QqMFjzAO9KJH_y-fFdiF+! zN{;qs)+VpeDApRW)|f+G!QSJ6ahVhO!3sG^Tplmt1Gelm!RMn#Q{k&>FGFtXT-B(M?N>(Dg zROv)?N*}H`TqN@%$aUu=U2=l)@Z?%mwdt3=>+f!~_ct#oi!5$3%jPoqTI+muGQFxa z-TpdWuJ})O&CEpftR{RKk|A3Vo(f%)b8!KYXYLcby~bm;%4mucIay~tqwv&%G;-8*HH}qW z{D-#Df=jYw84B}HTjo3mQ5EKuy$ZD@>GSw zWK)H1ydTMKviW4$Uct8DxTxMklh`bfW_qpTYZ@`_@S%!tVc59=7F4K2z^$~BdgRMt z+F{>^$7KBF7}9{K@R=K8&!Kd#P5O1Un&d8+4m$~DLJIR^ew!jU#x4PM!G|NzeDhEH z%n-&#K~c3_y4Aj%O6dZ{qHZ6Y)z8Zbj|TAUD?L{ThuVS0gLsqEhK%dM-)GaRpl4H< zp}Gh;%|yASz8OtH+Q|Kjx;@AX@5*xyMVHLQ@V2N?KJno@2qsC@vZI$MsW1_(OLQb(-Z^LkjM7sWqztgGR z@*&bZmtUeFZE`xZo;sp_XUpCDdrh@FnWT4eZoFAL2za8VV$S7Ix0XX}()84X!>@?k zQOUS1W={!wrvd7`0dga^0*MV-WYs`p`3x;PAyau{wqe2e>dwh^el}kC)V73#x`+iuXQjGaAsWfHdDCuzM zK{CAC{MZK4ki`8Ja$@qD%p@E`3uuZCNOs#0W(~7X2mEk}9YmjBc_Z zaY$1+en-eEq+gX|2c}sa+>adWIWCp(JuTuvC;QRM>xTx~d0yM478tkD!B52X->A)U ziumoZ4V-$81*@6z;)reIXQ*bRQPMK4B6WAuE=a}k%r$H(B)LPrE0uM_D6?vU<;r;? zZA9X;3h&`mN>f`YhrdUN{47mIq#cK?P5i4v^>%rU_!!e>=s75jx8h2AQShq zK)~2{fOlw3Nbqw$$EhCX9zpuSYT5RYs!mdw5l`z=BMr{z)1uWs-fe>TQL54-(w&Z*paGT#r~uNy|@_4R)jFRnxMNOf2HuKx-i}+>AEz95u_qYb{<spML~nRz@&B#V!~ok048|X>_dEMOI(j&e&PQGSH8f1sJUZCj{DVYRG+w9~A|ny{L%$Y2=8-BcNdH#Xy<1XHO1OEmO~HKm<>sw1

L78T0!YiR6 zW8{knLJm!6g|w&`IYQl;+}R)@aLACm@mk!HqcDpGvJiiWtFAycf1nS79n@(I%mdW+5*_+3!s!B4vl3iAa@3OD!(42&gjE(m{ob zeINBrIt1z$)vf-)dj?&aV8g!M;k&?78eVTP5-$%4EbbUvJ9%Nd4+C9Y4QH1$t*igEEvlIP{;qcmVAkx6c( z?)*{`{{AP1N)59awYaaDViwrMEDy!G7o);6>PBU@G4r*FkF;(BNoELc3HL#O{0?M_ zMA@YkjD~#1k^qC8VLix(CDRA?+%d?I;z2q(;`+nHVgtg5wuZ`JGVpo=Y7@ zB3JaDT{;|73}<7`2#sl2mdL&b5}!^;)L}{4-e5JnehlAMDBQpjd})Jl{PI98JlV~; zG*|El$NF+J1Xeg2%Cz35jlmhAu6qeTv#g`Gc&Nd6Y&LtLTY>$!3tKw^9BG65uc(K( z(wqK$;C^Otn;Q)*;1Qk3hFJ}^F=(Zfv1_r{i@fcE-muE75FuoDxxpKh&cW8 zT92=TRbFM88s1JCGad!_*%vD!BV1Vn^=?q;DFI01Qxmv+U-JQF87REc`W@sQaLjm5 zQ3K8hDHXi=YLrhPm>tsV9>m?_uExSj^ebuzJK%wdBM$H?C@c4_Z6O;l#*o%3r(7K4 zA2Jr<^X*zf7sWQwl6yri)ISi}U#{M>k#z{<|NMd~O?raGpdU0;@r!JwrYCAJA;zta)dTfp+&qL|B0>ezyYgB08$e z0y*O4HRFG5#MDf05(R)41?2|@so{IcvrTpemyzO#8o)-aJkOaN@Vk<{55Eg*9=E=N zAGOfI{lfm4m=f=%T7ZWwxS{Pw~K95IxzJe1jx=zghCmoHaZbFp8HrPsaB7}wYYpPLyE zC!H@VCWG$%o?jmZs|U!Bz#wEaw($>=HOZ!`h+r7_=a>4l9ybN@bgUj+a^Mj^Gz$WQ z7>ZD(h0U!9-d*FH%P03?u;o7p?*_GEh*0~PiT6+zeS}2R*_dk=I}7j)4D$Xl@X27z zqYqB3Su0LLg1U%0U{GKu4-U6gAWlzpx#H3lgoqDisZ-1*=7UL=uQ*{2j9~pzxj~+9 z5_J)I035%u3)8Q|q#4cepK4K3<9{HD{dTdOyniWwf%)R*F_Lb}Cx4P}twnT>#%V0~ z)ciei89f*b%@}-RM)nR0Sxgfb8mb08Wp?D+oPlL^CQDstky<=j&cIpr{q8FN9Cov= zV2+bv8ur#vDkQG`{39NEhbJoTtT5Q^2^~+w4?;;>ooJjBA~eK&-{I5W=7)YkWgV!) zeU}Ofk)r}#9@$YUal?Y4KjG;Hs44iN*y;X?hO3x`+y_S?u-XP%XW$y5 zZKk^)MzfOBbz{T8oGMg_`vEvVh=7_B@cT9M&F3AJgKG46xwZ~0;^E9?TF^xCAntiC z+2VJ429tk{Ke?%}uX-IaugH^x!hqeWTCXKwQ^#8t7mE`m zR5bUaqjfbgVWTSl`QR5H(;nQ;p-)p3FKIyD$$BLpPO9tf@G+lH(A(qB**7sFw^W>K zdT`W=?`|C?KgzzM2Y2g=#r_iQPd;MwMPju0N^IJV484`{7o|(F<6D9X6OoP4`Cqsd z@z5l7A&soVWI4%1v~Y?d(R`SohH>+<+2-o>a}JPvEW2gvx~Y<#2LzCNK2>uks=vjT zvqi_@CZL9G^nXu2AH=78WB8+^G2Sq5U3WP08GC5j=V)#L%&TScr&S5JD|qG29a!t^ z%7G&;(uxmlYlY9LmN~mQ{fdu}=;i>JI&}4%RKspGlL=4WA19wO6~!BT$oXiKL@cJA z3iSjF)Yc&pWDwl`@*hl!RRQ4@$Yx6&6Y}!KkZXv3@HR)^8L$(oX~{eV(P#dy$S}rr zr>zc|thRbwL9}>W-RwP0<=pe*^SatPKD!SMkt}uC$&-1U?Mp7M~`O)nX6DsvJuDTudi zq6KpHR@RMi=I z*FZm#Mypr#?owA_DjEI#0J4k(jLy`~$r_k1A|je*i`bXn$aY{X&NEZeV9Aw8WRmp( zRq1N<+a+g=1vKu=#fL2Z$Ixg+T6~p57H(WTxLcOP3Ft}ZCKRSJESx3fHBwYcjQ3vx zzSJldBq+1}N><(#ACd`rN1p=qt${-iPLQ$5ClSw9bneHxr5_HCS=%BaC;Ye2&aXk@ zL9U-B-LH9JKGzgc3N3>lV*Em;IwIsIFAyiD*^;tEix96%Xfo z>EvFFuck>WiHW`6nZV0?zYbX<@qo{ZszK~*!$qu+s>S4Lk1B_2v**n1#&@+o3HwmKiQ8a121 zWGF`%Ej368;Iyi1{8S}bYpc}PfV5MXMfh9!R}<68QGU{QeoCbOFDL7mxw|=VG)G6V=EpxN&tGu_r^`UZ>_$;APhMyb4$eVuUacs@6Xs~{2ONvsf zDW(=s)uS=ZH+l}EPO~ejA+YG!m~qR;|716zuR09<1A^W&`U(7=2$PSLBH}WLd+mN) z1NC7xD_L+sKv}2UA9@mTk{(IVw(=W$GAqsDf}`W4_7MA_Lx!V6Ltk168;?x$*xr!` zr$Y}{jcdlJEbr0HLMfdS+ovnn(9TItp8llvq|BNy{*PztS}+&vnrCv!-zk#UOvrup zE{;;UeKzXQ5chX7|5xL>_{--f#0&z0{S16i>CL!aei7(kYGmZ-!0`G9^NV|>rRz8> z^?u)8<h#$a+?=+uJ=le8N)pX+DhRn|A12#_g3m?$@w%r^k9{V-O>-}ZR5I9JeztT9=Zxmr6nx4fuB#P8Wq z3AgI~$ikMv@AYu;WajGie65q&+N>H=CYMR1GyZJT=5cqtI1|P1aRYJeAz;(W=jq{c zsdWCRlhV{wRLB2RUi0Y9$NP9T@_3z^*w^-SIJH}F%^*kQvvx2tbZ%2n5XBH&FqRqP zxv15`MRcT-nfdH2n|>xXXS%(ZU~j#B_Bd3qnt3!P=Z^Al^;{b?_8cL)+FE+$YleLK-brRj8Gc_y`u&(odDi+fkAcKg{^m2w<5N@9W9C?! z5#Q6Z#kn^ho_B*2;qx=wecSlgv~P5e9Wi=d_~E1BM1Sy-O_0(@O+>#)MJbru3#o_w{j& zX0yO{P@^Rr>{{?Dp@sT2p^i5zZ`6Wz9y6VGE{;^z_eR88> zZ>sE-?Y#*-YZ_uQfndUmhsoHDUG;8mX|r7wzr>1yQ0PU)koPz8&5Fa5k@ss&!hi5L zTIyGj#d7X4JUp>nPuEO;+edm@5V}QERRU_a)z441Vt$iT8FpMd;J-M1I?c+-K;q1E zU=@${zEKGbjl)~%t44a(mTND*E`8Ep9_<$HUo*4P5?EL1MaoVt;G3p7;A`5O+@TzWe6bNYfCaf}0w3 zDK=}V(d`?@oW1UUdqft5CzIJ;2eb2Jr=gxpwCH%JyIv(msutbC5ksyef_n2Y{TF6G zle*8U(#tVf(!?!2si{LDE9zWX;iMn3pp2JSq<~hC1E&xi+RGg`TyJ@}v|QI9@b58J z`BuyEcaF06lzw>_M&C&Ly{nv`Vo6;+yS)G=v^%+4JT!)MhSo1Jz`7hrpcPaRr7fJ* zZFAor<5#&2#&Ahm>T80I?VoN>(}znf(sZ3=e21u888Fj_)Xtrc&c_#DO+razN5PlX zdPEuqmjyn|5hKiPd`Y(J%atxoi@v#j(s}d5oL>vt#7J*dhQM(>c|tYg;$Rb`T;31^ILvk0u9WENv-_1F2u@G9by}myJ>8}#n z(#QCz;v1|Z`gbEkTIM;kN~YFZ3HF?)Vw`DUR^nfIv=qWWZ$(F{wfIam&Ph;G%uce6 z4%f@dOEnzFukR>FKE*-Q-Hq5OOApu5_-RF3s3BZnIKsMco{n&)Oh);dy-QQH%|$c4 zbMwu=h2vcatyzjUy(aFB|Ep;2Zp69L7b~w3$$=^CUymr8Y~co1XYUj2Kq97;g!s03 zSXNJ7vm;+Fo(3?A-Wms%O?NXxs=5~DrGv23I0zT@zZGhB91(Q;E{&3VRIK*I(A~T; zdhEH?@<7?4-G&b!Q;yPU^(bcH;H7(Qaz|fYT0cJ^Z7jkDn-F_Iv9&1}#PsW`ZT3Q~;PH@}QBf;V?%fGYi66o=DcwW9XmOZC$o4=&W7 zDj7$3_s`H*s)UnJw4g8u)tm2SE+*3L&b#YB4J7U5dAChL^SxeAen0e%iYufN> zcSjsqZ?8^X_tFs0WGCsT!L!ZE0=;Fr(CF<#M{tOTZf&Ulk@&<6uFBUe>z_?vo2pad zni=WSEw`rQ%w0ac9c3tqQ^8cL3ulDgK^QwF#Kt9CG_tZF3r_>6q6;=KJx`^iW8oKy z^Yj&GOd5`+ho^_yX>pB&2XFIiPF@X`2iHcN0U$W0El6%45sS6{83Vq*n1biGW_u9F z!idb7w;?Wqw4XE+n+ClTaLKb-vIJq$>tZiL_l6+867IaaQIcIw7LG03jAwLs*_N-@ zbddYMLG9#}BE5kM43-$=z87;GK9Hz^-l=D*M9c`aTfWY~aiK{)KE>|M15nh-g3ohP z+ko#W%i-kki*?%OW}GV(Ch@#7O$= zA3`P_`A?^)N}a~AYw7}_9`6N)uTqJBHybrTrCWc=}DOor8gX<{HXlfXNkcWod z0sgd-DdgO`X8&?I`T7^td86-UPiHk+EBX|Fyr3K$AG-0tCYb# za#w(HO*@=4UVA~kLUXX5Xj^+PjJ3yt%3oJc%zG3UIUuM41nW|E>@rS0W^rxUwSKxJ zoVDd|8N5O4NF#Iv*KinKWA>^%^1PDi1vQVrAJ)M6=)cbDcDe6^0jxu&%<>ZW10~D9 zOg{VbL-|E3l~w!-$fgOAmOme%Y&aJV-5ybO&((~^({sGnDnOvJDMrV`_nYN_8B|6c&lqkj`BKqF3<$om!>doDFc zElF2qk52)Dd9NHC?gRCrdjg7$ygZI<){!Bk=^*rn6LO*b<64}W)jzvVJIW~T0ZM&Q zYwb;RWb}egg*opZYc5IlX_&%}!os;6wHbcaq%ZFcoNs3xk5k}P1QfbOV9Kq4WxZS7 z`p9;~%$q@mVLN|rS|!jM=+Yki_pdS1w3cO`U+@*Qg^QmwdsMw9E@EbU8Asue zMpqFUdsYrUR|DtJ(+^J*l3dojpnC(+A`5mSBbH^_4$@)EaeCl)dwK10?9dvQI zKNyNqCq7xh0ubH$$Y?^j3wZMjq4g}8U%VCD6c_UugT4U3S6#Jmqu#XAIEk~s(p20g zQBn}n;GoyPG%fhE%=dhZ#I{VFxnw;(&B0=Xx&t;@iJx>a)-={Ic1@E;<<}U7Li}lm zn)Hq>(@@5s`O|oX{h$E8zyM!wBw}PL<=;=nX^Yp`?5wYDVaC__DD9WJ^EX?~PPood z_>Nvkj-)jDRR?tmZ3kl`W5Vz!nToJ&)vq1XEd?O>D5ibcUg?Sy|gp3Zu_|_E3i;sBTI~i-PCTP978TXAGhPq4O zHY<%W4F6Uwjh3vO90`5QDF37LT%!P<;>wBW8>JZ5a`C>yngGj1^o^Iej*hkKUKn{r zlYM+DCt({1AcezGsww*v?HU7j`5B-FfU-Ag{G%pvVgOPaYm;&2TDAZ}4%${9NZ6*% zaE$_#%EO!77L^mkwt4aK}z+C%hJFA0&FP4m205Pux7~CFfUW+Qt6t4qcZ%u`+UdEcIe;kZ%bweuz7i@%4O&q4g0PL6(fZ*_NfTr$CY;N!ut#P3;8R~fH4K&Sn?LMKipli@IPAFLDH&fy0@4DY_E4|b zvR--&@}F9;TK@LHH4;X&FoC?kBL$%Id$Z^KJ~a8u>hOX$qkG91o_~%_3#P-;Du7m7 z0L8kjY1Y&OA(LzV}ik<+Vkf zXe$dPDByhDn;y(Z^Qf*q2!0GAl}LFAiwf z#fC4}UAu|CW?i^(uai~Xo5#9vyX149m}~&lB0n$ zb|y}t1FgR3<*7(;pj{kD!NAVG_GeFVHcB z2N%tHVkFyvJd`%etA#96ocDVNBXOekwQi1anIBv!GdGJ}e?(@8yCAs1HJZ2r`uSO^ zn^ij9{?k91#!QCH3_!_L2F~1^;A^C@n@K)s$}|IXDB)+$t}R~f;+H8Um?GKNSkH*a zYUISPh|1Vktes`n;vltO;sBVeN_zNVrTNR2@ez&D%ynpvs3QUCMV07tgNw;``IPSE ztN)h8U&7D}DLi>>B}@8O0fV(3c+rvH&j;o_8URLSO!?SpB7f$PPL8o$U~GVMz}KVD|ww31V2eDqO4OZ zZ=fiVFd=}py*MULfYi$Ph5aOe>4e2{aU;rwH%Zy?q;WmAT$t-=E&!HG^g}}EI9BOC zj8tgJcF-5t1*d};nZZjC)1r)g8318)WTReCW==-gdl?^*e5T8YlUS<~w3%r7ea)*d zK58_KbYTkB446S1i+PB>xb9>r(|yfGWZ{A3A;A175E~>8wFoFbS}M+5;M@53G@Ro1 zT&*Hor5|#|`suE_reH095WW$kMrPuict-UWM%L zYz94Wc0}b>6Q+<0iB70~M)AHbeVKgK7Ng$mu6kvkK^4&c<+kLr@*Ucj;c*Yb1Cahi zH3uLd1bD-DQpi>?0I~Zc(de^l_cnX3&c!>$1=(xj*Xi#iR8`M*tJ|$qx6LKW0v)$F zDAx9&g!@v~S_UMPi2UMicep#@r>=(R94b;ji3@ ztv=$}fNKO_T?o4|U1D6cOuslZ!oIIr{iKl@|G&Hr+nGyEYIi5uF0bu{QIXCcU{6HC zA0*3uXY(Qk%M$QHUb}rb6d&zL|d#{sGz$gIi*(60x^-Lwr1KRDE-ntWEsGDdrr?|xL z3WwO7=gaN^xLVESNuy~9RmwsHLhGA|QNANoWHU38wCfqDch@p#`hf+w95C7xKmw6B z;nW3_BcOgg4t$>~z^cI^8(!vm;c@oV*R0$ExEpvI4uO|1HQHDhNuCKzMT$~RzuJxW zwP}&Jq+iq6wttm=(1~e~WBj;M$Qa8@8q)nILUMZY7GAaE^Rl6DHmU(r)%ja6n7F2s z#Za&N2#D9xIKgr>{a1Imvm7OqkFr|r1+R2?^(nJu2Zlm>M|DlP`C)d)3^kx$g;k9u zwm;-wMhll};k(1r456I+8fd`dT>Jkc1Yoj!L~u%!o9p@o-rw6^09lqE&(==`J5vbs z_GB;EF{i8m#mwz_a$oENRKDIp+{{~5WT$j!aKkW+W?#JI4zzi>-gfRQh_Tm%HTe|ni_TsQ$5EM5=Sr_{gHm$8+Dg1<6hE0@TYUoTf^cl9Qcc2q!GHe2ZE&n$a5 zzY*{kx~%omvHJw1pk@T~Nmi1NgxuJT;W8~S(6j%!Is-cPNtLW3!8&Z1iXMLbHL@1D zHvn!y5)(BNM$%Y7qBu06G|sd2a_RA!I=O!QJAW;Y0apd9CrLOecP~ZLdp`8F`jGy8 zEkEgX7@I=gU(DtW+?yr&&rJs`r)P^#?33tAV0|1*wo8{!e3|yo%J9a4L!(4jW;@C&|pAEWP8zPaKt z3-UM%_`M`IpiW$q|2izJC#E;xt6)~fnkGI#oq$=}{sg!fi86Yf#N_z5_@X3JD7tBu z7ZYXqg_z0-O>bwi}WL z9rWk&^-P1BPn^1f!QN3bWTBfxhL>1U$@#_QVRAyhL*@LCv>$Scdyv+2jAT3$&|M@Y zFNxec+PIIO^=8k}zT&O%r$Y+UKtojLi{l%z*yKj-2qb*vxejr&KrsA<1Zn6gVfKf_ zXkTvQENWSutHo+Vr^yIA0KFfJ2c%LOMkBKS1A< zW0ko}+>5-{$OZTH=aZ$&xlnJx+9O$2|oF?_9gX9XwP+`0 zMUv<&>e+Q zOurF;sDI-)m?(c>-X@}L13oF&kbgXRo#Q(jH(7ouTR3&9<@4X`d9e*$&ejp}la)Lv zYl!M?3nw-z8dT+Z8_o`fl0RL`cTy;ZTOi73Ab?^}ca>k(7EWo&y>3M92`C3@2?NfA zdP1uuXf;MI!7vPk>FQfST|LY`QkC3yh(^{H;xNPP;*fYqX4(7<(3wkzNCi|8@1*~b02Ebr6ZZG0T)Ft6bUWI)tyGPphOF-`Zagk-Yl7D%!H zq^n;kT-5>K;B6AH5YiL+;0$6)N63K|J2@L{H4?>U{E7QoD>fhjE3bXFsX&%L4YYO` zL8N0gm-7wgj@i()6hG5JfGvpn>b>BcnZyJB{EHp9dXUvfG~3Rn&H@-l@+3u7FF`vF z=9U(qt-=cBY*dx6EDN)MNSI<{_^mFgxsbpEQhQWIf5y0+GTE5<1#U5g)Z)8S%pszs z3{}PDRiT4b{(eI8at#KgM(leH9p*|S%AR)JrIai@1KlBnGrD(mJxD$!J&*jF6$FUC z744=2twv(lF6d7(A7mWBWWr8-bXzZ<3LWHF(H0GDsz3Zr!I;1M9s?k=8m^Y2zR>m% z3?Mr$*rGmk`|L)9HK>0H)zi1l&RXLETo(NF`&wyzi!k~Y-`T|iS)IgbOA*l!^3^H$}fvO10*$}i+%hN%UMjVH~ANWnn$ z0Uk3t^2cnN!X<}D7+O8{y}Azb4q!aUtX+gtr=ljb|dGL_X}j@H9zc4`y3t=6&wFX zS1y$p(m>ZL%j*1v(m8P}2ve=A7f06UfS8L_EFLUCT< zgtr8aX{^LR3EQ~a{d8dqG$5mfc!V(uVWyq~A+vA?PRP|1do<_*LkL_r0v3LbF97%c zn~Cx4Zy~7RU`SW;t?^?Pn}`+4xZCw~LsjyQdP=ISh5mF3nOKm*p_C{V70Ih%x} zA3#?aJEAJu-cDz&P{GIaN z88v6ty+AgT%Ga`zT^-F(Cd|-tKsbgg8mKn|g=m)XIndmAAh#IwZD5ar= zb8%jdUFP9xsYP_2@I*3#Wy{wCM?472$0S8dD>YIpoenKzqYlJK=sW-d2U z`9YF{LUg3eoFEB3ixJhv2iX1j?ug7tv>;=xy@0NTF8n1W#wV&RT>lwmhdAz)x^0 z@f_Z#<4OR~C=<@QJSkM-fT&J@skT@7H(7~{%mNgo1ZSB9qy(|z1pxIMS8txVMK&#* zHUYZX#6*e4*A7yhzZVW$4eX`S2CSNuBb(wMg9n6%#!Fy`UbLFx=O*YIvd=8&ByOQ| zYK{A?_slL5X$34KJxq~0miru!!GX2uvk?CXMGb8WAE4S!=}M)%u%$ln0B_q~XIGgnRh(6vxB1bA7S zfSCw`l^6)pUkR=V<6ryxW54=R+s8yKozK7guWEPth%FD*wP>zy>a%W{z95Q|C=6R}R1vr-~F?qLybL-a!}uakDmmPZO?s zg~#bm5pR5Q!I9ezv_!(*u&+7y0s_$d5>P<%dHw?Ol05uRp2!(Oc|p;X0w2lJ?9n?2 zVHy)c)53l@DAN{~g9{(ugxUNl=ve^^#ZNEtl8_gSSbg*Z1p;sl1<NKS7x0sVJE3*!L9g_+8?1lIcJ#KDV~ zCZO=+#>CB9DGt8SS_6mzPv-cRG7}{rSpXcAY>=xj*#8X&I(Ptv{R7Zy-*|9CEh{{u zjo_`ZgRYsVpRnbHYK{A>M}i%#ttw_9)RY|M{fe(;)2+|_i^(_0sT=bAizQ-;8E^*F z6G|1CO#csEZyguq8g+pVoq_@igHlqCD9C^!AT8aYAdL(q2!fP!qjYyFA(GO9w1jj> zmjcou-Eg0G@SN{_-@W&r(Vww>p1s#zd#ye5j-wIuc;F_RUIgioTCH@zCAfRFLW!*O zKEJ)}?0dR5*qW+472U!sHLBSQa8t9FeEEPz(2(dzX^Y3yB((mKkS2kT9-l0WC09Dj z)Fu`ruwQnCOeT!tr@n)Yp~M>1R`OM|rvouSbAOEP!~Q3LmkszO@(eh!X5b3VHB{i5 z_Z=-IEz;twgR6yM`SG8%UNa;gT?@+;>bvwZNYg5r&*4FZEIyD{0hs>^L|r<-_AcGR zB9tK)n(FJ|Fl&8G!0Um=^7$6au9vn|O*rK{48^yxG&hp?T%AZuW8Nx*2d+GZGTsgW z9WY7`PZsWoVZs9F)+xXMG%ei0V#|wNs`lx6d36GfchTKiTbZ>@=N0*eKt(>rq(B|o zUyBY#e#4y#fg#d_79|m)%M3>1{4q{+dF(ioea}=7OZ5pe`3232g#n4WTL#s+023`w zN$^2A6Z?MMaV$kXK%+`g1qj{$!KT&0Kra36JX2+^V`4rUoPaAmDS8w7`AED#Rqf{= z@SQqg_xAfQ@=NHibg5>OMgd@@18u}~ryktJ;;!t10+?6RGZ^E=uyVA(nr;268@5%C=AOP*IX6_!1wrci>u~bTV>uxFpK_r`#ol9f&O%LnzSw@tTXOOm4OGFHQE-8)NTrPPEz>y%I4~D?x8z?q^}*#^@r5X(8XRuBgAV2H=(0Q28Im>rlXzY_V}V z#?b2MU&(M5HYc2V)Khq+2o!-J?x4D#7NNXah zQOgd9MA>;`#}F;!nF4y^RyDO5NFss}E>e@Nkdsu^!b?!Ks1rd?qoMls4>|I|)X?bA zoo6N?j4r|;n~2X{kK&zc!$o~ zdE1Ny*y;ljaM*jP6~#8d8Iu)7$I;#GRk03q6agxi<}`$a0Ps0Cvm;(vT?__kc`0Y| zwSP=V*&Sw_atrA+Zy={IARSR36Fp&$_cdBM=XkQfxSf6^ik^~mB;mawX4BC1k2P*B zxTboi!9V^P!O^kuiNff1ErS8`Z|1!D0wg+t<7GJTKZ^W7#k?u*z9V_yfj!b6)OMA$bV_(_ zl68k%^C(g2LJ$FkT)g8i0(7xu3|2nD(FDBdV#!cWhNXGC8(az`(bU|Q2;0<5b*JIV zh!bAfFh{q(jK1-~ZJfUr>Ml{c4ldXaXc3jOEGD|5SraKTt}bTF8$CIdWZ!$6E4SY@K0mxandQ%n_Ii`krcB~#FRJhi9it03d#Lh9NmU2^u-2$%Im7V?%{iB*F(PUM)GZxr)lEyhIK!yDwJGQ+-9y23DN4D2UPPv|T#9(FMfQ z^WJs=49E;(K}N3Zj_XGc5m}LW8o++63Ta@0WO_GbvcRPuLsM0AfgjkP(6ug0pU@ky zm&luM424&^26TmZut2-t_xxv$Nb;(J!ql!30RuBc^A{UbU7^56eLC73t_2cjM4K(p zC=IB6dDf!cd9%XtD*eQ-!Rvya`O@LQclhsz74O*N026lw==~$VOMh(#R&srejH|@Q z!_TfZ>?-7-OC5D?S(Xomj(FU?D|cXv`L8*?nuSeH0j5$Prwm zqSgimBvO#C0dxh*T47l{-~s=$eLBjx1_q&P4wh;Bm9Lgxu!PMC+)6yg@ujV0c|m^} zI+tAk#fB$r9$;yRna`u>>oO8+e5Vv?ht5dqTQBrad|vIsPg080*w_%zb7hM0hD zaxm0e_vU%{YChG+C@{T;lBk!20X*P;JEWok6rwxq!b4u@{6D6#GAq=;?F6}VU8t-J{;mn$!yDPT?DcnNRJ{6@T_Q_O!Tq%WtB4-vGc;G;u%erbT|^+x z^ysb>194wmy9=9z%)QHG+FEO};qj5Puw9Qr zD4kPl?ySCTc-f-2J>Z6^JR+~QyP3Tj|7aJxDDw*eodWFNg$bipIg|P|P|Z4r26Q=} zAq36RRL--;bkM#FISZB^%;i&pYrDHHMVZx0w)WV6|8iMgrG(VoW@~eJl_JT75+LH| zR$CVGtIY+QjTWF#0Su=2v#>W(_KuLS-u^}(4%YwKyXpRnBa`d>>}LQF{R8_#<`R+8 z>Dgb$ER#=AvUH{K7?0*=dqyG(^sr=h&J&GM`p^IMd=OE%i zs*WuSHtKYRiWDic@kj!{WBf2|cgn2r8ZGKBsVp{vpqNFxxE96K!5#oBW_g(X%~hPR z3JbFsXqmj`%}=iMvduNUH@$%xS~u0U9lcbX1^xv7*#nkrIJ8Oqy@!bwml-!E#o7ZB z@$W3GPZ8voedw|OtEXmhFGU~K&ggW7h!lyid4qcO=eu*=?TR?hAxO_ygP4h;fo1X|cgrbEvc&I@yB}Lb-HMW(`-SOnOV|#O8 zAvU}4KMy11%~vcGa-1J+9c(>L-);PL*x|3pk(yHX)%eu5+v#|g)Jkvr&vfjv(Al4H zjvl=fUBQ}j=+Oc}_c!rEU#s~zw9mIIvK`d*Qk4JfXBSQ@ZEDX|w5Fz>9d54lq}IAP zZyzo(Ub7pXHo$j3-Pz_?s?$qxAAcVga(;BOwRK{Cq*wPyz|HZ<=}b>U&&9>9C4Kb# zp~E`#l*V|-S?f6mc&Oz6s$9%I$WA*nl#wQg%W;xWK64vA0>--H`2PQ+lusY2f{V-(hnpmVe zeXfAJGVXq~uXn!n%PQ6Fe5+$&y7qYF^w;{Vzhd3#!C|(Z+wryo-FeTs;A!YWC|#|~ z>92}Zw*&C!1YP$xg#=v>4-}`*_rW73(?aKGg?eshJ4-8gj}O*59O&H7j&=*(Pv#Rj zgw9TuhUscger@Xso#OshOm#os^)EbdcR%0e(K|aj&Zcv#;ypczwK}S*J-whQ#8$AU--2@Llo}R3nbA2(q{JJii|4eqj;JD{N zsF&{C)%=XkipKqoEbY1L_L(Bnxs=06?7E_RrTbB9qWk;vj>L1UqXW9NDw6%pyT|Kw zBl|kbC#UWwvFvHGlXd5$67~8{si!>lc$4cjoBoADF6V0-spn@Hj93osv2|xfp(X2~ z_-_*}D$ck%D}(nE&#b2DXxD2`=fPL5xM%P^EOXyl?#u1brKvfZ8T_6DKA-zx_jUjHmnRQEYjkowaQ zqv+SZ7(u!vYX{bJ7V^0sMWb7rj`u@#wT;W^-D~0wMUGJU52`s^KAh~v?@^j>LNLZSEy>rbnEJNs~+FzyiMu&_-%!5?6Gx5>twP|f?QY!Z*+P_yt-feu=Vv{ zTwVQtp3h4X6hBRzR56uau-H4J-vjT11${Qp`F&;n=*G5Ae$W216|3nEUt(j|H{U#yWS6FU22WL`}PgzcHmqI2uL+69q}l!rY<(6 zCd#b+pfW~t9WlJ3al^dEt#Y@j^nTp^JwC6myH2d94-?3%bl%Iew56tM-&y*u-a>W* zoXjXNKDGJl)A30aVzVs^dkg;4PItui4>yi7|Jb~$l-6t6L))PhDLsaB_Ijko!2+T5 zUlxoWz`Fc-TKnRR#*zr-GZU>TleW2?qP>uEGSBUNeI?cA@2r>d4T zU+5?d?edquEpv0P+N}=iYsmXNeT8YidSc`QZ~8Rz7|P4G<9l;Nfy;f$N#8CD(K9E` z?Z^py^Rmgi&0z|U5(TCxscd1 znl3yVjs_O;(pjB5Uw(DX($hQ|?gEFJlhDZRvNT>xVftP&dh86xr;N>ds3ZINOR~s) zwUvWdtyZG;hP=rd+x06VHa&p@QrXq~S3sBrojXf!wjWBRjdoTUXm{r2{?>eH&t+aX zUcj}s-~S~RDGyg2Rx!6f(N!99qTO>!ajvAFZJf8=_$ z;-dSQ-F+R?y4bU4X0hcw3H-?)x+#vF;Wm``hckBfEBVU0Fv^}ri#g1uIme`PRg*L` zu8OlGl_Z_)9H_0{-%Pf)`NcHG=4zWLFhF}vXDszMi!KOML6H?%C&c>e*;`$D3QCUU z!JLq5h_a5&(z1Go zedg~cqGy_VEY3GO*NAgD#yg}v{`30p2O6fN$GuMD*SjV^>@3EM7K*K7GU$DE)Jb-{ zMWXQt?}zCVl02;634Y^sdrTGc)2fe7j0{XDQg9%5M`q^=oukG##!vydoMN6tv9w zWzvr9)q66js9%@_vNOu;Z;bQs%)l+B=Znjx_9R|sn>WOZp40Cy;D}mpx>;GUi=s=VT z!ib$Jd>#6^z~TF6%Re6AtJyudoOi=00?t>m(oAd6^JVed{fk5~d)#W0_OI)g%ueGS zWgdxGMFQM_Ykl^S@?xijaBy{CFvoue)vqZ3aqAPk3L=NmYw!7|lI1UK9pXBYk{^$$ zNy(6A@@g5|3hdhS27R^~-9dI?4`NWU56x>p@!G?R?41Q%ztl5Eh7oKpf7^R2JgAOi za23TG+1dNKILch0F-5hn-z;^_Ip>uLgy%UjJWDsBJ?54r6b-&;`(6-`?jNV}!!?Eh&M=pHYS<_R+lupgHG z`Yyn><-4!y55;~pPb)8# zI#hA-u6rU0;zL^J?6aePJ{EU^07Vv)wC-ix(m&ZPdi-IP0-dSk_4aP*TeJitVIE3o zc)oC!;+9!SG0L!Q6s{&dXY3TeUCb0}yS(m1z@toXqy5#)woEGC7fzEgJI2qwQyr6^ zhsLK&*J(4vdZZn%{Q|&riAzWtqrDQ`UbXOA^~;Fop2Ef|qfb&$ihRiTHHCqskJw~J zmBNh?1LALt?_}2W7BHITSJd>~pj@HQ<7tHMvrAT}@G{c$$B?U2%f$cv1deE}V~r$;;%yo= zNF4g8pYbqq=PrFa~eT$mGd`pVMBg~OJ8up%;Qdq+>p()8GGTu79hBUXVIlR0g zDvwqnS@nhhXSHw}B}Zi2;JcS3(1l8#e))n6+It?~SwVc7?)nlA3Do?qfJ!j&=2=b! zxSnb=u5Q@1mP1(y@pq$`F;oIKnk~pt8>gp^w(Bt|wE2v+mRt}eiO&n4dBHH#p`^_IQ2X?fEV#eQ1@AOYwD>xi+88&koxEJ~WaA?Ww(X)-ki|YMo&0}h}n2ozNXv}Oq zeXGEr?(T5$ACgk@H?|YAU+)fU{t4b`L^5o$+$L;&yZZ#l}}Ed~lB@+@YK<26UWhkwvo^VP|aRm{`qA!8^TOG2ln}8C8rC9%BwP8$imCJA`kxRDyndRU`h=sfbrf)epoliGH z*(Q)#d(S67=5OS$|JZK^_tCTUsj=vy3l7@B#2DW4SyWG5gHZEKj_MaQscBfwd za<_CPkPe-f14{?8ooCIUYYvpO`O5_Er~k--pJ+x>++g2$Q940=S z^`Epf96iT-rSkw9$} zCN&tCNJYiJJcbF8nro_O(*{URxefai7ZNsp zQl8AYv~Rqzv-=&*C%mD6Pp}l!FyA4y=^Oerom`CX2r%fGy2o5_w?g5J9D{`g6sh$~ zj#{GFOuDjWlbaS(1_iBYEX{;9Y2+|IoP#m>-c6>7$Kt$|uln5!clz2LvIJhG>6pj; z1@GEAFF~^vcYd*77>8gGe&Mxl%g2w>R&#^#M;u6;vIKh1?u^pyKZN_p2{YDI@dxuL zhreQ_WcSb?$9_WsWXFXm88YnyN;VkyK~64%T$*F z!gY|Ra9Ud?@=3}kY0Fg|r&rp0BBHVT$#?vZzP)SFD<6S{_x@Pu!x&zurN+1VmNVR3 zF)4r8OIK{G(B~-?70Nzvig5?0(X|g!=XenNR>I&^-?uEqgtT+_|SE+&2a;Mc3QxL^gHqOOkRImJ9 zVCHQ~F+}?G>oSRDnojltLLFKC7ceER}4QIhJRyy}M{w~v&CSZh}vKhs)%)(FjyY8!NsF!4L&>%2I*Vrt30 z^wP%S2Qt32LOi1xHX*F3y=>$8hxV;9w%gw@{Qt4gxdr@^&0CJ*?Rk!|fc7|y#q*Z?t8C(v-#xS2Gj zeUl`(ih7U6=Pd3GL|3x1$wB|4ioJOCG{JE7l_xh`A};MMcrv1C1xVaEW_(GGAt(yq zbc>d=I)2IHec=PH1~)8*8T8zYoL9W4jmOo>5A|(G+!OU4N1rjNT_Ml_W9J$+2pN8tL7I5VILAMDSQAsIqxt z1-?2w216yL(e%4@Rxf2Dtuqrg!|PtvQP9?G_ixuOdlY%8;w`+oSG}`vWj-mO)`h2^ z;07xDzH&G_-P_=n$d!u|R4Q~U&!()BWibYs^8<$OMH-(DC zcv$D?%AS{ZryyfZy~z6DU(M^587jD!Vm3V8aHn*|dKJWwH3*occczcRcFmuKhEwNv zb=C*|O@<#b{7%dDB6uCsbV%1ioRhu^wwb~&bkzGB+ThV+IvsP+*R^_J?l?Y0JE%&% z_m`*Hyg^#rW9;o-fWe>PR$Ba|$J`G^xhgsGnq6}>?#9W4Eb|o1@Mk?B% zOiMkxT|->H2bnBDfrud%emr<9A$@AfT(*wH9piVMcku~}?EB2mQo(=ep)vte`zufE zY0Owp9k0GUZJw&FTCM=g`f~$W;&Ah^?fa`K+wgRNEu(g!`y>3UM$? zdrMIPi4*+a$rPZsz8U{{=WtrIdg$mvrw-3?`Re926ZyDoBDJ)WM`+1{-yii6stYvT zFx{}d{YbR!%c3Uu%nuc|-QVX?oK@h$<&!Z2O z^^AI7yT_oZP1k-b{$5!_sF*7Hs&$&cSqg=yg2Xf#UF3LjiWZpu=$ZXV54>rwVJ$T> z-THfMwSO-rVsLp|j=_za2x>~ALIn#Bvf##}aGcURZ?V>N96u0kblMljK~|-4|kPZ<_1XLNxVEYyK4O*Y!^Fi@-AU9cprFf)lDWR*`$Tj`UX8+sD4TxqgVF*jwoWfXM?vEPz6y%B zz$auD#32>m)M2FXQb9p6cp2hf_IJPvoFR8A@!FYC3fDnyaFaetStV&dTpCqBT5PI~ z-z(A`C@8GYE0rDBI@&g201|6uA&nhK8vos~9N-7Gj^16(gS^_*Rj3o32p|oTtayp=YO`{M)hCqOX9w@YO&* z4d|*2E`@swvPAS6+8vLe6eEb%4Dhs|SujvB3=*T$%5mAI9BHmsGr~vU{^CM(zG-~a zTY%>X`Pj~kCmT{6#Q1;t$`dP9BX9r+=@&-nIz3ny;B%YWKe;Ap=>eU_)0;f;hSL6E ziqy~4%&*pAAF(MYK>3msW4Q(ja)*Hu<}Co(x!z^a znHrhq&kSYxDwqlWGu9R3wSxC$K)vYa=BZ6X^`1^(8Id8;Hk4EnWav78PniBBhZ>j* zGC*RPq0mND@Vl*o*LpXk8)csYMI-t6L#bQwC)Ln>e^e|SZT(2uC7lc&x7FGMNn?8< zX>xZ!kH?>jR+ra69YI2e;$s!r$3z!hq*8U<+zyJe{Dj8~OsEuBNL?8^0FTgCZhxU7 z-nNLDxAePdnhpL#REo4z)=)C;HA_`Xuq`Go zNU2^q<)R{{0(f$IHPm?+XysvZLhQ97heEbCL+vQ?jD$`+` z`O4PsD}R|Bq&CW%DEr1DIc@ZVRiZUMA9XZZG@bxM{c9f*L#IovgSqmTgFhXOetIDw zaNRT%PyVtEQrx_P>oeF7nbp4w*a7PbBBndM$pIjxlC+>FV>QuJ(&^f3fLx)+Hjrvn z8&r7NE!PwLiF(gfYLPsJVf6Qq;JWozSQvq6hPp%cKh8_PnM1X=Q=`g<<2$>19hBAe zoqMNp3@33bkd$#`pM!Y(*{MZz?o%SHHNIgwXgTz&71Cy9M*nKFjT2BA*AZX)t~XG9 zCze!RDQw!Qd&*KN=`dRH7W)CDB9g9A_i@nQo;6@a|fN-x{2c?MS(92h3!S^d1bH=LC%X ziX4J-(}0cYa7%gy3|0tpbUl&)zGq}sSvvmhz?$A>Tk8i_|3pd9_rQ<=|8Ti19*k`< zh&;8{J~7V;R~NWIt$k3Gdl80f7roG#Jv0Tfo_y+J^JPPsSK5&Z6r;QOdJ=X`GN6b- z|JEze9z|`a=V{HdRU7VDCObcLIR_7y;b6#Ej-#7gFeP+PhVC@%n_P8@$=y=_>?>%t zd7W(3E!|ta1XAsat^Dcb<=}Quc=hCWcwuZ{EmM8MaMUfH4B^ZYX_VU6HsC5XpS@oO*; zM^ADlQ&|@nyP`~E0BbymmN7t}a7!w3u(Nzm@A3#kgf7_^s0tsKbRD*Kw6WtoBZ{Y( z5&8&S?;(N1i*2nB9KlD_d&xe6b8u7Ak^$OmdZ3}CD%R0l2;DEDXm025N2i8?{d=A1 zd9+>icPHFV^0~(^(xy(gY@YpK_+6}o>!sshpH&Iq;!WHpW+|9T>$9#)N!5cT&94~* zfvf_ZW;cQt?f`7zk`lCIRAB7~YQUifP{lIiJC&D_!n^8Pth#w`2g!`nbn4{o09SaC z?7Q;xU-HUJ0K1~b=IuV+r4Jh$UEkUF8$_Lxl2>n{?T-RCs2C3=RQna=uV(Nc0o^Ln zJD4hi4zv6794xIe2c}PgZL#nP9x8`-KRk3K^dcQJB20qIhB^UMJ33!9h*^ESC|w92 z{ah}oU9x)M%S^qZ>sR-P^uAuJ1)Lnx4@{lx!R=Kkp0F@zch%UeN_OYG+06LP?>}kY?OU)8RSgRh zq+Y@$LocZ-9c93NF%}0bJ0%kUmpw%fo6TxBMD2rDo?(T8At22hBf(_H%`&Uc-+Y;z zz*?(%^APM9mjYrXAF|xJA=Ne^$f=JmSYTF3D-bDiBhxF&hiKvDMwcXNWPiIP`f#7H zaN_>j_Z($|I*m(O6!X{(gj(eik|(Z~`2(%b7@IJBR$qWMl22eZ{T%{VZ!6;j*Jg+C)eQ6ax!!y_~DBYk$_zp`++-oZm&E2yNg!n%Qy>kVDclMcfc z_TybyQK2`KDdhTTq&~$wJNE!i;a^rv8cJs=hTC;;27}*rnx%1I&i=8Kz3t(b!f>lM zj!6KEn>|Aj$Fx({y%?LD0#$`cO};ZhX!?l&7Cbt;zYsx2YYhvQ)m-n*jZIwPPvI}^ z)hG*iSS#e=r3p)~tnz|LKHkP&pc}NK$H+Xc!r7k=z~XF zts-Y~#6)ZwVG`c`5(h>dd6SwFna0VXlj_-mt)q0$bdli$!Qab~@FF&+kz>&lq`%rG zJGw}Rf2rH%FLf@XzHOdjaAz$>d5EY!El#fWz(*3ppL+#KhX)ZYaW#Nw0&CcCa?xKA z*fr+DSqZSVxS9dR7poW}j<*;cGU*vRFs>!2xS8;Y)jXTV(wGba*%EG{IIUrCiz+ie zc#hw85A~J+$s&$q&*;HMb;|C)qc`-b-SFZRBVA$-%VB{bjYEa%6=fd17>)J{lH;RS zZSM*to`LHI%6)1#dX0h1TD(JoG~yiJEl%(t7Q4wa-AZq$!i3J40ZTtwTU^?}4e;Wu z^Ea4@zVy2uQs`*I*vQP2?l=)~O**c;^<8sAfEQo6XOn)R)&E9{(8hUS!k)2@3E%#t z#tlA+3=iWJai7OP4q^+ptd_kjLDbL+=)Zo-LZi_9)#X;VN+rCWp_D0-|O}%%#%!sf}23MBC@3M3zozlIAN14nJX3J3I8Pv1T@mCRfk(6BbC^;iHxyHn&{| zN&4+;DlZtqI1v%n3|Mg7s6ae8xveuklEtUOH-etPgE+C56`x*A+~Fk^mr=jJ;0!eNoTC8<IjJx0hVc#69t9DJ z0ia>tt&hsI%Kkv54+Xl%B7Tn@1vAvGO3(+OaNw$sOVh&j05H2}Ou7(5g;Z-~Yp9NB zPy9PAKoD*Mg{n7Zu=JH+B6x3HtlKLrQ@P$@ z9*-96Ngho3`xt4Q&M&Q6l#bG{SLEVtANAXAr7ud1Vx-aMe=yk8TBRYQR=w>FLN!T} z{7n~xS6t+LrlO*-pI7H5y`iYlgIqN93%zO(N6mKtSriaMebfu0L>g@7>TxyM8VAt2 z8+JxDzsxS|@{}XY;S_1fkZSQI23-`|3XpIrf!!8&nKW^Qz$1wFn|tSmd|$wIRC~rO zpX#R#4>KAJ+dS7@461siK2cg!`&h-m{*(wy^N+NP{(;Wpa2F)WhzPvU*)~}`m4~4^ zY2Awxql&OS!Oa{czjt(nzMY9=4(7yaxGkSE>_2IwZae$>Yjb;amRpgfT*$35runE0 zVPi!Oe>G(1WAiay-vOPr2yF3k77?=U3JbWD#wc*bv+S-rw$1E{LVF578<_IiRnNZ~g+gdWmNUTE`BC z`UH|S%72O=ZY#QUs)B5blJ@t9>E6|4+|(+e-8Hqtf;H5GhdAzKE&6ycs1B7UTTa6K z7{b47Jon&4cv&;lP}aw(Pb4V!rnbO{Ux$hT#Mj5wY)M7RoD6QPM_MT*4{*ju+iW)r z-59KBE7}{(z5{NW;^HCqY{D-!!u$VF7$?W+B{shxf+KU*FwXQ!WvghI-v#&o_T{?0 znL0n_ij1$sc(s*2lGPq3A_A!F>CAihG#%hFBQ!R8ev0@ph{;_vw<`;1BFzV0K?GG+ zpvQL>ZqciPs*d;wzHUWHh<9kq85{NYyHX()?yg_K7~sQPe0H?_1S<&Pq#4Md`n2}f zGyw*c-($<#K#Z0Q{1)FGUC>KMbA`wkdoyE zwGy}|KT0Wd=)1;JpfOMd#L^#|G)}~OYX;Zb!l1$X!0;}e0WY>a zxZH!-9xbbzlG0WIf_>oYxXg4e-7}Rrq~Xrz@<=HwoC+5<4CpST;x<|uU&^9JQIUN) z6vTx`-h@;3J9`GbS(40#h?N8b$+D=3EAn^Boze}#%hSu?03z!4Fa>ru;$M^r$3s_O z*yHy*Py#<4&$Fa9XdRq+Q7BG$BwfmZbQ?k%BZxFdKklui_&kMzFEat(l?&!C%;U27 zTHIZk(S%!{+jXhlbp-}kKalpW2hr8!%feZCF8r?8n8=-PzmK4UeRGQln_9X5rdgHC zZy=ojITX@ugDzxTiBnQ!|4Llts!Xj|rcJd|nLzAh1qqCv3Z7FS;ujzogB@SIwZ?52 z_GUZke;WM>gP6z|2FSVc^)@wf7`$Y^O4Eb*s=xwnJaS12JmSdUZBtr>QE9T2oBbQi z0X=t&_~P=lodpm2$Vc~YwZ&0Xu zo6``#=X(sSRi;Io#?&j$K;}~zJ>{Mq`E?Qh+ve!jY_u@ejpj7;ax*7KEn{Ast5t8E zHFJv?Civ!oY6g%38^qKU8M`8eSJ~0Py1ltc9F?S!T_}S2f8cPGPEJfsSUd=$CPemN zT#)q1o`T8?Q*fxD%V;oslv**>I9+~sqqit5B(bEpYHjBUW0--|-25>WN-hAUEwzCI zNHGv-oHXXE;Dwz2;#3Yt(a+^fvV016^!eB#WB9M@Cyh-dm370`^S_DTn5Kb&UVOl2 zKK&+TxAMDY{sgi1xr9~sym!dj z9+rK0XwaeV5W!TpyMqpf0gZmxfeR!L*woZ@amA;yCeYr$-?`>Q`Ml7p6rc zw%|X46KMsw)oBCBU$dA!)I(^YIc&ZfTeIDnwu{ za)>%HTcB?powJnA5je^k}xEw7wW0FSQa~+skqQmxF$v1llW>4 zhcLj$#j!v;q4HY9xgfzGMF<63fYUdHF|b_F1u#dP9Im23+b!AvW3w2_{+C#XryqL} zUv(A4LmKs81qz)6u9jhk%yZkNx{i{|2}9(LD^%nBzwa062uNr8CI+0a7zg9RY5fVc z0cUcZybLjq=4YPQHqOIAUZo0t&4q#{7+?&2XEH7+u3WRdjRA*-TIhv<+R+6=(rFCH z-^D!Wc$7CTjE#Ux6*cPPVz#SDmYila0ZQhJfH4WAF`o8F)d)g-|BbVxwY~8E$}PG` zMz@c*IJ22>kb)Tz1}x38Bo(d$NsVS#ikU@P;W}FvJx!S=tjmWBncb-nkkR>vb6IAqp0_uiGZH~ zV8tiG2Xk&=u8Vg2Y(M5L?1e=%le-|^9~SXL+ZubPRxe_x(G4%OKn*33=P?SvZdvwl zn##Q;HC={;qEE?dfTJxBT$y#}XZ^x}{NuZn!iK&V9Sr&}0q$qJ0LHoTwYFaJ@Be#F z3P8B;g#q)>>ca^Mi%#9c!8e4NR#$ZFQ{`Af;MwJ^#Dx8Pa5n3{fDMwc^!LYRP(lBM zfM8tMI2R)~8xyc>X!+q51x>Odb~pjaSz;5~P~# zCl~}VAzlo))Bnb6VS5~BI?{NNVE}PK*XnMUq%tKy4YTk%jlp*)TlfJ?w8&_G+nj{# z}LbN-b%@h~vl{3Y*!1q0VhVlXHl5|3 zd2*T?dc^T6mhM;ncsPNR-3BK+#Xzdfyql-JGtA}m0-t+_Sj4l1X-UQ+K}RZ;5D@l| zldz%Jlz_16J}lt{rm*3jLh4U+ww(2ZRax>^z?Y3}@q2@W(F8|VzMVbBGX1!ydMzjc zq^yn?huX<6P1sQ7F&Ii}9)Nceuz+^z#Q>`YqsJHYPs%DIEG8Z*=?T&nqZVfU;x*o% z5k4#r{oSA+D_9}>Rsm-tTa`q=L89AOk8(uoI4+tcf;r>+7|yMu_g`$VW6uMd#<76$d1h_C@In4 zPx0~$@*QyZxPp><>uW545oXZsG=z=JQWF#)VrHeGq-LcH=y`XL-4%LEDz^lV&B%Bx z8^$RfD+t)E@)8#pAZ+&bea;ICnj(T04lRHelR9rLrZvZ**9{xHO?m+5`)?qxt2ywz z6J*X14K;H;fi@iY?M*3inc8QKZn&n4@8(=svCvL%sRl~iJPy#C+J<04;r$W@4PZ(o zErxOF>M2h-n46mHS5Y#%7ko`!#?hwKM@M4N8#VayVG0faE${y#+5AQzgmo6dOTPSH zV%$=EptQ7`j|ECF3n5_kptJ!}Rd;3WBr&=?@QxfZ_zyx`hp8=oGor=bq{8TM7eRmL?*tDcQ88 zu4jTxty&s_6<_=n-JAcHW;LIA1`$M$c4AK|dS8sV%6Kp?bcF=oiKw#ZFwD-)1U@h3 z6%*HFZCX~hk^+=5-3Uv7qW!?6cDm^>{rv*CP8?ttb!yAqs}$DoP6YJAQ*{12X}hC5 z`~qtIVcbUjn{P@Y$LacA9z$oNR_8efke*(|O(?FtG>wDz|B5!L0t+T^`gDn#f(hfI z3kpv&(rS(!A*|sx^|NKXq>V%}ye`^1bjeH3&9jNDz+^r`Z+alV z8jzjPsoYZ?GnelF@n0p&FuKR^-&opJoxQ|K5O*=%OBa!lOdH;bl?&`p6l z*wur9F?2+a4`wHuH`vm|_b5dT^=U*y#tU{Sy4~gJ)5^(`i8x`gp34-basj5=7fhrp z(5r;cZ$juafwo;N_ZiYb0aCCr<>O0P{FTwzcmnc|slgKuP{S!crMughhG3ge=%D~k zH9YZu&8Me@^s1ELl5Hw@7j7cm5f`rNf>^5C0ofZz(FdgrEQn>90RHJZFfaK&yilS|r03w8XIeji zi|n_d^a@fP_r?_m^NC2mh5<}qBT}WOmB~*H=*1M77XBmK=QG*(z`4v}ZAxJ_l-{79 z+Tv)=cZ0oy5YgVSTW>hj;M`zKnPx_V{pfS&AOvPwlIOiqIIj+r@AdX_X|rCOs@4JU zkF5nj>`^C%=`!sF`lnh=Fr@o*$Z)}q_y)JaOHyiz%w3VDqy6)3JL6{sD}2Ps{eiDn z9@J%TEC?l4kSkp!Ogm+}(;rmMOk_juK8=CQB=*kYpGb5kpg~@hUUH@rlTe8mRasXK zQ;wP@@s=Za@Q{JAAzZ}x4h;DswE8nKHNyXV?H0FQF)P>(Dj(piR8HIpfx%%$$vF<*#~?x`Wc)B2u4+SIPI z-GYNzy*j$~Tsj-R@i`*yxPI&2lj@Vgt3=d@2iurg$KwZk*!s5_qc?PjsicR_n!(xh z)T1_*+_bzlaxf%XH+`A)TQFg&_mBNB^<_4LZ`JR(z5Q;XuE<*AZk@qJ`9?dW*a1&l zMmqOUYHuvntks2@woMJilyUkrta{uN6<}|2fm#eFw_s)4(T>2xM23X ztz|s-_2nMMKg_8@*_#|8wi1k?vMDt}fB^3$+BrLK$G#OVxha4!Wnxaa`&*aLl;XET z6BRd^3nM=FRRcWCE)AIJ54VF7(lkVKYKLL(&U-xW#EI^ouIk%*kCuXrNA+H>Lcev} zKyU?jf1b^?H&1GM11Feig>$|He65ReRL}3U@SomT++-72o}dKWcKCJDcnK;e`Pvu3 zTtaXa`93^58_tsHjf%+SiW-&*_9RIN$k?li6k$a4?LH*1m~)((e9NhrZp5@L6C!3G`Jwv;uR3f@2+VJrtpV7gFs_M zZEpL=CGlemq6Bumw1((zQeGG^}YRkXTqomzYbm%O?peR0Ki63S<*c&0K% zWWtOMsWUKi+6B`Q&A~8Jr#>unkeF`Mc8uf6YrRo3!#pgd>(-&?qwxe#qLO)_@}+<` zA=^3nE)sOrAV-+%8jQNERf|R2JmcH_tK2oFD>%4aS>^9+^wLfp%E>+cOc4C3zDqaq z+x@oXj*y^_pz$j8t{KkOaAbM)pEuGN#NcMHo_2i7OYIDs-|EoC6O!@2?b*=Y3ZzN zIb^^V5iRP|daNC%|d*fj1Z|)8`pI&lM6noy@d@&oGp>I z*?M1BOcsU$wMoe!1&kt;)oR_JE}bOPw5j=IdR=rR`8`wyF=C|-9*IIDvaRg}RMZ{+^+U9$yC^FAIG*W^@-!#I>7*X&F1e=gO^PS4n|(R|OC z>0lN=3{K<`H0JN$BTMia2Er6!E^gt#Z!F14tj9L3*5JphoSCT8_u4u;AH2umz6$>z zgib-&qNU(w9x=V(1;Ixyy6rw$lxylDStabL?leDzZY%{!(8fOU%!-;wd&A_MpLoiV zBCHx7PQe{PCa)L|=!J;BSL#(RRzg6LS{j@P7Ch#!VX4g>V*Qi2Woj_STfKV1Hc zUfp=($M6{wEbpxGaScV$EESdUkn6~Z2vGIO@6i&Tg9^z{Z6kbsP;Q=XA0~m~I7o+DUhR{~5monBBbX8<~DAM_ZBwW>M%llUPa( zC4*`}em28E*G8WL?xd}*XGPoL8)^GI4(E2J4>FA}3T!_Mlwj+1i%8_;L1(Mw-ZV!@ zI#-_`@-qw^H%R^fpU>N`dfE9?D*JoT%afairx@`n5poU{{yl|3@yH)P$_M;{m{zFT zcA~EB+KD%>l*<08z@g&eQ?Piz(Lm@SH@M2i&?d!u63^2HI2oxUSkrmqyeYgJ)joSf zMvPQ(VT|P*n0%Qe8-@^*UlNgsup>q}fwSGJpy)IvJITQU(CjJ=y2xBiWLS7aD!=Qk z!qHAer4~7G)t^!($luoICSq8~-+?vmA_Hq{eN*H*1JA@&w9~?)Or6>vfB0y?7x|N) z3ZUYA?Se-I=-R=uodqu5eAdYq5y}G2luUgA(ANtVh|jpbpo86R8yc%7vT@#f*bfhy;CQpAfE`3J zy@Cyrwb}hhzgziXD`HugIWPZhyy#wu`zWRZ zaz)~JG7CRXhz6D~*Pi(WMY*WYrhjc435S*BysRJ9_M=H|xU*nxOmk1=q=BN|*8KX$ z1DJ$oCA@=xN}2!=)4k~4ehdjOA#DOG0>KFkKuDmL zzBR#!)yFx}UTY$$U#6#vt)t^Cd_Q};Bxm9E=$Zu<>=!|cRWU5<(dX&!zH$z=pG`30 z12T4!AE20?9mk^SZUS3l$;RMm>n2aXTOK}ObiT(_MS2?nv;Lh^q{mjLB^{KeMIUA@ z?Ag4>EmegmY16`=F9_&Yl?2yu!{p-4WX1z=0Ng3-FW`PCPvsZXf0*gX0NVRK?ma^c zj~tl0Jl?&`0}^_Dr@l9*({n`kD*NDahgx;5m{bTsf3Yn7@dNyasCGG3r?Bv-3#`|f z3QLH7ohZegF7rpTu-k!T3B76n$2t8#;NF^}Unff{JIpe!FFq&;087^g0PB*M98dY? zR}NIWtfWHAKL9=afgMk_dejsb{hu~>WIV<6o`;-6`DPDq7=lZFiQnSiA+_F_ zN4A#X6?F6DT$mn!3SPE=m9P=8p(J9=HipY8h8{2tYYa_#)j?c zcvoho58GuMbn*o9kV<^?oi6}WhI@A9bBu3)$9!A5BZTcv$eS`U$bLVFzYfLCA#Uak zl%>6G4T(oa#?ZSosBwac~FPMvJI$B>u2+|AR=B%GD;_j^K@+u&hOHa$z`T9U0 z{{nXbIX$1s(4zTxN)mH<#W}GqTa{s>RjUHzDrDaOlKQ}Bd7}hgct;(<5luGt-xE>q zrleS)1?yChzMAsbmZaH<-d)?XU=@k7j6A&sm9J?>l#o&#$bR516G4hgu=lIw0O+P2 z5F@DZc)Xz0gY?LpnY$rpzxh+waWxXqRs>G$$Q9QcjI!yEFxzA;Z+#vQ49@oNtTg2^ z`)>n)yOE!7vaj3p#*V_xB(2g!cD7`bfhAP3tgI}#ti50D zs95$@q}w;5u2o>iZTHEl`xOb-g*r-dpN|vujU(;)<(m1&dP7%Z2Oc2&8{XXAeSxQW zmNazm2@NvFA<-PO_gKCA8|I{}yyEs01Q{Q+_w!<3ex%~sPciNp(-L+TOs&C!Dq9{8 zBtOtM5nvKJDqeVC@g7;FB5?^wyxpE~*7pCBsiJsD4fxIIz2){#ysDIs;&so83KqDd z6C8ka`_Iu=Qzlzl*4ry6Qf^@@Hq{o3s|p6VumO3G>EMDqT3N?;qzSjy!;80CtM)9mDWnN%}v=14p6t4K<ps$I0~eMqa>1pvkCTVS zG?v*puuk_8d}QvC2PRwju!5712|T45Oe)c$`+AS1Ni-4KzcO>TBHXWUAq+BxDi1^8 zYwoWVxDkc~gOx67-N7*W%|Rspk{am&GFWO9PDH*OVSDPJ*3klixrXIg&W z@fNj@Z~Q>NSinn?y>~WziM{yd;i~c9fdQ-X;s++Gck4YWm%Kav63UzArt(O;?D3|u zi~xU8x0;2e(@%J(ViixI^{o7ZE)!JhY!_qamyVp&8~K@jx&$DXbHeJ1o!tiZY`5pr z+wC=mhY$C$Bg89jz3PqJrT5HAm<@&nU*uC2q-U`)D?yskFzKrDG#yQOBs0>_q;RS3 zX!@}=ZRt0zMhh2yAh+k{m3@K`u(@SDUO|z1>*F0UY@~^vWk`2%Fz%*(ju9fkvf1dS z@5ph2yPg8xHf$rA=`zCJ**V*wRyEetSy9MweOBf)x7Ieht--kVvwzF`p4!(5PkN@_>~THI>XVhO z$#*xDHnLM}eL{wQa*B=o;4^Mb${a~sC8kn3#YypS7m)czQrRV?X-zq3qN?K*0=3Bo z6t{bWnM^C5g5K1!C$t2V=)Lbctohbc8h{%NZ3xPtl z;hsw4DUc%qL}?YfE+2#Mb&Rr_xf|6OHPffV0{B-?b?B`?Wr2XwqGuMNqH8wQCXoOd zV~32gO`dSBLR=0@bWr+en?;{W2EuBli<}B-JVz^66;rQhPcc?C?)cVb@-AA~PF$Zb zRpKEgYiXPO(YJ#fhj&Kf{Y;`3Ufl`cUnPEbYUe7v$&(>rR)0F5S(Gq$h!wv()vH;kruxCxZ)V52C4(p{Tx^V^mu*e?l)@s!?VrvS(u zRq76Oq$Tt%p(wV`wRvg4NwJmDfKXo-I1zOU_BLE5y;d%>T=K=}b2)jHn%@ZrL3_23 za5r7nK~1js6iWzMXQWka0>ot+Nu$@BE9(JLGW-ycvTgwL8&y^1R= zi12)7lwJ4dLQ2$!AC$Jy>e!%~wy>?-ktAwZOm`DPw}d2BQ~ZLcnw_Z2TLeZ^sz3_P zxA47jT`N<%h^AnhTM8<?w*Ym@N+be#S;z z?R2SZs1(SM1%#8*5`gw{Q(?1p)34%+hG;buWZRo)%O(M97uxLfDcYy;vY8SYrApN|shnv0;?!4p`Q-kHifxbp}Qdb>^E_#JJy#u z+i5cBnlNrU!4|Z&V)a~6hX65RxUKl(cHtN5oskXgZt-BBjH2kfkyBJ8A0qUGcN_?n!I9xT997CrSN1aI*3X91c=F* z!dwivXToJ;h6pvC<&(4Y(DE`gzLCZWg5uGQye+jcLcmR&&wxGH%)i3GprbtH=7b8+ zi(JjD046_$3NYD$#&&f|dx*0K`#3M_v3kGbRDK2R zfW214_8Cah+=nZ53A5Auz$SXN#rzo|2wpEA=JQ53A?) zj<#F$xeFl*GKo_E%FlqyNGo1NbTr9|mawH^kYL_%w=qxy|5e`I4*iGU?BtW+DJ7y| zXK0X^7%9!zULlwvT$XH*E$YrIM{_%8(=lpOPjmzq2wT?QzMl(B-N5|)j|P2TY;sqJnXxRAU4j|k_9hr9&HLNFzb&6WTAa_}; zLx01Eca6g;9A2kScC^o%&cbX{&UjGunujmL|+%_8e5@cM$D&svj@)ks^3&+vhIEJ=e~7nSsZfN^2TE6 z#5yGL37U#(&GS{%yHF~U2KV!5+ua${dOhb()T+bkrLKI*UhmkG>lw?gQA$lm70Na< z33n`6)P1-yZ_91Fj|Q1O^U=mULmJ>Q>O83R;Ba~Yrr0E2al%0Fw zkV`Dyz2$Q)hq_2j-fHz5xz76F3=4ya8oCxD8pp*&LHfqG_n9uLr!HrRaqam>24|P- zyCw$L&E05BLNj_yoYlR```i83sSm^~-5iS*7`RwhnTN`FKs&H-<={2&mefstj2{fn zepu*%j^Rjm1I4l$W#%-gM_@No@gT#Vv(lUE+S%kY&sN`ls9f(^c|VA+>w#Gz*)~0u zqHV~PR!bagRf}c?5Zp+L;VJ=dKzJ21S_zyR!>Ls63O-`%GBQG{%f8j<{Q2XRCK@_k z8GvqD)c#eK&hm?CD5|6X7FB|zP5FVj#&g`!9NmH}Djzg;`XtoCWm4!4&~a0uV0jY1 zkI1+I$q9Iz^wvkIijg3K?dp?ebWDmN9H;XT%PmI4h2&9ao>sE31-D48?7sKqroYNY z!s?DcPs<<=O;)*uZ%eC5_%Q7%gU@=2qIz5qARZ9J4m|wJz|C7!sh{G!u<<>X>dgL2 z4S*9c2gFM~LZCHyDcb|W!Fpo{yt^=pL?BTrmzZh;T=x7`w?^t&< z?2#*r33dlqKnPIbe&;ofZwm=g-U-ktzb`1Pp+0*zCaT{oHP%an-^LQzZ^bFWdTEi9 z{zo%FFJZuZ)n2z^q*phXUMp*M(CUmVXeJNkz8`d1*6CcOPrmz9rI)?)%wa_tkDz`( zO$lPb@8;G0hK~QiZ{rET@3wfr@03N*mWUb1PSu+Ga7!|;8eMQFrIA>>!c`!xTa!#2 z@T$pA?*_Wt_A6GP_adzl6GK+{wn0-)zUKP0(_v)Iv!$W^TCigk-}-2XqQp7*V$*I4 zGJGcdF@Cbm#X}){i9qI*+N`R{aai)u%*@2jE%;h<%Y~KKb{5G}qLfubNe1B;@Z^u!W`2ToVIDOHSb1R`$Z$6_hFh|)p zfP{OpxiPb%Jp@P@8Wiv*Pv37b$}a9KCfaWRvASXlK>n4$j?lPL9<1OOFcXpBU1qE) z*YRZ|82VZfI4ewf&wgjs$cM`ok=(FXo zn{Cw*6O+_ghIL-R$>3b-C~o<67ApTPpX#w|% zd|Y(UdkO~OJb8ZHjT_Z_@ZGGUoV;QlHuluGzuGLL{Td(D3#gqHuQ+7+10R-6kYbk^ z2*ZJ!0v$D(mG|ieT**%8Rg>71cV}vIJ``%Nv!oi_B%@}*q5~qxxIVj6XX-{8+QN6> zYt4Y@GYyqvlNa|DIgoH7p2K{!1LySwnEA}o_pWlv14nuz!T%i&**ybbHcLri)EGA_ zrrqI<{@S%2Ng!Uw@r!eQ-Spq+kKYe4Z$KEYkd;D(+>gzplmZFj9Ee%iK->sqAwkBo z(hUTJO+%>`7QiF&@WLa;3H_l91I6;>IC7!0$;2v_F&i|+{Ta5}Tr^kh0JBIxf1u*T zPub-fWeeNPK~DQ3jkbxr!%;|zsiYD4GEN3wXSZ5h?XUh75ZIOE^|Fglhxj|sP@h{0 z4xdR9|MG(`J30@;gO(ro&MQOnarK{-(tn5BXYoaM4NE1ork!#Y9*75#J{QJIMcf${ zx7Q(Az;`xb2P#v|bdeHI-kgs`!FC?&ln!?VZu6jBN-dP+i{hC1b1DlRZ4f8ES28$s+9y z34^xEf0OrOei(5WA`!0JH$`)jj7N8MU*L{OnA^GuntPBRDf_*r`@Of{)gT}R--6-R zl(5Z%cy4OM&KUNyZy7J|{|*D}umOq}g>q5ouT=9!XPB4Q?@G|OtbW<9vI>mV2IrKH zhL16PDK=`<2-%#o)k{wj0+c7HBLh2^B;(U<<4W5hjXXp+JcK`hnCoQXu67uSapk`5256%;l!CB%7Dj%upwTSi{Vjcq&?6WzX^mXMiUumrmv zik*e)v8Uio5+x=V1viMZFsrgr4W!=KDr}&rth8$ffYynRXSE!^4Qsm4VCVs~Ri-3@ z@Ih)@IH+DND}{CTX25B4-E@89p}xg@(|_9Ccpy4>`2A(mR>kqNx(RI*p1dMp`iCx| zKhJH(UixX2o%);yoUz%j(mG8#^&*!u3m}3@Xx0kf0lbfT?Axt1&~Pq@sR@43#1fce z0MNFg#Z`WtUc0hwkQ=*FN9*^ZEIAuxM_<@;cm9a2^7|!1LGXWR_NL8=s4Zz_fqWAC z-e!MiS@xqAOM5;*R>L5Dzx{f_fzp7u_Q___lV)jnwXin4*X6lR|28DxrNS%&clm2of8Q`*&6u)8w8!5&Yn5wfop zTbvTe09$fQnb&1A_Qqe7r(@cIp83uqGa?&UGa|QU8^E)@%~^l^xwRout#v&If$|jr zNwWxWT#N1M{_0t9ITUC8lg9IR9-s=5{J+*v1-FW@USNvn2341=eo1wKft@M*p@jHG zZhq*_^6~E-LU8TfCE#s#eGRPQfQAt#$khC2OKLiB=F2t0_NRa<(|8m!WP}&}ULB*cCe07G~Q%}VZ;Ozdzc7^Mm|J%U=ti(atP34F!q8M3o%1`}x1-)TijwwR&lWB#4Z<5`AM=?VO*t&E6nDcZ ze}MivOBNs=dsDS0p+_`he0Volhb$xU>v>xfHv#a;W1{Qt6EDq&)U_*>o57?4$j`ib z5%SRY*)jiHWb>YFh=7zDW_d0V?+R~jpHWZhIegp*>0-z7J>Sqzn$Yj5;R}MEbaNp3 zQL~fdWzEtJAhR_hD7ifEfv>kdKWNXj029d2SaZ}$A6nUckfLQtXmDGm)q(tZ{$M4D zjn3-bBE+@p5YH|xoRzv)^VTzO%Q&)I%%RT5*MIh&5KQ^rmxmAtOi66bQN@{Wa`F`n zeh#c)pLsbv9@$*KwCi<3Wmz=Lb3DH&WBL~h4|AiVMm#oj% zR#V0T$4foIh@~jSBy^9RVlb((MxPOn6cg;Tv?zF1kMgOsf z&>yIYBdJvVV*q-+I4?@p@)DxgnL-<<`240cKzfJ>Ao8FzBGw-m&241IUgTrETn%VE z%0WO}BpMJ0tk=ta9<0U4KO`_o#Cm6gMXC8!SsDj?#c%M_FrFqU}Dw> zt+pS;N^IQ+J^N4Z~QdiTXT&ks?}k=fL1Mqs#n##TZ4s5^jsm zHH%X>Lh2H+w4;i@6nabshx34@SGBBE_VTB8i|`aRn-3Zp%X|84OMDj0^=A$rGUj_D z6fMskE$kad8hSS~=6{Z)fyX?ia%XSng%7+Wvjn;|}3(yW+D;kOWIqeh9=;E>$uC}?Dcw-%N;gKno z`3MVCrjKUQ%^pWSW@eupcnwXl@Y-&4W!mU51(s_&c!2i({wnr*C1}g_9qZlrzy=&& zcH4%pHCf?6z|~FM&V@yD5WOOyG8e^JzD>PnKBVo-JIjr(#EHXR>F$_XtAU@mqb6Qt zvj(y63WV^l@=E*GK1ZK?yY zMeOBq4l`s@1+OvPQon%$P7duWIB8yeuJ6E2M?wtYNyMO>-fq)HcnMaSpN3^^P*w53t0i_a@XWnme(SRa)@xQYP4maC1y+*jsjc~uTro5(U5 zHp*9lQW?5)62`c$eSP`q^-KkrU6<$S11?;5ah}t^;qckJBxCc@%?s+1Pz3i7hIWy# z9i_hd<@}xAHj8lW`nRv&;kKhS=GpkK`@C-WGH^i!Cf$?t5^i5lU16Y> zH&2KG=D9$2N-Ro8Rvkt#c%PeU(s|BsfmsDizi=jDpmcZfH!$Lyk^&h~2J%(oK0%P8 zc@KX^rPsZS^(a{uKBW}sXr_NU2OuDc|=La@z97L!K&v6MFPpEinMnXsk? zksfMXTi@M=im@BRznf>BZe5`o2n_OTH@k;n4KE+b5XI z6gboplS9pN<6o7OEPfQm4*c8hHr1x5**DcGVqHw0%&(*rKDXoEq^FEYz4d90Di~IG zL{ci%EHyFYnW~*M;`;>j*uXq39$$ybru+1>uo!_n-UO0Lg&!xRf|@5*O!%~Xi^=9G zcqlgwKB}3AWPAZzIpPRIry@h|JS~6_{?c^L*AmE9>GXPY|6EHLGE;OH6?KoDu zy7YuOcDN}$RaU-2n;&?=dvCB8Wiv^Ym_o?(i5=|N5*e>L5bw$Pr%7eC`xiBMA=m8` zS%vMQe_gU3KRh0sQ2H%A+UsQXAHL!&LEDs83}YhaCF_8-!px|r?hZra+9y1ukME+l ztrde&P1#U+DU3SnwvaGpa0BALz?_CbHs8gSFa{YABJe_$e-i=^E|iBAH3a3HRf*_4 z{tmI<%AuBQ{O3LF*yvZ~A-h1x6g;9YhdvA)hW*a~Rre^j8Bak!cMOM~JBuX>#IkKw zOse1H-ZZkr4f7@}3ug>AFagr9vIkrgsBTY<&nyo0XHsBuQvJ<_@mY4`b=L)vPG!D0 z@f)Yo?A999u&BmS`m*Fj${h_tg9du}q=%*k+T_=MdszhStRRrlt8eT&Yeab7bIO@D zP&Kq#3T6O@^10U{s=jybJ87flbd2PfJtS8@va2{7-W_W zm4Wr{h4tQQ<)%|b0h&1G&G)b77$re+p@{}WUk7I6%B+0g<(}Mx%TL$CKzYh8n1r}j zn9|))fLeRY2Bm8mP=0UE&6L9#GBUNpA1}?uDiZx-!R4PFRJ4u=Y_~kAM?7s_`h-!y z(Y=XL%F*38|CD1(&)_+|0Ouu8q^4QS0j(=#S3rT(ceX2`-U!7=8aEv%8c-^iZy&zx z%^->J_VuhrnZ z$`IykB~(gpR%Z;2&5U)1Bg3&U%7$=-ZIK3{r znaZ*P5*eDn2ZgaVTbvcQa%Tb;Yk~LkNkE}Mk#w>E*&@D2mfx&*YH0H)TYhj>_@e_ zM>qh{pF2RR3Qk7^<0PC(*pH+u5bXr)Na;N|2q)v(Vt7O)ROs7U*Tk5^m%+hMgi zViI}{k!xY<$SQ}Wz-?ZMjde9Z$$VM^_S>F6V+_1UYA3d$YNP5@(=X1SX|e}rezGiK zJupS}1_~ms3sYcF^ADSX)=77_hL)G&11R-^srJsvlT`)O z5}O_ju1k*0q+x!ID88Wpy_^W$4-(O$d1Y|=N5{K-pXMQDmIZmQkZvzCC?AdRe!VOaJmA=hC-$ zt$45ZozAiNyb`rCY-skz`D5Ci%wsgjERm-L^yGhb>hm=4A?I<-7wheIfa6u!eE|RG zWY2du$sW(5Q)|Eka;ar>bi~70(sBlkq%Ev9Q3WlMf3PKN>aK^&6=t;`bM3x({Mj)8rA zLuf@i$S8*6R1S$lu6-)aebT15+8#dv9Ef#i_^i)37;5kwFU{l-tJ;Czs`&4gaRz(i z5*x_dybhMO9VG55+p;_-jO>^_4m?c*QHre1XL<|fV=(gIPtA$r#eeVSHqc? z?aokHIif5w75eGa1DKGtao&{o-o5h&vGy;Yg4Sh_9q_bFo+laZX-wjO={4^GI6XlC z=9xalnzsy^OaHD4lARmq)SZZS7;bcV0<&A~c56Vf&wUhvxx}wapAZ}GFYAOe0FU8T zVvoQnm-L-1Q1R3~i^!|4A)_n&5-H{|NT5Tso=VR*LvcJx1_onaKYi3glK>%U4ncW# zNC!kwM|zSlz97LM+vI{a-Tm%VeF@b1r}wN{U#z!YK3UtFRMahScRKVgWcHq;1wTsJ z=9t0jwRfUr8F76&4A?x80S-{KFf;e>G9T1#79vNi-& za;w|y{~XI^20*;$tP8S%;%eYfPfSJ}7C?P=OyFE__J)i7cnDtY(8;$xZk~U2ht8$p z@^G&WXGk`ODJN6P>)7syz^RPQL5M#yycYi|An5iy_kJx~m$m9HZdciQ{Q*VK0{K;@0vB1=8L$yet2&YW>o4Pf$t40=K!Bu^dy;d39j^IBl39ogF=>F>b zo#5{LwQh{K_w?~g9_bAaUwx91e~?)tHyRLPTtZJ2a4~$s$p=4v$*4QBWtjU*zR;I< zx_nf~Nm6Iz09obS!^=6$97;NA_aj0U-_H21(KH+H^03<;JJ9kELTlu-DYUm19MK#Y zrSiQ3YV0I&AvoyJxSXJ4Zzz6FNm-`_mnd+K;3?FjeC3p&3qBE3@H8Y@WvnfN(3E=% z4)EO2O5X4+(;Sm`sHu+4#ZZ-!0au9W=wzp6@KpH)1s94@-am5 zhAh5)@k^s=dc0iJCoNgF7vPYka=g(c?9YMX)nuOAv2dmYK8W^?0}fy16RAAd+kE>h zZxn10Yj_rLL>)QlM8{nCX$=GRWfKpmBc9{*f%UYoyB<5_ zK>TBP9R=KY-95Z(YbUalYBd`9DyKWtSVEhIjmZj~Wd#KQ!U*R^I^ z*p3D?+!tl(GI zJZo1OqV#^zWo#C@!E+Cd_sch&+RT2XRajX$Z26{5jQZhlG0SD^_hH4ISVg?N5OvOb z#M5ebng65*&+>f1tmzXD-Q1b{w(e?W_`dXED<^G%Ta|;GWytN!ky6F$qGp?PxRpk|-Fe0vuEhMxQZjhiX;EybgwwXn(7xbg!(?Y(Gg;6e>s>=ovk%UYs2WEdz| zCddwDv;_u6q!W^B4hry+w#wA0iG3_0;4f(6;5H~J!RG82K*c2#g3#8xX7{!eyW?t zINkphnMcp;=S?^!vr?Ir_DU6n?y^E5Y0k809({PS@uuyH{QG}xLe*+e`0=n+;D)HU zmrizzhDvpLr{~Buz{s!iTSJYXd)L~$a!=8I^BMcn~acb28C{4FPkM;|E{G683#%SU+N3 zZ5LM8+R)e}-TCoT4ZUyQF!(ozrUqNJpvYZ`uM0d8K=^sMaqsT#_Rwg*xjK%OyK|hX zzRTCx_|e(4BBpz)u5B}(^HA)fB zZ9R|ccNgBl3pe-&@-}@c(<*N$mz{;xinxe%?O4oZW*YA{fdPq&3 zCIL2dyIu~KOZx!l%=C4T<|J&kqcEscU+B`SD!h7p%ZGllRE*!e2`|{)XHkGv&qDrS zo>=V!S}Wm^%R)ykje83U#&|*OwMdAoRPM2?bN8c-7BocQ=7#?B8oSfMFSWCRa_EMM z7AADQHV~>+PaVkO###q0yA>aB+uhm8epxQc^jr)~&$}m@``KaYa#?*7ek12%CQ_f&A3Zi1WS*+SYfVY1&j;SE&bYtmsz!&Y;5A9R z`J;thBTSzb4Bbqt+P8E9b;9c9fuEUt|ucs z(Qg!$-Cd<#;-@q0&u6NM&fD~JG;Nm)7X73Z*hT zWyGwrp?HCsdBJVB6BH56(^*b8iuQE2qh7A|Qqy=VUF-d-Vd@=9UYaV!hOmyb?aj0Iqqe2!^g-52sEJ?c;0a@c<_xoEW& z_U+STYm?&JSE6pxKI<<}v^=c}tNT$V<4QYZToT~KM_ubyBmnKsZZe2xrrOY0s$;x9 zD8QnFzdq*%ZO-NR06P|f^=Q8B7bK`pN-ur4dn#-ye){8h&ZA_WU0r98Nk=hSKRK}` zs3UHe zq0HGRoR8Z|7arYXWL(mbQ*S!q&rUWMAZo$PBpca$QPchQmt_fB7#6VQmAkr~wuj=y zBWl``s3d2vQn*~!oM|z+=G|=Hd!lhZvh*v6Cxm|FCtkmCAAGBo#}>`Jtqpg!QIkHF z1{&A*XN|sDJ_VhM@}UUEd9O9YX-q1=YWrtf`bKu#Whige8zXzMlmW6-v|mvU8(5@V z{BXRZm`Bx-jb!f6s1H}J;$5$*IpmL2nsIb*V} z!`^ji*%H%QxPadi-&3crHj83CoJ^W^ZTr2W4}lWmcJ4b=y!E1J&+|e!kdb%x{kNpL zv0YA-bB`-D@`uV?=@TvSU$%?`kh_@B!j&w}+I=|D8(=!$CHT5}QSk(u%yECl_MZ5@ zoT^ z8-*lae0_Z0!w{V*9n^_pzQ4tq!1q9Y#&4jM(z(0OlW>W%5&6wuA>VyO2#Di^gY~*R z_{hcSML{ypelw4iE}Av%m+$wY{=4E_jyw5USuH_}werr4;6qTKuR5eZRukZZXpTvXS@@6WUi9Nr4Qf{r`G zTp)sHg$hUUG#$`fEQG`?Ub+cCZ|@#1554Z27bRQ?@^pDV=c=v+4|V*TBZY7#hDoHN z{rD^4X!bgGY7sX}C(N*;pe4w-h5=)N=F5%+?gLL1fdES0dZTQL4e_Bcw)dV5j&|TD z-ivlf3A-b>cPocv6y$>Ap@z&yl9@rZ?x26zN$byY@1?mUehO3_EZGLCwLTYXiw*uF zTt=P!xw-$!yYHnDpW;MFRRJYgT-jmIrx<|d*55`215yFZXOzkXw+0L3lrZ*ASTvMw zUG_OvFxBLlCNfW|`?|i|`fF0<<(e?BNtrKP(8iZnDZ3=5&tznXZ<_-~{^5R7BO11^ zb`ty;-}u@tWa&kQc|<(X@W;3K8yck^#g{T_1}j8ArRTg}R2h9QzF+G)VO8OsU)NIa z#Ptbu7-he-v3qR*+`Rud=qeVdw?^GD$E1Id725x-4{7e_43NiNSL3@!R{n0FEiYDc zC>Ug3BqH;+#=du8YAa#`FSea-OYah)A!>0&TTy9mIiM2m{gxHd`6G!UoV+&;>NaL< zSmSK1E1O@)b3Soi@rAK*?GZJ2b9*_c6HFLy=gA~^9bnh5zn|op2K>JGp{%^aeI^+z z(c^uYKrnm&?EZ)vTq9I5ZNFNP-I`{|0bH*ptIV{vc>rxSR*QmADGj#Gx?P}PQ$m(@@>ZFQins=sejxTn@>McF!f_W0 zm)%AGyC|?fw3qpu1p^*~jM8gd5sG)NInMEf;10fuubD)zi112;=&TKfOO&PtgT_d; z{!@>}C9faL2^rd@9-N3B(r3P(2i+OgCLK3Vz5ky2yT=7#;ikaC7m=lnB*I&(`nu4~ zMpbS3w?}G9xWLPa-EFQWNGCvkfGFtrvg!9ON=}!>);igw&i5r=13rl#o4JHui+34$ zzW@J(PyFZX&&G*Z^a*XDHX3RyB|y|oBsm5<&PFDHes<)kUWmo)>bL#T9OCA(m|K_T}dYUEIdQ;6s%Uq=Wmul^dA6SZT9)sg^ z;+jY~TX12kIv4UklX#|LSTr}N-z&i4%Hl6(#~ZdfZG;;+2RE{FC8N=o zm#^YHmwnlWK~_+u%FO;6_BxWQAgeRKJN^RaxC9q97C3Pd{*)!TFV zTzmvzS@o#{p*P@6I39l<(aWuEhve~*FQ(%-u)Wy`L_Z_vQoU)12m>c90kFyhAcJ1o zLDB?OSy>}0PLBIXv{-!T=K39AYqsXp%q7T1)#@LWy$jvnbAxM{dh$%Et%ba$ zp$0bYT3$KuhM;0bmta8p=n@m6m-;=|2A!&%_-K9b6$TYa-=nkhxG!qEKg|DvsEjo- zuGLr4?v7$m6!9&;-pU-qc)_jBRJ$&66~|x0;Ye_6!>g%394b{-mP)UP3#3&%X_L)I z-Ik!zOJDlgv2eAdiCVatQm$v2PUthKDX*vI(&``L`z0g}N|~)WTkdg1)>f#0@eBK+Y#sV>`L-kHhZwg7|k z9o{0}1e7x2A)Lqye+U+s#Pp;yUSIyUWb#`28m?oYnj~JN(=&5HJH|LGp51cfAyk7J z3>6@s@JdDc><-6lm9d#KQQWk>)&Eh0W!vTCZ+AEIRlt}y(`Hz*a!JB&O&Q7;F|*OI z+WG0lC%$k9jHcfIk`z-}wqjRG>5TFZkH`s1E2g;orAL{zW4WM~XBWil6)v-}OvVT+ z7bDF@+#8qUH^vm>k$PYmAGih=rK;})jD^?3S_+f=X zc#Z6ncQ}DMFmZa-3IcWO;?Zj(G5oUe@iQr5sPC7j77U8 zubhy2ARaaEcQ6LW(@xu~wCvH|Dbir)ex;DZSARUoo+seMXr+Jhu=*T!y!l1rCF$3n zb*-+C@BP0_0Qj8!cxxM^=r1Ep@&iwpWX;eu0=OGmCvYn&~D*n-URpEEE(52)r=L$%1 zEfxLb*5Ue}pSbf^4R(?fqOYqZAnbUfb9dVE%LE7Ca9x|4-!B0Axzt8}oWf#XDjaFt zh<~%tv9KCj)v>TkPgcm|KbW1<{W1D{sc|qkIgd0*bsx=5w+9Ws5 z0wf$&(~#9Su2roU9vmj>;NO_V+uVf@S+V#-5^*-7Vk<{6w1kkWD+a~P;R$olTt2n- ziSaYmtFYF(_r>WyPN_L0E|nt(OH{tLM%V#fDis5lSM2&)Xe1s<_conS>t6*y@hDXXV5BBM(?q{B zn0(!?5$0bp?XXwe*C@ia6?>8196sURECJYg%DARKEATSN8vzsMMAx+9Apr6mVPu^` zy~!*c|ECuSN#Hl`gU5s1xR+^p0R-!EVQ*hvGE!1@&sVp9=7-|i1(Tg+;OojeiM@}^ zpEl)Db)c?vHm2=~wgx*_do$^p^!GG0^L7fYcA$kKyXDciLmhc`G(5CfI7lr|G)*;D zO3nKusA!q`h>@@x{|5ITwmvPIBA;rt4Y=AMAFGZ=ujisc&DokY6Oz_zhlMfYGpooBzH_j8fCy!(N^)P~P8OykC#R z7Tv?#W~(%WLzOseBtxK@U?LUw$FyMCNNGbKr;(CQ`!g z)U?j_W$po=v5+DhgBV`VabI(7gA{0+Qbl35cCH`Aq_u%_$G=(7uiiV{raRQq*31oJ za(goI?e*(Zd?8@Lt|!HvnG!hlEWczfoafXVT>MG1_1kY~C2e@-ZH_5aIv>|l9c=nr zRUVbJ1N{>0)PMAJRYnJsAJ@LCstzc}&u5%D4@CuT6`&O5h!(ZaEiep7<*k$da?0?? zxE^2>VfLXLm>uepZCuVhG}a=#E!kWHTd8i@|2*HmneP(w4YKW2q=lWi7niKk+FG(< zx*^uiv7v&P|q#{lv<}+ z)xIDjAU2(e->Se23P2~TB%{Q5Y)t{h^ZsFj1y@Ccq=2GOBvFS`Rr74|<6euFrGrqI z-f<<0hrVsBN-R0A@~(CEbMKv?^H0g=<64S<0WMJK^7|y+dpA~yZijW^V&Cq_cHVrk zX1~wN+#?!Um0;)@$)0-VcLa0!12yW)whIzT6D3Nh?75Rff{5zRRbs=d#STh=kf?wJ zqzny1%jxhVy#vh@?z*oz;CC}7i94k@YEg2fNfnVWb?#A<8ywf?YlO0Ndz3CxeqY}H zKiy5Y7INK29eAom&Xw+lX?Wx~7bChEF-(@Nzba2P-&)+?o`}onQ+hQ0pI&b*B#J=1~53Z{p<^dUhh7zC`*{0;+9KfmC{zLRb-wm|F+(B zO^NV%uO5ORh=^Eb3+P+B{A2A-q3Ve{B+zZK1f&6c`GGT@Nd)2M5a3P;1xGl@ZZ-A; zxUVZt_s0D;k^06VN!#GI4)C#V=&~!}>ZD{7aChz92=9g*Kuug6A?^;5O9swO!rsHa zx%&Bje*cN8DvrW&g>Nu2JI+sH0Z}Sp)98A27vSCB^|S96+ogU7?H8&e@T_oO4@ zMY|Ti$E4orMYq8UOb=2>`Gwr)G2^DGe(OO>3h+?f0x_j(Yp73H2EtQmmfKAfhFjW0 zJMbg3Jr&Zy+u}>0BK59uQv;;wTN)7BMJ>@G`CBs=Jjhks{@HZNoH9QO@{+3@5Pimx zYUH-9GXdY6C=4!eDjNE?!zOrjP}!f^PMDN2VsDtdJN|@JGr4S|Hp@(`D(VI=m_X79 z-$#8mTk^6SZT4HC$VB9C{!P3q0LQ4y;lz0%8xnz=?VU7DPlf^iYZOQb3-4MV^Gzbm z&V4|>$%1v~l@%^4TTK~p#{^ZdDUGO8cd2Hw-y=ZQsKnOs0F6`dtVTzNG0~`RZD~D9 zOvSlOALQiNrED5^sCW?Ibp+zmWD(vhc3ca={VG_tmuB{(gy<|=tY(%J`NLN1Qx8bf zF(`$(Rc19z@~+I-tAy_pTQ-zO)SQ+o#c3J^h|MKGY?{iYgnJq*On&gSwLuhr$C($7 zF0@`vX2t0jb?^$8Cn5YS(_^J)ftNMp6MC;BY5H6(zq)nMtxIcv7PRXGfuMkEg&Rj= z4$4}VJW4x23rqPUFSp6=%(V5m0z22ro(zm)nFRv^h3ZD)9;vt8@C)1OH_8aZWVn(L zp?&ZIWJM!;4YK`gavXtleQ$gO-#|bD{!tPc8h0Tg42QTueaWMd-Xh$X!IXO>`{i-Unr9aU!eD@!niLn5k zdFxHF;>(>Yv8D2$UvSVVlg@&9CW6-pUtv_WuSA#2C*fPJb2)Tm;f?ud_vH_}cf#+b zfao$;PMf;QWq$~6mBtMKnDmvL*SSmwY>wBea+VE7iVN*6r?scp^t2ACtzvV$$FABN zxfH$)|E#EFPVF<A85a;F>8;SGHjf|zG;cuRd`K9-TdI5`*@6(BMNzHoQ3yfbF;=*E{ z9g#7)R7hmBc@pOahR3_Rm!=!_PGSCGEG{PLF(wwso{mSnJkNV$96i09wqJI4lfA=%-jsoYKl1yc(OjFmsq|{U#}*CZfjeELC1;C2)pE#qHx`xok15Xoluh};o161u^V)+J z!ohtfTh3W!B%PDO9O>U<8M5=FLGbmSriZUfYm085vbp@MgEYPKR2$ajN&M?`PHJic2Ktvwl&Emz5~aFWKJ_6z&LFOsqSr>)y=HQQbu1 z7?4upsnD|(IQ~jc($A?c;e}rElV+8%gl%)O*T+J0_B(bK988(sVHgzBtr6R}^zg!? zS2h>)own~DSWjsyaC^})yy5WXu4#$ybfpb`HlZ)IZTtDnaGmlIy$i#JC3IFdzedqeI;U$W6iG^|wR znlk)>iXP({;n-X9Jno3@`QyDAY}Z!}>TMo4_OAy?0*}^542v!@pbR z*)QB>+P8ZhKZ?=X*S5^QS|i>NMl~$`wMXRV7EMH5z$;?` zEShZ_>R*U03lw&Bg*q4GM4^QKeXT2hXJh2);p61-e^wG7Qdy8%91BYL0p6$vYz;L~ z{t8s?11zJtQ4A;pW}Wz=)SO~{JrIem(QD3ql?$x7 zxTG>CwHTYnQ9HlZXVH8)isOd4Wy!k15WO-@D(4C4QR5s2&phNUWSuNP;erj``zgDE3yrreA_ z{@ryVP`w~Cnklm3SWUs|7Sy^L*)cO-Ffd@$+~^U3THYdS7Y5!c3D*uSeFMB%f#C*9 PaNG>Q!wwmKz6J3BPQogi literal 0 HcmV?d00001 diff --git a/twe_close/genDatabase.txt b/twe_close/genDatabase.txt new file mode 100644 index 00000000..53d935c9 --- /dev/null +++ b/twe_close/genDatabase.txt @@ -0,0 +1,684 @@ +상성 이름 사진 국가 도시 통 무 지 급 출생 사망 꿈 특기 + 1, "소제1",1001, 0, "낙양", 20, 11, 48, 0, 168, 190, "유지", "-"); $gencount++; + 1, "헌제",1002, 0, "낙양", 17, 13, 61, 0, 170, 250, "안전", "-", "한 왕조는 이대로 끝나는 것인가..."); $gencount++; +999, "사마휘",1003, 0, "양양", 71, 11, 96, 0, 173, 234, "은둔", "신산", "좋지, 좋아~"); $gencount++; +999, "우길",1004, 0, "업", 17, 13, 83, 0, 131, 200, "은둔", "신산"); $gencount++; +999, "화타",1005, 0, "낙양", 53, 25, 70, 0, 151, 220, "은둔", "의술", "아픈 사람들은 모두 내게 오시오. 껄껄껄."); $gencount++; +999, "길평",1006, 0, "허창", 27, 15, 72, 0, 158, 200, "은둔", "의술"); $gencount++; + + 29, "가규",1007, 0, "낙양", 55, 55, 74, 0, 177, 231, "재간", "-"); $gencount++; +136, "가범",1008, 0, "낙양", 58, 48, 73, 0, 202, 237, "유지", "-"); $gencount++; + 49, "가비능",1009, 0, "낙양", 58, 83, 32, 0, 172, 235, "정복", "-"); $gencount++; + 31, "가충",1010, 0, "낙양", 50, 25, 87, 0, 217, 282, "출세", "-"); $gencount++; + 20, "가후",1011, 0, "낙양", 69, 30, 94, 0, 147, 223, "할거", "귀병"); $gencount++; + 73, "간옹",1012, 0, "낙양", 31, 33, 70, 0, 164, 225, "안전", "경작"); $gencount++; +129, "감녕",1013, 0, "낙양", 78, 95, 71, 0, 174, 222, "출세", "무쌍"); $gencount++; +127, "감택",1014, 0, "낙양", 62, 44, 79, 0, 182, 243, "유지", "-"); $gencount++; + 60, "강단",1015, 0, "낙양", 41, 73, 43, 0, 168, 230, "재간", "-"); $gencount++; + 73, "강유",1016, 0, "낙양", 95, 90, 94, 0, 202, 264, "왕좌", "집중"); $gencount++; +102, "고간",1017, 0, "낙양", 60, 57, 51, 0, 168, 206, "유지", "-"); $gencount++; + 27, "고람",1018, 0, "낙양", 72, 67, 59, 0, 159, 201, "출세", "기병"); $gencount++; + 69, "고상",1019, 0, "낙양", 41, 40, 38, 0, 194, 252, "재간", "-"); $gencount++; +144, "고순",1020, 0, "낙양", 79, 82, 65, 0, 162, 198, "의협", "기병"); $gencount++; + 7, "고승",1021, 0, "낙양", 42, 73, 24, 0, 145, 185, "출세", "-"); $gencount++; +120, "고옹",1022, 0, "낙양", 57, 21, 79, 0, 168, 243, "출세", "-"); $gencount++; + 63, "고정",1023, 0, "낙양", 67, 65, 55, 0, 190, 251, "정복", "-"); $gencount++; + 53, "고패",1024, 0, "낙양", 53, 56, 28, 0, 170, 212, "유지", "-"); $gencount++; + 74, "공도",1025, 0, "낙양", 26, 73, 19, 0, 164, 200, "재간", "-"); $gencount++; +142, "공손강",1026, 0, "낙양", 64, 72, 61, 0, 172, 210, "정복", "-"); $gencount++; +142, "공손공",1027, 0, "낙양", 68, 41, 75, 0, 174, 238, "정복", "-"); $gencount++; +142, "공손도",1028, 0, "낙양", 62, 72, 41, 0, 154, 204, "정복", "기병"); $gencount++; + 65, "공손범",1029, 0, "낙양", 61, 67, 61, 0, 158, 199, "출세", "-"); $gencount++; + 65, "공손속",1030, 0, "낙양", 60, 76, 41, 0, 176, 199, "정복", "-"); $gencount++; + 10, "공손연",1031, 0, "낙양", 74, 79, 64, 0, 205, 238, "패권", "돌격"); $gencount++; + 65, "공손월",1032, 0, "낙양", 47, 63, 46, 0, 160, 192, "정복", "-"); $gencount++; + 65, "공손찬",1033, 0, "낙양", 61, 87, 67, 0, 152, 199, "패권", "기병"); $gencount++; + 43, "공융",1034, 0, "낙양", 63, 48, 85, 0, 153, 208, "왕좌", "경작"); $gencount++; + 35, "공주",1035, 0, "낙양", 64, 35, 78, 0, 151, 194, "재간", "-"); $gencount++; + 83, "공지",1036, 0, "낙양", 57, 54, 64, 0, 178, 242, "대의", "-"); $gencount++; + 26, "곽가",1037, 0, "낙양", 47, 23, 99, 0, 170, 207, "패권", "귀모"); $gencount++; +111, "곽도",1038, 0, "낙양", 63, 67, 81, 0, 155, 205, "재간", "-"); $gencount++; + 2, "곽사",1039, 0, "낙양", 58, 67, 31, 0, 146, 197, "패권", "-"); $gencount++; + 80, "곽유지",1040, 0, "낙양", 37, 22, 71, 0, 190, 259, "재간", "상재"); $gencount++; + 67, "곽익",1041, 0, "낙양", 67, 60, 67, 0, 207, 270, "재간", "-"); $gencount++; + 67, "곽준",1042, 0, "낙양", 76, 69, 73, 0, 178, 217, "출세", "-"); $gencount++; + 27, "곽혁",1043, 0, "낙양", 40, 29, 80, 0, 187, 228, "안전", "-"); $gencount++; + 20, "곽회",1044, 0, "낙양", 77, 75, 71, 0, 187, 255, "정복", "-"); $gencount++; + 39, "관구검",1045, 0, "낙양", 72, 68, 77, 0, 202, 255, "대의", "-"); $gencount++; + 76, "관색",1046, 0, "낙양", 69, 85, 67, 0, 200, 239, "의협", "징병"); $gencount++; + 76, "관우",1047, 0, "낙양", 96, 98, 80, 0, 162, 219, "의협", "위압"); $gencount++; + 76, "관이",1048, 0, "낙양", 48, 60, 58, 0, 219, 263, "안전", "-"); $gencount++; + 76, "관통",1049, 0, "낙양", 49, 63, 60, 0, 218, 259, "대의", "-"); $gencount++; + 76, "관평",1050, 0, "낙양", 77, 80, 70, 0, 186, 219, "의협", "보병"); $gencount++; + 7, "관해",1051, 0, "낙양", 66, 90, 35, 0, 160, 193, "출세", "-"); $gencount++; + 76, "관흥",1052, 0, "낙양", 69, 84, 72, 0, 199, 234, "의협", "돌격"); $gencount++; + 40, "괴량",1053, 0, "낙양", 41, 28, 81, 0, 155, 204, "안전", "신중"); $gencount++; + 40, "괴월",1054, 0, "낙양", 26, 30, 84, 0, 157, 214, "유지", "귀병"); $gencount++; + 98, "교모",1055, 0, "낙양", 59, 58, 61, 0, 150, 191, "안전", "-"); $gencount++; + 98, "교현",1056, 0, "낙양", 50, 18, 60, 0, 158, 210, "재간", "-"); $gencount++; + 6, "구역거",1057, 0, "낙양", 51, 72, 49, 0, 152, 193, "안전", "-"); $gencount++; + 80, "극정",1058, 0, "낙양", 38, 25, 75, 0, 208, 278, "유지", "-"); $gencount++; + 46, "금선",1059, 0, "낙양", 55, 49, 36, 0, 155, 208, "할거", "-"); $gencount++; + 62, "금환삼결",1060, 0, "낙양", 46, 76, 17, 0, 192, 225, "출세", "-"); $gencount++; +141, "기령",1061, 0, "낙양", 76, 81, 33, 0, 155, 199, "대의", "무쌍"); $gencount++; +122, "낙통",1062, 0, "낙양", 57, 44, 69, 0, 193, 228, "유지", "-"); $gencount++; +124, "노숙1",1063, 0, "낙양", 90, 42, 94, 0, 172, 217, "왕좌", "상재"); $gencount++; + 75, "노식",1064, 0, "낙양", 91, 54, 80, 0, 139, 192, "왕좌", "징병"); $gencount++; + 59, "뇌동",1065, 0, "낙양", 70, 77, 45, 0, 172, 218, "출세", "궁병"); $gencount++; +142, "뇌박",1066, 0, "낙양", 54, 54, 33, 0, 157, 206, "유지", "-"); $gencount++; +127, "능조",1067, 0, "낙양", 67, 80, 44, 0, 165, 203, "재간", "공성"); $gencount++; +127, "능통",1068, 0, "낙양", 71, 78, 58, 0, 189, 237, "의협", "궁병"); $gencount++; + 64, "단경",1069, 0, "낙양", 68, 61, 68, 0, 156, 199, "정복", "-"); $gencount++; +132, "담웅",1070, 0, "낙양", 52, 77, 19, 0, 188, 221, "출세", "-"); $gencount++; + 99, "답둔",1071, 0, "낙양", 59, 71, 31, 0, 158, 207, "유지", "-"); $gencount++; +132, "당자",1072, 0, "낙양", 59, 56, 45, 0, 196, 265, "안전", "-"); $gencount++; + 60, "대래동주",1073, 0, "낙양", 40, 65, 24, 0, 195, 249, "안전", "-"); $gencount++; + 82, "도겸",1074, 0, "낙양", 51, 32, 61, 0, 132, 194, "할거", "인덕"); $gencount++; +120, "도준",1075, 0, "낙양", 64, 57, 50, 0, 238, 285, "안전", "-"); $gencount++; + 73, "동궐",1076, 0, "낙양", 66, 50, 76, 0, 204, 271, "대의", "-"); $gencount++; + 62, "동다나",1077, 0, "낙양", 51, 71, 27, 0, 189, 225, "유지", "-"); $gencount++; + 2, "동민",1078, 0, "낙양", 52, 65, 49, 0, 149, 192, "안전", "-"); $gencount++; + 21, "동소",1079, 0, "낙양", 46, 46, 62, 0, 156, 236, "패권", "-"); $gencount++; +127, "동습",1080, 0, "낙양", 53, 64, 32, 0, 169, 215, "출세", "-"); $gencount++; + 89, "동승",1081, 0, "낙양", 75, 66, 65, 0, 154, 200, "왕좌", "-"); $gencount++; + 78, "동윤",1082, 0, "낙양", 64, 26, 78, 0, 192, 246, "왕좌", "-"); $gencount++; + 2, "동탁",1083, 0, "낙양", 87, 91, 54, 0, 139, 192, "패권", "기병"); $gencount++; + 66, "동화",1084, 0, "낙양", 48, 64, 53, 0, 168, 219, "대의", "-"); $gencount++; + 32, "두예",1085, 0, "낙양", 88, 80, 84, 0, 222, 284, "정복", "-"); $gencount++; + 7, "등무",1086, 0, "낙양", 43, 74, 19, 0, 147, 185, "정복", "-"); $gencount++; + 41, "등애",1087, 0, "낙양", 94, 82, 92, 0, 197, 264, "패권", "신산"); $gencount++; +116, "등윤",1088, 0, "낙양", 34, 42, 68, 0, 194, 256, "안전", "-"); $gencount++; + 73, "등지",1089, 0, "낙양", 74, 51, 80, 0, 182, 251, "할거", "경작"); $gencount++; + 41, "등충",1090, 0, "낙양", 60, 82, 55, 0, 230, 264, "출세", "-"); $gencount++; + 54, "등현",1091, 0, "낙양", 65, 59, 61, 0, 188, 248, "출세", "-"); $gencount++; + 29, "마균",1092, 0, "낙양", 33, 38, 80, 0, 200, 259, "안전", "-"); $gencount++; + 71, "마대",1093, 0, "낙양", 77, 79, 49, 0, 183, 246, "대의", "기병"); $gencount++; + 70, "마등",1094, 0, "낙양", 80, 87, 56, 0, 149, 211, "왕좌", "기병"); $gencount++; + 80, "마속",1095, 0, "낙양", 73, 64, 82, 0, 190, 228, "패권", "집중"); $gencount++; + 77, "마량",1096, 0, "낙양", 57, 25, 87, 0, 187, 225, "왕좌", "-"); $gencount++; + 48, "마완",1097, 0, "낙양", 49, 64, 26, 0, 170, 211, "안전", "기병"); $gencount++; + 19, "마준",1098, 0, "낙양", 45, 63, 62, 0, 196, 260, "안전", "-"); $gencount++; + 71, "마철",1099, 0, "낙양", 71, 60, 31, 0, 179, 211, "대의", "기병"); $gencount++; + 70, "마초",1100, 0, "낙양", 78, 97, 40, 0, 176, 226, "대의", "기병"); $gencount++; +131, "마충1",1101, 0, "낙양", 67, 62, 51, 0, 186, 222, "재간", "-"); $gencount++; + 69, "마충2",1102, 0, "낙양", 61, 68, 51, 0, 187, 249, "출세", "-"); $gencount++; + 71, "마휴",1103, 0, "낙양", 71, 60, 32, 0, 178, 211, "대의", "기병"); $gencount++; +116, "만총",1104, 0, "낙양", 79, 40, 78, 0, 170, 242, "할거", "신중"); $gencount++; + 51, "망아장",1105, 0, "낙양", 29, 64, 20, 0, 191, 225, "출세", "-"); $gencount++; + 44, "맹달",1106, 0, "낙양", 70, 66, 72, 0, 172, 228, "할거", "귀병"); $gencount++; + 60, "맹우",1107, 0, "낙양", 63, 79, 26, 0, 190, 251, "정복", "-"); $gencount++; + 60, "맹획",1108, 0, "낙양", 78, 92, 50, 0, 186, 245, "왕좌", "격노"); $gencount++; + 29, "모개",1109, 0, "낙양", 46, 56, 56, 0, 161, 216, "대의", "-"); $gencount++; + 51, "목록대왕",1110, 0, "낙양", 58, 71, 65, 0, 184, 225, "재간", "척사"); $gencount++; + 96, "목순",1111, 0, "낙양", 17, 21, 68, 0, 157, 191, "왕좌", "-"); $gencount++; + 43, "무안국",1112, 0, "낙양", 51, 73, 18, 0, 156, 191, "재간", "-"); $gencount++; + 28, "문빙",1113, 0, "낙양", 70, 77, 43, 0, 178, 237, "유지", "-"); $gencount++; + 38, "문앙",1114, 0, "낙양", 71, 91, 46, 0, 222, 285, "대의", "-"); $gencount++; +102, "문추",1115, 0, "낙양", 72, 94, 25, 0, 161, 200, "출세", "무쌍"); $gencount++; + 38, "문흠",1116, 0, "낙양", 76, 77, 43, 0, 200, 258, "대의", "-"); $gencount++; + 49, "미당대왕",1117, 0, "낙양", 64, 75, 32, 0, 202, 260, "유지", "-"); $gencount++; +108, "미방",1118, 0, "낙양", 58, 65, 37, 0, 169, 222, "패권", "징병"); $gencount++; + 77, "미축",1119, 0, "낙양", 26, 30, 65, 0, 165, 220, "왕좌", "상재"); $gencount++; + 94, "반봉",1120, 0, "낙양", 61, 75, 17, 0, 155, 191, "출세", "-"); $gencount++; + 44, "반준",1121, 0, "낙양", 41, 21, 67, 0, 174, 239, "안전", "-"); $gencount++; + 65, "방덕",1122, 0, "낙양", 76, 90, 67, 0, 170, 219, "의협", "기병"); $gencount++; + 73, "방통",1123, 0, "낙양", 86, 41, 97, 0, 179, 214, "패권", "반계"); $gencount++; + 65, "방회",1124, 0, "낙양", 25, 33, 59, 0, 205, 272, "안전", "-"); $gencount++; + 68, "배원소",1125, 0, "낙양", 45, 69, 33, 0, 169, 200, "재간", "-"); $gencount++; + 78, "번건",1126, 0, "낙양", 28, 31, 68, 0, 205, 270, "대의", "-"); $gencount++; +149, "번주",1127, 0, "낙양", 67, 77, 21, 0, 149, 192, "할거", "-"); $gencount++; + 72, "법정",1128, 0, "낙양", 81, 29, 93, 0, 176, 220, "패권", "신산"); $gencount++; + 8, "변희",1129, 0, "낙양", 65, 65, 27, 0, 169, 200, "안전", "-"); $gencount++; +121, "보질",1130, 0, "낙양", 58, 28, 77, 0, 177, 247, "유지", "-"); $gencount++; +113, "복양흥",1131, 0, "낙양", 58, 51, 71, 0, 224, 264, "유지", "-"); $gencount++; +110, "봉기",1132, 0, "낙양", 68, 52, 80, 0, 153, 202, "패권", "집중"); $gencount++; + 74, "부동",1133, 0, "낙양", 58, 69, 69, 0, 183, 222, "대의", "-"); $gencount++; +108, "부사인",1134, 0, "낙양", 54, 59, 51, 0, 182, 222, "출세", "-"); $gencount++; + 38, "부손",1135, 0, "낙양", 24, 43, 68, 0, 162, 230, "안전", "-"); $gencount++; + 74, "부첨",1136, 0, "낙양", 61, 74, 45, 0, 216, 263, "대의", "-"); $gencount++; + 66, "비시",1137, 0, "낙양", 18, 36, 61, 0, 176, 240, "재간", "-"); $gencount++; +141, "비연",1138, 0, "낙양", 66, 65, 53, 0, 196, 238, "출세", "-"); $gencount++; + 77, "비위",1139, 0, "낙양", 72, 26, 73, 0, 193, 253, "대의", "-"); $gencount++; +144, "사광",1140, 0, "낙양", 57, 49, 66, 0, 175, 235, "안전", "-"); $gencount++; + 71, "사마가",1141, 0, "낙양", 61, 85, 18, 0, 167, 222, "정복", "돌격"); $gencount++; + 20, "사마랑",1142, 0, "낙양", 25, 32, 63, 0, 171, 217, "대의", "-"); $gencount++; + 24, "사마망",1143, 0, "낙양", 71, 61, 65, 0, 205, 271, "정복", "-"); $gencount++; + 24, "사마부",1144, 0, "낙양", 55, 31, 73, 0, 180, 272, "대의", "-"); $gencount++; + 31, "사마사",1145, 0, "낙양", 87, 64, 91, 0, 208, 255, "정복", "-"); $gencount++; + 31, "사마소",1146, 0, "낙양", 93, 63, 84, 0, 211, 265, "정복", "-"); $gencount++; + 31, "사마염",1147, 0, "낙양", 92, 78, 72, 0, 236, 290, "패권", "-"); $gencount++; + 30, "사마유",1148, 0, "낙양", 62, 45, 79, 0, 248, 283, "왕좌", "-"); $gencount++; + 31, "사마의",1149, 0, "낙양", 98, 67, 98, 0, 179, 251, "패권", "반계"); $gencount++; +139, "사섭",1150, 0, "낙양", 63, 61, 71, 0, 137, 226, "안전", "-"); $gencount++; +139, "사일",1151, 0, "낙양", 59, 44, 68, 0, 153, 230, "유지", "-"); $gencount++; +132, "사정",1152, 0, "낙양", 67, 71, 20, 0, 178, 221, "안전", "-"); $gencount++; +146, "사지",1153, 0, "낙양", 61, 49, 70, 0, 163, 227, "안전", "-"); $gencount++; +144, "사휘",1154, 0, "낙양", 67, 71, 61, 0, 165, 227, "유지", "-"); $gencount++; + 35, "서막",1155, 0, "낙양", 56, 41, 72, 0, 171, 249, "유지", "-"); $gencount++; + 76, "서서",1156, 0, "낙양", 90, 70, 96, 0, 178, 232, "의협", "귀병"); $gencount++; +124, "서성",1157, 0, "낙양", 83, 76, 83, 0, 177, 234, "대의", "-"); $gencount++; +142, "서영",1158, 0, "낙양", 47, 63, 33, 0, 147, 191, "안전", "-"); $gencount++; + 23, "서질",1159, 0, "낙양", 55, 73, 34, 0, 207, 253, "재간", "-"); $gencount++; + 23, "서황",1160, 0, "낙양", 79, 89, 68, 0, 165, 228, "의협", "필살"); $gencount++; + 32, "석포",1161, 0, "낙양", 71, 63, 59, 0, 214, 272, "정복", "-"); $gencount++; +131, "설영",1162, 0, "낙양", 46, 23, 64, 0, 223, 282, "유지", "-"); $gencount++; +128, "설종",1163, 0, "낙양", 27, 33, 67, 0, 187, 243, "유지", "-"); $gencount++; + 69, "성의",1164, 0, "낙양", 45, 64, 22, 0, 168, 211, "재간", "-"); $gencount++; +129, "소비",1165, 0, "낙양", 67, 63, 49, 0, 172, 221, "대의", "-"); $gencount++; + 76, "손건",1166, 0, "낙양", 42, 33, 73, 0, 165, 215, "대의", "거상"); $gencount++; +125, "손견",1167, 0, "낙양", 96, 95, 76, 0, 156, 192, "왕좌", "무쌍"); $gencount++; +126, "손광",1168, 0, "낙양", 63, 54, 58, 0, 186, 207, "유지", "-"); $gencount++; +125, "손권",1169, 0, "낙양", 90, 77, 83, 0, 182, 252, "할거", "수비"); $gencount++; +126, "손랑",1170, 0, "낙양", 27, 54, 28, 0, 187, 226, "안전", "-"); $gencount++; +126, "손등",1171, 0, "낙양", 52, 39, 77, 0, 209, 241, "할거", "-"); $gencount++; +125, "손량",1172, 0, "낙양", 24, 23, 79, 0, 243, 260, "할거", "-"); $gencount++; + 20, "손례",1173, 0, "낙양", 64, 64, 69, 0, 180, 250, "안전", "-"); $gencount++; +124, "손소",1174, 0, "낙양", 76, 80, 68, 0, 188, 241, "정복", "-"); $gencount++; +130, "손수",1175, 0, "낙양", 67, 57, 59, 0, 235, 299, "안전", "-"); $gencount++; +126, "손유",1176, 0, "낙양", 77, 60, 67, 0, 177, 215, "정복", "-"); $gencount++; +122, "손이",1177, 0, "낙양", 57, 62, 57, 0, 223, 272, "안전", "-"); $gencount++; +126, "손정",1178, 0, "낙양", 59, 56, 62, 0, 160, 206, "유지", "-"); $gencount++; +115, "손준",1179, 0, "낙양", 59, 69, 51, 0, 219, 256, "정복", "-"); $gencount++; + 7, "손중",1180, 0, "낙양", 53, 63, 24, 0, 154, 185, "안전", "-"); $gencount++; +125, "손책",1181, 0, "낙양", 96, 96, 78, 0, 175, 200, "패권", "필살"); $gencount++; +115, "손침",1182, 0, "낙양", 49, 71, 40, 0, 231, 258, "패권", "-"); $gencount++; +114, "손호",1183, 0, "낙양", 20, 78, 67, 0, 242, 284, "패권", "-"); $gencount++; +126, "손화",1184, 0, "낙양", 35, 25, 71, 0, 224, 253, "왕좌", "-"); $gencount++; +127, "손환",1185, 0, "낙양", 79, 65, 70, 0, 197, 228, "정복", "-"); $gencount++; +126, "손휴",1186, 0, "낙양", 63, 43, 64, 0, 235, 264, "정복", "-"); $gencount++; +117, "손흠",1187, 0, "낙양", 66, 63, 33, 0, 235, 280, "정복", "-"); $gencount++; +147, "송헌",1188, 0, "낙양", 42, 63, 41, 0, 157, 200, "안전", "-"); $gencount++; + 95, "순우경",1189, 0, "낙양", 72, 67, 60, 0, 146, 200, "할거", "-"); $gencount++; + 22, "순욱1",1190, 0, "낙양", 54, 29, 97, 0, 163, 212, "왕좌", "집중"); $gencount++; + 22, "순유",1191, 0, "낙양", 73, 41, 90, 0, 157, 214, "대의", "신중"); $gencount++; + 29, "신비",1192, 0, "낙양", 47, 28, 74, 0, 171, 240, "재간", "-"); $gencount++; + 37, "신의",1193, 0, "낙양", 55, 61, 51, 0, 190, 252, "출세", "-"); $gencount++; + 37, "신탐",1194, 0, "낙양", 56, 58, 57, 0, 188, 254, "출세", "-"); $gencount++; + 85, "신평",1195, 0, "낙양", 68, 51, 75, 0, 165, 204, "왕좌", "-"); $gencount++; +102, "심배",1196, 0, "낙양", 75, 66, 68, 0, 156, 204, "패권", "귀병"); $gencount++; +126, "심영",1197, 0, "낙양", 53, 72, 51, 0, 235, 280, "재간", "-"); $gencount++; + 47, "아하소과",1198, 0, "낙양", 53, 75, 15, 0, 204, 253, "안전", "척사"); $gencount++; + 62, "아회남",1199, 0, "낙양", 50, 74, 30, 0, 190, 225, "출세", "척사"); $gencount++; + 23, "악진",1200, 0, "낙양", 73, 67, 56, 0, 159, 218, "대의", "돌격"); $gencount++; + 23, "악침",1201, 0, "낙양", 45, 52, 33, 0, 196, 257, "대의", "-"); $gencount++; + 63, "악환",1202, 0, "낙양", 54, 82, 55, 0, 196, 251, "재간", "-"); $gencount++; +102, "안량",1203, 0, "낙양", 73, 93, 36, 0, 160, 200, "출세", "위압"); $gencount++; + 14, "양백",1204, 0, "낙양", 55, 54, 53, 0, 171, 214, "안전", "-"); $gencount++; + 92, "양봉1",1205, 0, "낙양", 57, 64, 36, 0, 153, 197, "유지", "-"); $gencount++; + 91, "양봉2",1206, 0, "낙양", 62, 78, 61, 0, 191, 252, "정복", "-"); $gencount++; + 13, "양송",1207, 0, "낙양", 15, 35, 34, 0, 167, 215, "안전", "-"); $gencount++; + 43, "양수",1208, 0, "낙양", 18, 31, 91, 0, 175, 219, "재간", "귀병"); $gencount++; + 61, "양의",1209, 0, "낙양", 67, 56, 71, 0, 190, 235, "유지", "-"); $gencount++; +141, "양조1",1210, 0, "낙양", 68, 54, 60, 0, 202, 256, "출세", "-"); $gencount++; + 9, "양추1",1211, 0, "낙양", 51, 67, 16, 0, 159, 199, "정복", "-"); $gencount++; + 31, "양호",1212, 0, "낙양", 91, 69, 80, 0, 221, 278, "패권", "-"); $gencount++; + 53, "양회",1213, 0, "낙양", 60, 67, 40, 0, 167, 212, "출세", "-"); $gencount++; +141, "양흥",1214, 0, "낙양", 52, 68, 17, 0, 169, 211, "안전", "-"); $gencount++; + 6, "어부라",1215, 0, "낙양", 78, 80, 61, 0, 150, 195, "정복", "-"); $gencount++; + 64, "엄강",1216, 0, "낙양", 57, 65, 44, 0, 163, 192, "재간", "-"); $gencount++; + 10, "엄백호",1217, 0, "낙양", 48, 68, 30, 0, 150, 197, "할거", "-"); $gencount++; + 10, "엄여",1218, 0, "낙양", 35, 66, 24, 0, 153, 197, "할거", "-"); $gencount++; + 69, "엄안",1219, 0, "낙양", 72, 84, 67, 0, 151, 222, "왕좌", "-"); $gencount++; + 7, "엄정",1220, 0, "낙양", 31, 68, 49, 0, 151, 189, "출세", "-"); $gencount++; +121, "엄준",1221, 0, "낙양", 44, 24, 71, 0, 169, 246, "재간", "-"); $gencount++; + 71, "여개",1222, 0, "낙양", 51, 42, 67, 0, 194, 227, "유지", "-"); $gencount++; + 29, "여건",1223, 0, "낙양", 44, 68, 29, 0, 173, 238, "출세", "-"); $gencount++; +107, "여광",1224, 0, "낙양", 60, 67, 27, 0, 162, 207, "유지", "-"); $gencount++; +124, "여몽",1225, 0, "낙양", 92, 78, 93, 0, 178, 219, "패권", "궁병"); $gencount++; +123, "여범",1226, 0, "낙양", 43, 34, 71, 0, 169, 228, "할거", "-"); $gencount++; +107, "여상",1227, 0, "낙양", 62, 68, 26, 0, 164, 207, "유지", "-"); $gencount++; +105, "여위황",1228, 0, "낙양", 42, 62, 38, 0, 159, 200, "정복", "-"); $gencount++; +145, "여포",1229, 0, "낙양", 74,100, 29, 0, 156, 198, "패권", "돌격"); $gencount++; + 50, "염우",1230, 0, "낙양", 58, 51, 18, 0, 209, 264, "출세", "-"); $gencount++; + 40, "염유",1231, 0, "낙양", 59, 75, 51, 0, 168, 227, "출세", "-"); $gencount++; + 18, "염포",1232, 0, "낙양", 33, 35, 77, 0, 163, 231, "유지", "-"); $gencount++; + 40, "예형",1233, 0, "낙양", 77, 31, 95, 0, 173, 209, "은둔", "통찰"); $gencount++; +133, "오강",1234, 0, "낙양", 47, 37, 61, 0, 216, 275, "안전", "-"); $gencount++; + 59, "오란",1235, 0, "낙양", 67, 75, 42, 0, 170, 218, "재간", "-"); $gencount++; + 72, "오반",1236, 0, "낙양", 70, 66, 45, 0, 171, 234, "재간", "-"); $gencount++; +128, "오언",1237, 0, "낙양", 71, 60, 52, 0, 235, 297, "재간", "-"); $gencount++; +126, "오연",1238, 0, "낙양", 36, 70, 31, 0, 234, 280, "정복", "-"); $gencount++; + 69, "오의",1239, 0, "낙양", 75, 72, 74, 0, 165, 237, "유지", "-"); $gencount++; + 19, "오질",1240, 0, "낙양", 43, 37, 69, 0, 177, 230, "출세", "-"); $gencount++; + 51, "올돌골",1241, 0, "낙양", 77, 92, 15, 0, 186, 225, "출세", "척사"); $gencount++; + 52, "옹개",1242, 0, "낙양", 58, 67, 51, 0, 188, 225, "안전", "-"); $gencount++; + 20, "왕경",1243, 0, "낙양", 55, 47, 65, 0, 206, 260, "재간", "-"); $gencount++; + 97, "왕광",1244, 0, "낙양", 72, 67, 54, 0, 150, 190, "유지", "-"); $gencount++; + 30, "왕기1",1245, 0, "낙양", 76, 62, 70, 0, 190, 261, "유지", "-"); $gencount++; + 34, "왕랑",1246, 0, "낙양", 49, 29, 51, 0, 162, 228, "할거", "-"); $gencount++; + 57, "왕루",1247, 0, "낙양", 40, 28, 76, 0, 173, 211, "유지", "-"); $gencount++; + 76, "왕보",1248, 0, "낙양", 47, 34, 75, 0, 171, 219, "대의", "-"); $gencount++; + 86, "왕수",1249, 0, "낙양", 34, 34, 67, 0, 168, 218, "재간", "-"); $gencount++; + 26, "왕쌍",1250, 0, "낙양", 58, 89, 15, 0, 195, 228, "정복", "보병"); $gencount++; + 46, "왕위",1251, 0, "낙양", 59, 60, 68, 0, 163, 208, "안전", "-"); $gencount++; + 92, "왕윤",1252, 0, "낙양", 16, 18, 77, 0, 137, 192, "왕좌", "-"); $gencount++; + 40, "왕융",1253, 0, "낙양", 62, 41, 77, 0, 234, 305, "재간", "-"); $gencount++; + 32, "왕준",1254, 0, "낙양", 81, 83, 76, 0, 206, 285, "대의", "-"); $gencount++; + 30, "왕찬",1255, 0, "낙양", 28, 28, 78, 0, 177, 217, "안전", "-"); $gencount++; + 33, "왕창",1256, 0, "낙양", 74, 57, 52, 0, 188, 259, "정복", "-"); $gencount++; + 69, "왕평",1257, 0, "낙양", 77, 76, 71, 0, 192, 248, "재간", "-"); $gencount++; + 71, "왕항",1258, 0, "낙양", 51, 43, 60, 0, 184, 254, "대의", "-"); $gencount++; + 33, "왕혼",1259, 0, "낙양", 69, 32, 59, 0, 223, 297, "정복", "-"); $gencount++; + 71, "요립",1260, 0, "낙양", 65, 41, 84, 0, 181, 250, "출세", "-"); $gencount++; + 74, "요화",1261, 0, "낙양", 67, 58, 60, 0, 170, 264, "의협", "-"); $gencount++; + 22, "우금1",1262, 0, "낙양", 80, 74, 71, 0, 159, 221, "정복", "-"); $gencount++; + 27, "우금2",1263, 0, "낙양", 63, 77, 37, 0, 173, 226, "대의", "-"); $gencount++; +122, "우번",1264, 0, "낙양", 23, 42, 73, 0, 164, 233, "유지", "-"); $gencount++; +126, "우전",1265, 0, "낙양", 63, 55, 41, 0, 204, 258, "안전", "-"); $gencount++; + 86, "원담",1266, 0, "낙양", 67, 59, 55, 0, 173, 205, "왕좌", "-"); $gencount++; +101, "원상",1267, 0, "낙양", 54, 72, 68, 0, 179, 207, "패권", "-"); $gencount++; +101, "원소",1268, 0, "낙양", 85, 67, 76, 0, 154, 202, "패권", "위압"); $gencount++; +140, "원술",1269, 0, "낙양", 77, 59, 71, 0, 155, 199, "패권", "축성"); $gencount++; +140, "원윤",1270, 0, "낙양", 41, 34, 60, 0, 163, 199, "패권", "-"); $gencount++; +101, "원희",1271, 0, "낙양", 69, 57, 72, 0, 176, 207, "할거", "-"); $gencount++; +131, "위소",1272, 0, "낙양", 39, 24, 82, 0, 204, 273, "재간", "-"); $gencount++; +147, "위속",1273, 0, "낙양", 57, 59, 41, 0, 156, 200, "안전", "-"); $gencount++; + 81, "위연",1274, 0, "낙양", 78, 94, 62, 0, 175, 234, "패권", "보병"); $gencount++; + 96, "위유",1275, 0, "낙양", 53, 69, 71, 0, 151, 193, "재간", "-"); $gencount++; + 76, "유기",1276, 0, "낙양", 57, 19, 73, 0, 174, 209, "왕좌", "-"); $gencount++; + 36, "유대",1277, 0, "낙양", 61, 57, 62, 0, 147, 202, "재간", "-"); $gencount++; +134, "유도",1278, 0, "낙양", 35, 33, 68, 0, 168, 214, "재간", "-"); $gencount++; + 46, "유벽",1279, 0, "낙양", 63, 71, 23, 0, 168, 210, "출세", "-"); $gencount++; + 75, "유봉",1280, 0, "낙양", 60, 65, 62, 0, 188, 220, "출세", "-"); $gencount++; + 75, "유비",1281, 0, "낙양", 85, 75, 70, 0, 161, 223, "왕좌", "인덕"); $gencount++; + 75, "유선1",1282, 0, "낙양", 24, 17, 21, 0, 207, 271, "대의", "-"); $gencount++; + 55, "유순",1283, 0, "낙양", 67, 61, 54, 0, 184, 239, "출세", "-"); $gencount++; + 75, "유심",1284, 0, "낙양", 63, 46, 70, 0, 238, 263, "왕좌", "-"); $gencount++; +129, "유약",1285, 0, "낙양", 67, 63, 61, 0, 206, 260, "유지", "-"); $gencount++; + 55, "유언",1286, 0, "낙양", 60, 40, 74, 0, 132, 194, "할거", "-"); $gencount++; + 27, "유엽",1287, 0, "낙양", 40, 29, 79, 0, 176, 235, "유지", "-"); $gencount++; + 11, "유요",1288, 0, "낙양", 23, 22, 48, 0, 156, 195, "안전", "발명"); $gencount++; + 96, "유우",1289, 0, "낙양", 68, 34, 72, 0, 145, 193, "왕좌", "-"); $gencount++; + 55, "유장",1290, 0, "낙양", 38, 31, 63, 0, 162, 219, "할거", "수비"); $gencount++; + 45, "유종",1291, 0, "낙양", 22, 26, 61, 0, 191, 208, "할거", "-"); $gencount++; + 56, "유파",1292, 0, "낙양", 47, 32, 70, 0, 186, 222, "대의", "-"); $gencount++; + 45, "유표1",1293, 0, "낙양", 71, 57, 71, 0, 142, 208, "할거", "-"); $gencount++; + 27, "유표2",1294, 0, "낙양", 76, 55, 71, 0, 173, 229, "안전", "-"); $gencount++; +134, "유현",1295, 0, "낙양", 32, 56, 55, 0, 188, 252, "안전", "-"); $gencount++; +122, "육개",1296, 0, "낙양", 66, 30, 72, 0, 198, 269, "재간", "-"); $gencount++; +122, "육손",1297, 0, "낙양", 98, 68, 98, 0, 183, 245, "왕좌", "귀병"); $gencount++; +121, "육적",1298, 0, "낙양", 44, 29, 73, 0, 187, 219, "안전", "-"); $gencount++; +122, "육항",1299, 0, "낙양", 95, 69, 94, 0, 226, 274, "왕좌", "-"); $gencount++; + 38, "윤대목",1300, 0, "낙양", 62, 49, 69, 0, 211, 270, "재간", "-"); $gencount++; + 80, "윤묵",1301, 0, "낙양", 19, 28, 73, 0, 183, 239, "대의", "-"); $gencount++; + 72, "윤상",1302, 0, "낙양", 30, 32, 42, 0, 194, 260, "대의", "-"); $gencount++; +136, "윤직",1303, 0, "낙양", 44, 58, 63, 0, 197, 237, "재간", "-"); $gencount++; + 2, "이각",1304, 0, "낙양", 56, 77, 43, 0, 148, 198, "패권", "-"); $gencount++; +146, "이숙",1305, 0, "낙양", 27, 45, 67, 0, 156, 192, "재간", "-"); $gencount++; + 71, "이엄",1306, 0, "낙양", 80, 84, 81, 0, 172, 234, "패권", "-"); $gencount++; + 2, "이유",1307, 0, "낙양", 64, 22, 90, 0, 150, 192, "패권", "귀모"); $gencount++; +132, "이이",1308, 0, "낙양", 55, 75, 20, 0, 187, 222, "정복", "-"); $gencount++; + 77, "이적",1309, 0, "낙양", 55, 27, 77, 0, 162, 226, "할거", "-"); $gencount++; + 22, "이전",1310, 0, "낙양", 75, 68, 82, 0, 174, 216, "왕좌", "-"); $gencount++; + 71, "이풍1",1311, 0, "낙양", 59, 56, 62, 0, 206, 260, "재간", "-"); $gencount++; + 66, "이회",1312, 0, "낙양", 67, 50, 79, 0, 175, 231, "유지", "-"); $gencount++; +114, "잠혼",1313, 0, "낙양", 15, 16, 44, 0, 239, 280, "할거", "-"); $gencount++; + 7, "장각",1314, 0, "낙양", 93, 25, 93, 0, 140, 185, "패권", "환술"); $gencount++; + 34, "장간",1315, 0, "낙양", 19, 20, 70, 0, 175, 239, "재간", "-"); $gencount++; + 7, "장개",1316, 0, "낙양", 48, 69, 19, 0, 155, 202, "안전", "-"); $gencount++; +122, "장굉",1317, 0, "낙양", 25, 21, 85, 0, 153, 212, "왕좌", "-"); $gencount++; + 7, "장량",1318, 0, "낙양", 68, 81, 68, 0, 153, 185, "정복", "환술"); $gencount++; + 15, "장로",1319, 0, "낙양", 76, 44, 80, 0, 163, 237, "유지", "축성"); $gencount++; + 23, "장료",1320, 0, "낙양", 89, 93, 83, 0, 169, 222, "의협", "견고"); $gencount++; + 7, "장보",1321, 0, "낙양", 78, 81, 76, 0, 148, 185, "패권", "환술"); $gencount++; + 76, "장비",1322, 0, "낙양", 79, 99, 48, 0, 167, 221, "의협", "무쌍"); $gencount++; + 62, "장서",1323, 0, "낙양", 44, 48, 35, 0, 225, 290, "출세", "-"); $gencount++; +120, "장소1",1324, 0, "낙양", 42, 24, 91, 0, 156, 236, "안전", "-"); $gencount++; + 78, "장소2",1325, 0, "낙양", 51, 44, 71, 0, 202, 264, "재간", "-"); $gencount++; + 72, "장송",1326, 0, "낙양", 49, 28, 93, 0, 170, 212, "할거", "통찰"); $gencount++; +148, "장수",1327, 0, "낙양", 71, 72, 69, 0, 154, 207, "할거", "-"); $gencount++; +145, "장양1",1328, 0, "낙양", 62, 66, 65, 0, 150, 199, "출세", "-"); $gencount++; + 8, "장연",1329, 0, "낙양", 78, 66, 47, 0, 153, 210, "안전", "-"); $gencount++; + 11, "장영",1330, 0, "낙양", 55, 65, 40, 0, 154, 195, "재간", "-"); $gencount++; +118, "장온",1331, 0, "낙양", 21, 30, 69, 0, 193, 231, "할거", "-"); $gencount++; + 78, "장완",1332, 0, "낙양", 70, 55, 86, 0, 188, 246, "할거", "상재"); $gencount++; + 15, "장위",1333, 0, "낙양", 65, 70, 29, 0, 172, 215, "대의", "-"); $gencount++; + 36, "장윤",1334, 0, "낙양", 67, 59, 60, 0, 163, 208, "정복", "-"); $gencount++; +104, "장의거",1335, 0, "낙양", 68, 59, 34, 0, 159, 205, "대의", "-"); $gencount++; + 68, "장익",1336, 0, "낙양", 75, 68, 63, 0, 188, 264, "유지", "-"); $gencount++; + 56, "장임",1337, 0, "낙양", 83, 82, 74, 0, 169, 214, "대의", "견고"); $gencount++; +148, "장제1",1338, 0, "낙양", 70, 65, 59, 0, 144, 196, "할거", "-"); $gencount++; + 32, "장제2",1339, 0, "낙양", 30, 33, 84, 0, 188, 249, "유지", "-"); $gencount++; +126, "장제3",1340, 0, "낙양", 74, 49, 61, 0, 236, 280, "할거", "-"); $gencount++; + 17, "장패",1341, 0, "낙양", 44, 78, 43, 0, 165, 231, "할거", "-"); $gencount++; + 76, "장포1",1342, 0, "낙양", 69, 85, 49, 0, 198, 229, "재간", "징병"); $gencount++; +113, "장포2",1343, 0, "낙양", 63, 66, 51, 0, 225, 264, "유지", "-"); $gencount++; + 27, "장합",1344, 0, "낙양", 83, 91, 63, 0, 167, 231, "출세", "궁병"); $gencount++; + 23, "장호",1345, 0, "낙양", 56, 62, 54, 0, 195, 240, "정복", "-"); $gencount++; + 31, "장화",1346, 0, "낙양", 49, 24, 86, 0, 232, 300, "유지", "-"); $gencount++; + 48, "장횡",1347, 0, "낙양", 53, 67, 25, 0, 178, 211, "재간", "-"); $gencount++; +141, "장훈",1348, 0, "낙양", 67, 61, 60, 0, 156, 206, "안전", "-"); $gencount++; +120, "장휴",1349, 0, "낙양", 42, 35, 70, 0, 204, 244, "재간", "-"); $gencount++; +126, "장흠",1350, 0, "낙양", 64, 66, 67, 0, 168, 219, "대의", "저격"); $gencount++; + 96, "저수",1351, 0, "낙양", 82, 54, 88, 0, 156, 201, "할거", "반계"); $gencount++; +130, "전단",1352, 0, "낙양", 64, 73, 61, 0, 204, 261, "출세", "-"); $gencount++; + 42, "전속",1353, 0, "낙양", 66, 57, 49, 0, 218, 272, "안전", "-"); $gencount++; + 26, "전위1",1354, 0, "낙양", 61, 96, 34, 0, 160, 197, "의협", "필살"); $gencount++; +130, "전위2",1355, 0, "낙양", 74, 69, 62, 0, 230, 274, "출세", "-"); $gencount++; +128, "전종",1356, 0, "낙양", 79, 77, 74, 0, 183, 249, "패권", "-"); $gencount++; + 42, "전주",1357, 0, "낙양", 69, 67, 51, 0, 169, 214, "의협", "-"); $gencount++; + 96, "전풍",1358, 0, "낙양", 81, 41, 96, 0, 162, 200, "왕좌", "-"); $gencount++; + 24, "정무",1359, 0, "낙양", 54, 38, 74, 0, 201, 265, "출세", "-"); $gencount++; +119, "정병",1360, 0, "낙양", 22, 25, 67, 0, 172, 226, "유지", "-"); $gencount++; +126, "정보",1361, 0, "낙양", 81, 64, 76, 0, 151, 216, "패권", "-"); $gencount++; +123, "정봉1",1362, 0, "낙양", 70, 77, 64, 0, 190, 271, "패권", "-"); $gencount++; + 24, "정욱",1363, 0, "낙양", 80, 39, 90, 0, 141, 220, "패권", "신중"); $gencount++; + 88, "정원",1364, 0, "낙양", 64, 77, 58, 0, 137, 190, "왕좌", "기병"); $gencount++; + 7, "정원지",1365, 0, "낙양", 41, 74, 38, 0, 145, 185, "출세", "-"); $gencount++; + 69, "정은",1366, 0, "낙양", 53, 62, 26, 0, 169, 211, "재간", "-"); $gencount++; +121, "제갈각",1367, 0, "낙양", 61, 53, 92, 0, 203, 253, "왕좌", "-"); $gencount++; + 76, "제갈균",1368, 0, "낙양", 59, 45, 74, 0, 185, 252, "안전", "상재"); $gencount++; +121, "제갈근",1369, 0, "낙양", 60, 42, 88, 0, 174, 241, "왕좌", "경작"); $gencount++; + 76, "제갈량",1370, 0, "낙양", 97, 55,100, 0, 181, 234, "왕좌", "집중"); $gencount++; + 76, "제갈상",1371, 0, "낙양", 52, 75, 71, 0, 246, 263, "대의", "-"); $gencount++; +135, "제갈정",1372, 0, "낙양", 56, 57, 54, 0, 241, 300, "안전", "-"); $gencount++; + 76, "제갈첨",1373, 0, "낙양", 73, 52, 76, 0, 227, 263, "대의", "-"); $gencount++; +135, "제갈탄",1374, 0, "낙양", 79, 79, 73, 0, 206, 258, "패권", "-"); $gencount++; + 76, "조광",1375, 0, "낙양", 65, 67, 54, 0, 210, 263, "재간", "-"); $gencount++; + 74, "조루",1376, 0, "낙양", 49, 37, 60, 0, 183, 219, "대의", "-"); $gencount++; + 24, "조모",1377, 0, "낙양", 53, 32, 30, 0, 241, 260, "할거", "-"); $gencount++; +127, "조무",1378, 0, "낙양", 71, 68, 71, 0, 155, 191, "의협", "-"); $gencount++; + 26, "조방",1379, 0, "낙양", 50, 20, 31, 0, 232, 274, "정복", "-"); $gencount++; + 83, "조범",1380, 0, "낙양", 58, 40, 63, 0, 168, 218, "유지", "-"); $gencount++; + 26, "조비",1381, 0, "낙양", 72, 69, 75, 0, 187, 226, "패권", "징병"); $gencount++; + 19, "조상",1382, 0, "낙양", 68, 62, 31, 0, 207, 249, "패권", "-"); $gencount++; +147, "조성",1383, 0, "낙양", 44, 69, 51, 0, 163, 198, "안전", "-"); $gencount++; + 26, "조순",1384, 0, "낙양", 66, 57, 72, 0, 170, 210, "정복", "-"); $gencount++; + 25, "조식",1385, 0, "낙양", 19, 19, 90, 0, 192, 232, "왕좌", "귀모"); $gencount++; + 25, "조앙",1386, 0, "낙양", 44, 65, 62, 0, 175, 197, "왕좌", "-"); $gencount++; + 25, "조예",1387, 0, "낙양", 57, 55, 82, 0, 205, 239, "정복", "-"); $gencount++; + 26, "조우",1388, 0, "낙양", 67, 55, 67, 0, 199, 260, "대의", "-"); $gencount++; + 76, "조운",1389, 0, "낙양", 95, 98, 87, 0, 168, 229, "왕좌", "무쌍"); $gencount++; + 25, "조웅",1390, 0, "낙양", 59, 27, 44, 0, 194, 220, "안전", "-"); $gencount++; + 26, "조인",1391, 0, "낙양", 74, 79, 62, 0, 168, 223, "패권", "보병"); $gencount++; + 25, "조조",1392, 0, "낙양",100, 80, 95, 0, 155, 220, "패권", "반계"); $gencount++; + 26, "조진",1393, 0, "낙양", 82, 67, 65, 0, 185, 231, "정복", "-"); $gencount++; + 25, "조창",1394, 0, "낙양", 75, 88, 37, 0, 190, 223, "정복", "돌격"); $gencount++; + 76, "조통",1395, 0, "낙양", 65, 64, 55, 0, 209, 260, "재간", "-"); $gencount++; + 84, "조표",1396, 0, "낙양", 34, 70, 16, 0, 151, 196, "안전", "-"); $gencount++; + 7, "조홍1",1397, 0, "낙양", 52, 66, 42, 0, 156, 185, "유지", "-"); $gencount++; + 24, "조홍2",1398, 0, "낙양", 72, 69, 44, 0, 169, 232, "패권", "-"); $gencount++; + 26, "조환",1399, 0, "낙양", 34, 24, 42, 0, 246, 302, "정복", "-"); $gencount++; + 19, "조훈",1400, 0, "낙양", 67, 63, 30, 0, 212, 249, "출세", "-"); $gencount++; + 26, "조휴",1401, 0, "낙양", 75, 71, 70, 0, 174, 228, "패권", "-"); $gencount++; + 19, "조희",1402, 0, "낙양", 64, 57, 71, 0, 210, 249, "대의", "-"); $gencount++; + 22, "종요",1403, 0, "낙양", 16, 20, 74, 0, 151, 230, "유지", "-"); $gencount++; + 20, "종회",1404, 0, "낙양", 84, 58, 93, 0, 225, 264, "패권", "-"); $gencount++; +128, "주거",1405, 0, "낙양", 73, 71, 72, 0, 190, 246, "유지", "-"); $gencount++; +118, "주방",1406, 0, "낙양", 56, 36, 76, 0, 200, 240, "할거", "-"); $gencount++; +126, "주연",1407, 0, "낙양", 73, 72, 51, 0, 182, 249, "할거", "-"); $gencount++; +126, "주유",1408, 0, "낙양", 97, 73, 97, 0, 175, 210, "패권", "신산"); $gencount++; +128, "주이",1409, 0, "낙양", 61, 55, 61, 0, 201, 257, "안전", "-"); $gencount++; + 88, "주준",1410, 0, "낙양", 82, 75, 65, 0, 149, 195, "왕좌", "-"); $gencount++; + 32, "주지",1411, 0, "낙양", 52, 77, 47, 0, 233, 295, "안전", "-"); $gencount++; + 76, "주창",1412, 0, "낙양", 42, 79, 30, 0, 164, 219, "의협", "궁병"); $gencount++; +126, "주치",1413, 0, "낙양", 58, 55, 56, 0, 156, 224, "안전", "-"); $gencount++; + 41, "주태1",1414, 0, "낙양", 62, 55, 61, 0, 207, 261, "안전", "-"); $gencount++; +126, "주태2",1415, 0, "낙양", 74, 88, 60, 0, 171, 225, "정복", "필살"); $gencount++; +128, "주환",1416, 0, "낙양", 84, 86, 74, 0, 177, 238, "정복", "-"); $gencount++; + 29, "진건",1417, 0, "낙양", 62, 70, 62, 0, 214, 292, "정복", "-"); $gencount++; + 29, "진교",1418, 0, "낙양", 21, 25, 67, 0, 175, 237, "유지", "-"); $gencount++; + 28, "진군",1419, 0, "낙양", 60, 38, 87, 0, 167, 235, "대의", "-"); $gencount++; +143, "진궁",1420, 0, "낙양", 77, 51, 90, 0, 154, 198, "할거", "신중"); $gencount++; + 79, "진규",1421, 0, "낙양", 22, 19, 71, 0, 132, 206, "할거", "-"); $gencount++; + 72, "진도",1422, 0, "낙양", 71, 85, 70, 0, 171, 237, "대의", "-"); $gencount++; + 79, "진등",1423, 0, "낙양", 64, 62, 71, 0, 169, 207, "할거", "-"); $gencount++; + 37, "진림",1424, 0, "낙양", 50, 28, 82, 0, 160, 217, "재간", "-"); $gencount++; +124, "진무",1425, 0, "낙양", 62, 74, 59, 0, 176, 215, "재간", "-"); $gencount++; + 66, "진복",1426, 0, "낙양", 36, 27, 76, 0, 160, 226, "재간", "-"); $gencount++; + 50, "진수",1427, 0, "낙양", 25, 29, 83, 0, 233, 297, "대의", "-"); $gencount++; + 81, "진식",1428, 0, "낙양", 47, 68, 52, 0, 191, 230, "출세", "-"); $gencount++; + 79, "진진",1429, 0, "낙양", 58, 38, 64, 0, 170, 235, "재간", "-"); $gencount++; + 28, "진태",1430, 0, "낙양", 79, 76, 70, 0, 210, 260, "대의", "-"); $gencount++; + 11, "진횡",1431, 0, "낙양", 38, 58, 47, 0, 161, 195, "출세", "-"); $gencount++; + 21, "차주",1432, 0, "낙양", 55, 66, 62, 0, 164, 199, "안전", "-"); $gencount++; + 11, "착융",1433, 0, "낙양", 62, 59, 21, 0, 161, 194, "출세", "-"); $gencount++; + 36, "채모",1434, 0, "낙양", 79, 69, 68, 0, 155, 208, "정복", "궁병"); $gencount++; + 36, "채중",1435, 0, "낙양", 58, 43, 55, 0, 168, 208, "출세", "-"); $gencount++; + 36, "채화",1436, 0, "낙양", 56, 47, 49, 0, 166, 208, "안전", "-"); $gencount++; + 66, "초주",1437, 0, "낙양", 22, 26, 81, 0, 201, 270, "대의", "-"); $gencount++; + 20, "최염",1438, 0, "낙양", 43, 54, 67, 0, 162, 216, "대의", "-"); $gencount++; + 60, "축융",1439, 0, "낙양", 59, 87, 25, 0, 193, 246, "정복", "척사"); $gencount++; + 60, "타사대왕",1440, 0, "낙양", 61, 72, 67, 0, 186, 225, "출세", "척사"); $gencount++; +124, "태사자",1441, 0, "낙양", 71, 97, 65, 0, 166, 209, "대의", "무쌍"); $gencount++; +124, "태사향",1442, 0, "낙양", 51, 69, 50, 0, 189, 246, "재간", "-"); $gencount++; + 12, "포륭",1443, 0, "낙양", 53, 74, 20, 0, 174, 208, "안전", "-"); $gencount++; + 74, "풍습",1444, 0, "낙양", 36, 64, 44, 0, 182, 222, "재간", "-"); $gencount++; + 7, "하의",1445, 0, "낙양", 49, 68, 25, 0, 161, 195, "출세", "-"); $gencount++; +121, "하제",1446, 0, "낙양", 74, 73, 64, 0, 171, 227, "재간", "-"); $gencount++; + 90, "하진",1447, 0, "낙양", 49, 69, 37, 0, 135, 189, "왕좌", "-"); $gencount++; + 24, "하후덕",1448, 0, "낙양", 67, 64, 39, 0, 178, 218, "출세", "-"); $gencount++; + 26, "하후돈",1449, 0, "낙양", 88, 92, 71, 0, 156, 220, "의협", "돌격"); $gencount++; + 19, "하후무",1450, 0, "낙양", 38, 33, 37, 0, 201, 259, "안전", "-"); $gencount++; + 24, "하후상",1451, 0, "낙양", 67, 62, 71, 0, 181, 225, "출세", "-"); $gencount++; + 26, "하후연",1452, 0, "낙양", 79, 90, 58, 0, 162, 219, "패권", "궁병"); $gencount++; + 26, "하후위",1453, 0, "낙양", 73, 76, 71, 0, 204, 254, "정복", "-"); $gencount++; + 26, "하후은",1454, 0, "낙양", 49, 51, 39, 0, 180, 208, "안전", "-"); $gencount++; + 23, "하후패",1455, 0, "낙양", 78, 88, 69, 0, 202, 262, "대의", "-"); $gencount++; + 20, "하후현",1456, 0, "낙양", 57, 23, 75, 0, 208, 254, "유지", "-"); $gencount++; + 26, "하후혜",1457, 0, "낙양", 76, 66, 78, 0, 206, 242, "정복", "-"); $gencount++; + 26, "하후화",1458, 0, "낙양", 77, 61, 80, 0, 207, 265, "정복", "-"); $gencount++; + 22, "학소",1459, 0, "낙양", 89, 81, 86, 0, 185, 229, "대의", "견고"); $gencount++; +126, "한당",1460, 0, "낙양", 68, 67, 64, 0, 156, 225, "할거", "-"); $gencount++; + 93, "한복",1461, 0, "낙양", 66, 59, 42, 0, 149, 191, "안전", "-"); $gencount++; + 8, "한섬",1462, 0, "낙양", 39, 62, 35, 0, 159, 196, "출세", "-"); $gencount++; + 48, "한수",1463, 0, "낙양", 66, 76, 77, 0, 142, 215, "대의", "기병"); $gencount++; + 40, "한숭",1464, 0, "낙양", 21, 25, 70, 0, 154, 210, "재간", "-"); $gencount++; + 7, "한충",1465, 0, "낙양", 41, 66, 29, 0, 151, 185, "안전", "-"); $gencount++; + 9, "한현",1466, 0, "낙양", 43, 61, 20, 0, 163, 208, "유지", "-"); $gencount++; + 27, "한호",1467, 0, "낙양", 60, 73, 45, 0, 164, 218, "유지", "-"); $gencount++; + 79, "향랑",1468, 0, "낙양", 51, 21, 77, 0, 167, 247, "대의", "-"); $gencount++; + 79, "향총",1469, 0, "낙양", 76, 42, 73, 0, 195, 240, "왕좌", "-"); $gencount++; +139, "허공",1470, 0, "낙양", 65, 63, 59, 0, 155, 200, "유지", "-"); $gencount++; + 21, "허유",1471, 0, "낙양", 47, 47, 57, 0, 155, 204, "재간", "-"); $gencount++; + 23, "허의",1472, 0, "낙양", 31, 74, 47, 0, 213, 263, "출세", "-"); $gencount++; + 26, "허저",1473, 0, "낙양", 57, 98, 27, 0, 169, 226, "정복", "무쌍"); $gencount++; + 87, "허정",1474, 0, "낙양", 18, 29, 74, 0, 152, 222, "재간", "-"); $gencount++; + 12, "형도영",1475, 0, "낙양", 49, 78, 23, 0, 174, 208, "출세", "-"); $gencount++; +148, "호거아",1476, 0, "낙양", 35, 76, 61, 0, 164, 206, "안전", "-"); $gencount++; + 76, "호반",1477, 0, "낙양", 61, 58, 46, 0, 179, 233, "재간", "-"); $gencount++; + 20, "호분",1478, 0, "낙양", 71, 60, 61, 0, 222, 288, "할거", "-"); $gencount++; + 27, "호주천",1479, 0, "낙양", 77, 75, 65, 0, 169, 230, "정복", "-"); $gencount++; + 20, "호준",1480, 0, "낙양", 67, 60, 46, 0, 200, 256, "재간", "-"); $gencount++; + 2, "화웅",1481, 0, "낙양", 68, 88, 24, 0, 155, 191, "출세", "돌격"); $gencount++; +131, "화핵",1482, 0, "낙양", 37, 27, 75, 0, 217, 278, "안전", "-"); $gencount++; + 10, "화흠",1483, 0, "낙양", 18, 43, 75, 0, 157, 231, "출세", "-"); $gencount++; + 21, "환범",1484, 0, "낙양", 20, 25, 81, 0, 199, 249, "유지", "-"); $gencount++; +127, "황개",1485, 0, "낙양", 78, 85, 69, 0, 154, 218, "왕좌", "징병"); $gencount++; + 56, "황권",1486, 0, "낙양", 76, 46, 77, 0, 167, 240, "대의", "-"); $gencount++; + 41, "황란",1487, 0, "낙양", 29, 70, 25, 0, 200, 264, "재간", "-"); $gencount++; + 88, "황보숭",1488, 0, "낙양", 83, 63, 73, 0, 132, 195, "왕좌", "-"); $gencount++; + 72, "황충",1489, 0, "낙양", 84, 94, 67, 0, 148, 222, "왕좌", "궁병"); $gencount++; + 50, "황호",1490, 0, "낙양", 15, 17, 48, 0, 226, 263, "안전", "-"); $gencount++; +147, "후성",1491, 0, "낙양", 56, 62, 33, 0, 158, 199, "정복", "-"); $gencount++; + + + + +123, "가화",1492, 0, "낙양", 50, 66, 40, 0, 176, 224, "-", "-"); $gencount++; +999, "건석",1493, 0, "낙양", 21, 12, 61, 0, 155, 189, "-", "-"); $gencount++; +999, "견씨",1494, 0, "낙양", 35, 24, 58, 0, 182, 221, "-", "-"); $gencount++; + 40, "견홍",1495, 0, "낙양", 76, 72, 66, 0, 224, 272, "-", "-"); $gencount++; +120, "고담",1496, 0, "낙양", 33, 21, 69, 0, 203, 244, "-", "-"); $gencount++; +101, "고유",1497, 0, "낙양", 56, 44, 73, 0, 174, 263, "-", "-"); $gencount++; +132, "곽마",1498, 0, "낙양", 68, 71, 49, 0, 239, 280, "-", "-"); $gencount++; + 39, "관구수",1499, 0, "낙양", 58, 63, 35, 0, 206, 265, "-", "-"); $gencount++; + 39, "관구전",1500, 0, "낙양", 63, 58, 68, 0, 224, 255, "-", "-"); $gencount++; +999, "관로",1501, 0, "낙양", 62, 21, 75, 0, 191, 256, "-", "-"); $gencount++; + 65, "관정",1502, 0, "낙양", 35, 50, 73, 0, 158, 199, "-", "-"); $gencount++; +137, "교수",1503, 0, "낙양", 67, 69, 39, 0, 143, 195, "-", "-"); $gencount++; + 33, "구건",1504, 0, "낙양", 43, 56, 69, 0, 239, 272, "-", "-"); $gencount++; + 41, "구본",1505, 0, "낙양", 52, 41, 70, 0, 232, 269, "-", "-"); $gencount++; + 12, "구성",1506, 0, "낙양", 56, 71, 31, 0, 157, 187, "-", "-"); $gencount++; + 21, "국연",1507, 0, "낙양", 52, 21, 71, 0, 160, 219, "-", "-"); $gencount++; + 99, "국의",1508, 0, "낙양", 83, 79, 50, 0, 146, 191, "-", "-"); $gencount++; + 34, "금의",1509, 0, "낙양", 18, 40, 63, 0, 177, 218, "-", "-"); $gencount++; + 76, "나헌",1510, 0, "낙양", 86, 67, 75, 0, 218, 270, "-", "-"); $gencount++; +999, "남두",1511, 0, "낙양", 35, 25, 54, 0, 130, 200, "-", "-"); $gencount++; + 54, "냉포",1512, 0, "낙양", 70, 82, 69, 0, 176, 214, "-", "-"); $gencount++; +124, "노숙2",1513, 0, "낙양", 70, 55, 76, 0, 208, 274, "-", "-"); $gencount++; + 42, "누규",1514, 0, "낙양", 54, 19, 88, 0, 143, 212, "-", "-"); $gencount++; + 6, "누반",1515, 0, "낙양", 65, 76, 39, 0, 178, 207, "-", "-"); $gencount++; +130, "누현",1516, 0, "낙양", 23, 20, 68, 0, 223, 275, "-", "-"); $gencount++; + 40, "당균",1517, 0, "낙양", 33, 19, 81, 0, 229, 264, "-", "-"); $gencount++; + 32, "당빈",1518, 0, "낙양", 70, 74, 62, 0, 235, 294, "-", "-"); $gencount++; +999, "대교",1519, 0, "낙양", 42, 10, 54, 0, 177, 235, "-", "-"); $gencount++; + 28, "대릉",1520, 0, "낙양", 64, 75, 45, 0, 199, 258, "-", "-"); $gencount++; +129, "동조",1521, 0, "낙양", 16, 15, 51, 0, 221, 281, "-", "-"); $gencount++; +114, "등수",1522, 0, "낙양", 35, 20, 44, 0, 228, 288, "-", "-"); $gencount++; + 50, "마막",1523, 0, "낙양", 22, 17, 5, 0, 221, 265, "-", "-"); $gencount++; +116, "만욱",1524, 0, "낙양", 20, 18, 66, 0, 240, 272, "-", "-"); $gencount++; +120, "맹종",1525, 0, "낙양", 48, 48, 67, 0, 216, 271, "-", "-"); $gencount++; + 38, "문호",1526, 0, "낙양", 65, 74, 45, 0, 227, 279, "-", "-"); $gencount++; +999, "미씨",1527, 0, "낙양", 59, 15, 68, 0, 176, 208, "-", "-"); $gencount++; + 39, "반림",1528, 0, "낙양", 66, 79, 8, 0, 168, 225, "-", "-"); $gencount++; +129, "반장",1529, 0, "낙양", 77, 78, 69, 0, 177, 222, "-", "-"); $gencount++; + 94, "방열",1530, 0, "낙양", 58, 82, 28, 0, 153, 190, "-", "-"); $gencount++; + 55, "방희",1531, 0, "낙양", 59, 38, 69, 0, 153, 218, "-", "-"); $gencount++; + 30, "배수",1532, 0, "낙양", 10, 11, 77, 0, 223, 271, "-", "-"); $gencount++; + 8, "번능",1533, 0, "낙양", 70, 61, 47, 0, 158, 194, "-", "-"); $gencount++; +999, "번씨",1534, 0, "낙양", 32, 17, 45, 0, 176, 220, "-", "-"); $gencount++; + 49, "보도근",1535, 0, "낙양", 64, 73, 50, 0, 170, 233, "-", "-"); $gencount++; +129, "보천",1536, 0, "낙양", 68, 60, 72, 0, 222, 272, "-", "-"); $gencount++; +121, "보협",1537, 0, "낙양", 73, 53, 75, 0, 216, 264, "-", "-"); $gencount++; + 28, "부하",1538, 0, "낙양", 44, 36, 85, 0, 209, 255, "-", "-"); $gencount++; + 26, "비요",1539, 0, "낙양", 70, 65, 73, 0, 192, 228, "-", "-"); $gencount++; + 31, "사마주",1540, 0, "낙양", 63, 53, 62, 0, 227, 283, "-", "-"); $gencount++; + 41, "사찬",1541, 0, "낙양", 61, 71, 54, 0, 215, 264, "-", "-"); $gencount++; +128, "설후",1542, 0, "낙양", 16, 14, 71, 0, 221, 271, "-", "-"); $gencount++; + 36, "성공영",1543, 0, "낙양", 73, 58, 80, 0, 172, 220, "-", "-"); $gencount++; +126, "성만",1544, 0, "낙양", 61, 69, 66, 0, 225, 276, "-", "-"); $gencount++; +999, "소교",1545, 0, "낙양", 57, 23, 66, 0, 178, 218, "-", "-"); $gencount++; + 46, "소유",1546, 0, "낙양", 51, 61, 48, 0, 164, 210, "-", "-"); $gencount++; + 31, "소제2",1547, 0, "낙양", 22, 16, 78, 0, 224, 268, "-", "-"); $gencount++; +126, "손교",1548, 0, "낙양", 77, 60, 69, 0, 181, 219, "-", "-"); $gencount++; +116, "손기",1549, 0, "낙양", 62, 65, 52, 0, 227, 276, "-", "-"); $gencount++; +999, "손상향",1550, 0, "낙양", 72, 62, 42, 0, 193, 244, "-", "-"); $gencount++; +125, "손익",1551, 0, "낙양", 69, 75, 26, 0, 184, 204, "-", "-"); $gencount++; +125, "손진",1552, 0, "낙양", 64, 71, 48, 0, 234, 280, "-", "-"); $gencount++; +123, "송겸",1553, 0, "낙양", 61, 48, 44, 0, 175, 215, "-", "-"); $gencount++; + 85, "순심",1554, 0, "낙양", 20, 21, 79, 0, 164, 208, "-", "-"); $gencount++; + 31, "순욱2",1555, 0, "낙양", 10, 16, 77, 0, 225, 289, "-", "-"); $gencount++; + 31, "순의",1556, 0, "낙양", 16, 11, 73, 0, 207, 281, "-", "-"); $gencount++; +129, "시삭",1557, 0, "낙양", 36, 66, 44, 0, 226, 268, "-", "-"); $gencount++; + 29, "신창",1558, 0, "낙양", 51, 29, 46, 0, 210, 272, "-", "-"); $gencount++; +999, "악신",1559, 0, "낙양", 53, 12, 46, 0, 175, 228, "-", "-"); $gencount++; +138, "악취",1560, 0, "낙양", 56, 68, 58, 0, 157, 195, "-", "-"); $gencount++; +138, "양강",1561, 0, "낙양", 62, 70, 42, 0, 160, 199, "-", "-"); $gencount++; + 21, "양부",1562, 0, "낙양", 68, 55, 85, 0, 178, 239, "-", "-"); $gencount++; + 72, "양서",1563, 0, "낙양", 56, 62, 66, 0, 198, 260, "-", "-"); $gencount++; + 34, "양습",1564, 0, "낙양", 67, 49, 73, 0, 168, 230, "-", "-"); $gencount++; + 16, "양앙",1565, 0, "낙양", 65, 70, 39, 0, 172, 215, "-", "-"); $gencount++; + 17, "양임",1566, 0, "낙양", 71, 78, 56, 0, 170, 215, "-", "-"); $gencount++; + 32, "양제",1567, 0, "낙양", 69, 63, 71, 0, 226, 291, "-", "-"); $gencount++; + 33, "양조2",1568, 0, "낙양", 65, 61, 67, 0, 223, 286, "-", "-"); $gencount++; + 48, "양추2",1569, 0, "낙양", 66, 67, 61, 0, 172, 238, "-", "-"); $gencount++; +140, "양홍",1570, 0, "낙양", 19, 17, 76, 0, 152, 199, "-", "-"); $gencount++; + 31, "양혼",1571, 0, "낙양", 60, 67, 63, 0, 220, 278, "-", "-"); $gencount++; +123, "여거",1572, 0, "낙양", 71, 58, 69, 0, 196, 256, "-", "-"); $gencount++; +130, "여대",1573, 0, "낙양", 83, 72, 70, 0, 161, 256, "-", "-"); $gencount++; +136, "염상",1574, 0, "낙양", 29, 27, 69, 0, 158, 199, "-", "-"); $gencount++; + 36, "염행",1575, 0, "낙양", 70, 86, 38, 0, 159, 222, "-", "-"); $gencount++; + 73, "영수",1576, 0, "낙양", 69, 70, 74, 0, 234, 264, "-", "-"); $gencount++; + 39, "오거",1577, 0, "낙양", 49, 63, 32, 0, 151, 211, "-", "-"); $gencount++; +126, "오경",1578, 0, "낙양", 73, 60, 57, 0, 159, 203, "-", "-"); $gencount++; +999, "오국태",1579, 0, "낙양", 31, 11, 60, 0, 161, 222, "-", "-"); $gencount++; +126, "오찬",1580, 0, "낙양", 69, 41, 78, 0, 181, 245, "-", "-"); $gencount++; + 23, "온회",1581, 0, "낙양", 42, 40, 78, 0, 178, 222, "-", "-"); $gencount++; + 21, "왕기2",1582, 0, "낙양", 70, 66, 63, 0, 217, 281, "-", "-"); $gencount++; + 32, "왕도",1583, 0, "낙양", 48, 44, 70, 0, 210, 269, "-", "-"); $gencount++; +123, "왕돈",1584, 0, "낙양", 60, 65, 41, 0, 198, 256, "-", "-"); $gencount++; + 34, "왕릉",1585, 0, "낙양", 73, 60, 71, 0, 172, 251, "-", "-"); $gencount++; + 63, "왕문",1586, 0, "낙양", 64, 67, 32, 0, 162, 205, "-", "-"); $gencount++; + 32, "왕상",1587, 0, "낙양", 25, 19, 65, 0, 180, 268, "-", "-"); $gencount++; + 34, "왕숙",1588, 0, "낙양", 35, 21, 80, 0, 195, 256, "-", "-"); $gencount++; + 33, "왕업",1589, 0, "낙양", 32, 6, 46, 0, 220, 280, "-", "-"); $gencount++; + 35, "왕충",1590, 0, "낙양", 42, 58, 21, 0, 152, 214, "-", "-"); $gencount++; + 1, "우보",1591, 0, "낙양", 43, 63, 12, 0, 159, 192, "-", "-"); $gencount++; +122, "우사",1592, 0, "낙양", 70, 33, 79, 0, 217, 273, "-", "-"); $gencount++; +138, "원요",1593, 0, "낙양", 44, 42, 45, 0, 177, 206, "-", "-"); $gencount++; + 95, "원유",1594, 0, "낙양", 57, 38, 73, 0, 150, 193, "-", "-"); $gencount++; + 31, "위관",1595, 0, "낙양", 69, 45, 81, 0, 220, 291, "-", "-"); $gencount++; +129, "위막",1596, 0, "낙양", 58, 62, 60, 0, 221, 268, "-", "-"); $gencount++; + 55, "유괴",1597, 0, "낙양", 75, 72, 66, 0, 165, 214, "-", "-"); $gencount++; +129, "유략",1598, 0, "낙양", 72, 68, 59, 0, 206, 260, "-", "-"); $gencount++; + 45, "유반",1599, 0, "낙양", 74, 79, 48, 0, 168, 210, "-", "-"); $gencount++; + 29, "유복",1600, 0, "낙양", 54, 50, 73, 0, 164, 208, "-", "-"); $gencount++; + 78, "유선2",1601, 0, "낙양", 9, 21, 39, 0, 224, 264, "-", "-"); $gencount++; +139, "유섭",1602, 0, "낙양", 62, 79, 26, 0, 158, 190, "-", "-"); $gencount++; + 28, "유소",1603, 0, "낙양", 66, 51, 73, 0, 195, 264, "-", "-"); $gencount++; +128, "유승",1604, 0, "낙양", 46, 69, 29, 0, 215, 258, "-", "-"); $gencount++; +129, "유찬",1605, 0, "낙양", 74, 75, 66, 0, 172, 255, "-", "-"); $gencount++; +129, "유평",1606, 0, "낙양", 65, 70, 67, 0, 218, 272, "-", "-"); $gencount++; +138, "유훈",1607, 0, "낙양", 51, 64, 50, 0, 163, 216, "-", "-"); $gencount++; + 48, "이감",1608, 0, "낙양", 59, 67, 33, 0, 176, 211, "-", "-"); $gencount++; + 19, "이승",1609, 0, "낙양", 13, 26, 32, 0, 201, 249, "-", "-"); $gencount++; + 22, "이통",1610, 0, "낙양", 75, 84, 52, 0, 168, 211, "-", "-"); $gencount++; +138, "이풍2",1611, 0, "낙양", 72, 77, 50, 0, 158, 199, "-", "-"); $gencount++; + 20, "이풍3",1612, 0, "낙양", 23, 25, 71, 0, 204, 254, "-", "-"); $gencount++; + 29, "장구",1613, 0, "낙양", 69, 71, 47, 0, 201, 263, "-", "-"); $gencount++; + 21, "장기",1614, 0, "낙양", 77, 35, 79, 0, 170, 223, "-", "-"); $gencount++; + 74, "장남",1615, 0, "낙양", 71, 64, 38, 0, 187, 222, "-", "-"); $gencount++; +100, "장막",1616, 0, "낙양", 53, 52, 70, 0, 155, 195, "-", "-"); $gencount++; + 7, "장만성",1617, 0, "낙양", 73, 83, 47, 0, 143, 184, "-", "-"); $gencount++; +135, "장반",1618, 0, "낙양", 56, 73, 66, 0, 227, 282, "-", "-"); $gencount++; + 78, "장빈",1619, 0, "낙양", 30, 28, 67, 0, 216, 263, "-", "-"); $gencount++; +124, "장승",1620, 0, "낙양", 75, 68, 75, 0, 178, 244, "-", "-"); $gencount++; +999, "장양2",1621, 0, "낙양", 58, 50, 47, 0, 130, 184, "-", "-"); $gencount++; + 68, "장억",1622, 0, "낙양", 82, 80, 54, 0, 190, 254, "-", "-"); $gencount++; + 75, "장준",1623, 0, "낙양", 65, 67, 66, 0, 224, 263, "-", "-"); $gencount++; + 20, "장집",1624, 0, "낙양", 31, 27, 74, 0, 196, 254, "-", "-"); $gencount++; + 39, "장특",1625, 0, "낙양", 71, 53, 74, 0, 209, 265, "-", "-"); $gencount++; + 96, "저곡",1626, 0, "낙양", 57, 53, 67, 0, 184, 204, "-", "-"); $gencount++; +128, "전기",1627, 0, "낙양", 51, 69, 55, 0, 231, 258, "-", "-"); $gencount++; + 23, "전만",1628, 0, "낙양", 52, 74, 38, 0, 181, 235, "-", "-"); $gencount++; +128, "전상",1629, 0, "낙양", 5, 6, 11, 0, 208, 258, "-", "-"); $gencount++; +130, "전역",1630, 0, "낙양", 60, 62, 37, 0, 212, 265, "-", "-"); $gencount++; + 75, "전예",1631, 0, "낙양", 80, 62, 83, 0, 171, 252, "-", "-"); $gencount++; + 64, "전해",1632, 0, "낙양", 71, 63, 57, 0, 154, 199, "-", "-"); $gencount++; +123, "정봉2",1633, 0, "낙양", 67, 68, 52, 0, 198, 266, "-", "-"); $gencount++; + 22, "정의",1634, 0, "낙양", 17, 3, 66, 0, 184, 220, "-", "-"); $gencount++; + 81, "제갈교",1635, 0, "낙양", 55, 17, 77, 0, 204, 228, "-", "-"); $gencount++; + 40, "제갈서",1636, 0, "낙양", 45, 43, 27, 0, 218, 286, "-", "-"); $gencount++; + 25, "조충",1637, 0, "낙양", 14, 7, 80, 0, 196, 208, "-", "-"); $gencount++; +121, "종리목",1638, 0, "낙양", 84, 68, 75, 0, 214, 269, "-", "-"); $gencount++; + 22, "종육",1639, 0, "낙양", 27, 11, 71, 0, 223, 263, "-", "-"); $gencount++; +122, "좌혁",1640, 0, "낙양", 60, 66, 51, 0, 232, 280, "-", "-"); $gencount++; + 36, "주령",1641, 0, "낙양", 77, 70, 69, 0, 170, 236, "-", "-"); $gencount++; +115, "주앙",1642, 0, "낙양", 75, 64, 64, 0, 162, 195, "-", "-"); $gencount++; + 52, "주포",1643, 0, "낙양", 59, 72, 12, 0, 191, 225, "-", "-"); $gencount++; + 11, "주흔",1644, 0, "낙양", 67, 53, 77, 0, 159, 196, "-", "-"); $gencount++; +140, "진기",1645, 0, "낙양", 58, 67, 46, 0, 165, 198, "-", "-"); $gencount++; +142, "진란",1646, 0, "낙양", 65, 70, 43, 0, 157, 204, "-", "-"); $gencount++; + 25, "진랑",1647, 0, "낙양", 57, 70, 38, 0, 192, 234, "-", "-"); $gencount++; + 12, "진응",1648, 0, "낙양", 62, 69, 49, 0, 172, 208, "-", "-"); $gencount++; +124, "진표",1649, 0, "낙양", 62, 49, 74, 0, 204, 237, "-", "-"); $gencount++; +999, "채염",1650, 0, "낙양", 40, 22, 64, 0, 168, 237, "-", "-"); $gencount++; +999, "초선",1651, 0, "낙양", 66, 15, 72, 0, 176, 211, "-", "-"); $gencount++; +135, "초이",1652, 0, "낙양", 54, 65, 55, 0, 219, 266, "-", "-"); $gencount++; + 65, "추단",1653, 0, "낙양", 63, 71, 36, 0, 148, 193, "-", "-"); $gencount++; +999, "추씨",1654, 0, "낙양", 36, 13, 54, 0, 165, 225, "-", "-"); $gencount++; + 71, "추정",1655, 0, "낙양", 67, 65, 66, 0, 144, 193, "-", "-"); $gencount++; +145, "파재",1656, 0, "낙양", 69, 75, 52, 0, 145, 184, "-", "-"); $gencount++; + 22, "포신",1657, 0, "낙양", 78, 60, 83, 0, 152, 192, "-", "-"); $gencount++; +114, "하식",1658, 0, "낙양", 18, 38, 29, 0, 230, 284, "-", "-"); $gencount++; + 36, "하안",1659, 0, "낙양", 6, 27, 72, 0, 190, 249, "-", "-"); $gencount++; +999, "하후씨",1660, 0, "낙양", 29, 16, 47, 0, 186, 249, "-", "-"); $gencount++; + 5, "학맹",1661, 0, "낙양", 57, 66, 41, 0, 156, 197, "-", "-"); $gencount++; + 98, "한거자",1662, 0, "낙양", 53, 59, 30, 0, 158, 200, "-", "-"); $gencount++; + 19, "한덕",1663, 0, "낙양", 62, 79, 24, 0, 171, 228, "-", "-"); $gencount++; +140, "한윤",1664, 0, "낙양", 27, 24, 68, 0, 155, 197, "-", "-"); $gencount++; +999, "허소",1665, 0, "낙양", 53, 27, 60, 0, 150, 195, "-", "-"); $gencount++; + 30, "호열",1666, 0, "낙양", 77, 69, 76, 0, 225, 272, "-", "-"); $gencount++; + 76, "호제",1667, 0, "낙양", 58, 42, 68, 0, 207, 264, "-", "-"); $gencount++; +149, "호진",1668, 0, "낙양", 65, 77, 13, 0, 146, 190, "-", "-"); $gencount++; + 29, "호질",1669, 0, "낙양", 73, 50, 75, 0, 192, 250, "-", "-"); $gencount++; + 7, "환계",1670, 0, "낙양", 12, 25, 67, 0, 156, 221, "-", "-"); $gencount++; + 56, "황숭",1671, 0, "낙양", 68, 64, 74, 0, 208, 263, "-", "-"); $gencount++; +999, "황승언",1672, 0, "낙양", 68, 17, 81, 0, 165, 222, "-", "-"); $gencount++; +999, "황월영",1673, 0, "낙양", 58, 14, 75, 0, 186, 235, "-", "-"); $gencount++; + 45, "황조",1674, 0, "낙양", 74, 65, 57, 0, 148, 208, "-", "-"); $gencount++; + 48, "후선",1675, 0, "낙양", 56, 66, 35, 0, 175, 228, "-", "-"); $gencount++; + 8, "휴고",1676, 0, "낙양", 61, 72, 40, 0, 151, 199, "-", "-"); $gencount++; + 98, "휴원진",1677, 0, "낙양", 53, 63, 38, 0, 155, 200, "-", "-"); $gencount++; + 22, "희지재",1678, 0, "낙양", 24, 5, 86, 0, 157, 194, "-", "-"); $gencount++; diff --git a/twe_close/index.php b/twe_close/index.php new file mode 100644 index 00000000..3e8e5e49 --- /dev/null +++ b/twe_close/index.php @@ -0,0 +1,9 @@ + + +삼국지 모의전투 유기체서버 + + + + + + diff --git a/twe_close/install.php b/twe_close/install.php new file mode 100644 index 00000000..8deff41b --- /dev/null +++ b/twe_close/install.php @@ -0,0 +1,91 @@ +
재설치하려면 해당 파일을 지우세요"); + + @chmod(".",0707); +?> + + + + + + + +


+

+
+ + + + + + + + + + + +
/inst_top.gif>
+
+ /inst_step1.gif> + +
+ 위의 라이센스를 모두 읽었으며 동의합니다 +

+ /inst_step1-2.gif>


+현재 707로 퍼미션이 되어 있지 않습니다. 텔넷이나 FTP에서 퍼미션을 조정하세요. +
+
+
+ + + + + + +
+ +
+ "; +} else { + echo " +

+ + + + + + +
+ +
+ "; +} +?> +
+
+ + + diff --git a/twe_close/install1.php b/twe_close/install1.php new file mode 100644 index 00000000..12e49135 --- /dev/null +++ b/twe_close/install1.php @@ -0,0 +1,85 @@ +
재설치하려면 해당 파일을 지우세요"); +?> + + + + + + + + + +


+
+ + + + + + + + + + +
/inst_top.gif>
+
+ /inst_step2.gif> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Host NameMySQL DB의 호스트네임을 입력하세요.
SQL User IDMySQL계정의 ID를 입력하세요
PasswordMysql DB의 패스워드를 입력하세요
DB NameMysql DB의 Name을 입력하세요


/inst_b_2.gif border=0 align=absmiddle>
+
+
+ + + diff --git a/twe_close/install2.php b/twe_close/install2.php new file mode 100644 index 00000000..2a8bbcfb --- /dev/null +++ b/twe_close/install2.php @@ -0,0 +1,122 @@ + + + + + + + + +


+
+ + + + + + + +
/inst_top.gif>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ /inst_step3.gif> +
TurnTerm  + 0:120분, 1:60분, 2:30분, 3:20분, 4:10분, 5:5분, 6:2분, 7:1분 +
TurnTerm  + 0:무동기, 1:13시 시작으로 동기 +
시나리오 + +
가상상성 + 0:사실상성, 1:가상상성 +
확장장수 + 0:비확장, 1:확장장수등장 +
NPC유저 + 0:불가능, 1:가능 +
이미지  + 0:없음, 1:전콘, 2:병종, 3:엔장 +
시나리오 종류 + 역사모드
+ 0 : 180년 공백지
+ 1 : 184년 황건적의 난
+ 2 : 190년 반동탁연합
+ 3 : 194년 군웅할거
+ 4 : 196년 황제는 허도로
+ 5 : 200년 관도대전
+ 6 : 202년 원가의 분열
+ 7 : 207년 적벽대전
+ 8 : 213년 익주 공방전
+ 9 : 219년 삼국정립
+ 10 : 225년 칠종칠금
+ 11 : 228년 출사표
+ IF모드
+ 12 : 191년 백마장군의 위세
+ + 가상모드
+ 20 : 180년 영웅 난무
+ 21 : 180년 영웅 집결
+ 22 : 179년 훼신 집결
+ 23 : 180년 영웅 시대
+ 24 : 180년 결사항전
+ 25 : 180년 영웅독존
+ 26 : 180년 무풍지대
+ 27 : 180년 가요대잔치
+ 28 : 180년 확산성 밀리언 아서
+


+ /inst_b_3.gif border=0 align=absmiddle> +
+ + + diff --git a/twe_close/install2_ok.php b/twe_close/install2_ok.php new file mode 100644 index 00000000..9c83711c --- /dev/null +++ b/twe_close/install2_ok.php @@ -0,0 +1,348 @@ +웹 IRC
: http://barosl.com/webirc/흠냐
폭력적/선정적인 전콘/전메는 블럭/삭제 대상이 될 수 있습니다.', + 500, 300, 55, 120, 100, 100, + '$turntime', '$starttime', '$turnterm', '$killturn', + 5, '$startyear', '$scenario', '$img', '$npcmode', '$extend', '$fiction', + + 100, 150, 7, 10, 9, 9, -- 보병 + 100, 200, 7, 10, 10, 11, -- 청주병(중원) + 150, 150, 7, 10, 11, 10, -- 수병(오월) + 100, 150, 7, 20, 10, 10, -- 자객병(저) + 150, 200, 7, 10, 12, 12, -- 근위병(낙양) + 100, 250, 7, 5, 13, 10, -- 등갑병(남중) + + 100, 100, 7, 20, 10, 10, -- 궁병 + 100, 100, 8, 30, 11, 12, -- 궁기병(동이) + 150, 100, 8, 20, 12, 11, -- 연노병(서촉) + 150, 150, 7, 20, 13, 13, -- 강궁병(양양) + 200, 100, 7, 20, 13, 13, -- 석궁병(건업) + + 150, 100, 7, 5, 11, 11, -- 기병 + 200, 100, 7, 5, 12, 13, -- 백마병(하북) + 150, 150, 7, 5, 13, 12, -- 중장기병(서북) + 200, 100, 8, 5, 13, 11, -- 돌격기병(흉노) + 100, 200, 7, 5, 11, 13, -- 철기병(강) + 150, 100, 8, 15, 12, 12, -- 수렵기병(산월) + 250, 200, 6, 0, 16, 16, -- 맹수병(남만) + 200, 150, 7, 5, 14, 14, -- 호표기병(허창) + + 80, 80, 7, 5, 9, 9, -- 귀병 + 80, 80, 7, 20, 10, 10, -- 신귀병(초) + 80, 130, 7, 5, 9, 11, -- 백귀병(오환) + 130, 80, 7, 5, 11, 9, -- 흑귀병(왜) + 130, 130, 7, 0, 12, 12, -- 악귀병(장안) + 60, 60, 7, 10, 8, 8, -- 남귀병 + 110, 110, 7, 0, 13, 10, -- 황귀병(낙양) + 80, 130, 7, 15, 11, 12, -- 천귀병(성도) + 130, 80, 7, 15, 12, 11, -- 마귀병(업) + + 100, 100, 6, 0, 15, 5, -- 정란 + 150, 100, 6, 0, 20, 5, -- 충차 + 200, 100, 6, 0, 25, 5, -- 벽력거(업) + 50, 200, 5, 0, 30, 5 -- 목우(성도) + )", + $connect +) or Error(__LINE__.MYDB_error($connect),""); + +// 도시정보 입력 +// 이름 규모 인구 농업 상업 치안 수비 성벽 지역 경로 +insertCity($connect, "업", 8, 620500, 12500, 11300, 10000, 11700, 12200, 1, "9|18|70|78|80"); // 1 : 업 +insertCity($connect, "허창", 8, 587600, 12100, 12400, 10000, 11700, 12500, 2, "10|19|38|71|74|80"); // 2 : 허창 +insertCity($connect, "낙양", 8, 835700, 11700, 12000, 10000, 12100, 12400, 2, "70|71|72|74"); // 3 : 낙양 +insertCity($connect, "장안", 8, 592300, 11600, 12300, 10000, 12000, 11800, 3, "41|73|86"); // 4 : 장안 +insertCity($connect, "성도", 8, 652500, 12300, 12500, 10000, 12500, 12300, 4, "26|27|87"); // 5 : 성도 +insertCity($connect, "양양", 8, 583700, 12000, 12600, 10000, 11500, 11700, 6, "51|89"); // 6 : 양양 +insertCity($connect, "건업", 8, 638600, 11600, 12300, 10000, 11500, 11900, 7, "31|82|83"); // 7 : 건업 + +insertCity($connect, "북평", 7, 486200, 10200, 9500, 8000, 10300, 9900, 1, "77|90"); // 8 : 북평 +insertCity($connect, "남피", 7, 503200, 9900, 10100, 8000, 10100, 10500, 1, "1|36|77"); // 9 : 남피 +insertCity($connect, "완", 7, 472400, 10300, 10000, 8000, 10100, 9900, 2, "2|20|51|71"); // 10 : 완 +insertCity($connect, "수춘", 7, 514300, 9900, 9600, 8000, 9900, 9500, 2, "12|20|38|82"); // 11 : 수춘 +insertCity($connect, "서주", 7, 485300, 10100, 9800, 8000, 10200, 9700, 2, "11|21|38|39"); // 12 : 서주 +insertCity($connect, "강릉", 7, 485000, 10500, 9600, 8000, 9500, 9600, 6, "14|53|88|89"); // 13 : 강릉 +insertCity($connect, "장사", 7, 471000, 9700, 9900, 8000, 10000, 10500, 6, "13|15|30|53|54"); // 14 : 장사 +insertCity($connect, "시상", 7, 525200, 9800, 10000, 10000, 9900, 9600, 7, "14|56|58|91|92"); // 15 : 시상 +insertCity($connect, "위례", 7, 492600, 10000, 9300, 8000, 9800, 10300, 8, "32|33|34|60|79"); // 16 : 위례 + +insertCity($connect, "계", 6, 388500, 7500, 8000, 6000, 7800, 8100, 1, "35|77"); // 17 : 계 +insertCity($connect, "복양", 6, 418500, 8000, 8300, 6000, 8200, 8000, 2, "1|19|78|81"); // 18 : 복양 +insertCity($connect, "진류", 6, 395700, 8200, 8000, 6000, 8000, 8300, 2, "2|18|74|80|81"); // 19 : 진류 +insertCity($connect, "여남", 6, 383100, 7700, 8100, 6000, 8400, 7700, 2, "10|11|38"); // 20 : 여남 +insertCity($connect, "하비", 6, 427800, 8500, 8300, 6000, 8200, 7800, 2, "12|83"); // 21 : 하비 +insertCity($connect, "서량", 6, 387400, 7700, 7900, 6000, 8300, 8000, 3, "40|63|64"); // 22 : 서량 +insertCity($connect, "하내", 6, 373600, 7700, 8100, 6000, 8100, 8000, 3, "35|42|65|70"); // 23 : 하내 +insertCity($connect, "한중", 6, 402700, 7700, 8400, 6000, 8000, 8500, 4, "25|75|86"); // 24 : 한중 +insertCity($connect, "상용", 6, 368700, 7800, 7600, 6000, 7700, 8100, 4, "24|51"); // 25 : 상용 +insertCity($connect, "덕양", 6, 380300, 8100, 8400, 6000, 7900, 7700, 4, "5|27|44|45"); // 26 : 덕양 +insertCity($connect, "강주", 6, 412600, 7900, 8000, 6000, 8400, 8100, 4, "5|26|45|46|47"); // 27 : 강주 +insertCity($connect, "건녕", 6, 376500, 8200, 8000, 6000, 8600, 8100, 5, "46|48|49"); // 28 : 건녕 +insertCity($connect, "남해", 6, 380300, 8200, 7600, 6000, 8000, 8100, 5, "50|55|59|67"); // 29 : 남해 +insertCity($connect, "계양", 6, 395500, 8300, 8000, 6000, 8100, 7700, 6, "14|54|55"); // 30 : 계양 +insertCity($connect, "오", 6, 435500, 7700, 8100, 6000, 7700, 7600, 7, "7|57|92|93"); // 31 : 오 +insertCity($connect, "평양", 6, 398200, 7800, 8000, 6000, 8300, 7800, 8, "16|61"); // 32 : 평양 +insertCity($connect, "사비", 6, 415700, 7700, 7900, 6000, 7800, 8000, 8, "16|34|93"); // 33 : 사비 +insertCity($connect, "계림", 6, 391100, 8000, 7400, 6000, 8100, 7800, 8, "16|33|62|93"); // 34 : 계림 + +insertCity($connect, "진양", 5, 307400, 5600, 5900, 4000, 6400, 5900, 1, "17|23|70"); // 35 : 진양 +insertCity($connect, "평원", 5, 307400, 6200, 6500, 4000, 6100, 6300, 1, "9|37|78"); // 36 : 평원 +insertCity($connect, "북해", 5, 314600, 5500, 6300, 4000, 6300, 5800, 1, "36|39|79"); // 37 : 북해 +insertCity($connect, "초", 5, 328600, 6000, 6200, 4000, 6200, 5700, 2, "2|11|12|20|81"); // 38 : 초 +insertCity($connect, "패", 5, 287700, 6400, 5800, 4000, 5800, 5900, 2, "12|37|81"); // 39 : 패 +insertCity($connect, "천수", 5, 298500, 5900, 6400, 4000, 6000, 5800, 3, "22|41|64|84"); // 40 : 천수 +insertCity($connect, "안정", 5, 276400, 5700, 5900, 4000, 5700, 6200, 3, "4|40|85"); // 41 : 안정 +insertCity($connect, "홍농", 5, 274800, 5700, 6300, 4000, 5800, 6300, 3, "23|72|73"); // 42 : 홍농 +insertCity($connect, "하변", 5, 278500, 5800, 6200, 4000, 6000, 5600, 4, "76|85"); // 43 : 하변 +insertCity($connect, "자동", 5, 287000, 5700, 5500, 4000, 6000, 5800, 4, "26|75|76|87"); // 44 : 자동 +insertCity($connect, "영안", 5, 315300, 6200, 5900, 4000, 5800, 5900, 4, "26|27|88"); // 45 : 영안 +insertCity($connect, "귀양", 5, 274600, 5800, 6100, 4000, 6100, 5800, 5, "27|28|47"); // 46 : 귀양 +insertCity($connect, "주시", 5, 282800, 6000, 5900, 4000, 5800, 6300, 5, "27|46|48"); // 47 : 주시 +insertCity($connect, "운남", 5, 325800, 6200, 6000, 4000, 6400, 6100, 5, "28|47|66"); // 48 : 운남 +insertCity($connect, "남영", 5, 285300, 5900, 6200, 4000, 5800, 5700, 5, "28|54|66"); // 49 : 남영 +insertCity($connect, "교지", 5, 319500, 5800, 5900, 4000, 5800, 5900, 5, "29|66"); // 50 : 교지 +insertCity($connect, "신야", 5, 278600, 6000, 6200, 4000, 5800, 5500, 6, "6|10|25"); // 51 : 신야 +insertCity($connect, "강하", 5, 307400, 5500, 5600, 4000, 5700, 6000, 6, "89|91"); // 52 : 강하 +insertCity($connect, "무릉", 5, 319600, 5800, 6300, 4000, 6300, 5800, 6, "13|14|54"); // 53 : 무릉 +insertCity($connect, "영릉", 5, 284900, 6200, 5800, 4000, 6200, 6200, 6, "14|30|49|53"); // 54 : 영릉 +insertCity($connect, "상동", 5, 276700, 5800, 5900, 4000, 6200, 5800, 6, "29|30|58"); // 55 : 상동 +insertCity($connect, "여강", 5, 290500, 5600, 5800, 4000, 6000, 5500, 7, "15|82|91|92"); // 56 : 여강 +insertCity($connect, "회계", 5, 300500, 6400, 5900, 4000, 6200, 6400, 7, "31|67"); // 57 : 회계 +insertCity($connect, "고창", 5, 280200, 5700, 6200, 4000, 5800, 6300, 7, "15|55|67"); // 58 : 고창 +insertCity($connect, "대", 5, 325600, 6000, 6200, 4000, 5700, 6000, 7, "29|67|94"); // 59 : 대 +insertCity($connect, "안평", 5, 293700, 6300, 5900, 4000, 5900, 6300, 8, "16|61|79|90"); // 60 : 안평 +insertCity($connect, "졸본", 5, 293900, 5500, 5900, 4000, 6000, 5800, 8, "32|60|68"); // 61 : 졸본 +insertCity($connect, "이도", 5, 317400, 5800, 6100, 4000, 5800, 5600, 8, "34|69|93"); // 62 : 이도 + +insertCity($connect, "강", 4, 209500, 4000, 4200, 2000, 4300, 4000, 3, "22|84"); // 63 : 강 +insertCity($connect, "저", 4, 195700, 4000, 4200, 2000, 4300, 4200, 3, "22|40|85"); // 64 : 저 +insertCity($connect, "흉노", 4, 206400, 4000, 4100, 2000, 4000, 3800, 3, "23|84"); // 65 : 흉노 +insertCity($connect, "남만", 4, 237800, 4000, 4200, 2000, 4300, 4500, 5, "48|49|50"); // 66 : 남만 +insertCity($connect, "산월", 4, 227500, 4000, 3700, 2000, 4300, 3800, 7, "29|57|58|59"); // 67 : 산월 +insertCity($connect, "오환", 4, 215300, 4200, 3700, 2000, 4300, 4000, 8, "61|90"); // 68 : 오환 +insertCity($connect, "왜", 4, 206500, 3900, 3700, 2000, 4300, 4100, 8, "62|94"); // 69 : 왜 + +insertCity($connect, "호관", 3, 88700, 1900, 1800, 2000, 9500, 9600, 1, "1|3|23|35"); // 70 : 호관 +insertCity($connect, "호로", 3, 111200, 2200, 2100, 2000, 10300, 9800, 2, "2|3|10"); // 71 : 호로 +insertCity($connect, "사곡", 3, 100800, 2100, 1900, 2000, 9900, 10100, 3, "3|42"); // 72 : 사곡 +insertCity($connect, "함곡", 3, 108100, 2000, 2200, 2000, 10100, 10200, 3, "4|42"); // 73 : 함곡 +insertCity($connect, "사수", 3, 95800, 1700, 1900, 2000, 9500, 9600, 2, "2|3|19|80"); // 74 : 사수 +insertCity($connect, "양평", 3, 86800, 1900, 1900, 2000, 9700, 9600, 4, "24|44|86"); // 75 : 양평 +insertCity($connect, "가맹", 3, 85500, 1700, 1800, 2000, 9600, 9500, 4, "43|44"); // 76 : 가맹 + +insertCity($connect, "역경", 2, 98500, 1800, 1900, 2000, 3900, 4100, 1, "8|9|17"); // 77 : 역경 +insertCity($connect, "계교", 2, 101200, 2100, 1900, 2000, 4000, 4200, 1, "1|18|36"); // 78 : 계교 +insertCity($connect, "동황", 2, 99200, 1900, 2100, 2000, 3800, 4000, 1, "16|37|60"); // 79 : 동황 +insertCity($connect, "관도", 2, 112300, 2200, 2000, 2000, 4200, 4300, 2, "1|2|19|74"); // 80 : 관도 +insertCity($connect, "정도", 2, 108500, 2100, 2100, 2000, 4100, 3800, 2, "18|19|38|39"); // 81 : 정도 +insertCity($connect, "합비", 2, 99800, 2000, 1900, 2000, 3900, 4100, 2, "7|11|56"); // 82 : 합비 +insertCity($connect, "광릉", 2, 100100, 2000, 2100, 2000, 4100, 4000, 2, "7|21"); // 83 : 광릉 +insertCity($connect, "적도", 2, 95200, 1800, 1700, 2000, 3800, 3700, 3, "40|63|65"); // 84 : 적도 +insertCity($connect, "가정", 2, 93100, 1700, 1700, 2000, 3600, 3800, 3, "41|43|64"); // 85 : 가정 +insertCity($connect, "기산", 2, 100500, 1900, 1800, 2000, 4100, 4000, 4, "4|24|75"); // 86 : 기산 +insertCity($connect, "면죽", 3, 109300, 2200, 2100, 2000, 10800, 9900, 4, "5|44"); // 87 : 면죽 +insertCity($connect, "이릉", 2, 96800, 1800, 1900, 2000, 3900, 4100, 6, "13|45"); // 88 : 이릉 +insertCity($connect, "장판", 2, 103200, 2100, 2000, 2000, 4000, 3700, 6, "6|13|52|91"); // 89 : 장판 +insertCity($connect, "백랑", 2, 105200, 2200, 1900, 2000, 3800, 4200, 8, "8|60|68"); // 90 : 백랑 + +insertCity($connect, "적벽", 1, 111700, 2300, 2100, 2000, 4200, 4100, 7, "15|52|56|89"); // 91 : 적벽 +insertCity($connect, "파양", 1, 103700, 2000, 2200, 2000, 3800, 3800, 7, "15|31|56"); // 92 : 파양 +insertCity($connect, "탐라", 1, 113000, 2200, 2100, 2000, 4300, 4100, 8, "31|33|34|62"); // 93 : 탐라 +insertCity($connect, "유구", 1, 92100, 1700, 1800, 2000, 3700, 3700, 8, "59|69"); // 94 : 유구 + +switch($scenario) { + case 0: echo ""; break; + case 1: echo ""; break; + case 2: echo ""; break; + case 3: echo ""; break; + case 4: echo ""; break; + case 5: echo ""; break; + case 6: echo ""; break; + case 7: echo ""; break; + case 8: echo ""; break; + case 9: echo ""; break; + case 10: echo ""; break; + case 11: echo ""; break; + + case 12: echo ""; break; + + case 20: echo ""; break; + case 21: echo ""; break; + case 22: echo ""; break; + case 23: echo ""; break; + case 24: echo ""; break; + case 25: echo ""; break; + case 26: echo ""; break; + case 27: echo ""; break; + case 28: echo ""; break; + default: echo ""; break; +} + +function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def2, $wall2, $region, $path) { + switch($level) { + case 1: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; + case 2: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; + case 3: $pop = 10000; $agri = 100; $comm = 100; $secu = 100; $def = 1000; $wall = 1000; break; + case 4: $pop = 50000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 1000; $wall = 1000; break; + case 5: $pop = 100000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 2000; $wall = 2000; break; + case 6: $pop = 100000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 3000; $wall = 3000; break; + case 7: $pop = 150000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 4000; $wall = 4000; break; + case 8: $pop = 150000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 5000; $wall = 5000; break; + } + + @MYDB_query(" + insert into city ( + name, level, path, pop, pop2, agri, agri2, comm, comm2, secu, secu2, rate, + trade, def, def2, wall, wall2, gen1, gen2, gen3, region + ) values ( + '$name', '$level', '$path', '$pop', '$pop2', '$agri', '$agri2', '$comm', '$comm2', '$secu', '$secu2', 50, + 100, '$def', '$def2', '$wall', '$wall2', 0, 0, 0, '$region' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> diff --git a/twe_close/install3_ok.php b/twe_close/install3_ok.php new file mode 100644 index 00000000..3d4f74b0 --- /dev/null +++ b/twe_close/install3_ok.php @@ -0,0 +1,10 @@ +location.replace('index.php');"; +?> diff --git a/twe_close/install_ok.php b/twe_close/install_ok.php new file mode 100644 index 00000000..3d0326c3 --- /dev/null +++ b/twe_close/install_ok.php @@ -0,0 +1,97 @@ +
재설치하려면 해당 파일을 지우세요"); + +// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사 +if(isBlank($hostname)) Error("HostName을 입력하세요",""); +if(isBlank($user_id)) Error("User ID 를 입력하세요",""); +if(isBlank($dbname)) Error("DB NAME을 입력하세요",""); + +// DB에 커넥트 하고 DB NAME으로 select DB +$connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect
Error!!!",""); +if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); +MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select
Error!!!",""); + +delInDir("logs"); +delInDir("data/session"); +@unlink("data/connected.php"); + +// 관리자 테이블 삭제 +if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),""); +// 락 테이블 삭제 +if(isTable($connect, "plock", $dbname)) @MYDB_query("drop table plock", $connect) or Error("drop ".MYDB_error($connect),""); +// 장수 테이블 삭제 +if(isTable($connect, "general", $dbname)) @MYDB_query("drop table general", $connect) or Error("drop ".MYDB_error($connect),""); +// 국가 테이블 삭제 +if(isTable($connect, "nation", $dbname)) @MYDB_query("drop table nation", $connect) or Error("drop ".MYDB_error($connect),""); +// 도시 테이블 삭제 +if(isTable($connect, "city", $dbname)) @MYDB_query("drop table city", $connect) or Error("drop ".MYDB_error($connect),""); +// 부대 테이블 삭제 +if(isTable($connect, "troop", $dbname)) @MYDB_query("drop table troop", $connect) or Error("drop ".MYDB_error($connect),""); +// 토큰 테이블 삭제 +if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 외교 테이블 삭제 +if(isTable($connect, "diplomacy", $dbname)) @MYDB_query("drop table diplomacy", $connect) or Error("drop ".MYDB_error($connect),""); +// 토너먼트 테이블 삭제 +if(isTable($connect, "tournament", $dbname)) @MYDB_query("drop table tournament", $connect) or Error("drop ".MYDB_error($connect),""); +// 거래 테이블 삭제 +if(isTable($connect, "auction", $dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),""); +// 통계 테이블 삭제 +if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),""); +// 연감 테이블 삭제 +if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),""); + +// 관리자 테이블 생성 +if(!isTable($connect, "game", $dbname)) @MYDB_query($game_schema, $connect) or Error("create game ".MYDB_error($connect),""); +// 락 테이블 생성 +if(!isTable($connect, "plock", $dbname)) @MYDB_query($plock_schema, $connect) or Error("create plock ".MYDB_error($connect),""); +// 장수 테이블 생성 +if(!isTable($connect, "general", $dbname)) @MYDB_query($general_schema, $connect) or Error("create general ".MYDB_error($connect),""); +// 국가 테이블 생성 +if(!isTable($connect, "nation", $dbname)) @MYDB_query($nation_schema, $connect) or Error("create nation ".MYDB_error($connect),""); +// 도시 테이블 생성 +if(!isTable($connect, "city", $dbname)) @MYDB_query($city_schema, $connect) or Error("create city ".MYDB_error($connect),""); +// 부대 테이블 생성 +if(!isTable($connect, "troop", $dbname)) @MYDB_query($troop_schema, $connect) or Error("create troop ".MYDB_error($connect),""); +// 토큰 테이블 생성 +if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 외교 테이블 생성 +if(!isTable($connect, "diplomacy", $dbname)) @MYDB_query($diplomacy_schema, $connect) or Error("create diplomacy ".MYDB_error($connect),""); +// 전당 테이블 생성 +if(!isTable($connect, "hall", $dbname)) { + MYDB_query($hall_schema, $connect) or Error("create hall ".MYDB_error($connect),""); + for($i=0; $i < 21; $i++) { + for($j=0; $j < 10; $j++) { + MYDB_query("insert into hall (type, rank) values ({$i}, {$j})", $connect); + } + } +} + +// 왕조 테이블 생성 +if(!isTable($connect, "emperior",$dbname)) @MYDB_query($emperior_schema, $connect) or Error("create emperior ".MYDB_error($connect),""); +// 토너먼트 테이블 생성 +if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error("create tournament ".MYDB_error($connect),""); +// 거래 테이블 생성 +if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error("create auction ".MYDB_error($connect),""); +// 통계 테이블 생성 +if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error("create statistic ".MYDB_error($connect),""); +// 연감 테이블 생성 +if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),""); + +// 파일로 DB 정보 저장 +$file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fclose($file); +@mkdir("data",0707); +@chmod("data",0707); +@chmod("d_setting/set.php",0707); + +$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect)); + +MYDB_close($connect); + +echo ""; +?> diff --git a/twe_close/join.php b/twe_close/join.php new file mode 100644 index 00000000..f6462cbc --- /dev/null +++ b/twe_close/join.php @@ -0,0 +1,246 @@ +history.go(-1);"; + exit(1); +} + +$connect = dbConn(); + +$abil = abilityRand(); + +//토큰 테이블에서 정보확인 +$query = "select id from token where id='{$id}'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$token = MYDB_fetch_array($result); + +if(!$token) { + //능력치 토큰 생성 + $query = " + insert into token ( + id, leader, power, intel + ) values ( + '{$id}', {$abil['leader']}, {$abil['power']}, {$abil['intel']} + )"; + $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +} else { + $query = "update token set leader={$abil['leader']},power={$abil['power']},intel={$abil['intel']} where id='{$id}'"; + MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); +} + +?> + + + +장수생성 + + + + + + + + + +
장 수 생 성
+ + +
+= $admin[maxgeneral]) { + echo ""; + echo ""; + exit(); +} +?> + + + +"; + } else { + echo " + "; + } +} +?> +
임관 권유 메세지
$nation[name]-
$nation[name]$nation[scoutmsg]
+ +
+ + + + + + + + + + += 1 && $member[grade] >= 1 && $member[picture] != "") { + $imageTemp = GetImageURL($member[imgsvr]); + echo " + + + + + + "; +} +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
장수 생성
장수명 + >(6글자 이내) +
전콘 사용 여부 + + + 사용 +
+ 계정관리에서 자신만을 표현할 수 있는 아이콘을 업로드 해보세요! +
성격 + ※보정은 도움말 참고 +
통솔
무력
지력
능력치 조정 + + + + +
+ 모든 능력치는 ( 10 <= 능력치 <= 75 ) 사이로 잡으셔야 합니다.
+ 그 외의 능력치는 가입되지 않습니다.
+
+ 능력치의 총합은 150입니다. 가입후 0~10의 능력치 보너스를 받게 됩니다.
+ 임의의 도시에서 재야로 시작하며 건국과 임관은 게임 내에서 실행합니다. +
+
+ + + +
+ + diff --git a/twe_close/join_post.php b/twe_close/join_post.php new file mode 100644 index 00000000..52384fb3 --- /dev/null +++ b/twe_close/join_post.php @@ -0,0 +1,275 @@ +history.go(-1);"; + exit(1); +} + +$date = date('Y-m-d H:i:s'); +//등록정보 +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +$connect = dbConn(); + +########## 동일 정보 존재여부 확인. ########## + +$query = "select year,month,scenario,maxgeneral,turnterm,genius,img from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$query = "select no from general where npc<2"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +$query = "select no from general where user_id='$member[id]'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$id_num = MYDB_num_rows($result); + +$query = "select no from general where name='$name'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$name_num = MYDB_num_rows($result); + +$query = "select * from token where id='$member[id]'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$token_num = MYDB_num_rows($result); + +if($token_num == 1) { + $token = MYDB_fetch_array($result); + $leader = $token['leader']; + $power = $token['power']; + $intel = $token['intel']; +} else { + $leader = 0; + $power = 0; + $intel = 0; +} + +if($id_num) { + echo(""); + exit; +} elseif($name_num) { + echo(""); + exit; +} elseif($token_num != 1) { + echo(""); + exit; +} elseif($admin[maxgeneral] <= $gencount) { + echo(""); + exit; +} elseif($id == "") { + echo(""); + exit; +} elseif(_String::GetStrLen($name) < 1) { + echo(""); + exit; +} elseif($name == "") { + echo(""); + exit; +} elseif(_String::GetStrLen($name) > 6) { + echo(""); + exit; +} elseif($leader + $power + $intel > 150) { + echo(""); + exit; +} elseif($leader > 75 || $leader < 10 || $power > 75 || $power < 10 || $intel > 75 || $intel < 10) { + echo(""); + exit; +} elseif($character < 0 || $character > 11) { + echo(""); + exit; +} else { + $ratio = rand() % 100; + // 현재 1% + if($ratio == 50 && $admin[genius] > 0) { + $genius = 1; + + $query = "update game set genius=genius-1 where no='1'"; + MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + } else { + $genius = 0; + } + + //중, 소 공백지 개수 + $query = "select city from city where level>=5 and level<=6 and nation=0"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + // 공백지에서만 태어나게 + if($citycount > 0) { + $query = "select city from city where level>=5 and level<=6 and nation=0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } else { + $query = "select city from city where level>=5 and level<=6 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } + $city = $city[city]; + + $total = rand() % 6; + $pleader = rand() % 100; + $ppower = rand() % 100; + $pintel = rand() % 100; + $rate = $pleader + $ppower + $pintel; + $pleader = floor($pleader / $rate * $total + 0.5); + $ppower = floor($ppower / $rate * $total + 0.5); + $pintel = floor($pintel / $rate * $total + 0.5); + + $leader = $leader + $pleader; + $power = $power + $ppower; + $intel = $intel + $pintel; + + $age = 20 + ($pleader + $ppower + $pintel) * 2 + (rand() % 2); + // 아직 남았고 천재등록상태이면 특기 부여 + if($genius == 1) { + $specage2 = $age; + $special2 = getSpecial2($connect, $leader, $power, $intel); + } else { + $specage2 = round((80 - $age)/3) + $age; + $special2 = 0; + } + //내특 + $specage = round((80 - $age)/12) + $age; + $special = 0; + + if($admin[scenario] > 0) { + $specage2 = $age + 3; + $specage = $age + 3; + } + + $turntime = getRandTurn($admin[turnterm]); + + $lastconnect = date('Y-m-d H:i:s'); + if($lastconnect >= $turntime) { + $turntime = addTurn($turntime, $admin[turnterm]); + } + + //특회 전콘 + if($admin[img] >= 1 && $member[grade] >= 1 && $member[picture] != "" && $pic == 1) { + $face = $member[picture]; + $imgsvr = $member[imgsvr]; + } else { + $face = "default.jpg"; + $imgsvr = 0; + } + //특회 + $userlevel = $member[grade]; + + //성격 랜덤시 + if($character == 11) $character = rand()%10; + //상성 랜덤 + $npcmatch = rand()%150 + 1; + + ########## 회원정보 테이블에 입력값을 등록한다. ########## + $query = " + insert into general ( + user_id, password, name, picture, imgsvr, nation, city, troop, npcmatch, + leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, + userlevel, level, turntime, killturn, lastconnect, makelimit, age, startage, personal, specage, special, specage2, special2 + ) values ( + '$id', '$pwTemp', '$name', '$face', '$imgsvr', '0', '$city', '0', '$npcmatch', + '$leader', '$power', '$intel', '0', '0', '1000', '1000', '0', '0', '0', + '$userlevel', '0', '$turntime', '6', '$lastconnect', '0', '$age', '$age', '$character', '$specage', '$special', '$specage2', '$special2' + )"; + $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name,history from general where user_id='$id'"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[name] == "") { + $r = rand() % 999 + 1; + $me[name] = '장수-'.$r; + + $query = "update general set name='$me[name]' where user_id='$id'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $cityname = getCity($connect, $city, "name"); + if($genius == 1) { + $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 기재가 천하에 이름을 알립니다."; + $log[1] = "●{$admin[month]}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; + + $history[0] = "●$admin[year]년 $admin[month]월:【천재】$cityname[name]에 천재가 등장했습니다."; + pushHistory($connect, $history); + } else { + $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 호걸이 천하에 이름을 알립니다."; + } + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name], $cityname[name]에서 큰 뜻을 품다."); + $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; + $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; + $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; + $mylog[count($mylog)] = "●부디 즐거운 삼모전 되시길 바랍니다 ^^"; + $mylog[count($mylog)] = "●통솔 $pleader 무력 $ppower 지력 $pintel 의 보너스를 받으셨습니다."; + $mylog[count($mylog)] = "●연령은 $age세로 시작합니다."; + if($genius == 1) { + $mylog[count($mylog)] = "●축하합니다! 천재로 태어나 처음부터 ".getGenSpecial($special2)." 특기를 가지게 됩니다!"; + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); + } + pushGenLog($me, $mylog); + pushAllLog($log); + + $adminLog[0] = "가입 : {$name} // {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); + pushAdminLog($connect, $adminLog); + + MYDB_close($connect); + + echo(""); + echo(""); +} + +?> diff --git a/twe_close/join_post.php.orig b/twe_close/join_post.php.orig new file mode 100644 index 00000000..ed10c24b --- /dev/null +++ b/twe_close/join_post.php.orig @@ -0,0 +1,275 @@ +history.go(-1);"; + exit(1); +} + +$date = date('Y-m-d H:i:s'); +//등록정보 +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +$connect = dbConn(); + +########## 동일 정보 존재여부 확인. ########## + +$query = "select year,month,scenario,maxgeneral,turnterm,genius,img from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$query = "select no from general where npc<2"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +$query = "select no from general where user_id='$member[id]'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$id_num = MYDB_num_rows($result); + +$query = "select no from general where name='$name'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$name_num = MYDB_num_rows($result); + +$query = "select * from token where id='$member[id]'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$token_num = MYDB_num_rows($result); + +if($token_num == 1) { + $token = MYDB_fetch_array($result); + $leader = $token['leader']; + $power = $token['power']; + $intel = $token['intel']; +} else { + $leader = 0; + $power = 0; + $intel = 0; +} + +if($id_num) { + echo(""); + exit; +} elseif($name_num) { + echo(""); + exit; +} elseif($token_num != 1) { + echo(""); + exit; +} elseif($admin[maxgeneral] <= $gencount) { + echo(""); + exit; +} elseif($id == "") { + echo(""); + exit; +} elseif(_String::GetStrLen($name) < 1) { + echo(""); + exit; +} elseif($name == "") { + echo(""); + exit; +} elseif(_String::GetStrLen($name) > 6) { + echo(""); + exit; +} elseif($leader + $power + $intel > 150) { + echo(""); + exit; +} elseif($leader > 75 || $leader < 10 || $power > 75 || $power < 10 || $intel > 75 || $intel < 10) { + echo(""); + exit; +} elseif($character < 0 || $character > 11) { + echo(""); + exit; +} else { + $ratio = rand() % 100; + // 현재 1% + if($ratio == 50 && $admin[genius] > 0) { + $genius = 1; + + $query = "update game set genius=genius-1 where no='1'"; + MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + } else { + $genius = 0; + } + + //중, 소 공백지 개수 + $query = "select city from city where level>=5 and level<=6 and nation=0"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + // 공백지에서만 태어나게 + if($citycount > 0) { + $query = "select city from city where level>=5 and level<=6 and nation=0 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } else { + $query = "select city from city where level>=5 and level<=6 order by rand() limit 0,1"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $city = MYDB_fetch_array($result); + } + $city = $city[city]; + + $total = rand() % 6; + $pleader = rand() % 100; + $ppower = rand() % 100; + $pintel = rand() % 100; + $rate = $pleader + $ppower + $pintel; + $pleader = floor($pleader / $rate * $total + 0.5); + $ppower = floor($ppower / $rate * $total + 0.5); + $pintel = floor($pintel / $rate * $total + 0.5); + + $leader = $leader + $pleader; + $power = $power + $ppower; + $intel = $intel + $pintel; + + $age = 20 + ($pleader + $ppower + $pintel) * 2 + (rand() % 2); + // 아직 남았고 천재등록상태이면 특기 부여 + if($genius == 1) { + $specage2 = $age; + $special2 = getSpecial2($connect, $leader, $power, $intel); + } else { + $specage2 = round((80 - $age)/3) + $age; + $special2 = 0; + } + //내특 + $specage = round((80 - $age)/12) + $age; + $special = 0; + + if($admin[scenario] > 0) { + $specage2 = $age + 3; + $specage = $age + 3; + } + + $turntime = getRandTurn($admin[turnterm]); + + $lastconnect = date('Y-m-d H:i:s'); + if($lastconnect >= $turntime) { + $turntime = addTurn($turntime, $admin[turnterm]); + } + + //특회 전콘 + if($admin[img] >= 1 && $member[grade] >= 1 && $member[picture] != "" && $pic == 1) { + $face = $member[picture]; + $imgsvr = $member[imgsvr]; + } else { + $face = "default.jpg"; + $imgsvr = 0; + } + //특회 + $userlevel = $member[grade]; + + //성격 랜덤시 + if($character == 11) $character = rand()%10; + //상성 랜덤 + $npcmatch = rand()%150 + 1; + + ########## 회원정보 테이블에 입력값을 등록한다. ########## + $query = " + insert into general ( + user_id, password, name, picture, imgsvr, nation, city, troop, npcmatch, + leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, + userlevel, level, turntime, killturn, lastconnect, makelimit, age, startage, personal, specage, special, specage2, special2 + ) values ( + '$id', '$pwTemp', '$name', '$face', '$imgsvr', '0', '$city', '0', '$npcmatch', + '$leader', '$power', '$intel', '0', '0', '1000', '1000', '0', '0', '0', + '$userlevel', '0', '$turntime', '6', '$lastconnect', '0', '$age', '$age', '$character', '$specage', '$special', '$specage2', '$special2' + )"; + $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no,name,history from general where user_id='$id'"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[name] == "") { + $r = rand() % 999 + 1; + $me[name] = '장수-'.$r; + + $query = "update general set name='$me[name]' where user_id='$id'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $cityname = getCity($connect, $city, "name"); + if($genius == 1) { + $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 기재가 천하에 이름을 알립니다."; + $log[1] = "●{$admin[month]}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; + + $history[0] = "●$admin[year]년 $admin[month]월:【천재】$cityname[name]에 천재가 등장했습니다."; + pushHistory($connect, $history); + } else { + $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 호걸이 천하에 이름을 알립니다."; + } + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name], $cityname[name]에서 큰 뜻을 품다."); + $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; + $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; + $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; + $mylog[count($mylog)] = "●부디 즐거운 삼모전 되시길 바랍니다 ^^"; + $mylog[count($mylog)] = "●통솔 $pleader 무력 $ppower 지력 $pintel 의 보너스를 받으셨습니다."; + $mylog[count($mylog)] = "●연령은 $age세로 시작합니다."; + if($genius == 1) { + $mylog[count($mylog)] = "●축하합니다! 천재로 태어나 처음부터 ".getGenSpecial($special2)." 특기를 가지게 됩니다!"; + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); + } + pushGenLog($me, $mylog); + pushAllLog($log); + + $adminLog[0] = "가입 : {$name} // {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); + pushAdminLog($connect, $adminLog); + + MYDB_close($connect); + + echo(""); + echo(""); +} + +?> diff --git a/twe_close/join_token.php b/twe_close/join_token.php new file mode 100644 index 00000000..87042ec3 --- /dev/null +++ b/twe_close/join_token.php @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/twe_close/jquery-1.11.0.min.js b/twe_close/jquery-1.11.0.min.js new file mode 100644 index 00000000..73f33fb3 --- /dev/null +++ b/twe_close/jquery-1.11.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n(" + + + + + + + + + + + + + + +
+ 0?"cyan":"white";?>> Ctrl, Shift, 드래그로 복수선택 가능     반복&수정 + ;color:white;width:50;font-size:13; value='반복' onclick='refreshing(2,0)'>;color:white;width:80;font-size:13; value='▼미루기' onclick='refreshing(2,1)'>;color:white;width:80;font-size:13; value='▲당기기' onclick='refreshing(2,2)'> +
+ + ;color:white;width:110;font-size:13; value='실 행' onclick='refreshing(3,form2)'>;color:white;width:110;font-size:13; value='갱 신' onclick='refreshing(0,0)'>;color:white;width:160;font-size:13; value='로그아웃' onclick=location.replace('logout_process.php')>
+
+ + + + + + +
+ + + + + + + + + + + +
장수 동향개인 기록
중원 정세
+ + + + + + + +
+
+ + + ;color:white;font-size:13;width:100px; value='서신전달&갱신' onclick='refreshing(4,message)'> +
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다. +
+
+ +
+ + + +
+ + + + + diff --git a/twe_close/map.php b/twe_close/map.php new file mode 100644 index 00000000..af42f272 --- /dev/null +++ b/twe_close/map.php @@ -0,0 +1,435 @@ + + +지 도 생 략
+(개인설정 또는 과부하로 인한 서버의 긴급모드) +
+ +"; + exit(); +} +$connect=dbConn(); +// +?> + + + +지도 + + + + + + + + + + + +"; + $ad = "background={$images}/ad.gif"; + $season = "background={$images}/{$season}.gif"; + $rtitle = ""; + } else { + $ltitle = " "; + $ad = ""; + $season = ""; + $rtitle = "" ";"; + } + echo " + + + + + + + + + + + +
{$ltitle} {$admin[year]}年 {$admin[month]}月{$rtitle}
+
"; + + $query = "select nation,name,color,capital from nation"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=1; $i <= $count; $i++) { + $nation = MYDB_fetch_array($result); + $nationcolor[$nation[nation]] = $nation[color]; + $nationname[$nation[nation]] = $nation[name]; + $nationCapital[$nation[nation]] = $nation[capital]; + } + + if($type == 0) { + // 운영자의 경우 다 볼 수 있음 + if($me[userlevel] >= 5) { + for($i=1; $i <= $allcount; $i++) { + $valid[$i] = 1; + } + } elseif($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),""); + $cityvalid = MYDB_fetch_array($cityresult); + $valid[$cityvalid[city]] = 1; + } else { + // 아국 도시 + $query = "select city,name 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++) { + $cityvalid = MYDB_fetch_array($cityresult); + $valid[$cityvalid[city]] = 1; + } + // 아국 장수가 있는 타국 도시들 선택 + $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++) { + $cityvalid = MYDB_fetch_array($cityresult); + $valid[$cityvalid[city]] = 1; + } + // 첩보된 도시 + $citys = explode("|", $myNation[spy]); + for($i=0; $i < count($citys); $i++) { + $valid[floor($citys[$i]/10)] = 1; + } + } + } + + $x = array( +// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 + 345, 330, 275, 145, 25, 255, 505, 465, 395, 270, 395, 440, 245, 255, 360, 620, +// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 + 365, 410, 365, 330, 480, 25, 230, 135, 185, 85, 70, 80, 245, 230, 510, 590, +// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 + 605, 655, 295, 440, 470, 365, 430, 70, 95, 210, 45, 75, 115, 90, 30, 30, +// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 + 135, 130, 250, 315, 195, 190, 210, 380, 480, 350, 450, 530, 570, 680, 95, 25, +// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 + 180, 80, 425, 610, 680, 285, 285, 240, 180, 310, 90, 45, 410, 405, 515, 340, +// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 + 400, 435, 490, 130, 40, 110, 35, 215, 280, 530, 330, 430, 605, 625 + ); + + $y = array( +// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 + 130, 215, 180, 165, 290, 290, 305, 65, 95, 235, 270, 250, 335, 375, 360, 145, +// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 + 35, 170, 185, 260, 235, 50, 150, 205, 225, 275, 310, 400, 480, 400, 345, 100, +// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 + 205, 200, 60, 115, 155, 230, 220, 105, 145, 175, 190, 245, 295, 360, 345, 415, +// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 + 405, 480, 260, 295, 355, 395, 435, 315, 395, 405, 480, 80, 65, 260, 35, 120, +// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 + 95, 455, 430, 20, 320, 140, 205, 175, 175, 185, 220, 225, 65, 135, 145, 165, +// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 + 210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435 + ); + + $query = "select name,level,nation,city,state,region,supply from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + for($i=0; $i < $allcount; $i++) { + $city = MYDB_fetch_array($result); + $name = $city[name]; + $nation = $nationname[$city[nation]]; + $color = $nationcolor[$city[nation]]; + $capital = $nationCapital[$city[nation]]; + $level = $city[level]; + $state = $city[state]; + $region = $city[region]; + + if($me[city] == $city[city]) { $myCity = 1; } + else { $myCity = 0; } + + if($capital == $city[city]) { $cap = 1; } + else { $cap = 0; } + + city($graphic, $brouserIE, + $type, $name, $nation, $color, $level, $region, $i+1, $valid[$i+1], $x[$i], $y[$i], + $state, $myCity, $city[supply], $cap); + } + + echo " +
+
+"; +} + +function city($graphic, $brouser, $type, $name, $nation, $color, $level, $region, $city, $valid, $x, $y, $state, $mycity, $supply, $capital) { + global $images; + + if($graphic == 0) { + switch($level) { + case 1: $width = 16; $height = 15; break; + case 2: $width = 20; $height = 14; break; + case 3: $width = 14; $height = 14; break; + case 4: $width = 20; $height = 15; break; + case 5: $width = 24; $height = 16; break; + case 6: $width = 26; $height = 18; break; + case 7: $width = 28; $height = 20; break; + case 8: $width = 32; $height = 24; break; + } + } else { + switch($level) { + case 1: $width = 12; $height = 12; break; + case 2: $width = 12; $height = 12; break; + case 3: $width = 14; $height = 14; break; + case 4: $width = 16; $height = 14; break; + case 5: $width = 18; $height = 16; break; + case 6: $width = 20; $height = 16; break; + case 7: $width = 22; $height = 18; break; + case 8: $width = 24; $height = 18; break; + } + } + $x -= floor($width / 2); + $y -= floor($height / 2); + + $backwidth = floor($width * 3.0); $backheight = floor($height * 3.0); + + $backx = $x - floor(($backwidth - $width)/2); + $backy = $y - floor(($backheight - $height)/2); + $fx = $x + $width - 6; + $fy = $y - 3; + $cx = $x + $width - 4; + $cy = $y - 2; + $ex = $x - 5; + $ey = $y; + + // 0 명령화면의 지도(본국 장수 있는 도시 링크), + // 1 전쟁,이동,계략시 지도(전도시 클릭되게), + // 2 사령부 태수임명(본국만 클릭되게) + + // 0인 경우 현재도시 링크 생성 + if($type == 0 && $valid == 1) { echo "
"; } + //메인화면 + if($graphic == 0) { + if($type == 0 && $valid == 1) { + $tag = "input type=image"; + $tail = "><{$tag} {$mid} {$tail}>
"; + //재난표시 + if($state > 0) { + $mid2 = "src={$images}/event{$state}.gif style=width:15;height:15; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; + echo "
<{$tag} {$mid2} {$tail}>
"; + } + } else { + //메인화면 + if($type == 0 && $valid == 1) { + $tail = " onclick='form{$city}.submit()'>
"; + //재난표시 + if($state > 0) { + if($state < 10) { $color3 = "blue"; } + elseif($state < 40) { $color3 = "orange"; } + elseif($state < 50) { $color3 = "red"; } + $mid2 = "width:10;height:10;background-color:{$color3}; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; + echo "
"; + } + } + //공백지 아니면 + if($color != "") { + if($graphic == 0) { + //배경국가색 + if($brouser == 1) { + echo "
"; + } else { + echo " +
+ +
"; + } + //깃발표시 + if($supply == 1) { $mid3 = "src={$images}/f{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } + else { $mid3 = "src={$images}/d{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } + echo "
<{$tag} {$mid3} {$tail}>
"; + //수도표시 + if($capital == 1) { + $mid4 = "src={$images}/event51.gif style=width:10;height:10; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; + echo "
<{$tag} {$mid4} {$tail}>
"; + } + } else { + //수도표시 + if($capital == 1) { + echo "
"; + } + } + } + // 0인 경우 현재도시 링크 생성했던거 종료 + if($type == 0 && $valid == 1) { + echo ""; + } + + // 내 도시인 경우 빨간 네모 그리기 + if($mycity == 1) { + $width += 8; + $height += 8; + $x -= 4; + $y -= 4; + + echo " +
+ + +
+
"; + } +} + +function getCityLevel($region, $level) { + switch($region) { + case 1: $str = "【하북|"; break; + case 2: $str = "【중원|"; break; + case 3: $str = "【서북|"; break; + case 4: $str = "【서촉|"; break; + case 5: $str = "【남중|"; break; + case 6: $str = "【 초|"; break; + case 7: $str = "【오월|"; break; + case 8: $str = "【동이|"; break; + } + + switch($level) { + case 1: $str .= "수】"; break; + case 2: $str .= "진】"; break; + case 3: $str .= "관】"; break; + case 4: $str .= "이】"; break; + case 5: $str .= "소】"; break; + case 6: $str .= "중】"; break; + case 7: $str .= "대】"; break; + case 8: $str .= "특】"; break; + } + + return $str; +} + +?> diff --git a/twe_close/map_history.php b/twe_close/map_history.php new file mode 100644 index 00000000..8f612467 --- /dev/null +++ b/twe_close/map_history.php @@ -0,0 +1,34 @@ +', "'", $map); +$map = str_replace('<_dquot_>', '"', $map); + +echo $map; +?> diff --git a/twe_close/msglist.php b/twe_close/msglist.php new file mode 100644 index 00000000..98fa26a3 --- /dev/null +++ b/twe_close/msglist.php @@ -0,0 +1,43 @@ + + + + +메시지리스트 + + + + + + + + + + + + +
+ 전체 메세지(최고75자)
+ +
+ 개인 메세지(최고75자)
+ +
+ + 국가 메세지(최고75자)
+ +
+ + + diff --git a/twe_close/mysql_opt.txt b/twe_close/mysql_opt.txt new file mode 100644 index 00000000..bf51dd0f --- /dev/null +++ b/twe_close/mysql_opt.txt @@ -0,0 +1,53 @@ +로그활성화 +show variables like '%log%'; + +ALTER TABLE mysql.general_log +ADD COLUMN seq BIGINT UNSIGNED NOT NULL AUTO_INCREMENT AFTER argument, +ADD PRIMARY KEY(seq), +ENGINE=MYISAM; + +set global expire_logs_days=7; +set global log_output='TABLE'; +set global general_log=1; + +select count(*) from mysql.general_log; +select * from mysql.general_log limit 100; + +set global general_log=0; +truncate mysql.general_log; + + +캐시들 +show variables like '%cache%'; +show status like '%cache%'; +show variables like '%key%'; +show status like '%key%'; + +key_buffer_size 줄이자. 현16M -> 8M이하 +myisam_sort_buffer_size 줄이자. 현8M -> 2M + +innodb 설정 +기존 Antelope 포맷은 가변컬럼의 767바이트까지만 저장하고 나머지는 offset하여 외부에 저장한다. +그런데 innodb는 1개 행이 최대 8KB만 저장 가능하므로 가변컬럼이 11개 이상인 경우는 오류 위험이 있다. +(MyISAM은 64KB) +Barracuda 포맷에 Dynamic 또는 Compressed를 사용하면 포인터 20바이트만 저장하고 실데이터는 외부에 저장한다. + +[mysqld] +innodb_file_format=barracuda +innodb_file_per_table=1 + + +innodb 최적화 +innodb_buffer_pool_size: 체섭 테이블 최대 5M정도. 인덱스 포함해도 32M면 충분? +innodb_flush_method: 기본값대로. O_DIRECT는 메모리가 커서 캐시 2중 필요 없을때만. +innodb_file_per_table: 테이블마다 독립파일로 저장 +innodb_flush_log_at_trx_commit: 기본1(커밋마다), 0(로그찰때만), 추천2(1초마다) +innodb_log_file_size: 현 5M, 많이 키워도 될듯 +innodb_log_buffer_size: 기본 8M 적당 +innodb_thread_concurrency: 코어개수 2배 정도 + +sync_binlog=0 이미 꺼져있음 + +ib_logfile0, ib_logfile1은 로그사이즈 바꾸면 재시작이 안되므로 지우고 다시 해야함 + +alter table table_name engine=innodb row_format=dynamic diff --git a/twe_close/new_lib.php b/twe_close/new_lib.php new file mode 100644 index 00000000..02f1b34c --- /dev/null +++ b/twe_close/new_lib.php @@ -0,0 +1,12 @@ + + + +NPC로그인 + + + + + + + + + + +
삼국지 모의전투 PHP (유기체서버)
+
+ + + + + + + + + + + + + + + + +
ID
비밀번호
-
+
+
+ + + diff --git a/twe_close/npc_login_process.php b/twe_close/npc_login_process.php new file mode 100644 index 00000000..3dd7c0e5 --- /dev/null +++ b/twe_close/npc_login_process.php @@ -0,0 +1,76 @@ +location.replace('index.php');"; +} elseif(!$me) { + MessageBox("아이디나 암호가 올바르지 않습니다!!!"); + echo ""; +} else { + switch($me[block]) { + case 1: + MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; + case 2: + MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); + MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + case 3: + MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); + MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + } + + $_SESSION[p_id] = $id; + $_SESSION[p_name] = $me[name]; + $_SESSION[p_nation] = $me[nation]; + $_SESSION[p_time] = time(); + + $date = date('Y-m-d H:i:s'); + + $query="update general set logcnt=logcnt+1,ip='$_SESSION[p_ip]',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + echo ""; + + $date2 = substr($date, 0, 10); + $fp = fopen("logs/_{$date2}-login.txt", "a"); + $msg = _String::Fill2($date,20," ")._String::Fill2($id,13," ")._String::Fill2($me[name],13," ")._String::Fill2($_SESSION[p_ip],16," "); + fwrite($fp, $msg."\r\n"); + fclose($fp); +} + +function DeleteSession() { + $session_path = "data/session"; // 세션이저장된 디렉토리 + if(!$dir=@opendir($session_path)) echo "디렉토리를 열지못했습니다."; + + while($file=@readdir($dir)) { + if(!strstr($file,'sess_')) continue; + if(strpos($file,'sess_')!=0) continue; + if (!$atime=@fileatime("$session_path/$file")) continue; + if (time() > $atime + 86400) { // 10대시 지난시간을 초로 계산해서 적어주시면 됩니다. + // $return = (@unlink("$session_path/$file")); + @unlink("$session_path/$file"); + } + } + closedir($dir); +} + +MYDB_close($connect); +?> diff --git a/twe_close/phpinfo.php b/twe_close/phpinfo.php new file mode 100644 index 00000000..cf608608 --- /dev/null +++ b/twe_close/phpinfo.php @@ -0,0 +1,3 @@ + diff --git a/twe_close/preprocessing.php b/twe_close/preprocessing.php new file mode 100644 index 00000000..bcd7780b --- /dev/null +++ b/twe_close/preprocessing.php @@ -0,0 +1,124 @@ += 2) { echo ""; exit(); } + +$count = sizeof($turn); +for($i=0; $i < $count; $i++) { + if($turn[$i] == 100 || $turn[$i] == 99 || $turn[$i] == 98) { + } elseif($turn[$i] >= 0 && $turn[$i] <= 23) { + } else { + unset($turn); + $turn[0] = 100; + break; + } +} + +if($turn[0] == 100) { + unset($turn); + for($i=0; $i < 24; $i++) $turn[$i] = $i; +} elseif($turn[0] == 99) { + unset($turn); + for($i=0, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; +} elseif($turn[0] == 98) { + unset($turn); + for($i=1, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; +} + +switch($commandtype) { + case 0: command_Single($connect, $turn, 0); break; //휴식 + case 1: command_Single($connect, $turn, 1); break; //농업 + case 2: command_Single($connect, $turn, 2); break; //상업 + case 3: command_Single($connect, $turn, 3); break; //기술 + case 4: command_Single($connect, $turn, 4); break; //선정 + case 5: command_Single($connect, $turn, 5); break; //수비 + case 6: command_Single($connect, $turn, 6); break; //성벽 + case 7: command_Single($connect, $turn, 7); break; //정착 장려 + case 8: command_Single($connect, $turn, 8); break; //치안 강화 + case 9: command_Single($connect, $turn, 9); break; //자금 조달 + +// case 11: command_11($connect, $turn, 11); break; //징병 +// case 12: command_12($connect, $turn, 12); break; //모병 + case 13: command_Single($connect, $turn, 13); break; //훈련 + case 14: command_Single($connect, $turn, 14); break; //사기진작 + case 15: command_Single($connect, $turn, 0); break; //전투태세 +// case 16: command_16($connect, $turn, 16); break; //전쟁 + case 17: command_Single($connect, $turn, 17); break; //소집해제 + +// case 21: command_21($connect, $turn, 21); break; //이동 +// case 22: command_22($connect, $turn, 22); break; //등용 +// case 23: command_23($connect, $turn, 23); break; //포상 +// case 24: command_24($connect, $turn, 24); break; //몰수 +// case 25: command_25($connect, $turn, 25); break; //임관 + case 26: command_Single($connect, $turn, 26); break; //집합 +// case 27: command_27($connect, $turn, 27); break; //발령 + case 28: command_Single($connect, $turn, 28); break; //귀환 + case 29: command_Single($connect, $turn, 29); break; //인재탐색 +// case 30: command_30($connect, $turn, 30); break; //강행 + +// case 31: command_31($connect, $turn, 31); break; //첩보 +// case 32: command_32($connect, $turn, 32); break; //화계 +// case 33: command_33($connect, $turn, 33); break; //탈취 +// case 34: command_34($connect, $turn, 34); break; //파괴 +// case 35: command_35($connect, $turn, 35); break; //선동 +// case 36: command_36($connect, $turn, 36); break; //기습 + + case 41: command_Single($connect, $turn, 41); break; //단련 + case 42: command_Single($connect, $turn, 42); break; //견문 +// case 43: command_43($connect, $turn, 43); break; //증여 +// case 44: command_44($connect, $turn, 44); break; //헌납 + case 45: command_Single($connect, $turn, 45); break; //하야 +// case 46: command_46($connect, $turn, 46); break; //건국 + case 47: command_Single($connect, $turn, 47); break; //방랑 +// case 48: command_48($connect, $turn, 48); break; //장비구입 +// case 49: command_49($connect, $turn, 49); break; //군량매매 + case 50: command_Single($connect, $turn, 50); break; //요양 + +// case 51: command_51($connect, $turn, 51); break; //항복권고 +// case 52: command_52($connect, $turn, 52); break; //원조 +// case 53: command_53($connect, $turn, 53); break; //통합제의 +// case 54: command_54($connect, $turn, 54); break; //선양 + case 55: command_Single($connect, $turn, 55); break; //거병 + case 56: command_Single($connect, $turn, 56); break; //해산 + case 57: command_Single($connect, $turn, 57); break; //모반 시도 + +// case 61: command_61($connect, $turn, 61); break; //불가침 +// case 62: command_62($connect, $turn, 62); break; //선포 +// case 63: command_63($connect, $turn, 63); break; //종전 +// case 64: command_64($connect, $turn, 64); break; //파기 +// case 65: command_65($connect, $turn, 65); break; //초토화 +// case 66: command_66($connect, $turn, 66); break; //천도 +// case 67: command_67($connect, $turn, 67); break; //증축 +// case 68: command_68($connect, $turn, 68); break; //감축 + + case 71: command_Chief($connect, $turn, 71); break; //필사즉생 +// case 72: command_72($connect, $turn, 72); break; //백성동원 +// case 73: command_73($connect, $turn, 73); break; //수몰 +// case 74: command_74($connect, $turn, 74); break; //허보 +// case 75: command_75($connect, $turn, 75); break; //피장파장 + case 76: command_Chief($connect, $turn, 76); break; //의병모집 +// case 77: command_77($connect, $turn, 77); break; //이호경식 +// case 78: command_78($connect, $turn, 78); break; //급습 + +// case 81: command_81($connect, $turn, 81); break; //국기변경 + +// case 99: command_99($connect, $turn); break; //수뇌부 후식 + default: command_Other($connect, $turn, $commandtype); break; +} + +?> + diff --git a/twe_close/proc.php b/twe_close/proc.php new file mode 100644 index 00000000..d1e4003d --- /dev/null +++ b/twe_close/proc.php @@ -0,0 +1,8 @@ + diff --git a/twe_close/proc.sh b/twe_close/proc.sh new file mode 100644 index 00000000..b9dd9084 --- /dev/null +++ b/twe_close/proc.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +while [ 1 ] +do + + php -c /etc/php.ini -f ./proc.php + sleep 60 + +done + diff --git a/twe_close/process_war.php b/twe_close/process_war.php new file mode 100644 index 00000000..6fba7ba9 --- /dev/null +++ b/twe_close/process_war.php @@ -0,0 +1,1848 @@ +".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 14 && $general[item] <= 16) { + //의적주, 두강주, 보령압주 사용 + $genAtmos += 5; + } elseif($general[item] >= 19 && $general[item] <= 20) { + //춘화첩, 초선화 사용 + $genAtmos += 7; + } + $genTrain = 0; + if($general[item] == 4) { + //청주 사용 + $genTrain += 3; + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[item] >= 12 && $general[item] <= 13) { + //과실주, 이강주 사용 + $genTrain += 5; + } elseif($general[item] >= 17 && $general[item] <= 18) { + //철벽서, 단결도 사용 + $genTrain += 7; + } + + // 우선 스케일링 + $city[def] *= 10; + $city[wall] *= 10; + + $query = "select level from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $originCity = MYDB_fetch_array($result); + + $query = "select nation,level,name,history,capital,tech,type from nation where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destnation = MYDB_fetch_array($result); + + //장수수 구함 + $query = "select no from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + if($gencount < 10) $gencount = 10; + //장수수 구함 + $query = "select no from general where nation='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $destgencount = MYDB_num_rows($result); + if($destgencount < 10) $destgencount = 10; + + $genAtmosBonus = 0; $genTrainBonus = 0; + $oppAtmosBonus = 0; $oppTrainBonus = 0; + //공격자 수도보정 + if($nation[capital] == $general[city]) { $genAtmosBonus += 5; } + //방어자 수도보정 + //if($destnation[capital] == $city[city]) { $oppTrainBonus += 5; } + //관,진,수진 보정 + if($city[level] == 1) { $oppTrainBonus += 5; } // 방어도시가 수진이면 방어자 방어보정 + if($originCity[level] == 2) { $genAtmosBonus += 5; } // 출병도시가 진이면 공격자 공격보정 + if($city[level] == 3) { $oppTrainBonus += 5; } // 방어도시가 관이면 방어자 방어보정 + + $alllog[count($alllog)] = "●{$game[month]}월:$nation[name]$general[name](이)가 $city[name](으)로 진격합니다."; + $log[count($log)] = "●{$game[month]}월:$city[name](으)로 진격합니다. <1>$date"; +// $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【전투】$nation[name](이)가 $destnation[name]$city[name](으)로 진격합니다."; + + // 목표 도시내에 목표 국가 소속 장수 중, 병사가 있는 능력치합+병사수 순으로 훈,사 60, 80 이상 + $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='$city[city]' and nation='$city[nation]' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opposecount = MYDB_num_rows($result); + + $exp = 0; //병사 소진 시킨 만큼 + $opexp = 0; + $exp2 = 1; //능력경험치 + $phase = 0; + while($phase < $warphase) { + // 장수가 없어서 도시 공격하려했으나 병량없을시 + if($opposecount == 0 && $destnation[nation] > 0 && $destnation[rice] <= 0 && $city[supply] == 1) { + $general[train] += 1; //훈련 상승 + if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } + $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $alllog[count($alllog)] = "●{$game[month]}월:병량 부족으로 $city[name]의 수비병들이 패퇴합니다."; + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【패퇴】$destnation[name](이)가 병량 부족으로 $city[name](을)를 뺏기고 말았습니다."; + pushGenLog($general, $log); + pushAllLog($alllog); + pushHistory($connect, $history); + unset($log); + unset($alllog); + unset($history); + + //패퇴시 병량보충 + $destnation[rice] += 500; + $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //내정 피폐 + $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $city = addConflict($connect, $city, $general[nation], 1); + + ConquerCity($connect, $game, $general, $city, $nation, $destnation); + break; + // 장수가 없어서 도시 공격 + } elseif($opposecount == 0) { + $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 ".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; + $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; + + $general[train] += 1; //훈련 상승 + if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } + $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $mykillnum = 0; $mydeathnum = 0; + while($phase < $warphase) { + $phase++; + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + $myAtt = getAtt($game, $general, $nation[tech], $lbonus); + $myDef = getDef($game, $general, $nation[tech]); + $cityAtt = getCityAtt($city); + $cityDef = getCityDef($city); + + // 감소할 병사 수 + $cityCrew = $_armperphase + $myAtt - $cityDef; + $myCrew = $_armperphase + $cityAtt - $myDef; + if($cityCrew <= 0) { $cityCrew = rand() % 90 + 10; } + if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } + + //훈련 사기따라 + $myCrew = getCrew($myCrew, $game[city_rate]+$oppAtmosBonus, CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); + $cityCrew = getCrew($cityCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), $game[city_rate]+$oppTrainBonus); + //숙련도 따라 + $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexDef = getGenDex($general, 40); + $cityCrew *= getDexLog($genDexAtt, ($game[city_rate]-60)*7200); + $myCrew *= getDexLog(($game[city_rate]-60)*7200, $genDexDef); + + $avoid = 1; + // 병종간 특성 + if(floor($general[crewtype]/10) == 3) { // 귀병 + $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); + if($general[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($general[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + + // 특기보정 : 신산 + if($general[special2] == 41) { $ratio2 += 200; } + + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; // 0~99 + // 특기보정 : 귀병, 신산, 환술, 신중 + if($general[special2] == 40) { $ratio += 20; } + if($general[special2] == 41) { $ratio += 20; } + if($general[special2] == 42) { $ratio += 10; } + if($general[special2] == 44) { $ratio += 100; } + if($ratio >= 30) { + // 특기보정 : 환술, 집중 + if($general[special2] == 42) { $cityCrew *= 1.3; } + if($general[special2] == 43) { $cityCrew *= 1.5; } + $type = rand() % 3; + switch($type) { + case 0: + $batlog[count($batlog)] = "급습을 성공했다!"; + $cityCrew *= 1.2; + break; + case 1: + $batlog[count($batlog)] = "위보를 성공했다!"; + $cityCrew *= 1.4; + break; + case 2: + $batlog[count($batlog)] = "혼란을 성공했다!"; + $cityCrew *= 1.6; + break; + } + } else { + $type = rand() % 3; + switch($type) { + case 0: + $batlog[count($batlog)] = "급습을 실패했다!"; + $cityCrew /= 1.2; $myCrew *= 1.2; + break; + case 1: + $batlog[count($batlog)] = "위보를 실패했다!"; + $cityCrew /= 1.4; $myCrew *= 1.4; + break; + case 2: + $batlog[count($batlog)] = "혼란을 실패했다!"; + $cityCrew /= 1.6; $myCrew *= 1.6; + break; + } + } + } + } elseif($general[crewtype] == 40) { // 정란 + $cityCrew = $cityCrew * 1.5; + } elseif($general[crewtype] == 41) { // 충차 + $cityCrew = $cityCrew * 2.0; + } elseif($general[crewtype] == 42) { // 벽력거 + $cityCrew = $cityCrew * 1.5; + } + //군주 공격 보정 10% + if($general[level] == 12) { + $cityCrew = $cityCrew * 1.10; + //참모, 장군 공격 보정 5% + } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + $cityCrew = $cityCrew * 1.05; + } + //레벨 보정 + $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; + + // 특기보정 : 공성, 기병, 돌격, 무쌍, 보병, 견고, 의술(청낭서,태평청령) + if($general[special2] == 53) { $cityCrew *= 2.00; } + if($general[special2] == 52) { $cityCrew *= 1.20; } + if($general[special2] == 60) { $cityCrew *= 1.10; } + if($general[special2] == 61) { $cityCrew *= 1.10; } + if($general[special2] == 50) { $myCrew *= 0.90; } + if($general[special2] == 62) { $myCrew *= 0.90; } + $ratio = rand() % 100; // 0 ~ 99 + if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $avoid == 1) { + $batlog[count($batlog)] = "치료했다!"; + $myCrew /= 1.5; // 66%만 소모 + $avoid = 0; + } + + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + // 특기보정 : 무쌍, 필살 + if($general[special2] == 61) { $ratio += 10; } + if($general[special2] == 71) { $ratio += 20; } + if($ratio >= $rd && $avoid == 1) { + $batlog[count($batlog)] = "필살공격!"; + $cityCrew = CriticalScore2($cityCrew); + $avoid = 0; + } + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + //특기보정 : 궁병 + if($general[special2] == 51) { $ratio2 += 20; } + //도구 보정 : 둔갑천서, 태평요술 + if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } + if($ratio < $ratio2 && $avoid == 1) { + $batlog[count($batlog)] = "회피했다!"; + $myCrew /= 10; // 10%만 소모 + $avoid = 0; + } + + //랜타추가 + $cityCrew *= (rand() % 21 + 90)/100; // 90~110% + $myCrew *= (rand() % 21 + 90)/100; // 90~110% + + //특기보정 : 위압 + if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { + $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; + $myCrew = 0; + } + + $general[crew] -= round($myCrew); + $city[def] -= round($cityCrew); + $city[wall] -= round($cityCrew); + + $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; + $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; + + if($city[wall] <= 0) { $city[wall] = 0; } + + if($general[crew] <= 0 && $city[def] <= 0) { + $r1 = $tempGeneralCrew / $tempMyCrew; + $r2 = $tempCityDef / $tempCityCrew; + + if($r1 > $r2) { + $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $cityCrew += $tempCityDef; + $city[def] = 0; + } else { + $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); + $cityCrew += $offset; + $city[def] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } elseif($general[crew] * $city[def] <= 0) { + if($city[def] < 0) { + $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $cityCrew += $tempCityDef; + $city[def] = 0; + } + if($general[crew] < 0) { + $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); + $cityCrew += $offset; + $city[def] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } + + $exp += $cityCrew; + $opexp += $myCrew; + $general[crew] = round($general[crew]); + $cityCrew = round($cityCrew); + $myCrew = round($myCrew); + $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【$city[name]】"; + + $mykillnum += $cityCrew; $mydeathnum += $myCrew; + + // 중간 쌀 체크 + $myRice = round($exp / 50); + // 성격 보정 + $myRice = CharExperience($myRice, $general[personal]); + // 쌀 소모 + $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); + // 결과 쌀 + $myRice = $general[rice] - $myRice; + + if($myRice <= round($general[crew]/100)) { break; } + + if($city[def] <= 0) { break; } + if($general[crew] <= 0) { break; } + } + $res = "성 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $city[def] (-$mykillnum) 【$city[name]】<1>성벽"; + $log[count($log)] = "◆".$res; + $batlog[count($batlog)] = "◆".$res; + $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; + $deadAmount[att] = $deadAmount[att] + $mydeathnum; + $deadAmount[def] = $deadAmount[def] + $mykillnum; + + // 도시쌀 소모 계산 + $opexp = round($opexp / 50 * 0.8); + $rice = round($opexp * 5 * getCrewtypeRice($game, 0, 0) * ($game[city_rate]/100 - 0.2)); + $destnation[rice] -= $rice; + if($destnation[rice] < 0) { $destnation[rice] = 0; } + $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $adminLog[0] = "성벽 쌀 소모 : $rice"; + pushAdminLog($connect, $adminLog); + + //원래대로 스케일링 + $city[def] = round($city[def] / 10); + $city[wall] = round($city[wall] / 10); + //내정 감소 + $dec = round($cityCrew / 10); + $city[agri] -= $dec; + $city[comm] -= $dec; + $city[secu] -= $dec; + if($city[agri] < 0) { $city[agri] = 0; } + if($city[comm] < 0) { $city[comm] = 0; } + if($city[secu] < 0) { $city[secu] = 0; } + // 병사수 변경 + $query = "update general set crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], $mykillnum); + addGenDex($connect, $general[no], 40, $mydeathnum); + // 죽은수 기술로 누적 + $num = round($mydeathnum * 0.01); + // 국가보정 + if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } + if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } + // 부드러운 기술 제한 + if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 죽은수 기술로 누적 + $num = round($mykillnum * 0.01); + // 국가보정 + if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } + if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } + // 부드러운 기술 제한 + if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //양국 평균 기술가격 + //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; + $techRatio = 1.0; + // 죽은수 도시 재정으로 누적 60% + $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); + // 국가보정 + if($destnation[type] == 1) { $num *= 1.1; } + if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num',def='$city[def]',wall='$city[wall]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]' where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 죽은수 도시 재정으로 누적 40% + $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); + // 국가보정 + if($nation[type] == 1) { $num *= 1.1; } + if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //분쟁현황에 추가 + $city = addConflict($connect, $city, $general[nation], $mykillnum); + + // 병사 소진시 성 함락 + if($city[def] <= 0) { + $exp += 1000; + $exp2++; + + pushGenLog($general, $log); + pushBatLog($general, $batlog); + pushBatRes($general, $batres); + pushAllLog($alllog); + pushHistory($connect, $history); + unset($log); + unset($batlog); + unset($batres); + unset($alllog); + unset($history); + + ConquerCity($connect, $game, $general, $city, $nation, $destnation); + break; + // 공격 장수 병사 소진시 실패 처리 + } elseif($general[crew] <= 0) { + $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $log[count($log)] = "●퇴각했습니다."; + + $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } elseif($myRice <= round($general[crew]/100)) { + $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $log[count($log)] = "●군량 부족으로 퇴각합니다."; + + $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; + } + // 장수 대결 + } else { + $oppose = MYDB_fetch_array($result); + $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(와)과 $oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 대결합니다."; + $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 $oppose[name]의 ".getTypename($oppose[crewtype])."(을)를 공격합니다."; + $opplog[count($opplog)] = "●".getTypename($oppose[crewtype])."(으)로 $general[name]의 ".getTypename($general[crewtype])."(을)를 수비합니다."; + + $oppAtmos = 0; + if($oppose[item] == 3) { + //탁주 사용 + $oppAtmos += 3; + $query = "update general set item=0 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; + $oppose[item] = 0; + } elseif($oppose[item] >= 14 && $oppose[item] <= 16) { + //의적주, 두강주, 보령압주 사용 + $oppAtmos += 5; + } elseif($oppose[item] >= 19 && $oppose[item] <= 20) { + //춘화첩, 초선화 사용 + $oppAtmos += 7; + } + $oppTrain = 0; + if($oppose[item] == 4) { + //청주 사용 + $oppTrain += 3; + $query = "update general set item=0 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; + $oppose[item] = 0; + } elseif($oppose[item] >= 12 && $oppose[item] <= 13) { + //과실주, 이강주 사용 + $oppTrain += 5; + } elseif($oppose[item] >= 17 && $oppose[item] <= 18) { + //철벽서, 단결도 사용 + $oppTrain += 7; + } + + $general[train] += 1; //훈련 상승 + if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } + $oppose[train] += 1; //훈련 상승 + if($oppose[train] > $_maximumtrain) { $oppose[train] = $_maximumtrain; } + + $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set recwar='$general[turntime]',train='$oppose[train]',warnum=warnum+1 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $ratio = rand() % 100; + //특기보정 : 저격(수극), 활무기저격 + if(($general[special2] == 70 && $ratio <= 33) || ($general[item] == 2 && $ratio <= 20) || (($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) && $ratio <= 20)) { + //수극 사용 + if($general[item] == 2) { + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; + $general[item] = 0; + } elseif($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) { +// $log[count($log)] = "".getWeapName($general[weap])."(을)를 사용!"; + } + $log[count($log)] = "●상대를 저격했다!"; + $batlog[count($batlog)] = "●상대를 저격했다!"; + $opplog[count($opplog)] = "●상대에게 저격당했다!"; + $oppbatlog[count($oppbatlog)] = "●상대에게 저격당했다!"; + // 부상 + $oppose[injury] += rand() % 41 + 20; // 20 ~ 60 + if($oppose[injury] > 80) { $oppose[injury] = 80; } + } else if($general[item] == 2 && $ratio <= 40) { + $query = "update general set item=0 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $batlog[count($batlog)] = "".getItemName($general[item])."(이)가 빗나갑니다!"; + $general[item] = 0; + } + $ratio = rand() % 100; + //특기보정 : 저격(수극), 활무기저격 + if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose[item] == 2 && $ratio <= 20) || (($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) && $ratio <= 20)) { + //수극 사용 + if($oppose[item] == 2) { + $query = "update general set item=0 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; + $oppose[item] = 0; + } elseif($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) { +// $opplog[count($opplog)] = "".getWeapName($oppose[weap])."(을)를 사용!"; + } + $oppbatlog[count($oppbatlog)] = "●상대를 저격했다!"; + $opplog[count($opplog)] = "●상대를 저격했다!"; + $batlog[count($batlog)] = "●상대에게 저격당했다!"; + $log[count($log)] = "●상대에게 저격당했다!"; + // 부상 + $general[injury] += rand() % 41 + 20; // 20 ~ 60 + if($general[injury] > 80) { $general[injury] = 80; } + } else if($oppose[item] == 2 && $ratio <= 40) { + $query = "update general set item=0 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $oppbatlog[count($oppbatlog)] = "".getItemName($oppose[item])."(이)가 빗나갑니다!"; + $oppose[item] = 0; + } + + $mykillnum = 0; $mydeathnum = 0; + $opkillnum = 0; $opdeathnum = 0; + while($phase < $warphase) { + $phase++; + + if($general[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($general[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + $myAtt = getAtt($game, $general, $nation[tech], $lbonus); + $myDef = getDef($game, $general, $nation[tech]); + + if($oppose[level] == 12) { + $opplbonus = $destnation[level] * 2; + } elseif($oppose[level] >= 5) { + $opplbonus = $destnation[level]; + } else { + $opplbonus = 0; + } + $opAtt = getAtt($game, $oppose, $destnation[tech], $opplbonus); + $opDef = getDef($game, $oppose, $destnation[tech]); + // 감소할 병사 수 + $myCrew = $_armperphase + $opAtt - $myDef; + $opCrew = $_armperphase + $myAtt - $opDef; + if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } + if($opCrew <= 0) { $opCrew = rand() % 90 + 10; } + //훈련 사기따라 + $myCrew = getCrew($myCrew, CharAtmos($oppose[atmos]+$oppAtmos+$oppAtmosBonus, $oppose[personal]), CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); + $opCrew = getCrew($opCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), CharTrain($oppose[train]+$oppTrain+$oppTrainBonus, $oppose[personal])); + //숙련도 따라 + $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexDef = getGenDex($general, $oppose[crewtype]); + $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); + $oppDexDef = getGenDex($oppose, $general[crewtype]); + $opCrew *= getDexLog($genDexAtt, $oppDexDef); + $myCrew *= getDexLog($oppDexAtt, $genDexDef); + + $myAvoid = 1; + $opAvoid = 1; + // 병종간 특성 + if(floor($general[crewtype]/10) == 3) { // 귀병 + $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); + if($general[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($general[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($general[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($general[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + + // 특기보정 : 신산 + if($general[special2] == 41) { $ratio2 += 200; } + + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; + // 특기보정 : 귀병, 신산, 환술, 신중 + if($general[special2] == 40) { $ratio += 20; } + if($general[special2] == 41) { $ratio += 20; } + if($general[special2] == 42) { $ratio += 10; } + if($general[special2] == 44) { $ratio += 100; } + if($ratio >= 30) { + // 특기보정 : 환술, 집중 + if($general[special2] == 42) { $opCrew *= 1.3; } + if($general[special2] == 43) { $opCrew *= 1.5; } + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($oppose[special2] == 45 && $ratio > 70) { + $batlog[count($batlog)] = "위보를 역으로 당했다!"; + $oppbatlog[count($oppbatlog)] = "반계로 상대의 위보를 되돌렸다!"; + $myCrew *= 1.2; + } else { + $batlog[count($batlog)] = "위보를 성공했다!"; + $oppbatlog[count($oppbatlog)] = "위보에 당했다!"; + $opCrew *= 1.2; + } + break; + case 1: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($oppose[special2] == 45 && $ratio > 70) { + $batlog[count($batlog)] = "매복을 역으로 당했다!"; + $oppbatlog[count($oppbatlog)] = "반계로 상대의 매복을 되돌렸다!"; + $myCrew *= 1.4; + } else { + $batlog[count($batlog)] = "매복을 성공했다!"; + $oppbatlog[count($oppbatlog)] = "매복에 당했다!"; + $opCrew *= 1.4; + } + break; + case 2: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($oppose[special2] == 45 && $ratio > 70) { + $batlog[count($batlog)] = "반목을 역으로 당했다!"; + $oppbatlog[count($oppbatlog)] = "반계로 상대의 반목을 되돌렸다!"; + $myCrew *= 1.6; + } else { + $batlog[count($batlog)] = "반목을 성공했다!"; + $oppbatlog[count($oppbatlog)] = "반목에 당했다!"; + $opCrew *= 1.6; + // 특기보정 : 반계 + if($general[special2] == 45) { $opCrew *= 2; } + } + break; + case 3: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($oppose[special2] == 45 && $ratio > 70) { + $batlog[count($batlog)] = "화계를 역으로 당했다!"; + $oppbatlog[count($oppbatlog)] = "반계로 상대의 화계를 되돌렸다!"; + $myCrew *= 1.8; + } else { + $batlog[count($batlog)] = "화계를 성공했다!"; + $oppbatlog[count($oppbatlog)] = "화계에 당했다!"; + $opCrew *= 1.8; + } + break; + case 4: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($oppose[special2] == 45 && $ratio > 70) { + $batlog[count($batlog)] = "혼란을 역으로 당했다!"; + $oppbatlog[count($oppbatlog)] = "반계로 상대의 혼란을 되돌렸다!"; + $myCrew *= 2.0; + } else { + $batlog[count($batlog)] = "혼란을 성공했다!"; + $oppbatlog[count($oppbatlog)] = "혼란에 당했다!"; + $opCrew *= 2.0; + } + break; + } + } else { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $batlog[count($batlog)] = "위보를 실패했다!"; + $oppbatlog[count($oppbatlog)] = "위보를 간파했다!"; + $opCrew /= 1.1; $myCrew *= 1.1; + break; + case 1: + $batlog[count($batlog)] = "매복을 실패했다!"; + $oppbatlog[count($oppbatlog)] = "매복을 간파했다!"; + $opCrew /= 1.2; $myCrew *= 1.2; + break; + case 2: + $batlog[count($batlog)] = "반목을 실패했다!"; + $oppbatlog[count($oppbatlog)] = "반목을 간파했다!"; + $opCrew /= 1.3; $myCrew *= 1.3; + break; + case 3: + $batlog[count($batlog)] = "화계를 실패했다!"; + $oppbatlog[count($oppbatlog)] = "화계를 간파했다!"; + $opCrew /= 1.4; $myCrew *= 1.4; + break; + case 4: + $batlog[count($batlog)] = "혼란을 실패했다!"; + $oppbatlog[count($oppbatlog)] = "혼란을 간파했다!"; + $opCrew /= 1.5; $myCrew *= 1.5; + break; + } + } + } + } + + // 상대 장수 병종간 특성 + if(floor($oppose[crewtype]/10) == 3) { // 귀병 + $int = round($oppose[intel] * (100-$oppose[injury])/100) + getBookEff($oppose[book]); + if($oppose[crewtype] == 30) { + $ratio2 = $int * 5; // 0~500 즉 50% + } elseif($oppose[crewtype] == 31) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 32) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 33) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 34) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 35) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($oppose[crewtype] == 36) { + $ratio2 = $int * 8; // 0~800 즉 80% + } elseif($oppose[crewtype] == 37) { + $ratio2 = $int * 6; // 0~600 즉 60% + } elseif($oppose[crewtype] == 38) { + $ratio2 = $int * 6; // 0~600 즉 60% + } + + // 특기보정 : 신산 + if($oppose[special2] == 41) { $ratio2 += 200; } + + $ratio = rand() % 1000; // 0~999 + if($ratio <= $ratio2) { + $ratio = rand() % 100; + // 특기보정 : 귀병, 신산, 환술, 신중 + if($oppose[special2] == 40) { $ratio += 20; } + if($oppose[special2] == 41) { $ratio += 20; } + if($oppose[special2] == 42) { $ratio += 10; } + if($oppose[special2] == 44) { $ratio += 100; } + if($ratio >= 30) { + // 특기보정 : 환술, 집중 + if($oppose[special2] == 42) { $myCrew *= 1.3; } + if($oppose[special2] == 43) { $myCrew *= 1.5; } + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($general[special2] == 45 && $ratio > 70) { + $oppbatlog[count($oppbatlog)] = "위보를 역으로 당했다!"; + $batlog[count($batlog)] = "반계로 상대의 위보를 되돌렸다!"; + $opCrew *= 1.2; + } else { + $oppbatlog[count($oppbatlog)] = "위보를 성공했다!"; + $batlog[count($batlog)] = "위보에 당했다!"; + $myCrew *= 1.2; + } + break; + case 1: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($general[special2] == 45 && $ratio > 70) { + $oppbatlog[count($oppbatlog)] = "매복을 역으로 당했다!"; + $batlog[count($batlog)] = "반계로 상대의 매복을 되돌렸다!"; + $opCrew *= 1.4; + } else { + $oppbatlog[count($oppbatlog)] = "매복을 성공했다!"; + $batlog[count($batlog)] = "매복에 당했다!"; + $myCrew *= 1.4; + } + break; + case 2: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($general[special2] == 45 && $ratio > 70) { + $oppbatlog[count($oppbatlog)] = "반목을 역으로 당했다!"; + $batlog[count($batlog)] = "반계로 상대의 반목을 되돌렸다!"; + $opCrew *= 1.6; + } else { + $oppbatlog[count($oppbatlog)] = "반목을 성공했다!"; + $batlog[count($batlog)] = "반목에 당했다!"; + $myCrew *= 1.6; + // 특기보정 : 반계 + if($oppose[special2] == 45) { $myCrew *= 2; } + } + break; + case 3: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($general[special2] == 45 && $ratio > 70) { + $oppbatlog[count($oppbatlog)] = "화계를 역으로 당했다!"; + $batlog[count($batlog)] = "반계로 상대의 화계을 되돌렸다!"; + $opCrew *= 1.8; + } else { + $oppbatlog[count($oppbatlog)] = "화계를 성공했다!"; + $batlog[count($batlog)] = "화계에 당했다!"; + $myCrew *= 1.8; + } + break; + case 4: + $ratio = rand() % 100; + // 특기보정 : 반계 + if($general[special2] == 45 && $ratio > 70) { + $oppbatlog[count($oppbatlog)] = "혼란을 역으로 당했다!"; + $batlog[count($batlog)] = "반계로 상대의 혼란을 되돌렸다!"; + $opCrew *= 2.0; + } else { + $oppbatlog[count($oppbatlog)] = "혼란을 성공했다!"; + $batlog[count($batlog)] = "혼란에 당했다!"; + $myCrew *= 2.0; + } + break; + } + } else { + $type = rand() % 5; // 0~4 + switch($type) { + case 0: + $oppbatlog[count($oppbatlog)] = "위보를 실패했다!"; + $batlog[count($batlog)] = "위보를 간파했다!"; + $myCrew /= 1.1; $opCrew *= 1.1; + break; + case 1: + $oppbatlog[count($oppbatlog)] = "매복을 실패했다!"; + $batlog[count($batlog)] = "매복을 간파했다!"; + $myCrew /= 1.2; $opCrew *= 1.2; + break; + case 2: + $oppbatlog[count($oppbatlog)] = "반목을 실패했다!"; + $batlog[count($batlog)] = "반목을 간파했다!"; + $myCrew /= 1.3; $opCrew *= 1.3; + break; + case 3: + $oppbatlog[count($oppbatlog)] = "화계를 실패했다!"; + $batlog[count($batlog)] = "화계를 간파했다!"; + $myCrew /= 1.4; $opCrew *= 1.4; + break; + case 4: + $oppbatlog[count($oppbatlog)] = "혼란을 실패했다!"; + $batlog[count($batlog)] = "혼란을 간파했다!"; + $myCrew /= 1.5; $opCrew *= 1.5; + break; + } + } + } + } + + // 특기보정: 돌격 + if($oppose[crewtype] == 43 && $general[special2] != 60) { // 목우 + $r = 0; + $r += $oppose[atmos] + $oppAtmos + $oppAtmosBonus; + $r += $oppose[train] + $oppTrain + $oppTrainBonus; + $ratio = rand() % 400; // 최대 50% 저지 + if($ratio < $r && $opAvoid == 1) { + $batlog[count($batlog)] = "저지당했다!"; + $oppbatlog[count($oppbatlog)] = "●상대를 저지했다!"; + $opAvoid = 0; + continue; + } + } + + // my 입장 상성 + // 보병계열 > 궁병계열 + if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 궁병계열 > 기병계열 + if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 기병계열 > 보병계열 + if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { + $myCrew *= 0.8; + $opCrew *= 1.2; + } + // 차병계열 + if(floor($general[crewtype]/10) == 4) { + $myCrew *= 1.2; + $opCrew *= 0.8; + } + + // op 입장 상성 + // 보병계열 > 궁병계열 + if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 궁병계열 > 기병계열 + if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 기병계열 > 보병계열 + if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { + $opCrew *= 0.8; + $myCrew *= 1.2; + } + // 차병계열 + if(floor($oppose[crewtype]/10) == 4) { + $opCrew *= 1.2; + $myCrew *= 0.8; + } + + //군주 공격 보정 10% + if($general[level] == 12) { + $opCrew = $opCrew * 1.10; + //참모, 장군 공격 보정 5% + } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + $opCrew = $opCrew * 1.05; + } + + //상대장수 관직 보정 + //군주 방어 보정 10% + if($oppose[level] == 12) { + $opCrew = $opCrew * 0.90; + //참모, 모사 방어 보정 5% + } elseif($oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 + $opCrew = $opCrew * 0.95; + } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 + $opCrew = $opCrew * 0.95; + } + + //레벨 보정 + $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); + $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); + $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); + $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); + + // 특기보정 : 기병, 돌격, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) + if($general[special2] == 52) { $opCrew *= 1.20; } + if($general[special2] == 60) { $opCrew *= 1.10; } + if($general[special2] == 61) { $opCrew *= 1.10; } + if($general[special2] == 50) { $myCrew *= 0.90; } + if($general[special2] == 62) { $myCrew *= 0.90; } + if($general[special2] == 75) { + if($oppose[crewtype] != 0 && $oppose[crewtype] != 10 && $oppose[crewtype] != 20 && + $oppose[crewtype] != 30 && $oppose[crewtype] != 40 && $oppose[crewtype] != 41) + { + $opCrew *= 1.1; $myCrew *= 0.9; + } + } + $ratio = rand() % 100; // 0 ~ 99 + if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $myAvoid == 1) { + $batlog[count($batlog)] = "치료했다!"; + $myCrew /= 1.5; // 66%만 소모 + $myAvoid = 0; + } + + // 상대 특기보정 : 기병, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) + if($oppose[special2] == 52) { $myCrew *= 1.10; } + if($oppose[special2] == 61) { $myCrew *= 1.10; } + if($oppose[special2] == 50) { $opCrew *= 0.80; } + if($oppose[special2] == 62) { $myCrew *= 1.10; } + if($oppose[special2] == 75) { + if($general[crewtype] != 0 && $general[crewtype] != 10 && $general[crewtype] != 20 && + $general[crewtype] != 30 && $general[crewtype] != 40 && $general[crewtype] != 41) + { + $myCrew *= 1.1; $opCrew *= 0.9; + } + } + $ratio = rand() % 100; // 0 ~ 99 + if(($oppose[special2] == 73 || $oppose[item] == 23 || $oppose[item] == 24) && $ratio > 80 && $opAvoid == 1) { + $oppbatlog[count($oppbatlog)] = "치료했다!"; + $opCrew /= 1.5; // 66%만 소모 + $opAvoid = 0; + } + + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + // 특기보정 : 무쌍, 필살 + if($general[special2] == 61) { $ratio += 10; } + if($general[special2] == 71) { $ratio += 20; } + if($ratio >= $rd && $myAvoid == 1) { + $batlog[count($batlog)] = "필살공격!"; + $oppbatlog[count($oppbatlog)] = "●상대의 필살공격!"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + + // 특기보정 : 격노 + if($oppose[special2] == 74) { + if(rand() % 100 < 50) { + $batlog[count($batlog)] = "●필살 공격에 상대가 격노했다!"; + $oppbatlog[count($oppbatlog)] = "●상대의 필살 공격에 격노했다!"; + $myCrew = CriticalScore2($myCrew); + $opAvoid = 0; + } + } + } + //크리 + $rd = rand() % 100; // 0 ~ 99 + $ratio = CriticalRatio2($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book])); + // 특기보정 : 필살 + if($oppose[special2] == 71) { $ratio += 20; } + if($ratio >= $rd && $opAvoid == 1) { + $oppbatlog[count($oppbatlog)] = "필살공격!"; + $batlog[count($batlog)] = "●상대의 필살공격!"; + $myCrew = CriticalScore2($myCrew); + $opAvoid = 0; + + // 특기보정 : 격노 + if($general[special2] == 74) { + if(rand() % 100 < 33) { + $oppbatlog[count($oppbatlog)] = "●필살 공격에 상대가 진노했다!"; + $batlog[count($batlog)] = "●상대의 필살 공격에 진노했다!"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + $warphase++; + } elseif(rand() % 100 < 33) { + $oppbatlog[count($oppbatlog)] = "●필살 공격에 상대가 격노했다!"; + $batlog[count($batlog)] = "●상대의 필살 공격에 격노했다!"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + } + } + } + + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + //특기보정 : 돌격, 궁병 + if($oppose[special2] == 60) { $ratio2 -= 100; } + if($general[special2] == 51) { $ratio2 += 20; } + //도구 보정 : 둔갑천서, 태평요술 + if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } + if($ratio < $ratio2 && $myAvoid == 1) { + // 특기보정 : 격노 + if($oppose[special2] == 74 && rand() % 100 < 50) { + $batlog[count($batlog)] = "●회피 시도에 상대가 격노했다!"; + $oppbatlog[count($oppbatlog)] = "●상대의 회피 시도에 격노했다!"; + $myCrew = CriticalScore2($myCrew); + $opAvoid = 0; + } else { + $batlog[count($batlog)] = "회피했다!"; + $oppbatlog[count($oppbatlog)] = "●상대가 회피했다!"; + $myCrew /= 10; // 10%만 소모 + $myAvoid = 0; + } + } + //회피 + $ratio = rand() % 100; // 0 ~ 99 + $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 + // 특기보정 : 돌격, 궁병 + if($general[special2] == 60) { $ratio2 -= 100; } + if($oppose[special2] == 51) { $ratio2 += 20; } + //도구 보정 : 둔갑천서, 태평요술 + if($oppose[item] == 26 || $oppose[item] == 25) { $ratio2 += 20; } + if($ratio < $ratio2 && $opAvoid == 1) { + // 특기보정 : 격노 + if($general[special2] == 74 && rand() % 100 < 33) { + $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 진노했다!"; + $batlog[count($batlog)] = "●상대의 회피 시도에 진노했다!"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + $warphase++; + } elseif($general[special2] == 74 && rand() % 100 < 33) { + $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 격노했다!"; + $batlog[count($batlog)] = "●상대의 회피 시도에 격노했다!"; + $opCrew = CriticalScore2($opCrew); + $myAvoid = 0; + } else { + $oppbatlog[count($oppbatlog)] = "회피했다!"; + $batlog[count($batlog)] = "●상대가 회피했다!"; + $opCrew /= 10; // 10%만 소모 + $opAvoid = 0; + } + } + + //랜타추가 + $opCrew *= (rand() % 21 + 90)/100; // 90~110% + $myCrew *= (rand() % 21 + 90)/100; // 90~110% + + //특기보정 : 위압 + if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { + $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; + $oppbatlog[count($oppbatlog)] = "●상대에게 위압받았다!"; + $myCrew = 0; + } + //특기보정: 위압 + if($oppose[special2] == 63 && $phase == 1 && $oppose[crew] >= 1000 && $oppose[atmos] >= 90 && $oppose[train] >= 90) { + $batlog[count($batlog)] = "●상대에게 위압받았다!"; + $oppbatlog[count($oppbatlog)] = "●상대에게 위압을 줬다!"; + $opCrew = 0; + } + + $general[crew] -= round($myCrew); + $oppose[crew] -= round($opCrew); + $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; + $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; + if($general[crew] <= 0 && $oppose[crew] <= 0) { + $r1 = $tempGeneralCrew / $tempMyCrew; + $r2 = $tempOpposeCrew / $tempOpCrew; + + if($r1 > $r2) { + $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $opCrew += $tempOpposeCrew; + $oppose[crew] = 0; + } else { + $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); + $opCrew += $offset; + $oppose[crew] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } elseif($general[crew] * $oppose[crew] <= 0) { + if($oppose[crew] < 0) { + $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); + $myCrew += $offset; + $general[crew] -= $offset; + $opCrew += $tempOpposeCrew; + $oppose[crew] = 0; + } + if($general[crew] < 0) { + $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); + $opCrew += $offset; + $oppose[crew] -= $offset; + $myCrew += $tempGeneralCrew; + $general[crew] = 0; + } + } + + $exp += $opCrew; + $opexp += $myCrew; + $general[crew] = round($general[crew]); + $oppose[crew] = round($oppose[crew]); + $myCrew = round($myCrew); + $opCrew = round($opCrew); + $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【$oppose[name]】"; + $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose[name]】 $oppose[crew] (-$opCrew) VS $general[crew] (-$myCrew) 【$general[name]】"; + + $mykillnum += $opCrew; $mydeathnum += $myCrew; + $opkillnum += $myCrew; $opdeathnum += $opCrew; + + // 중간 쌀 체크 + $myRice = round($exp / 50); + // 성격 보정 + $myRice = CharExperience($myRice, $general[personal]); + // 쌀 소모 + $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); + // 결과 쌀 + $myRice = $general[rice] - $myRice; + + // 중간 쌀 체크 + $opRice = round($opexp / 50 * 0.8); + // 성격 보정 + $opRice = CharExperience($opRice, $oppose[personal]); + // 쌀 소모 + $opRice = ($opRice * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); + // 결과 쌀 + $opRice = $oppose[rice] - $opRice; + + if($opRice <= round($oppose[crew]/100)) { break; } + if($myRice <= round($general[crew]/100)) { break; } + + if($oppose[crew] <= 0) { break; } + if($general[crew] <= 0) { break; } + } + $res = "공 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $oppose[crew] (-$opdeathnum) 【$oppose[name]】<1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2).""; + $log[count($log)] = "◆".$res; + $batlog[count($batlog)] = "◆".$res; + $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; + $oppres = "수 <1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2)."【$oppose[name]】 $oppose[crew] (-$opdeathnum) VS $general[crew] (-$mydeathnum) 【$general[name]】<1>"._String::SubStr(getTypename($general[crewtype]), 0, 2).""; + $opplog[count($opplog)] = "◆".$oppres; + $oppbatlog[count($oppbatlog)] = "◆".$oppres; + $oppbatres[count($oppbatres)] = "◆{$game[year]}년 {$game[month]}월: ".$oppres; + + $deadAmount[att] = $deadAmount[att] + $mydeathnum; + $deadAmount[def] = $deadAmount[def] + $opdeathnum; + + // 상대장수 부상 + $ratio = rand() % 100; + if($ratio >= 95) { + $opplog[count($opplog)] = "●전투중 부상당했다!"; + $oppose[injury] += rand() % 71 + 10; // 10 ~ 80 + if($oppose[injury] > 80) { $oppose[injury] = 80; } + } + // 병사수 변경 + $query = "update general set injury='$oppose[injury]',crew='$oppose[crew]',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 숙련도 증가 + addGenDex($connect, $oppose[no], $oppose[crewtype], $opkillnum * 0.9); + addGenDex($connect, $oppose[no], $general[crewtype], $opdeathnum * 0.9); + // 죽은수 기술로 누적 + $num = round($mydeathnum * 0.01); + // 국가보정 + if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } + if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } + // 부드러운 기술 제한 + if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 장수 부상 + $ratio = rand() % 100; + if($ratio >= 95) { + $log[count($log)] = "●전투중 부상당했다!"; + $general[injury] += rand() % 71 + 10; // 10 ~ 80 + if($general[injury] > 80) { $general[injury] = 80; } + } + // 병사수 변경 + $query = "update general set injury='$general[injury]',crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 숙련도 증가 + addGenDex($connect, $general[no], $general[crewtype], $mykillnum); + addGenDex($connect, $general[no], $oppose[crewtype], $mydeathnum); + // 죽은수 기술로 누적 + $num = round($opdeathnum * 0.01); + // 국가보정 + if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } + if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } + // 부드러운 기술 제한 + if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //양국 평균 기술가격 + //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; + $techRatio = 1.0; + // 죽은수 도시 재정으로 누적 60% + $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); + // 국가보정 + if($destnation[type] == 1) { $num *= 1.1; } + if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 죽은수 도시 재정으로 누적 40% + $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); + // 국가보정 + if($nation[type] == 1) { $num *= 1.1; } + if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$general[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 상대 병사 소진이나 쌀 소진시 다음 장수 + if($oppose[crew] <= 0 || ($opRice <= round($oppose[crew]/100) && $general[crew] > 0)) { + if($opRice <= round($oppose[crew]/100)) { + $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; + $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; + $opplog[count($opplog)] = "●군량 부족으로 패퇴합니다."; + } else { + $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; + $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; + $opplog[count($opplog)] = "●전멸했습니다."; + } + $opposecount--; + + $general[atmos] *= 1.1; //사기 증가 + if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } + + $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $exp2++; + // 상대장수 경험 등등 증가 + $opexp = round($opexp / 50 * 0.8); + // 성격 보정 + $opexp = CharExperience($opexp, $oppose[personal]); + // 쌀 소모 + $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); + if($oppose[rice] < 0) { $oppose[rice] = 0; } + + $query = "update general set deathnum=deathnum+1,rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opexp = 0; + + pushGenLog($oppose, $opplog); + pushBatLog($oppose, $oppbatlog); + pushBatRes($oppose, $oppbatres); + unset($opplog); + unset($oppbatlog); + unset($oppbatres); + // 공격 장수 병사 소진이나 쌀 소진시 실패 처리 + } elseif($general[crew] <= 0 || $myRice <= round($general[crew]/100)) { + if($myRice <= round($general[crew]/100)) { + $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $log[count($log)] = "●군량 부족으로 퇴각합니다."; + $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + } else { + $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $log[count($log)] = "●퇴각했습니다."; + $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + } + + // 경험치 상승 + if(floor($oppose[crewtype]/10) == 3) { // 귀병 + $oppose[intel2]++; + } elseif(floor($oppose[crewtype]/10) == 4) { // 차병 + $oppose[leader2]++; + } else { + $oppose[power2]++; + } + + $oppose[atmos] *= 1.1; //사기 증가 + if($oppose[atmos] > $_maximumatmos) { $oppose[atmos] = $_maximumatmos; } + + // 상대장수 경험 등등 증가 + $opexp = round($opexp / 50 * 0.8); + // 성격 보정 + $opexp = CharExperience($opexp, $oppose[personal]); + // 쌀 소모 + $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); + if($oppose[rice] < 0) { $oppose[rice] = 0; } + + $query = "update general set rice='$oppose[rice]',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='$oppose[atmos]',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $opexp = 0; + + $opplog = checkAbility($connect, $oppose, $opplog); + pushGenLog($oppose, $opplog); + pushBatLog($oppose, $oppbatlog); + pushBatRes($oppose, $oppbatres); + unset($opplog); + unset($oppbatlog); + unset($oppbatres); +// $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 }$city[name] 공략에 실패했습니다. <1>$date"; +// $log[count($log)] = "$city[name] 공략에 실패했습니다. <1>$date"; + break; + } else { + // 무승부일때 로그 남김 + pushGenLog($oppose, $opplog); + pushBatLog($oppose, $oppbatlog); + pushBatRes($oppose, $oppbatres); + unset($opplog); + unset($oppbatlog); + unset($oppbatres); + } + } + } + + // 상대장수 경험 등등 증가(페이즈 초과시) + $opexp = round($opexp / 50 * 0.8); + // 성격 보정 + $opexp = CharExperience($opexp, $oppose[personal]); + // 쌀 소모 + $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); + if($oppose[rice] < 0) { $oppose[rice] = 0; } + + $query = "update general set rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 경험치 상승 + if(floor($general[crewtype]/10) == 3) { // 귀병 + $general[intel2] += $exp2; + } elseif(floor($general[crewtype]/10) == 4) { // 차병 + $general[leader2] += $exp2; + } else { + $general[power2] += $exp2; + } + $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 공헌, 명성 상승 + $exp = round($exp / 50); + // 성격 보정 + $exp = CharExperience($exp, $general[personal]); + // 쌀 소모 + $general[rice] -= ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); + if($general[rice] < 0) { $general[rice] = 0; } + + $query = "update general set rice='$general[rice]',dedication=dedication+'$exp',experience=experience+'$exp' where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log = checkAbility($connect, $general, $log); + pushGenLog($general, $log); + pushBatLog($general, $batlog); + pushBatRes($general, $batres); + pushAllLog($alllog); + pushHistory($connect, $history); + + return $deadAmount; +} + +function CriticalRatio2($leader, $power, $intel) { + // 707010장수 9% 706515장수 17% 706020장수 25% xx50xx장수 57% + if($leader <= $power && $leader <= $intel) { // 통솔이 제일 낮은경우 + $ratio = sqrt($leader/($leader+$power+$intel))*150 - 30; + } elseif($power < $leader && $power <= $intel) { // 무력이 제일 낮은경우 + $ratio = sqrt($power /($leader+$power+$intel))*150 - 30; + } elseif($intel < $leader && $intel < $power) { // 지력이 제일 낮은경우 + $ratio = sqrt($intel /($leader+$power+$intel))*150 - 30; + } + + if($ratio > 50) $ratio = 50; + return $ratio; +} + +function CriticalScore2($score) { + $score = round($score * (rand()%8 + 13)/10); // 1.3~2.0 + return $score; +} + +//0 0 : 100 100 이면 최고 무한대 차이 +//30 30 : 100 100 이면 최고 3.3배 차이 +//60 60 : 100 100 이면 최고 1.6배 차이 +function getCrew($crew, $youatmos, $mytrain) { + $ratio = $youatmos / $mytrain; + $crew = $crew * $ratio; + + return $crew; +} + +function getCrewtypeRice($game, $crewtype, $tech) { + if(!$crewtype) { $crewtype = 0; } + $cost = $game["ric{$crewtype}"] / 10; + return $cost * getTechCost($tech); +} + +////////////////////////////////////////////////////////////// +// 표준 공 / 수 반환 수치는 약 0이 되게 (100~550) +////////////////////////////////////////////////////////////// + +function getAtt($game, $general, $tech, $lbonus) { + $att = getRate($game, $general[crewtype], "att") + getTechAbil($tech); + + if(floor($general[crewtype]/10) == 3) { // 귀병 지100% + $ratio = (floor($general[intel]*(100-$general[injury])/100)+getBookEff($general[book]))*2 - 40; + } elseif(floor($general[crewtype]/10) == 4) { // 차병 통100% + $ratio = (floor($general[leader]*(100-$general[injury])/100)+getHorseEff($general[horse])+$lbonus)*2 - 40; + } else { + $ratio = (floor($general[power]*(100-$general[injury])/100)+getWeapEff($general[weap]))*2 - 40; //10일때 -20, 70일때 100, 100일때 160 + } + if($ratio < 10) { $ratio = 10; } + if($ratio > 100) { $ratio = 50 + $ratio/2; } // 100보다 큰 경우는 상승률 1/2 + $att = $att * $ratio / 100; + + return $att; +} + +function getDef($game, $general, $tech) { + $def = getRate($game, $general[crewtype], "def") + getTechAbil($tech); + + $crew = ($general[crew] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점 + $def = $def * $crew / 100; + + return $def; +} + +function getCityAtt($city) { + $att = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; //50000일때 300점 100000일때 400점 + return $att; +} + +function getCityDef($city) { + $def = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; + return $def; +} + +function getRate($game, $type, $dtype) { + $t = "{$dtype}{$type}"; + return $game[$t]; +} + +function addConflict($connect, $city, $nationnum, $mykillnum) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); + $game = MYDB_fetch_array($result); + + if($city[conflict] == "") { + unset($nationlist); + unset($killnum); + } else { + $nationlist = explode("|", $city[conflict]); + $killnum = explode("|", $city[conflict2]); + } + + for($i=0; $i < count($nationlist); $i++) { + if($nationlist[$i] == $nationnum) break; + } + if($i != 0 && $i == count($nationlist)) { // 두번째 나라부터 분쟁 가담 메시지 출력 + $query = "select name from nation where nation='$nationnum'"; + $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁】$nation[name](이)가 $city[name] 공략에 가담하여 분쟁이 발생하고 있습니다."; + pushHistory($connect, $history); + } + + $nationlist[$i] = $nationnum; + if($i == 0 || $city[def] == 0) { // 선타, 막타 보너스 + $killnum[$i] += round($mykillnum * 1.05); + } else { + $killnum[$i] += $mykillnum; + } + $city[conflict] = implode("|", $nationlist); + $city[conflict2] = implode("|", $killnum); + + $query = "update city set conflict='$city[conflict]',conflict2='$city[conflict2]' where city='$city[city]'"; + MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); + + return $city; +} + +function DeleteConflict($connect, $nation) { + $query = "select city,conflict,conflict2 from city where conflict!=''"; + $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + + $nation = "$nation"; + for($k=0; $k < $cityNum; $k++) { + $city = MYDB_fetch_array($result); + + if(strpos($city[conflict], $nation)) { + $nationlist = explode("|", $city[conflict]); + $killnum = explode("|", $city[conflict2]); + + $count = count($nationlist); + for($i=0; $i < $count; $i++) { + if($nationlist[$i] == $nation) { + unset($nationlist[$i]); + unset($killnum[$i]); + break; + } + } + $conflict = implode("|", $nationlist); + $conflict2 = implode("|", $killnum); + + $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='$city[city]'"; + MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); + } + } +} + +function getConquerNation($connect, $city) { + $nationlist = explode("|", $city[conflict]); + $killnum = explode("|", $city[conflict2]); + + $max = 0; + for($i=0; $i < count($nationlist); $i++) { + if($max <= $killnum[$i]) { + $max = $killnum[$i]; + $index = $i; + } + } + return $nationlist[$index]; +} + +function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { + global $_armperphase, $_maximumatmos, $_basegold, $_baserice; + + if($destnation[nation] > 0) { + $destnationName = "$destnation[name]의"; + } else { + $destnationName = "공백지인"; + } + + $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 $city[name] 공략에 성공했습니다."; + $log[count($log)] = "$city[name] 공략에 성공했습니다."; + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【지배】$nation[name](이)가 $city[name](을)를 지배했습니다."; + $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 함락시킴"); + $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$general[name](이)가 {$destnationName} $city[name](을)를 점령"); + $destnation = addNationHistory($connect, $destnation, "●{$game[year]}년 {$game[month]}월:$nation[name]$general[name]에 의해 $city[name](이)가 함락"); + + $query = "select city from city where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + // 국가 멸망시 + if($citycount == 1 && $city[nation] != 0) { + $query = "select nation,name,history,tech,type from nation where nation='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select nation,name,gold,rice from nation where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $losenation = MYDB_fetch_array($result); + + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【멸망】$losenation[name](이)가 멸망하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$losenation[name](을)를 정복"); + + $query = "select no from general where nation='$general[nation]' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $ruler = MYDB_fetch_array($result); + + //다굴치는 나라들 전방설정을 위해 미리 얻어옴 + $query = "select you from diplomacy where me='$losenation[nation]' and state<2"; + $dipResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipCount = MYDB_num_rows($dipResult); + + $loseGeneralGold = 0; + $loseGeneralRice = 0; + //멸망국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='$city[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "$losenation[name](이)가 멸망했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + + $loseGold = floor($gen[gold] * (rand()%30+20)/100.0); + $loseRice = floor($gen[rice] * (rand()%30+20)/100.0); + $genlog[1] = "●도주하며 금$loseGold 쌀$loseRice을 분실했습니다."; + + $query = "update general set gold=gold-{$loseGold},rice=rice-{$loseRice} where no={$gen[no]}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($gen, $genlog); + + $gen = addHistory($connect, $gen, "●{$game[year]}년 {$game[month]}월:$losenation[name](이)가 멸망"); + + $loseGeneralGold += $loseGold; + $loseGeneralRice += $loseRice; + + //모두 등용장 발부 + if($nation[name] == "강족" || $nation[name] == "저족" || $nation[name] == "흉노족" + || $nation[name] == "남만족" || $nation[name] == "산월족" || $nation[name] == "오환족" + || $nation[name] == "왜족") { + //등용장 미발부 + } elseif(rand() % 100 < 50) { + ScoutMsg($connect, $ruler[no], $nation[name], $gen[no], $gen[msgindex]); + } + + //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) + if($gen[npc] >= 2 && $gen[npc] <= 4 && rand() % 100 < 10) { + $commissionCommand = EncodeCommand(0, 0, $nation[nation], 25); //임관 + $query = "update general set turn0='$commissionCommand' where no={$gen[no]}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + unset($genlog[1]); + + // 승전국 보상 + $losenation[gold] -= $_basegold; + $losenation[rice] -= $_baserice; + if($losenation[gold] < 0) { $losenation[gold] = 0; } + if($losenation[rice] < 0) { $losenation[rice] = 0; } + + $losenation[gold] += $loseGeneralGold; + $losenation[rice] += $loseGeneralRice; + + $losenation[gold] = floor($losenation[gold] / 2); + $losenation[rice] = floor($losenation[gold] / 2); + + // 기본량 제외 금쌀50% + 장수들 분실 금쌀50% 흡수 + $query = "update nation set gold=gold+'$losenation[gold]',rice=rice+'$losenation[rice]' where nation='$general[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //아국 수뇌부에게 로그 전달 + $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "$losenation[name] 정복으로 금$losenation[gold] 쌀$losenation[rice]을 획득했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + } + + //분쟁기록 모두 지움 + DeleteConflict($connect, $city[nation]); + // 전 장수 공헌 명성치 깎음 + $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 전 도시 공백지로 + $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 전 장수 소속 무소속으로, 재야로, 부대 탈퇴 + $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대도 삭제 + $query = "delete from troop where nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='$city[nation]' or you='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 국가 삭제 + $query = "delete from nation where nation='$city[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아까 얻어온 다굴국들 전방설정 + for($i=0; $i < $dipCount; $i++) { + $dip = MYDB_fetch_array($dipResult); + //전방설정 + SetNationFront($connect, $dip[you]); + } + // 멸망이 아니면 + } else { + // 태수,군사,시중은 일반으로... + $query = "update general set level='1' where no='$city[gen1]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set level='1' where no='$city[gen2]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update general set level='1' where no='$city[gen3]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //수도였으면 긴급 천도 + if($destnation[capital] == $city[city]) { + $dist = distance($connect, $city[city]); + + $query = "select city,name,pop from city where nation='$destnation[nation]' and city!='$city[city]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + $minDist = 99; $minCity = 0; $minCityPop = 0; + for($i=0; $i < $cityCount; $i++) { + $nextCap = MYDB_fetch_array($result); + if($minDist > $dist[$nextCap[city]]) { + $minDist = $dist[$nextCap[city]]; + $minCity = $nextCap[city]; + $minCityPop = $nextCap[pop]; + $minCityName = $nextCap[name]; + } elseif($minDist == $dist[$nextCap[city]] && $minCityPop < $nextCap[pop]) { + $minDist = $dist[$nextCap[city]]; + $minCity = $nextCap[city]; + $minCityPop = $nextCap[pop]; + $minCityName = $nextCap[name]; + } + } + + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【긴급천도】$destnation[name](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; + + //아국 수뇌부에게 로그 전달 + $query = "select no,name,nation from general where nation='$destnation[nation]' and level>='5'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "●수도가 함락되어 $minCityName으로 긴급천도합니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + } + //천도 + $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //보급도시로 만듬 + $query = "update city set supply=1 where city='$minCity'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //수뇌부 이동 + $query = "update general set city='$minCity' where nation='$destnation[nation]' and level>='5'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //장수 사기 감소 + $query = "update general set atmos=atmos*0.8 where nation='$destnation[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + + $general[atmos] *= 1.1; //사기 증가 + if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } + + $conquerNation = getConquerNation($connect, $city); + + if($conquerNation == $general[nation]) { + // 이동 및 사기 변경 + $query = "update general set city='$city[city]',atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + if($city[level] > 3) { + // 도시 소속 변경, 태수,군사,시중 초기화 + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + // 도시 소속 변경, 태수,군사,시중 초기화 + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //전방설정 + SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $destnation[nation]); + } else { + $query = "select name,nation,history from nation where nation='$conquerNation'"; + $conquerResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $conquerNationArray = MYDB_fetch_array($conquerResult); + + $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁협상】$conquerNationArray[name](이)가 영토분쟁에서 우위를 점하여 $city[name](을)를 양도받았습니다."; + $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 $conquerNationArray[name]양도"); + $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game[year]}년 {$game[month]}월:$nation[name]에서 $city[name](을)를 양도 받음"); + // 이동X 및 사기 변경 + $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + if($city[level] > 3) { + // 도시 소속 변경, 태수,군사,시중 초기화 + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + // 도시 소속 변경, 태수,군사,시중 초기화 + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //전방설정 + SetNationFront($connect, $destnation[nation]); + SetNationFront($connect, $conquerNation); + } + + pushGenLog($general, $log); + pushAllLog($alllog); + pushHistory($connect, $history); +} + +?> diff --git a/twe_close/processing.php b/twe_close/processing.php new file mode 100644 index 00000000..e5949299 --- /dev/null +++ b/twe_close/processing.php @@ -0,0 +1,3129 @@ += 0 || $turn[$i] <= 23) { + } else { + unset($turn); + $turn[0] = 100; + break; + } +} + +if($turn[0] == 100) { + unset($turn); + for($i=0; $i < 24; $i++) $turn[$i] = $i; +} elseif($turn[0] == 99) { + unset($turn); + for($i=0, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; +} elseif($turn[0] == 98) { + unset($turn); + for($i=1, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; +} + +switch($commandtype) { + case 0: command_Single($connect, $turn, 0); break; //휴식 + case 1: command_Single($connect, $turn, 1); break; //농업 + case 2: command_Single($connect, $turn, 2); break; //상업 + case 3: command_Single($connect, $turn, 3); break; //기술 + case 4: command_Single($connect, $turn, 4); break; //선정 + case 5: command_Single($connect, $turn, 5); break; //수비 + case 6: command_Single($connect, $turn, 6); break; //성벽 + case 7: command_Single($connect, $turn, 7); break; //정착 장려 + case 8: command_Single($connect, $turn, 8); break; //치안 강화 + case 9: command_Single($connect, $turn, 9); break; //자금 조달 + + case 11: command_11($connect, $turn, 11); break; //징병 + case 12: command_12($connect, $turn, 12); break; //모병 + case 13: command_Single($connect, $turn, 13); break; //훈련 + case 14: command_Single($connect, $turn, 14); break; //사기진작 + case 15: command_Single($connect, $turn, 0); break; //전투태세 + case 16: command_16($connect, $turn, 16); break; //전쟁 + case 17: command_Single($connect, $turn, 17); break; //소집해제 + + case 21: command_21($connect, $turn, 21); break; //이동 + case 22: command_22($connect, $turn, 22); break; //등용 + case 23: command_23($connect, $turn, 23); break; //포상 + case 24: command_24($connect, $turn, 24); break; //몰수 + case 25: command_25($connect, $turn, 25); break; //임관 + case 26: command_Single($connect, $turn, 26); break; //집합 + case 27: command_27($connect, $turn, 27); break; //발령 + case 28: command_Single($connect, $turn, 28); break; //귀환 + case 29: command_Single($connect, $turn, 29); break; //인재탐색 + case 30: command_30($connect, $turn, 30); break; //강행 + + case 31: command_31($connect, $turn, 31); break; //첩보 + case 32: command_32($connect, $turn, 32); break; //화계 + case 33: command_33($connect, $turn, 33); break; //탈취 + case 34: command_34($connect, $turn, 34); break; //파괴 + case 35: command_35($connect, $turn, 35); break; //선동 + case 36: command_36($connect, $turn, 36); break; //기습 + + case 41: command_Single($connect, $turn, 41); break; //단련 + case 42: command_Single($connect, $turn, 42); break; //견문 + case 43: command_43($connect, $turn, 43); break; //증여 + case 44: command_44($connect, $turn, 44); break; //헌납 + case 45: command_Single($connect, $turn, 45); break; //하야 + case 46: command_46($connect, $turn, 46); break; //건국 + case 47: command_Single($connect, $turn, 47); break; //방랑 + case 48: command_48($connect, $turn, 48); break; //장비구입 + case 49: command_49($connect, $turn, 49); break; //군량매매 + case 50: command_Single($connect, $turn, 50); break; //요양 + + case 51: command_51($connect, $turn, 51); break; //항복권고 + case 52: command_52($connect, $turn, 52); break; //원조 + case 53: command_53($connect, $turn, 53); break; //통합제의 + case 54: command_54($connect, $turn, 54); break; //선양 + case 55: command_Single($connect, $turn, 55); break; //거병 + case 56: command_Single($connect, $turn, 56); break; //해산 + case 57: command_Single($connect, $turn, 57); break; //모반 시도 + + case 61: command_61($connect, $turn, 61); break; //불가침 + case 62: command_62($connect, $turn, 62); break; //선포 + case 63: command_63($connect, $turn, 63); break; //종전 + case 64: command_64($connect, $turn, 64); break; //파기 + case 65: command_65($connect, $turn, 65); break; //초토화 + case 66: command_66($connect, $turn, 66); break; //천도 + case 67: command_67($connect, $turn, 67); break; //증축 + case 68: command_68($connect, $turn, 68); break; //감축 + case 71: command_Chief($connect, $turn, 71); break; //필사즉생 + case 72: command_72($connect, $turn, 72); break; //백성동원 + case 73: command_73($connect, $turn, 73); break; //수몰 + case 74: command_74($connect, $turn, 74); break; //허보 + case 75: command_75($connect, $turn, 75); break; //피장파장 + case 76: command_Chief($connect, $turn, 76); break; //의병모집 + case 77: command_77($connect, $turn, 77); break; //이호경식 + case 78: command_78($connect, $turn, 78); break; //급습 + case 81: command_81($connect, $turn, 81); break; //국기변경 + case 99: command_99($connect, $turn); break; //수뇌부 휴식 +} + +function starter($name, $type=0) { + global $_basecolor2, $_basecolor4; + global $images; + echo " + + +$name + + +"; +require('analytics.php'); +echo " + + + + + +
$name
+"; + if($type == 1) CoreBackButton(); + else backButton(); +} + +function ender($type=0) { + if($type == 1) CoreBackButton(); + else backButton(); + banner(); + echo " +
"; + + PrintElapsedTime(); + + echo " + + +"; +} + +function command_99($connect, $turn) { + $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + if($me[level] >= 5) { + $command = EncodeCommand(0, 0, 0, 99); + + for($i=0; $i < sizeof($turn); $i++) { + $query = "update nation set l{$me[level]}turn{$turn[$i]}='{$command}' where nation='$me[nation]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + echo ""; +} + +function GetExplain() { + $explain[0] = "표준적인 보병입니다.
보병은 방어특화입니다."; + $explain[1] = "저렴하고 튼튼합니다.
중원지역 소유시 가능."; + $explain[2] = "저렴하고 강력합니다.
오월지역 소유시 가능."; + $explain[3] = "은밀하고 날쌥니다.
저 소유시 가능."; + $explain[4] = "최강의 보병입니다.
낙양 소유시 가능."; + $explain[5] = "등갑을 두른 보병입니다.
남중지역 소유시 가능."; + + $explain[10] = "표준적인 궁병입니다.
궁병은 회피특화입니다."; + $explain[11] = "말을 타고 잘 피합니다.
동이지역 소유시 가능."; + $explain[12] = "화살을 연사합니다.
서촉지역 소유시 가능."; + $explain[13] = "강건한 궁병입니다.
양양 소유시 가능."; + $explain[14] = "강력한 화살을 쏩니다.
건업 소유시 가능."; + + $explain[20] = "표준적인 기병입니다.
기병은 공격특화입니다."; + $explain[21] = "백마의 위용을 보여줍니다.
하북지역 소유시 가능."; + $explain[22] = "갑주를 두른 기병입니다.
서북지역 소유시 가능."; + $explain[23] = "저돌적으로 공격합니다.
흉노 소유시 가능."; + $explain[24] = "철갑을 두른 기병입니다.
강 소유시 가능."; + $explain[25] = "날쎄고 빠른 기병입니다.
산월 소유시 가능."; + $explain[26] = "어느 누구보다 강력합니다.
남만 소유시 가능."; + $explain[27] = "정예 기병입니다.
허창 소유시 가능."; + + $explain[30] = "계략을 사용하는 병종입니다.
귀병은 계략특화입니다."; + $explain[31] = "신출귀몰한 귀병입니다.
초지역 소유시 가능."; + $explain[32] = "저렴하고 튼튼합니다.
오환 소유시 가능."; + $explain[33] = "저렴하고 강력합니다.
왜 소유시 가능."; + $explain[34] = "백병전에도 능숙합니다.
장안 소유시 가능."; + $explain[35] = "전투를 포기하고 계략에 몰두합니다.
귀병은 계략특화입니다."; + $explain[36] = "고도로 훈련된 귀병입니다.
낙양 소유시 가능."; + $explain[37] = "갑주를 두른 귀병입니다.
성도 소유시 가능."; + $explain[38] = "날카로운 무기를 가진 귀병입니다.
업 소유시 가능."; + + $explain[40] = "높은 구조물 위에서 공격합니다.
차병은 공성특화입니다."; + $explain[41] = "엄청난 위력으로 성벽을 부수어버립니다.
차병은 공성특화입니다."; + $explain[42] = "상대에게 돌덩이를 날립니다.
업 소유시 가능."; + $explain[43] = "상대를 저지하는 특수병기입니다.
성도 소유시 가능."; + + return $explain; +} + +function command_11($connect, $turn, $command) { + global $_basecolor, $_basecolor2, $images, $image; + starter("징병"); + $query = "select * from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + //현재 도시 + $query = "select city,region from city where city='$me[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $curCity = MYDB_fetch_array($result); + + $query = "select level,tech from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($me[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($me[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + $explain = GetExplain(); + + if($admin[year] < $admin[startyear]+3) { + //그 국가에서 그 병종 가능한지 + $valid[0] = 1; $color[0] = $_basecolor2; + $valid[10] = 1; $color[10] = $_basecolor2; + $valid[20] = 1; $color[20] = $_basecolor2; + $valid[30] = 1; $color[30] = $_basecolor2; + $valid[40] = 1; $color[40] = "red"; // 정란 + $valid[41] = 1; $color[41] = "red"; // 충차 + } else { + // 아국 도시 구분 + $query = "select city,level,region from city where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($result); + // 기술 1000 이상부터 지역병 + if($nation[tech] >= 1000) { + $myregion[$city[region]] = 1; + } + // 기술 2000 이상부터 이민족병 + if($city[level] == 4 && $nation[tech] >= 2000) { + $mycity[$city[city]] = 1; + } + // 기술 3000 이상부터 특수병 + if($city[level] == 8 && $nation[tech] >= 3000) { + $mycity[$city[city]] = 1; + } + } + + //그 국가에서 그 병종 가능한지 + $valid[0] = 1; $color[0] = $_basecolor2; + $valid[1] = $myregion[2]; $color[1] = "limegreen"; // 청주병(중원) + $valid[2] = $myregion[7]; $color[2] = "limegreen"; // 수병(오월) + $valid[3] = $mycity[64]; $color[3] = "limegreen"; // 자객병(저) + $valid[4] = $mycity[3]; $color[4] = "limegreen"; // 근위병(낙양) + $valid[5] = $myregion[5]; $color[5] = "limegreen"; // 등갑병(남중) + $valid[10] = 1; $color[10] = $_basecolor2; + $valid[11] = $myregion[8]; $color[11] = "limegreen"; // 궁기병(동이) + $valid[12] = $myregion[4]; $color[12] = "limegreen"; // 연노병(서촉) + $valid[13] = $mycity[6]; $color[13] = "limegreen"; // 강궁병(양양) + $valid[14] = $mycity[7]; $color[14] = "limegreen"; // 석궁병(건업) + $valid[20] = 1; $color[20] = $_basecolor2; + $valid[21] = $myregion[1]; $color[21] = "limegreen"; // 백마병(하북) + $valid[22] = $myregion[3]; $color[22] = "limegreen"; // 중장기병(서북) + $valid[23] = $mycity[65]; $color[23] = "limegreen"; // 돌격기병(흉노) + $valid[24] = $mycity[63]; $color[24] = "limegreen"; // 철기병(강) + $valid[25] = $mycity[67]; $color[25] = "limegreen"; // 수렵기병(산월) + $valid[26] = $mycity[66]; $color[26] = "limegreen"; // 맹수병(남만) + $valid[27] = $mycity[2]; $color[27] = "limegreen"; // 호표기병(허창) + $valid[30] = 1; $color[30] = $_basecolor2; + $valid[31] = $myregion[6]; $color[31] = "limegreen"; // 신귀병(초) + $valid[32] = $mycity[68]; $color[32] = "limegreen"; // 백귀병(오환) + $valid[33] = $mycity[69]; $color[33] = "limegreen"; // 흑귀병(왜) + $valid[34] = $mycity[4]; $color[34] = "limegreen"; // 악귀병(장안) + $valid[35] = 1; $color[35] = $_basecolor2;// 남귀병 + $valid[36] = $mycity[3]; $color[36] = "limegreen"; // 황귀병(낙양) + $valid[37] = $mycity[5]; $color[37] = "limegreen"; // 천귀병(성도) + $valid[38] = $mycity[1]; $color[38] = "limegreen"; // 마귀병(업) + $valid[40] = 1; $color[40] = $_basecolor2;// 정란 + $valid[41] = 1; $color[41] = $_basecolor2;// 충차 + $valid[42] = $mycity[1]; $color[42] = "limegreen"; // 벽력거(업) + $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) + + // 남귀병은 기술1등급부터 + if($nation[tech] < 1000) { + $valid[35] = 0; + } + // 충차는 기술1등급부터 + if($nation[tech] < 1000) { + $valid[41] = 0; + } + } + + $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; + $crew = $leader - round($me[crew]/100); + $abil = getTechAbil($nation[tech]); + $cost = getTechCost($nation[tech]); + echo " +병사를 모집합니다. 훈련과 사기치는 낮지만 가격이 저렴합니다.
+가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
+이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
+현재 징병 가능한 병종은 녹색으로 표시되며,
+현재 징병 가능한 특수병종은 초록색으로 표시됩니다.
+ + + + + + + + + + + + + + + + + "; + + echo " + "; + + for($i=0; $i <= 5; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 보병, 징병 + if($me[special2] == 50) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=10; $i <= 14; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 궁병, 징병 + if($me[special2] == 51) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=20; $i <= 27; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 기병, 징병 + if($me[special2] == 52) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=30; $i <= 38; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 귀병, 징병 + if($me[special2] == 40) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=40; $i <= 43; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 공성, 징병 + if($me[special2] == 53) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " +
+ 현재 기술력 : + 현재 통솔 : + 현재 병종 : + 현재 병사 : + 현재 자금 : +
사진병종공격방어기동회피군량가격병사수특징
보병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
궁병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
기병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
귀병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
차 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
"; + + ender(); +} + +function command_12($connect, $turn, $command) { + global $_basecolor, $_basecolor2, $images, $image; + starter("모병"); + $query = "select * from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + //현재 도시 + $query = "select city,region from city where city='$me[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $curCity = MYDB_fetch_array($result); + + $query = "select level,tech from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($me[level] == 12) { + $lbonus = $nation[level] * 2; + } elseif($me[level] >= 5) { + $lbonus = $nation[level]; + } else { + $lbonus = 0; + } + + $explain = GetExplain(); + + if($admin[year] < $admin[startyear]+3) { + //그 국가에서 그 병종 가능한지 + $valid[0] = 1; $color[0] = $_basecolor2; + $valid[10] = 1; $color[10] = $_basecolor2; + $valid[20] = 1; $color[20] = $_basecolor2; + $valid[30] = 1; $color[30] = $_basecolor2; + $valid[40] = 1; $color[40] = "red"; // 정란 + $valid[41] = 1; $color[41] = "red"; // 충차 + } else { + // 아국 도시 구분 + $query = "select city,level,region from city where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $citycount = MYDB_num_rows($result); + + for($i=0; $i < $citycount; $i++) { + $city = MYDB_fetch_array($result); + // 기술 1000 이상부터 지역병 + if($nation[tech] >= 1000) { + $myregion[$city[region]] = 1; + } + // 기술 2000 이상부터 이민족병 + if($city[level] == 4 && $nation[tech] >= 2000) { + $mycity[$city[city]] = 1; + } + // 기술 3000 이상부터 특수병 + if($city[level] == 8 && $nation[tech] >= 3000) { + $mycity[$city[city]] = 1; + } + } + + //그 국가에서 그 병종 가능한지 + $valid[0] = 1; $color[0] = $_basecolor2; + $valid[1] = $myregion[2]; $color[1] = "limegreen"; // 청주병(중원) + $valid[2] = $myregion[7]; $color[2] = "limegreen"; // 수병(오월) + $valid[3] = $mycity[64]; $color[3] = "limegreen"; // 자객병(저) + $valid[4] = $mycity[3]; $color[4] = "limegreen"; // 근위병(낙양) + $valid[5] = $myregion[5]; $color[5] = "limegreen"; // 등갑병(남중) + $valid[10] = 1; $color[10] = $_basecolor2; + $valid[11] = $myregion[8]; $color[11] = "limegreen"; // 궁기병(동이) + $valid[12] = $myregion[4]; $color[12] = "limegreen"; // 연노병(서촉) + $valid[13] = $mycity[6]; $color[13] = "limegreen"; // 강궁병(양양) + $valid[14] = $mycity[7]; $color[14] = "limegreen"; // 석궁병(건업) + $valid[20] = 1; $color[20] = $_basecolor2; + $valid[21] = $myregion[1]; $color[21] = "limegreen"; // 백마병(하북) + $valid[22] = $myregion[3]; $color[22] = "limegreen"; // 중장기병(서북) + $valid[23] = $mycity[65]; $color[23] = "limegreen"; // 돌격기병(흉노) + $valid[24] = $mycity[63]; $color[24] = "limegreen"; // 철기병(강) + $valid[25] = $mycity[67]; $color[25] = "limegreen"; // 수렵기병(산월) + $valid[26] = $mycity[66]; $color[26] = "limegreen"; // 맹수병(남만) + $valid[27] = $mycity[2]; $color[27] = "limegreen"; // 호표기병(허창) + $valid[30] = 1; $color[30] = $_basecolor2; + $valid[31] = $myregion[6]; $color[31] = "limegreen"; // 신귀병(초) + $valid[32] = $mycity[68]; $color[32] = "limegreen"; // 백귀병(오환) + $valid[33] = $mycity[69]; $color[33] = "limegreen"; // 흑귀병(왜) + $valid[34] = $mycity[4]; $color[34] = "limegreen"; // 악귀병(장안) + $valid[35] = 1; $color[35] = $_basecolor2;// 남귀병 + $valid[36] = $mycity[3]; $color[36] = "limegreen"; // 황귀병(낙양) + $valid[37] = $mycity[5]; $color[37] = "limegreen"; // 천귀병(성도) + $valid[38] = $mycity[1]; $color[38] = "limegreen"; // 마귀병(업) + $valid[40] = 1; $color[40] = $_basecolor2;// 정란 + $valid[41] = 1; $color[41] = $_basecolor2;// 충차 + $valid[42] = $mycity[1]; $color[42] = "limegreen"; // 벽력거(업) + $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) + + // 남귀병은 기술1등급부터 + if($nation[tech] < 1000) { + $valid[35] = 0; + } + // 충차는 기술1등급부터 + if($nation[tech] < 1000) { + $valid[41] = 0; + } + } + + $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; + $crew = $leader - round($me[crew]/100); + $abil = getTechAbil($nation[tech]); + $cost = getTechCost($nation[tech]); + echo " +병사를 모집합니다. 훈련과 사기치는 높지만 자금이 많이 듭니다.
+가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
+이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
+현재 모병 가능한 병종은 녹색으로 표시되며,
+현재 모병 가능한 특수병종은 초록색으로 표시됩니다.
+ + + + + + + + + + + + + + + + + + "; + + echo " + "; + + for($i=0; $i <= 5; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 보병, 징병 + if($me[special2] == 50) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=10; $i <= 14; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 궁병, 징병 + if($me[special2] == 51) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=20; $i <= 27; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 기병, 징병 + if($me[special2] == 52) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=30; $i <= 38; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 귀병, 징병 + if($me[special2] == 40) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " + "; + + for($i=40; $i <= 43; $i++) { + if($valid[$i] == 1) { + $ric = $admin["ric{$i}"] * $cost; + $cst = $admin["cst{$i}"] * $cost; + //성격 보정 + $cst = CharCost($cst, $me[personal]); + //특기 보정 : 공성, 징병 + if($me[special2] == 53) { $cst *= 0.9; } + if($me[special2] == 72) { $cst *= 0.5; } + $att = $admin["att{$i}"] + $abil; + $def = $admin["def{$i}"] + $abil; + $spd = $admin["spd{$i}"]; + $avd = $admin["avd{$i}"]; + $ric = round($ric); + $cst = round($cst); + $l = $color[$i]; + $weapImage = "{$images}/weap{$i}.jpg"; + if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + echo " + + + + + + + + + + + + + + "; + } + } + + echo " +
모병은 가격 2배의 자금이 소요됩니다.
+ 현재 기술력 : + 현재 통솔 : + 현재 병종 : + 현재 병사 : + 현재 자금 : +
사진병종공격방어기동회피군량가격병사수특징
보병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
궁병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
기병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
귀병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
차 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
+ 00명
+ + + "; + + for($j=0; $j < sizeof($turn); $j++) { + echo " + "; + } + echo " +
$explain[$i]
"; + + ender(); +} + +function command_15($connect, $turn, $command) { + starter("재편성"); + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $me = $general[no]; + + $query = "select no,name from general where nation='$general[nation]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +자신의 병사를 다른 장수에게 보냅니다. +
+ +00명 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_16($connect, $turn, $command) { + starter("출병"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시로 침공을 합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + + ender(); +} + +function command_21($connect, $turn, $command) { + starter("이동"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시로 이동합니다.
+인접 도시로만 이동이 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + + ender(); +} + +function command_22($connect, $turn, $command) { + starter("등용"); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +재야나 타국의 장수를 등용합니다.
+서신은 개인 메세지로 전달됩니다.
+등용할 장수를 목록에서 선택하세요.
+
+ + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(); +} + +function command_23($connect, $turn, $command) { + starter("포상", 1); + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +국고로 장수에게 자금이나 군량을 지급합니다.
+
+ + + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(1); +} + +function command_24($connect, $turn, $command) { + starter("몰수", 1); + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +장수의 자금이나 군량을 몰수합니다.
+몰수한것은 국가재산으로 귀속됩니다.
+
+ + + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(1); +} + +function command_25($connect, $turn, $command) { + global $_basecolor2, $_basecolor4, $images; + + starter("임관"); + + $query = "select startyear,year from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select no,nations from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select nation,name,color,scout,scoutmsg,tricklimit,gennum from nation order by gennum"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + echo " +국가에 임관합니다.
+이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.
+바로 군주의 위치로 이동합니다.
+임관할 국가를 목록에서 선택하세요.
+!!!는 방랑군을 포함한 랜덤임관입니다. 유니크를 기대하신다면!
+???는 방랑군을 제외한 랜덤임관입니다. 유니크 혜택은 없습니다.
+임관 금지이거나 초기 제한중인 국가는 붉은색 배경으로 표시됩니다.
+900px x 200px 넘는 높이를 점유할 시 통보없이 제한될 수 있습니다.
+
+ + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+ + +{$scoutStr} +
임관 권유 메세지
"; + + ender(); +} + +function command_27($connect, $turn, $command) { + starter("발령", 1); + + $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select no,name,level,npc from general where nation='$me[nation]' and no!='$me[no]' order by npc,binary(name)"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +
+선택된 도시로 아국 장수를 발령합니다.
+아국 도시로만 발령이 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(1); +} + +function command_30($connect, $turn, $command) { + starter("강행"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시로 강행합니다.
+최대 3칸내 도시로만 강행이 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " +"; +} + +echo " +
+"; + +printCitysName($connect, $currentcity[city], 1); +printCitysName($connect, $currentcity[city], 2); +printCitysName($connect, $currentcity[city], 3); + +ender(); +} + +function command_31($connect, $turn, $command) { + starter("첩보"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 첩보를 실행합니다.
+인접도시일 경우 많은 정보를 얻을 수 있습니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + echo " +모든 도시가 가능하지만 많은 정보를 얻을 수 있는
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_32($connect, $turn, $command) { + starter("화계"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 화계를 실행합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_33($connect, $turn, $command) { + starter("탈취"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 탈취를 실행합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_34($connect, $turn, $command) { + starter("파괴"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 파괴를 실행합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_35($connect, $turn, $command) { + starter("선동"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 선동을 실행합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_36($connect, $turn, $command) { + starter("기습"); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select city,name from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + + echo " +
+선택된 도시에 기습을 실행합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+$currentcity[name] => + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity[city], 2); + + ender(); +} + +function command_43($connect, $turn, $command) { + starter("증여"); + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +자신의 자금이나 군량을 다른 장수에게 증여합니다.
+장수를 선택하세요.
+
+ + + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_44($connect, $turn, $command) { + starter("헌납"); + + echo " +자신의 자금이나 군량을 국가 재산으로 헌납합니다.
+
+ + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_46($connect, $turn, $command) { + starter("건국"); + + $query = "select maxnation from game where no='1'"; + $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $color = GetNationColors(); + + $query = "select color from nation where level>0"; + $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + for($i=0; $i < $nationcount; $i++) { + $nation = MYDB_fetch_array($result); + $nationcolor[$i] = $nation[color]; + } + $validCount = count($color); + //등록된 색깔 가려내기 + for($i=0; $i < count($color); $i++) { + $valid[$i] = 1; + for($j=0; $j < $nationcount; $j++) { + if($color[$i] == $nationcolor[$j]) { + $valid[$i] = 0; + $validCount--; + } + } + } + //색깔이 다 쓰였으면 그냥 모두 허용 + if($validCount <= 0) { + for($i=0; $i < count($color); $i++) { + $valid[$i] = 1; + } + } + + if($nationcount < $admin[maxnation]) { + echo " +현재 도시에서 나라를 세웁니다. 중, 소도시에서만 가능합니다.
+ +- 법 가 : 금수입↑ 치안↑ 인구↓ 민심↓
+- 유 가 : 내정↑ 민심↑ 쌀수입↓
+- 병 가 : 기술↑ 수성↑ 인구↓ 민심↓
+- 덕 가 : 치안↑인구↑ 민심↑ 쌀수입↓ 수성↓
+- 묵 가 : 수성↑ 기술↓
+- 도 가 : 인구↑ 기술↓ 치안↓
+- 태 평 도 : 인구↑ 민심↑ 기술↓ 수성↓
+- 오 두 미 도 : 쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓
+- 도 적 : 계략↑ 금수입↓ 치안↓ 민심↓
+- 불 가 : 민심↑ 수성↑ 금수입↓
+- 종 횡 가 : 전략↑ 수성↑ 금수입↓ 내정↓
+- 음 양 가 : 내정↑ 인구↑ 기술↓ 전략↓
+- 명 가 : 기술↑ 인구↑ 쌀수입↓ 수성↓
+ +
+국명 : +색깔 : +성향 : + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " +"; + } + + echo " +
"; + } else { + echo " +더 이상 건국은 불가능합니다.
"; + } + ender(); +} + +function command_48($connect, $turn, $command) { + starter("장비 매매"); + + $query = "select no,city,gold from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("command_48 ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + $city = getCity($connect, $me[city], "secu"); + + for($i=1; $i <= 6; $i++) { + if($city[secu] >= $i*1000) { + $color[$i] = "white"; + } else { + $color[$i] = "red"; + } + } + + echo " +장비를 구입하거나 매각합니다.
+현재 구입 불가능한 것은 붉은색으로 표시됩니다.
+현재 도시 치안 : $city[secu]    현재 자금 : $me[gold]
+
+장비 : + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_49($connect, $turn, $command) { + starter("군량매매"); + + echo " +자신의 군량을 사거나 팝니다.
+
+ + + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_51($connect, $turn, $command) { + starter("항복 권고", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select nation,power from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $myNation = MYDB_fetch_array($result); + + echo " +타국에게 항복을 권고합니다.
+서신은 개인 메세지로 전달됩니다.
+권고할 국가를 목록에서 선택하세요.
+합병이 불가능한 국가는 붉은 배경으로 표시됩니다.
+
+ + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+제한 조건
+- 인접 국가
+- 양국 모두 외교제한 기간 없음
+- 제의한 국가가 항복하는 국가보다 국력 3배 초과
+"; + ender(1); +} + +function command_52($connect, $turn, $command) { + starter("원조", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select nation,level from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + + echo " +타국에게 원조합니다.
+작위별로 금액 제한이 있습니다.
+ 호족: 1만
+ 군벌: 2만
+주자사: 3만
+ 주목: 4만
+  공: 5만
+  왕: 6만
+ 황제: 7만
+원조할 국가를 목록에서 선택하세요.
+
+ 대상 국가 +국고 +병량 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_53($connect, $turn, $command) { + starter("통합제의", 1); + + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select round(avg(power)) as power,round(avg(gennum)) as gennum from nation where level>=1"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $avgNation = MYDB_fetch_array($result); + + $query = "select round(std(power)) as power,round(std(gennum)) as gennum from nation where level>=1"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $stdNation = MYDB_fetch_array($result); + + $query = "select nation,power,gennum from nation where nation='$me[nation]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $myNation = MYDB_fetch_array($result); + + echo " +세력이 비슷한 국가에 통합 제의를 합니다. 제의한 국가 위주로 통합됩니다.
+서신은 개인 메세지로 전달됩니다.
+제의할 국가를 목록에서 선택하세요.
+통합이 불가능한 국가는 붉은 배경으로 표시됩니다.
+
+대상국 : + 통합국명 : + + "; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+제한 조건
+- 인접 국가
+- 양국 모두 외교제한 없음
+- 양국 국력의 합이 평균+표준편차(현재 {$cond1}) 이하
+- 양국 장수수의 합이 평균+표준편차(현재 {$cond2}) 이하
+"; + ender(1); +} + +function command_54($connect, $turn, $command) { + starter("선양"); + $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select no,name,level from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + echo " +군주의 자리를 다른 장수에게 물려줍니다.
+장수를 선택하세요.
+
+ + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_61($connect, $turn, $command) { + starter("불가침", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +타국에게 불가침을 제의합니다.
+제의할 국가를 목록에서 선택하세요.
+배경색은 현재 제의가 불가능한 국가는 붉은색, 현재 불가침중인 국가는 푸른색으로 표시됩니다.
+비고는 불가침시 세부 조건등을 지정하는 곳입니다.(최대 45자) ※유저 편의를 위한 것일뿐 시스템적으로 보장하지는 않습니다.
+
+ 대상 국가 +기간 +년
+비고 : + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_62($connect, $turn, $command) { + starter("선전포고", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +타국에게 선전 포고합니다.
+선전 포고할 국가를 목록에서 선택하세요.
+고립되지 않은 아국 도시에서 인접한 국가에 선포 가능합니다.
+초반제한 해제 2년전부터 선포가 가능합니다. (체섭기준 181년 1월부터 가능)
+배경색은 현재 선포가 불가능한 국가는 붉은색, 현재 불가침중(역시 불가)인 국가는 푸른색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_63($connect, $turn, $command) { + starter("종전", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +전쟁중인 국가에 종전을 제의합니다.
+제의할 국가를 목록에서 선택하세요.
+배경색은 현재 제의가 불가능한 국가는 붉은색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_64($connect, $turn, $command) { + starter("파기", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +불가침중인 국가에 조약 파기를 제의합니다.
+제의할 국가를 목록에서 선택하세요.
+배경색은 현재 제의가 불가능한 국가는 붉은색, 현재 불가침중(제의 가능)인 국가는 푸른색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_65($connect, $turn, $command) { + starter("초토화", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시를 초토화 시킵니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_66($connect, $turn, $command) { + starter("천도", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시로 천도합니다.
+현재 수도에서 인접한 도시만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_67($connect, $turn, $command) { + starter("증축", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시를 증축합니다.
+현재 수도만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_68($connect, $turn, $command) { + starter("감축", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시를 감축합니다.
+현재 수도만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_72($connect, $turn, $command) { + starter("백성동원", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시에 백성동원을 발동합니다.
+아국 도시만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_73($connect, $turn, $command) { + starter("수몰", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시에 수몰을 발동합니다.
+전쟁중인 상대국 도시만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_74($connect, $turn, $command) { + starter("허보", 1); + $query = "select city from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $query = "select name,path from city where city='$general[city]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $currentcity = MYDB_fetch_array($result); + +echo " +
+선택된 도시에 허보를 발동합니다.
+선포, 전쟁중인 상대국 도시만 가능합니다.
+목록을 선택하거나 도시를 클릭하세요.
+
+ + +"; + + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + + ender(); +} + +function command_75($connect, $turn, $command) { + starter("피장파장", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +선택된 국가에 피장파장을 발동합니다.
+선포, 전쟁중인 상대국에만 가능합니다.
+상대 국가를 목록에서 선택하세요.
+배경색은 현재 피장파장 불가능 국가는 붉은색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_77($connect, $turn, $command) { + starter("이호경식", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +선택된 국가에 이호경식을 발동합니다.
+선포, 전쟁중인 상대국에만 가능합니다.
+상대 국가를 목록에서 선택하세요.
+배경색은 현재 이호경식 불가능 국가는 붉은색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_78($connect, $turn, $command) { + starter("급습", 1); + + $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + echo " +선택된 국가에 급습을 발동합니다.
+선포, 전쟁중인 상대국에만 가능합니다.
+상대 국가를 목록에서 선택하세요.
+배경색은 현재 급습 불가능 국가는 붉은색으로 표시됩니다.
+
+ 대상 국가 + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} + +function command_81($connect, $turn, $command) { + starter("국기변경", 1); + + $color = GetNationColors(); + + $query = "select color from nation where level>0"; + $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); + $nationcount = MYDB_num_rows($result); + + for($i=0; $i < $nationcount; $i++) { + $nation = MYDB_fetch_array($result); + $nationcolor[$i] = $nation[color]; + } + $validCount = count($color); + //등록된 색깔 가려내기 + for($i=0; $i < count($color); $i++) { + $valid[$i] = 1; + for($j=0; $j < $nationcount; $j++) { + if($color[$i] == $nationcolor[$j]) { + $valid[$i] = 0; + $validCount--; + } + } + } + //색깔이 다 쓰였으면 그냥 모두 허용 + if($validCount <= 0) { + for($i=0; $i < count($color); $i++) { + $valid[$i] = 1; + } + } + + echo " +국기를 변경합니다. 단 1회 가능합니다.
+
+색깔 : + +"; + for($i=0; $i < sizeof($turn); $i++) { + echo " + "; + } + + echo " +
+"; + ender(1); +} +?> + diff --git a/twe_close/queue.php b/twe_close/queue.php new file mode 100644 index 00000000..05800144 --- /dev/null +++ b/twe_close/queue.php @@ -0,0 +1,41 @@ +capacity = $capacity; + $this->size = 0; + $this->head = 0; + $this->tail = 0; + } + + function getSize() { + return $this->size; + } + + function clear() { + $this->size = 0; + $this->head = 0; + $this->tail = 0; + } + + function push($value) { + if($this->size >= $this->capacity) return; + $this->arr[$this->tail] = $value; + $this->tail = ($this->tail + 1) % $this->capacity; + $this->size++; + } + + function pop() { + if($this->size <= 0) return null; + $value = $this->arr[$this->head]; + $this->head = ($this->head + 1) % $this->capacity; + $this->size--; + return $value; + } +} +?> diff --git a/twe_close/reset.php b/twe_close/reset.php new file mode 100644 index 00000000..07c170b3 --- /dev/null +++ b/twe_close/reset.php @@ -0,0 +1,81 @@ +Error!!!",""); +if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); +MYDB_select_db($dbname, $connect ) or Error("MySQL-DB Select
Error!!!",""); + +delInDir("logs"); +delInDir("data/session"); +@unlink("data/connected.php"); + +// 관리자 테이블 삭제 +if(isTable($connect, "game",$dbname)) @MYDB_query("drop table game", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 장수 테이블 삭제 +if(isTable($connect, "gen",$dbname)) @MYDB_query("drop table general", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 국가 테이블 삭제 +if(isTable($connect, "nation",$dbname)) @MYDB_query("drop table nation", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 도시 테이블 삭제 +if(isTable($connect, "city",$dbname)) @MYDB_query("drop table city", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 부대 테이블 삭제 +if(isTable($connect, "troop",$dbname)) @MYDB_query("drop table troop", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 토큰 테이블 삭제 +if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 외교 테이블 삭제 +if(isTable($connect, "diplomacy",$dbname)) @MYDB_query("drop table diplomacy", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 토너먼트 테이블 삭제 +if(isTable($connect, "tournament",$dbname)) @MYDB_query("drop table tournament", $connect) or Error(__LINE__.MYDB_error($connect),""); +// 거래 테이블 삭제 +if(isTable($connect, "auction",$dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),""); +// 통계 테이블 삭제 +if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),""); +// 연감 테이블 삭제 +if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),""); + +// 관리자 테이블 생성 +if(!isTable($connect, "game",$dbname)) @MYDB_query($game_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 장수 테이블 생성 +if(!isTable($connect, "gen",$dbname)) @MYDB_query($general_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 국가 테이블 생성 +if(!isTable($connect, "nation",$dbname)) @MYDB_query($nation_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 도시 테이블 생성 +if(!isTable($connect, "city",$dbname)) @MYDB_query($city_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 부대 테이블 생성 +if(!isTable($connect, "troop",$dbname)) @MYDB_query($troop_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 토큰 테이블 생성 +if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 외교 테이블 생성 +if(!isTable($connect, "diplomacy",$dbname)) @MYDB_query($diplomacy_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 전당 테이블 생성 +if(!isTable($connect, "hall",$dbname)) @MYDB_query($hall_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 토너먼트 테이블 생성 +if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 거래 테이블 생성 +if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 통계 테이블 생성 +if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); +// 연감 테이블 생성 +if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),""); + +// 파일로 DB 정보 저장 +$file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fclose($file); +@mkdir("data",0707); +@chmod("data",0707); +@chmod("d_setting/set.php",0707); + +$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect)); + +MYDB_close($connect); + +echo ""; +?> diff --git a/twe_close/scenario_1.php b/twe_close/scenario_1.php new file mode 100644 index 00000000..d62efaf9 --- /dev/null +++ b/twe_close/scenario_1.php @@ -0,0 +1,795 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●184년 1월:【역사모드1】황건적의 난"; +$history[count($history)] = "●184년 1월:【황건적】전국 각지에서 황건적이 들고 일어서고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_10.php b/twe_close/scenario_10.php new file mode 100644 index 00000000..b6ba094e --- /dev/null +++ b/twe_close/scenario_10.php @@ -0,0 +1,901 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●225년 1월:【역사모드10】칠종칠금"; +$history[count($history)] = "●225년 1월:【이벤트】조조는 조비에게 후사를 부탁합니다."; +$history[count($history)] = "●225년 1월:【이벤트】손권은 국력을 비축하며 웅크리고 있습니다."; +$history[count($history)] = "●225년 1월:【이벤트】남만맹획은 유선에게 반기를 듭니다!"; +$history[count($history)] = "●225년 1월:【이벤트】제갈량은 남만을 정벌하기 위해 출정합니다!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_11.php b/twe_close/scenario_11.php new file mode 100644 index 00000000..47ef5b88 --- /dev/null +++ b/twe_close/scenario_11.php @@ -0,0 +1,900 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●228년 1월:【역사모드11】출사표"; +$history[count($history)] = "●228년 1월:【이벤트】손권은 국력을 비축하며 웅크리고 있습니다."; +$history[count($history)] = "●228년 1월:【이벤트】제갈량은 출사표를 내고 북벌에 나섭니다!"; +$history[count($history)] = "●228년 1월:【이벤트】조예는 이에 맞서 사마의를 보냅니다!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_12.php b/twe_close/scenario_12.php new file mode 100644 index 00000000..89d6ff15 --- /dev/null +++ b/twe_close/scenario_12.php @@ -0,0 +1,1184 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●191년 1월:【IF모드1】백마장군의 위세"; +$history[count($history)] = "●191년 1월:【시나리오】동탁은 장안으로 후퇴합니다!"; +$history[count($history)] = "●191년 1월:【시나리오】낙양손견과 결탁한 원술이 차지합니다!"; +$history[count($history)] = "●191년 1월:【시나리오】기주에는 조조와 의기투합한 원소가 힘을 비축합니다!"; +$history[count($history)] = "●191년 1월:【시나리오】병주에는 유비가 합세한 공손찬이 위용을 뽐냅니다!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_2.php b/twe_close/scenario_2.php new file mode 100644 index 00000000..32fc1329 --- /dev/null +++ b/twe_close/scenario_2.php @@ -0,0 +1,1714 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●190년 1월:【역사모드2】반동탁연합 결성"; +$history[count($history)] = "●190년 1월:【연합】조조의 주도하에 전국 각지의 세력들이 동탁 타도를 외치며 연합을 결성했습니다."; +$history[count($history)] = "●190년 1월:【연합】진류에서 조조가 반동탁연합 격문을 썼습니다."; +$history[count($history)] = "●190년 1월:【연합】남피원소가 맹주로 추대되었습니다."; +$history[count($history)] = "●190년 1월:【연합】원술이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】장사손견이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】하비도겸이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】북평공손찬이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】서량마등이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】한복이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】복양유대가 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】하내장양이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】평원유비가 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】북해공융이 연합에 참가했습니다."; +$history[count($history)] = "●190년 1월:【연합】공주가 연합에 참가했습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_20.php b/twe_close/scenario_20.php new file mode 100644 index 00000000..d23ac02d --- /dev/null +++ b/twe_close/scenario_20.php @@ -0,0 +1,749 @@ +●180년 1월:【가상모드1】영웅 난무"; +$history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_21.php b/twe_close/scenario_21.php new file mode 100644 index 00000000..117867cb --- /dev/null +++ b/twe_close/scenario_21.php @@ -0,0 +1,777 @@ +●180년 1월:【가상모드1】영웅 집결"; +$history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_22.php b/twe_close/scenario_22.php new file mode 100644 index 00000000..0243103b --- /dev/null +++ b/twe_close/scenario_22.php @@ -0,0 +1,197 @@ +ㅁ< ♡"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; + +//////////////////////////장수 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●179년 1월:【가상모드2】훼신 집결"; +$history[count($history)] = "●179년 1월:【이벤트】삼모전 역대 훼신들이 등장합니다."; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓝ".$name; + $genid = "gen{$gencount}"; + $turntime = getRandTurn($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%61 + 1; + $age = 15; + $specage = $age; + $specage2 = $age; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 2; + $npcmatch = rand()%150 + 1; + $picture = 'default.jpg'; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', + '$city','$leader','$power','$intel','$experience','$dedication', + '0','1000','1000','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); + //방랑군 + if(rand()%20 == 0) { + @MYDB_query(" + insert into nation ( + name,color,gold,rice,bill,rate,scout,war,tricklimit,surlimit, + scoutmsg,level + ) values ( + '$name','330000','1000','1000','100','15','0','0','24','72', + '훼신NPC국','0' + )", $connect + ) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select nation from nation where name='$name'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + // 군주로 // 현 국가 소속으로 + $query = "update general set belong=1,level=12,nation='$nation[nation]' where user_id='$genid'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //외교 추가 + $query = "select nation from nation where nation!='$nation[nation]'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $you = MYDB_fetch_array($result); + @MYDB_query(" + insert into diplomacy ( + me, you, state, term + ) values ( + '$nation[nation]', '$you[nation]', '2', '0' + )", $connect + ) or Error(__LINE__.MYDB_error($connect),""); + @MYDB_query(" + insert into diplomacy ( + me, you, state, term + ) values ( + '$you[nation]', '$nation[nation]', '2', '0' + )", $connect + ) or Error(__LINE__.MYDB_error($connect),""); + } + } +} + +?> diff --git a/twe_close/scenario_23.php b/twe_close/scenario_23.php new file mode 100644 index 00000000..b4804c15 --- /dev/null +++ b/twe_close/scenario_23.php @@ -0,0 +1,753 @@ +●180년 1월:【가상모드3】영웅 시대"; +$history[count($history)] = "●180년 1월:【이벤트】출연 가능한 모든 장수들이 재야로 등장하는 가상 시나리오."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_24.php b/twe_close/scenario_24.php new file mode 100644 index 00000000..5053015c --- /dev/null +++ b/twe_close/scenario_24.php @@ -0,0 +1,328 @@ +ㅁ< ♡"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; +RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; + +//군주임명 +$no = rand() % 79 + 2; +$query = "update general set level=12 where no='$no'"; +MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); + +RegGeneral3($connect,$admin[turnterm],$gencount, 2,12,"오랑캐대왕", 95, 95, 95,"패권","돌격", "오랑캐들이여 일어서라!"); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2,11, "오환대왕", 85, 55, 85,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2,10, "저대왕", 75, 75, 45,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 9, "흉노대왕", 65, 50, 50,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 8, "남만대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 7, "산월대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 6, "왜대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 5, "강대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; + +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "북적대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "서융대왕", 45, 15, 45,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "동이대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"북적장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"서융장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"동이장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"강장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"저장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"흉노장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"오환장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"남만장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"산월장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +for($k=0; $k <= 99; $k++) { + if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } + else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } + RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"왜장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; +} + +//////////////////////////장수 끝/////////////////////////////////////////////// + +//////////////////////////도시 소속///////////////////////////////////////////// +RegCity($connect, 1, "업", 1); +RegCity($connect, 2, "양양", 1); + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●180년 1월:【가상모드4】결사항전"; +$history[count($history)] = "●180년 1월:【이벤트】오랑캐에 맞서 버텨내야 합니다!"; +pushHistory($connect, $history); + +echo ""; + +function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓝ".$name; + $genid = "gen{$gencount}"; + $turntime = getRandTurn($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%61 + 1; + $age = 15; + $specage = $age; + $specage2 = $age; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 2; + $npcmatch = rand()%150 + 1; + $picture = 'default.jpg'; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,level,city, + leader,power,intel,experience,dedication, + gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','1','1','$city', + '$leader','$power','$intel','$experience','$dedication', + '2000','2000','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { + $name = "ⓝ".$name; + $genid = "npc{$gencount}"; + $turntime = getRandTurn($turnterm); + $personal = CharCall($personal); + $special = SpecCall($special); + if($special >= 40) { $special2 = $special; $special = 0; } + else { $special2 = 0; } + $city = rand()%61 + 1; + $age = 15; + $specage = $age+1; + $specage2 = $age+1; + $killturn = 9999; + $experience = $age * 100; + $dedication = $age * 100; + $npc = 2; + $npcmatch = 999; + $picture = 'default.jpg'; + $pw = md5("18071807"); + //장수 + @MYDB_query(" + insert into general ( + npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + leader,power,intel,experience,dedication, + level,gold,rice,crew,crewtype,train,atmos, + weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, + makelimit + ) values ( + '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$leader','$power','$intel','$experience','$dedication', + '$level','2000','2000','0','0','0','0', + '0','0','0','$turntime','$killturn','$age','1', + '$personal','$special','$specage','$special2','$specage2','$msg', + '0' + )", + $connect + ) or Error(__LINE__.MYDB_error($connect),""); +} + +?> diff --git a/twe_close/scenario_25.php b/twe_close/scenario_25.php new file mode 100644 index 00000000..88ac73e7 --- /dev/null +++ b/twe_close/scenario_25.php @@ -0,0 +1,319 @@ +●180년 1월:【가상모드5】영웅독존"; +$history[count($history)] = "●180년 1월:【이벤트】진정한 영웅들만이 재야로 등장하는 가상 시나리오."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_26.php b/twe_close/scenario_26.php new file mode 100644 index 00000000..271f7876 --- /dev/null +++ b/twe_close/scenario_26.php @@ -0,0 +1,316 @@ +●180년 1월:【가상모드6】무풍지대"; +$history[count($history)] = "●180년 1월:【이벤트】영웅은 없다! 오직 내가 영웅일 뿐이다!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_27.php b/twe_close/scenario_27.php new file mode 100644 index 00000000..4e66d967 --- /dev/null +++ b/twe_close/scenario_27.php @@ -0,0 +1,594 @@ +●180년 1월:【가상모드7】가요대잔치"; +$history[count($history)] = "●180년 1월:【이벤트】올해의 가요대상은!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_28.php b/twe_close/scenario_28.php new file mode 100644 index 00000000..9ceca2d3 --- /dev/null +++ b/twe_close/scenario_28.php @@ -0,0 +1,423 @@ +●180년 1월:【가상모드8】확산성 밀리언 아서"; +$history[count($history)] = "●180년 1월:【이벤트】삼모전에 확밀아가 빙의됩니다!"; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_3.php b/twe_close/scenario_3.php new file mode 100644 index 00000000..a8c77239 --- /dev/null +++ b/twe_close/scenario_3.php @@ -0,0 +1,1755 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●194년 1월:【역사모드3】군웅할거"; +$history[count($history)] = "●194년 1월:【이벤트】연주조조가 부친의 복수를 빌미로 서주 토벌에 나섭니다."; +$history[count($history)] = "●194년 1월:【이벤트】평원유비가 원군에 나섭니다."; +$history[count($history)] = "●194년 1월:【이벤트】여포가 진궁의 계책으로 진류를 확보했습니다."; +$history[count($history)] = "●194년 1월:【이벤트】조조가 근거지 재탈환을 위해 급히 물러납니다."; +$history[count($history)] = "●194년 1월:【이벤트】유비는 도겸의 권유로 소패에 머뭅니다."; +$history[count($history)] = "●194년 1월:【이벤트】한편 하북에서 원소와 공손찬이 자웅을 겨루려 합니다."; +$history[count($history)] = "●194년 1월:【이벤트】강동에서는 손책이 웅크리고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_4.php b/twe_close/scenario_4.php new file mode 100644 index 00000000..8658a05c --- /dev/null +++ b/twe_close/scenario_4.php @@ -0,0 +1,1292 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●196년 1월:【역사모드4】황제는 허도로"; +$history[count($history)] = "●196년 1월:【이벤트】황제가 이각에게서 탈출하여 낙양으로 향합니다."; +$history[count($history)] = "●196년 1월:【이벤트】황제는 폐허가 된 낙양의 수비를 위해 몇 군벌들에게 서신을 띄웁니다.."; +$history[count($history)] = "●196년 1월:【이벤트】기주원소는 세력 다지기에 바쁩니다."; +$history[count($history)] = "●196년 1월:【이벤트】연주조조가 병력을 출동하여 낙양을 점거합니다."; +$history[count($history)] = "●196년 1월:【이벤트】조조는 황제를 강압적으로 허창으로 이주시킵니다."; + +$history[count($history)] = "●196년 1월:【이벤트】여포는 패주하여 유비에 몸을 맡깁니다."; +$history[count($history)] = "●196년 1월:【이벤트】유비는 여포에게 소패를 내어줍니다."; +$history[count($history)] = "●196년 1월:【이벤트】동오손책은 소패왕의 이름을 떨칩니다."; +$history[count($history)] = "●196년 1월:【이벤트】회남원술은 황제가 될 기회를 노리고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_5.php b/twe_close/scenario_5.php new file mode 100644 index 00000000..450bfc4c --- /dev/null +++ b/twe_close/scenario_5.php @@ -0,0 +1,998 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●200년 1월:【역사모드5】관도대전"; +$history[count($history)] = "●200년 1월:【이벤트】조조에게 패한 유비는 원소에게 의지하기 위해 방랑하고 있습니다."; +$history[count($history)] = "●200년 1월:【이벤트】관우는 조조에게 투항합니다."; +$history[count($history)] = "●200년 1월:【이벤트】원소와 조조는 사활을 건 한판 승부를 준비하고 있습니다."; +$history[count($history)] = "●200년 1월:【이벤트】관도에는 전운이 감돌고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_6.php b/twe_close/scenario_6.php new file mode 100644 index 00000000..a4d83d3f --- /dev/null +++ b/twe_close/scenario_6.php @@ -0,0 +1,1044 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●202년 1월:【역사모드6】원가의 분열"; +$history[count($history)] = "●202년 1월:【이벤트】원소는 후계자로 셋째 아들 원상을 선택합니다."; +$history[count($history)] = "●202년 1월:【이벤트】맏아들 원담은 이에 반발하여 조조와 결탁하여 할거를 노립니다."; +$history[count($history)] = "●202년 1월:【이벤트】조조는 원담을 이용하여 원소의 잔당을 물리치기 위한 진군을 시작합니다."; +$history[count($history)] = "●202년 1월:【이벤트】남쪽으로 피신한 유비는 유표에게 의지해 신야에 머무릅니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_7.php b/twe_close/scenario_7.php new file mode 100644 index 00000000..c56de9aa --- /dev/null +++ b/twe_close/scenario_7.php @@ -0,0 +1,1096 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●207년 1월:【역사모드7】적벽대전"; +$history[count($history)] = "●207년 1월:【이벤트】하후돈을 패주시킨 서서는 계책에 빠져 조조에게 귀순합니다."; +$history[count($history)] = "●207년 1월:【이벤트】서서의 천거로 유비는 제갈량을 삼고초려의 예로 영입합니다."; +$history[count($history)] = "●207년 1월:【이벤트】원씨 가문을 무너뜨린 조조는 강남 정벌을 위해 대군을 이끌고 남하합니다."; +$history[count($history)] = "●207년 1월:【이벤트】손권은 유비와 불가침을 맺고 조조의 대군에 맞서기로 결심합니다."; +$history[count($history)] = "●207년 1월:【이벤트】대군을 몰고 온 조조, 이에 맞서는 손권과 유비. 적벽은 피로 물들려 하고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_8.php b/twe_close/scenario_8.php new file mode 100644 index 00000000..b02d6e0d --- /dev/null +++ b/twe_close/scenario_8.php @@ -0,0 +1,948 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●213년 1월:【역사모드8】익주 공방전"; +$history[count($history)] = "●213년 1월:【이벤트】마등을 섬멸시킨 조조는 익주로 눈을 돌립니다."; +$history[count($history)] = "●213년 1월:【이벤트】도망친 마초는 한중장로에게 의지합니다."; +$history[count($history)] = "●213년 1월:【이벤트】유장은 장로에 맞서기 위해 유비에게 도움을 청합니다."; +$history[count($history)] = "●213년 1월:【이벤트】일이 여의치 않은 유비는 등을 돌려 익주를 차지하려합니다."; +$history[count($history)] = "●213년 1월:【이벤트】형주에 일었던 피바람은 익주에서 다시 불어오고 있습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/scenario_9.php b/twe_close/scenario_9.php new file mode 100644 index 00000000..5e49bddc --- /dev/null +++ b/twe_close/scenario_9.php @@ -0,0 +1,872 @@ +0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +//전방설정 +$query = "select nation from nation"; +$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); +$count = MYDB_num_rows($result); +for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation[nation]); +} + +//////////////////////////도시 끝/////////////////////////////////////////////// + +//////////////////////////이벤트/////////////////////////////////////////////// +$history[count($history)] = "●219년 1월:【역사모드9】삼국정립"; +$history[count($history)] = "●219년 1월:【이벤트】한중을 빼앗긴 조조는 허창으로 퇴각합니다."; +$history[count($history)] = "●219년 1월:【이벤트】동오손권은 형주를 되찾기 위해 호시탐탐 노리고 있습니다."; +$history[count($history)] = "●219년 1월:【이벤트】한중왕에 오른 유비군의 기세는 하늘을 찌를 듯 합니다!"; +$history[count($history)] = "●219년 1월:【이벤트】위, 오, 촉의 본격적인 삼국시대가 되었습니다."; +pushHistory($connect, $history); + +echo ""; + +?> diff --git a/twe_close/schema.php b/twe_close/schema.php new file mode 100644 index 00000000..9479dc2a --- /dev/null +++ b/twe_close/schema.php @@ -0,0 +1,621 @@ + + diff --git a/twe_close/schema.sql.orig b/twe_close/schema.sql.orig new file mode 100644 index 00000000..1654fc77 --- /dev/null +++ b/twe_close/schema.sql.orig @@ -0,0 +1,621 @@ + + diff --git a/twe_close/select_npc.php b/twe_close/select_npc.php new file mode 100644 index 00000000..4935099e --- /dev/null +++ b/twe_close/select_npc.php @@ -0,0 +1,149 @@ +history.go(-1);"; + exit(1); +} + +$connect = dbConn(); +?> + + + +NPC선택 + + + + + + + + +
장 수 선 택
+ + +
+alert('잘못된 접근입니다!');"; + echo ""; + exit(); +} + +$query = "select no from general where npc<2"; +$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +if($gencount >= $admin[maxgeneral]) { + echo ""; + echo ""; + exit(); +} +?> + + + +"; + } else { + echo " + "; + } +} +?> +
임관 권유 메세지
$nation[name]-
$nation[name]$nation[scoutmsg]
+ +
+ + + + + + += 3) { +?> + + + + + + + + + + + + + + +
장수 선택
장수/1001.jpg border=0 name=picture width=64 height=64>
+ +
+ 컴퓨터가 조작중이던 NPC장수를 조종하게 됩니다.
+ 80시간동안 휴식을 취하면 다시 컴퓨터가 조종하게 되고 장수의 소유권을 잃습니다. +
+
+ + + +
+ + + diff --git a/twe_close/select_npc_post.php b/twe_close/select_npc_post.php new file mode 100644 index 00000000..9de8fccc --- /dev/null +++ b/twe_close/select_npc_post.php @@ -0,0 +1,127 @@ +history.go(-1);"; + exit(1); +} + +$date = date('Y-m-d H:i:s'); +//등록정보 +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +$connect = dbConn(); + +$npcid = "gen{$face}"; +$query = "select no,npc,level from general where user_id='$npcid'"; +$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +$npc = MYDB_fetch_array($result); + +########## 동일 정보 존재여부 확인. ########## + +$query = "select year,month,maxgeneral,turnterm,genius,npcmode from game where no='1'"; +$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); +$admin = MYDB_fetch_array($result); + +$query = "select no from general where npc<2"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$gencount = MYDB_num_rows($result); + +$query = "select no from general where user_id='$member[id]'"; +$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); +$id_num = MYDB_num_rows($result); + +if($admin[npcmode] != 1) { + echo ""; + echo ""; + exit(); +} elseif($id_num) { + echo(""); + exit; +} elseif($admin[maxgeneral] <= $gencount) { + echo(""); + exit; +} elseif($npc[npc] < 2) { + echo(""); + exit; +} elseif($npc[npc] != 2) { + echo(""); + exit; +/* +} elseif($npc[level] >= 5) { + echo(""); + exit; +*/ +} else { + //특회 + $userlevel = $member[grade]; + + $query = " + update general set + user_id='{$id}', + password='{$pwTemp}', + name2='{$member[name]}', + conmsg='', + npc=1, + killturn=6, + skin=1, + mode=2, + map=0, + userlevel='{$userlevel}' + where user_id='{$npcid}' + "; + MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + + $query = "select no,name,history from general where user_id='$id'"; + $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $log[0] = "●{$admin[month]}월:$me[name]의 육체에 $member[name](이)가 빙의됩니다!"; + $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name]의 육체에 $member[name](이)가 빙의되다."); + pushGenLog($me, $mylog); + pushAllLog($log); + + $adminLog[0] = "가입 : {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); + pushAdminLog($connect, $adminLog); + + MYDB_close($connect); + + echo(""); + echo(""); + echo(""); +} + +?> diff --git a/twe_close/selection.php b/twe_close/selection.php new file mode 100644 index 00000000..32db0e7c --- /dev/null +++ b/twe_close/selection.php @@ -0,0 +1,35 @@ +history.go(-1);"; + exit(1); +} + +if($btn == "장수생성") { + $site = "join.php"; +} elseif($btn == "장수선택") { + $site = "select_npc.php"; +} +?> + +
method=post> + + +
+a + + diff --git a/twe_close/start.php b/twe_close/start.php new file mode 100644 index 00000000..54dd5924 --- /dev/null +++ b/twe_close/start.php @@ -0,0 +1,3 @@ + + + diff --git a/twe_close/stylesheet.php b/twe_close/stylesheet.php new file mode 100644 index 00000000..96a11ee5 --- /dev/null +++ b/twe_close/stylesheet.php @@ -0,0 +1,86 @@ + + +body { color:; background-color:; border-width:1; border-color:gray; } +table { font-family:'맑은 고딕'; line-height:110%; } +font { font-family:'맑은 고딕'; line-height:110%; } +input { font-family:'맑은 고딕'; line-height:110%; height:20px } +select { font-family:'굴림'; line-height:100%; } +#bg0 { } +#bg1 { } +#bg2 { } diff --git a/twe_close/templates/.htaccess b/twe_close/templates/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/twe_close/templates/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/twe_close/turn.php b/twe_close/turn.php new file mode 100644 index 00000000..8b475519 --- /dev/null +++ b/twe_close/turn.php @@ -0,0 +1,90 @@ += 2) { echo ""; exit(); } + +switch($type) { +case 0: +/* + for($i=0; $i < $sel; $i++) { + $k = $i + $sel; + $query = "update general set "; + while(1) { + $query .= "turn{$k}=turn{$i}"; + $k += $sel; + if($k >= 24) break; + $query .= ","; + } + $query .= " where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +*/ + $query = "update general set "; + for($i=0; $i < $sel; $i++) { + $k = $i + $sel; + while(1) { + $query .= "turn{$k}=turn{$i}"; + $k += $sel; + if($i < $sel-1 || $k < 24) { $query .= ","; } + if($k >= 24) break; + } + } + $query .= " where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case 1: + $i = 23 - $sel; + $k = 23; + $query = "update general set "; + while(1) { + $query .= "turn{$k}=turn{$i},"; + $i--; $k--; + if($i < 0) break; + } + while(1) { + $query .= "turn{$k}=0"; + $k--; + if($k < 0) break; + $query .= ","; + } + $query .= " where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +case 2: + $i = 0; + $k = $sel; + $query = "update general set "; + while(1) { + $query .= "turn{$i}=turn{$k},"; + $i++; $k++; + if($k >= 24) break; + } + while(1) { + $query .= "turn{$i}=0"; + $i++; + if($i >= 24) break; + $query .= ","; + } + $query .= " where user_id='$_SESSION[p_id]'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + break; +} + +echo ""; + +?> + diff --git a/twe_close/turn_pop_core.php b/twe_close/turn_pop_core.php new file mode 100644 index 00000000..d40de774 --- /dev/null +++ b/twe_close/turn_pop_core.php @@ -0,0 +1,17 @@ +location.replace('b_chiefcenter.php');"; + +?> + diff --git a/twe_close/turn_push_core.php b/twe_close/turn_push_core.php new file mode 100644 index 00000000..b680cd17 --- /dev/null +++ b/twe_close/turn_push_core.php @@ -0,0 +1,17 @@ +location.replace('b_chiefcenter.php');"; + +?> + From 1efe3a750b7463df272b7ddb755c2222304ad5c5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 13 Jan 2018 21:08:01 +0900 Subject: [PATCH 009/622] =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=A4=91...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/new_lib.php | 1 + i_entrance/adminPost.php | 23 +++++++++++++++---- .../session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 1 + twe_close/func_process.php | 2 +- twe_close/lib.php | 22 +++++++++--------- twe_close/new_lib.php | 15 ++++++++++++ 6 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq diff --git a/che_close/new_lib.php b/che_close/new_lib.php index 02f1b34c..ee0ba8dc 100644 --- a/che_close/new_lib.php +++ b/che_close/new_lib.php @@ -10,3 +10,4 @@ function dbConnRoot() { @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); return $connect; } + diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index cb7f706b..c176fe6a 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -4,16 +4,31 @@ // $_POST['notice'] : 공지 // $_POST['server'] : 서버 인덱스 // $_POST['select'] : 0: 폐쇄, 1: 리셋, 2: 오픈 -$action = $_POST['action']; -$notice = $_POST['notice']; -$server = $_POST['server']; -$select = $_POST['select']; require_once('_common.php'); require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); +function getPost($str){ + if(!isset($_POST[$str])){ + return ''; + } + $temp = $_POST[$str]; + $temp=str_replace(" ","",$temp); + $temp=str_replace("\n","",$temp); + $temp=strip_tags($temp); + $temp=str_replace(" ","",$temp); + $temp=str_replace(" ","",$temp); + return $temp; +} + +$action = getPost('action'); +$notice = getPost('notice'); +$server = getPost('server'); +$select = getPost('select'); + + $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq new file mode 100644 index 00000000..79fe9609 --- /dev/null +++ b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq @@ -0,0 +1 @@ +p_ip|s:12:"192.168.0.26";p_time|i:1515678740; \ No newline at end of file diff --git a/twe_close/func_process.php b/twe_close/func_process.php index 7c25f4ff..b75f7a2b 100644 --- a/twe_close/func_process.php +++ b/twe_close/func_process.php @@ -2395,7 +2395,7 @@ function process_32($connect, &$general) { function process_33($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - global $_basegold, $_baserice; + //global $_basegold, $_baserice; //TODO : 버그로 보여서 지웠는데, 진짜로 지워도 되는지 확인 //탈취는 0까지 무제한 $_basegold = 0; $_baserice = 0; $date = substr($general[turntime],11,5); diff --git a/twe_close/lib.php b/twe_close/lib.php index 4cf324a7..75399e82 100644 --- a/twe_close/lib.php +++ b/twe_close/lib.php @@ -17,8 +17,8 @@ ob_start(); include "MYDB.php"; // 각종 변수 -define(STEP_LOG, true); -define(PROCESS_LOG, true); +define('STEP_LOG', true); +define('PROCESS_LOG', true); $_startTime = getMicroTime(); $_ver = "서비스중"; $_version = "삼국지 모의전투 PHP v2.29.1"; @@ -76,21 +76,21 @@ session_cache_expire(60); // 60분 session_start(); //첫 등장 -if($_SESSION[p_ip] == "") { - $_SESSION[p_ip] = getenv("REMOTE_ADDR"); - $_SESSION[p_time] = time(); +if(!isset($_SESSION['p_ip']) || $_SESSION['p_ip'] == "") { + $_SESSION['p_ip'] = getenv("REMOTE_ADDR"); + $_SESSION['p_time'] = time(); } //id, 이름, 국가는 로그인에서 //초과된 세션은 로그아웃(1시간) -if($_SESSION[p_time]+3600 < time()) { - $_SESSION[p_id] = ""; - $_SESSION[p_name] = ""; - $_SESSION[p_nation] = 0; - $_SESSION[p_time] = time(); +if($_SESSION['p_time']+3600 < time()) { + $_SESSION['p_id'] = ""; + $_SESSION['p_name'] = ""; + $_SESSION['p_nation'] = 0; + $_SESSION['p_time'] = time(); session_destroy(); } else { - $_SESSION[p_time] = time(); + $_SESSION['p_time'] = time(); } // DB가 설정이 되었는지를 검사 diff --git a/twe_close/new_lib.php b/twe_close/new_lib.php index 02f1b34c..b08635cd 100644 --- a/twe_close/new_lib.php +++ b/twe_close/new_lib.php @@ -10,3 +10,18 @@ function dbConnRoot() { @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); return $connect; } + + + +class General{ + protected + $no, $user_id, $name, $level, $level_exp, + $leadership, $leadership_exp, + $power, $power_exp, + $intel, $intel_exp; +} + +class NPCGeneral extends General{ + protected + $npc_name, $npcmsg; +} \ No newline at end of file From 7e0940d57d22d89c06282f8dbf6fb88a2d46306c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 02:31:25 +0900 Subject: [PATCH 010/622] =?UTF-8?q?=3F>=20=EC=A0=9C=EA=B1=B0=20replace=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=94=94=EB=B2=84=EA=B9=85=20=EC=9A=A9?= =?UTF-8?q?=EB=8F=84=EB=A1=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 15 + _common.php | 1 - che_close/_119_b.php | 1 - che_close/_admin1_submit.php | 2 - che_close/_admin2_submit.php | 1 - che_close/_admin3_submit.php | 2 - che_close/_admin4_submit.php | 2 - che_close/_admin5_submit.php | 2 - che_close/_simul.php | 2 +- che_close/a_traffic.php | 1 - che_close/a_vote.php | 1 - che_close/analytics.php | 3 +- che_close/c_auction.php | 1 - che_close/c_dipcenter.php | 2 - che_close/c_double.php | 2 - che_close/c_msgsubmit.php | 2 - che_close/c_myBossInfo.php | 2 - che_close/c_nationrule.php | 2 - che_close/c_tournament.php | 1 + che_close/c_troop.php | 2 - che_close/c_vacation.php | 2 - che_close/config.php | 4 +- che_close/d_ally.php | 2 - che_close/d_cancel.php | 2 - che_close/d_cease.php | 2 - che_close/d_merge.php | 2 - che_close/d_scout.php | 3 - che_close/d_setting/_common.php | 1 - che_close/d_surrender.php | 1 - che_close/data/connected.php | 2 +- che_close/event_1.php | 2 - che_close/event_2.php | 2 - che_close/event_3.php | 2 - che_close/event_4.php | 2 - che_close/func.php | 1 - che_close/func_auction.php | 1 - che_close/func_history.php | 1 - che_close/func_http.php | 1 - che_close/func_npc.php | 1 - che_close/func_process.php | 1 - che_close/func_string.php | 1 - che_close/install2_ok.php | 1 - che_close/install3_ok.php | 4 +- che_close/install_ok.php | 5 +- che_close/join_post.php | 2 - che_close/join_post.php.orig | 1 - che_close/join_token.php | 2 - che_close/lib.php | 1 - che_close/login_process.php | 1 - che_close/logout_process.php | 3 +- che_close/phpinfo.php | 3 - d_setting/_common.php | 1 - d_setting/set.php | 2 +- e_lib/license.txt | 1 + e_lib/meekrodb.2.3.class.php | 2 +- e_lib/phpmailer5/class.phpmailer.php | 2 +- e_lib/phpmailer5/class.pop3.php | 2 +- e_lib/phpmailer5/class.smtp.php | 2 +- e_lib/src/utilphp/util.php | 2535 +++++++++++++++++ e_lib/util.php | 10 + e_lib/utilphp-1.1.0/.coveralls.yml | 1 + e_lib/utilphp-1.1.0/.gitignore | 4 + e_lib/utilphp-1.1.0/.travis.yml | 22 + e_lib/utilphp-1.1.0/CHANGELOG.md | 86 + e_lib/utilphp-1.1.0/CONTRIBUTORS.md | 48 + e_lib/utilphp-1.1.0/LICENSE.md | 24 + e_lib/utilphp-1.1.0/README.md | 123 + e_lib/utilphp-1.1.0/composer.json | 24 + e_lib/utilphp-1.1.0/docs/css/docs.css | 168 ++ e_lib/utilphp-1.1.0/docs/favicon.png | Bin 0 -> 803 bytes .../docs/images/awesome_var_dump.jpg | Bin 0 -> 41429 bytes .../utilphp-1.1.0/docs/images/background.png | Bin 0 -> 1028 bytes .../docs/images/utility_logo.png | Bin 0 -> 84870 bytes e_lib/utilphp-1.1.0/docs/index.html | 1234 ++++++++ e_lib/utilphp-1.1.0/phpunit.xml.dist | 25 + e_lib/utilphp-1.1.0/tests/README.md | 39 + e_lib/utilphp-1.1.0/tests/UtilTest.php | 1183 ++++++++ f_config/DB.php | 2 +- f_config/DBS.php | 2 +- f_config/MAIL.php | 2 +- f_config/SESSION.php | 2 +- f_config/SETTING.php | 2 +- f_config/SETTINGS.php | 2 +- f_config/_common.php | 2 +- f_config/app.php | 2 +- f_config/config.php | 2 +- f_func/_common.php | 2 +- f_func/class._Chat.php | 2 +- f_func/class._DB.php | 2 +- f_func/class._JSON.php | 2 +- f_func/class._Lock.php | 2 +- f_func/class._Log.php | 2 +- f_func/class._Mail.php | 2 +- f_func/class._Process.php | 2 +- f_func/class._Queue.php | 2 +- f_func/class._Session.php | 2 +- f_func/class._Setting.php | 2 +- f_func/class._String.php | 1 - f_func/class._Time.php | 2 +- f_func/class._Validation.php | 2 +- f_func/func.php | 2 +- f_install/_common.php | 2 +- f_install/install1Post.php | 6 +- f_retrival/_common.php | 2 +- i_banner/banner.php | 1 - i_entrance/_common.php | 2 +- i_entrance/adminPost.php | 16 +- i_entrance/donation/Get.php | 2 +- i_entrance/donation/Post.php | 2 +- i_entrance/donation/_common.php | 2 +- i_entrance/donation/calculatePost.php | 2 +- i_entrance/enterPost.php | 2 - i_entrance/logoutPost.php | 2 +- i_entrance/manage/Get.php | 2 +- i_entrance/manage/_common.php | 2 +- i_entrance/manage/deletePost.php | 2 +- i_entrance/manage/iconPost.php | 2 +- i_entrance/manage/passwordPost.php | 2 +- i_entrance/manage/quitPost.php | 2 +- i_entrance/member/Get.php | 2 +- i_entrance/member/Post.php | 2 +- i_entrance/member/_common.php | 2 +- i_entrance/serverListPost.php | 2 +- i_login/Post.php | 2 +- i_login/_common.php | 2 +- i_login/findpw/Get.php | 2 +- i_login/findpw/Post.php | 2 +- i_login/findpw/_common.php | 2 +- i_login/findpw/checkPost.php | 2 +- i_login/findpw/sendCodePost.php | 2 +- i_login/findpw/verifyCodePost.php | 2 +- i_login/join/Get.php | 2 +- i_login/join/_common.php | 2 +- i_login/join/sendCodePost.php | 2 +- i_login/join/verifyCodePost.php | 2 +- i_other/_common.php | 2 +- i_popup/_common.php | 2 +- install.php | 4 +- twe_close/MYDB.php | 1 - twe_close/_119_b.php | 4 +- twe_close/_admin1_submit.php | 4 +- twe_close/_admin2_submit.php | 4 +- twe_close/_admin3_submit.php | 4 +- twe_close/_admin4_submit.php | 4 +- twe_close/_admin5_submit.php | 5 +- twe_close/_simul.php | 2 +- twe_close/a_traffic.php | 2 +- twe_close/a_vote.php | 2 +- twe_close/analytics.php | 3 +- twe_close/c_auction.php | 2 +- twe_close/c_betting.php | 3 +- twe_close/c_chiefboard.php | 4 +- twe_close/c_dipcenter.php | 4 +- twe_close/c_double.php | 1 - twe_close/c_msgsubmit.php | 5 +- twe_close/c_myBossInfo.php | 4 +- twe_close/c_nationboard.php | 3 +- twe_close/c_nationrule.php | 5 +- twe_close/c_tournament.php | 3 +- twe_close/c_troop.php | 2 - twe_close/c_vacation.php | 5 +- twe_close/c_vote.php | 3 +- twe_close/d_ally.php | 2 - twe_close/d_cancel.php | 2 - twe_close/d_cease.php | 2 - twe_close/d_merge.php | 2 - twe_close/d_scout.php | 2 - twe_close/d_setting/_common.php | 1 - twe_close/d_surrender.php | 2 - twe_close/data/connected.php | 2 +- .../session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 2 +- twe_close/event_1.php | 2 - twe_close/event_2.php | 2 - twe_close/event_3.php | 2 - twe_close/event_4.php | 2 - twe_close/func.php | 1 - twe_close/func_auction.php | 1 - twe_close/func_history.php | 1 - twe_close/func_http.php | 1 - twe_close/func_npc.php | 1 - twe_close/func_process.php | 1 - twe_close/func_string.php | 1 - twe_close/install.php | 2 +- twe_close/install2_ok.php | 1 - twe_close/install3_ok.php | 4 +- twe_close/install_ok.php | 5 +- twe_close/join_post.php | 1 - twe_close/join_post.php.orig | 1 - twe_close/join_token.php | 1 - twe_close/lib.php | 3 +- twe_close/license.txt | 37 +- twe_close/login_process.php | 1 - twe_close/logout_process.php | 6 +- twe_close/main.php | 2 - twe_close/map.php | 1 - twe_close/map_history.php | 1 - twe_close/npc_login_process.php | 1 - twe_close/phpinfo.php | 3 - twe_close/preprocessing.php | 2 - twe_close/proc.php | 1 - twe_close/process_war.php | 1 - twe_close/processing.php | 2 - twe_close/queue.php | 1 - twe_close/reset.php | 3 +- twe_close/scenario_1.php | 1 - twe_close/scenario_10.php | 1 - twe_close/scenario_11.php | 1 - twe_close/scenario_12.php | 1 - twe_close/scenario_2.php | 1 - twe_close/scenario_20.php | 1 - twe_close/scenario_21.php | 1 - twe_close/scenario_22.php | 1 - twe_close/scenario_23.php | 1 - twe_close/scenario_24.php | 1 - twe_close/scenario_25.php | 1 - twe_close/scenario_26.php | 1 - twe_close/scenario_27.php | 1 - twe_close/scenario_28.php | 1 - twe_close/scenario_3.php | 1 - twe_close/scenario_4.php | 1 - twe_close/scenario_5.php | 1 - twe_close/scenario_6.php | 1 - twe_close/scenario_7.php | 1 - twe_close/scenario_8.php | 1 - twe_close/scenario_9.php | 1 - twe_close/schema.php | 2 - twe_close/schema.sql.orig | 2 - twe_close/select_npc_post.php | 1 - twe_close/turn.php | 3 - twe_close/turn_pop_core.php | 3 - twe_close/turn_push_core.php | 2 - 231 files changed, 5683 insertions(+), 326 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 che_close/phpinfo.php create mode 100644 e_lib/license.txt create mode 100644 e_lib/src/utilphp/util.php create mode 100644 e_lib/util.php create mode 100644 e_lib/utilphp-1.1.0/.coveralls.yml create mode 100644 e_lib/utilphp-1.1.0/.gitignore create mode 100644 e_lib/utilphp-1.1.0/.travis.yml create mode 100644 e_lib/utilphp-1.1.0/CHANGELOG.md create mode 100644 e_lib/utilphp-1.1.0/CONTRIBUTORS.md create mode 100644 e_lib/utilphp-1.1.0/LICENSE.md create mode 100644 e_lib/utilphp-1.1.0/README.md create mode 100644 e_lib/utilphp-1.1.0/composer.json create mode 100644 e_lib/utilphp-1.1.0/docs/css/docs.css create mode 100644 e_lib/utilphp-1.1.0/docs/favicon.png create mode 100644 e_lib/utilphp-1.1.0/docs/images/awesome_var_dump.jpg create mode 100644 e_lib/utilphp-1.1.0/docs/images/background.png create mode 100644 e_lib/utilphp-1.1.0/docs/images/utility_logo.png create mode 100644 e_lib/utilphp-1.1.0/docs/index.html create mode 100644 e_lib/utilphp-1.1.0/phpunit.xml.dist create mode 100644 e_lib/utilphp-1.1.0/tests/README.md create mode 100644 e_lib/utilphp-1.1.0/tests/UtilTest.php delete mode 100644 twe_close/phpinfo.php diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..7dc85d41 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.svn": true, + "**/.hg": true, + "**/CVS": true, + "**/.DS_Store": true, + "**/logs/*.txt": true, + + }, + "search.exclude": { + "**/che_close": true, + "e_lib/*":true, + }, +} \ No newline at end of file diff --git a/_common.php b/_common.php index bc36bd5c..fecd45f7 100644 --- a/_common.php +++ b/_common.php @@ -7,4 +7,3 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> diff --git a/che_close/_119_b.php b/che_close/_119_b.php index 365c3a7e..ad3027d3 100644 --- a/che_close/_119_b.php +++ b/che_close/_119_b.php @@ -54,4 +54,3 @@ case "락풀기": } echo ""; -?> diff --git a/che_close/_admin1_submit.php b/che_close/_admin1_submit.php index 3f3bd5b2..c48f3ffd 100644 --- a/che_close/_admin1_submit.php +++ b/che_close/_admin1_submit.php @@ -176,5 +176,3 @@ switch($btn) { } echo ""; -?> - diff --git a/che_close/_admin2_submit.php b/che_close/_admin2_submit.php index 295d675e..c08fe206 100644 --- a/che_close/_admin2_submit.php +++ b/che_close/_admin2_submit.php @@ -428,5 +428,4 @@ switch($btn) { } echo ""; -?> diff --git a/che_close/_admin3_submit.php b/che_close/_admin3_submit.php index 60ed41b5..119d7548 100644 --- a/che_close/_admin3_submit.php +++ b/che_close/_admin3_submit.php @@ -130,5 +130,3 @@ switch($btn) { } echo ""; -?> - diff --git a/che_close/_admin4_submit.php b/che_close/_admin4_submit.php index 344f7def..bea27171 100644 --- a/che_close/_admin4_submit.php +++ b/che_close/_admin4_submit.php @@ -103,5 +103,3 @@ switch($btn) { } echo ""; -?> - diff --git a/che_close/_admin5_submit.php b/che_close/_admin5_submit.php index 3a6bcb98..6aa1ea8d 100644 --- a/che_close/_admin5_submit.php +++ b/che_close/_admin5_submit.php @@ -26,5 +26,3 @@ switch($btn) { } echo ""; -?> - diff --git a/che_close/_simul.php b/che_close/_simul.php index b993bd97..5f3b4120 100644 --- a/che_close/_simul.php +++ b/che_close/_simul.php @@ -1559,4 +1559,4 @@ function printSimul($game, $i) { "; } -?> + diff --git a/che_close/a_traffic.php b/che_close/a_traffic.php index 3731917b..1f12bb51 100644 --- a/che_close/a_traffic.php +++ b/che_close/a_traffic.php @@ -254,4 +254,3 @@ function getHexCode($hex) { case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F"; } } -?> diff --git a/che_close/a_vote.php b/che_close/a_vote.php index b6acb56c..b225b11c 100644 --- a/che_close/a_vote.php +++ b/che_close/a_vote.php @@ -335,4 +335,3 @@ function getNewColor($type) { return $color; } -?> diff --git a/che_close/analytics.php b/che_close/analytics.php index bf3f0d19..f0e83ec9 100644 --- a/che_close/analytics.php +++ b/che_close/analytics.php @@ -1,4 +1,4 @@ -"; -?> - diff --git a/che_close/c_double.php b/che_close/c_double.php index 8c99759b..d15b8ce5 100644 --- a/che_close/c_double.php +++ b/che_close/c_double.php @@ -124,5 +124,3 @@ if($command == 46) { echo ""; } -?> - diff --git a/che_close/c_msgsubmit.php b/che_close/c_msgsubmit.php index 4a0eba39..921e575d 100644 --- a/che_close/c_msgsubmit.php +++ b/che_close/c_msgsubmit.php @@ -115,5 +115,3 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { echo ""; -?> - diff --git a/che_close/c_myBossInfo.php b/che_close/c_myBossInfo.php index f12bee51..c4fa16a7 100644 --- a/che_close/c_myBossInfo.php +++ b/che_close/c_myBossInfo.php @@ -252,5 +252,3 @@ if($btn == "추방") { echo ""; -?> - diff --git a/che_close/c_nationrule.php b/che_close/c_nationrule.php index 9744f007..77aeb108 100644 --- a/che_close/c_nationrule.php +++ b/che_close/c_nationrule.php @@ -18,5 +18,3 @@ MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; -?> - diff --git a/che_close/c_tournament.php b/che_close/c_tournament.php index 157dc74a..6c1fe646 100644 --- a/che_close/c_tournament.php +++ b/che_close/c_tournament.php @@ -3,6 +3,7 @@ include "lib.php"; include "func.php"; + //로그인 검사 CheckLogin(); $connect = dbConn(); diff --git a/che_close/c_troop.php b/che_close/c_troop.php index 5dbdfb79..0da27a5f 100644 --- a/che_close/c_troop.php +++ b/che_close/c_troop.php @@ -54,5 +54,3 @@ if($btn == "부 대 창 설" && $name != "" && $me[troop] == 0) { echo ""; MYDB_close($connect); -?> - diff --git a/che_close/c_vacation.php b/che_close/c_vacation.php index b4062169..4f161d1b 100644 --- a/che_close/c_vacation.php +++ b/che_close/c_vacation.php @@ -16,5 +16,3 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" echo ""; -?> - diff --git a/che_close/config.php b/che_close/config.php index a1daf139..c60c8bb5 100644 --- a/che_close/config.php +++ b/che_close/config.php @@ -1,6 +1,6 @@ - +*/ \ No newline at end of file diff --git a/che_close/d_ally.php b/che_close/d_ally.php index 3e6b36f4..21c29d87 100644 --- a/che_close/d_ally.php +++ b/che_close/d_ally.php @@ -116,5 +116,3 @@ pushGenLog($you, $youlog); echo ""; -?> - diff --git a/che_close/d_cancel.php b/che_close/d_cancel.php index 94281351..7dd03327 100644 --- a/che_close/d_cancel.php +++ b/che_close/d_cancel.php @@ -95,5 +95,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/che_close/d_cease.php b/che_close/d_cease.php index 76c125f7..88dfd30c 100644 --- a/che_close/d_cease.php +++ b/che_close/d_cease.php @@ -100,5 +100,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/che_close/d_merge.php b/che_close/d_merge.php index d57c213e..9a202e95 100644 --- a/che_close/d_merge.php +++ b/che_close/d_merge.php @@ -134,5 +134,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/che_close/d_scout.php b/che_close/d_scout.php index 9900e98f..e427359d 100644 --- a/che_close/d_scout.php +++ b/che_close/d_scout.php @@ -159,6 +159,3 @@ pushAllLog($alllog); pushHistory($connect, $history); echo ""; - -?> - diff --git a/che_close/d_setting/_common.php b/che_close/d_setting/_common.php index 90e4756f..57949e8d 100644 --- a/che_close/d_setting/_common.php +++ b/che_close/d_setting/_common.php @@ -7,4 +7,3 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> diff --git a/che_close/d_surrender.php b/che_close/d_surrender.php index 729fe7fa..d6b37480 100644 --- a/che_close/d_surrender.php +++ b/che_close/d_surrender.php @@ -124,5 +124,4 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/data/connected.php b/che_close/data/connected.php index caaabefa..6702e873 100644 --- a/che_close/data/connected.php +++ b/che_close/data/connected.php @@ -1 +1 @@ - + - diff --git a/che_close/event_2.php b/che_close/event_2.php index 94bcc518..b104b92b 100644 --- a/che_close/event_2.php +++ b/che_close/event_2.php @@ -253,5 +253,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/che_close/event_3.php b/che_close/event_3.php index 48fd3d51..a613f347 100644 --- a/che_close/event_3.php +++ b/che_close/event_3.php @@ -114,5 +114,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/che_close/event_4.php b/che_close/event_4.php index 9d3b1c10..0b4ec99d 100644 --- a/che_close/event_4.php +++ b/che_close/event_4.php @@ -143,5 +143,3 @@ function RegGeneral4($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/che_close/func.php b/che_close/func.php index 31577742..7ef2380e 100644 --- a/che_close/func.php +++ b/che_close/func.php @@ -7416,4 +7416,3 @@ function Submit($url, $msg="", $msg2="") { "; } -?> diff --git a/che_close/func_auction.php b/che_close/func_auction.php index 9ffd729c..065d6919 100644 --- a/che_close/func_auction.php +++ b/che_close/func_auction.php @@ -345,4 +345,3 @@ function processAuction($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/che_close/func_history.php b/che_close/func_history.php index bd18360c..210eca7c 100644 --- a/che_close/func_history.php +++ b/che_close/func_history.php @@ -128,4 +128,3 @@ function LogHistory($connect, $isFirst=0) { if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Finish'); return true; } -?> diff --git a/che_close/func_http.php b/che_close/func_http.php index 09dd69d3..c809b579 100644 --- a/che_close/func_http.php +++ b/che_close/func_http.php @@ -285,4 +285,3 @@ class HTTP{ } } } -?> \ No newline at end of file diff --git a/che_close/func_npc.php b/che_close/func_npc.php index 9c8f7d1d..c1444023 100644 --- a/che_close/func_npc.php +++ b/che_close/func_npc.php @@ -1861,4 +1861,3 @@ function RiceBillRate($connect, $nation, $rate, $rice_rate, $type, $rice) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/che_close/func_process.php b/che_close/func_process.php index 7c25f4ff..abcc8493 100644 --- a/che_close/func_process.php +++ b/che_close/func_process.php @@ -6145,4 +6145,3 @@ function process_99($connect, &$general) { pushGenLog($general, $log); } -?> diff --git a/che_close/func_string.php b/che_close/func_string.php index 6c8c0c27..c84011af 100644 --- a/che_close/func_string.php +++ b/che_close/func_string.php @@ -301,4 +301,3 @@ class _String { } } -?> diff --git a/che_close/install2_ok.php b/che_close/install2_ok.php index 9c83711c..1441a8a7 100644 --- a/che_close/install2_ok.php +++ b/che_close/install2_ok.php @@ -345,4 +345,3 @@ function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def ) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/che_close/install3_ok.php b/che_close/install3_ok.php index 3d4f74b0..4a5fd495 100644 --- a/che_close/install3_ok.php +++ b/che_close/install3_ok.php @@ -6,5 +6,5 @@ $connect=dbConn(); LogHistory($connect, 1); -echo ""; -?> +//echo ""; +echo "index.php"; //TODO:replace diff --git a/che_close/install_ok.php b/che_close/install_ok.php index 3d0326c3..9ae5d345 100644 --- a/che_close/install_ok.php +++ b/che_close/install_ok.php @@ -83,7 +83,7 @@ if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) // 파일로 DB 정보 저장 $file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); @fclose($file); @mkdir("data",0707); @chmod("data",0707); @@ -93,5 +93,4 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); -echo ""; -?> +echo "install2.php"; //TODO:location.replace 살려두기 diff --git a/che_close/join_post.php b/che_close/join_post.php index 52384fb3..52d6e10f 100644 --- a/che_close/join_post.php +++ b/che_close/join_post.php @@ -271,5 +271,3 @@ if($id_num) { "); echo(""); } - -?> diff --git a/che_close/join_post.php.orig b/che_close/join_post.php.orig index ed10c24b..c796b36b 100644 --- a/che_close/join_post.php.orig +++ b/che_close/join_post.php.orig @@ -272,4 +272,3 @@ if($id_num) { echo(""); } -?> diff --git a/che_close/join_token.php b/che_close/join_token.php index 87042ec3..992b5b88 100644 --- a/che_close/join_token.php +++ b/che_close/join_token.php @@ -54,5 +54,3 @@ $response['intel'] = $abil['intel']; usleep(100*1000); echo json_encode($response); - -?> \ No newline at end of file diff --git a/che_close/lib.php b/che_close/lib.php index 7166d844..f6159ad3 100644 --- a/che_close/lib.php +++ b/che_close/lib.php @@ -181,4 +181,3 @@ function PrintElapsedTime() { $_endTime = round(getMicroTime() - $_startTime, 3); echo "
경과시간 : {$_endTime}초
"; } -?> diff --git a/che_close/login_process.php b/che_close/login_process.php index 1129f3c1..a3d56c76 100644 --- a/che_close/login_process.php +++ b/che_close/login_process.php @@ -78,4 +78,3 @@ function DeleteSession() { } MYDB_close($connect); -?> diff --git a/che_close/logout_process.php b/che_close/logout_process.php index 17b57479..ba8f1379 100644 --- a/che_close/logout_process.php +++ b/che_close/logout_process.php @@ -16,7 +16,7 @@ $id = $me[user_id]; $pw = $me[password]; $conmsg = $me[conmsg]; -//Ǻ +//���Ǻ��� ���� session_destroy(); echo ""; @@ -33,4 +33,3 @@ a */ -?> diff --git a/che_close/phpinfo.php b/che_close/phpinfo.php deleted file mode 100644 index cf608608..00000000 --- a/che_close/phpinfo.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/d_setting/_common.php b/d_setting/_common.php index cea1c49d..25378505 100644 --- a/d_setting/_common.php +++ b/d_setting/_common.php @@ -7,4 +7,3 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> diff --git a/d_setting/set.php b/d_setting/set.php index f941935e..1cba5893 100644 --- a/d_setting/set.php +++ b/d_setting/set.php @@ -8,4 +8,4 @@ smtp.gmail.com aser ewrwer @gmail.com - */?> + */ diff --git a/e_lib/license.txt b/e_lib/license.txt new file mode 100644 index 00000000..36931abb --- /dev/null +++ b/e_lib/license.txt @@ -0,0 +1 @@ +TODO : adobdb5, phpmailer5(?), plates, utilphp \ No newline at end of file diff --git a/e_lib/meekrodb.2.3.class.php b/e_lib/meekrodb.2.3.class.php index e63d9669..93cba614 100644 --- a/e_lib/meekrodb.2.3.class.php +++ b/e_lib/meekrodb.2.3.class.php @@ -953,4 +953,4 @@ class MeekroDBEval { } } -?> + diff --git a/e_lib/phpmailer5/class.phpmailer.php b/e_lib/phpmailer5/class.phpmailer.php index 4589cd79..2b994574 100644 --- a/e_lib/phpmailer5/class.phpmailer.php +++ b/e_lib/phpmailer5/class.phpmailer.php @@ -2470,4 +2470,4 @@ class phpmailerException extends Exception { return $errorMsg; } } -?> + diff --git a/e_lib/phpmailer5/class.pop3.php b/e_lib/phpmailer5/class.pop3.php index 83df20f3..d15db74c 100644 --- a/e_lib/phpmailer5/class.pop3.php +++ b/e_lib/phpmailer5/class.pop3.php @@ -407,4 +407,4 @@ class POP3 { // End of class } -?> + diff --git a/e_lib/phpmailer5/class.smtp.php b/e_lib/phpmailer5/class.smtp.php index 07c27593..5254943e 100644 --- a/e_lib/phpmailer5/class.smtp.php +++ b/e_lib/phpmailer5/class.smtp.php @@ -814,4 +814,4 @@ class SMTP { } -?> + diff --git a/e_lib/src/utilphp/util.php b/e_lib/src/utilphp/util.php new file mode 100644 index 00000000..0932d7d1 --- /dev/null +++ b/e_lib/src/utilphp/util.php @@ -0,0 +1,2535 @@ + + * @link http://github.com/brandonwamboldt/utilphp/ Official Documentation + */ +class util +{ + /** + * A constant representing the number of seconds in a minute, for + * making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_MINUTE = 60; + + /** + * A constant representing the number of seconds in an hour, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_HOUR = 3600; + const SECONDS_IN_AN_HOUR = 3600; + + /** + * A constant representing the number of seconds in a day, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_DAY = 86400; + + /** + * A constant representing the number of seconds in a week, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_WEEK = 604800; + + /** + * A constant representing the number of seconds in a month (30 days), + * for making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_MONTH = 2592000; + + /** + * A constant representing the number of seconds in a year (365 days), + * for making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_YEAR = 31536000; + + /** + * URL constants as defined in the PHP Manual under "Constants usable with + * http_build_url()". + * + * @see http://us2.php.net/manual/en/http.constants.php#http.constants.url + */ + const HTTP_URL_REPLACE = 1; + const HTTP_URL_JOIN_PATH = 2; + const HTTP_URL_JOIN_QUERY = 4; + const HTTP_URL_STRIP_USER = 8; + const HTTP_URL_STRIP_PASS = 16; + const HTTP_URL_STRIP_AUTH = 32; + const HTTP_URL_STRIP_PORT = 64; + const HTTP_URL_STRIP_PATH = 128; + const HTTP_URL_STRIP_QUERY = 256; + const HTTP_URL_STRIP_FRAGMENT = 512; + const HTTP_URL_STRIP_ALL = 1024; + + /** + * A collapse icon, using in the dump_var function to allow collapsing + * an array or object + * + * @var string + */ + public static $icon_collapse = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNzFDNDQyNEMyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNzFDNDQyM0MyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NDlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuF4AWkAAAA2UExURU9t2DBStczM/1h16DNmzHiW7iNFrypMvrnD52yJ4ezs7Onp6ejo6P///+Tk5GSG7D9h5SRGq0Q2K74AAAA/SURBVHjaLMhZDsAgDANRY3ZISnP/y1ZWeV+jAeuRSky6cKL4ryDdSggP8UC7r6GvR1YHxjazPQDmVzI/AQYAnFQDdVSJ80EAAAAASUVORK5CYII='; + + /** + * A collapse icon, using in the dump_var function to allow collapsing + * an array or object + * + * @var string + */ + public static $icon_expand = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQzZERTJDNEMyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQzZERTJDM0MyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3MzlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkmDvWIAAABIUExURU9t2MzM/3iW7ubm59/f5urq85mZzOvr6////9ra38zMzObm5rfB8FZz5myJ4SNFrypMvjBStTNmzOvr+mSG7OXl8T9h5SRGq/OfqCEAAABKSURBVHjaFMlbEoAwCEPRULXF2jdW9r9T4czcyUdA4XWB0IgdNSybxU9amMzHzDlPKKu7Fd1e6+wY195jW0ARYZECxPq5Gn8BBgCr0gQmxpjKAwAAAABJRU5ErkJggg=='; + + private static $hasArray = false; + + /** + * Map of special non-ASCII characters and suitable ASCII replacement + * characters. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + public static $maps = array( + 'de' => array(/* German */ + 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', + 'ẞ' => 'SS' + ), + 'latin' => array( + 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' => + 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', + 'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => + 'O', 'Ő' => 'O', 'Ø' => 'O','Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', + 'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => + 'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', + 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => + 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u', + 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y' + ), + 'latin_symbols' => array( + '©' => '(c)' + ), + 'el' => array(/* Greek */ + 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8', + 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p', + 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w', + 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's', + 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', + 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8', + 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P', + 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W', + 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I', + 'Ϋ' => 'Y' + ), + 'tr' => array(/* Turkish */ + 'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U', + 'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G' + ), + 'ru' => array(/* Russian */ + 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh', + 'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', + 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', + 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu', + 'я' => 'ya', + 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh', + 'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', + 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', + 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu', + 'Я' => 'Ya', + '№' => '' + ), + 'uk' => array(/* Ukrainian */ + 'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g' + ), + 'cs' => array(/* Czech */ + 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u', + 'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', + 'Ů' => 'U', 'Ž' => 'Z' + ), + 'pl' => array(/* Polish */ + 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', + 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', + 'Ź' => 'Z', 'Ż' => 'Z' + ), + 'ro' => array(/* Romanian */ + 'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't' + ), + 'lv' => array(/* Latvian */ + 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', + 'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', + 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z' + ), + 'lt' => array(/* Lithuanian */ + 'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z', + 'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z' + ), + 'vn' => array(/* Vietnamese */ + 'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A', + 'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a', + 'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E', + 'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e', + 'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i', + 'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O', + 'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o', + 'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U', + 'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u', + 'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y', + 'Đ' => 'D', 'đ' => 'd' + ), + 'ar' => array(/* Arabic */ + 'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', + 'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't', + 'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm', + 'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y' + ), + 'sr' => array(/* Serbian */ + 'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'dj', + 'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'Dj' + ), + 'az' => array(/* Azerbaijani */ + 'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', + 'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U' + ), + ); + + /** + * The character map for the designated language + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $map = array(); + + /** + * The character list as a string. + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $chars = ''; + + /** + * The character list as a regular expression. + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $regex = ''; + + /** + * The current language + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $language = ''; + + /** + * Initializes the character map. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static function initLanguageMap($language = '') + { + if (count(self::$map) > 0 && (($language == '') || ($language == self::$language))) { + return; + } + + // Is a specific map associated with $language? + if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) { + // Move this map to end. This means it will have priority over others + $m = self::$maps[$language]; + unset(self::$maps[$language]); + self::$maps[$language] = $m; + } + + // Reset static vars + self::$language = $language; + self::$map = array(); + self::$chars = ''; + + foreach (self::$maps as $map) { + foreach ($map as $orig => $conv) { + self::$map[$orig] = $conv; + self::$chars .= $orig; + } + } + + self::$regex = '/[' . self::$chars . ']/u'; + } + + + /** + * Access an array index, retrieving the value stored there if it + * exists or a default if it does not. This function allows you to + * concisely access an index which may or may not exist without + * raising a warning. + * + * @param array $var Array value to access + * @param mixed $default Default value to return if the key is not + * present in the array + * @return mixed + */ + public static function array_get(&$var, $default = null) + { + if (isset($var)) { + return $var; + } + + return $default; + } + + /** + * Display a variable's contents using nice HTML formatting and will + * properly display the value of booleans as true or false + * + * @see var_dump_plain() + * + * @param mixed $var The variable to dump + * @return string + */ + public static function var_dump($var, $return = false, $expandLevel = 1) + { + self::$hasArray = false; + $toggScript = 'var colToggle = function(toggID) {var img = document.getElementById(toggID);if (document.getElementById(toggID + "-collapsable").style.display == "none") {document.getElementById(toggID + "-collapsable").style.display = "inline";setImg(toggID, 0);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling;while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}} else {document.getElementById(toggID + "-collapsable").style.display = "none";setImg(toggID, 1);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling; while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}}};'; + $imgScript = 'var setImg = function(objID,imgID,addStyle) {var imgStore = ["data:image/png;base64,' . self::$icon_collapse . '", "data:image/png;base64,' . self::$icon_expand . '"];if (objID) {document.getElementById(objID).setAttribute("src", imgStore[imgID]);if (addStyle){document.getElementById(objID).setAttribute("style", "position:relative;left:-5px;top:-1px;cursor:pointer;");}}};'; + $jsCode = preg_replace('/ +/', ' ', ''); + $html = '
';
+        $done  = array();
+        $html .= self::var_dump_plain($var, intval($expandLevel), 0, $done);
+        $html .= '
'; + + if (self::$hasArray) { + $html = $jsCode . $html; + } + + if (!$return) { + echo $html; + } + + return $html; + } + + /** + * Display a variable's contents using nice HTML formatting (Without + * the
 tag) and will properly display the values of variables
+     * like booleans and resources. Supports collapsable arrays and objects
+     * as well.
+     *
+     * @param  mixed $var The variable to dump
+     * @return string
+     */
+    public static function var_dump_plain($var, $expLevel, $depth = 0, $done = array())
+    {
+        $html = '';
+
+        if ($expLevel > 0) {
+            $expLevel--;
+            $setImg = 0;
+            $setStyle = 'display:inline;';
+        } elseif ($expLevel == 0) {
+            $setImg = 1;
+            $setStyle='display:none;';
+        } elseif ($expLevel < 0) {
+            $setImg = 0;
+            $setStyle = 'display:inline;';
+        }
+
+        if (is_bool($var)) {
+            $html .= 'bool(' . (($var) ? 'true' : 'false') . ')';
+        } elseif (is_int($var)) {
+            $html .= 'int(' . $var . ')';
+        } elseif (is_float($var)) {
+            $html .= 'float(' . $var . ')';
+        } elseif (is_string($var)) {
+            $html .= 'string(' . strlen($var) . ') "' . self::htmlentities($var) . '"';
+        } elseif (is_null($var)) {
+            $html .= 'NULL';
+        } elseif (is_resource($var)) {
+            $html .= 'resource("' . get_resource_type($var) . '") "' . $var . '"';
+        } elseif (is_array($var)) {
+            // Check for recursion
+            if ($depth > 0) {
+                foreach ($done as $prev) {
+                    if ($prev === $var) {
+                        $html .= 'array(' . count($var) . ') *RECURSION DETECTED*';
+                        return $html;
+                    }
+                }
+
+                // Keep track of variables we have already processed to detect recursion
+                $done[] = &$var;
+            }
+
+            self::$hasArray = true;
+            $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000);
+
+            $html .= (!empty($var) ? ' ' : '') . 'array(' . count($var) . ')';
+            if (!empty($var)) {
+                $html .= ' 
[
'; + + $indent = 4; + $longest_key = 0; + + foreach ($var as $key => $value) { + if (is_string($key)) { + $longest_key = max($longest_key, strlen($key) + 2); + } else { + $longest_key = max($longest_key, strlen($key)); + } + } + + foreach ($var as $key => $value) { + if (is_numeric($key)) { + $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); + } else { + $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); + } + + $html .= ' => '; + + $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); + + foreach ($value as $line => $val) { + if ($line != 0) { + $value[$line] = str_repeat(' ', $indent * 2) . $val; + } + } + + $html .= implode('
', $value) . '
'; + } + + $html .= ']
'; + } + } elseif (is_object($var)) { + // Check for recursion + foreach ($done as $prev) { + if ($prev === $var) { + $html .= 'object(' . get_class($var) . ') *RECURSION DETECTED*'; + return $html; + } + } + + // Keep track of variables we have already processed to detect recursion + $done[] = &$var; + + self::$hasArray=true; + $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000); + + $html .= ' object(' . get_class($var) . ')
[
'; + + $varArray = (array) $var; + + $indent = 4; + $longest_key = 0; + + foreach ($varArray as $key => $value) { + if (substr($key, 0, 2) == "\0*") { + unset($varArray[$key]); + $key = 'protected:' . substr($key, 3); + $varArray[$key] = $value; + } elseif (substr($key, 0, 1) == "\0") { + unset($varArray[$key]); + $key = 'private:' . substr($key, 1, strpos(substr($key, 1), "\0")) . ':' . substr($key, strpos(substr($key, 1), "\0") + 2); + $varArray[$key] = $value; + } + + if (is_string($key)) { + $longest_key = max($longest_key, strlen($key) + 2); + } else { + $longest_key = max($longest_key, strlen($key)); + } + } + + foreach ($varArray as $key => $value) { + if (is_numeric($key)) { + $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); + } else { + $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); + } + + $html .= ' => '; + + $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); + + foreach ($value as $line => $val) { + if ($line != 0) { + $value[$line] = str_repeat(' ', $indent * 2) . $val; + } + } + + $html .= implode('
', $value) . '
'; + } + + $html .= ']
'; + } + + return $html; + } + + /** + * Converts any accent characters to their equivalent normal characters + * and converts any other non-alphanumeric characters to dashes, then + * converts any sequence of two or more dashes to a single dash. This + * function generates slugs safe for use as URLs, and if you pass true + * as the second parameter, it will create strings safe for use as CSS + * classes or IDs. + * + * @param string $string A string to convert to a slug + * @param string $separator The string to separate words with + * @param boolean $css_mode Whether or not to generate strings safe for + * CSS classes/IDs (Default to false) + * @return string + */ + public static function slugify($string, $separator = '-', $css_mode = false) + { + // Compatibility with 1.0.* parameter ordering for semvar + if ($separator === true || $separator === false) { + $css_mode = $separator; + $separator = '-'; + + // Raise deprecation error + trigger_error( + 'util::slugify() now takes $css_mode as the third parameter, please update your code', + E_USER_DEPRECATED + ); + } + + $slug = preg_replace('/([^a-z0-9]+)/', $separator, strtolower(self::remove_accents($string))); + + if ($css_mode) { + $digits = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); + + if (is_numeric(substr($slug, 0, 1))) { + $slug = $digits[substr($slug, 0, 1)] . substr($slug, 1); + } + } + + return $slug; + } + + /** + * Checks to see if a string is utf8 encoded. + * + * NOTE: This function checks for 5-Byte sequences, UTF8 + * has Bytes Sequences with a maximum length of 4. + * + * Written by Tony Ferrara + * + * @param string $string The string to be checked + * @return boolean + */ + public static function seems_utf8($string) + { + if (function_exists('mb_check_encoding')) { + // If mbstring is available, this is significantly faster than + // using PHP regexps. + return mb_check_encoding($string, 'UTF-8'); + } + + // @codeCoverageIgnoreStart + return self::seemsUtf8Regex($string); + // @codeCoverageIgnoreEnd + } + + /** + * A non-Mbstring UTF-8 checker. + * + * @param $string + * @return bool + */ + protected static function seemsUtf8Regex($string) + { + // Obtained from http://stackoverflow.com/a/11709412/430062 with permission. + $regex = '/( + [\xC0-\xC1] # Invalid UTF-8 Bytes + | [\xF5-\xFF] # Invalid UTF-8 Bytes + | \xE0[\x80-\x9F] # Overlong encoding of prior code point + | \xF0[\x80-\x8F] # Overlong encoding of prior code point + | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start + | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start + | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start + | (?<=[\x0-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle + | (? + * + * @param string $brokenSerializedData + * @return string + */ + public static function fix_broken_serialization($brokenSerializedData) + { + $fixdSerializedData = preg_replace_callback('!s:(\d+):"(.*?)";!', function($matches) { + $snip = $matches[2]; + return 's:' . strlen($snip) . ':"' . $snip . '";'; + }, $brokenSerializedData); + + return $fixdSerializedData; + } + + /** + * Checks to see if the page is being server over SSL or not + * + * @return boolean + */ + public static function is_https() + { + return isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'; + } + + /** + * Add or remove query arguments to the URL. + * + * @param mixed $newKey Either newkey or an associative array + * @param mixed $newValue Either newvalue or oldquery or uri + * @param mixed $uri URI or URL to append the queru/queries to. + * @return string + */ + public static function add_query_arg($newKey, $newValue = null, $uri = null) + { + // Was an associative array of key => value pairs passed? + if (is_array($newKey)) { + $newParams = $newKey; + + // Was the URL passed as an argument? + if (!is_null($newValue)) { + $uri = $newValue; + } elseif (!is_null($uri)) { + $uri = $uri; + } else { + $uri = self::array_get($_SERVER['REQUEST_URI'], ''); + } + } else { + $newParams = array($newKey => $newValue); + + // Was the URL passed as an argument? + $uri = is_null($uri) ? self::array_get($_SERVER['REQUEST_URI'], '') : $uri; + } + + // Parse the URI into it's components + $puri = parse_url($uri); + + if (isset($puri['query'])) { + parse_str($puri['query'], $queryParams); + $queryParams = array_merge($queryParams, $newParams); + } elseif (isset($puri['path']) && strstr($puri['path'], '=') !== false) { + $puri['query'] = $puri['path']; + unset($puri['path']); + parse_str($puri['query'], $queryParams); + $queryParams = array_merge($queryParams, $newParams); + } else { + $queryParams = $newParams; + } + + // Strip out any query params that are set to false + foreach ($queryParams as $param => $value) { + if ($value === false) { + unset($queryParams[$param]); + } + } + + // Re-construct the query string + $puri['query'] = http_build_query($queryParams); + + // Re-construct the entire URL + $nuri = self::http_build_url($puri); + + // Make the URI consistent with our input + if ($nuri[0] === '/' && strstr($uri, '/') === false) { + $nuri = substr($nuri, 1); + } + + if ($nuri[0] === '?' && strstr($uri, '?') === false) { + $nuri = substr($nuri, 1); + } + + return rtrim($nuri, '?'); + } + + /** + * Removes an item or list from the query string. + * + * @param string|array $keys Query key or keys to remove. + * @param bool $uri When false uses the $_SERVER value + * @return string + */ + public static function remove_query_arg($keys, $uri = null) + { + if (is_array($keys)) { + return self::add_query_arg(array_combine($keys, array_fill(0, count($keys), null)), $uri); + } + + return self::add_query_arg(array($keys => null), $uri); + } + + /** + * Build a URL. + * + * The parts of the second URL will be merged into the first according to + * the flags argument. + * + * @author Jake Smith + * @see https://github.com/jakeasmith/http_build_url/ + * + * @param mixed $url (part(s) of) an URL in form of a string or + * associative array like parse_url() returns + * @param mixed $parts same as the first argument + * @param int $flags a bitmask of binary or'ed HTTP_URL constants; + * HTTP_URL_REPLACE is the default + * @param array $new_url if set, it will be filled with the parts of the + * composed url like parse_url() would return + * @return string + */ + public static function http_build_url($url, $parts = array(), $flags = self::HTTP_URL_REPLACE, &$new_url = array()) + { + is_array($url) || $url = parse_url($url); + is_array($parts) || $parts = parse_url($parts); + + isset($url['query']) && is_string($url['query']) || $url['query'] = null; + isset($parts['query']) && is_string($parts['query']) || $parts['query'] = null; + + $keys = array('user', 'pass', 'port', 'path', 'query', 'fragment'); + + // HTTP_URL_STRIP_ALL and HTTP_URL_STRIP_AUTH cover several other flags. + if ($flags & self::HTTP_URL_STRIP_ALL) { + $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS + | self::HTTP_URL_STRIP_PORT | self::HTTP_URL_STRIP_PATH + | self::HTTP_URL_STRIP_QUERY | self::HTTP_URL_STRIP_FRAGMENT; + } elseif ($flags & self::HTTP_URL_STRIP_AUTH) { + $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS; + } + + // Schema and host are alwasy replaced + foreach (array('scheme', 'host') as $part) { + if (isset($parts[$part])) { + $url[$part] = $parts[$part]; + } + } + + if ($flags & self::HTTP_URL_REPLACE) { + foreach ($keys as $key) { + if (isset($parts[$key])) { + $url[$key] = $parts[$key]; + } + } + } else { + if (isset($parts['path']) && ($flags & self::HTTP_URL_JOIN_PATH)) { + if (isset($url['path']) && substr($parts['path'], 0, 1) !== '/') { + $url['path'] = rtrim( + str_replace(basename($url['path']), '', $url['path']), + '/' + ) . '/' . ltrim($parts['path'], '/'); + } else { + $url['path'] = $parts['path']; + } + } + + if (isset($parts['query']) && ($flags & self::HTTP_URL_JOIN_QUERY)) { + if (isset($url['query'])) { + parse_str($url['query'], $url_query); + parse_str($parts['query'], $parts_query); + + $url['query'] = http_build_query( + array_replace_recursive( + $url_query, + $parts_query + ) + ); + } else { + $url['query'] = $parts['query']; + } + } + } + + if (isset($url['path']) && substr($url['path'], 0, 1) !== '/') { + $url['path'] = '/' . $url['path']; + } + + foreach ($keys as $key) { + $strip = 'HTTP_URL_STRIP_' . strtoupper($key); + if ($flags & constant('utilphp\\util::' . $strip)) { + unset($url[$key]); + } + } + + $parsed_string = ''; + + if (isset($url['scheme'])) { + $parsed_string .= $url['scheme'] . '://'; + } + + if (isset($url['user'])) { + $parsed_string .= $url['user']; + + if (isset($url['pass'])) { + $parsed_string .= ':' . $url['pass']; + } + + $parsed_string .= '@'; + } + + if (isset($url['host'])) { + $parsed_string .= $url['host']; + } + + if (isset($url['port'])) { + $parsed_string .= ':' . $url['port']; + } + + if (!empty($url['path'])) { + $parsed_string .= $url['path']; + } else { + $parsed_string .= '/'; + } + + if (isset($url['query'])) { + $parsed_string .= '?' . $url['query']; + } + + if (isset($url['fragment'])) { + $parsed_string .= '#' . $url['fragment']; + } + + $new_url = $url; + + return $parsed_string; + } + + /** + * Converts many english words that equate to true or false to boolean. + * + * Supports 'y', 'n', 'yes', 'no' and a few other variations. + * + * @param string $string The string to convert to boolean + * @param bool $default The value to return if we can't match any + * yes/no words + * @return boolean + */ + public static function str_to_bool($string, $default = false) + { + $yes_words = 'affirmative|all right|aye|indubitably|most assuredly|ok|of course|okay|sure thing|y|yes+|yea|yep|sure|yeah|true|t|on|1|oui|vrai'; + $no_words = 'no*|no way|nope|nah|na|never|absolutely not|by no means|negative|never ever|false|f|off|0|non|faux'; + + if (preg_match('/^(' . $yes_words . ')$/i', $string)) { + return true; + } elseif (preg_match('/^(' . $no_words . ')$/i', $string)) { + return false; + } + + return $default; + } + + /** + * Check if a string starts with the given string. + * + * @param string $string + * @param string $starts_with + * @return boolean + */ + public static function starts_with($string, $starts_with) + { + return strpos($string, $starts_with) === 0; + } + + /** + * Check if a string ends with the given string. + * + * @param string $string + * @param string $starts_with + * @return boolean + */ + public static function ends_with($string, $ends_with) + { + return substr($string, -strlen($ends_with)) === $ends_with; + } + + /** + * Check if a string contains another string. + * + * @param string $haystack + * @param string $needle + * @return boolean + */ + public static function str_contains($haystack, $needle) + { + return strpos($haystack, $needle) !== false; + } + + /** + * Check if a string contains another string. This version is case + * insensitive. + * + * @param string $haystack + * @param string $needle + * @return boolean + */ + public static function str_icontains($haystack, $needle) + { + return stripos($haystack, $needle) !== false; + } + + /** + * Return the file extension of the given filename. + * + * @param string $filename + * @return string + */ + public static function get_file_ext($filename) + { + return pathinfo($filename, PATHINFO_EXTENSION); + } + + /** + * Removes a directory (and its contents) recursively. + * + * Contributed by Askar (ARACOOL) + * + * @param string $dir The directory to be deleted recursively + * @param bool $traverseSymlinks Delete contents of symlinks recursively + * @return bool + * @throws \RuntimeException + */ + public static function rmdir($dir, $traverseSymlinks = false) + { + if (!file_exists($dir)) { + return true; + } elseif (!is_dir($dir)) { + throw new \RuntimeException('Given path is not a directory'); + } + + if (!is_link($dir) || $traverseSymlinks) { + foreach (scandir($dir) as $file) { + if ($file === '.' || $file === '..') { + continue; + } + + $currentPath = $dir . '/' . $file; + + if (is_dir($currentPath)) { + self::rmdir($currentPath, $traverseSymlinks); + } elseif (!unlink($currentPath)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $currentPath); + // @codeCoverageIgnoreEnd + } + } + } + + // Windows treats removing directory symlinks identically to removing directories. + if (is_link($dir) && !defined('PHP_WINDOWS_VERSION_MAJOR')) { + if (!unlink($dir)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $dir); + // @codeCoverageIgnoreEnd + } + } else { + if (!rmdir($dir)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $dir); + // @codeCoverageIgnoreEnd + } + } + + return true; + } + + /** + * Convert entities, while preserving already-encoded entities. + * + * @param string $string The text to be converted + * @return string + */ + public static function htmlentities($string, $preserve_encoded_entities = false) + { + if ($preserve_encoded_entities) { + // @codeCoverageIgnoreStart + if (defined('HHVM_VERSION')) { + $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); + } else { + $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, self::mbInternalEncoding()); + } + // @codeCoverageIgnoreEnd + + $translation_table[chr(38)] = '&'; + return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); + } + + return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); + } + + /** + * Convert >, <, ', " and & to html entities, but preserves entities that + * are already encoded. + * + * @param string $string The text to be converted + * @return string + */ + public static function htmlspecialchars($string, $preserve_encoded_entities = false) + { + if ($preserve_encoded_entities) { + // @codeCoverageIgnoreStart + if (defined('HHVM_VERSION')) { + $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES); + } else { + $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES, self::mbInternalEncoding()); + } + // @codeCoverageIgnoreEnd + + $translation_table[chr(38)] = '&'; + + return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); + } + + return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); + } + + /** + * Transliterates characters to their ASCII equivalents. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + * + * @param string $text Text that might have not-ASCII characters + * @param string $language Specifies a priority for a specific language. + * @return string Filtered string with replaced "nice" characters + */ + public static function downcode($text, $language = '') + { + self::initLanguageMap($language); + + if (self::seems_utf8($text)) { + if (preg_match_all(self::$regex, $text, $matches)) { + for ($i = 0; $i < count($matches[0]); $i++) { + $char = $matches[0][$i]; + if (isset(self::$map[$char])) { + $text = str_replace($char, self::$map[$char], $text); + } + } + } + } else { + // Not a UTF-8 string so we assume its ISO-8859-1 + $search = "\x80\x83\x8a\x8e\x9a\x9e\x9f\xa2\xa5\xb5\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd"; + $search .= "\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9"; + $search .= "\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xff"; + $text = strtr($text, $search, 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'); + + // These latin characters should be represented by two characters so + // we can't use strtr + $complexSearch = array("\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe"); + $complexReplace = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $text = str_replace($complexSearch, $complexReplace, $text); + } + + return $text; + } + + /** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just + * returned. + * + * @param string $string Text that might have accent characters + * @param string $language Specifies a priority for a specific language. + * @return string Filtered string with replaced "nice" characters + */ + public static function remove_accents($string, $language = '') + { + if (!preg_match('/[\x80-\xff]/', $string)) { + return $string; + } + + return self::downcode($string, $language); + } + + /** + * Strip all witespaces from the given string. + * + * @param string $string The string to strip + * @return string + */ + public static function strip_space($string) + { + return preg_replace('/\s+/', '', $string); + } + + /** + * Sanitize a string by performing the following operation : + * - Remove accents + * - Lower the string + * - Remove punctuation characters + * - Strip whitespaces + * + * @param string $string the string to sanitize + * @return string + */ + public static function sanitize_string($string) + { + $string = self::remove_accents($string); + $string = strtolower($string); + $string = preg_replace('/[^a-zA-Z 0-9]+/', '', $string); + $string = self::strip_space($string); + + return $string; + } + + /** + * Pads a given string with zeroes on the left. + * + * @param int $number The number to pad + * @param int $length The total length of the desired string + * @return string + */ + public static function zero_pad($number, $length) + { + return str_pad($number, $length, '0', STR_PAD_LEFT); + } + + /** + * Converts a unix timestamp to a relative time string, such as "3 days ago" + * or "2 weeks ago". + * + * @param int $from The date to use as a starting point + * @param int $to The date to compare to, defaults to now + * @param string $suffix The string to add to the end, defaults to " ago" + * @return string + */ + public static function human_time_diff($from, $to = '', $as_text = false, $suffix = ' ago') + { + if ($to == '') { + $to = time(); + } + + $from = new \DateTime(date('Y-m-d H:i:s', $from)); + $to = new \DateTime(date('Y-m-d H:i:s', $to)); + $diff = $from->diff($to); + + if ($diff->y > 1) { + $text = $diff->y . ' years'; + } elseif ($diff->y == 1) { + $text = '1 year'; + } elseif ($diff->m > 1) { + $text = $diff->m . ' months'; + } elseif ($diff->m == 1) { + $text = '1 month'; + } elseif ($diff->d > 7) { + $text = ceil($diff->d / 7) . ' weeks'; + } elseif ($diff->d == 7) { + $text = '1 week'; + } elseif ($diff->d > 1) { + $text = $diff->d . ' days'; + } elseif ($diff->d == 1) { + $text = '1 day'; + } elseif ($diff->h > 1) { + $text = $diff->h . ' hours'; + } elseif ($diff->h == 1) { + $text = ' 1 hour'; + } elseif ($diff->i > 1) { + $text = $diff->i . ' minutes'; + } elseif ($diff->i == 1) { + $text = '1 minute'; + } elseif ($diff->s > 1) { + $text = $diff->s . ' seconds'; + } else { + $text = '1 second'; + } + + if ($as_text) { + $text = explode(' ', $text, 2); + $text = self::number_to_word($text[0]) . ' ' . $text[1]; + } + + return trim($text) . $suffix; + } + + /** + * Converts a number into the text equivalent. For example, 456 becomes four + * hundred and fifty-six. + * + * Part of the IntToWords Project. + * + * @param int|float $number The number to convert into text + * @return string + */ + public static function number_to_word($number) + { + $number = (string) $number; + + if (strpos($number, '.') !== false) { + list($number, $decimal) = explode('.', $number); + } else { + $decimal = false; + } + + $output = ''; + + if ($number[0] == '-') { + $output = 'negative '; + $number = ltrim($number, '-'); + } elseif ($number[0] == '+') { + $output = 'positive '; + $number = ltrim($number, '+'); + } + + if ($number[0] == '0') { + $output .= 'zero'; + } else { + $length = 19; + $number = str_pad($number, 60, '0', STR_PAD_LEFT); + $group = rtrim(chunk_split($number, 3, ' '), ' '); + $groups = explode(' ', $group); + $groups2 = array(); + + foreach ($groups as $group) { + $group[1] = isset($group[1]) ? $group[1] : null; + $group[2] = isset($group[2]) ? $group[2] : null; + $groups2[] = self::numberToWordThreeDigits($group[0], $group[1], $group[2]); + } + + for ($z = 0; $z < count($groups2); $z++) { + if ($groups2[$z] != '') { + $output .= $groups2[$z] . self::numberToWordConvertGroup($length - $z); + $output .= ($z < $length && ! array_search('', array_slice($groups2, $z + 1, -1)) && $groups2[$length] != '' && $groups[$length][0] == '0' ? ' and ' : ', '); + } + } + + $output = rtrim($output, ', '); + } + + if ($decimal > 0) { + $output .= ' point'; + + for ($i = 0; $i < strlen($decimal); $i++) { + $output .= ' ' . self::numberToWordConvertDigit($decimal[$i]); + } + } + + return $output; + } + + protected static function numberToWordConvertGroup($index) + { + switch($index) { + case 11: + return ' decillion'; + case 10: + return ' nonillion'; + case 9: + return ' octillion'; + case 8: + return ' septillion'; + case 7: + return ' sextillion'; + case 6: + return ' quintrillion'; + case 5: + return ' quadrillion'; + case 4: + return ' trillion'; + case 3: + return ' billion'; + case 2: + return ' million'; + case 1: + return ' thousand'; + case 0: + return ''; + } + + return ''; + } + + protected static function numberToWordThreeDigits($digit1, $digit2, $digit3) + { + $output = ''; + + if ($digit1 == '0' && $digit2 == '0' && $digit3 == '0') { + return ''; + } + + if ($digit1 != '0') { + $output .= self::numberToWordConvertDigit($digit1) . ' hundred'; + + if ($digit2 != '0' || $digit3 != '0') { + $output .= ' and '; + } + } + if ($digit2 != '0') { + $output .= self::numberToWordTwoDigits($digit2, $digit3); + } elseif ($digit3 != '0') { + $output .= self::numberToWordConvertDigit($digit3); + } + + return $output; + } + + protected static function numberToWordTwoDigits($digit1, $digit2) + { + if ($digit2 == '0') { + switch ($digit1) { + case '1': + return 'ten'; + case '2': + return 'twenty'; + case '3': + return 'thirty'; + case '4': + return 'forty'; + case '5': + return 'fifty'; + case '6': + return 'sixty'; + case '7': + return 'seventy'; + case '8': + return 'eighty'; + case '9': + return 'ninety'; + } + } elseif ($digit1 == '1') { + switch ($digit2) { + case '1': + return 'eleven'; + case '2': + return 'twelve'; + case '3': + return 'thirteen'; + case '4': + return 'fourteen'; + case '5': + return 'fifteen'; + case '6': + return 'sixteen'; + case '7': + return 'seventeen'; + case '8': + return 'eighteen'; + case '9': + return 'nineteen'; + } + } else { + $second_digit = self::numberToWordConvertDigit($digit2); + + switch ($digit1) { + case '2': + return "twenty-{$second_digit}"; + case '3': + return "thirty-{$second_digit}"; + case '4': + return "forty-{$second_digit}"; + case '5': + return "fifty-{$second_digit}"; + case '6': + return "sixty-{$second_digit}"; + case '7': + return "seventy-{$second_digit}"; + case '8': + return "eighty-{$second_digit}"; + case '9': + return "ninety-{$second_digit}"; + } + } + } + + /** + * @param $digit + * @return string + * @throws \LogicException + */ + protected static function numberToWordConvertDigit($digit) + { + switch ($digit) { + case '0': + return 'zero'; + case '1': + return 'one'; + case '2': + return 'two'; + case '3': + return 'three'; + case '4': + return 'four'; + case '5': + return 'five'; + case '6': + return 'six'; + case '7': + return 'seven'; + case '8': + return 'eight'; + case '9': + return 'nine'; + default: + throw new \LogicException('Not a number'); + } + } + + /** + * Transmit UTF-8 content headers if the headers haven't already been sent. + * + * @param string $content_type The content type to send out + * @return boolean + */ + public static function utf8_headers($content_type = 'text/html') + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + header('Content-type: ' . $content_type . '; charset=utf-8'); + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Transmit headers that force a browser to display the download file + * dialog. Cross browser compatible. Only fires if headers have not + * already been sent. + * + * @param string $filename The name of the filename to display to + * browsers + * @param string $content The content to output for the download. + * If you don't specify this, just the + * headers will be sent + * @return boolean + */ + public static function force_download($filename, $content = false) + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + // Required for some browsers + if (ini_get('zlib.output_compression')) { + @ini_set('zlib.output_compression', 'Off'); + } + + header('Pragma: public'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + + // Required for certain browsers + header('Cache-Control: private', false); + + header('Content-Disposition: attachment; filename="' . basename(str_replace('"', '', $filename)) . '";'); + header('Content-Type: application/force-download'); + header('Content-Transfer-Encoding: binary'); + + if ($content) { + header('Content-Length: ' . strlen($content)); + } + + ob_clean(); + flush(); + + if ($content) { + echo $content; + } + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Sets the headers to prevent caching for the different browsers. + * + * Different browsers support different nocache headers, so several + * headers must be sent so that all of them get the point that no + * caching should occur + * + * @return boolean + */ + public static function nocache_headers() + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + header('Cache-Control: no-cache, must-revalidate, max-age=0'); + header('Pragma: no-cache'); + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Generates a string of random characters. + * + * @throws LengthException If $length is bigger than the available + * character pool and $no_duplicate_chars is + * enabled + * + * @param integer $length The length of the string to + * generate + * @param boolean $human_friendly Whether or not to make the + * string human friendly by + * removing characters that can be + * confused with other characters ( + * O and 0, l and 1, etc) + * @param boolean $include_symbols Whether or not to include + * symbols in the string. Can not + * be enabled if $human_friendly is + * true + * @param boolean $no_duplicate_chars Whether or not to only use + * characters once in the string. + * @return string + */ + public static function random_string($length = 16, $human_friendly = true, $include_symbols = false, $no_duplicate_chars = false) + { + $nice_chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnprstuvwxyz23456789'; + $all_an = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'; + $symbols = '!@#$%^&*()~_-=+{}[]|:;<>,.?/"\'\\`'; + $string = ''; + + // Determine the pool of available characters based on the given parameters + if ($human_friendly) { + $pool = $nice_chars; + } else { + $pool = $all_an; + + if ($include_symbols) { + $pool .= $symbols; + } + } + + if (!$no_duplicate_chars) { + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + } + + // Don't allow duplicate letters to be disabled if the length is + // longer than the available characters + if ($no_duplicate_chars && strlen($pool) < $length) { + throw new \LengthException('$length exceeds the size of the pool and $no_duplicate_chars is enabled'); + } + + // Convert the pool of characters into an array of characters and + // shuffle the array + $pool = str_split($pool); + $poolLength = count($pool); + $rand = mt_rand(0, $poolLength - 1); + + // Generate our string + for ($i = 0; $i < $length; $i++) { + $string .= $pool[$rand]; + + // Remove the character from the array to avoid duplicates + array_splice($pool, $rand, 1); + + // Generate a new number + if (($poolLength - 2 - $i) > 0) { + $rand = mt_rand(0, $poolLength - 2 - $i); + } else { + $rand = 0; + } + } + + return $string; + } + + /** + * Generate secure random string of given length + * If 'openssl_random_pseudo_bytes' is not available + * then generate random string using default function + * + * Part of the Laravel Project + * + * @param int $length length of string + * @return bool + */ + public static function secure_random_string($length = 16) + { + if (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($length * 2); + + if ($bytes === false) { + throw new \LengthException('$length is not accurate, unable to generate random string'); + } + + return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length); + } + + // @codeCoverageIgnoreStart + return static::random_string($length); + // @codeCoverageIgnoreEnd + } + + /** + * Check if a given string matches a given pattern. + * + * Contributed by Abhimanyu Sharma + * + * @param string $pattern Parttern of string exptected + * @param string $string String that need to be matched + * @return bool + */ + public static function match_string($pattern, $string, $caseSensitive = true) + { + if ($pattern == $string) { + return true; + } + + // Preg flags + $flags = $caseSensitive ? '' : 'i'; + + // Escape any regex special characters + $pattern = preg_quote($pattern, '#'); + + // Unescape * which is our wildcard character and change it to .* + $pattern = str_replace('\*', '.*', $pattern); + + return (bool) preg_match('#^' . $pattern . '$#' . $flags, $string); + } + + /** + * Validate an email address. + * + * @param string $possible_email An email address to validate + * @return bool + */ + public static function validate_email($possible_email) + { + return (bool) filter_var($possible_email, FILTER_VALIDATE_EMAIL); + } + + /** + * Return the URL to a user's gravatar. + * + * @param string $email The email of the user + * @param integer $size The size of the gravatar + * @return string + */ + public static function get_gravatar($email, $size = 32) + { + if (self::is_https()) { + $url = 'https://secure.gravatar.com/'; + } else { + $url = 'http://www.gravatar.com/'; + } + + $url .= 'avatar/' . md5($email) . '?s=' . (int) abs($size); + + return $url; + } + + /** + * Turns all of the links in a string into HTML links. + * + * Part of the LinkifyURL Project + * + * @param string $text The string to parse + * @return string + */ + public static function linkify($text) + { + $text = preg_replace('/'/', ''', $text); // IE does not handle ' entity! + $section_html_pattern = '%# Rev:20100913_0900 github.com/jmrware/LinkifyURL + # Section text into HTML tags and everything else. + ( # $1: Everything not HTML tag. + [^<]+(?:(?!... tag. + ]*> # opening tag. + [^<]*(?:(?! # closing tag. + ) # End $2: + %ix'; + + return preg_replace_callback($section_html_pattern, array(__CLASS__, 'linkifyCallback'), $text); + } + + /** + * Callback for the preg_replace in the linkify() method. + * + * Part of the LinkifyURL Project + * + * @param array $matches Matches from the preg_ function + * @return string + */ + protected static function linkifyRegex($text) + { + $url_pattern = '/# Rev:20100913_0900 github.com\/jmrware\/LinkifyURL + # Match http & ftp URL that is not already linkified. + # Alternative 1: URL delimited by (parentheses). + (\() # $1 "(" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $2: URL. + (\)) # $3: ")" end delimiter. + | # Alternative 2: URL delimited by [square brackets]. + (\[) # $4: "[" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $5: URL. + (\]) # $6: "]" end delimiter. + | # Alternative 3: URL delimited by {curly braces}. + (\{) # $7: "{" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $8: URL. + (\}) # $9: "}" end delimiter. + | # Alternative 4: URL delimited by . + (<|&(?:lt|\#60|\#x3c);) # $10: "<" start delimiter (or HTML entity). + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $11: URL. + (>|&(?:gt|\#62|\#x3e);) # $12: ">" end delimiter (or HTML entity). + | # Alternative 5: URL not delimited by (), [], {} or <>. + (# $13: Prefix proving URL not already linked. + (?: ^ # Can be a beginning of line or string, or + | [^=\s\'"\]] # a non-"=", non-quote, non-"]", followed by + ) \s*[\'"]? # optional whitespace and optional quote; + | [^=\s]\s+ # or... a non-equals sign followed by whitespace. + ) # End $13. Non-prelinkified-proof prefix. + (\b # $14: Other non-delimited URL. + (?:ht|f)tps?:\/\/ # Required literal http, https, ftp or ftps prefix. + [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]+ # All URI chars except "&" (normal*). + (?: # Either on a "&" or at the end of URI. + (?! # Allow a "&" char only if not start of an... + &(?:gt|\#0*62|\#x0*3e); # HTML ">" entity, or + | &(?:amp|apos|quot|\#0*3[49]|\#x0*2[27]); # a [&\'"] entity if + [.!&\',:?;]? # followed by optional punctuation then + (?:[^a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]|$) # a non-URI char or EOS. + ) & # If neg-assertion true, match "&" (special). + [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]* # More non-& URI chars (normal*). + )* # Unroll-the-loop (special normal*)*. + [a-z0-9\-_~$()*+=\/#[\]@%] # Last char can\'t be [.!&\',;:?] + ) # End $14. Other non-delimited URL. + /imx'; + + $url_replace = '$1$4$7$10$13$2$5$8$11$14$3$6$9$12'; + + return preg_replace($url_pattern, $url_replace, $text); + } + + /** + * Callback for the preg_replace in the linkify() method. + * + * Part of the LinkifyURL Project + * + * @param array $matches Matches from the preg_ function + * @return string + */ + protected static function linkifyCallback($matches) + { + if (isset($matches[2])) { + return $matches[2]; + } + + return self::linkifyRegex($matches[1]); + } + + /** + * Return the current URL. + * + * @return string + */ + public static function get_current_url() + { + $url = ''; + + // Check to see if it's over https + $is_https = self::is_https(); + if ($is_https) { + $url .= 'https://'; + } else { + $url .= 'http://'; + } + + // Was a username or password passed? + if (isset($_SERVER['PHP_AUTH_USER'])) { + $url .= $_SERVER['PHP_AUTH_USER']; + + if (isset($_SERVER['PHP_AUTH_PW'])) { + $url .= ':' . $_SERVER['PHP_AUTH_PW']; + } + + $url .= '@'; + } + + + // We want the user to stay on the same host they are currently on, + // but beware of security issues + // see http://shiflett.org/blog/2006/mar/server-name-versus-http-host + $url .= $_SERVER['HTTP_HOST']; + + $port = $_SERVER['SERVER_PORT']; + + // Is it on a non standard port? + if ($is_https && ($port != 443)) { + $url .= ':' . $_SERVER['SERVER_PORT']; + } elseif (!$is_https && ($port != 80)) { + $url .= ':' . $_SERVER['SERVER_PORT']; + } + + // Get the rest of the URL + if (!isset($_SERVER['REQUEST_URI'])) { + // Microsoft IIS doesn't set REQUEST_URI by default + $url .= $_SERVER['PHP_SELF']; + + if (isset($_SERVER['QUERY_STRING'])) { + $url .= '?' . $_SERVER['QUERY_STRING']; + } + } else { + $url .= $_SERVER['REQUEST_URI']; + } + + return $url; + } + + /** + * Returns the IP address of the client. + * + * @param boolean $trust_proxy_headers Whether or not to trust the + * proxy headers HTTP_CLIENT_IP + * and HTTP_X_FORWARDED_FOR. ONLY + * use if your server is behind a + * proxy that sets these values + * @return string + */ + public static function get_client_ip($trust_proxy_headers = false) + { + if (!$trust_proxy_headers) { + return $_SERVER['REMOTE_ADDR']; + } + + if (!empty($_SERVER['HTTP_CLIENT_IP'])) { + $ip = $_SERVER['HTTP_CLIENT_IP']; + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } else { + $ip = $_SERVER['REMOTE_ADDR']; + } + + return $ip; + } + + /** + * Truncate a string to a specified length without cutting a word off. + * + * @param string $string The string to truncate + * @param integer $length The length to truncate the string to + * @param string $append Text to append to the string IF it gets + * truncated, defaults to '...' + * @return string + */ + public static function safe_truncate($string, $length, $append = '...') + { + $ret = substr($string, 0, $length); + $last_space = strrpos($ret, ' '); + + if ($last_space !== false && $string != $ret) { + $ret = substr($ret, 0, $last_space); + } + + if ($ret != $string) { + $ret .= $append; + } + + return $ret; + } + + + /** + * Truncate the string to given length of charactes. + * + * @param $string + * @param $limit + * @param string $append + * @return string + */ + public static function limit_characters($string, $limit = 100, $append = '...') + { + if (mb_strlen($string) <= $limit) { + return $string; + } + + return rtrim(mb_substr($string, 0, $limit, 'UTF-8')) . $append; + } + + /** + * Truncate the string to given length of words. + * + * @param $string + * @param $limit + * @param string $append + * @return string + */ + public static function limit_words($string, $limit = 100, $append = '...') + { + preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $string, $matches); + + if (!isset($matches[0]) || strlen($string) === strlen($matches[0])) { + return $string; + } + + return rtrim($matches[0]).$append; + } + + /** + * Returns the ordinal version of a number (appends th, st, nd, rd). + * + * @param string $number The number to append an ordinal suffix to + * @return string + */ + public static function ordinal($number) + { + $test_c = abs($number) % 10; + $ext = ((abs($number) % 100 < 21 && abs($number) % 100 > 4) ? 'th' : (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th')); + + return $number . $ext; + } + + /** + * Returns the file permissions as a nice string, like -rw-r--r-- or false + * if the file is not found. + * + * @param string $file The name of the file to get permissions form + * @param int $perms Numerical value of permissions to display as text. + * @return string + */ + public static function full_permissions($file, $perms = null) + { + if (is_null($perms)) { + if (!file_exists($file)) { + return false; + } + $perms = fileperms($file); + } + + if (($perms & 0xC000) == 0xC000) { + // Socket + $info = 's'; + } elseif (($perms & 0xA000) == 0xA000) { + // Symbolic Link + $info = 'l'; + } elseif (($perms & 0x8000) == 0x8000) { + // Regular + $info = '-'; + } elseif (($perms & 0x6000) == 0x6000) { + // Block special + $info = 'b'; + } elseif (($perms & 0x4000) == 0x4000) { + // Directory + $info = 'd'; + } elseif (($perms & 0x2000) == 0x2000) { + // Character special + $info = 'c'; + } elseif (($perms & 0x1000) == 0x1000) { + // FIFO pipe + $info = 'p'; + } else { + // Unknown + $info = 'u'; + } + + // Owner + $info .= (($perms & 0x0100) ? 'r' : '-'); + $info .= (($perms & 0x0080) ? 'w' : '-'); + $info .= (($perms & 0x0040) ? + (($perms & 0x0800) ? 's' : 'x') : + (($perms & 0x0800) ? 'S' : '-')); + + // Group + $info .= (($perms & 0x0020) ? 'r' : '-'); + $info .= (($perms & 0x0010) ? 'w' : '-'); + $info .= (($perms & 0x0008) ? + (($perms & 0x0400) ? 's' : 'x') : + (($perms & 0x0400) ? 'S' : '-')); + + // World + $info .= (($perms & 0x0004) ? 'r' : '-'); + $info .= (($perms & 0x0002) ? 'w' : '-'); + $info .= (($perms & 0x0001) ? + (($perms & 0x0200) ? 't' : 'x') : + (($perms & 0x0200) ? 'T' : '-')); + + return $info; + } + + /** + * Returns the first element in an array. + * + * @param array $array + * @return mixed + */ + public static function array_first(array $array) + { + return reset($array); + } + + /** + * Returns the last element in an array. + * + * @param array $array + * @return mixed + */ + public static function array_last(array $array) + { + return end($array); + } + + /** + * Returns the first key in an array. + * + * @param array $array + * @return int|string + */ + public static function array_first_key(array $array) + { + reset($array); + + return key($array); + } + + /** + * Returns the last key in an array. + * + * @param array $array + * @return int|string + */ + public static function array_last_key(array $array) + { + end($array); + + return key($array); + } + + /** + * Flatten a multi-dimensional array into a one dimensional array. + * + * Contributed by Theodore R. Smith of PHP Experts, Inc. + * + * @param array $array The array to flatten + * @param boolean $preserve_keys Whether or not to preserve array keys. + * Keys from deeply nested arrays will + * overwrite keys from shallowy nested arrays + * @return array + */ + public static function array_flatten(array $array, $preserve_keys = true) + { + $flattened = array(); + + array_walk_recursive($array, function($value, $key) use (&$flattened, $preserve_keys) { + if ($preserve_keys && !is_int($key)) { + $flattened[$key] = $value; + } else { + $flattened[] = $value; + } + }); + + return $flattened; + } + + /** + * Accepts an array, and returns an array of values from that array as + * specified by $field. For example, if the array is full of objects + * and you call util::array_pluck($array, 'name'), the function will + * return an array of values from $array[]->name. + * + * @param array $array An array + * @param string $field The field to get values from + * @param boolean $preserve_keys Whether or not to preserve the + * array keys + * @param boolean $remove_nomatches If the field doesn't appear to be set, + * remove it from the array + * @return array + */ + public static function array_pluck(array $array, $field, $preserve_keys = true, $remove_nomatches = true) + { + $new_list = array(); + + foreach ($array as $key => $value) { + if (is_object($value)) { + if (isset($value->{$field})) { + if ($preserve_keys) { + $new_list[$key] = $value->{$field}; + } else { + $new_list[] = $value->{$field}; + } + } elseif (!$remove_nomatches) { + $new_list[$key] = $value; + } + } else { + if (isset($value[$field])) { + if ($preserve_keys) { + $new_list[$key] = $value[$field]; + } else { + $new_list[] = $value[$field]; + } + } elseif (!$remove_nomatches) { + $new_list[$key] = $value; + } + } + } + + return $new_list; + } + + /** + * Searches for a given value in an array of arrays, objects and scalar + * values. You can optionally specify a field of the nested arrays and + * objects to search in. + * + * @param array $array The array to search + * @param scalar $search The value to search for + * @param string $field The field to search in, if not specified + * all fields will be searched + * @return boolean|scalar False on failure or the array key on success + */ + public static function array_search_deep(array $array, $search, $field = false) + { + // *grumbles* stupid PHP type system + $search = (string) $search; + + foreach ($array as $key => $elem) { + // *grumbles* stupid PHP type system + $key = (string) $key; + + if ($field) { + if (is_object($elem) && $elem->{$field} === $search) { + return $key; + } elseif (is_array($elem) && $elem[$field] === $search) { + return $key; + } elseif (is_scalar($elem) && $elem === $search) { + return $key; + } + } else { + if (is_object($elem)) { + $elem = (array) $elem; + + if (in_array($search, $elem)) { + return $key; + } + } elseif (is_array($elem) && in_array($search, $elem)) { + return $key; + } elseif (is_scalar($elem) && $elem === $search) { + return $key; + } + } + } + + return false; + } + + /** + * Returns an array containing all the elements of arr1 after applying + * the callback function to each one. + * + * @param string $callback Callback function to run for each + * element in each array + * @param array $array An array to run through the callback + * function + * @param boolean $on_nonscalar Whether or not to call the callback + * function on nonscalar values + * (Objects, resources, etc) + * @return array + */ + public static function array_map_deep(array $array, $callback, $on_nonscalar = false) + { + foreach ($array as $key => $value) { + if (is_array($value)) { + $args = array($value, $callback, $on_nonscalar); + $array[$key] = call_user_func_array(array(__CLASS__, __FUNCTION__), $args); + } elseif (is_scalar($value) || $on_nonscalar) { + $array[$key] = call_user_func($callback, $value); + } + } + + return $array; + } + + public static function array_clean(array $array) + { + return array_filter($array); + } + + /** + * Wrapper to prevent errors if the user doesn't have the mbstring + * extension installed. + * + * @param string $encoding + * @return string + */ + protected static function mbInternalEncoding($encoding = null) + { + if (function_exists('mb_internal_encoding')) { + return $encoding ? mb_internal_encoding($encoding) : mb_internal_encoding(); + } + + // @codeCoverageIgnoreStart + return 'UTF-8'; + // @codeCoverageIgnoreEnd + } + + /** + * Set the writable bit on a file to the minimum value that allows the user + * running PHP to write to it. + * + * @param string $filename The filename to set the writable bit on + * @param boolean $writable Whether to make the file writable or not + * @return boolean + */ + public static function set_writable($filename, $writable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($writable) { + // Set only the user writable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0200); + } + + // Set only the group writable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0220); + } + + // Set the world writable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0222); + } else { + // Set only the user writable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0222) ^ 0222); + } + + // Set only the group writable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0222) ^ 0022); + } + + // Set the world writable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0222) ^ 0002); + } + } + + /** + * Set the readable bit on a file to the minimum value that allows the user + * running PHP to read to it. + * + * @param string $filename The filename to set the readable bit on + * @param boolean $readable Whether to make the file readable or not + * @return boolean + */ + public static function set_readable($filename, $readable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($readable) { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0400); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0440); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0444); + } else { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0444) ^ 0444); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0444) ^ 0044); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0444) ^ 0004); + } + } + + /** + * Set the executable bit on a file to the minimum value that allows the + * user running PHP to read to it. + * + * @param string $filename The filename to set the executable bit on + * @param boolean $executable Whether to make the file executable or not + * @return boolean + */ + public static function set_executable($filename, $executable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($executable) { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0100); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0110); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0111); + } else { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0111) ^ 0111); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0111) ^ 0011); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0111) ^ 0001); + } + } + + /** + * Returns size of a given directory in bytes. + * + * @param string $dir + * @return integer + */ + public static function directory_size($dir) + { + $size = 0; + foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $file => $key) { + if ($key->isFile()) { + $size += $key->getSize(); + } + } + return $size; + } + + /** + * Returns a home directory of current user. + * + * @return string + */ + public static function get_user_directory() + { + if (isset($_SERVER['HOMEDRIVE'])) return $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']; + else return $_SERVER['HOME']; + } + + /** + * Returns all paths inside a directory. + * + * @param string $dir + * @return array + */ + public static function directory_contents($dir) + { + $contents = array(); + foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $pathname => $fi) { + $contents[] = $pathname; + } + natsort($contents); + return $contents; + } +} diff --git a/e_lib/util.php b/e_lib/util.php new file mode 100644 index 00000000..1b209796 --- /dev/null +++ b/e_lib/util.php @@ -0,0 +1,10 @@ + + */ +class util extends \utilphp\util { } diff --git a/e_lib/utilphp-1.1.0/.coveralls.yml b/e_lib/utilphp-1.1.0/.coveralls.yml new file mode 100644 index 00000000..6e649991 --- /dev/null +++ b/e_lib/utilphp-1.1.0/.coveralls.yml @@ -0,0 +1 @@ +service_name: travis-ci \ No newline at end of file diff --git a/e_lib/utilphp-1.1.0/.gitignore b/e_lib/utilphp-1.1.0/.gitignore new file mode 100644 index 00000000..a28cc36f --- /dev/null +++ b/e_lib/utilphp-1.1.0/.gitignore @@ -0,0 +1,4 @@ +test.php +build/* +report/* +tests/test* diff --git a/e_lib/utilphp-1.1.0/.travis.yml b/e_lib/utilphp-1.1.0/.travis.yml new file mode 100644 index 00000000..bfce66e7 --- /dev/null +++ b/e_lib/utilphp-1.1.0/.travis.yml @@ -0,0 +1,22 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +matrix: + allow_failures: + - php: hhvm + +before_script: + - pyrus install pear/PHP_CodeSniffer + - wget -nc http://getcomposer.org/composer.phar + - php composer.phar install --dev --no-interaction + - mkdir -p build/logs + - phpenv rehash + +after_script: + - php vendor/bin/coveralls diff --git a/e_lib/utilphp-1.1.0/CHANGELOG.md b/e_lib/utilphp-1.1.0/CHANGELOG.md new file mode 100644 index 00000000..8cbd899f --- /dev/null +++ b/e_lib/utilphp-1.1.0/CHANGELOG.md @@ -0,0 +1,86 @@ +Change Log +========== + +1.1.0 +----- + +This release introduces a deprecation notice for `slugify()`, please update your code. + +* Added a cryptographically secure random string function `secure_random_string`. Thanks to @abhimanyusharma003 via [Pull Request #53](https://github.com/brandonwamboldt/utilphp/pull/53) +* Added `limit_characters` and `limit_words` functions. Thanks to @abhimanyusharma003 via [Pull Request #55](https://github.com/brandonwamboldt/utilphp/pull/55) +* Added `rmdir` method to recursively delete a directory. Thanks to @ARACOOOL via [Pull Request #56](https://github.com/brandonwamboldt/utilphp/pull/56) +* Added `set_executable`, `set_readable`, `set_writable`, `directory_size`, `directory_contents` and `get_user_dir` functions. Thanks to @sergserg via [Pull Request #70](https://github.com/brandonwamboldt/utilphp/pull/70) +* Changed parameter ordering for `slugify`, `$css_mode` is now the third argument. For backwards compatibility, the old order will still work but it will generate an `E_USER_DEPRECATED` warning. Thanks to @abhimanyusharma003 via [Pull Request #71](https://github.com/brandonwamboldt/utilphp/pull/71) +* Added `match_string` method. Thanks to @abhimanyusharma003 via [Pull Request #72](https://github.com/brandonwamboldt/utilphp/pull/72) +* Renamed internal methods (protected ones) for PSR-2 compliance +* General performance improvements, code quality improvements, and increased unit test coverage (special thanks to @hopeseekr for getting us near 100% coverage) + +1.0.7 +----- + +* Added `fix_broken_serialization` to fix broken serialized strings (Thanks to @hopeseekr via [Pull Request #48](https://github.com/brandonwamboldt/utilphp/pull/48)) +* Fixed `get_current_url` appending port 80 or 443 when not needed (Thanks to @scottchiefbaker via [Pull Request #49](https://github.com/brandonwamboldt/utilphp/pull/49)) +* `var_dump` can now handle recursive data structures without crashing +* `var_dump` code was minified and cleaned up +* `array_flatten` was optimized (thanks to @hopeseekr via [Pull Request #47](https://github.com/brandonwamboldt/utilphp/pull/47)) +* `remove_accents` was completely rewritten and is now ~4x faster + +1.0.6 +----- + +* Added `start_with` function +* Added `ends_with` function +* Added `str_contains` function +* Added `str_icontains` function +* Added `get_file_ext` function +* Fixing permissions on the files & directories +* Fixing a bug with the include path of util.php + +1.0.5 +----- + +* [Issue #29](https://github.com/brandonwamboldt/utilphp/issues/29) Fixed error in `var_dump` if mbstring extension wasn't present +* Adding Composer support +* Updating license from GPL to MIT +* Adding Changelog to project +* Bumping minimum version to PHP 5.3.3 + +1.0.4 +----- + +* [Issue #22](https://github.com/brandonwamboldt/utilphp/issues/22) Removed all superglobal *_get functions, you can use the modified array_get now +* [Issue #22](https://github.com/brandonwamboldt/utilphp/issues/22) Modifed the behaviour of `array_get`, see documentation +* [Pull Request #21](https://github.com/brandonwamboldt/utilphp/pull/21) Added multibyte support to html* functions +* [Issue #9](https://github.com/brandonwamboldt/utilphp/issues/9) Removed the `str_to_utf8` function +* [Issue #3](https://github.com/brandonwamboldt/utilphp/issues/3) Removed the `absint` function +* Removed declare() from util.php to avoid errors +* Updated PHPUnit tests to use PHPUnit 3.6 + +1.0.3 +----- + +* [Issue #16](https://github.com/brandonwamboldt/utilphp/issues/16) Improved performance of `slugify` +* [Issue #14](https://github.com/brandonwamboldt/utilphp/issues/14) Modified the regex for `seems_utf8` to be more accurate +* [Issue #13](https://github.com/brandonwamboldt/utilphp/issues/13) Changed `validate_email` to be wrapper for `filter_var` +* Added 'ok' to the list of yes words for `str_to_bool` +* `str_to_bool` matches no followed by any number of 'o's + +1.0.2 +----- + +* [Issue #12](https://github.com/brandonwamboldt/utilphp/issues/12) `get_current_url` now includes the port and user/password if required +* [Issue #11](https://github.com/brandonwamboldt/utilphp/issues/11) `human_time_diff` now uses the DateTime functions +* [Issue #10](https://github.com/brandonwamboldt/utilphp/issues/10) `is_https` no longer checks the port as well + +1.0.1 +----- + +* [Issue #7](https://github.com/brandonwamboldt/utilphp/issues/7) Added the `$trust_proxy_headers` parameter to `get_client_ip` +* [Issue #6](https://github.com/brandonwamboldt/utilphp/issues/6) Removed `is_isset` as the function did not work as intended +* [Issue #6](https://github.com/brandonwamboldt/utilphp/issues/6) Removed `is_empty` as it is redundant, use ! with function calls instead +* Fixed a bug with `get_gravatar` + +1.0.0 +----- + +* Initial release of util.php. diff --git a/e_lib/utilphp-1.1.0/CONTRIBUTORS.md b/e_lib/utilphp-1.1.0/CONTRIBUTORS.md new file mode 100644 index 00000000..7fadf04f --- /dev/null +++ b/e_lib/utilphp-1.1.0/CONTRIBUTORS.md @@ -0,0 +1,48 @@ +# CONTRIBUTORS + +Util.php is the combined effort of many people who contributed new functions and features, bug fixes, tests, and documentation. + +# Maintainer / Lead + +* Brandon Wamboldt (http://brandonwamboldt.ca) + +## Third-Party Projects + +The following projects were fully or partially incorporated into util.php (and properly attributed). + +* IntToWords (https://github.com/hemant347/IntToWords) +* LinkifyURL (https://github.com/jmrware/LinkifyURL) +* URLify.php (https://github.com/jbroadway/urlify/) +* Pure PHP http_build_url (https://github.com/jakeasmith/http_build_url) + +## Methods + +The following developers and/or companies helped contribute to building util.php. + +* PHP Experts, Inc. (http://www.phpexperts.pro/) + - `array_flatten()` + - `fix_broken_serialization()` + - Lots of unit tests. +* Tony Ferrara (ircmaxwell, http://blog.ircmaxell.com/) + - `seemsUtf8Regex()`: http://stackoverflow.com/a/11709412/430062 +* Askar ([@ARACOOOL](https://github.com/ARACOOOL)) + - `rmdir()` + - `limit_characters()` + - `limit_words()` +* Anonymous (tmp1000@fastmail.fm) + - `htmlspecialentities()`: http://php.timesoft.cc/manual/en/function.htmlentities.php + - `htmlspecialchars()` +* Laravel Project (https://github.com/laravel/laravel) + - `secure_random_string()`: http://trac.allenjb.me.uk/php/browser/tagi/vendor/laravel/framework/src/Illuminate/Support/Str.php?rev=87#L127 +* Abhimanyu Sharma ([@abhimanyusharma003](https://github.com/abhimanyusharma003)) + - `limit_characters()` + - `limit_words()` + - `match_string()` +* Scott Baker ([@scottchiefbaker](https://github.com/scottchiefbaker)) +* [@sergserg](https://github.com/sergserg) + - `set_writable()` + - `set_executable()` + - `set_readable()` + - `directory_size()` + - `directory_contents()` + - `get_user_dir()` diff --git a/e_lib/utilphp-1.1.0/LICENSE.md b/e_lib/utilphp-1.1.0/LICENSE.md new file mode 100644 index 00000000..7c3f2915 --- /dev/null +++ b/e_lib/utilphp-1.1.0/LICENSE.md @@ -0,0 +1,24 @@ +The MIT License (MIT) +===================== + +The MIT License (MIT) + +Copyright (c) 2013 Brandon Wamboldt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/e_lib/utilphp-1.1.0/README.md b/e_lib/utilphp-1.1.0/README.md new file mode 100644 index 00000000..3b271796 --- /dev/null +++ b/e_lib/utilphp-1.1.0/README.md @@ -0,0 +1,123 @@ +# Util.php [![Build Status](https://img.shields.io/travis/brandonwamboldt/utilphp.svg)](https://travis-ci.org/brandonwamboldt/utilphp) [![Coverage Status](https://img.shields.io/coveralls/brandonwamboldt/utilphp/master.svg)](https://coveralls.io/r/brandonwamboldt/utilphp) + +[UtilPHP](http://brandonwamboldt.github.com/utilphp/) (Aka util.php) is a +collection of useful functions and snippets that you need or could use every +day. It's implemented as a class with static methods, to avoid conflicts with +your existing code-base. Just drop it in and start using it immediately. + +Included are 55+ functions that provide you with the ability to do common +tasks much easier and more efficiently, without having to find that one comment +on php.net where you know it's been done already. Access superglobals without +checking to see if certain indexes are set first and pass default values, use a +nicely formatted var dump, validate emails, generate random strings, flatten an +array, pull a single column out of a multidimensional array and much more. + +Although it's implemented as one giant class, util.php has extensive +documentation and a full suite of unit tests to avoid breaking +backwards-compatibility unintentionally. + +## Release Information + +This repo contains in development code for future releases as well as the +current stable branch. Development code is contained in the develop branch. + +## Changelog and New Features + +You can find a list of all changes for each release in the +[official documentation](http://brandonwamboldt.github.com/utilphp/#changelog) + +## Installation + +### Server Requirements + +* PHP version 5.3.3 or higher. + +### Standalone File + +Simply drop `util.php` in any project and call `include 'util.php';` in your +project. You can then access the `Util` class. + +### Composer + +Add the following dependency to your composer.json: + +``` +"brandonwamboldt/utilphp": "1.0.*" +``` + +When used with composer, the class is namespaced (`\utilphp\util`) instead of +just `util`. + +## Contributing + +UtilPHP is a community driven project and accepts contributions of code and +documentation from the community. These contributions are made in the form of +Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the +[UtilityPHP repository](https://github.com/brandonwamboldt/utilphp) on GitHub. + +Issues are a quick way to point out a bug. If you find a bug or documentation +error in UtilityPHP then please check a few things first: + +* There is not already an open Issue +* The issue has already been fixed (check the develop branch, or look for closed Issues) +* Is it something really obvious that you fix it yourself? + +Reporting issues is helpful but an even better approach is to send a Pull +Request, which is done by "Forking" the main repository and committing to your +own copy. This will require you to use the version control system called Git. + +## Guidelines + +Before we look into how, here are the guidelines. If your Pull Requests fail to +pass these guidelines it will be declined and you will need to re-submit when +you’ve made the changes. This might sound a bit tough, but it is required for +me to maintain quality of the code-base. + +### PHP Style + +Please ensure all new contributions match the [PSR-2](http://www.php-fig.org/psr/psr-2/) +coding style guide. + +### Documentation + +If you change anything that requires a change to documentation then you will +need to add it. New methods, parameters, changing default values, adding +constants, etc are all things that will require a change to documentation. The +change-log must also be updated for every change. Also PHPDoc blocks must be +maintained. + +### PHP Version Compatibility + +UtilityPHP is compatible with PHP 5.3.3 so all code supplied must stick to this +requirement. + +Of particular note is avoiding short array notation like this: + +``` +$var = []; +``` + +Please use the old notation instead: + +``` +$var = array(); +``` + +I know it's uglier, but PHP 5.3 while EOL'd, still isn't that old. + +### Branching + +One thing at a time: A pull request should only contain one change. That does +not mean only one commit, but one change - however many commits it took. The +reason for this is that if you change X and Y but send a pull request for both +at the same time, we might really want X but disagree with Y, meaning we cannot +merge the request. Using the Git-Flow branching model you can create new +branches for both of these features and send two requests. + +## License + +UtilPHP is licensed under the MIT license. + +## Resources + +* [Documentation](http://brandonwamboldt.github.com/utilphp/) diff --git a/e_lib/utilphp-1.1.0/composer.json b/e_lib/utilphp-1.1.0/composer.json new file mode 100644 index 00000000..9bf3520e --- /dev/null +++ b/e_lib/utilphp-1.1.0/composer.json @@ -0,0 +1,24 @@ +{ + "name": "brandonwamboldt/utilphp", + "type": "library", + "version": "1.1.0", + "description": "util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects", + "keywords": ["php", "utility", "collection", "helpers"], + "homepage": "https://github.com/brandonwamboldt/utilphp", + "license": "MIT", + "authors": [ + { + "name": "Brandon Wamboldt", + "email": "brandon.wamboldt@gmail.com" + } + ], + "autoload": { + "psr-0": { "utilphp\\": "src/" } + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "require": { + "php": ">=5.3.3" + } +} diff --git a/e_lib/utilphp-1.1.0/docs/css/docs.css b/e_lib/utilphp-1.1.0/docs/css/docs.css new file mode 100644 index 00000000..77993435 --- /dev/null +++ b/e_lib/utilphp-1.1.0/docs/css/docs.css @@ -0,0 +1,168 @@ +body { + background: #f4f4f4 url('../images/background.png'); + color: #333; + font: 18px/30px "Droid Serif", "Helvetica Neue", Helvetica, Arial; +} + +a { + text-decoration: none; + color: #f00; + padding: 2px; +} + +a:hover { + background: #277585; + color: #fff; + border-radius: 3px; +} + +h1, h2, h3, h4, h5, h6 { + padding-top: 20px; +} + +h2 { + font-size: 40px; + font-weight: normal; + margin: 0 0 15px; +} + +p { + margin: 20px 0; + min-width: 550px; + max-width: 900px; +} + +table, tr, td { + margin: 0; padding: 0; +} + +td { + padding: 2px 12px 2px 0; +} + +ul { + list-style-type: circle; + padding: 0 0 0 20px; +} + +li { + width: 500px; + margin-bottom: 10px; +} + +code, pre, tt { + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; + line-height: 18px; + font-style: normal; +} + +tt { + padding: 0px 3px; + background: #fff; + border: 1px solid #ddd; + zoom: 1; +} + +code { + margin-left: 20px; +} + +pre { + font-size: 12px; + padding: 12px; + background: #fff; + margin: 0px 0 30px; + border-radius: 0 0 2px 2px; + box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); +} + +span.header { + font-size: 24px; + line-height: 30px; + border-left: 10px solid #ddd; + padding-left: 10px; +} + +.desc-text code { + margin-left: 0; + font-size: 18px; + color: #0E04C8; +} + +#sidebar { + background: #fff; + position: fixed; + top: 0; left: 0; bottom: 0; + width: 220px; + overflow-y: auto; + overflow-x: hidden; + padding: 5px 0 30px 10px; + border-right: 1px solid #bbb; + + box-shadow: 0 0 20px #ccc; + -webkit-box-shadow: 0 0 20px #ccc; + -moz-box-shadow: 0 0 20px #ccc; + -webkit-overflow-scrolling: touch; +} + +.toc_title, .toc_title:visited { + display: block; + color: #000; + margin-top: 15px; +} + +.toc_title:hover { + background: none; + color: #f00; +} + +.toc_title .version { + font-size: 12px; + font-weight: normal; +} + +.toc_section { + font-size: 14px; + line-height: 24px; + margin: 5px 0 0 0; + padding-left: 10px; + list-style-type: none; +} + +.toc_section li { + cursor: pointer; + margin: 0 0 3px 0; +} + +.toc_section li a { + text-decoration: none; + color: black; +} + +.toc_section li a:hover { + background: none; + color: #f00; +} + +.container { + min-width: 550px; + max-width: 1000px; + margin: 40px 0 50px 260px; +} + +#documentation section > article > p > code { + color: #999; +} + +#documentation section > article > p > code > .util_class { + color: #bbb; +} + +#documentation section > article > p > code > .func_name { + color: #0E04C8; +} + +#documentation section > article > p > code > .param { + color: #DA72F3; +} diff --git a/e_lib/utilphp-1.1.0/docs/favicon.png b/e_lib/utilphp-1.1.0/docs/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..5f17cf1dbd24f03f46089ef35b6078c8a09aeee8 GIT binary patch literal 803 zcmV+;1Kj+HP)pgS zs8Rd}6TPrgaLRU}`*&sOq(f!QZdIJa*orLFT9YnK@_pa=&hes2$h`2mdY|*0^Kjnh zeW3|Acfqp*4!5rsy#HK#B%J6y8&358^z8@9R5}UUHcI+>xC)|PY*+)Q-tOAi8gqv| z6Cd)*v$Q)GPYOV{WS;z|+IcP!53<@Tjy&{I?(3tc4FIZckXa#!sltdTPxnPt;#ee> z$cgHbCWYR;JTjdWi}|Qj?nmoZImx<#loIZ`MNq0JtbgSTW5D|J4&_TX7z4%tm6Q#Mx?%4~k+5aU%JUVfPVq{}hDZQO9$yu)LDr}{mwtHvw6 zW#RdzOy1nOkMVCNm&lo)nK<(X2c%?QO}FUMCzt1_%7e$T$G_u66Y!4FU^Eni)P=G0 zjR7$=4Y|LUU#ROwbL5v9o_h6D0{OxK>fW_{7KZE$HG~@CZ5^o<|647IGcdXlmytu=+f3aqwL}Y&3e~3K-kNun-LKKX9(? zKD6Uw^~mQZFF{l4tV@Fl*<7P#U=mng<39o`fey2fzc1a|c!o+O61c8QB^qH4`)JI} z?x{G*y@X!78~!#9P;pYPm1OdC-26H0>t(O!eMKhYQ79A;qobqUz->S$*0u?PYb-57 z;aa|7Yp74}cC2VGPL!1wjFTM2CPvhj<+T5Cb3pP;aCCGvI$F7+5%HC`fn+gx6I7 z{6DH+0fBrkAN~n{S2e{KTl3EX)V9$+PbCVN8v9BoE~xGmU}DEJ&SO_<_>a~IRF1CW z)AIsGUmnM}b@iXP>qh&%YJ&bk#*kj$k@_bY0M++a)Q*2E$WTfsrmb+3uAoyJE(-KO zh#fa-bP7MefAqUL6L^>Md-X9*;`(0a>=lsyz`S9o-{b{ORxz2{t01_Gmkg1jN{E$`D{3 z+c(i6|$z;E0uk<>1Cf$Mdx-#Dn7&767^*KuaV`JQ}m z)!uRU7XfSnKWaVAc>n;5RS33PJ2s`(>d9k5)i6+{@r?x4_xzHimB&uA8{U zJ<;auIE6rtGXMYtRWx#b*iQ>k4*(H2t33ARsitpBOa97kp85?JI-X1Ymu8ny>9aQA zP4c@>C!Vv{PX9J+TtzpaC_h^4$Z}cI=k|Qo=>R$nb?_!wi=RPgz$16$yfxU_S1LDCuT8%Lv z?gjHWwR-dU!hIwD|H8{yA%AjXdIb#i??l>PXWXQ)bjk(&!K3<~3qx3tP`;-Td6&Ew zU#@p&)9`M#j_eQYjR(kP(&?Q%s}~+pB0a0ZpB1fARfT^*Z&C}IYEb?w`-dTj?{>NW zD7U+kD-YK%*&6=`;{ zbmIpcIs%mceT+A9St(Zv7)m!e+J8yqjpkW9bpX$x0eCyEHNxH{eNR2j4by_?28b7+|jaqcqr=n$26D!so8iaw#-qeEv36tYqYX?35&^s}^lzP_WhVj|^ z`@%en)?3-9eayg>1rcH-iqprG3fY}_-=xGhx^JckEb;dDuk>b$aN7Q@AmcCYAN0=x zDaLbVAlW|)a3HHU^GWaz)A{el^G(zcP%yC2f7wpRKiX6I2SMUl=$=GjZShGY^{oZt zhqo$py{L*-$mi3Xu&@kQ?PxHj7^ACM13+tL_#J7A7XZF;a;yjC;Zw#zdk`REeZ2zk zvk-jweQpy#(ac#GB=Gp+8Fxtb2HEI=etS@{TgH2keuMX)b9jRQ6b*0mA+Yl@e)$9z z?78^7DR{)p}9JE)!S&SNy17Vgtcf3gWmdqnz?=jNR91Y$Gzd?zG1>w_GY!X z$Ni%{aqe4(koT)@|15f4w*Vv@VXhjg{9`}v(|Z2t8h2{_VSM>o*eXTm-6nP@;FoQR0X(i*|roCh5o96YRiz6Foh>0`%;y0RUO3 zoSYo6L-d;-e|T$-ASWc~_;mfh;M7b%oWTct{Z{q;LT+ zl0Wg?Ts3BlPX7d_1E6!?X#DjH>P-}^Xn;R100blq6!hDg`v(LA1q%rW0S~~@K)}N0 zal<70fR4eYjE0M6O!Lpx7XkxtX@_x9G>(9ZDtK}5;2K+wtIa1>jA?BOu!6VbV`{Cg=H zL5ooRKt->r$?w?b=F==L)9gFrEDoghwNE;MoBp%<3|oDIC^-jplx*kITDLN=h0Xaii%r>j5Q^9go!;!x@NLa1EDDIBkW7Lr-sCXb?}<`3~j+1Q_wC%fEEd!}uU4Nf~BwnX)d zXwcHOfKPG_jYF^))lF$s3`=qAX?Da#YOQgC!+Oq0V1n<)9N5=Y^Ry02K8_+1!bE96rH zV@?WO2TjIyJa_U5h;2>@{f;WE65s7x%xP!aHL%6xTAUPS73fR#!?sHr`jsWK-yzZ0 zz0rtW)~{Qn4Fu#Sc*{!WPn>xWc{WX}n;Ot{R>V0GE@c2kbpE)? zPJ=enL$^})x=eD&h~{b+y3!~%{P}oZeGqK#cl%tSMy*+kghplU@1*_k6RT~P!$T9G z=C2nqTa{KAn9WFD?g7)?w}>`bD`nr+!BqnuRb&qr{s}cp?cTp5zW%DD-}x9{`Q`kF zZR|(gASvUm#|rQ;JV1S_^B8(?*@1}_o05kyM3f4C$mksp&uN8n<4OMD#|GkxaRT*1 z%EOIFT?l<%qwb|^0fM64GGUrmz`Nf;1HBq{#$U_Zt;^r3*IoEXn6#ff`x_XD*U(jf zf46YQ55jiY*`4t6><39gM)=soQ%pIQIbrf}6m)HX$!Z0Yb*dNB7f_^RhzVAZvf(Ys z%4lB!R$7l1p4)?a1t-ZOk*rTD&DguYW5pfCl`OanXX|K%0%`^d&(RH($`u_&Tg{E{gTD1LpRnS zv*&!g$@lmizbtX<6J71f^dzqyQi`Ln}K}S9t7v?3W3$CrYA9dSIh+7ua6WtR4MJ##q)vGfP$7Wuw3yEys_}Q(Y8?^RkK}}DzRTmuI(c(V{Z6v% zcm+_05Glb7CkiTT3J3|veH|H$+nyp6%+KNfu_9sbo4y&&NZ}m&zF<_z^tj4r#d;-@ zVR?CYAAfm4Md)-fP)!ZhvtHCfj1+D{tvXiEdQ#Mv(; zOPj1hx)liQgXU{y&zf3bz41YECIP|WF6c4(+jw)IG}ad^K3r@*DFZCqXj4-I^R%`eOEI+a{|3}Xl6QhiV!5rKWcvs* z_7qmpcC2qhd$rTJ77gqyn<`u~LQ@l*Rx7N1SIeXBpr#rFE{` z6ZOQ)>#=|Mvf|ZlRkGXMlbXopZ;@U)c&arJuBCjYt+iXaa%_1Sl;V9*E3nP1*5u}( zUtDL_!IZGcnS!0&uWxV*X&bKF+k$6^#$My{yDC&W^{b8L1wKofa;w1Jl9`S%N+h%Y|yJkQvor4~i2+ zwV4Mb%jycl%Apa6I^8|=EEu$Qfe&W2Z8zAYM>$l=Y!InT%{j_O9%dSpI=-G&Im_Tr zd@fjRNNR(Hjk>G5ALg~5QaCI!jSd_@h*yjWl(=FWgNR5(JG@z?jEDG!LC>R?*y%{JpJm?jJ3kt3xjCdGGfji+*-{<5EpeKuu^{bK>X{~FQi2*X zj_#~wbR33hM+fQXBYl@>h(OYs@rw~#E4dF)_zc&93ai8%_ti@eU6f`I?m`}`S>|Rv zlS`wz<~DHqut{L+HiwkoA7O+|HVMh47|XeE(>>MSNjV9>N06I7q}RTk2j)D)RB%jJ zJtOV)+tVI7OcgZwNxLW2@G#&e&oPCr2(T_BKQ7HB7M>m5z+)kOtL6Mjtk6lY6^<>( zSGe@kFiuaKtn}C8k>b2iSB_gLLHPE?f_d5#ZTz?8#dtFN-7kXTl(N4JGD^7((r9^) zC~;0Q@V1;+eaqhcYFkqQ{anXvpH^Y-3HsLh#H((P&v?mIGu^A9<$*-tO25quSq04+ zYdAZhyb~UB?BEBoI2#kJ|4f8!OBKKD#XB`}c=ikjdMv^{5|O?MR-J#kiv8NB)2Oi@ zTHc4~Bh-#9|5dVoYY&R0l`GFOwkpnaD`yHbL~85Iei3Lb4vyQwaH*vCeDs>(jpf7>r>EVABQl`Fyfq<+nt@Xio}hD^?{mTix*7u)Pko8m;7=)?)*a z26#2r-9c-O{JpRfeaQjCc`(lLUW0=udR|3!_Dk0*HQYjJO881aa5;!ImQ-nGLCytZ zIu>;v*s}hnrxSEI6q|}XuFklGwaD1;2Dk|tTT_x0Qqkky(SvlHGfG2LH5Q1!>e|m3 zrrJE?_lJ_uYr}glrEGsJmfM{br^^wIZEG7(58lS>|9of2gXYxA<+W+P;eXQM|8?y* z7vszb1>(6$X5M~RBf2^K^1B$k^b%Gwg<(NR@1l z+TcDki`nV6U+azMxgb73MmDAhy!M!CTYd@L_c!5l_3PA=_^Iv@{(Ssc`C&jQQ5(| zuNU73Ab;@@Is9<+NXFOEW=auJgkRS|RaHmZ73Nex^)i{1tFEUl)>Tbk|CCS{5{HKn z)9$i|Ax*-sZxXK47r=SSKv?U8Jg(OXH=53-I_t2zyx&j>G0M!S3Hy1N_a+vt+LU%|Cm!Zz8+>^^yDX6 zroi&2q|bk-%p>` zA@MY}@PNRE2H8t$&&FJiON#hUzO=2hD=G44WaW3o8m&O~@a7&*RT(%M6y_eoc&67i65N>v zBS>VtDQrQPZE}0`Sc|Pez(~{0qQBXZ!z(~+rJ7~^XPL(VD07dknOGiNGz=W6#^Z0u zYu~Z(^3Nx~snoO$QDl$UCyJr4iRR4NUwm0HxU2QHezb_)9)I-2>9MO~1j{MuamIcY{?+rkGPn<%913RA8ofZ`}dZ4)X*6r`c(3ONKI zciNZvwv_dm(s^@RcfoB)1!f`>fk0uV&0jHiZt1<&_MI2?H~HVD@8qL?5M^efbBw+t z;Wz7r1`h7%MQnPyL^G5}N7WSq_`eO0jTVgM$WTVa-G zwbRz~cE+Tp%at4DPQzO}uQshwb{2s=gYkP!t zKa}#)25V>0mOt^{i>}V_*t|OmL93e@8YFt4lv}>;2jkVP%r})Z+V+l}i+o+H!amUB zL^7ZF)WX&0HL?xiMuf_9#w#F)Tv34|ms0|L*(_-$3o?>YpJ39KVw&sIWhS_%=>k>` zO;jgeuhfp3G{sa-TI;q$W|SDqOQbq417|0Wtjo{}1KxzN6w1 z-EIwi$3JVf{QM25e~QxpM-MtkA8M$t7P9QH74ESY06q??_OJ}4nnoEZgVsnI%Qu(> zOv~%^kOhNrT6NAJmu=c;x}_1CX1>vJY*JNvob^j~cQte)GD$|1?^7$62OkJ@msB_H zr;uvCbJ2!vWEQ7i?^`YX=$qstGV?NUGxeSm;T4edw>RaJbv=lxmg-7oA^UMrIDW%A zmHM-9Rx zB(sBy#qF@2JX)_eZ`reOYawVM46rBE%A-^K5fC=%kMDO75E0X}s8`H&tdtF(5{s_p zOmbHt9coF0=fT%wNM^|#>2^V^V73bhyC=hxtM90}Cd!yqs@ld!WxOO`f56;)fg+`F za^kC?H3phEj)L7yPU~Iuam#SC<(kvM)mEf1f!vY4od6~XHBfIc@N4mhheFmd)@EbJVHf#t64X5=Jc;u zdy6^fF(zQmn6B$IaXrl1<@Gs#4t`Pz7?lyr{02arks38pL!b5zUjl+_3Ml z7st|;j>$dRz!St;sarX>2j6JVf|v9#DQ4I?N*H#!ikJkO z>i(?v;Gg{qofb)Fx&cd`(Lvwo5qYVwqSu+j@3&k{J6~0dhQA^m6TE_3|4TuoBs{1P4-WvHgy#73$G&%g(sd3r)vI{R6QCq|K4KEAt^MZ z+)d|Z@77gq3k%~q{bxQ}tLu`NIB@6Omm84+pH5N4E+5c&l)lGt*M{=?m4r}}y94Np z-JR#M!#F_;t#R>=X?q7MJU7O-UT~~oxEqb0bYHxm>K(GbZPh&)VW>kUQjov9n&3Pwau|F4b$c zM-##dRj>733Ar5!YdDThA!(-R+D&VJY7~J)CRBOvzAE?XF~KLUhF!|=L}%uQo1pY* zM~YUDIe*7SMOBP=*EarWS4JxGz2^{8~gI_syEt{tbeiY_N+x()X=9-nBW8utWI`X2ywctz-R!iKDJYhb15rV?9lIyohCK!EJHj+^;SX(9=K{_;+dD zS+7O(dj4$YpKxF3U!t%3Kvnq)_@VJ1eYh85#qwdbvWMbuGFQKw|F+E7kAn%cU01a`{s=rCG{S0-By$`X; znNml5#oEkVnyGDQg~_(t)m^=7f!q5lxX8IMqc9FDZm3#%7J_;tmD(C{EYlttzctUx z+Qx$4h(#7d%y~Z>`pB zV+vFv=QH(7?7UkYT#2OVHdEiCD_85=h2{2Dfm_+25$1DZxAaoN@!c`zUDS0PHUFr~ zvb#ryfkVLMpG5ACKR+JAv0)hP@U0;@+V7Md)6VAvsH>)XJgDStN0d3AiEUb1ZfuQF z&b7Hk7Sz4)H~;rVaq%XUWt6V+009VaSFwxKxc}uKk(`#l-;(Uz?l^L(*JM)Hwqv+@ zYfZ>y=7*KHJw)Wx@{5iqbOfccEXEP|>*{Ob%}?&+4B==u?phRVX9#DjFvbKMnqXTQ zo1t##qMcy?xOlB$Ne{`0Q?fCRq26Bb^LPFTC=w>_+euw$olyWAzTmPh$%>I>B3F4y zO=x}#K{Y5G$^8)kr{5>I&S5}sJ4-o}QX}BxF~kB^CC4wnkQ&o%^y;WOBPE5U7%^mL z#b6c4T6FO>QmiWfyc#k~;g0EodkqA#UGIpCN)b1(7!#)*v*kSh-QnCl?pkvw;Hn3! z+JbQMzlX8U!70={H0736|9a|P=>OV1w_;GTL|{1ysTVq&w@8$L!`TP@ILa{Di9(-D zQ))XzLaQVa$;;3CF^A2olg|ClmBv+B03&`2$ks?m2rVkf1f4S39LPwhE8xESp50t+~@o};^cmAoODg?Pn!Scon zr5tNjnoE9db)?BMjB4Kg$p(S~D4c0^EOX70#fH&Db|`Zbh%KQ8^&v^61P%cj=B4;= zj?JZqnYK2sVzR$lRkwm3#Q@Q`EU$w4#w>TRdK1oAHn%1Z#fak=INH~4CD(p7`dl?E z63@ABCpUMMkc_9P_Ql6wtwNOznV>2G|> zw`Q_yvTzU6eHo7aCgalx>VEoJIj;IK^O(h;g}-kv=b`-XrlNslWd`IlRbXIb?k;#Y z_?0+dE%TEDe+20IP~CEss4h|HzoDgIYggsgGU%v1ri!8~V5yrnG!))Az8Y(!Xt_

z5A05_r=(9-cwE&2YU)gfoy7YIL+4c+M#RF8h>}+aWoK)aQT`yfMJ?nxX;C~~ zV1Q!(Q9}QNzRuRz?y5{~dc3Z4buYcwMGyaB(+PKSA82B>(j2j3?H!r9Vt&wYB#M8% z=4Tw256G}eJUC%ZS}R2;3}wgUrB$%Nn{Ba;fF1}CTP!bfiezVl^fmP{>N;_4WZS|w zN!t#U%j8N!R>t<>;ofg`xKVNgkyDHAGgSkcKtYC@9j)5AW0RG6wtVP&e|2g5i9}xS zFnqt!z@ze4fPK}Ic1MGM-SCCQD}dJ2Bd<+Q8`BIkol6CR$qz>|Xw~I(gD-TEe_eg# zSAf;M|9?ZR;1h5`;g26&>X#k+K7|u(XA4p8C(5M9D8tmIe#1F@QR8f;L8g8Hqg~FB zN&sCR&BrHA#(Km3_x;rbYsTiL>S1E$J;yFk_{EqQ7iw0l1lU@|G{Al&t{*>L@xOzu zI0osboi-;5pty_>>w>D*rB_T0guvg0bm#pRCu?18c`T1J(Z>JN60+6r)b*|befC{7 zT?i$Wd7I|X=e@rLHMX+2BYHO)E9=UeVe9qFYxHiWe<%G%@x5#e))0Ur9_HqkCK}LO zi@?-)!r*-1EWM?X`m!w#utq$c*mUuSf|-hLMQcuGA1?h)4Z_aLwq4ugCE}qH!tUrE zmS5zY|GY%oZFaXuF5rEd-&FruqaqL_=P{^U_3Osp z7MVa%Q~mfBqF!0#x^nq7J0&lLj7p(kbT8sD3VKoe_b zNbyN0k5H--kw4RIsB|>f;G;vKZcR&AR$~%)JgCpY(?vt}W7peg7OW^9S|Hta z+2>XNlMte-eBMKjf?(E@mL3pSGaI?aZtLcucnb-KHAT^Ysi%q-h^C-Bl^L?>z*G`z z#nh98uqN_NLjb6|ST7&uY+MJUA3rAKU2R!K=`i?BY%zK{&xFI?CGhF*D~+cKx8zXE zEltEj=u)Rah=Tj})v65%5F(!mp+s{bKS)Xy2Z+ThoYPgWf9!4~x|vKX118|< zRr#R>m#>pBs??G21=hyxQ$J#N8AB7nsOZuCOj}io_F&ut!Hzrlr0H{Dt5)_$QyB*G z>Ge)t-{ndH134f6YI_d`V5S}ve^;7tA(VP{ifQhQK9#o5$J!+V^4p??w(`Q_g9*_Y zSS*}5y|!86l3M!HSAa$gOz#%*1mG)v->O@AhTFW0Ir21P`={nE3LzFGZ!Rfa~< zFi8)CUEsSkcchbZ9~gbP>y=x_TW94}f~FE22F;dc(jjKEHa}5!maY|8^$Z>P z&zG0N%HM1^ra`<0v6Cux1tktQV&5-l(tbucEZg&)+M+GMgB0!!?W^0n^(ZPd-9yeY zR^Rhc8%u64!&ksJih$lzJqCjJ z4_y;6?Y%^1ta_gQDelZ1zQhnksG?uACD8+i#!iH5=6S3!)_H_bOLtRiv(adO$Y?tJ zvXQUl{;0`z!SDT~(>mKmbpK`W@MCp<8fW_F<-`;eosiPyWeP-gW2!EP_IvHs*~bvo z6m(h2X;kOhlR@1l^BG|pMFJjDdh+1WW!oeb=@P7-RtYv_U6X82`jvGM&;UoIBrcO( zShm_FGO!N)gMvGoTf0L@v<9JUXX%&Y(*#l?KD>HC+DM^`8p5MWUh_KgN?aG0I0PgV z0^zZ^wy49szBI>b$)*8aQAys8hY8(in+Zjty3n8OPV{dljnR*$4ICO6dL&d28h&!_ z+ru<^RFzb-j5B&D8kJd3e1?cBZ?>c7^^aPrDQphQj7sYl{L$_w`Q77_)6c{usv?f^ zS!xOvdCqR#PIsKmCy-@+a14_~1FqHTcZqnxS`Y4 zx-IH~hrmqOWK+!zj)90(ljctfHfh=ns9d5SryiD1YhJh+q)hkw z%*2ZV-8^1MtsTnDmaV=uy0dv7=hs~KeBC83FSLDPKlQW1^?$hYI*`aCz{9jbhos2OdvqzBtBp z-@gK~Z#XYW0+sInKVUl(t}E~bgtA8+h~GheyhUsoh7~= zvin4HM+&rY{}#)A_?^~vvh<|pi0h?j4mrG)*GV!nsI-XD*N@5dhe3pi565<7rc6z7 z0Ex!w*W{em<&%~Qjq+2{3Pp=5t@(I0+vi0?)crvlU+;dN^9FEEKPoXo%x`tmXdcFkPK#Hk>w*aIGTV={$TQCVuj*?L_v2}K3*1~uN_$qDxE!Od0_xg+< zt0Jn!i_-knOiEX)dNHisBelG_qa|$X_5)nu^-E%UXyecBGd+sCr4?0AHPGI6&hENv zxM^A#cRk`|5>kpZ2ci^rRZ&dWiJaQ{CfQs_QwgBjxhpq7LAMBu$4PnKy5vKs?TuKW z{OO|}qX}qeYUk-v0Um^n2}iyX=#bcrO(;#MYW_U_8J(HxJfW3kgAqwp%)=Lv+NU{a z26EL+qDeGMYGi&Lv56D}&8|0-AhRoV-Cu`m{>p`ZGR2-dgdT*b0_k75A-U%Rv@#e^ z&z44j*jXmN`?oQQ2-@((zmE*mcd6D;i-`Symu^bB2^6${WAyhhaRj0b#D^n{lJpFitZtM<`y6{J4PdlN{5)zba^5eou%V1c|ocv9oTo$(}t+qDkbHoOv zzfA+TtQ=JNp*u}9*|RB@ebqb|h12pgbHCZlQH)F^{uZSFZj$AX(8O^}b#AkFm?b%r zW-GQo2CJYgUH8jfaCXP^aX+mBsqK+Aw+DOmRi*_!9QJStCQm|}s1)`px2Q_KxVI=q z!|Q)RR&8+RGKIo*>LRD(uMI4kE8q_{82cffdH@4#bQkjW(9x@Nd6ttjhex)sdl}}h zxgFZ8AlB4i>}yMu1E6qsJKem1v{&LSqu+}q>cmi=mYz_{)wDDsrp|N`Lt;s8b0e+{ zu2u-38t>{{j`K->xo`ZNQ~y7v@n4$8tHr>dU8e0%uYl`kF8qRfhUWgjM4<{e%W31X zMA>lxLM+##n9gHexs!O;@lJ@ht4xUUG55~GL@tf9AOf>B?f|D_aaMZUs;Zj@mUb06 zwcttXCN-3iGQKMd_o2?l;~5_7p*#AIgHe22&NIpmC~<^(YD61avj+(D;4V5agvG+3 zoJnoZ0JaQ`Wb+U|`C`fbJ5Ou0uscZ>q%qIJpY27f;!|V5FfF3@#GjKHd=G8uEl1+; zm+eBf-2xm?pr&Rv9@R}gvr6i#xQ6p!P4|!0F3GJb?hCA% z|0t(s@~Xn(C@S+~kPL4c-kMCJD1RBPiVunQE!~h9FTJ^4->gWeqL{HNx+GT%gS%!kcBcWjJ@xH911Wa2zNPA3JeCo$fIG_j^nImDS&Vjl(hn)%b z7277by*KOBad(xGu&iHUKojqOx5QAruSsP%rnjA!4E^SYBW8gZE?GZTC6NMN&|tgoZjOY9VM^t)7W4651GJ4e zd)M!7O*`f|2ZhC`T7z;ja_!B6W`c`DnN6Jjhq~@sLN%ypy>$ckHkJ-8aBK;C)cKUO z4j8P0^C3FuZY#Xp5FzfFdP{%Z-%OH}0StI3D5U{4Ks>9G%fpXE9OX4%v(Q2YH z{E^tAY3NqLSrh6U=J%M%gO>d)Ho0XPeG$sI^~N z1+`}kLN3{*w8K;qU{9Kb4)qJsEl-thR78+JWirTor;S2}p1!_Z9 z;HOku{iid6uYjq)MSow|)>*%tK)ZbekC97{;`0ul-u9Rmh{i3Lke!5%!zfrd>+ z`9TzpicMJs$JpdECzseqRa3Kn-uJ^40UQ=9OTE;C;&QS(zCPXT(jHWkiwJom+=EAy zrVYgcd@eDs{{IOqN|OR_%ZPg;H5qq_{Zl&J(xka($frrRf75G6&WdF_o3b;=#SD8k2AaBHr~lE@xa5Y#ix zhER>;ud;1of<)etA1E>018g>1HU`8U8i#XP2#U+SxUVU1Lvvg)Sh@9HS4r) zz<)W)5}I=co2_F|l3{g)?VsO=LfAU$LpZi|(hDP5O3^v2;Gy`4xBI<0#!EV2jgA2A z$tYKsRne%DY2TgwV)lm&S^9g9-oX@A^9*wbklc?<-d4Md%8aX(M#Hg{2*g`jN6B7l zumS-)G&z)FmEKObr(Uoy{{#ZI*LK70M5r8k^_AUFE>+kk3sg%P>fOS&o04YZ@`OU0 z9j$OEw7rmEby|n)C_nwh{OpNo!Q;?LdUL`_su)oh2-hIEX3b2&+mg4dhO}v8AqKnY zIz&gg7BK)k($gGc@Ucj3YZ<|FhU#MQh(^hd$AGA1ud9`P^{?KMw>Z#CFK9W?bR~a* zv~hT$Vus6fII-@GaEHw%Wa?#;^zq#>v47Z|9VbvDcrbM*HrXULmaC22+cL&!#LIVYmvJ8~a>tTnz`w|=NQc0Y5N6OTkZ%TeMo z?wwA7k)H)Jg$A?s>%nl9Z&8$+bannV9=0R7^WSDW%xfV!#XywXuj=UoCRD3<`!-mE zbPULjxcxPPF&u3@SK7VuRX|Iq0>D9_1)sf(zQhlH{KJun+Lel1a#2TI3x;?t4#xOA z8K&0eLsY|NW*0w)LL#@Mc`G=Y9)?_3p0%#$@GSk7NurM z=yNhoq9$vWrjr^gP+aCos zLOa3Vafbee!lx`NT@EI6E?{VglcQjA&1K4=OA94dbQ0x4&Oc*Uz(wPV0n$$OsxiRt z@DEcNhZ+0$@OmS7)7c_W@nTa{w}j_K=!7ri4@C`*1xsY}Y*5k_o8XAtZ_C>$X##qMX9nR8Bsksg^QM^{tB^fBUsimvt*cu{T17bFyjnk>+cSOXf$n-Fw ze}m4_`{gCkdL(376kscnho+&2Ss*CzWEYA!Ou3xh$vfbpY3GuBP<2ZgQ)GszH$F^= zB}0jU1Hs;k=ncV3v~Ijp6ijcL+;LG+{ydt7*dnDFX&}RgqI*Ef>`idPFm9+#0+hkL ztyFlg1KC!o1;buXWxYLVsEW5&XBxL#AjNIHXF*0US>BU!TKx&A|Fw2_L{9N$>`+}` zQ90`uqm+fwu9&vbXM*~Rr-jT#eBh-D=TbD$Qm~nI9oEGFby_xA=tnYQnZquH_q8Lk z!O~z^COdIlqREiHjbDbjh9gdi@x_Atb@L@~Y843@w zCO))>Mmz^84L)pm8f@2*P+RQRUE1oQjE!2A6YUt-&<>ZhIHm-Ca#P6_O~`7f07sU@ zLxQn$xe+FsbotWp)K%ln8iL)OGB02fgDYAuS&U8TN;*~WvGqi&&oo8Qm}@XX!I185 ziSQH+Z6GvTxJen8Rm&2g4G$6~1*2c_2SblC+>+w- zqDXgRb}oscbm{W3NqqLy#34O_&+{vZOI~*KMS?tH=|^qT)MX}6t;dT-FfXDaU;Z*k z?S$Tjs^YCbO^Q1!UJ|mpn}nWSf8jlAKn^3%jT0p)B^ZE5d@mWFvh?9!7?hK@ghU*} zL`Jl#Ah0Sf(Jvthxpn#jX>1)MV#GrHWGOd&1=DqFZmCYRJFLu;+hlA#G-PLGPS9-d z7(E$%tonTx9U{t;nWP=0t+H_P8Eq+~ZpkU%GuehGBPCjd`pkF01bv5|k(@*~soV3w zU)H{6)V_ZHyb=$EQpGWNsH;*q7dLLnK_uBvfcBDfeYfdVnJwvJT1=hMnEBM5y2hio z#zzY71;^NS<2RUyeGwC|Q_fqk4`nu5uX+DIo@DZ!qU3mH?ua9Mvl<%>hNoHo;H6UcFntIP*0pY&c z%Xs=xH)C@t-$NI8sC9JQ?U2~$E^@`@-y^n|9_%tZ+c|pA2%c?3g;Q!TXJ8y7*7V{b zO8T6DSC0qR9(E5zjBppXI6Q{zoN$KAe$l#eFtaFjlN$|3&ybx6 zatsW*QplDlW`u`-5^Sux$nV81%p|L*Q9rx=O1wj1V!_}m*)r_q>x1L;svli#Z z5!&)Rd~xFxSuW|~)2LI?3tglbOC@{J@Qo0<^g9yZgT<88Gqxkaf<>#3U2?Luh!3Y? zNQp%hQ!N(2-u(A8>ES)!RzQWHMm9g6xm2?-_1kfJa~q9Dei-yBkE2E`IYBG(k;}*t zP(8Yb+Yew>s+(Jy&KEjOb1oYphFhwa)3}bh2HU_F8mZx@>}+#Z-}rbWtgT?aUM37W zt85wk;HT^svE>BCjzG$Rvw_*)0=_H{Cs`i)J4gJn^A|EwVf(*QBlWfAv&tA(*u*SL zmEp*zop7ntUI7TZW&NY1#sh@?k%>Au+sXW^dVu^)2B<6W!n)x4o}pOC%2MxV6W?$_ zQv|bbV!8_D=j#RBE!CAcn(M&N~o8n>;s~ zPpv-9wLJ?P8CE?6d>qrrK7tZ-c0pegN5^l9gDaoH9{Y5Rr~dZu61I1Q)GxS#hFDy} zEs{skqlqFe(hz|d@Z_y5Jc^PP?~(mT?- zR3Q}Uy;nhsND+`4k^n&v>Ai<0O{Ej6(z^%*m8u|Jz`@@+=fljL_gwSN%$NU6uIJlR zvh!q@d#!ujYkz<6=FwMKnIa-Pc*5#(tvN7FeX0*04a8z0`gx4U^`R;(!BoBSlHeQCH0dcaCw*6FmEzJIn@~iEN`wg152Bra_GAxS%yZvk&IC zm?rb(txz;VWX`a563}GgfDBotJ@{w$8*-z^$O!G}B(Qo`?IV{LR3kP8_gOk*7HY0F z4yEE|xn}hp1*IIIj3!*WO(AQk5B)a`w9FNS#{Dzws0sE#exAAeE__#Kb0fq9{D4!J zwcHa*Z4-H~7LT}0vP?ifL%&p1QNb)N5VP!o{c4MLS%v>8X_>k8n*?$A0+1p8QZBmk zmjLCU+Y909@wit@S`WTdGSk zMeICpkQp~sOvKF*`?qsig2$26;V@}4C080Ifmi+Ml7DS)qKiyFwjGZaimRs9<3%)` z7-Q08L?XV3p`l;EE(1^gc1RBAr;yEiCYiv)wb{8I;!!KgJ|6$-Judta;-gL(+&3XZ z24Y^?Q}1-oyoX8KCQ{oHj4;I37tI0o3y~Fz>um^WyR3pUmUUWx*@!J z#F9hx>$8zB8XErq=*4$do~2z;H^u9Gx2!>%*re+SM3_a@VxxoZZiT!?n-{H_s7k{U0b_o1YZ=Ud_6vZ8f7pHg7!jKpT-vn6X4YYrVL9cLTHbiJT7+-@T_%cA-Ge3o$u<}lP`(KA zevF%XZ-IZOL$=aQ@3X82t;x0zE1AEhUe(H4WMf!^uKt)6rU5MF5XOTLJk3j)&6bHwzWnzXydIlJbvc-fn;E zI9_>sMepag`}{AgN@$jAwE$Z}8GS@8R(FWyb(a8?FTpP`f@)*go?g0C*vG($@=D8>16WthOlOZCUk zJ|HuI@2l0GoCxcvM$mXKrK;aQqpL)LXvc4*gE}kMHF2E$Vn3MF?V6qbuq;z(tTivv z|CA%pQj_E)+h4?+h>=_=-)*Lr|f2 zAwI(pWAhE^ZDAEV&x|(BFhl(`kzTutKqqEjG!NRrFmQil7Ede3C_zwxF&N?u8XB+R z8X7MgX4b}FWmH#!hi?J61^aTzS?#1$Bo7q4Bpz{OxlqJMB^m{44X-z>zAeu0M(7ad zV_dP1U>SmyF0B34RopMF<8`VUGY^nRep(kZ4Xr@pSTn`1!vL+@@K&*f%3o#)-4kS?iTCaCPz)Z=scKwk&|_Q`6^ho^Zw32Qa6Q0} z0yFjb;z2piX{I@Oeq4ND@-_cw9j9bfyH7Fk)e|)SS}Pq*!l;3nVNPLc$jmydJ$sp` zTGx?6^d%7@%0zP?pO9Ll|B1m`(pCu6bP`{+vvCq%`Qz#OUz|O-xPt!WTEZI?na~+( zvGC|^kSx=e#gh-O725^4v!H{1zqDJIx;tLf)GnD|XF7ba>wLQ(<`jQ>v(Z-2amO(G zV4{52CkrZU-)sb)EPzN{x0bV9k~za8)s2(~kz9|7(bskt!Ssx~X2~v7wg(pnv~9hj ztMh~r^+oTM3|eNoR+L{m@iGntWTao-CR11knO#hj5YsSGtysmAmpF@h-fqW?jKj{{ z!vm#kNCwHr*;e>nyoB|3$Ki?aH8zV>)X>F6GlvTpYe?Az6yY2heiu=g4*UUh<1HB_ zH1mv(OIq7kp3CRwHUxN#Sqdcf3vacT?N$N#{0Fc_->q@KzvsGtSZ9F z�BpsKWyegYI!=cql~VJNDwx5La8(4l>Z;=Ha#OJeKxej9oU@Q`K{VrP6a@tvC=8 zTI@HS_Fp;LJ{Yw?G71j)tRVKkI%~UR@YDDcvDB~#e7Bnl@eI809AT>CeDjS$8KBD2L;*WBteQy>dCE&A(L4cGL~kUKA8QM? zz3<0`8RF~_g~?PKZmf1Nn@=!IuRTpJy!AbzoVEwzEoHpyl4e#NOpBo1|Ez6Q=TZ7u z(J9w7k5FiAMJs@XTKkY{G+}lNcJhs1lUc_EGnet0 z&Qs$~ZoJ&ATvnFY3>0?qtsfC=IkqaJ&Dmr{bNvDAjc~@KcL*^%b29w_Xed<*XpOW? zorA5j)Sp`znXF;f5f*j%OMhN7C@t#`J}ilisQBBa$ZFf z-0JK^KD3?99e0ADSb_^0q1BV65^-soiX&D>W8tny(^U;7^#mOYvh+dm>SjuSOj)1J zTM02u?I%dSVh>Iij#!WxM`~nv$$-sUDrNhFo#pr!3HPYSnJ>dDz3EwXi4IitKSN+~$Se4dai3c6_Y$K0K=7u5PB%axN13hebm!#vYD9=@jHhX$N#0V{ zLyj+E8LP%Ir#osyTrJ7dG=BSLTM*z*RpK|Fgb#E7xu!dHtskwv^*R;qayyOKx}~r# zC<6yJTeWzuRIcc;b6OL2Nv#k97v=C*Q!Dg)&cmcy0ky=CcNpAcA~J0$^E$z3mwEN2 zhaTU*&&<-BY)2R+LpmUh$9lLV4iIkbEi-Ln%e(O{BP)1p%G(vF7g&qDE{D1gWa!cm zA2s3yPE-lq(6F_CtvPzFNy8@rY-=TE)kHha-HhR6C5%(kHXNQfxCBowv@O z%K=gWJCz{cTRv4GLNXJQTvQjy&6ibv+*yV}vl9YrifNZSbiPQD$nyO-)&cek1njE? z=23qxagC7ss=X&se8;cP;jcE*XYfCi?Dw5t z)Mg`7E4yF$ySNG*4}#rV25C*-T%9ChZWIRtT3mRw%~Mif?wI)C6n7W+yutK0Vp_-@ z81c&fRzFlvnnnRs+(gN97}bIAHAy`N?b7L}b)S*?VQb>+IT)|yyk-<)6F(k4wfj4X z_glWPs-*+p#h9;ZeV@d$mU%}Lsv%X5X)8Z(cgTsGB8!vz-h`JA)J`pVSjKs+SXjW! z!7`uO&be(1*f}|cA0xWOgyarh4zxY=xUP!)13+H&53HdEXY$dHY)R<1lB&&-Mn{=Y z595`0bXbQxv;Ug?3Vb*sK0LBq!D6pKl{$hKx_?^|*BFg&t-U^FxJwK__K}Er7?6Cx zk=d1CQd4ix&xqcGr>b7RQ8o?BB6Mu-%{FsYeds;f1oj>!zk1qb+`QLDE?zJGBK3yi z(G-eAhvkl`i?@~Zm|CROOcV*}u|{C|3Qw=!YdS;`Cn#~C3}4-Gl6W7qd28rg${b(o zc*+e^wt$D!pUP|TdZ!tl@7g~M-W#mSRmH+BKyam|XC@mqDhAoMq$IHfF&04u0yJTZ z2(M{yxqAH=ow3UL_Q6QFU1pIMJeT3KC9omHa|aSaHFSt;(l(l^smxn_=guPG98)>` zWKnFysv{L_LKdSITXzgxulJk2t{`utv%9^|DzuPvz({1K5o6sf$A|YuWxKsA&un=H zPbcCYq?zSW-?Vy9i9#snTy*dmSVUJYfsuXj%bi{5Kk(0bxPtqu1B!NuA8kV?pQWpv zrthy4ET7l#*17_a_huz)FX@wIjetIG@PU|RforH+iesF*q`>jd$Xm0D>MR(D{`Ve> z(a6Tanr%zN58)=BQKyC-J=%l8zY%&ZUK@s$w5VPw;5yQpYZsnZu)}dWENPdzEK;OW z#M)YEv@4}X*KlaTk~c!(`mzG(@~PWszxSXC32DN-uN`4XVx2l!Z(d8w@Cg)8YfeqQ zgZyO!xu+h)8JAQ(Bon}qmJbb=)r_j~ges0Q2$@q7o4t^3-*f+}WUY}O2OX2DX>zUo z3VV)yOUZqNC3;k6C1jK~mZgp#ZXdg(>TH$0ayvM;l??GA?ha@-`L@Xzs6)^|FMlpH z?DpaF`U>m2Co}7^D=VzhrB1ft*C8AEoVx2g-r^IaBm!Uo)KE1Xk8d4^Ih=YxvaqFP zvx08)y0qA8t^H*nUB9*^ii^Ux-OzB%eERd7w~%2(Q~$tnhlgaY-)$&DdlMl-!$tMM zHsvJz$}l}}6khX@sM)@YcO<7DQ%GC|KL+CU@mUvK=egZkm(Sn)1ER=WgFPE9npwn_ z9Z?;MGS=xID)fxR!FH)GWcV7PHt}J*C5yfjTve5kg-8<;TDBmUMmUEyqBulCZi89#oQxykr1DwNH8*7?w{alw#;X*cB14QS2Gmi^1^EuMN4 zYO(ItgRVI6wSclos`Rd(&SE}h&PS5BxfO*jCeoX>T_L_I3}ggxu+?0d3`PW) z)d`JwVfl0rsPTEFuST((6Lyxm@m^^w227Z5Nu}}`xoi1&(#WO325WvJ33$cSmWp=J zOHc08$csdHmu1y<+^-S4Gv#^`#g0CbuQcyiS&|+KO3PL{mV3@(+0gfkroP{Q6{q{% z;D8HIE^YKLimXhvSt2}Wr4Ag%d6Ejq zXD_e@(60gUTVxU-cWO{$)}YX<`GZ9tl*U9iLg*Y=7;TBlxc#5Gp5Z%Q@7w-Sna;&z ztAGUj+CK>7E~d>mY^_8TmF*$3Fe#i>MOx;S`mD^JN=iTZu%n{iw#(!tl5##m$|3$s z9m~7HX`MGziT2EVJ$5IwWK zZrQ3>mQ7#?!=#pVsv|vS7rSJyfa3Z{)F~_2*SPBa)p!Mi!%sh#F$(XP#tAfr!Xz(2yGD%(yVOu(gmdh- z03=($qModg3vt8mQI;E^Rxz%5U!BROhngVW1bsEDrR^6GGX5T1Dk_JrBmIfSp`5U8 zCj?P7Fy69_dBs+6UwxWP6ov|DNAQ0(bMunXfBaOnu9{TfUGmgu55>h;!QT7706Jy% zbC#h=z&u$Dbqc?&PH~!0AJBoOp4;r6F6o^Z?o0BmVdD5_!{$c)X6Pb;_4AU2|1*X1 zV(RDcu7Qrvd@Es*6B04v!5L>^7O$$F3@dK5r$wCnG<1t8JmYEILeF6kWXo$cfqwwP zS|lv6^5M5PEdOrErNB!K5sp_+Ieeg(mmXEQ_wwX8U~coMEKEKgx7KF;8TCYgpPx71 z!H>0rgo{W`@wW@>3|GNp0VJcQuSTnJV|m~-4`U3VD_C7=+Pvlag9QANpO{d!U#(yyzU^_!j35_Jo?dc90-x0X@m3z42+>+$~Lb zLbA!H#PPtE>V2ss3L6a4aIM9;aYrGZ$Smw@t9(3Z0KJoaL#NP_OE|E+IS-kjE4-ccb*U{EU2L@rR*d@Kp-7Vn?BBaFEOvpO{868D))XiRjWZnLy}mPjeb z>OGbwL0WJv77lLJU6K%0`{eQ(r~sdPC2F2432}?t<1-VcD#5#RHL<4smK;o0Zy!M3 zrg-}Xamls?T(4;X_tUU`5-n{~k9EQQ(j8`PpNB1nkrCF=u#C`D5Bp*fv4^iX9uwRn zmRFE=F18HvN`ud2=~Lm^ zWg|!Kh-d2Rla}honHmy8mSt(5=ZuX?6QKxQ{Mvpsp!W&p3F(w*&xna`M$E|-#aYAO zKj&1|K(xa^tlxdATWS~lDQA=OMLcymD4BPJ&@5Fkt|Mf;4*Zejv9u@0M735kt%i}! zBE2v30?Pu4MK#Laia2C5=`}cTJU+1p6b%qL``+(E-nRxv9dB!56_euzP}Wn9)(D*T z2h0SttC+D0W{xH*I2V8ZII1Pz^<@ll#UjnHOdsvu9 zpDvhsFIvm`B_6u6=Ds^RU4eum(tfxDCfrUycCf&%Ix*BVRm~V-JOITAfBBNSmvI8& zDq!^d;afvmJ5A^mM9uz;5&K0A)|CNx;QP;>-(YRZ4WyR;dL@~PE@M{;1%aW6KVWNo6?&#x|3)y~bXxd?*)1tkIF+>yk9HP!hSpp6ealIl1 zM*IQz=7)XF*&C)!;`l(yZ!u;+X>ST8oNbnfwW9b#iWIG>%^l_2YReQ#__ z6V0qL7T#;ef$IQh6J6`K_-!6}N~mU$XkL{dM^l_EmN|xv@quK%*s&JarO^^cM}X=I ziVoNhe>sihY|Gq2h86t*$b{h={6zR=TwFEPV{^)r&8-Z@lnMf=U?ko3JvjTFZe%by zOsJ)-XPbo?%C7b9)zmHy#x7A)1hajjnjkbEdoYm5-}dj){)3|JTGo z{`lO6?;c*RWramK+!Sw?a08ywiA@{wBuu`T$V3yW+~g1eKTI{zH-93q$k_8WQpF@b z$H`To9yP{=G8yfm6w!s>bapWf8y575kFZ+4pbaZAa}70UiZ|I{60tke=(P>4Fk1df zK)L6%zO!^6eki7R)ulQvs0oJR@m{`fbXrBz zTjM00?WGsFZdtm|k-n?k)C#2c_ty*_xe}x@Ol^Jo)+_1K}Dh zanah~65sN&r->cI7qj4{L_J&2a_1it*ycvxUwVA1d=~HVFZ;0)z0m2qhi+YuD3|KM zj&{i{@X>mD`%*g6ZVJ+CB~}()?PM9x?q9F6fQ0RbjTZ<>T)vHW0TceM$u)F%g?D?q z8iCKnH;E%7<@rWzgr(wnC7*~sYeiv0bi$yw82HM`uizS)e3|45T3g}m-gFm^; zGniqUztZwQG2`s%)2fx3ZX5TUmbHWAc}d6pG@F-oh6q?%VB-^+D7`gzve@}`p&16O5pisg@T~nvG;dUG z4b&vLMYjunq}gS*?%8DZj<}KMK2{vk`e5#EnZPGs=%nMEggZ*q8+zQ{D}x)1_P0(> zZaPa%{MFNVK2I8vgS{8+|9LIo1ib1c#8i~s%A$R!dPq(<*`cK2$bW>aKih2_o#052 z7Ueweh4INXvX^d-8>Ev`G!4X%Gde#dyNaGwzhoR@&(Qgbaf}c*=PpziBorcYzV$+B z+90Jy318sm*Oqk|zQ_~d`~LYGk75E29<8(cw{2$?II-9;5Z|w`Px`~zj@L5gNBBz} zViifNPrd7}#*6Ym#_wqv+nn(_p@WIv%4OPrFo3ei3@|>fR`C9nC+2DU)tj13|9VEA z_!$&LyDapWk1Kf%LjKrZG(t75!3k#m*&|1aIR zAwYlB8|*GT`g4a@TW+n<$n~J zQw`%fl2zSdo*LkwIZrg|S=}>Bw+v1()r^?i%fDRKZCZ*%nyuzw4a*ZWOf#c3rm}(0 z2`rl0fU;Ln`tgtK^ItNV?Y3Gum?N7{4~v=R9*(1%2KMEZ<6ZA46o&!-XD`7&h99hd zWAy9=f{4v2fYB&K(J0co_b-QOn)~UI74v^^n8qLtAksACp2pwI#z)=b)9Pho-FL_^ z-rQ3EdGB#FYJ_K60F;uIC5}FlmRXkeR2}7Rh0GP0(j8`vaWK-IW5BEe%4CB zSK9=0kGSH5?gx#&AY*X3glW&UVj?9+ri##dEIxw6w)=C_buSM}+AYc)A<`U_wQBy^ zyEEJB4AjF`vyI?;XlSpk%$qf4`%&UXdgrX=Fd>uV@gs5!Rn#d4)-$|{OlzV{i<k?3EG^v~(9N%$(rd& zl(q^r5`4g7(h}si38) z2z9aTg&L8H=MJRDy51vPo@J}(z#67hOe#+FDn&$wml1JKS;X2Yln*4yv1Hp)Fa8gk zi|W%}n4UI{g}M9Im8mC|xxXrbgiKxpG%m!SkXqlbE~}C|8+kjTJPxu>WILf zB__=fZzo44%yUraX$%Gq>Tm&NU>MxFj8vGuq&`03NA)Zl<7WMaT#Ou!x{T`cFM&1H z5|;vsAYT*-1%CcA>u}^>+ciE$*SXlz2m(hGTyn++zC>3fC8bw+sp#(|{v6l$9$R_s z4A$~9^dC6!AYgejI^w{;D0YbbD!xhwkD-}6kWpS)EL=|F6mPb}c9tuv-mF#u(Tlxk zmSiF`XF>yk^fiUZEADqmJy~kKvAEINxh){ugL=i+nprdo;mHT6PatJoRR`>;l>rP9 zPaN7_I{2a&F9S;eQv}#DiROeZW?A7I?K|zuhQQ7)Ly(ZG`?4QYKCyDxb@6Q*D!_;I zliIxmY!g?PtVApx47aauB@M%!$M0N7n-WV~Y* zSOdJ)s+by6sU zItU4!Q^Mni5NSD8=yaPhF6S7>CGqNg;P`Q9{dXQ?GS6~XXG_Nr)VdMme zmzH3z%-E6%D{(aSK2Xif`B0q0NUu^Mog_T|kWYhpa?>-Y4{3Ck0|E?YYiSzw#ylwd zwmx%h8jowW@L15QU$Nui*m6DBSZxqX8o=wBo1kw-U(5aknC6nOrq01#fmvYDeN2P7 zEjo);t2a=5kfu=C=HXP&lndR&(+rC1mK@eo6XuGI`~4~%#6z|>oBV}&Sv|Vc2IHEC>S!GF3*zv+AH|ZVq+s8f)I1ds;yO%n z#fT_+jz1!+oh~B&KH!j%8(J2J5^iIaeIU5 z64CtXF0<$**Xjh0<&=gg_R1C5`~J%e{_W@g6?rX^k2$hl^gGO|wx>8YCVYA(sD#I2 zGOWc%<>SErtF%D-AwB$CT_C0Uwqs|bY4r?Y8S!H|8n$&Q+07|z^Tlr2PLpb5`vW1$_O+M6-;AT~X&MDuBqi6Di_ z{$%rL9JZb|4xlC)->~`}{ryVLZ7~{W&FnqRl>LE{+GtFq=!;!;y^rIz7&mBEE_Ye3 z;Hin$P_mb2|s1#iKHuQy?_zFxg=EsL)Z6UnQ;4n2CgLKC6RDZ&K^Oon)z(uevc0 zn_|LnfI1RWhCV#dc0^EhAJSR7xK~UDZTx&l%QP+Tl;hT zwfjcL{wfJS4~|9umKIp)HH_x5@tY(TqI#p>X}HS70&Idn-ocDME-h&1qX0#Yx}6nPkCEX_1~Nt~v# z;Z0WT$iPKrtnz4dc-!{$o}u!r*u;aq+8o8cL2DFRhS#?tTvPsffl}ryrkl9?g#|v7 z$*a;3s7zK@2AyzEr&8%VMYs5Z*(45_dR}+=b?Xm?@!Feyh%9N0g&0s2 zOmck69J>9qLH0&ZVA4vVkr5<u_s3S2kIjh5<>vz`5s?dHA@;EEL@2O%@vbcv`tFZZPge&4lWaRafQ0 zY@;wXx>J%>qh#(k1GC@a!9@pR+E^*V(A1(A*pYf4KU7>)5fir7w?SGHA_8-=Tdg&+ zExyV!0p>3zA#1$x9!t3v{Kr)0R(+pBrOXU^Q{P>wZuJQ=6LZ45xb&CkgH1|Bt0t8=HNN~5_)JGSy-;gJ zxF0<_63@5JrFgY{5pnyb*>`Y+RS?~`{RHlrzdAloCriT})=EB7v~fvviH?AT{>~P# ztXio=3NhN2m{VRHjjXL0ec_LIkoK*?c+1yx31n*`7i>ESf*Pr(hz)%KesM7n>=o}1 z*{I{b+ZYCsvXTJ7*N@D^4&h)o3O^I3oPv#!2AHYqo;f2|6HLa4)aA-UF3CIC^#h-{ z2T~6+>rO3nNj|A@`0aj3$8V99hQ__4Enh#^%;^1M)(vJXYp^b)TEfaKrzv^%D&lnP z>QUBadE>ObX6r_)m8^F&>Q3##($!fUJC4;nw6=Nw2z%fYxOuV8u|1zVnFu)qN>bCR z@viQ@YMGodlBcA)D|_>aCK@Gm`+Z|5zDt}59%B|Y3x-HR652nF85_Q?Y*lP2=KPRuZZF1#expw9BdJutx7yO)8)7{$TbjgRZ7R zq_kbqoMG~0rp0X&M~n~F0`;8|^YNfSL3|w!586>rQwdK75qYd1v!!PP^<^m!6i2xP zJBB+5?-H1&^fj9&r))e;DxlbjoCpYan)4GXb$O6HLW=3mdT{1hZ61HCb9F!Q@pHa% zy{>BE=_;@)jA3u?fu~-6u=$*M7#{ap?!J41b?2!o&5v=;d>#E9kiKbG4!N0=aUML{pXa13=}-?cGlM{T zIlLd9Wlhx92YPo5b9C&TW| zzgolihEb3Ce)f7(>SLA~AIrHCw4)GuG=-G4H&A7))1%#XBGuzCt7naf#sxDf-uupX zp)27Qn#I+4!ZyCAP^k=RiM~V10OzZkslcmPwnvK@Nq+~1Gu%Av`%W*8n6opfIh z9%_c}SQcAZ7Jo3qbtMssvuI+aIW*t+w0VAX{c-ifdbiZfxz;sVcltraWCc0i5_fa> zWu4^f^4ThoCbOTwAPZ$@vpVCQmTmW%w~S}Ab}Hw)c_EuD&j$}iT*=w*M|tRhgNFWw zJ2^uF>gw6BYl$qRi?D<5E%TjHAM%0-Tx6+-uk(&u{O19#LgXlw2{d`#(wJ6wLioUA zar7`s$5hv6D4;voKno@&k)cm>HtoKb#4A_J@2Z{*z6Xr94met5*>pqoxR&7u6l&TPTuxJRv{tqBMVj>p7Yrcg=K zc*+_FORf`*>c-i2en=T(@N)y()8})}_bGbcDOAb-(&!7dpaCJJlUn~C}d=# zvejvtjPQnYS~20Vwo!|iSgdv0&&ZdJlIrDu0NMIAp3daB;XZBtzn$3DZU5)xQQvc~VuLRw6-ftm~wx8?!t;HzI_Tr0oxL+btXU^!D+6;NxZnezCX9?79&R*3) z4VOe>(U<-R)TH&kG$9EBO&(M+P;sGxQbkDqO}TYl-?73+-sHnr7s~l+S62-rufsB~ zptyatI63eIM%L}Q?AcxVYYalf$YIhR#)6lcMQ+;kb)8~lSn^YykqS4-n`NG5FrtrNTR>s1L?K4FPeKx6uqB3v+xY_h^KGT=W}Gqjkf%a{--W^h zp-gJ|n}=6BOePH0)KTuEr%dfHhoJ_C%P+C? zmQMT>!_%1q%SX75;WO1|{Gh;CkR?(YiycQGz?LYV`7N0TSd4Qv({@#?QOs+<@E!_K zQ5F{FsVA9Kr*2ke_2yNfv5j`q^qI5p#$!<>y*|5}b+Yd-nr9>470~j|kr3t@?Uxb9 zvg)8{S~s)PqRlBw54KDQULF z7he|!?rOG;B_h`H2}u({#56@SI5D_>-2b2cy zS(Mvwhq}g7nR8A;hL6^M<(H3>OnYEWgeLEFGzxEKI+E2EXP=6;?>?ZuNxpt;Em{X@ zb(CRZIvSlWu0?bfd8aki61;GUxPBulZrPB*KvLKsJ<*s}F$mRk-K;mO8dt-Ol`SuE zbw`k(O2oGJbpE3{J5D4iPoNVW)1=z%3&rBKL1m==mt5-A#!7YqU9%FylxEiSw%eg} zI*>@}iR~0=NAT`A|N1L61;lGH?cA!TVl34|C9*)k7yTW*d#lL0iVAMn{4ht-+I{^9 zU%}lNv@t2x8Uanyz!BuPfHXVAjb(j6`$%_-WLJE!!F(8#|tnc=lx{-Gt+(YNI=8k zyJF6Km{GKj2f&`zA24!iUc7yZt5B|*nmB#qJ{9>YGZ@B_UM>=;wi9-lvYL7{-K^fy ztns{>aGdTjA<9{ff3=~%Xz<6@WkE;Ohftr2!}JU0F!mM0HwG*uO?s}UzpT8Z^{Y&@ zQ>8weCChLIyC#bN0SL`q80zW|T9$}^YEV`P)PFuLM(9;FwIvHrTCsa+n{wv_=5%ri zozM)d3!w@$_LU|dMc3g|TdFo8Ni)KA-8Pm9Lw{#-m9f&kZz>kB$+cOYL1nGpA}TXi zQnx~P^U^t-J$Q2Y@09Wj)CR#8CgVvo7Cc&j_N}c(+0ij8?e56DuM}Tf0uOWiw!KcA z7C3uHf)7<7gE=LhGi8;}!YH!E5J%$`UxFFrLn3U_dGvqVRkbbbylsp654Ic&N$=j(KgMN_H?FJNQ1qFR;ZN+lj?NkIyIkwND;Y3KI4Q% z%^4E_)&s_e5C=7n{sDl0+ef$VG5Oo{jWDZIVPHk>&Mvqe%wK*}IE?=MIQHnR)xL4* zl){~KWAw`)vtVs0b}6lWIBkSo*R{X|!5;w6w~qHK&$AX7E+fNj0c9208L{Ib9LR5o z5Hl|WCw^*LysWsm8g8YZx5DCchWE5d9oPAgmfmoNDRcuPtQy4;%kbY70Ny-Zl)JMu z`PaF%KLCfn^5fevIuEAqv=oTU4xA&6*9*tk)@aDWiP6rnCpKzdsqx8!(kz+pQBl7s z3mm4dVriZa#p@{j9=4TxE_XC@v;ZxDc0aie-m2JYU{zub-MQEsHvIqSNhB?9)DQON zJ1Z?gDgZVX4mKVh02>Dj@b`m-4ZxwI#>Kny(GpXkyvHG;Od}3dHFEsNI|~~Nix7bA z$iww-9>A$^wTh*iauRd>mf%Ro??20~1FcOucM1H$So}4`3 zI%4U&D2gVR{z>pjK7J=!bvt3=8e!9y+?_JzTku;cEM?}?Mdnpd*~Fb(=;Pl@mdDaHP)Bo2VbiSo)y%7^sR5zn`kp6!I#ireN& zYTQZ+F3}Z^_I+LTIse<_#BMFI<*|TetSbWlE^Lp*M_%#51a<@ew8}aIrZCU(IO*=x zJIV^GM`l{C6_1G}p1juA75G{ZxZP?tQ^#YqTwXr+rYdsizG3Y7`^$h{cT zGSv2%_0bdlB>Ak%^@aPajP4h!>KB^;O9pxl6!4hg?z%sKb?zf1G#@roxs0?a^t=q2 zz@Mu0&+2J4BN#B!mx2V6P%Ck!%wXOz?QIFMDsomBw}QKr=Z+6@$x4hi1Y;Y&@=iWE4gqrgAz~6keHh76$xg|qCRu%kHZ5H z$2x$K&hLMEkRFVPAj`hpKvE_Ipx8$UrpfTK6>47-RvwY3JNoaNVT7}Z@2%g1-Ka_u zhyEb!V!`J+yek?W&Q2w)3}Q2j-H@5xSOlCCax|Lg*M+uig+CosI~q_0e4!tD?4$T@ zM`pgfz}1{gfR9|Yh?mZJQ~2AD|KaY4Hu2011+4%5y$o289=b1NFVnjRcj&KR1s6Ox zV)r=z-DBskUEbd@j*W|hkAshghxK=qV^MKpivp-sjJX_Q!~)<&s9qdp1f__HWART_ zqrj<+dmOP%efCHHIpm3y0JnNaMAbBK1!D;SBYMenw7!brA|dw;C$2K1hnu7XEc6wK zjO|f_2iz2a*%sI5WTVuh9Kpd!B<{>>yh6}ze4QcCR+w6Mj0qPTC)EI#1!vaWI#X~& z99^_{xW4|5p!S5tbYPcMkz-ZM(-v#0Eq!VtVc5@2jwc6d&wP{m1314F-kR5X>^N|N zceAx(Z5xR^&hyk5{HXuKPLrR8rUwKYif2{8d2qkqScWj_{qm34+B*yGn(qe;_0 z4gKWhd>xrI8b8vZDo-<;nPb%Ui|;w3%fMzvT(F!MCZu@kTzw)@l#eW{=S*A+sl>bocukKz_nLcYkfLA&K5ZIHc`#T10m-5e#W;>Ow7K#HUmBm+;Bss z^#=9epN$zUCqQRVLxN5qZ%IF=to@GgD)%`*ci#}J$EMF$scJ!t)!}Z63k}t41fyDPp z1iRyeKg-fm8MrAB|M4Z#4=W=wCeol>Bp5TkrwY>;l1KH0PsFaB0;r-o{&{|I#7p3292Ny7MhT z`edV-MY`a8f!x?*9r!rcT9qzOIWn88r7y{bYoTpD$Vg9vD;F3$5EOL6deuk*_XpD7 z?ZNa(OaJ!k@{bhJ*BukB=2pve5BRrv9U87eye0bf&4P@0B@J7Shaf%WhohkAfXkde z07U8iodPcFt)DZeno)t&;dagQJj*$i64~A{8GA?JwllB?kMUw z68Fjap-=sVK-urT_t2>r*&O!F1ueqE5{1=x*+RdA-ycQ~6`h0IxSlo5M(y*n4(t!$ zy8h;9ojYt9DtyvmJ<7q#AV9IYV)N51=lqBHx4ZseuGeLZ%y80}uzU$3mb=!CH_-<{ zDVZ{~X{iBJb^0m{`$vka+uyV59|05XV~j`BRBrE&SR;uD4T`{cI^0iXF7?yjUf$~a zNZ+!hw1#rM!Y+U+w!aAEFP9)rI8yB`Mvrn{;`x?6NcG zH{Z&o|DQdv7^W~MUU$*PB*=pMz;o4br!svOd3LMu&p1yoR2FZb=3~{-Rn99{k|tu6 zSJ@-a^-F1>9=CG|b$KT`v*Q~j5!fkr7Q|joQG%002GHSyE2Ik_Hef})4gB4*_k$8- zs-fb7V>6hX!mt+`$aKzU+~;yFWk=Z}$Xt-@!HKXaWvpq=g_ZCl^+c$!XZF}2pLXB( za>RV51)n1}*T(RwOJ3nO7$YBJNS{IfnQ|Ew0h8U@g~8nXI7dpA@U4fkW_(jFR)Ipc+k)M(p!zWeF)&t$~O&qV0)hnd9=gs1gPbxV4D;qVwHgqg& zOY_Q>xo5)+zqxm%A!)_SkI(!U$ z{r@{3g1RAyOB2;;2QVkG0IiI+X%ZRn&wqY4|72?Z&3or4Rw_MOf7U5(iBIe&#A)?u z&j#fs8Nl@|0kA)s1EPXsm{m#Z^>5Vze9}j!6#Foqb(smW?jxTnt}d5wt?{h<0JQ!9 zFer*7_X)sH8FGTLe#sDq3IQ-*03E9kVL46hD`poheiD+C#~Osuujd76jz7kM)>wo7 zO458L>RhjFv3RLBQCzL$cGj$6B5TrtME=+h0PD^Mn#P!vtDIVK?y~%-ZX9HUGPS+( zqERNVb{)g!gXOieA>VsFXDw{_(5=57n;DX2`U4YBk5VE#p z7K8V18>M++qp=o4B9gIAk#z5Gfo$t{lTxyVq_`)cSc`&rM`(8dcW}2~gC)T{p^M?5 z8@p(YuJRUc9{(6(r`}&heOt-pTa#HCs8JXBCHvh4%P*+a^RBYHA5Kyxmnp!VHbyIm z?_Q>Ok;@l|2HcSY?J;%W2Tlrv8UlJv|)hZ=hkWG9*kD0w3We`r9X`fxf?i z9M4xATfpyb8q==^Wfu=K9E+VvmJ@k1v<-D^lS#>)54SRwFO+38}oH6ZC_!9rb`qDGD(&gXt5$1z*)4e)9xa;5n4 zE2+%z5?HCfw^c=nMVfwvd!bnT+TLsHom5GmS*lSc8jXS3l=x&&_0+kiOhseksFBIU zG6XU_2kDHUQUXjq$1|3US4rvH6a{G&Wnx zEq}||4^Krx#_eTHag#0>Wdi55bxEFnqb1LDP7L7(K$&Y#OQD=O17K$S%`%oV9{1GY zl+m&)Ctbmb+0dqka6L;w@XlsRw7$FsN;YyibIfkaY4LyyVNDs}Xg0t9-FrS%n&`?sb6QIt14Gd&nUjw$YBzI;(`^Kx8%sfj9IzGN?<;5T3niJn*Yy-`y)fuij%gg! z5B}a@xdDzT-I@B`%IzZHz3L8N}c!6J@HC3tR;%_`AT*cPHGT%Dsllt#Q z7hbl68Hvm~TGcIrKcs$CG?4cYeg-iTkP4CulpZ~`H7Z{{_$b5U=!`F3g9v+BK846z z1jxlWBJyAG{HDp*))j+K?#xy$mrYVdqn}>6Y#3Isshv}nn(Q%vz14p0gqgTWe~`}b zmY~DJ1{2D1R6&D>W@mYnkQ@)z^dvL|9I7}!xLp!rFm%X2>*Hj@K%jgq7_O%KS|G90 z%%CLyO|ims-!pIRMAXUQGSk-zo6NsArNS`G<(INTUF%Bkhk|=*RS~fp^hfrrRA_Kz z&2(J~;4koWpXZ_HJ1}4q0%L#|^rGQd#oMjppvFd?qdEB8mwC=SEz> z0q49%6jAtd9Dr)pUOaRU7k2PXF?vy#CJ;(2?>pC;b=v&?U+JajhoD$Nx%wVfaYwrO zUTLbg!x(vO+`FuwrvTCv?BTsYP4H}ej2xV(UdbNW4~n3m?Ih=EGj7h$1s1O(#hKfU zN1kx1EX8z~X({Z%6B>;%@HJdr5YgNE0T%TAV8qC%nlkDNW@RUtMxq2 zu2a#rZit5+7pMDoD&5H#V3)=KV}6*+&lDFsOA9;{&9?e$>Bi?OFuNLg+kPWvhUAje zerGe>5-Y-vTa77VCi9D?oFs6<`96aL1(A@E6u+&tYB?RQ071QECYK@)(sO};mU+o5 z86kKBYLONGUO@J$fc{y&W9+-l%vl_y=m)YZeOzW@o6XP6}+AbOtz@-p*5vMz#%u&mrjGUfo@5nfhAjk)5Ew z?_HPL^jDJmJfC3ZRNGkM1Y`>x@#TLVQOoytm#x|@hJha%6)U5t*+~MaLjyX_ulm(X zEA9!obv}MzT7^V41K<-UE^AT|M|MOAH>CCrQtQl01^LnbB#?azTkz%(*A$)HQ_tVY zE;5+k{Pd>&Xjobfg>snIM-J#HTNxRVkWdrJmYP^Yb}!W!$R#4sdM;-L3!gm5?rE>% zWmMvOU2!HHoYoXC)Sk_LUC8h#Y@_)R>Q<}DLB=BCpL-_1tQ3b3;w7@bT@1@(E^qcP z|D!fss`qskT|Q9YCWSiWwWpjxCoTjBXCFUy9+DB@idoSu+^NczxNXS|=kw-xAnfyQ zZIjp+r7Za}!uED|_xrBTFN4(bwt~I6`$QeZ6YoCj^l-G5sH*gCuWH(wSV@j*<-rS% zQh`Q8SLI!Ip1Zb6+7?j1m3XML_O4yO$gs literal 0 HcmV?d00001 diff --git a/e_lib/utilphp-1.1.0/docs/images/background.png b/e_lib/utilphp-1.1.0/docs/images/background.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6fddd7dfd3e43f9a6ff7fa5c4aa3eb2ca6275d GIT binary patch literal 1028 zcmV+f1pE7mP)=BiM0000RP)t-s{QUg+ z`T6(v_w)1f_V)Jl^z{1r`uqF)`1tr!(jr*^00X2+L_t(|UUihqaw0bvg^$!yOG^PZ zu#}B~Sqd5qOM$s~*}yQclxc3u#^B4cxfvcil}e>1PAYHk|L1()!BbJN?xQiJoQ51- zya5{RZpoV{Jc-o00It(U_N_^0I_O5CLZ?9LqE(=?A#vq{viX!%NDTvnIg06Yipp(Q z9~32tXNEl+P0)CLMs@kzRn=pK#-5){cTFLnS(+jPLG=D@wtJO$zF2B5!kfln7(szQ z%>8=o?M?~VM!t=tPm>M{SAYv{$LCiuQnMdHp_mUEH4VE`oMTE0m332Qwz?hO*n|^_ zVuhSu`;Zjym?f~ZU-XuPGe#9ip4#BhOYJhOq`h2h*iUl6YP%PLm=ISm*J;p|h{?^K zUq)W~S1`P`Y7&zmMZsN_4HjXF&XA7u))sNCB9wW52-2Ip}}qHO~v-(#^GDO{NA+^R(G7o0J;EJDls}| zwtfN(d#bz_RPHxGW#G>?D?GiqJ{MN4a9wp@s-XkFZxUgjpjr$mm(F9-^emy2(-pq(NXG8@t$ zpY3MC%v)m)-F^&~MW|lIr zY8ZD$k%#m~11>|Vo_2(62x}UV=cn^Up!>sw`DT(86AK)lD zp=(}mImIZZ;@Qxp8c^o@c;DyWojTW@*H*}{uzB6gyh9ZlN#uR8R-t+bam;VW5ltqZ zdl^j|fZiQZdf`f2w<26mchkRW#-T4cilW9;QdPUPi>S|hoJ0@d4qtqWftslW8M_C@ zGWj~6s5ktH$r7_ke|nY?cIf$wMQhOu2k`w^4f&;;=u+AB-L<2#{t3c+g4M77iOeTs zb`3L)cN?c=?pL|56UZ!~3F}Nh&8H2?_2DJgGVK{E9|$psvYUr;hkfp_apsX`V=Zqt z9_)ltbK<}cA?+#iTQsb|aJeTR+2wisZ2|E2k=nn%nB^?!b_u&LR$9P6#TazpxQ8Z* zhNn9i?W~h_7h!MKw-nMg1hB7B{434h(m>!`b!7Hm?11|oOFkA!u1?q;Yx~3ZvYk;= y0lYHE&Kyrv=(Wvu-@@lJ2|nh6;B)^!Tk!{xJN({xtRmq60000puJ$k+EiB%uM-IeF@2 zS7*)DRneK*)w^eY|CgWq?&>pde{9mFNQ@#y;;+2@SI7IZ$O6tGBhQn6yESkMt(=Up+nvH$-oikB3=b5)^R;Y#_lgh#--F^1mYYHW>zxCcV(G^9$v%h5q zdhWfwq(a3jRLoD`zivi!HCM|V$Rc^ImS%Hn?Dq4-ZHvH zxkWBlM2QkJPdp9LC6zQ!d(F6K#F$ri(R+99sv&304aQD<)RyD)ynThRk-V}Z^V=*d_3lE)b0;vzjK_TB-`gGNEfKPt2E9ng~^7nOwnZO4PGAdzEszOP+L^5sBg{ z)VM?;g^JhS$-XN_mrAA3GGwJ~7_j1s0RoI^Br}1z?Z};d6}V^yS%cEhJ#?tt7pW!lZ|G?D~!1ZaNi4i z2y*p9ay}F;LJYGmsU~?%;JF_&@s4D|R#zCJz&+X4N^W^1H}QSX?S=w#(N1AXnNQ7J zGbtS+ld1;8Q5~LZb-^IQf*MrMeS+A=yV+)wo#(_x#Ist~E70s)F3FZu)q576^Mw78 z?rL;9>X~a`)rx#f)r3-BnCd0DcCM;M^-OgpgJLFUJ7N>iSaNp~?9f5fuV554o+!Tf zxt*BUBN5(u;edD>AZ-mlln+U^t5gnEfBJN5U87s_vVikcdu*w%>S4>sYTX1_?8Ky+ z3)zuzq2V=5*{+&owLsLwCBB~UdP+;}VVbj|^h|SMrB;ddlBh$yiNaKv6Q0&l&m(hy zO>Qn66ldh&Fn3>v)WI9J&f+X23egJFR0VJvBy<01d*HR6m%^TlJE|eI-yPRpJ(WJ;H?6v4Nh=)MLon zm^dEF$yRGfYF_Jknajo8)wr9x{!|gocZR9(&h}DI(r#%TdaK@6-xfHSni4v*9{IV^ zWVujoB?#31>f#chOiY=$XTJPoL9-JIrcAAQ_5)#!1<7m9AW-va>N)17Fo%zP=q2`! zjIRzsxM6V*N^2si+gv0aNzEBSdJMjXZ^uGU)Kp8F3MG}10^CzDux4RGw$e$?xmzH2 zZb((zn#vBBLU<{JABsY_mkEb0U{n!nqW4-X8VOdAlt4y;S4?Gy@hxMN0uyLfZ1*7{ zMj}9oBNO^mp@J;VJPXZ&Ksgnf0kUK~sjM7Ak|t;V8E-%XyhF(Z3PeN0U1?}?dPCBU zNo-pB#1~n9y(6u6q=)d1l-bTI(HyE#G`$o`3y}Ft_*gPf>Vzf~W)UXgjF}ZC6Ph#C zLfHiJ*)4C9^bB5Sd zgjNRI5EdwJx;BNNU;xdCQU~Ms=}iJeVDHCICH+_MebFs&1^^}9YaD}ChP%q-XCK@E zwK!Wbgjs$qWHNAxUnHV3bxNt~P~}2qDCr>bM(F!xsyLzN*Z5 zfE%!5sl))9j2+|K3x!8>ZRcw{U;Yx0R2R6buA#cq6jydK!kj}>l~mQD{kb_Ymi5k2 z^0j$XQ=J?iw;a40*UD;U2-S8zpSNjLb_mTSW}2(3{<)kL%^^>xuo|O$?2jybjMSX^ z@EK3S$xK*Wn%;y96EQPbbHYqF=UP}(!4M5u>d>1pVR^2Ua|{kBUn4pCRjm?^#?%1z%lfNT&EejmV%@$ z=hlP;6JeJlf+SET^m7N!q5G(dV?MS{Y<2?H44>)>a^qw z!BBt1O6^2%Y&j|C9GI%OsV}f3kyN$N$!uNT$|CC9nk^GVf;=iyZ7IhTh;~)|YfrEJ z(S$G%_Q)3%gvgY4a3`kS9A#?ag1feaM!oQm@EURs`|&}ndLJQZ{m9~ zKZy|qvN>sf^1yM~=BMfWk>;o6ySB_vOJDVf^i{j5)tDQ=?EQM>t*wR2*#?rksq0jm z1q7c^Acz+Q-&Z%J3rzs$m()=)cRgTYYbVmgM>-t1f@Y#Va!wBwWJJONB5PAp`2nS_ z1zciEC}aN^QKA!zfnzM=RG=R*iGD0*dBBskK4fbFtVkk0kJ>ubCLMzc(9n%ren>_$ zmS+Y|lT)p~W_)OnFV{y5>m!B*1Rn_y+^y3E*69L2p3?;w+{QhfGxeXJOJwEg7HnSF zAaX^^JazURN&;tvpD)-28kA`7%wodoSH`r;onLuIo z-W(3HDldq#g-x#sO1#{x=*E@|eG6@!qc#W8Gz-o7Hi>p6#@a1w$nxG@-n-xTC79&n zi$UJ_`-5t#^7|` z^Q{G{+GNbsc1)m05%61v)xxLX#I1iCOoK7WORH2LF`ew?((%sbPbV7)RRoP9vXJ$( z;8g!}IeV|(2`Ig?D%COk)^80;4Y<`&*~6(WsxgJ847ttr&U2QglR-^9?$$W+rp^y~ zD6Wpb%O4S>A<2}-(dx4PJb*0;9}(hldc{d){@w`Q&M5fm5?U#8P??~cQH*U#wizj* z$X+j!wDHKv!>c#FWXdunvM^aGAH|qgh9)a!%&SWIhlKj#i4rZ4dK&t{Ib`zuVjLxn zeW-K1%yWz$2l?2m$wSOvCQ`LCr?g}4%$DU-xO@uN$0he`P7w$>Zcb^p-}!}=b0O=r z_T`hde23R_{^Nem>&F5Rum;~33=qDRKRD#mYYv~C-ze2bJ^7_{-E|D7w%`O~>|$pW zBrz%pF;nD}>;S18a`^D32nQMv2DT)F5+W&4R6xXKiFYY3&ZK-U={xMU zQ{nur0r15FSmn42a7+X_KO!^l56wJ}|67}36(PpF(zr8i#P73O-V*D-2kXBF_xj%hpv>|A z9_&t@b)#G!@>w^~apRXSm+@;EzkX2T7w5gQMddaCj)5Elj=4fO&cJni8HR9BMFy1v zSOs0jRj9F&%#Y-CS-zhz`Nv8iZ+VrL z#v1;(Qd|j_QhX`JpK_(RK*&ks*Y2cNL%A%i#?op$%?BaSIlvT$U>9K>^UPlRTjXD? z=V|&d7(T?X^#WpQujR9&JTK14>oaM|7=M656sCp9+7VqU6ezKhMvVPt%;;{yAV3DZ z0gcg&QI3T%9$8ysh~rXlzHz*&3fYoHGgEcsYD0CBjfi7~=^rpn!jW|G$&O_NeTnfX zez*+)y{mz93}ZbvyjUNWR%2;3ezbpcuNHbJMK>C=^My^EpAFMl^St1jtj22|*>dQmsEZtUo#AWdmFu)KJ)9k}%4# zcLiT%i_$6Bluo<(BkM#kHurEsKauIAVl?B=q%i~GT5B1+bg?v*EfW|B*m3Uiat#RLkh{p_Eh8Z}!RQLS;+msL+P63CO>{+iH#;(qGcGL`mbg-n z5jrLbCCyae@iS45pGiZcm$6|odp ze{xuVa(Ezrau5hP`6q|nNhG0M7Lr&<;;H&4ltcb9I26d)`Bxpp+3*J=((Xld8<9WIIQ&fJ^BiGOKJ| zKC#u78rITGRu9+E6n5!V?;)O`T8G+=IdD}JC*V0W<&T&15WGG|pOBdR8Yt0B92|G} z;Sp!bap)Wh7`}P-C59y922cxzBon{_MB?PSl;j<-a!cg=$&HVXoT0@WkMhR19AlJY z=!4Hq>4DN3B?5=><+dA0L++f~m!_ruULE3h+=@q`RVo?A<(W8k8J`%_v>u{(bE>Tq zPCa>^loM2)XQpLcI->r`Et7PAQmwIt$Z0~M+p?W;Szw^Xf=I$7#tSG@ojGUV z?xaVOa#vZF%YmS5y-|6(2?bn)c>mr_ZNPE#g|QB7kC_j%Oh&8AqrzU zEzh=fy74;Q_2M9Uxz25Hl?}VJok>3fubnW(wXP>`x{fl2*|H9$_UEbJ-FJ1dw zmm&#^e5qR&*5ymSrO+`>a>I9Ti*bgE6e)(xbxFJ!#K^}5nKxO|@f1o{)YC;1>H0WH zRf8B^QZeo-AL`&3M~d7o^3Ra86htriQXx50f8V9|L}ZSDix%(XSx;(69U_LJ$?dk8 z7&Usse2-TaO>>Z;#LR~tCPQMx)I_31mSn^kI9lzrSrb}e;g>)8N|y?iN}jeJufnFW>xXPoI3LyZcK;in)1yc_;GK&%Sx}Q`6TDB>?lP9*-#z2tWaRfNe&-u%)zIMpFuks>8OL`p`NR7MOnKW~of?>16%NIjq! z^`!g9V(KpQ4$lR?RyVq1>1_>!7?W~fXw0YxWzMJ?mTg~MV=Lo zhltrvq;nZ&FG~R{gYKGg_T~bT50}LppKAq=FteA1h;_SG7*|F#S5$J~xyy&H)@MgT zEE*280)#x9j)8Y^T(S(Z?y*2+2<6^^FpLF=q;DbC4LX^P!y$ucqI$8&#Abm&h%roD zI#1G4L~cOY?TmHq9pqNUA;~mj8O%B$PtQo+`5@_{lVRCs2dB1#Om$*B=Z`4E1VTQN8d{lAKf&X`dC5)fh4cENiIZ zQ1FN^V)j1f{vz6DmcPg){YA94|8V{y$ei#O**;f=RFA{CDnc!_AGrg!&Q$@*96wiO zS766{nW-kKATMn>@Q7v0%ltVzCAYd9?5Uk|SVQHs#3aqHsHS3yFb5k1LkyAgg90*i zT7At+K`ffwtalp;eJgzF~~AQ;?bI1$*k z#r(g42uxEGEcatpl{!KK$y$->b&j<4fRxF=)X&1U;hR@43)gyB>zl**g?Slwreucs z2}pV8)JGdIg$s$vyHheVnQ-bj{zIPrbPTYs@|-3W`hUxlhL|lUs@m_iGO^h71SmHK zvYp@gGaSb~8OVQTIPHuH`x1;=Co(-)5`<7XRLFIgwV4y$fT+d~0GL~jDbH@2)AtD0 z%YJ{HA8$$C^W&|)da538(Y-z1p6(C#@m6F*84~)7BngP}fzOlg^OOLnb0X|GzE=MlTr z=|khMy<~5qdmS<~{O*cRxY42|*5rTMU{+8po>iVLpkBv=efdbc4hyd1=F%%->*LS@ z4fTFp?^-9n@TjLun*a5M$H^}|uuiNmJTCc#2e2>uNALMtUw9bGoczLLcjPUfT!@EB zCFEoNmXFNCf6K3OHCpqBh%=M2`%JIELad0@5ERYNA4rvO5Li%)>HMJ#k%UKRPO!{s z))@`f)Q%>gtTE+o`Nz>?1#Zmei6E`}eaqE83?)V-g^6151+L@o@Z_#f?Zs(o^UpdLbh``l(2JKZy^DHh$PyA3q~p^RBQ$^a4|$M5V4GSBMFg!i%GXc zmK0elgFMM4DaN?R!ikgWt86ovpFlP=#5r)3FmQ+d;kQj#+$4-|wV+J>1p?GqF?Gmt zD$nkYa{aI(C=V0DNqnwI0Ohr-6Y}#Ye$CC{!tOfz$`~o)V8m}J z)v*_T+*H;m4KY?ltVmdz%!ruqOq-gSp_{p1ZOVf^FN57>otJS*ZHm^bbza6L&&x>X z0Z91f$axuM8k*Bgv^(kF3Y3}7Wv2n%u* z(A>*9IYGw%*gMx=$*!Xe_fG&mfFMW_AS94L0wKN_Pmpaq!cxplBqHR(MFHd> zlPCd0usvrkK6A!%^Ds!^@AA%hx*wOS)V+^prq5-jrP9*cwO6mxd+mLCy}RnIDlAwo zQ6t}}Z@-cQ6)k60RXNFevN%ynk>M5GR!2jv+S5Erh(XsNn?~c%R1@Wwl-12y;7Bw^ zCJS+5X-J3kca6!b0D3fRNOO_k0=y7{02efE275C`_{H_go}o1o8>UeN6Hc6QqDGx`)i#46EgkJ=HA1^(1QyU(W=nKCg9&(e zJT%Dvv;yU2Zrv@`!6@n#LIt6qpQmBIs>r zrB7sAv8}Xd2zk?kDPv}22f0KkN#rzK`IIF4FCp&l)uDv=S&D734>r&P$9zYzt$>il zVp}WMV)B0lL=9N@rLiz}Dre zR>n-ysoAd{3YerCU36zKhV53*(b}(6Fb&KYHfe)*h_430#L}R-g`K_z0nyi4Bh5wY z%NlBY6bNz>$=TqKv_O_1l65OU(FwJ|F;S-PuxPZnaEQ=%@_eP~u@X@MiNrKD<1j!C zO}tJO(6Dq~tjncsCcGjBm}3x>BV7p)si#SUP38ZhucWBS|E21M3@QZu7XEMamxceU z75R|i{fr)~?8Ju*?`QE?u@AOq809vP6(D3W!~1GS7`C)uKiME5#N$I4_EH$OPLq3w zFziKwwvloBCTP2=4WtTXkWCo&QBJ8e7FQmq)d`eIv!GMUS(mM}$VQ)F971x~lHH!c zADdX^<7Aerk<3zP!8ba6GKRLq79nffNyQ&@XaiFOBAfKS&jf&y&KsYcFbqHw4a1^G z84WXtdq72}c;zI0P?RR()%U#jl6$3&ahpLJ?{qEI z3d!tbHKe6wx|<1R+%;=`rL>i)>YiG0iQ6+fy@Zma%?+h@QcSRI$ktN<)Xzfxgn z#SI{mh?W)LNKgpbNM7aWt8*#t2W|B#ahFX=Ewsa7b` z>PVf&5))?}xq0MP>w$t*9Zf4Osf&AuO#pgjX4YnD%RzlwP=1M;!FA2p&D(g9= zP`mmRlkCL%rkKnhLp0kcCd{@#F+oO%lanL28HenIReuod@{Bchi>XM}d+(fb@;5|aZw$V2A0MUw-; z*q0$DJcpM&CLCYVTw8;&XG}O&nZ=m!)nehX%(AWU7+~s9cxD4tg~!gw^2=K7 zmF4H6Io=R!liis`CWnY2wdr{1SzqGowigX8O3;i%jkGvKB6yS{gle~h{T0MS11AO= zZ0Z>qz3kp^@;YV+f*}=N1m{iw1btzO;D%EhcyTuZ5Xl(ijZg0(jsy=OQRY-M70@tA z1U>Mmx}R(%<+S)FzpYBHngxlbR_A6(Glojqraz8VCM%4;six86ju6>ICsHeYdKjsZ z_UVXOD-V|$QRjYwNB*jZ*=j92K_ zVocpi)wdUdwxQZiX#miDeL6V&{`23= zpLxmJk5o(Ai=GbR0EB*xyLNkPX?#UC!5>KamE;SQVShytRZioXto94ShfiEu9F1waOq)0{Q{mh?DByVkBIg3S8s> znK-A4A>0lI&_ET^E`@Om3s(A|#;m#U#q@eA3lX@B2-Qr%0+bs2RxNxIdo|BQcuMth z@_fFm+>aAUv;f1#L~(#tzf;-+Y8pU1Byzwf%7Y?9p=ETW>X+H0{O4BGhzrbY9Pk`lBOkcSDnXrz?xXBo> zGt&aKRaH6j-Pu>zegr6n&N`v6##e2}w*qB?sIQoo? zRYsnyWE9LW(Z{^ONF6%Wr<1l~3*d+blANM%)Y2O_?nM}b2B3rZDV1UxrgC!smXo7b zaCM2ga6i@1Zv0R!&z?ps1GYId#3`jW4FMy*U4D|)4{~VAAM!7wsWICV-_Vs6Y{W5sR%}E^RHVl5(-4xdMr6Z+=zAZ-%}$Q zfKocP1)H?NWPB+<+0#0kEO7?y`%q;}+3I$rnZDp`{drAYWM&+)_0!KHeY-;3X%FY#Il0qLxPv=w ze+TABzXcfY@c#NtH;9QwnPZ%7Uhi~`&zCT#@epwZ1sy0e!O?sI%~#}_ zaCU+rADd~in!zAt=NJL8r5F=HC%l;m#u(v?-lghGGRoS@11ejHZ_XN;gqZuz0*bPI z&G|;ITdPKcZ_Kp<8 zlNQY>5)uG?7D*?XoXVISremyA+A2a8KJEa$R|Z3w$4?S5)E~W0#)?aGMljDvpdoPG zRb3Zp+Emsg?unbCvxytm0F6#Vo&mDw(MNgJ1V&XU{y%8gl zG_FYLtz=#dEy5SU3T+NSFrEe0IK#7HH%=m87e3Bm8<`ellU8GlfC-F+zTz7(nK^7Y z1jd;WhikWQWhnH*7psUHAZCbrsdAvHEFBXu-{DqbV~co~8-nqv;Nht}-&%Z>@f!?X zLz(J3-o=FWxaC}-a*r2kKoa&{{c?}{Hy~xLrU5Bfa2k-RJ!R2=v|40-7>upn{~W%- zf%$R9w-A8mtML|+&i>v);1#{Rw-6?8Yhs4q$PHX;cvDY!+7=!>B z=oi^OO@C*kl1`;`v@2w!)&fC{)r+)Ay#4Sg`Q`Ax7z9)~G3jWD(dGdz!OIhbfnZP( zy9AUlH~@tYVtN4s0bGDeYV9;{UX0%n$UW z$U87U&KOY(l(||FwUG;nsO7nGW+Sw>MbrX979(m`i_t(@WhRn>xqbf8K=iL%G!Scb z&e1?uF6)oT{pDu;VN2-W>cfvQy%@NJ*U8#CwM<}r+iuY->}RBq`Eoz|@sUy4ax#pR z$ze4NxRtu^!u9~fsIj25einkUXNdsghB(BaVv7)7lvc@L4Ko$K*neiNIr==G3JOUl z%JkETfP?@#T4=BjMPnPm(nD*9FDam*)l`EGCNdKZ*FxO(GrrZIf-xPd492ajd}fOQ zjD=-n@FhqE3}n`y;$xyUiL(#J5e}wVaxzklF+Pgb(}WUWU7fk;FDe=cuFQob8opZ5 zK=41#KN{$YX8mEU940YqN7kQ!kVVs=aW<{1CcI}e`%5o##4BQ8#boW=Kc&ogrPRs8^YYYLb5HYbs;F&3?&QNmM8^zl_S2aF64O z#hhglAdC^8AZ~gM8*f8RW28j%R^8lwGtjZ^l+DUAtGQO# zr>6b5*b$~|^KDm8+{{xx{Wx>==IwAQ7s@_=uAWjVP-|_K`H!&;@wm3YzQ{Hf(Y%RB zo6yg;F}4<3V!wgyYnT$qriN9!X=#rUyF_VrHLWkkD_QW#Y{NgZK^$H;mvc<8s=7a#y3xF{;%_!C-W@6c}kIf zo!>k&+u7edS*!NuIcrRM2|$^dF0xI#+MVo`S#~6Q4U~BeOS*e__LAYRK=TGe&1MJ)0#U*I{MdoYKS(l9rLdHZPH8I>GXeOnL*qud5z zXU3ogRVzH5goOIUqG>)mp-c@^LdjI~)(Ao-{`N6gEjsEl%b_CZ%c=-^D9^FT;g@pw zQaJpsiP==?NMF!4laCv5ot94Yv+%W5k;ON1dpT=u!gbuWOpA?21D1?71942V7PwWL z`;M%4=KjY%5eE|=#Q(y6-z+iU7{h|_?0{h8!DKe=E1F(JB%+WAhwB0PGQgb;l=<4x z-FI(({N^XOnXnpf)ChXOQaR)cXb>{|+qfrPV{(>tx>3W@@(UoW!4T5v)?U#b;Kpa4ff!P3>pczOrKDQPGK+qO720jPwNPfV$z&t%-P(Eec{Vzj_HOOG`aByU@=LLH z)-cyPxPldw*3I#(^j{rNyiv%PEYI9Smv#m*@kcPp5f~qS=f*LHszwt{vU`$GhLS z^We9?b^Cj79<9eWc;x)zBqrx@-3MK1M&j=RbPC*&?3{k9Bn1T2JVPI@3@9h79cakn zi)Ku+j71G7gI$d~=uMZ_Edjh%FyK%n8lNSLG1dQKGXn4gg1pl)V;&vCOjMW!O64H!Gz4h1wOQmXXC=Ic88w;WsFRA3R~0N zsHqQk`t43^i(s0mlV+W>xvkFGP_`F^ZIANocnMxe8_!hwBWLc1BWx_!kQ z)3xWP7LjNhhSYm>36UtY-xo)s*jn1P%S(`{z(*`38EM(@YDvgK>|JYGq^^D5>|u|Z zVOCCtF~eF205P;i9??c=2?80u8XMku^b{A2PzFq3(wEBQ)$x=uh=vx;EtpKq79$Ed z?LV6tjc`P0^48JKf4g`6XJ7pM|9$auCl7z~Z$A6J<{UbiFe59~CL*9gujM8HkG~U9bQJymr&49~^M0u_n5>+{oC{Sh* ziLMqC+cV3yykrJeIY2p-BJ--XG;9k#Jd`4<-xG-Z;=zZGM~~4yVqP*|e}yc1mvX8V z)8VjHy>|C9+b?v{912{FyOs*WMjH*rnCe=x+@rbq%>qXeX{|C*Vw;IoCTAtjf-Ni# zz}_#}R$GX4U4e+G1-z1$j$@GZu$!MpKqn4(|JILUj|q-JK7aV@-#PvsGccG|JB{pM z|1>zJ;UrN@%Y5S{17hM|6aRtsEV4~%V2V7fEnXW9$$K!&SgJ|hOjs4*~GqfUFZ(?WBeiS7AqKj*~ulhWtpI}+QcT}*6G>#64DnZKMf zu}%BajseOvkK06MQ`3MNlkd(}-~50a&ezno#k8aq%@^ja9GTVj;?oRjnLf=dAOogP z6DYIj(_Ag)y2&ita^08_au&PZL0nzTb>pJHVuWI7bo(F_r}HWiieyG#suj$(jKEmCk}!kByH710!R2D${eD3*50`L*PnfG|Ix3BX1;j* zl@Ct79%~JgGaDF1GtUk}F@rHL88@!)ET>Q!Lmo5(>|=cp`XCsfjDbroz8&JRMJ>jc z0cB{xF~C-UY<()gI*?|f;W2AO;OgJZ1IaVbQwPY7a{gvU=ucb1G{;sPLx0wWv_A>O z(0=zpC`R)t5sKl;?1@ku{i{SM=DC`L;y{@lgyMjZMMCka;_>eYmBZe3QRJj^d(`8ex)1|FSCI%>jZALuzCS8 z>FXsy;DP{L%ozh$W*tPm;lu!3>}%@Kp%a#Fv9g>*sRIaTB23{^*KR#vd^)rYpaqd2 ze|7tVhmXE0n)%rmzwq(>Km6vM?`LwQSb+G{8ri7V;Uz&BtBg@sEC^R^#y@h;SkcL1 z;5zJ*8Cg;=N&%%E;0qm44u%<>hBZj-RPK-?(MKhHpA+*z>u>T2WPsQ@BDG7I4w|!< zyisP!o0$x^d722u-d6HPP1}-Zm8JIk*=(_sTGy;T&goR>9oeHg>Yo#l?7z%7+w+bx zy|aTEK_r_|b|%>iOwnZ;z&tHr8D%;MCF;oyg|*k`F~1U2kX7JJcqC`5h{?;$K1 z?Dn+|c10~2gIGo*{_xZx^=zt0My@SABCSH2K}y_{brL`=nq*4(1-Q>8HL$iT^vNs3;v3fP zt&s&B!E#0jJw8DY4A_*usq@lmj4{v&$YKg2IlmfaW-egaFq0JAyx#k+YNTcKP!{_v zRgK_59?D{$(R-M+n%=`enQh)fpvf*=M14BjFRjlRYnvrZvXBC#VT!Lx-Q)9MeTV<@#a zCWn9W_$h+G@y%mX&So-37=AD0f z@78~5p2_ucMJ$DArY4>dyRe1`hq20}PyKL1+!2AM`DP^ff;Gi18Djx$?mNa9I#C+S zhQ7t{)A}6NbO68|%7LZR_b?Fox!7p2B3}|4tqbFw2K(6w?^ zt-&<^T%+mD=!p)VN=`h`iGx+DN8Dy4Z`y)m48~4}6eAqE^MP{M^AO+r?So)6v>1+* z)}U*}Ae~yy8omft88+i+tRzsA*J0bx%3=rfK&$^~W1GpR?gCR#Dl%iP-MSB~al)_N zeh}rg+Yh3o{rkIrd+WjPR`U$;O@TO{-2a1rIe!1|j=%k_JOA*F;~)IlXFqxO=1;HR z{O|W}ee@T%Km5*}Z~yS*o!bw7CjjVQ?_PiN(_R(D8QmDz9lTu*$1<>q=C4ja+z@*R0iZS9vuw$(fBA;jE{s zVIN_4v2FQ6I6QsrK7u4+&NSE(xRxv)$%dDfXlk>_WIRDMroscq&_;;6#wSv%5w$Xq zNNB&hT_Ps3bH7&vD;QdE34vqsskA{bD8(yykpfTxQ;_r-k5xv)Oircs5UdmV`kjCO z=aauoY&K9vDb(O!Nvu-_+;c7COn*W)bK`WD;aFr=+U8>37^enibQQ%%kM z!oGTWImle1NTb$H4ECJ3Ta@$7vw73l2NB2D za@m5Rn%u5A0VgMEwV2jcC^NS`q0D@%KBTp6J}=Pd`8#pbUM(lCPxkXUaerUs2qOow zXsEBzu#@L2XVc3nt>^lNt1v(%oNClduP14e|r9cZUrIccUE_6$}ByIC9cgxZw-AKU&5S2}VB7!2I zxNoB~qJOw=qcAw`&M3=>@%!czKR)w3eRI<5`$Bqi@BHS>bDneV$-U=2xzG1}f8XEt zm)+HKdsYu`%{J#}n;E_x!e-NO%j*^|2+KmIDck!L=g(i9--TZ-TdpbRWFx1X16f5u z6S+AFEeh9Z*aY3hX9S>xCllYu#~g$v11q#8-ZBQWT8fWoh7j45PmZ!*(Q^i6(OmgQ zjCuOEmy)jp0^zCJ+M>i#h?oS$x@PgBua?r~Q3#{WkvD&Y3^+Iq8kfm~4mk5d6-;8LD|?01}p5DBJE522a1mr!Y@Vw$Qg zQfJFYSjn=SDWgq5wv0=Kkt^pqXPj&;oLgsw7KK!@(2DIeDypOHo7MhJY2lRf{Ap+t zx9xXTGi6a?oAPYAv{ty?!Y}_J=Z%Wr^PCDZG2e-UJ)yc-8RAzJP2P1fv9eWSansWB@ml0bC1EX3gxbb;G$0{cWcY zx12G!;;g~tXAduZY5$Ec9bC4lf92`DD^DF{`2d*V?OhuD@*YjEfe|J7?}q8wXpd1J_$m{jb}ynI*|4a2uQ! zx6867pbS<$Okyx&ql1H=4wwcUW2yYS)-s0x(EpZgBk`7%v1PjS9s!OiQ&EU!d?vx% zO4KuO9*evLDSP24VK}$D?8HF;e z#H35gwHX`(8IuYoORN)AM4KmKvM|_PM3XCa5zv(I1wthuRg>-L&_QzLw_Vv9d-_(0_ulJDI-h&o;4_NH2O3ZCP?v~!exAc#{y!X7<_f9#t|C&=~ zXT?TPHMu4*B^@YFnH_GJ8^%m;&2S+SO_*Zq?2?kc~pE!Roz+kj2ox(sA-<*I~;oS=yW(NvlE1E16n5DGU`r;!o z7Goc^jRJ_Hq)`CKedXn*v-!E?_I-W1fs?QD$^r<>w0?MEO zwR19xiUjzEH~ySZmMmq`C6iJb$rwv-a+HB2jdTmhCR<(qH{QNq;YbErzo>?Rj5&DD zXzd5YK*n$gnM;LTGEXpun^`~H{_6hAuNj;$=skF0`>MHHRt>hU>fe~iU=+h`qe%|U z-kjZRN4ve=w{7b`{s5OiXutCQ^UvyEx_Yqi;@%>dhOOEi<--*e^8|ZRssvIe1is*8%Qc7T#qx* zyk8T!^?UCmmsBDEp$vH?$QX`VWF+n>;Y$YLOBBkCvPkoLvpr+>+ROSc81^0%Tw?4T ztlGEuz_;xAmLI(1VQ=66sCWI~;}Y+D>tlZSu8{&J^SAGO(C*m>1kD8NWINwGZm##h z>-$eWcW~h;gIh{1PD03qSePH%qACloz$iKbn_SC`8fQB+f%%k3pM2{b+*lBdUcfSB zY{j5fUxRY+KSVb}2Low2o)aDhDLN@VGL;pSNn<93SvnhObd)Iix|g~2vV+02Iw7;V zOr#TXo60xZ+=RQGosfkZZMuBiu9NM!?I%+JYIE=Sm-jDP zH|VPxCiq1tfFc)GAv2^fwpqvwO&IJ<2|%%LHZ@<|;jl8ylX41n>wdi#<*X*~%%}zok`eOVe^;ipY$Z5;DuZT29C;e`k899;r1X_14Yeo*>xim(OL+xWUj*%k@%s1V-O)fs!x=mo;k=Jcn$f`7wGu2MA zrFVfHa7sW!?_$;%LYc7oP1L>$Jnb@=F=UK(YKTMWPQV~1ASngAK*^Lj4(CZBDeTPv zV}AJuT3%B9FU z1<<^y_reH-rHD`ygQdVXRkDoG@lP$V_e5gGvadw$41O~>BYTJj+US$`MED3K&s5CV zz#IshNfc3e2B2*$%uXCCZQI;0RaR97(*a}UGEDM3w~mekV{y5EE7~=HL#42+s;eMc z)tyq-)*`mGOKIO2+p95I{b3xZ<8jb36KvbR36&tD4bQCXcPlAmi8ESn8+R)_r$oAy z5V_kzx)#8-LXfK1!t1j;j44&R~yZ$(>nS_zfB300Ykt4vD@RG!W{xwnpvC<@ve zA_(bpbe!o_9p@_Js_&3zuJqvOtiID%W~B$m5q9v;<9?qK^VK`6P)0t+r@C_W5XzMD z%xcwfOrZ+q^kx~5`ew^|*77mB;gxnWIW6OoeUX*X!PdNz9=t*LJyy5h@ZEJ=j;6i0}shBx!c*A9b6O#{$>Lux+a4Ml; zLcoAvf=&P~ogrJ3;9EZU?&Cx1K=5Q6sPxMI`6ju*SQ)De&KCGmX37XLkPRuhOI0fa z*eoQ{c04ebN1rAD4NMFYY|u=0k!Jgunr7k|KsBYqkZ8uXT!Lc_qY0ia(oBqjCTz)& zGA2Obl~>;M>|4se?M$v1yN|PP!86Q5i4|k_amMZ%ZFn``^IO@qTAAuLw*1pfXR{%> zooczYXtr%Olvrst)C$6FZeFhL#Q(F|P^-3UZ&Zb&%VbdXnHudmt?0N_zqc=8j9ado zqxI*gX?m-+X}kO*R44@~Ig-gILFdtFIoHV=p%;8m=`^SehLB<>H%SS)(ED#CkWN87EfyGJIY0v!E2hHUA zgWfm)z+gk!W>UjFem3w;wg4K_XOwE2X%fnaW-`c~OlT*l!kQl1W|t5u=~AdOp)k~x zQ^us35JjQwwJ_TRlL~RzKF#znUCeeIF(Vn{uFpJnc|=*ZJ@IBkGNY~NVWrtnwMc8U z!F+XnqXiA^eaoP;*%0CV^ys***DY@IQf&&XGUcj1Zm-<(>*d4dZn+f>Y9S+}w(`GP z9hiZY>1+r;)A{HCh}uWTCFdyVQ+4z|I>5fK@}tAm+D9kj!#q0K?R<2YBq~JJf>iHh zr5bLTGj@@NIpd?{j025fN=k+?hxEkDe0GWKdI&(H&u^vtwe-4lLX(ooAeAiS9mp}U zs!_yC)e;cL6p}(fj-a%c%w7wrv{ zcPG5~xONsQd_A)S60O9?C{sh@)E6_IDTZ8ST#A8W>dUT-$RbO_2Qg0UdBfG;d9W|24zPdt1?BxAraVj3mD7U)(6YwT8NhUF6k zgL(svDqDrCuo32!@ai?~lI58!3>83`30`3r(TN}iymG<(MdFyjp69HaADu(QrT6UF z%ZL4Be?~Yax|W}Q|1%*`fFP5NpqX4bMNd2WGb1#!J!s|yr_3(|%2<+Z(@OL`8PKs3 z39w=s3$rt6aTDTbO0_8mOTQ{nqw;Fd%m`e<&>Y;_z93@}49X{vD+o0~?Y)Ig)L@Hm z^5h7Dfi>2|mB3ot-_jY+ERvGpdu2(dl46kapMLMy#FBf*Iu;m>gINx$7u1O;jmp>Q^w0?KqMjb^I-%G}1Qw2y^JlQx}{=rj@bXp4)v+A=c{=F^&n ziEv{1nFs@AI!%Oe*Qj#m3C(|biR$aVQ2?z)xN4^EWjqmltb*Qt586S z;Maf{&DdOK+k{%PMKZUwf8%OG8gQ) zgc2e8L~a^fHRyc{G)YRS!?ipn>4U?hPD`mc|K;)bW`fQmrnUc@eaxxLt{&Y${Tg%TxSo>2kACn~* zZDqfmCc-n7DPeUv6HLxjg|+5W$H`QEYTH|1DzjR>ONIL?lCWhOE0j>BQQU3$y0&cvO%);UwV_f5qut@IExS&>`?iOIV`ld}D;~R<=gf_B{hNA^A+Ho1lbWM| z3}MIg&`emL{6k4&MOi$O=JdYdwSzO_DXb%K0;EM)qV=L8o5rqa#;|7-_mo* zWY^C{X|}3u#J|}!)1-9}V;%#Io{>+Pnq+HjHc&>n3?Yb-Vw9Kxb3-wLX3Q>C#H4>A zUC-L;-!{cxy~{DSS+Pgkl4iH9{6|7{oE#F{NK#IY*gbSA%rw8z~wyeFC zcoLQIeL_pmGN*H|H`c9D0;cv}RnXIGwg9O7j9LKa_jdaG6XX2-6HE5@*RQBedg|)Z zCOzR(I{p1;DjjI`pp#&#Ttiy7-!iFI(T|cb)q~agI#(Q8`$!2nE0VJX=`BfB9&Ha* zo-00}Z6?cS)NS?NFpl&?|1k{{2*=C71Y!yHT<|XSEzP*F`c>y!hV;IC453c5EI;u* zn?);IGfifcG6{S!wN$y}>5i{|2?I-(NFG5L0AdiXGPWZ$z(uWVDwrTA(3G&Wm#l{E z0xn)W?=AZt368mA-(z06aOv9lLpWyb+^tvlp9PLdc~Ni-#xTX^Oihe$u?$!Y z5@kI|Rm!A=43k7@Zic9nv6iny=7BGm+@liJNJaw2)DrbFmMHQQE)vTlX$}L$tkUisQL=%k`^n+Oq2A>%zf|8ad^JfSWi1 z|J*&#xoyWc=7&kEgme2B($K<5cOu&`*{rm*_XRFX%m`eRtBZA7fuJ;G)d_#e0uEXv zEeRMsU3>QmHp$9#R;|x;`jwerYW>PYSl)sv>sdxs&^wNF zY12JzBBL#bW85yEZjBbrC_QOiFDnsG%Qv(H%sACB66x|?s-h@5^w-?p@%rm*myQ0K zihxf2wHnFxp^|j523z3bD=$&{m6;Au^XnklQDV-Sh0X-1Z3hn1wyhc~%!ghY>oN&-2{eZn#M-h9i4-t%2Qbmzm9u}bTut=F#Fe8nhk zyk=EMmjIfGeA5OY>`TzhwU=i;m}X>SlOHnQmGNTl>#pxVW!>D!X$JTbOasXzRujV^ z2PVyACvC^xNuZ1$0c=g#gggQ6L^K2Fl)1^61{5e}w8*oe0e~iq9f}#c7Uay*U`B?| zhfUQv)Jq0Fr5Ma)oUisp!byK?7YTx+7A`q9 z1&}N23*x-kg_X%VCd*jV%_xg8C4s#!OhBoRF}q|<4LK&wdiVljU?oILF8CY2xaLnj^YYLB#cTiJ zZ!h`#zj^&%{n2^9_v;&zeo9s=9yVLv96&>FCSv59ckbXKcqYWZ;23cmTbq6(ni0yB z5@2-G8*bm9Ns@OeW;D&qJa|Q7#t+dBS&(faSA{a8P(($2QvqL0Jkg!B$~T!~62t(+ z37Q!ANCR0IkW?+`>Ltn-a_GLw7ZRQF1?T-+)CzlTx7wmD6o|`gnrjqU#mf z+*9k8=$7DT8~1UJd)&QdRYB*Koh-=@X8@k;`h2(ekMRCa)+>UzUwB2p_H}wiw6b5> z7q9HNvXDu*t74|IlfgNr=)N@IE!?tOS2bPKG624mRZEQN!<-pu0MZ#`L$b2!weQjk zl!0r}(w9XV9wOsY@7xbXv1#F^H}5!Y+wK!_j;Z46U8kNryO6a%AZFeC&P}sh&Yykt z)q`g(^pA@}U4rT%Qa_2LfkLPx?~|-k_>};ZPC%2RVQ~Uk@{OTha*6oBB7_F=B_q)NnU3bx74Fj!jaHxdEMq4nGJeOXDy9fiKET>R+qWo=Q5 zzB1!{Sz%>5eOYHZ#h7{qSDtTb8V=J*XIy5A!LgQ^;?r6}W-1pv)-qGMSDl$D=ycvn zZC0R-7z;q=HB_wtjm0CJKrcWGXsZTHBlv>sx9G1#0Sg3-J$fu$LM6l4MoVf-rDu?) z;?<_4BZIQblC?R?L2}4K9$1+*v%AmV@x}(hVCnna=Ph2kc6Mj@n6-1ePMh8Ky5Xj+ z{U^?Ee?WjsQa_#H93^Y915@qGzn)Ds)nwR<8Vy)n=m>!1t;#__mF^? zul&ai2afP75a$b9|MU-D5$Q~j5cEvysy5Bt5GZp9#2jiVMXlCoz-`eB*n%e68l^?K z&naA|4QKAQ7QiCQ1l){c8#76^CH$;Iv=nG&M6_@S>Q3_^(vi|LK61)_Wo2~I1AogV z@+7PIWotXh0xL|i9SY0y1lpl2_skTqZ)usSOde~QDeo1NzUPn2OaVeVoq=XL9CEqJ zc!ykwwJAB|63fFO7uYu?hg@fl&>^?tdySTSYAuPJ_X^G%QeSO_SNs2=O_^CeF^WpWrNWAtT5`ZsQ;i-VJ8xf^FK$)!Zfif?fzotYm$u8Y;>+@2(^pd%oR}V&{MVes0 zdhp6y`j3nfC0HSOpJ0Wz?|)R3w!iyp8~*GM&-uGQzwmQ^dC_10@%e!ufhOTsQco0o z6OButNluRCOtMahX<8if<3Id_oI@w=?X zkl!(YhEgUZGTD|qjZS)Gm%w~F&EzO{f=n{6o|+t!#0+EMW(h{KRrX7L6DcQrpRt)q zz`K}oQZXYk_5t(Rlbdm?-b)_=5WIT!d*LQ0=a8G#Woiz&0+i+8kc-e_st&nror*JU z{izq}bjbCnhbmdO+X@N!Sz3u=h1=6vAoui$)>niaHvFWYXXSOI3>t;{GmVvDr<6fy7LyzD&?`$@RuH zi5hHXH2f`vGJqKCS?uOhu8RRN_9(DxfiC+dnAiee>`0&^9Ep`I-jV$RYc|c@7~{J= zd%t~t&k5J=-f-cLi(fLk?Vu)RceWenhgS`r6Q~j1B}7X=Nf1obDqs4y%?G}G&w>B? z%z^*@$13%c$$$I%%cE`yrU{@4^r4Y;AWKSzCF=7aUX+ zH1pcQStl=y&>Nxb7eJF4a2_O0Zd$k*pbS`$l5C)i{U%k+AXmz`ERVN~ConX4l%Ajo zxEX+pgbh$eT+5@985>-PY06-dr%w5~C3SjL`#g)n$D|CHpMbv?dbMTg@0IPu{k>os zmY=^DGp)bZ(gd;^ZL|Ve1T?KcR#v7{AUo69M@lHu_K^aO9(fv>v6Y2zzx(`tT8KvOx&WL#FvVtN+5 z0wrVP0yMv6buPJvvIbiygG9yz6PQMoM#idr(Q{-?jgbtfMXNXa4GCowh(s$xY0tX3 zo#!lG8O`s>vvXAXu<)l|>5ReE+xm|O$7CC3CBoYg|8az0UtA1Z6VXh{rvp~P=tR}~ z@ee;YXa+v!p7%aINvOb%;Fv%VuKfT1`u*Q}39_4XxO~;{g8W8gnkdgs0AGZ9cFh#? znP$RiX2ZTag)-S9xaR&_1}{&B&e!0RwT}T~xtTt$!LmUW+0{R9=46RDqA#*Xm5(od>>VtG5l!}hf#0^-OPhge44Y5zFW z>47G<(|Vw>HafmuTf3CVlE(5zS7cckqRcMYqd=*zYF|=Ih+`1Jlnn}ULeY9D=g^%%5+V^_ znf(G6dt7Ii8l~uC&YrvCrv77h^h2wR$e1LOmWV9A{Jyx@g?b@5mE2Q!onQOZNvU$m zWyADDTQlNgzVb&0CinF_zj6xcu&sk9ojH3gza4^@4D|nH%zd-0$z+`L%*NYCx+3qh zOiYQ_F7V1^u%w!bdh;2WR(q9xM= zJkVU8CndW{EN|IO?$rbf!k4$~CX9P4GtgtOmE8bBIt#*QIyEA>%6N?kTAA)H$}1WX zU|)wuq^4WD`}ns|ucUJ-8=~szchc=)q7@;Pmui3J&dRvNk}KoNj(VlRqx3twmUVCi zlS*#OJ~;6Fz9Lt)c$kIY?Wp#N1sY70q=uJJWVf`dlQ2vlu<%^17_ z>yY(3lkgCQM&uAHld!bfacP{i`UMN)G+z&xFK50K*o3nGR_thSi17i zdJ_=iAoD7JN%@tP^Gam22vX}^ie><{h<{BvC9L5mMi6;(A2~S{OnBu9smq5`R;FMa z`wW=(|7O`*azYvr{$6!=QC`uAAob|fhO%roYxuq@x!U5qWp7C>9v zB!b}(gQ9T(MtLCbK9jaGs5BEfp^{-PZHYxZaO^Cx#L|k-filNV@i~Jf6rYP)+TwGC zSryzA%5)Z=&vbT>%2md7kOE;X*@7wCW5-nkCKU0%?@NER*(;~dOJ3jd`TBOPI<@b<=bd-&Ij7(L&%gfluUS*sHCZrmu7)j` z_zMn{G2q*UFFwE4@{q>oSB6GF(>y?%OWOSw%at~05;Ko%YOrBqP{~;N;#eG`K88{n z8G^Rg5^JqcM(mO;L0)MBWma(v3w&03ni6c?apf5c2d9`hARuK*H~-gj_9DE9%^e6P zWC`k-C}tuYo(7c3VL$SL$K_irU3RDQ7Y>kcidAu2(8K^R7kndp$)tWfhhBF*qM4|X zIK39YgJ#hGD*lyJ1JH0~^$lXcZ4g8YpkYgptn{7{5Nn-R?ebcEdaLMaS4R=K1~a~u z*js7nK$)2@`KT|sZI$bptPOK`S;M0h8h)g$P|Zb@R$Lpdt&o~g4~~FlsI3rCX0)x) z+~}3gQHHKGQr6Kc&0Di8&AHkPP1mO1Knh)vhbm{RNWiPdm9-yu#2|;6VS}8+R1I=Kqnp7XXZqqN zVBe7VNmAX1(F6&mR%ULOY_-5rGHz{9AVZUZp-C%38DUMfxTR&QPzIHZwM$gBWYVle zr~Fl!kp4JrykAx+Z$-CdSbt-(x z&2LU6R4ixmThjG&WEfAYfP@*RU_C}nD!F(p*{W(*l4D5MzM<`2AO z={ve5Ss8qO(_m6+ZE`iA2Lq?FThYvNwkW|#L5hGW$;N4Bw|XXnWhfbMMJt=ymt>Lj z7sxyu3^VP21fmsquE!Q!dFBSU1t->G3qEawoUDVJz#wPZ;wMo{6+hMIe8R>BqvEHz z(WE8`rkd3BV{L$>=0ZlE=?j(P~saD0)z3qVAN(yA`t$KCY zpnOSjjE~MtYHKD3LrBa7%J8J_nwK&82=y`e{346lEd*X+fBBfUt8>#6k?jPvP;AVy z9Vi1sbHw#8r81eNeG@LzqNkfei zbxaU503BEva!eU(B%Mi1fyw zHoEmtoimE`Nhz=xF)$;lftfEitbrL!!^SZ%OKfBVv$ooct>wMdz)U`6#K26q-`Zch zdIs0^iK5w>C}};RTMXU_JbRL0xHWkdBM+RcjtCtgoVszrYRFMpGX=jXlC2CdmOU7h+GCbipZG(%2mZ-ZOMvK_IG z9YEhh-hhtR?hOd++c&)d^X}Tc0lnR;H=wLc6&iOP37klB3F@v{`FOHND3eK5GIm)qSXo=6eegg}sfKdcPxBwI=*gTq%Y zUD|%vtomsNdCSdjpDMse)lz;@^uK92dCPZin(FUL8Y{mm;@_hdF65g+%%K0(PDa?5 z$paf)m@|x4#?y-nFgYeD8H%yBF|;KUMNCp|49Foe5Y(~-zGQ4kHsY8J@LGiV16U`R zH__RG8*XE18?-W@cHT10)DST1wT^{p*!b45EnU5SZ$Qt|+PwjFC*L={0oiBm-hd{U z{JrAls;p|E%&0fu+>q|FtzfE@K&$_#H%-;6c8Qn))Y78by=L^3mm9(8iL134`m0Uf z=m}P4$mmIlfcs0l16&Zw_}AQ3p)Cxt9vkMr+Q~a$OuZ5>;by48Rx9Hpd#j8=^UGwm zf|~?>`3O!4CxMMPg*`59K%<}>{yVOmk=|YM!^kQ8SV1yo{eIL0Jz}% z3y$d;OxmHsVtd9dMTa;h^ORu&Tr$JWmX~HNZ6R6fm=0*r3}Z2h{g^UY*XdE+WuodX zyEPl>ef#HSRCnoQ^?0omwI8hJBWmuxlLL2-7|hhfLd9q8xO!N)f9GsIpndL1g;ohv zsScvD9WGCuFr#9%j-aYSmMR{o*S8|ef(uK6rFaB)1VqKGmF5@x(JHuJmrPbwhL=e` zCEHE}B0!%TEw$w+wbWMq#~moO&3LHPwl2>t9;(k7?pY0TdQNN@Mb-cOev+DCRH-#mDnaE0F-6e;Lr}(MC2W^ zGJ!JM`=WBiNM^#pT>ny88GQYpweZN)V5i>ai=Tc5g-cWYmmW+>FaDW} z=gk_zcE(z*(VkrIfy!ES7KODVfl#Kc!EVj*^vC0^$yiu}P)5yfa7^Eqmd$Bge2H>b&9=j!Um$3t= zB44ZPDO|D!8+RF1;oueCMKEqhQWH$vW0qk%PG}RL$Bd~`F^zy;MX;grH`^jLU2C;4 zNt4Z5Exdl#%8w+JnXy)TV69p~aVv{y+Xf7=R)COE)@p9F^-qp6V8$&R3~qRN*HwoVi`B>^LV~ArM4&8q z(SD}Lg-nEPeGtmP0q9u*AAqlkIOafc%=}Ip3}q{bA(=ASq7hk@{f3{g7<=o|%B2hU zixl@2H~w(iK;9v6vMU%RDGwt>`Az%V@(ndS#;6%DL zWt?6I8T{Gn9uhhyL=Hc)Mkqsh`O_DUe(dEhz()r(V}i*t^}MuWwq7#n!6XN!um-t| zVZl5GGm~pt%IWPZX$f0`l5Fn{18y$^TT7C161XVU;ua-TeYN6Wn=uJxY{pcczSf%& zrs8sQwEn5?G72*GiW84b9%fEFqfR`C2MQM4IfShNA)`(_bE9HdS($Fn&ZN)pIctR`P%;VmhCmsVB7rja{KCz|LGCve zek7d=-t5rZCFYiA#37zzw{QM_R{npnm+(V-3tDiqR{&j&e z0V}tB=RK{jUCdzOJ(DI%K`k}FH=q6YlLbtp^v|R<_htK^x_Ar~OyHPowcC-HNpR9I zm;vIX^`?!oRm|w?lX069B-Y+28#5v1bs@5Y0k=?_zO)k)gRTph1$TN_>y4yml8v%! zuiW*EVPP6tUUt?fyNY35i90dutWow*qim~F-AcoEB%EVGh`+Zs%AOm&R5{9!ZW(K! z*`?|()zA}zX8iS1B}Ok*#pC^q#~k+4t7X+jEyJsMsQQ4_vP!;H(B8mHC(Bs2&lxL~ zDn=B_I5~N8RWDf@^)a@GpOlP388ZUDq{ucitLql6mlgwMn4ugu(Kb)cmNAq}w)R~L zc7co`SWvUIg(PxRO0SW!<}C)g;f0c+{q+$y+=yfZ)yU(Q&kHLPDD&s9f9UP?dI@BC z|2q#2@(5*;a-nP!K^vi4k|7#u;q;9!pPw@6^Pf2ZPf{$Yoci#4j>?R{WeCk=OY^2t zeewI=aY&k0F3kVHiAyKaWGY`d-#vqDg)cT{f|aq4K_aY-&c6UhpbThI(>y>-&bj@V zxSFP%RLR&PyA}UheeGB@qgJNv{MF`|sKgd|i&tb8+y4l%HB7b{rS&%?u{w3AA<0Z7 z$v0MuZO(PE->F=m zI}fo{j=MylpP$_-CB@6p=2M)wO4GT|?P@;7CEN#_Pq|%t^C@rlO6D2POETSpnfa+0?DlI;uBI;iNhk_A>Kp-_h67cKIrd?BO66MxoAl)w7p31!TN5E$2L zkz$1of?u*KN514nSeZ$_2`DrFLovn;9TGgTb~5HmpE;dOP!d2b+Auwo0-}g^>yLi( zs~3coiS6&7zV^Y8H&8W!LG7U;k@?%dcx1ND5J65MZ$>|AU|9~B9+va-cRyzN0=_I| z*bp8WlohFw%T#YC;Ik)n;lwHB}*mO=&!uxVZ`;gfgQ-h`G_Ln4=6`MdePj zt2lZUxrCcU&NBVF2326U$$pz%VxQWx2FguNE;)kWFj&>&>Rok-jok zFe&+xdPFNjUMZ0oaZL9(v>rJNEb?ZOvt&CxIg7I2%^_#;gabNivOfU^e#Yqi~ zO2y|!?MygIwKGxfv>EJ7rY~NDgxn7OTRdSi33fphVWPppC5v2CkLr0Jq+;JC?M%|5St!G@N)2`fYCgm9j*<3Y()N0tb|z^1HjSOhP{GcSoe6_cI}eegUDI*yS-2)!nL)DK2YN@w@K%$cIR4~=G zrpr>zjaJR&C__-ldisrDHMbGGp3r}6{HnPP;PnJV=4DTPOQd@!(@6wlCfhO)!jf!Y zij~+(GBd-%<1;iR*+vjdmND}MqM2-^XS9}4Lkd{IR|ZxF#SEGlR#rs55(#>~QJ!tz zB_;!3kiH)A;+JH6&}xDybv=hHZ~L`{hXz=rs)&5hXlg0KUKo@v859T-l}u2MfQE!o z>|xp;k2E;>to+7*{D&g|GGT5);drPZl@w8*b?TNgPPsMCJ8R2pe(%SFX4oe?M5D83 z3!Hqyz@S+F9lw0)W0tN2zCg?X<6vc|Q8xj{DFq8==Fk`2fWb_*7y(Ptw4Tc-oKVuB zb83t239dVGZ*Z;dG8y0s?LEWYm8~IOVN5tyJ!7bq0izR+wU%j^%f4Mq$@`QQs96^i z7|c6KbkDSv{dMO(YX@udxNb3a2j1-y&1!@R4_Lk$N3N3Ln!|Eji%Z&-g0cJSj9i6B z^=!24e$A#0EyR7ke%J@3BV#I$QXj$xuGFB+!w*@7)m6P9l&lFR6O;+Xk)Ga;&XARH z>%rY;ZqxxfM;Q{mlj7>o>rC`c)VGjGw|IOedLL3!7a1MlxOwC%t@YZTH3_>f!PT?v zeSYn`Wb??~QU>r!W>}moSLwX+crI_77$i_yK+oV)qD3AA08qy45|}0{YgS^GUT_Q% zC}YW%LD-vBcRd2S%)Eg5%V&7aHLck$xwrxpcIaRe{qbNBP;AWQyJz# zCrqlIX@QF=S3AS6Q(Z?QVB@Rni~)6>^TMz4#hb~FU#~hIqcbHLRZ?@PnUdPXrIX;B zA-`EH@j2?O`{-f~cJJ z%r`Fqc1WVcy7%Pcx19F00FF>88Bb8iYhUpIq%&bq-t{++QBWM>CkP`rBfl_}Xb z0fHgMoDJK9>%o(koItfQIfqDRtP!L7U7MfISB45E;3?u?CEi?jLW++5TzLyhhNhCO z^4D8V93!L_+^_|s^HP8=lwpRbS=WcJPm%(Z*-(-cUT#213hUs8lBBe}{wRYbbQ_hV z)C<>v9%d>(;ssR}!~U`|L#t=oJ*n1s8*`&;Fi@th!4hk;HFzx|aFF{NMc^~PaA04{ zIhkN`|JEohZ_y~2@+Fj#n92xZTK#W=1QYAZWN^`hq;bZSQvyoH3Z};3HE2cwP2kHF zKpDFarXe;A4Mj1ifLSS7GR-bohRvdjdP8xHfjvJy{d)EvdBctBMO^03S$x#W_B)3T ziPIen%Fw?wHwfc`L^raSKYry;p8bp#c}#H3iBH-Ru}h#y_6$Mt?ze3XLLxa8hyz~| zf8m$C=-$>hB?*=N15g>Y}*0q!5CbX(fh$B*AQUhz@J7H?|dxUp)R2FK2X|@J4Q_EVJsg0d0zcsoB z`xRO)r{v|=rFlYo$z zacN`=f>CFRN(L3GzA~~hW=Rqm3uPcAU}XR?k&h&TV-m+LpEtj7_rQzjRDuTfT;!Y* z>!gi>IYOlbHw3$MP$o*3prQzGgFLcLwGph$CqH^ZAWj6oG^~#4%j^H}XK>OBG>O6{ zluX(!z5K=Z$#GzJNHd-EsRCHm1!6<_?Y#p zVIK*YYVZNRsRkcHnNfp}xvm7JI?1Y)sj3>w!K-N!+YWH-%c>fX`x;d>iG5sE(^^h7 zL}0zw+mnCm8IYfcl@Y-Zt+Ofv_qT|NMv{yHF|EQEX=mGuhX^ZU_d&Nxef5|jh1A3q zR0YEpBqm@B20wu#rpY5|34_Mi@Uu=J4ZKsN*{!3aX z9xzm52X_3<4fhQz(@J#nGAJZQHSzxql*#rBpE?Z;6b(%vPO?8K{ElKK`&{}Q8YWzy z_doX^rvxF9y1M@A@6U09U=mMz$^;m_;nfeM0zAJ|uvI0xCmAXD}``ba-F zTC@z5sYT1?Q)jI{M~jwi^04-z<$c`IA;`U^nkdTIY~m`LKs^>@#t%RuM$3#(7? z#2kM-o8tgw7`HZPHVf417s!$s#J{O+k&iJG(I%KOAg`2Qz?w=)Hl{KelMNBjz|Cm# zO9aZ`a*IV?W)RB2TRdj@s>iRKf7!x)gDuh`J3W>5z{`B)b7uu`Ac6_467&-x3w%uC z%%@NA$2B|d65&grNzhD?N0L?nD6z#$^5~`4-Xr8n5X{vp`v=WrCWY4DzUkt0R*C{9 z`J?<)Qb?H$pox4ZxF-mPqXoyrEciC_N=aRTW415c`zb4D=Bx4T_=1eVaM@<83RvYY zK+sO(i9@b^F~v&OVCOB0uI0(NG!y$DyJWA@Gn)T;eIK=3H-q}y222U=7FoTv7#mn) zH-ikMVZ2vuUm(sF#AM8UuHaoEu>U*!Pr9C>WtZo@ShSqjlts%S74~A$vQdkc84MLI zCq|2wU3A*>;I^j5YUOOVA`q3Kuh~p(b=%A5&F0EzxE|s5+no@1W^!&+ip)`J9z=8N z&6Ee3YC&Cq=f2jOB;z~KngnvYv?eL$zZ5hzXoh)k3?PR6yBl;3$wK z^MNl^Yv(1-^UJPJpVlZ>i(&a6JX`xI8070!~4tvo{U}bF5X;8$( zg#gWfT5@%$V6reRTa!(|S=?nrFo2ls(86Dml0q5lu_6CjVXtH%JIFPPW&kd{%vkkI z`M-b1jm}wJW_|nDVsuW@WN#Ury8}_pVA)pC=C`P8XlI;JF;Jyv9MrPY3QW6$w@0fF z>gpgpzUdur#hMyw&s(piQuf=vok6G5;V6vj&ByZ0N3W33Lv^_r(I`=Yo4>K!wo&^g zI;e2OTd>wHRkE(rBbNh~(_Nx#ovQvrcCl*>UHxFX9GvI2UI=HpTejjP297K4sWRRw zE9MUA)Oq#Owh+5EWMQ}NY+!jb#yJ$j!8lGAyxVLj*KPK(bF)iJc`pgCv-!Mh=w84C_5{*yW4o zE&XDMjlhCrj)E%oP{))K>o6-+N2g3WKN9Pgz@UJY%m<4k-4l=j)QHk0J0!If=`J36 zMD`5t5|on&rpb@wmxiH+2U4MD^DH{I{p2kyG?HsaHxp zc}kX2Se`EuCM%cNBCL;dhA z`7tV);H@Fa1aZ406C{{sMkJ$>2|Hs~$wVfHBojcHQOU&I=yN$xraqVZ2}YmGXDvhd zY+S9umZ4R^?{^t)8CpACufL5P@qgGxPPR`#tWO4?#Cq(`SH|7IHx^?vhPUr*RYfp3 z%GgUXfoO)R?5seTx7xvgCvx&ijFWCqQGu2Mqge73RASpmvQ?hq^Gm)XTL!c&0JtER zVPVde)Dq=OS>RK_WVQwIZ?<_!9KGX`iUTyWP-w}4AeaDid^@De}8zuN0LFw zA|-$H#@9S35fUYtpum*WS|?`|TizThNF{(H9(rMMC{xlSIE+h3px~$c(v)Fm5GE!d z=F6Ww^OkR2)BN^bIa&lUK~aG_(d*=Q1qKBqfnzRMdRW}>wq7~mW47+R_SlsRPFp(W z;)Mrpo4@zc_PecYzsrv8cgk*21Shu7-{aiHM;yO+(!onhlT(L39&Fa`3Z{&a{pOt0 z9U_4_A+(utY@rMlOv0Cxq_u{4kaO@ciMGJ41u=<6`P)|eFK4DrEoBmenXVI4OTD!8 zOxMkzm{8pD=W_IFQ+h6Ep78iaeNbeFk>~QVgb^+uzFP}y>({9#s?+Ou9RIdU!*r^H zdbT@SsHS+-BPaZggvals(^WMw+LEYZyOIHzN=qWDo}FhLEI8DX2oN&bl4x#}(E`d; zM$29~Q(&|<=l>k8*82bFFy6%fb9^FfuS+F$Yj*;K0$>;NO`XH9n%~xoOhAJTtG%zm zG{6_6GjKE6(oWJ!Y#SE@&9KzL%D4oEl>xqF*)ypGj4tW+1Qo?n3zjdz%H$=i z%&J)As%#k(Xk(9FzUbn`2W7nvN{DVIzPhOlqDw&KMWUODOqj+=5wfJXDfs3yAAf3U zw$ra5xuhH<7$rvw%|m<0uHylbW|r4p@qK|B0X-L<6CgFIrHcF|v`uzPLMjIj?g?^= zp>VQM*$w4Qj(q9-{Z3kW>cLlB4IeXc%Gr7Cxl0G;XasO4APG}r>ZkH@dHY>1nE$!s z=FbY0!6gqAn6s2~OM;2~om~sSG5X_4%uv46Nn~>Qc!^Mk3jEA-Ga!@!%5bX${$^k` z97u&*%bShKMtD9CnrR_8Tah|7dO{h@2*S$vpJFe#HlXbrc5RsTtMNohDhx?KXZ>ng z>8C~hgt&P~`UxvDD*c>m{es*wBOvPf9(!+byVsmweJFR(tzNb3W;Ma9D|E*Pbo!=_ z=J92F?W=@VxYk{gq3)m^{PZ~TewA}lE7KmT(oxKGJX58(*t4EY?;8dkSgAB}VL^)^ zw;b8eU#+V=xH|}mT0YGAYDl1`MRmNem!$g>W|6ehKtte5F%85_!bXx*z!H`(p^Raf z5zS=K;Fuj5Q-}+8fu|v~meEv=C;Nn%CIW|FbgAH&um%6i-nstDbyjEm#6W4e2%#b( zXrV1CRYg^yhzh70CyuYV6LP_cOD;`t5)w?12_(hwnVEBr?~W7Okg8Iv3aM4q|DzxK zpY&tD^kaWBKl{Jd8Y+?ZX>Ce`9tROFrv8c^`zgqLXX3WRjuzpa1?5jR;5sF$To^*MIH< zivS>i5gg>#|Mj#^x!vaA`MeU&X=oVNy+%tALhp8AskHVL89iy6l*ff-xntF|=CUz-6DjMFxVr8oV9G)J+zn0d7_v4+!EMg$`(<6xeb zStOg(%-(-`{l&Eh=N!iB4qyc60h|HjGOw)u-;-Uki2@}QyVO*Z`awejbO0joDu4*M z1h1F$wZ2ZUgUy?$yQXX#Bm_@GS_&j2r^1+{(eVIQhB4=Mc>TcM6DLJryXW9+q4Pa) z`r(srKezt)+UoD}Dgr%?K#H*8B~qUM`1Mx+G#+`n`srt;Pu(*;$#s*&GM%*l;=G+? z;0xo>W339CEfKX-G`}r9)7Igqg2~imxH?!F3$S&LmXaY_rFqhw+BOntvO%=Ij&1TZ zIi}|3FL~|qwb}j05#2J=E?qH?$o@-|c003WOS^?KH?U#C7B21fzREtK0EbGu1tFsi z6IR^2t}&h4Z)Unn7BpIGe}?MrI{K?t|JG|t4Dm+3wx#Ua3sF|+rF3w-WEmY?fajLi z!7Yz3;TyaC!^+gcvCuGVJ51A={0e0{e>|~Eeh?=Spgn7TQn!juSQ)m~t=MZx-Asy@ zVy)&+d9z5CG8q=jSOeVVm4q^CWir$D#E!8qA(VlYVe6Q%65G5?eDg#zdrzHt?9@@@ zCTr7A%-;DJ90~4oz>9zVr!T>9fH^3}CjG<~WB~0!DH8~W-5^e=vIc69RMOWjcx5y| z8$b;Wg>ecdMaAC&+z@aoJY*mK7MuzY6<9M4J=z6Ew7M_QQ1` zAr~y$0$(0R|C?r|&ZGg8bxgT4nF;mcHUrUlX6!-M+5VQUw@b8@RnzdBZY%3PgI2S{ zgh9qeE&QyMRfR-E)qon=EmGDhTQtg=vJ}1~HZ{H!_Emi8TbX8v|nsFTX;u<5SAz})m?!hEN5=^OEVJo09U}dzEVN3Y4-iFw2 zWnxrpIM!Fj$*$-|hQ^0+vkfZ)UWx42N^GHw38so>cFzILIT#M~C?_X7Kq};$U}(^? zNO+j~0pgJTAs90W+@W6*;6rG_w#Fz!qp-#XlX(cc19Ae;*!cSOwQuh~xh^a7(8+gx zFxx+wd{!w80o*Z*M2-n!#vE1xa3ehf&=K^!Ir-Cv){b)N0t(T}q&7R*r3}&;+p_t{ zegjEcRz~;|={Mn>ppHuRr6p-{k2&x*(^@9_7%7?BC_9KeHrB!Pna@8(6-ahQAk0*q zTqp7il&LmRfgK|{zhci(^DGW(lA>0I*WaRhj!o`7HvIy1Kqpo|3eiGl zhoHmJ`a3%!q;(zyL(c*7P>6HW=K4Bdg)r&k*vZj6l+6&Z-~)gBX!chJPGW}hv)9)C zW;Xd`3Y5;SeFVD2L=`6q@IoIW8B@^=jy2S3fyp+Gf8?df-g{Le~xH4Mb z%Tb2vdqtzSZGG=D{YRL*;r&NIqg%572!k8je?+#g`ff?2*PANR0ijI3{n^Hc!w8hA z_1GCC(-cp$l%Kc`H5PfqMyr)+dL~QNL@TqQ>OxjVI~mu`7RspJP?s9!AQpKp##-b7 zVn8!m#1gpda{~pRNAU1Jj?xqz6{U3yZIeb?@or zDL3X;pcz&M5EHG8pK1CPw7QufT?gC`>88#@i?Mx}n=M=*w`H1``czn%)LOT_IQ$O^ zf>$@jWJh2xQ>7@2yeaB?9b`VII#l25c(lIP{W}i3(pTEPwF-xtEvhxS^|yUZ`c&Lm znfodqqrIh9MsH}2GIT==WwvkV zj#n7Ep^>s~-_RejS-SUCWdYlLv;|WTkd8C)+h7o-WJ}Sf0TYoP#SBskn+hhNjI2y* zuv@JRW5XJj)>kG_CRqvFU#G1PTi46Gv*lU48(uA30>K2+qz6+fn37)ux`NM}$|z0m3kd(F-aodJhY1slENNltjVX6bB~ZDH!{bs_TF1I9H z{U>Zm$oiH;t$UD+(>J))LMFi!KX|uo>%J5;DZq^TYTQ23gDLck`KG{{kTGoam5God zp1)!j#%3sZXi_7x-)Lnl#%7Q-Q$)TzbSx{w456p({g?kCJ(wDC%zOJb)(_8ilSL94 zfM9?cNfjwo!K)Ya0RM4x_LqB4o!xWx;=c2j4zKOEya*c@z4C@a5MwzsIUNE71Bn8f zp!OcH5vYIdAPk}9GY>m}2<{RaD{j6Vq`HNTPl zR)R3Kbu9!Z;v!@4Fj99Nu7UO3{6w=-Hk5W#cU@iZ>l)Tp<H=da;|5ddL znGfQu@Ugv0o!d>0zf>8&CpKKhZ+0SlL4d?i8NVQ8w2Xgcv}%i^3{`D;2AicJXU%RH zLk&4^cyB3|=PlV=ii6+S-ck~_wYQWkOXs1iU6?LmXQE2Ec;3oyaBt#1Os$j$gHvR_#l=Htb( z`^2f2XS*e1Brre*uJNtvmU#_b$mzVYzWb5W$M&AR`0R;8CZ6C_Y)UYMW1w3&0$>Fo z0)k;nWi=@w7#(E1P(HNFW)fHfrUBmoFCJ1u z>TaMM5YO7N9dAv(>~&N28$O0;l)p_+?AYZkxHJY*GOei$yQP0*z-uh>l3-#R7hrBG zy%uHuL^HuI-gObA2g>B8%|MI1PTs5LJ&UnpCyTr0c#boqgEQDH z)!;&zrK`cWepeJBa;*ke3e*0YZ2Qg#bc|?dLcd2xncfA=L^s1z>5Lsg17Q{*atF4p zqbuQh79A*1h9Bz$lgfSx%a_tlGJ@Z9G?bySHaLDWgjGvwWf&Wx9A&>E7-hfAFFG+< zl6~&b+SB;@i%4KN1P}oSp*MgXKpBHp0LQ1Fdt>bzudVM?{ENmmK%rsNB8g6WzSn3 zWWMUN?fCl+AC#G;s=;}7Q&fWs`+l?4;KXLB2IpGU1)9Zis2W@lGFlD3lAC_0CMZYg z?y9!!Uro?-`i6@5s_$~PhWFnPF)&1&c19I>5%U8DxhIdzTPItJENCk@;j1q?8cRlTR!IqNUu3Zx8*DESSWY5-4EGT z_L~~lkTFR%Wz4*GGCG*qTGEb^M$AHlGMS;6#l{7MsU^38GEvEhdz@s(u;v@v%LV6hTI1931~wf-bGo{4(o;> zKS?BWSJmf6tuc;y+U4Cl-4LnR8Jo+MW3VQ=*+q@Exx2<|hRliud>x`{0K=qX&fHKJ|#diQ!CN?t-USBQRi>0i? zSzWeCN{eFdAo~}ESN|^bn^-d_uED?^3KQF9m1l= zn!W8GnQeS!h!kVHB(#)_g(0cL&TnM~R+^SP(ND=moW13<&GxYTe!xf%Xq zXK)81(FOS5|K*QIE%3qnSHidRN6jsl`QtZn}|iN*Fb zA1By~6LoCxkYK=Ja;ov;wy!)_a?9m($9yTxGsmwEW(sBDL z200&g$V&)k+$S?e-UtIu#v>Csn%Bqh;$-Yw@U?l5IexB^PvuYK_&IsEo<=T?dx z@NnnGd1iL5vz?FcHrCG(_rO@3e3!|c8|RFBPhD`pJmX!b-($d*F@yWgytnJje9V@y z4-Lk<&t1Il-23zSa~B!Ux92a-XD9-?aG9As=PxnXcj5A$cQ5g9-+K%$5Rw$wuy`LAgP4OFWUz$e}L@Qpp=Pt^wPQG zvpZSB5v(BcRTW#|2#Fq13&28kEtBYJwEs7K16Zk=6>tV7xMvab!HM(SV{CVx$PLMW8+9=t7%ax#(pT?f<`=OTbHfu1 zx__~&-w$WHZJ@XIiq3YMQ|AyVyUA~=s*nUU3n>!GBp$EyH`76xlDaZLDZNGAv zblfi-Sx}nq>U=%6=aVnh`aP4E=W6&c2gzH`LkC%{oNWJej*zDudntT_c}Mwj&N<{X zjJ%5+yj|>kZO*n`=B~W)?ww}g$o_6~gq&ErtYos>9(hSt0k=8HEUE3M#$Vd`zeOZQDtj zW-^jslKf|Db|Bp)6>mBpEob`gDE>9UBqhT(*(C$^MV^MOluYVnBm*3$4U_fQ7BMj+ z83PC7L#wjqX{Lo%hT3eiOEfKd?8F<^0g=k7nVKYY!~q2KhAfC^Ko9^%;VD>+O6LG~ zfFov?$Q+4d0%aT|+IiDYWTSX3NQh$%T%XnNedsL_DA|;2Lhlyi?9O zT#lW$!8bNTcxAftzS;Uci##3BaA7KA|ISn9@67bc$FPmnubN-RtyU&J&SsiY$QEKo zt&GG>T3&?MBVs2VOGfz^$9e>G{&;b(ZfjWDbgGlZpJJ&dg?wLaq9%p4Shae6RYB`$ zlfu@2FY8)8+ayi$EzP)Uak{JROtlfI27OgnS&!yqmx37*Gi6Z89=EmPsdLAvQBxoJ zxHDFi(voVC{dP=Du8$z3`z)%CVkM)_vLy?KP^PL((krL4Nv@Ugb?tOObRAYJ1($1@ zlO8qHZx`&U>dN_7bH)}c_|)|sY^#)P=w?m9UIj_jcBLCTsA3?;L-pH%2vrl_UURoy z*;lPmPt+`7E#B@v(@u?)nM_uxUE4jieu(XbHJy|*iQ8`?+1__o%W?CZ?!=#d#j&uT22Sf0%mCMZM4IZw|MKeH| zG|DDkSbNw4Y*IERacXu3$2oWxvoqp`E`Nk{hG$_lfCwGi0eu2=Kt=<_0y?RXg{TjW zCmx+kgTXNz0Zp-qAuW12CGZn{5=dQHEmxgTWbGN3*w#ln=(>n^`vYZ$ zJXr)Gqn<1)qec82r55qG$o;Osg>CIqIWTH z5UmVjw+UC2rXD-Zu^U!K!KRDQ9Q4d534d)z7!eQqz!wP^x(}ukp|W2>mpm(FLd*~i zLo*+1@5@YR7z4<{!<|>9Gk_R-Fsb|{UY~t?{rE?1A6>Z(DG+EC?f)S*YH2jDBF99o zhk|M}G&u+Z0@eh{3zW>^=YcY!7Pl4F^x^&xGaP|HJItRG%AlSBIbq|=JQ!tEF2kAd zDvGlJD-biNb^u1a%A;}GD1jiBelhvNL(?}>&`x$~!M>bSmPCjhW04oZZ#2KHM5gup z4KwGsR$}w4m{{OqXY4d92mzB~>^3qJwQtNG!R}YuN#@z^mlZpU=?8x18lyjRU7qU~ zOT`l&e8_zx$M@k-TmGSn&W^$#ExC0&RC3GUCY0P-$-8{X?bdI=919u8M%Btx5Hc#9 zT^TJj=O{yk=0cg}3(bw{#(SMYb0$X%%^g%D;L2xYP~CXlx#G~e0Oy560;m=cY(%tX8rOv8etVAHLJzb;_uzax|}>7bDe+oluK6;{R+M$#EBnORm1 zABHN>^OqEfRZBt{!a64OF%~WfZr+%Foo-4bYY@r+6e^kFG7nM#I?(32LKy-mfF!7((ITe23e*Lc z1M1S7SkVu7NWUDiOI}iCzp^rb#V}!BX9jV}GpXdKrn^jA!K68!PC|bA5&s6}%D$MF z6v`w!$wS5=|FSilHwW4}AqA9MkL@6RIUIDHF_TMnpbL~)z5|`lZs87eB*brE2Rdge ziC*3RDi~_FoyUI*U%DeZs3%Z!1%+BG$hdsOjJr~y>OF1$;0lrgLMk6qWWQZ|=jJSp za61+Ii?BvmkO3AellfGZN$V1~d0N-y`F2R_GPuptx?TU5cF-Nc-UVt1qL|5U&bLs8 z$e`;&tjVvQzb-skkfL=+;Zp2F(szkL`W2+Fq?m>op^S2ww3EE@)8DG>)l+eoaiJv` z%fy%vVaBn<48X-YCZLRc40QYb@$@cR7h%3qxeY`lls!Yqph_XdBhgaJn87PR8SoJJ zAgF=?$VNY37#(m4+Ls~7Qs*52Wq$I*d5#IRL9R*?NRULf2q*(IVXRttv}Xb@B#)+k znR5op==;Y*vQEcVKY#!1ZBd|520iuSI$!bm70SftmjTh1o=KrO;~?23x6DLL<6S`^ z+u|lsF4K6)Xpu)W!Ypy~V$%6m)YaJHiCw&(^@I$RF^-hqhsza;$~0`cLQ&(^7m5O9 zHe;b^#f2VWfH@m1EbkPb-DlLf!q)0kS()lqAK;kOP=9?|Uzt%lL?~0~kf?QTe>#Ni z?Ldd{5#FwJ$arr#;#T&SOUHF*nvb|7xi$Q4`syi{iJutbwliPH-nXlWsU;ukE-#v4 zl4Z%U5yRiee$zkFe3MWn5>b7A*=o7Q4#{Xpy|_((Y#%aU0VZT(m;}UVi*iLtvv}(M z%O9wru_XKD={;6cBOeikbag#o1u`;V9WqcNh6-gs1Ar9{LQ{h5!_k08YJMR?pk#24 zsS=rNiJExgRhZBSWmNM-YYY_xltHFL;;Eik_eMl5Kr4=8YfPvnfEOj@mS543@_Um* zK)tJ-#^>Y~2_~*^+p@q=pJWoyN^Hk${rK8XGgiNT;)F^m`52%~#8pXC#%nRU@_6EP zKELfP$~ZVCR(Oro?=fd;y4HVzCFu|o;#;@}w+= zT5$MjCdM)lwn$ek8s=5aNL=oMWe%>hTF~rM7oO&ITJW3WRaB#$L>BpBr+dP z-a(3(VlCs=rNu;mIVJ*$12YU-`+3!!tYnVUT##)HVc90fM5K3tx*1nQa~V;|2xStY z8GU6;kr;9|z#7pEPzFARF_aAP{Q7rEFtL_X)oiw<&B#E6u+jrlKqR7;YeE@}^)##l zZKQVr^FSHBVE{w$D*}{kjXF+Pl?{~P2tpaPy7n&MlsGJ@A^^%z4LR?~rvPd|AFXBB zYER5-#W9Rum_4*>c1rpRRz`6Q_1Ip$nB$2cL(G^|ik>MSpO8gL#x0P=&$<&%>5u0< zBb4D53Z*9*!`8?+D&X{QkC&sjZpJEn18x@EUX&ojsml6{Ylr{5yiEjjT~MkZw_DhF zXbi!E+C#CWlZnF36m(KN`-5q!NX3~%-KXkUE7Yq*a=U`WBCmegwvxWOY*kR$*4x%K zqIPo}>IPF;tIEezGTw3hO`dI{Dn=rTsshlQQdXQ!SJYVm6WzrRl<};FdU33b`qy=x zoGKcvGMsH%veJ^u=&FC+HZ6HgS~5lcLp`zGEl}pJ80EQJ!@yVnUssOO#?P%klqW7i zm4>lb_I#~+Grq10ChT2s$|4uHsmEpzWMi_aE5kN_B$P=_lS~XV!WVmGJC=sgE6>i@ z%$Q($a{cgR@);I*R(h4NVKR6q3PI_DscxDQR4AkC448myRGfaAJ@*pfN}t-hy_Cw!W!*; zpPfBU0k#?=od$)5KpDFec%7MX;BGPeHJv0eBlUuUJDP66E1xyn+!#^GIF2la2-PPP zCfa*1b^vXQQzK%p_V#8zO~*pm7^NxFQoj;eayF@d-L3zX$U3++{OgG7Uzc+j?bulT z>#9b=WSmb`*>COGs72mr$HtYRrUcpbnhB;h@3q~O;KLN%`Dtx8B^Ymn9%)!9x~ut7 zi%wJJ5gd~rvP8$#`;*s6AWMu^(*ehM#SPH~$0>v&CV-2q49Z`Yu9(&fWq4L76ShVW zqm0yXE0W+?A6I%^TPGjj~|`>`4h7jcTVT{&&#DyMk5&#OajDI zV#nc^Xn2~_ZBJ~rvTkA*+=BvMTf^TpQD>6-B+Uv$GZw+wNK*2TXn}RcscC9OzD7KM zTk6r2Q~eDyWEJLkv?&4K?b}vi*S88YgnipqVIQ&)I--=imc?4SQWdf?qm9s4Mprul zQC;BzWp4dyH(FvoBt*^35Xsb8stg^(-KzAY)6KZ8gl(%z8IjHm*v3>bY*imugXUU6 zmYGW74#9TcLcQR*0z*ZBwWuMd=QVM+Fj$^gy?rY%jaDZ8Xq<6*s9t#j6mv{$TULgd zv|h^3>$WX6OH?XvA!gzxVgf>`ghCkrO{5iUvozYlz+6V8rcunexH@BUL{^3n)}$mm zikSx%ow1q0E^kiEY@9hXeRAXY4()o?xUjX38rlN{kcQGjPzD(dFDFR)`0@lijm9wK ziQ@BHw~5NipoUR!W3%p%Mr5^g?X%@%%BkpaP0=;=O`MNh5vb+O=~oZU4({F90LDR0 zJv=?~)9If*H+|&5+A&!x#W6w|;h+g7E@Nt!qP%vH4~y#`d6SbZ*_I|1%A_RcLe!aT z63Q@8D`VDDgPE@EUu;b<-*r3{$`EZ+4kC_`;Ufd%<=Mb30mWESKmQkyN5aj|quM0x5U4=rMHJq`yGqde=F7-PWC_};~&XlCE+ z_}h~&*%FeD)9OpW4diZ=$Hp5sQM*NI8BA$(OWrVsu(A6RheE?!YLu>*W};Qok6*n* zTN*f+PR9d+;e-JzurH8F%m8A5UnpRhB<9bqe(J}QuOFN}`@qIKfHvMNZ`^CLYvXJx z(#^*)smZVN07v=~i87dZ_RMu1-nFw&Y`nI%`Uy3#fCeB4jg!pFQ1h%MuAB#h3T1+O zD0gz_whtvZMq`-Qf6(Tb28*%dDD&*WxtR@61~3Hi(?J*UIah@+G|r*$QF;TzD89lN?j@ z-A?*2d8N52k*HUP-ymR%lC<32f!g!|XEvn|tY|9a(G99Q7wvmIySc1R6V#X}uwQN@~7fmDH7 zvJ*q9n#x+W%ARVL;mpuNQvqUC-c;+tPX1Dbn4O%og49}=Jj56U({!|ru&=TP`NFSs z6w#)Jy89}zGMW+KC_@mS)0E$9RrBAO>~)UKSem`#a=UgmsSsh?Ae$6s ztIbSXMNIz5$;&VZk6n7|pTh5^J(C!ant zz3cJWOS?AaFi!G`w;3Emq*Il!rjc^|g!nUxD+P%&IBeoI`F_8hXi zZVy!}n1<-hax*ol!|LoeTo9O-=VhYuN`{D+t8y7axl9UiQ;(fzV{+e$f6ZLT%9vwPa4L>*kiL>BUy_xPW^kNU z94Ny>E%G2~m|>;YW9G%#17u{t1n?{37{jgwP$0k&G`4UskRpWG!YzCZsDk7UdRu1< zTMd9k?8F4@c=bilj5aeB$1pj6>ba-kSLQfIN160PXrT;D49PDMj9X6r@O0P18*hqT z2s>yB-2!FYidqDJ4kWR>hN43o7qtBfEQViv1VmA1FLnr&5yx1D?L*Gh~rAq2l4qSL zxH|ESy7n_U@89ipMfEAs87c;JQ>0sav z&ZHze1MTolWF*rRp^VG0HN(hzv+i1Y6U7X{vub6Cc>cQN+o9>u+QFYq{vx7)8_AW4Z2);pu!#5 zhsMqZxPbG-G_6)T?#cTuT-HU#hhBWPgp7-wBPD5!kTGd^E==*mwV!B&z=ZdVcS|}h z32_vaxBW5NyD<_Oady09!YTT&|7t3$rZs)bcSHipY|@TMJiNsnkzg7&X-A|iXG=On ze|ReviTHfBZ>-6dBQ#G}}^Q~`vYuz;e#5B#%3oDu!SM(55 z4%r(?x+N5y?_T6E=i0NHV{-e6bF0AtPTak8nn}{ZF=a2VyGK?LMz#HA93myzj9Cc- zVLztI%J9%W2I^+i!&=#N|LSXxY~Qz7{to!yft_!h+x_mnJ69fEUF6|v`MQ(^!LPuw z09*t#AP?4oARv$45s4Kwxu6qU8ITg9S2mt8e{~rSX0JmN{U*Qq_#U|ed=baM$8fd? zbovR&Sn*50z4_LMwjV#YOTuU`mn0?=tAWx~1-T+#5y}Yf7)>W}iFg=oua}V?OpIZ_ z1d(3%ap%e!BxC@7`R#9w?*07VLta7fmj7i*1lLD07rg!?KMy}E|SC2RS(<)PU<*D0W$cBycLI$`TFMO?H9L} zFfn^Cb?fu zcQMZnRYmnCV}w~d)~nUDDqDpz@tBdifQ$jn2x4yT`U+_FaEx(7eX{*M$d60gpZ((MPp>ZDq)0{M7BGzy zN}uAr+tG~O3^1yZcQG`cF~B#ZqUeqUWclC!`Vf%C;G7^NGfhAuRKQe#^MfF&#qy00 zZ{A00?BT5k9^E|u*yj5m*}VJ1+k2EuYPBSy_$!i5^0J6&cvyRkBcS$r3T3#MJ{wBL z+@ES+E%JQGC?xf*#bBoiPTfZ*j&G+1x0`9_^9Rmm@2! zxPkEqiXq%xj-eRBl~Y~}A=7a7%>Z3Fj2WP?uft+4;1nzt%FM#zjcyO0N$tTj)wR;? zdA4h1hlGPd)~KY&P`RDOAk$97btqQ1Nh7E>dwg$i>Eh5lq8GgNnz!!Z<}m@D9qdnu zh--prfPnpj9xRoy;^Gcmrd9?ll1tR<7>Dx@0FlU?v9q01hBsMH!CuEkLYV;v6RGK7 zLgZ_`j^Sx?2OL(ALd1tb zGd`6j&xA&BYGpt(?CTOUq8T=RSs9Zu@z6tkBC<(vv{>HhSmh@Mqy4d(q1uZu}Att&S2Ql~05l1u7U$+>`ud~!@M%{CD$zA_ErMm*dNWAZ}T zp8Kc4haIK5KH$Nryv9UZvOtH!>e^g9PF)+<>Xho*d>O~7YvWqY=H@HdcXR`&KN1a1 zAWq*lEFOtJUb0J$g!zKpPkR@hx)n!P7zHj&QpDs6QR{m(oRy)`{Fl(+B(y>DO7aS| zHiwaLdj`rd0%b%q@G|D9D^YGU<--#|* zu`p;Oy$kjSG>jyP04_wjC8#5&;)!A?RK1Mg74lZLvxbAgNCx#Wt+r`sz?=k=L3)d4 zeGPP#y12E;A0;ajD?AZQ@@}bMGPRU`oYuFimGR2Q%g2eiKi8S3Fk8st+{P3>l!3eX z8E|~D=ctp);nh~yWS4BoULf_dLh9myG+GISfb^l2*n>um^~2vo3T4i~J)}Q=OYb2q ze>ofXki^tIudXV48ECaL@l2(+lYE&7K?e7j>Yl{X0ceJV=-157CTf! zSL0+hbmc8PX$@T&Phdk=LHa%oUEecd%2(??EY*&BrY4wT4*Ew!f^qYr2oRW!fLRR%NS_QA6XLQE_V|GCa%vZ4ai@W~V+` z>;hzw$v}6)C_Td>XohDApp0mSICt%bf*WjeFI@Z1CwDIE7fj};C7AZZG{&%kXa-TR zzy;I-b`hxnQ$RMtwciHj~b~cg0CPdB!dZ>_{c& zui;_`7Hv13%&q76+@^MN%V$S&Wm=(F(MfOq9KbQSr1qXVCrt3D6?+$Im_jy+wSJQ#JG5I8)zy}q9_;mmm0`uy5*OJkA6q{qGNZfZ~f4X+xnRVacVHkH$UX8@2 z+;`+tX5Du-W+W+|WtvXpEj*2M;_*vTMDDLZI&navi77fU4A%a1V#szQz@>IAs3HSK zLrhcY8FNhO$7H@KXeNpo+ZO;|+^g)89gi6!jk05&X8ns1?=>PS8TMCw*i4AH#mX5- z(l~dNbufF9d=m*KGc1H?1~{TBRwxrbCej%nG6xoD+>(b81>d{7*j~KGMhD?qdZ_$O zB1!DhJ!4>5ERuq2v51NA2WzC4LZA%kEyVWJ`e{F$CJyTnD7 zak=Yne;Vp5S{W^v&HDK^2|5i{ZmMKNHr8M>?kS?uLNe7%=|Y+^Y*qq=CH$BtmlRvP znqA81M><8}09!bh+PlG_f^fX9hzda2i2$@ZT zY|LtsIm^_m7mcn<^$yswm20&w)jOc2q1S54(oocrzqiUBlV-{oD~@n8K`L>^GvsNa zn^FABBnhT;%r0JeTcs=Vu5uacn7o6J@;CSTFP6qIcTX+8CUORZsU>@56FgN5vlIHt z=%?Zs(_0=QE+Jx|CzLVqBzDO|aSXvkZiW)*#qtfvS*WZARcHrn*%6q76&Mt#6gU+s zm=yd%vBWHRaPkGgz^tHvfsYZg^uvh$gHSkXkUz2dOC>(F(ULfZVBQOtw8E>ICft4l zV$3?3>{GO42hgZw%qv-g%_JgUvxgDNxEN17`8lO95_l4Oj6@~>szS?onw}a#-YoiW zK|z>!rDt2BL}Wf^%k)g|n>#S&ar<@b-{*-D#I)3QSNnAs(I-`x)9+e`jzz|-^pnMX zq@PTFDe0#y^4XVu9^TSWeQjP?hcaDmq3m~7`niz@Qy$fxWr`&OjlKd|vR}@lTG;mr z@u)sbmfdSLlVxwLSnW+CBJpQ~V4Mu~*nux0W5W5zo7HfmlB7uqZoKlc$pK;F$ZVOmxPuXI_WNpu`R$RgfbFi!cFm|swUq)X&5M(0!&$t zyUY#l&4@~d0OBMO8Lvg6w#BFtuHF|c{oa`btP`>_t_b5uGS z1%^0=k&qHd)+yYK+K!58q#4Yf+;q>AY50li5Jtr!gqbEr=W&(;)-Y#9EijArWqfG$ z`A0VId~EYizOs7HQ=9L=2pF50oyD)EDx0w2i0BiZ1*V|wH7k^CQSwCi%7A+i{GxpU z?i?J-V9*B!;urDqtkO!+HNYho$4Ru(mMp0{vM$NPko~6PQnWJFf>|8HNcbiWjU*Z6 z;TY|^B#dS{~4m-TRs?Y{BIx=*{ioT%>8%uj6h zX}0GR)qT1HFQ1+2KJCNV?$h}!^-ZC_eU8}~4e5`%9zRB3d8Mgpf@yeDI)>hu#Za83 zUheM7+A$R4EQZQrr~3w3#-Qfu4O#~?>{)O|Oo21kZxJ|?l{rh`%!7{{oJnrag0oa= z4b4aZ<1 zV>|9y9HYnv48-r^SATKy1A?<8l1!-8ZVx^SB_rVTx-kz2qwJSS?0pThOH6e56}}KW zyq;aU<{PSdCZ*SmMu3YTraI#}kLK49+z4xuQ3{ladlXrP=6R88^|R182r90%tNZ-b>@qY4zJpa>~~hRr(&RH{f7DuBK51TyDQ|D zH+lsZtt+We#(jv0^4EylFJlr+ww9EVNt#JPs4lTY^uOuv6VZ%)vsI@WH+*G^35qm~ ztW11UfHFcBC9aHdycNw5%n5-@N}1AY8hYjnTNgB=1EzpE^nf9Y1Wdugj;xT?(d3Cx z#$d~fN(Mv%D4G!bi zaW;PNE6YFP#YZ9&5p=Y@DajsEOI1&;uM88>Op4*tRw4!1DNrKxJT$N5n;ttEf^}=K zeJZW6i3)|&qg3>4-JFg9LDhyvj;*8QG621z7S@M59LK{KA6XxJ=8KOG-}+k*p0%uE zw)OXvDM@tGT~-lRW=2*~wKBc8Vn0iLgN-WT>4?O04*T(d${jmBz&Q0Vi+$d6E>3zj z(M4k-!{U6hdDHN4wyYf}vrkz&u`X-pseFyjAxi;DBaK`Pl!+F&)q~XRl99?0Ax?T1 z7-pJs3!Vg%n;8g(xec_dR)%0DwYz4T;=tyjn$tMux!0!6WZjRW1!hd2rn}I}6p}_v zqj8*B7?Vxx^tDeDi}EpQWl*B*UfpA2aOnk_5b?MJPZ+(zNI5VE+eTaL67ps*IkkB8 z*5WnG#p{>LH|$*R#SPY>^!k8MhTny(82X3PKDB%Y<~O!(h;592sQ`|@(OyfbU6+#a zN-B{d!DMQw_K|QNWGQxG9#X9uH>-(B?UGWMigEWwYuxq(F}-sn2ahV5R4|EMQp!|u zj5;uVu64!}+?1s15!+&=S59JWi#1i&9u~QmwL7lM+Oy)ds>o7&Gb7lYLzWveEucNi zbPMRbg5eUZTR>NRdv}Cna)h-8jAyCVKqzyNT7#h(Q`}|5D^U+vm0d~ujI4K~)!HRn zou;Ch^xPS^8B+<4=_zRKZu%I6l}Q;klMn;e1FQelF)vUit%Affj-nQ=^X`7(XTlc` zj^nNM*tKri6-IS4Y1IUjxwQT1ovW_`f6#3JbP~MMqkF~xWk?%Ay#Q98UcT*#&3Auk z^SzI4e&F+~3lFazxV-)GPi$TO)YheME`JXw11$HqdhwR?J2%XA z6aX=Xh+@&v15$t;fe|5;iNkVAvRR4RH%+h;tVpxTu^Frc$fma_52K8co{7+EXu3q0 z&r@ErxkgbZMD+&)4yG zL_CY4SeZgm#wkKkqS0R!iefxfC`v*5Jc<&j>m;{N-_y=wIg(> z1~ab9%2=^tvp}#*>UCoat72yGn_-LtTbyRpYQ(F}@kVmw%5x!I)PFFSc%Y#HUMcbr z3P-GFicy|sdJ;3zFpLIhM)O}LxVCIxeKl+fRY*`KLY4y(C&+k7LIGuHF92$}YwOuN zcUBjlyLQLccU~-*+Pe0o)%!R-PX)kVyVLrZOj;`c$R4c713xt@4DCdl!1z04FL_A?{A>e$ital=fptM5yNM$ ze|=Oa(^bIrY+31gu1Y_4z-QzsPu2a4op;&qAVBWcg2DK3@8#z8N;LvD@l>6E2V$ny zF%7a`1IQu)Q%kZ5=ZuuJxDwA_M$KmI;L}?b+J{+vjG~#i081OhH!tBscWc~!*}tVI zl7CT65@iX%#Zj~WYM^I9(?_NPOImLdpg>k4mr*N|wvnvJ z$EcEF67oz0<6D+a6e5^3U1D@%cLL$>5Xmb!uX6J6F)C(=>V7mp8R1L(W{e>#afAjc z-cGE0=N-^Mh41!t?>vv`Z&1HY?bkD3_#KW5LT2Ik#;hczDQ;S&$w`u=I6s+^6wv4? z6+0h)r-cxCKk|K?+NwYFRVUnX*Xp}Los%of1}9B3*aHu zPtZA3SKYgOQYJ>fWB-JRhpNsu86|N{N|r8M*UH3}P;Q1uiwSu$`Iz(v)gsULS17~i zJ043RMpZJ(Woq@c{UeEhm;h))^-S`fwfTk*!!Mlx1ppfHsI(=Z|D zrH=T)&Bs2te6i>nK*pc!-|io4B%|a=I2X!jh?kNv(WK2IgEAx8F2!iuaSTejFukt{ zKnx!Y$vHkJB|+J}efI>s$uzkhcs-Qe<>Ou1#0ma?zTdUS9I)SYT+3WsH>laCL509>T_UmE&(rr|TP~YjnGq`*I*XAmwR}J)_qT#b4@fm5@OBM~*&uUUgIleZM^jRj13M#XI)HajS{;tcuWIoi> zCJE(w?D8B{hDQ8rS(7S?vK{XDFtT4(s%3r}Gie7bf?=#>O^JA=#7spphKboFBBk1K zonexc(+zFS>iKUk-;A9MO{zf^4a&@vO#k8^-fqd#=eF)Yx63cu)8E{z{l1aRy1aUb zBoTQi>blbjf!_s5L$gV$zR|=`)J?TE%n(crEe?P+|M%Z_aJ&vTf4;mdWD&{`!ENE9 zQuZY%%m`B9dS3Yc3yQ3nn?+K8&BO);(aPu#lsC&2R5BK+C8bC>zm8p2O#D=&{H?Pu zt`DLaBE%sPU|mgqV<@nXrANPG?%K5hWK5|HO`7a;5)bSBmTUHZD$7jN+T)pi(al$) zYc8F1!D4>PKKEC>n^j_pJFj2JjM0DO3QXMuc2nKFyu6Q{8R`sECS42Bxt7kmS2nI+ zTOW2XKnz!J*yDP}zavUPky7WB3z{joJ25oMoy3lX)%%s4CoyHaSC$}Xh=9O3% zqcD&2Z@8J1G7)jiGgXmN?Qk<<7l{Fa6|LK3YXmn*nq;4L!l;y0N`^VA5syrva%^T8 zt#7hU+ZBUF;_J(|V~&R`mtyG#W#*0SFp_~gd35pNi@UpOiqqXmOmk`V$<4)Yq7Eh- z1>=Id3od=P#7>}9q{W;m+!%1gi7<;ZNlk`FBKqRN?`&Nyq`%GfkX!q%WXbiw;*qBFc z05Oe6Un3r@r zBnB~7FZigK$@$b9l-txwoup*7GD8E_iB@L#b@exH%=QlDEYrP1m1oZP4)vHOL$})GtQvoz`Gui=%n~`R4+jgH;%Gw(?WieXdG@F!wUI|4WIr%@7EFDVT=bmc)$s z20%kLO1ok0`#!t8hby3RIb91>4h78+wYzxA!Ne}-zxM)@gph?XR=)z!s*jOct2*CE zxka&rws^{A)P`5tZx;Pf4S6MEsKj;-7WeaLCb5iM(CR3mcd4}P33&@KvP9MeGC!XL)qfUNt}W6SpeWq=O<`cJ>#p-lCa z=}-prgJBH#_U4zW*aZj3AORRq;f+UI(u*N~)1s zQvbxWwd0aF#t!N{40dt78p*gGVb+W5(le%(5@p3gJm+^-_~i)gmw0WiXgwMR{i00a`j6gAfIt(R%p!BT z8SI7144*25LC}nIB7)Y~*Sei!`xe(3U0B{}lbsMWLF01DszJ?rI zHnhpnTOYNq*mcr-Qw;ceKqoVr@d@>JUGML5Ao9UA<3{Z(S!FbYRZB*ST17B{HKF=T zEQzYkq^dRoh`<+iHLF+B7+J@>%FwXrM(76V3Z5lqF$g6Z3AL!II#O$6x1h8WVswH< zUSu@sG-)U$NsDX_i2V!`!nOt`fIhRlUnoO4k}i2MsiWx<9jcMv0xalkfX0PmNGkD^ zjjvJfk{be`e0_2IeXDP%^Cg&wmYCeP^^I>W-fAZ%01amlB<i;jtVkz<}B9l zimVL$bbhwey~9q?OR@I9nPD9Kw|aR_uRo}HkYU5_N7gZy#WM_f1C2I1&glMrMxPS{ z44veMrU|VIL@GMmzg+ZIXvV!n{Ui~kcvw#`b;BlHb7I@(bn#J$Rbq~-_P9Z0P||=i?48}W}|xE zuvP?gDOJ6(>)p0HlN3WdN%&zg`d?!3$}2a}%U;=}3OF{e%(a<`dtUtU^#6?wi4R$i z(t-^#y_u5okVs(5Oc9e(kFX1F*kT~IbD&I`P1-aDJ=ZHDP5=qq`^>K;=V#ZC^Dhm=QLv(&mUT7c#`d;YR z6D5qD4sE#dR^4_mKhE0@3ER_n+u{5;Z##s2FYC5r@XAXlHDIhayOoJ?eYBH*B7F?T zjDQfwWRq1(sdAETNmYx_+C`ZOVJ^eXG6X7BZiba0o{w#QZs&UM0!SB1pz-9T^&>?p5fGH8-GVvj}gb9ik8W&JO z&BJFGZ~Exw;|hvP<<#?ct*$`W_~WoU2k(uLu9hfx{PE@Dx9?d#-i^xQ^uQI7>GL(8Z#;`Ae#evSKWc=L59U$=9 zOlbV6yAfHwI{GaW>xaK(lJh_Fw@j`a{FbTb0kRVhzq%jOIS*Hy_mw7X%lD9&G9 z(MbnQAS=7};s$s3~qrSxtBa?cD@4Jah}c^Z(g9 z*I&8LtBfBN5JCv4L|lYGTtp@K0FgqgM%0dDyUo3j2AW=IOA<=bghmO?O`-AZIdScn zv?Uh=-}qC?H~7DJ?4SM9(!09ZC+Cdk_#BV4^y-~=_UtpWXYBXc&wAFgKKf6a9+7%OfE*m#7>E{;%E68Jg0b?qV*C5z`hIe1^d*p_!BLQl zV|N1Qxzrbb`tLjxK2|;ku);(`ASfAX(;#O2#`7Bh*pLabL?mjD6@$6_A1FH zWbvWgj{8k_?qg2O34}SrT`Le)E3=^*#nUek&b2y3jpFb&s{IB#gioc8$z6oqqEa$L zS0*ZHwVWYrXaI0Q|C^vT8zDt{CX-jPno0Exi44t468N*#vTY`2n(&)JK$FNz*s3FC zWiO|!$(&1q>K@RHNvMQ`4N!x4^xZcvPrrhjOGYS=C}5%jjt9)pRRB1Wf}{ApB=r+M zhLY)+;61he2P&jUGi5x#zWnC&2UH=2Txq=|5856fZ-bKW^jNsCp1^Hfy?i2>D&U|H zkcZ@zF8<^rfnzDUz6Mn$nnBoPQvxR$YismM$!I}Tvyk<-MBVM!?Hk_1MXIVu($Nf0%69xSs>gk^8B%NfpD!o8s1XprFL4GomS@b zXk}{6Dp3noIlx7NUBugBkWDp}cT!cH>{WI%NMw_%T3`awS6pZyvRxl}NxiGD!>C*rXDuyDOLDd@&GZbSp z;n`?q((w@uOpZOHzuejDF@q+9FwJ3(BlG%DTNEZZ)v{I76Y)zQUf-UnK(4)qEX*cgV(KCl+8JeN zemMPBa15X%xuhVNa3K-@{{J|G!~W|(ev=o*2k(*THAun-yF@*g_WUL2^>?eb^<$QBu$95 zMJ=Wdt--cr$>v;{)D9R!Mv|xenMuqTu(yeIb?!I_cr7(E5(2tMF+;6~>d#e7HI7$B*7(FdOf@#=mq~SXaW`e2Pc~r_{ zZ_y%_vvfSDgy(oIVoy--)-YJd+aKUW^lsJD;?TWYxnUg?LP0H%E^HgB4QeS<_xv5y z!3KwED5BF$9wzCK6~&>4uWxrro}$o~s7y>A!ZfJ)0L@ULlc&PUkYTZqhl$`O zp^`?kf1pej>ByLPWc|i^`n8~hP%^17qD=aLLGCFOxdYud_ZB!TGE|GtqO# z{6q(9&DwOSZ56lOA{N>29n~Lz@eb?{kZZM}{s5={=3iFEKx58%IwJ)LS-kn*>%YHY z`e$O;A9!W!wBmsX!m8YmS>;a5IsbL?Od z+A75;FK8yf<*V;LYb&V0jyTo?e*~Zesf6#zB*Njyc=Na7_M7UbD2vm|AV?+3n+RfJ z2Mqf{a|7zYG1emm_Qv!_4^MAetR(qF?K&hD0geH?gq5j=goGx)mMqy^DGw1m-Grw_ z(~V3jBRGZ$V8y~E`(R7VWNyH_Fea$Mrr}0yy_8AS_!Gnb3{1L%l)Fyf1Lj)j`z*Ul z&m;F;v;Vsuv;Xt*xB;kjB}(5loA{FXtaYz%vNzxEj^&+i}rOoOBm$$n8VBX!nXLgYBWhn#%Ae z#4&jO+O?o03%KE4yKa|kZqq4a5!|>VvQr|OsS@CXdny~MsU;g6CZK8{X)MyFz&Ibh|2-a(rt*gzR_7pAEVp z(^P$1QmxZlnG4@4L*+T=`mMYD7=1hMde!c>GFT=PeOI1SU}fwqLI*B&=ay%hQ|1C? zhU$a4SM~pQ?y5#tNDdFz=!(n2_E7hLs`J%XhEk@4<*$|VccT)lun8HamNXQhUe|&q z@8A>EG_h-fX4pG3TF_+qlJkmSvZC@g4^1|uMPeqfHHkA$fG>=Nwoy$2puvRZx#^)R z(=UaR2~&b{JfLcDnP5HBp zBw=FA#M$tnijXe;^y7dP*e_B`nP_IH)R#HE2+S_g^7ZqZMFqbs0{*I&`?+$}n(p~YMDy~TU$oMryrnl0z}J5>3? zwi(ZMs7fq$sOs3+ zs(>bASQ#Y1)kaSzJ@QT97}PVFR7<_Yx%Jgora#Ar_YlR>D0UNhVTz2RamlH!tbXC! z>nHgW-YOn>;w^k*+kpa1Uqe3~SDWB=< zOP9|~SI%6za%Oe)?D|?JXK$5X@mccm8FdbneX)EgqbSg(5M0Ul%5YV)jw}XYFC>it zc9B#A&FFc^OQ>4X3Qs`8VWgZOV|w`#zrajtnNkHYMrSp)ac}Ky>ioU+;iPPf_tss) z(hH_M?V^*2XPav^xDh82bdbANg9mgHF>xtt=#Q;CiD+)O=p?eYXcx;_x?QYlolV%q zp8hTs=!y>5rDAXk@Y%U86`XdVOU1lKZ?5yyYze&wS7`_?;l^ z7-$BSt(iy43N*oZCILwUcF9~OMxG{f76Ces?!O-2m+&Rg)y66&8s4AV3#s;!%p8N6 z&@gHGm?llZKoP;jgeKx&l1Ja0zJQ0#x#>ser_}?~yXW?=KCu7Z+3CFp_OD$Z*BNi7 z!xGiE*R~9qy8?*8w-=vZTz2x%G9|A7xjFJm)+=53$;TN*jYwn?*ce)RjVDmPH3d(m zkPreFN`^e+*l~$5IL38|K$X1A2YcVaHJ}qS_if8AmK)_e%`UbJYpPA?oLwyQMY~wf z+-B`by}Q}4hoAdVygRiT z>q=ye$ZRl4)CQA86+l#p0|14MO66~Y!WN)RtzcqgF?(bVkgCZ`U z3eQO%*dNdUU=TO5^=7iT^=5b3ZM}4gwlaD4()u z*t54Fyy7gg!YdO@$1l9Plk1#Knru^eb#lpJ*uJBa!}9hVU<|f+InsJ1jvSn3hV6=t z%B{=J1~uQr`sdi#vj3GP2C8S+FBAHg*n3&a88&89PH+tLaF&}%f(fF+tO{utmBhk(o{F7J#f4#Ie*95JWxol!MS?7eU`;ZE zLn0|F2{<{r6NqMpHU&~LgoR6Re%)qTUw}&0NF_Q?Y_rZeTh6i9ITLqyoih^YlVWn_ zn>;R)vnoodLee>tGeF3q$=Tk3r)u_Vs9^H-RVE_B8l(@2F3uhDh#u*mtH{)-54)DW z=LI`M)k)VyvGV{tJO6PAu`~J9yG`tzIE2`lJHjK1orysjr75ryOFu7ZrcCNRG>viy zC7jk~S2Say0T*B@b#2)6`5POjIHp?1lHIVNrg-OH5zRm?Ap6LKAlVcsW1TjsCHH@e&_Y+k6)SYePQ~`=hhE>YyFk4 zuD|o;)eDbKKZyJVRtAh>i>PXTBboub@Gv10lh0y}5-B9|N-$EEZYlNUvM?qP_KFTK zy#FCjkyIkVN4H2wvfvoj695$5VzSOdf-jfKd?hjj#n_3#Ii@yR($lCkC3wfD;9%{pGjRy9GqM_Cw|MuTv+Sf{J89VVrC}RsGFA1zEV4<+!DJ%kTM3(t zLY72#IYT7D9@cA}h|EPT99AoPt6>S5CX*Vr&bBvD*4>`j$YE&cD!<%_dgk#-?olU$}G?q(TT;gel=s((zHhKArl6ENWr^ReVNLWAaSGGV^FwD#1&UaZ?;qy^=Gj zkz^dQq>SX10%Zi0@G*P~)F@GyEq2K$6T>J6lW-2|9Xgd(X*q&l%%=G@YVUhrMJn}1 ze7i1Zu*e&^`#<#-=dd!TyUA1@ZmP+YJ(zq7C^Oe&3MjMKWNL3wR|_lCU+MOIhv;gF zJ62Zqmz&6m%p344e1MNJtSMx12b1n3YYz=@$2U}Gma5EbDXC3&W!=6eS=#U4e{b#3# zzrA|m>Ge0CTs`;L`qeL9dh5aUWw3?BiL{D53NQr(lTmv~v%lyvN)xtEKEOAf9?TdS?dhX&L zOxL=&M<}x>?%7-Pfff+;{3r-(3;EHL?gK6G+(dr#^xq-D%51s`6n-=7uB4It=d{Xx zyOmkpsO-KZH^aoOF5yi)wJ`3EiBi+M&(9(EIv*jGSbNY#B0!4P>*qzf)N)sp{vhP#bZ~qP0a$vCu)ZSvk zC1;sSxPaUbop8zgu1dHB_8lVO;<%B7OBVpnx&Aom0IOcr0kSxDHmlP!p1+29`c1W! zK^fz1ZYH&H!63Jkn=vC`0j-#3;9$7_rab#rTfyt7h4cgm*nN`ubek61)B2y%V6bV#Jl)5&s?V9GHGK+Fw%xi25X zgl`I1Q_JlALcys_hNc!$GGb!L7%7=*EiDsM4x1FpRF(QkzMVMz2^SdmLnK^?nf?#6 z374!dCR`c>ob4=KKV!c>eRK3`R}|afX6N2&wU-yl`~0D6Uavjsa@hJO_7**1bCx+z zSfI=?dcrau&J(t`7hyE|Z-VG-ZB4$oKE$AG8Y~|MDQo?nW`C(Q#n$Or=Vjd&_DRPv z1G=whrb8URtZpLQJr9R}2^GWDiU40S=(p;p>pfP+HY+?Ol&Q2++gcd)m>FC^s&8Ix zoz2TlH#h=o22WV}O(F_5&4F%4#fB3In2cZ)%biFzsRcnRV+dSeDb$fj)ev$sQZ?WS zaf6To;v^3N6EZP*SnI=iDx*cz30}p^3I2qm4lz8%r1r9|md7Du_(bHAL~P<4y?HeA zh3?Wk=KT8~aD`ddu`r`HhI%(sucV~+Cdc;LdMMGSIN#)>kT*%miizd?D8N>mRZHiH z?zXjMPgwOIoArb}#cf*xWj55d<@8(2f?9l`THrZrS)k0Kwd~$vH4uQP|LFA_-cU8r z>2G}i8r?)S(CKe|z%P4)FxS5YALGA9A&XQEZ_f;Z{=dULcP+jps!1ASt!9F!!3aO= zB%9P>NC1FWGQZ`Xch!O#tZC7-W@0^dY~QHaQ9YB9f^F7CHhKhG0R&h9HvlOTup>4@ zsPY>57{VGT8JZl!0RSVI80IK>{ad^%!nbV^mN-c*b7f-qfKKeA1g0?`2Z?nH-z2V_ zfB(bqUR1nWA#Z9AA`QQ0y%3dkch8va0WHi8j;YiOsillyW!77p0=u}_0(*N7sbtmjF7hjnUb5UP(m@5cbgt>cF&D1^6Jj>iSt=lirvyVhuDTw)F`&lQ5}KU1hb;&!&qO7*c`l*2a_W-$|NeqV83L zU`4WGg(?abC1^jRTo<_vxu=XGAzz!(ycN6-k*6pH=UMYsX0-q@b|CDX!}@^5hGMSj4V30dSSPuUrwc0*JZzV&@7x}7sbl~0*7M9qA! z{`n65^p)X&-jdX!S)w1!XbfIC%#G7JE#=U_*NJ9T0d8pk_~K7 zWoriA7Wve<^x**f=eoUj(yMb49g_|7{tNE^ul4^ps%p?lZTymhuFcCZ6B>tuVKs*3PdKBKL(-T#P6#tdaLRx|OC z3Bep4s{$Gn!RafM3C=VGnHLa%0ldH?xC%{b5=Y~foAO?Q6%mgslg`37aY-hwkU2`I z;f1ha%%aufyfHFIzFU%3z%>qrcB*d3VjTj!VzP+{1Vnqp^?C5x2f1Q3o#!pOw*~LYcL%TaWmlJQEmpTH1XL=kaG+x1H|cqmAXF- zY*5cS8Pda^q3aa8BngTP|c)r$Vn|jds*YGL*VaZu!#ViK&jNP-X&}LL3 z{He;S@$&@uM^d{de0Hujv&%v~6$;c%aO#a`+(LN-$VEss91JmCVy`R_ZTa;bG-|t!Bz-2Fk^R z;Ks_^3T2dkGEXQMwcjLE4Wb!KvbCIXMOc$XGb4%Gb+TriQef;}4wPXcE&<16bUhC} zK&!oBWMXMIfFold`8Q;aRobe*0ovR%)F#QeRU`mFMGE+H*0tsdAX(7b}Ok zQQlP!XVNQ&4UYu&`RNubhx=wUCwi?!NH2^Zu0}s*Pnr^Y*H7Bn3d4_3 zvlBypfNW;nsRxdr`}EeYp4eLyi{vbGViDfK!NnrX??SPNNt12z!z`Xqei)FxS$?>? z#Vhi)a0z{kq8ZlRa%xq!2h(Jy=8}eH+N@Wn83Y-2Hb6R)hm6+LAmGqaFO$3wvOye! zR|-T$6^l6Ps-lJlh66_yzz2tkIlwMLjX@m4VkK9cS9=)FCg0cg(gG=c1&(uz?-CtY8Z4yxmH}>Dvsf+K_4Sh$$HHzS#q!QujxghOrl!h`3uSD z|G6fZNG8mE*1gG9NA#=^ovEP_Bu-U+>A%;p6jWI!AfJ;xn?U%+MV72VF!w6 zz?Z|=w+Vk&!qkD87HAbJz9ZT!}%icy~U>LJeM6_0H03H5ga)A4V@>=q2|aX;_;*ylNn3 zDzed9zVbA}8r@}@3fPpynmO!?W-|$$*=#(?3fKjWFo&^KBLpsdL$>D+hQ^by6wLLZ zNkk+Y_>wT8leuY~3Q$-PzDUfdu#tli02v;`tLn*}_=kAUM0JSaS#gZb!z*0#t?GjZ z#PJeUA3`QcFliwJpfs}eF~FCaQKH;h8iqxl71KO;?cZ=-=E`R=C^O+@uM(MBxFn|O-@7Y3TRULe zos?gWM*?NKcfP;LqZpqY{oc}~$*DI!*~q;mOvCBEx6FJa_m-j---9%K$EHIucKu#D z*xFm#tArOP2{G7-}- z>OLoPqn1T>M;#2|O2(RX65;@!5}sB$jtIs+N)=QIZq)Yj9?T_ac6Xz}HCF~&>oV60 zSi=QGSA+yRPYtA(y6j9+MQ>(M8(-zXnH#!4_YT;OT1)f0;)N-l8@AzQmfE%u#uD8S zWv;}!q8VZ?!)~y!=zng|@${Xz->!E^*KZ)5 z6P1myv2%a7(kgkofm?vy>z$PvCkf+$5>F^ADk+7CW0Szme0BeF~ zIIJp#rD5c0D%xOVaWPBPsTYgGc{wi>vX~v~mDR$Rp#>F((NUa(3A#OK8za}n1th^l zxwZB1z!y*p6V~guIami(?#-V{?NmU+NK;6_U(rnc|H__`d3eMcNybgpNU}X2y+-oX zXQ^Oij-I7re!8<%T&td?(nzd>ODdRVI|9kdEEc14mR^i5!rD$TI??BI#pq1tiqW^< z%^O|O0lRtsAA4u}Y)Ms}@%t$sOc_ffAwew#5do2k8p_llSHhdX2*W!J!;8#-fPkPS z8U-;5qUZpjjDk_4L<1ojd`qHMv?_iuAM#h_f#1D9SM6m_Pf>?6_g+rbs;+%@@7~?F zPoKM=e%7Dq?0lOhALNH$Cbetaxnbin0lWz_KrjDlDN~i5cUY zETau}siGOh9Fh<<)+taXop2Jc7wk&IrM*^%MtUOd!S@8PsCo9n+0Yg==u4_fUivXZ zrR*H=P=zdVJR2X&HAusxhXy0LIegTe1Rcc|#8zX$EOCXxH+f}p=Z(SE(ATERn3t%HKT85?QBX2`rIq&0~Fy z#-wn7GRig;1y_Acg*d7!dh&bI0W(bO!d?qDDf_5Gh3K(#D;O)%So?gSETu4-#VGJ_zfM-go9~|Bq>T`YbPlpSIT^n zqE((ANXX@sx>=o)3?qHE2jfpWlU z!jhkM($4^ERJ^j-%WYudh6-+g7s3VT9B>J=jWrqpI`S(toQiFX13@#S!>PC`4G>IC zij#&w$AX%G4}hB67)(_f5?2iKz8P+f{3svSzw{Ucm|CUkT^h<rKVZx^7PPH<>@gqve&8CsXqfXBg|}`p0!y9C9_O1 zC@jwlVo-Lz&IZ`G2nJ>6>udtjm!sJCW51>Pm}+GMQI1SZCuV4fV-%3ah|1R4l#g&T z5CAo}NwF#)nL)>smYz6GT+S8Hz+1%d#fS!qRMv7%m1RlKsIy`6L1%+81GopglD(Y5 zIdzKB>6HL|q=no%o~vaxp^R7!;6fDw{%{Nki1Wz&gc-p7%)J8K#L_P}<2M47fqJQJ zwx`^F?@71Zed7MR{_>vt0XM+eQ}6urNe4cfU8mf3Fa7mLXUI~28TDB`;fyLlNocrosm{7o zd9rDDCH$02m7ZCbYOIby0b{$B-nC=_Zi4$548%bd!7eEol@p?wE1rG+*5CbK?7g3U z7*N8S{W%Apr2o=?{x|xKqq*{5f6T5ayX^Zv%<_z7dCq}*pa0K3?B@UZ->m&8X<}DB z_Y?Y0f8Y^N0%#x&#kRFpC9H`aqPo@CTfxm6F1hlLPJ8cQe|-8nQ<KpZ%(Kz;+8`;6l&i9R%UUP`E|H=E$ z26qBRfv0cSb2WQ`CWhq)$IyT5-u+NADr1h}kg2n*pUrc%fH)eqi;AOR$=SJaG-K*> z7t!fBn*PG$oYt%A)VSuQ4#Nh)-_(n=^AAha@Q2f>4JR71=k*-%gW9sb=niZ`<$=76 zfv~A7er5aoLMxDP+PA!#LyFO&h#ou`bV6pqDr=bUA z2=@K#SL~Xyi@)+p>XK8Am7dG?8AEbz|8=)$ zkCy1GCDEvFv)x(d%)^c9auY5O<759XF-$czVZCXV5b8NpoTP)BjvG3yQg7@OcA3cx z$5GRn;j&$FX1JO&3?m=oRAx9p$ZTe~wb?Y!nWZjuJ%jCnYJ%_lG|&0AR_S(TBQFH$ zOHQ|AOf2$+f%k%s!OaAku|kuDnHV5~G1Mj0NC3pXpZ-#P48SF141nXzho7+M4;I|R zt||M#6W_`qa1xYA? zn7(F*s;TOn*lW%_hh0;4;{H2K9=HLL&b=`GM_;fXB^_}Z@TrTkAu`7TEENc$mH(j=mUGXvTU>J9O=(D`>(rY_S z*d0$Dn$#Dbu3xFM*)wG9v{40o?(#S2E^$B|<|KcZFrH>@ohn9;ZBAErZJl&G{iR*0 z$LghhmL^m)+F#ny%1phq2ZYSNw6D#&KVfCM`_r#*m1f{@+@CNFt26_1$*||s3~({C zX$CxSDj9aa0HaHkWIBma*}@wCWFvBE4~buQJ@6I1NGfI+aP3cj!LHLj^&p)BooIno z&jfkkDpKc*fQBsr#)fBK_WccbwCl59HhDkUXwLZjL3U+KI&nOKX+$caA>E>$m$REuChd*o|FUbi4_?wSd#+^H zdp`DA>njNj#g0IkG+w08KC?O7UcpN2Emv<`_SnD8qPn6ZBA4?T ztnKGVaExYl8DpKKWSEL2^Q^CY9RLw`k~oG2)JwKiUfL@#X8^7us0CCYq^V_OSQ+x^ z#rFN|m*Acn>x7;A*i&4|p6@;zl;Ex^s?9uDgf#+%%z53?EVM?cdhew_bZo%`Ftmsc}3FKijw8bO(n7 zyVU;)$LzU^{*(6KJ$OmF&lejI!?67K5*#yGqx5LE{}r`Xjx%?y8;$z9;@+94SZq2f zHY2xPRBRZm1x3Z~e7u-@)$w9Dktw_gpE4U2yEd!P%q)jcXp-e{2@1_EMZIE&Prb@u z?NsV@;d&|AzU5P|L@L!_u|XiL6oz4eI|eb?PzZd{w|)SCIO~yru#j@LkpR;lppbr7 z&Fpd|&d0z0%$FDzAuww#+1?m~79^}p)_c$lE~Fp~W0=7!85RV?RKYZGD*9+@a1(@$ z49%|lzpT)>1|Nm>q5tw9{0JA7p;CcC*=BXe86@iytMNxA;OKLkKApW*Y(UbRVIrZE z4&24ClWx8%yOc=3`=0wZbtik$i8~2p3N|#K*~$t{+`a93zHEdbERJIG(OMzOdlM5PtN-qVJ znbk|J&0Yk6XiBsdreOz&w$fOFXp4Uh3m0we$a0=R?h7yH$%M1zJY`(^Yi`d1%*Yz( zL|Btr;7h*u97}#EgqrI9{SQB(<0;3QmJP7t0?aUUzTg{IWs}WB$_g9-_W(OGOs|u^ zC&QQW5zYhOlMGEgggMW7^hvp#T9o^|$G^GJ|D9*(2Rw;XYDm#(WqxZ=D-%BTj!n8{ z-vLWExb;dx#%zL&`)XB(ci#R9`lFc1NNx*c48sh%PUrf=k8=0keC72Vb?Tj;O26d@ z=zQHd7tm9oOw=>tlDF@_OB1gI>mZTwf$@-2Zu=xXKpZ*)XzKeR);Zw*(azrP*;Z(D zCfmWCim<{T?WsKJGwD@nPp4N+d#9vVg~3{Ua*!Qa&Xd>F9^N~Z90U+Dn;c|q)+d)) z4&jpvl-aUAIcJ;F4twf4!>mtksQ=tKOy}v&xXP4v2d%T!y_5Q^X+c)~8~gp~f|VX3 zG;p~CKCa&O)15tw>}TrmB~VdE4gU$6b3si3~Y>&7m9vERt6y{YRaD z5k9F5lPZf-iK+g4_hmId5RaLHm~Lulj9lYk%ORX4Z3w(PhbP_gF~%Rg`?3XQ9`lFq zB$^|8UbU&rW0pu{*lez;n5XWlwf;}Ij?sD=s+c|9YutMdour4oSiePs^WBdFv(@Da z<_zmM*=y+QeMe3`I^hsXMB8qA3IcHq1JNu zObrgEPDfQZwKluLWtOQG4zNeJd57QsDz~Ob89l*W>fg%}a%<-G z+Q_CsE@r76ENu*DlZu&GK+FqDm;d^WV1>PgFP(kx8y0WkSk_?7VP|~dQF=@b977iz zrUBpr>;PWCuP`QrQ1Lze61afZNj60$CRVE#WvZZ-%)I{KqZ|d$2`iJ%*!mY9HD){g zOm+PAH*ba%-3_85lO6-a7Mvx_4TIl(&wYK2irqiE;9~faT6rMj;a3P>65e?O`KY8i z_llmWz#`MbSgk^Y`s($w=R&UT8s65X&LWGmWmhF+C?KjA5kXLg0_{**5G z>lrntidglvl74Dqt;}T?9ZdBTF#|I*gV|zYpf2k+0M|^*oA{;| z)4f~{PvgBx4~IuIGvFB8@Gd}^9HqRbn=T}U-lh)PAZ$K(*$at%58NG#cPUz6g)d0~ zoMAqer{3|mQ}Y|Xv^7Il{NKK_Y4X@YXmak=@@evIM+t zndJ~k2DyT5k!0|QOW0VRx4wieJx5l;21wru61G5!dbfL4O=}tpVrp)^^-ZPAMc@7b zoxqedh)W7nVzL<*UDjYmG7M73^%%OvQix|fbP%tKE+mK$zz0YoscV$H$mpoHi7Bv! zs!0Qrtx@0txJg^6WR@3!PSm~xSL?>AOpnD7*pgu8b?07SmR|lk2GdA-U&S||9HYHB z{8hWwEzenRsUb-Cp3ZpitND1!ZOCgT?VTU_WX*P%LjqrOR_eO2pN&|Bf0Q(&%Q zrY>#i|FJ!AigEAGsh;w*vI7;YOww%AfeyCoQ9WR@hbB#Zxz34oh}MIStMv%tTI^^* zZ;Ebx&fR6~(X4uGZI;hqmdNw^A0f zAy~=K73&CI_~iFCf`%UdW_r}t5WZyIJYk9|83D~^rn{e~r^W_bt%(3*0(J~vNY9>p$<|ZD4rTJ1DG|)LnA@@pX%N*}dkX*53}DbKs?&+0F{p?eVCJQJlOB+K2kC z?XRBnf7Nfzv)94yb;7RcaVk$e^`954qiBW(8c)NQcHRF-c3D+>{h`O{zx3(n4C}31 z8YO(`8S79EV`7oAW?RFTG7KCeK+*TK{@`Qa54}ZDCXP4Qn`j`Ahwh>DOT#dUs$P3^ z-@N&%8w?uvVi4{~z4Y)UN)2!>&`j)v58ckNDN8{mfRQCUy+8HV1`S!xy7w}@QBJHON__iDMhhUW!a4zq2E1LZPxS_Lr*fhnYX!PkEuzEle= zrwuW~mVjr=6vPO(semSncN|P?=*ZV@CD#yOtmuSprYC6A@GVa8WSj&K=){6 z9!pz!P4*gdWQkBS9P*I^6Vo(!k)ULvsxb-P@H_R8ZJ9d`reQGz=g!X^2jjl{T*Kak zZIo-+b+DIV?}9BOm}UiAYqRIhEK~kPmYja>l~}AV&*+Lexw;aIb#j#_d#jPF=w=i{ zcx{96HqVRurqbot>96noa3ti-(>ax03DvI7ktl2!78VEh2fK_PrYFmD8b(J4)8ITR zP++6jWVRd*;gPMvSOE=!-&*vbYhp+}r`pDN zjCu2X>Uct4y?z#l9Ko1s#=L}>YFOk~T1+*Kmk?9Uz1ns$)yt1K1IqNf0j<>|&U7%% zMx3q9WY-1COlQ{(8eL9y-R)l33@Edx?7BO<8aZs=q6(WWuo^i4Wq|2~YO^)wCBw4d zfi1$#SbLIH^XeaNur;aBWcepCkS3`k48qK^58r^4^^&KbV{n8xf}zM@S@^9kDIgH; z7!VXQbZE2Y_SepR?8#X02Wl8xKY#P3ClaKcG&Y<_Y4ApH^;I_*QUoyKC{Pi+3)`3k ziJ*!LqhZZ~6s3yQ`r*uwcp`$0vXXz*l zNtWjy4ULCv%NKDp4Lc(Bi;b5l^$SpDC#8OIwh=r{r+!IeHuZ}TIsF><$8y;npTVaL zqTBwZtU1D4GsK;uxUol5tnP4-Je?B!2NOQ3wBQqJrzsUzX+{9D19aFp46UX$O|6)U!Ah*8sQ$lV81ii zZ<+xgTO3l$z)Z5=`sk8uRr-N4UTp8qHCqK z8i8TY6f09HrKw4V<-;oCm4ccImGvR%+*@C*JKN-hogVAFxM!JS!rVn;3F35oNuBvl z=OM)DK$*!unQXtax(!&FuG`RQvK@6B%cqM#?hB%ec7CSdz`m_X7j*>yNkqB|N~Oz` zUGdEGETWk70IO+2jV#jSm|Eh1Mj%U{8O4lYJ0WA}>?T+NMu1e1!o2VA4qEHlig7t8&ea3hQNXeQyUN?wjC<&$pkZ?u%AmWl+k;Y$)%+@;vbAO1c2Ldl5i4U|F3 zL-^8=(y$|JK3aP+n5OQTp`oGn^#XJo%gu$areT}vHkMBp!OARxF53B- zf@`9U`mjyWMX)lnbkW+ZC>=o5Md>1}RYCK^5v7CNx3wsJnZ>q%$Xi?(j&8;^%=0o* zK}s zX40^bb!Zr=toJ>1Fya;Z=^=hzr&9fOuq(s7fB~RK>TCECDTsvQhA(Z?7YyVJ+rl5s ziH@K@8peIbAH7wJZ82t<#kMTH>9k_OE(|vqdqx7A>vfAC(}?y9SS$i?jGD%u$-bVEg5y49u7q!V08p@*lULlE!Pc9B90Xu4-g z-Au;#_OC|?0S&^^DwmNeu)Ow=NTx>=k0?TQry0d-D8gbWB$N6aux z95cjB1rLFWRJu4VJ(&7sOdX7>AphzN!|aiR(dzxt_-MoQTw+Jf?{tW(7v-q$&Y1Q^ zmo>8dmix=@AWOH?Z6_OsVc2YzcIWR|+I!M!ZOH$z%F<4IHcNZ{U#+CjOf{RO-Kb|D zC*Sk?QG$?JDfHTGb~t94$_|&yn#~SJdzBrI(D~WyaM`uA>~PC>zz@1GdpeZaE)ICX zhcis%8M;pbAcuG$5x+4y#W60WF3&xg8@nQ91sN~~_sWnR&dB6y8OGj@W`+is#$mMO zQD~TK*N-%MkLU6-6a}-Z<~xREi8+H;;ueBR=u_{NHxRljtPJ;=k63O#&xSsxfhq&R zRDJjG&Aw|VW`~1upUn;zTV;o19h}V$*Kbrkbsysyr`%P2Rc#Maxx-DeQwhHc*E(n( zmY6}fIWQ4^mA$wj5V=E7grwbtB$RQgy2{t*d2JS_XO=11Fj|=vPM-}~R7SVL>4zDz zm?wK1g)9O)49t#o(hIN>bMZ6zJz+9lkG>>n0|wJj^BeI;8bmPJiPid)0tnEIGL(v7 zrWg*#V0;uC)i@)z_A^ZLbk0VP*rgU3s29&{4p1s&n3D5X_C+9QM3UtQ-uK|an#>mv z1JNRR#<5rius3Z0O(&RPbhd0YCF~_sQ)0<^rBzeX4!@cbPLo$$H6?Fy7kf-sQ}Q*{ zk2N3Tl&)Mpr7zH4$(odQ4j)wfI<8f-fLZO<;l32?|kjI z`uctEdXpzJV~));Hgn85?)hxSm^znG3ti?e{;Hqeh8~I}ViMN5S_snS$!d-!WC2tO zm28`081Ybp7>g)1sqJs1FSW6rugAhltY(k8(nSK?MvI1L{K87)K5u6cXljdWVVy8~ z(%)soE%sD2GuIM~W2TkHbX>AiW+33IEX`FMTNwosXqq5Bdd#3OgR5vJrBnk=a6=3v zz7d@ehTDRBxJvTZ+gb2o*e(c+CVrA3Iq9Zgr441A($h65PzFg1F-vBz3oapGICPf3 z%jWOD=L2royT8k}%_L~UUfA%a%Gld>4%*@~Wkm#9W#5iJTP{MasSKhrN$@neoyLHC%L^C#~KeK2j$SeV67Ofwol}jJ91DW}1 z7v_h{0hpf_WX9(~MzI=LlR&PCOmn$SYLapd5g$rCkrI(+NDLfuC6fFJhsX(YuE|M7 zHh`oAsEdL&gKOg9pCa%#C$}V7X);5zBea$bA*;5O{Uw9>?X|^WOYOwiWd_q!tDa1_ z5@~nr9R&%<(;ms(QgD!Hyq$u2Jjn^cpQjU=-Io>dcGkwoR?fCiCLtq<_c{91CfnI~ zn@R%?l$sNaoOWEEldY|dE@RG_+{*AChtSFaD=q|P^vtF86@ zr7Q*INoE6ng`C?qWBHO>3j;E08GWy>Isy4Z<}qo$ZgzS0*9?B@z52Xt!yIaO&Y0zc z=`b!lxk~ohA@b8f*!VeHcp|d0?|z@>Q1rJ{{tielozQIa(oM4Uay-{cN7xB(Hj5KE zM@F8I<3ATc`4cY@vxUo%r|jbLs~t@wT(&il>F^0Ok)botMCO5=^4H4S+xTmhNq^#B zE5i5f*Qz^P>L>DOIujzG8}K3tAZa4}8e37-R?qX0PRET5niknMMlxSgvY|rK)SBDmTqb1CQk8>7 zF0Z-N3e9=D^|5MsZ96Emidp7U;oE9l=V$+O_s3AF47Hfl-+?{{cgruK4|avDr8mRu zFD)^Lty!TSJvBIXQ-;l|{kq#NroB_S_CPI4v=$QEFRAm$t@~R?QZ5`l+A02 zU<=@V=)Fcvw(ZicnT=fTDs=uu(krP-{cNB zQclF)v1Xa~J*NNfifw@B2^=iXK(WnOozigo{wuZ_{83iB8MRJ&&Ga&scr$}wG#nPV zfOzt0nCc|+z{Ge+mD8da5;t_tkUAYzR7+-K)IeGFfl`Dg(weEuxm4Ie>y$LrLn`SU zZA^|Fd2wW9EkH(q3t@b%cMZ3BQYX+vhi-r-ns@N#YN8F?1Wh!i9yiBuTe^XU+xcEK zs6s>6;t~yZcf}=FyXrasQLF1zFx^IVotYu~wWY43)ULXYFgd$+Bn>?e%8ihM`@0p* z_yrml((=*Vj(^HP!Xl5`XPDYH`6|5HuiVWt|IG8h2OVx{5oPfR2Yja}v*{D!## zN+wE>A++V$q>zTi(__w?s@|IEP8L0w);{1LFQ=-+@mxNb}7;guo+jo9SfHO9Ro~Vr(+3s z$GGi|S;cP0eBSMfVlNsTEK0H7o4FyBfkyf^%pGhO=5n)&hByoVN!>M*mM_AAwHb0e zOgpa9_(}b9Cwnj+)<~OqE5*fA>mu<=35XzBUex_&b z=C`c9RvzFAZ9uzV#WP?XBs7Q<@)>pC6o{}+#fx@kdOt0e!V6@{RRxgop~ZX{4znx; z1u>E)y*Aahd7V&WkuW(XkO*cvS1UVdaDY^XzC&|nGX4YzlZpuE?DyA(EY1e=H)?-v z`7}mZ-s0YDU2a<E8W?TBuIz7E>*<*uF3g>K55|1?!6sb(xfwfxJr+gZWOWEBs zWO~Xi-_QGdhD_eUb3H@G>-Eo&QPOb682A33Ap`7_ga59Lai_uVF2=oT+ni-&!(~g3 z3Y59+a@5m6F~;h)%TZ4T#WLM*yBxKlnEED2%~2cEAdnDzs8wNw<|+n?V~$!Fk|-!R zAm=m(mU%-Boxmp;GG}5I_#$fQt!UapSyr>b1fT;@4AN*u>68s-G>D%Y#yFnrE8{BS zBPe%kLFfG!HxjrN;>JLk6GO4vc$}ZG@0LQb(~BEXFtw%178C=7>_V}t1G|vP<-jgv zY1U0S4QJbHX^xr&x$WxajBGD}UQ_LOLpKA9I?xB%c2&!}c@*(!H2zcs9arrnoX zZ8Tw!WTdyYfut6<&|s77FJqWUMoi`wv~7T%NU(TJnp6{LACL!gmu(xVBH*%Z*sig* z->b{EVaFJ2x6LSqq+7IR+=Whp36G8+(Qh|fqBtl)nhB0v1;AT&2h zUT}=f^J(hswP^H)9y7IH&K0_xD|CO(6}oJcyah>_R~B~w4?xm@kX=Z6wX0o&OKaEM z%Isq3v}@?3ROalB`3Yawm>(!}{>J=*vlW*sa-f6LQdrB6xjb|1wuU%>gOqBOsAoY> z%h?G>ge+~NqsobbVhAw`OuSXH(u$`=u?1O|RrlA)-dT~=$t3jap?LVu7jx-IWlE7s zEt`ieFR;UaV7*^YCx+bGsLmK`S;U`hJJ{AIZ4zLs{Brh-+y);uV_yAxUN8Y+nMmgB z-sRd&S~Tp(Y(K$h_gVujqtSVw-kBm~Oxp`~Og9+!m-+R8dWhs^V;WX2YW+4sg>9pm z7M!#QYU>1SGarVkeNOl?-^{Q;Ko>hsT$h||OV{A68}%}y`WO0Y*D@C_ZJDdB%n2-W z&%;S7Q04@dxo6-c1w=l^GWTpY0sznmJ`z~qmw?96c8_3xCzQb~o3c4j7AD4RSd-oaVJ=N>6oLK99R{+(L{w$~eIyrEb1u?&+PR zPz0R7GWR^3q<9C1`p9luU)E}yKyt$QMZ-c;k521%dJq~WH%u`SWn7E?8iCDeaaiN#N3bDO zTlgBYrDB`}xn;jI~c{J-S`!0e1wp zwgztLn$1&DI59zc2pg6O{@8fsXfP|L5ob)B8}u^E4mSZ1ifRZbV$n2sqMRgA(Q-b3 zpvT>KVKVpqlR5rJi&AX9*A#>g1b-P4X|r1vVhm_T^GtXy3uNy`qv(aeGTU3_T^iex z^b}{;@)qjI+zd`>+tb=%+c0BV9%G=toKq37RMAp|PV|70=A|SZ>Ryyz@XJje-@= z5Hl@Q;JFM=V#GIE%!qZS5w1x9myj}^30#Pjw4UL*G=L0379>xGjW@}sKlO13d@3WA zxyNVIXOr*&pUp&`z0am*zt{2EBz*Qhn~v2P9Izw3a|i5b;kz2K5n1*|?g+Dcz|NIp z)L(hkR8IQk1)v2cNz;z_xW(rDKP#9>pTHITJU%Od$PfCtUFC?;9aL!oAP@wAFt7^- z0RV3F3{r^F8YKYJ)FFmc_jpC`Gn*tXA%1T0!mZi<;4eP(&{NO8@57(88H$m#Xx5u) zTK|wVhvK29o(qNB??3u@8>+wiubxQKyB_`EZ;IqI`r)^6ZdW)w^yIT)mAZcK&pvR? zbG!cVFF*S5Q=hqxV?;W8x66+_)?(UszyFCe_4<*SQoXxCTwYFEJ)E(a8B*vg!NaqbCr+6KAbI^*2a@3hTW-8AFewsq*8wrAUR zciMK4Whl*I1Z|K(tYBY&$Tl0;AskT*qyM({CEiYtYX}I^YNJ+f&D-ORbD#O@%Rl|) zubz3~WpGKZtCfKgd$2gbv(POQC77} z3t&+&Ic@sOIB9VXB49XVDK${4a(4G_v0iyXWSb7yZ+!3j|M|0@M>ZqGnPfAlx=pF* zsgc1J;FT%+fdWdh-oNY7$0?{v{*C>c_=yFB0UC=^oa zeII%H*UkHq^3tdqK9-8I=sx=F=fCpWH(vawyA?THkA3b-$)BY+MbcCaV$!>my7S6w z$?&J2{X!a`8YmTo!`-@Ge)Y9)eJ4G&Nsm7Fg+!*71hT*bIFdPeA|pvf?|J;myBWUr z4My+r&wu&RXYb@T{QvkPPk-gLucy+KLTVBY8Q6@>-PDghO*}e|WDBc|Rmx^;gEJ5U z(Q-sG(;M88Oporo@@hIYXQqNE!U~@f;Grul(bwtWr=Clz(u|Bo+T#fP(I@@}B$1Ix zz=xjH1pfZDuO}(vK-oN+IY09d0Xoa#^vE-xyYtdNrfeqCG1j;UrSgDy7E=iH*x!CJ z&%%jK^Qb-JmN`Hz8CXCSRivFkFiFa|A@X4YGv$0)h!Lpm8XZRBejBZEPj7UH1nZVs zuYc=1Nqy@_KMuEmC%CcxCF#y9;r5HLWvE$Mk(7kq z{P!Q^n&mvuB*h(sM85uS-%TKEZIU8WNlf^pIN1Vvz(()+z{hhN{`M$EgffqO`g18I zkdmHx{-rPsl*#i-hIGxO)>h182ZEDW*QX3Ak15T5f+wa2Q#O6Am{+7nAR1LMV zn`$YW*UQ%8$vc7IJWjHEt=aE^85p|i&7B}y;6{7P+|`uT7(3HWA3d{|muCqG2#oJl z%_+6OrlzIYlx?_U`xiavG95`eY%J0kYw8HCsO>6dpf?g&!o77wi*`(!bt!n9slADu zxMykA7P4$pr&iC)-;OwQj0pje8-vQw@i8V}bC&0Xk-#I6$bytGqLke7=N(J{`UzG@ z2DoLB$YMZU+F@i-bpD84vO*+`AVC0RhW`3wL81+0$PybSK8v&=sjR6MNeht>a0`S& zToC~Yy#pM4`zJrmtpk`|u;%%F5$XwF@@Jns5%VCUVucHgNFd-K9I|jGDYz$iD1o4; zgcAUSCGg~zUr0E@7?{8Hqn`u;=v$N|TByy9d(fq#w7t5Q6yx`ZtU}OG^M;-`+qENWxJi5K~f7Qhu-$7 zEz-O~HoKJzQY&BNxtM0k*+}Qi&h8|&gsU`hrMT=)a#$bY7BZ#^Bw8QhKE1p8kgHwi z=WyAQLwe-cMGkq491;`hiyZP8IV7;}NatsS=g1H8>lw;NoJAM@K!+5`FKm`fmigQU zD6m>2XG#GA>`}s5!X0EMDjJH^n8<*GEFM!N*}qvVDy)L@|JeQ_3795p=sUnSwnsn~ zh>+zdIRDOdjQ8LkAf zC;~o0iJ?*-ialzF^Ce&y4jIohGGn{ELE1a}#05zYYXe(TF+*gM3UMJqdnux;!o8@y z6tz$>f5O1cJkShd_T2Z6wkw;=Js z+!Q(9OEKT86F5JghnHd?@{M(VmJgBAmh&@_yUx%456^L)WhvOl4FUV+iqAiW)j1S> zrnNM?2JiqHkD zkmCH-r;59cdEu3WQGAGCLWv;&xJfEaO@8DD=u;TI$ZQgDk|09xeNmdy51LzSXu>(z zQDK-#1Sqa_$FUW!^nc`($`Hfv1c0M#w#@(BZ`EAO&0bJ73MmL}+Tk4(dHQhhX;Os2 zw1`hU6@jtnh0}Q9rohI}6xzDn=DCCB=c3Y8K2pIl(DHXW*!eaC_HLdG?FtlZuuB%n$1YHJN*yBRd z&zA)QnMBy4rkQKNl zKc1=(o>T^kr7`$`-}(fwdPyqKBr&;dD3d^v(uIt`{F;bVL_CSM@UZRA#`VWlIr2MrKj+ z2xX`)z*lviB092VRsdxHpy~?YkeTM>hY9(y$T{9oIm`3q6ro*5W%VQ1cT{fVXX*h* z<LZvU{Eb%_BUpDd%PPJZGn$(c|UP$_X%h!4^b;yx@c1eY=pwAm9D0%BZOLy|xRA z_oeCOn^dGJ$H=8wOR{LO-`YKU%zySRqoM|a=*7@Pq#`6S!kRQS9ZXMu_N)I{R16^p z)8i7uD(hUz#!fbCCni2hj0gn5B)M%cn-)FEY1^8!%|mj1ifKbq%PI{Z~DCm1@0u~ z_}%lSd1i0NaM?Z2iNXGATf65aaM?W%YN?FekjiZBmeQvuH7dC3z8QAU-~$%#JVGDy z#p3;d#XBd0%J5?Ge!${g?+I?(;(gZT4=5fekT#MOVU+8Juw%e`<-H$z%KmEIY1iygnq(3F{zJIiBnIuq%inxUrxk!ms83x5 z-lbD$$Mk}UUo^!NskJWwjb;*)p#Y;K02V>C_HItkehqdkIcRWq)qb0jLkgVFpwN7Xrk2@si`*-Rp#sl)#C&tLxcvVBY zr>UB%$;cL{BfS1e#b^J{Fx{{D&Oqn=&S>`g_THJOC)i#7$diiweUGx>_>+n; zC1#o5J*n6qaonl0&>nwMF-6iN<0%qxLK@8I{oU)>jqaaRoMB;ba-08tR8-^7&*Qbz zu+3#lK#Paqk4bs_aL_zALu zbOlkT5kEmtrsOAFrTTfaGFnpvrph&?)z8(GJPixP84g@iG_!Z(JVF1|-W}RRxuztZ z@B1|+fK+V3W5XSV^`fp!1S3{(o`h)xZpat{l;~aG7{oR4mwORjc*uE5$leRIfQHjk zJmNfgy&^71+{}{m#7R$u9aTuWMI5Ci#c;& zF|=NNEY6@8Z^Rk=FC$A=zZYlVf|ue9K$!!?8P;*0cm|#GB;z=WDg+2AIZszaV~5 z38R%vk&ZS+$rNc`eS=PrW*rQh4@^Hk1He6H z@?xX!_{IeyTuw4|1)hRyUTz;iaA+%nvtU z9(S0R+kc+A36guCx(Vg*;M7g7f1kRkXYk%;0_E^Xn0)8m5bj?x$=5XDOU~QCQ`1tYfmXxL79D|Tz!G?<;E+M7E-RY4o;mFNRof+ z;5^9+)H2#SIAvBKTQ5VFLmeE?a89ePV<0Z@41*_Gfh=Y2?MRaT-uXToQ|G5H)!|uz z3<2|s&L8a=QqDH#-92nev0>SpM}+H>wK7;!WCb##QqBbb`YzWc2)!ri=Ol=cCYxIj zK*%sFkYwyqwGlw%s*QYuO;j7XeM8koL7A;o8+l!-HvTYLWnTR{v>M0Hqt)oE--uRq z^2g9ByXQ^N>gF{p@b>M1R(Gyp!87=~&??8zqgByjc#8*ff>r~BlxX#u>kg`wk?x?T z`ybRDS6_sMO88zCP=*TnY0 za(kRCZnhbwj*+7NT;>lIi#y8LgM~hCdA$++aEEceD2xzxsp-LAUs-h7&uDr?Uu~-C zv6=255P1VlkKJ_#<-z*1x`UjYZ?_WFW}-V-5<^FvPR{slne5aihNkWv5kr|*yeksh zgcuqiq$Gx3WtK1GVUPaGxm{-Ywz2^ptdfG$$_6YAi&CpjqTm2!7G?RKM8Sb8vnaLd zBnl3J%aVfA$_8ZemK2;;Hi#F@D<(5;_z?w1Af%+=TqSl^DkRJFK~fbUq)4i|N+TMrOpK_$)&e7XU}kdkRg20#G@^mrTU53*qL}9eM)b_gz)K$VOwc_v!PQxM{X|6v*M_RCN zk&ZOSa~)|8N0$CVxAQ~N1u4MkM_PbN9qD^=W1{}JLTnlfPL5)E4(5{cZS2({l1^(|VX~u}+74bDH9cex;b%l3`Lr*tR{?v?^zjym#4u+YI^vD;> zue;BR)TW!a=&R8Hxy^pABdy~k9cj(0MLN=P9HS!*>|3EDO>1tjCOXpby3~A6-kbHr^B2r0P@R}q3GOl5e2xL5O-o`hgQqYH{d9~gqgrvm(;N{jVqPVJMHkZ?5iFvwHX&GWazlazux}HBg>K)O zU=h}36M{uTu};Qvf`u9^2^PHT`KouArNe^~oP@8I#%oe4Hkn1Ia?+D2;N{*IPb2rD z20rDug^}{v?$(4ZN^_EqN{gObLozP)FAt_CWAo(!A?|3Pg{uszsTE)Kpt7zDs`+Eg z?%9KCv|I+&7zSTB(wuNSOM_|Wln|2p?a}G*1;z6z559^m ziqh&UF6)ZYqnsGB2%qP~2!xb5F;`g~AzB$FcBVq$EjgRE&hA6w_LiKTL=|P8K@u%F zJBlhYuZ~IVTpd-6zB(rJV0Bb6`s$d>gLP3woC?Qe9;}Wk29!xrMSz6&7$BsKDqbaz z5-8(5N-YhC@F>?8Dc2Alz@uDRq?{dL7g{WNlt7s-v{>>esaMp67Rwq@aAmsCVp$`K zWb7`q_{5cf2aBd4&`ewj0YXYw!d1=ywKA9i8p8Kg!p@%oLZdHcz;~6}jOo6@nRFyY zJ^E^eGwDc*x?tY|XVPgDbwT76&ZP4w>guZ%&ZP4w>cR}}Oj4BGok;|kN@vnlAbqtm zM*3PtCrH0bs_TWIOyj%~=`*t%=aoT2JPnQW9tI6#y=t6S1`XjAHO?!8hCt-Td1cU$ zzH*!=p`_kc=GNRBnByd;%Vo~uda zC8?Zeuu0`5sa*VzIN7A~l2neaP?O3_QaKry{5lpfCzX@IRFcZC5+16R5j+%fXW8v) zwi7p?c7$|YSF;^)%9z>UgRW*fs#HN{9Cvj!+tD5gZ7n`JaTpI)7ho-k z!#Hfa0BcDcX1(eHtYbPsU4XUe1pi4Vkf)((qjNd|+f*kGs{IB?;4aF4Vaqib%wk^APAg-~H)eMz)5;i=jhXt2!Af}^&NBnblpC|FMAOmA1WgOM zpFqxCkER9t7NF_VD*6Z_A3)AsorFcuq;*0{axUe$S|_9==d$%`osg28O9k8333O+gd{loF*A5l}%|s7jGg0tAp|K)_I*dU(#<-Q4cXx8MB! zgx#5~a+;KFi6PsfVtS?EfpBBa+-3gUhqD_L+gdwU<+lD>i@;>&LfMF1C*DDBEK$wW zs#HNX^nvPGd;$C7h~DP6fxr24@m4;N+EyZ)F#YTPnlIC4K4V#b4D1|Lz`qGBBwynkIm zUWw;p_Bx~095sVnQ zpo?LhGdu}TV-be^McCL}>)b9*2wb_yZglhukIpmJHY{QI{02^w5$h*BRaJJExT`n4 ze9K1xbWTOoIM+_o;*Iz(`A~9$Smk_n{F#tLp5EuQWpSD6n@;}JUW58=lD$7KCV5G< zPF;Z1?fyhDvpTa!UD>`njVx(0PfLWy_L1Pn{@CTDm3m~#ZlB?G zGn{{>l5VOhTkh2>nx7O%v{QB>ITaVa@5fNF=#7S#2GRVi>SI#fa!=w6LI$E=p2{NX zj`0F{ih_=Mq*|u5>lb36TenK)Iziu&*X6vR1S=@m=ABWOghtJ3O1Y#BGOaUYe4R59 z^hRUDo-h71zYp3u@+(i*FT+C#5($>~K|ndz>@YxFV%Rm?(+I17jqq|iR%0BJ%9R7E z!JI~XTH`&;5$2Xqec|pCTJGSqKJzZi1<%CBXUHuZ*iyZf^16zn&pXHRYBUa{hLE{f z$uofPL3rB|uB5-1-&3O6I@Vl7XyHx|&gX98s^ro)M$GIi0L1945IaZw$U*tNPaea7 z&{i8qR>$(BZ@4-m0E7tn2rNOQ?npv?g&u%qCSV)*l;@ZvaPmRMe6gRQLN|P53LoOL zKJ?D6tv#8N!;TBmv-e%uge1X4Js_LX!ZW0qae_@Y;*q(~s|(7MGGLDV+cT09Zzh$3 z6+Dw9l-Uf+A)(Ao9>##Z(G_}WW0jl+li3+0C9!>_ktv-PSm98}TtoXMH(Y@su#@WAF)z%U81V&qy zw8pe$OTt6ydB&ih{6|#XuglKx!!*nJlz6RuxIo^vD?U zti-Q1F$TH`K(jBG0a$`^d`gCEed_O%NebgEPn!R^@~MBUKrr5DY(v)Y$_>nz35Tzu zn~%u^SfU+UwH}5&-eXe(h!( z@0`FY_8Yu&bY~J?>%x-6x*}))EH3$gbr8$5XjhTR<|f{|>uHWkl?!?yXgNQn)ZCp* zi*)ff#XhS_C}YYJITU=6@Oc0@(Y35;mu|j#`**|Cl|OeQd2`_mnl%iX*nTm3U^(tH zbFfgaj&ILOwsZ5E#mujd-mx-E^*_GU7bpH1>L0vMAo<(KWBT#hz0rB^lMSyG!8ubr ztT2qQy&NF-_OLNwQ5@XqJCYm77g$+5BnE4lMeuSpnHSYp_5Zvj9kQ-w&G#(6e*k_- z6zaCuZqIr<@8v>WrOSPT<&EH$1Bn2Q&G%_pJLs@VztA~g%cv|TWq7*-nBc`l=FX?n zWFWKLy+D`sN5EXzEILj*PDHf>Gi#ewJ3RUqe+pB0X-Ty*U8sFDuBdKhprj)+I6q@V z=`lmc9Q3i&Sd**uuqG2x5oEx9Irm;bATlmmNSlfH&-kmL*<-P}<7=qR$goW)t*3Tj ztX4b(>(sf42wI+`#(W~R9>f;1LhjC$v3di!Tzh1g@xbi9;z z?GcD0g`JSN0M+jaxE#H|^@!@|WVeHlxeXEwdDtY5d$`!jA)Nv~Qp<0X z5HxHEYUQ%0jB39#xZb{m?NUEoRMH@CUvuft>UnNU#Je8%0#dD=gM3fzb?xYwh5k?IJg#q9qqTVJ5{U2di6FfoXmfuwFqhe1cl6sSzwL9UM4EG#5XN>$t{MVktoCC#8hslPTn+_xOB|T&2z&E-YX-j>#hHqKGM!V0z|AV+d z*eHM(2D^-KfOzxcY;M^8mV;UFPZkRuQj`Bwy~|+4r9Tq;H6lQIAU+W;JB|Eb=!2%E at&X`!7td+Kk+sfrr)3JUFsd_jPy81`G + + + + + + + + + + + + + + + util.php - The PHP programmers best friend - UtilityPHP + + + +

+ +
+

+ +

+ +

+ util.php is a collection of useful functions and snippets + that you need or could use every day. It's implemented as a class with static methods, to avoid conflicts with your + existing code-base. Just drop it in and start using it immediately. +

+ +

+ Included are 60+ functions that provide you with the ability to do common tasks much easier and more efficiently, + without having to find that one comment on php.net where you know its been done already. Access superglobals + without checking to see if certain indexes are set first and pass default values, use a nicely formatted var dump, + validate emails, generate random strings, flatten an array, pull a single column out of a multidimensional array + and much more. +

+ +

+ Although it's implemented as one giant class, util.php has extensive documentation and a full suite of unit tests + to avoid breaking backwards-compatibility unintentionally. +

+ +

+ The project is hosted on GitHub. + You can report bugs and discuss features on the + issues page, + or send tweets to @brandonwamboldt. +

+ +

Downloads (Right-click, and use "Save As")

+ +

+ Stable Version (1.1.0)
+ Unstable Version (master) +

+ +

Installation

+ + Server Requirements
+ +
    +
  • PHP 5.3.3+
  • +
+ + Standalone File
+ +

+ Simply drop util.php in any project and call include 'util.php'; in your project. + You can then access the Util class. +

+ + Composer
+ +

+ Add the following dependency to your composer.json: + +

"brandonwamboldt/utilphp": "1.1.*"
+ + When used with composer, the class is namespaced (\utilphp\util) instead of + just util. +

+ +
+

Debugging Functions

+ +
+
+

+ var_dump + + util::var_dump(mixed $var[, bool $return = FALSE]) + +

+ +

+ Nicely prints out the contents of a passed variable. Booleans are properly displayed as 'true' or 'false', + null values are shown as 'NULL', variable types are displayed, and arrays and objects are displayed as a + collapsible tree powered by JavaScript. +

+ +

Usage:

+ +
util::var_dump($var);
+ + +
+
+ +

Array/Object Functions

+ +
+
+

+ array_first + + util::array_first(array $array) + +

+ +

+ Retrieve the first value from an array. Can be run on function callbacks, and it will not modify the pointer + of the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_first( ['a', 'b', 'c'] );
=> Returns 'a'
+
+ +
+

+ array_first_key + + util::array_first_key(array $array) + +

+ +

+ Retrieve the first key from an array. Can be run on function callbacks, and it will not modify the pointer of + the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_first_key( $users );
=> Returns 'brandon'
+
+ +
+

+ array_flatten + + util::array_flatten(array $array[, bool $preserve_keys = TRUE]) + +

+ +

Flattens a multi-dimensional array into a one dimensional array

+ +

Usage:

+ +
util::array_flatten( [ 'a', 'b', [ 'c', 'd', 'e', [ 'f', 'g', [ [ [ [ 'h', 'i', 'j' ] ] ] ] ] ] ] );
+=> Returns [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' ]
+
+ +
+

+ array_get + + util::array_get($var[, mixed $default = NULL]) + +

+ +

Retrieve a value from an array, or return a given default if the index isn't set

+ +

Usage:

+ +
util::array_get($_POST['action'], 'index');
+=> If $_POST['action'] is set, returns its value, otherwise returns 'index'
+util::array_get($_POST['action']['do'], 'index');
+=> Returns the value of $_POST['action']['do'] or 'index'
+
+ +
+

+ array_last + + util::array_last(array $array) + +

+ +

+ Retrieve the last value from an array. Can be run on function callbacks, and it will not modify the pointer + of the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_last( [ 'a', 'b', 'c'] );
+=> Returns 'c'
+
+ +
+

+ array_last_key + + util::array_last_key(array $array) + +

+ +

+ Retrieve the last key from an array. Can be run on function callbacks, and it will not modify the pointer of + the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_last_key( $users );
+=> Returns 'zane'
+
+ +
+

+ array_map_deep + + util::array_map_deep(array $array, callable $callback[, bool $on_nonscalar = FALSE]) + +

+ +

+ Returns an array containing all the elements of $array after applying the callback function to each one recursively. + Particularly useful for avoiding errors when calling functions that only accept scalar values on an array that could + contain nested arrays, such as $_GET or $_POST. +

+ +

Usage:

+ +
util::array_map_deep($_POST, 'htmlentities');
+=> Recursively escapes each scalar value in $_POST
+util::array_map_deep($_POST, 'htmlentities', TRUE);
+=> Recursively escapes each value in $_POST regardless of its type
+
+ +
+

+ array_pluck + + util::array_pluck(array $array, string $field[, bool $preserve_keys, bool $remove_nomatches]) + +

+ +

+ Replaces each value in an array with the specified field of the array or object that used to be the value. Very + useful when you have an array of objects or arrays from a database, and you only want one specific field. For + example, you want an array of emails from an array of users. +

+ +

Usage:

+ +
util::array_pluck([['val' => 1], ['val' => 2], ['val' => 3]], 'val');
+=> Returns [1, 2, 3]
+util::array_pluck($users, 'email');
+=> Returns an array of email addresses for each user
+
+ +
+

+ array_search_deep + + util::array_search_deep(array $array, mixed $search[, string $field = FALSE]) + +

+ +

+ Allows you to search for a value in an array of arrays or an array of objects, and return the key of the value + that matches the search criteria. If $field is unspecified, the entire array/object is searched. +

+ +

Usage:

+ +
util::array_search_deep($_POST, 'delete_post');
+=> Might return 'do' if $_POST['do']['action'] = 'delete_post'
+util::array_search_deep($users, 'rogue_coder', 'username');
+=> Might return 5 if $users[5]->username = 'rogue_coder'
+
+ +
+

+ array_clean + + util::array_clean(array $array) + +

+ +

+ Remove all null/empty/false values from the given array. +

+ +

Usage:

+ +
util::array_clean( array( 'a', 'b', '', null, false, 0) );
=> Returns array('a', 'b');
+
+ +
+ +

URL Functions

+ +
+
+

+ add_query_arg + + util::add_query_arg() + +

+ +

Adds one ore more query args to the query string of the current URL or a given URL

+ +

Usage:

+ +
util::add_query_arg( 'user', '5', '/admin/users?action=edit' );
+=> Returns '/admin/users?action=edit&user=5'
+util::add_query_arg( [ 'user' => 5, 'action' => 'edit' ], '/admin/users' );
+=> Returns '/admin/users?user=5&action=edit'
+
+ +
+

+ get_current_url + + util::get_current_url() + +

+ +

Returns the current URL with hostname

+ +

Usage:

+ +
util::get_current_url();
+=> Returns 'http://brandonwamboldt.ca/utilphp/'
+
+ +
+

+ is_https + + util::is_https() + +

+ +

Returns true if the current page is being loaded over https, false if it isn't

+ +

Usage:

+ +
util::is_https();
+=> Returns false
+
+ +
+

+ http_build_url + + util::http_build_url([mixed $url[, mixed $parts[, int $flags = HTTP_URL_REPLACE[, array &amo;$new_url]]]]) + +

+ +

+ Pure PHP implementation/polyfill for http_build_url + which requires pecl_http to be installed. +

+ +

Usage:

+ +
echo util::http_build_url("http://user@www.example.com/pub/index.php?a=b#files",
+    array(
+        "scheme" => "ftp",
+        "host" => "ftp.example.com",
+        "path" => "files/current/",
+        "query" => "a=c"
+    ),
+    HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT
+);
+ +

The above example will output:

+ +
ftp://ftp.example.com/pub/files/current/?a=c
+
+ +
+

+ is_https + + util::is_https() + +

+ +

Returns true if the current page is being loaded over https, false if it isn't

+ +

Usage:

+ +
util::is_https();
+=> Returns false
+
+ +
+

+ remove_query_arg + + util::remove_query_arg( array|string $query_args[, string $url]) + +

+ +

Removes one ore more query args from the query string of the current URL or a given URL

+ +

Usage:

+ +
util::remove_query_arg( 'action', '/admin/users?action=edit&user=5' );
+=> Returns '/admin/users?user=5'
+util::remove_query_arg( [ 'user', 'action'], '/admin/users?action=edit&user=5' );
+=> Returns '/admin/users'
+
+ +
+

+ slugify + + util::slugify(string $string[, string $separator = "-", bool $css_mode = FALSE]) + +

+ +

+ Generate a string safe for use in URLs from any given string. Converts any accent characters + to their equivalent normal characters and converts any other non-alphanumeric characters to + dashes, then converts any sequence of two or more dashes to a single dash. This function + generates slugs safe for use as URLs, and if you pass TRUE as the second parameter, it will + create strings safe for use as CSS classes or IDs. +

+ +

Usage:

+ +
util::slugify('This is a random --string with an Ãccent');
+=> Returns 'this-is-a-random-string-with-an-accent'
+util::slugify('Another String', '.');
+=> Returns 'another.string'
+
+
+ +

String Functions

+ +
+
+

+ htmlentities + + util::htmlentities(string $string[, bool $preserve_encoded_entities = FALSE]) + +

+ +

+ Executes htmlentities with ENT_QUOTES set by default. However, if you pass TRUE as + the second parameter, it will not re-encode entities that are already encoded. +

+ +

Usage:

+ +
util::htmlentities('this string < this string', TRUE);
+=> Returns 'this string < this string'
+
+ +
+

+ htmlspecialchars + + util::htmlspecialchars(string $string[, bool $preserve_encoded_entities = FALSE]) + +

+ +

+ Executes htmlspecialchars with ENT_QUOTES set by default. However, if you pass TRUE as + the second parameter, it will not re-encode entities that are already encoded. +

+ +

Usage:

+ +
util::htmlspecialchars('this string < this string', TRUE);
+=> Returns 'this string < this string'
+
+ +
+

+ linkify + + util::linkify(string $text) + +

+ +

Find's any URLs in the specified text and wraps them with HTML anchor tags

+ +

Usage:

+ +
util::linkify('this string has a link to www.google.com');
+=> Returns 'this string has a link to <a href="http://wwww.google.com/">www.google.com</a>'
+
+ +
+

+ match_string + + util::match_string(string $pattern, string $string[, bool $caseSensitive = true]) + +

+ +

+ Check if a string matches a given pattern. You can use '*' as a wildcard character. +

+ +

Usage:

+ +
util::match_string("test/*", "test/my/test");
+=> Returns true
+util::match_string("test/", "test/my/test");
+=> Returns false
+
+ +
+

+ random_string + + util::random_string(int $length[, bool $human_friendly = TRUE, bool $include_symbols = FALSE, bool $no_duplicate_chars = FALSE]) + +

+ +

+ Generates a random string of the specified length. Human friendly mode + will exclude characters that can be confused with other characters, such + as 0 (zero) and O (capital o), 1 (one) and l (lowercase L). +

+ +

Usage:

+ +
util::random_string(8);
+=> Returns 'a6BiF4UW'
+
+ +
+

+ number_to_word + + util::number_to_word(int|float $number) + +

+ +

Converts a number into its text equivalent. For example, 56 becomes fifty-six.

+ +
util::number_to_word(512.5);
+=> Returns 'five hundred and twelve point five'
+
+ +
+

+ ordinal + + util::ordinal(int $number) + +

+ +

Returns the ordinal version of a number (appends th, st, nd, rd)

+ +

Usage:

+ +
util::ordinal(22);
+=> Returns '22nd'
+
+ +
+

+ remove_accents + + util::remove_accents(string $string) + +

+ +

Converts all accent characters to their ASCII equivalents

+ +

Usage:

+ +
util::remove_accents('Àccent');
+=> Returns 'Accent'
+
+ +
+

+ secure_random_string + + util::secure_random_string(int $length) + +

+ +

Generate a random string of characters. Will attempt to use a secure source (openssl).

+ +

Usage:

+ +
util::secure_random_string(16);
+=> Returns '5bB1RJH0cQhNjviT'
+
+ +
+

+ seems_utf8 + + util::seems_utf8(string $string) + +

+ +

Checks to see if a given string is UTF-8 encoded/safe

+ +

Usage:

+ +
util::seems_utf8('This is some random string user input');
+=> Returns true
+
+ +
+

+ safe_truncate + + util::safe_truncate(string $string, int $length[, string $append = '...']) + +

+ +

Truncate a string to a specified length without cutting a word off

+ +

Usage:

+ +
util::safe_truncate('The quick brown fox jumps over the lazy dog', 24);
+=> Returns 'The quick brown fox...'
+
+ +
+

+ size_format + + util::size_format(int $bytes[, int $decimals = 0]) + +

+ +

Formats an integer as a human friendly size string, such as 4 KiB.

+ +

Usage:

+ +
util::size_format( 25151251, 2 );
+=> Returns '23.99 MiB'
+
+ +
+

+ str_to_bool + + util::str_to_bool(string $string) + +

+ +

Converts a string to boolean, looking for yes/no words like 'yes', 'no', 'true', 'false', 'y', 'n', etc

+ +

Usage:

+ +
util::str_to_bool('yes');
+=> Returns true
+
+ +
+

+ zero_pad + + util::zero_pad(int $number, int $length) + +

+ +

Pads a given number with zeroes on the left

+ +

Usage:

+ +
util::zero_pad(341, 8);
+=> Returns '00000341'
+
+ +
+

+ strip_space + + util::strip_space(string $string) + +

+ +

Strip all withspace from the given string

+ +

Usage:

+ +
util::strip_space(' The quick brown fox jumps over the lazy dog ');
+=> Returns 'Thequickbrownfoxjumpsoverthelazydog'
+
+ +
+

+ sanitize_string + + util::sanitize_string(string $string) + +

+ +

+ Sanitize a string by performing the following operation : +

    +
  • Remove accents
  • +
  • Lower the string
  • +
  • Remove punctuation characters
  • +
  • Strip whitespaces
  • +
+ +

+

Usage:

+ +
util::sanitize_string(' Benoit! à New-York? j’ai perçu 1 % : Qu’as-tu "gagné" chez M. V. Noël? Dix francs.');
+=> Returns 'benoitanewyorkjaipercu1quastugagnechezmvnoeldixfrancs'
+
+
+ +

Files

+ +
+
+

+ full_permissions + + util::full_permissions(string $file) + +

+ +

Returns the file permissions as a nice string, like -rw-r--r--

+ +

Usage:

+ +
util::full_permissions('/etc/passwd');
+=> Returns '-rw-r--r--'
+
+ +
+

+ rmdir + + util::rmdir(string $dir[, bool $traverseSymlinks = false]) + +

+ +

Recursively deletes a directories (including all contents).

+ +

Usage:

+ +
util::rmdir('/tmp/working/dir');
+=> Returns true
+
+
+ +

Serialization

+ +
+
+

+ is_serialized + + util::is_serialized(mixed $data) + +

+ +

Checks to see if a given variable is a seralized data structure

+ +

Usage:

+ +
util::is_serialized( 'a:0:{}' );
+=> Returns true
+
+ +
+

+ maybe_serialize + + util::maybe_serialize(mixed $data) + +

+ +

Serialize data, if needed to store in plaintext (Arrays or objects)

+ +

Usage:

+ +
util::maybe_serialize( 5 );
+=> Returns 5
+util::maybe_serialize( array() );
+=> Returns 'a:0:{}'
+
+ +
+

+ maybe_unserialize + + util::maybe_unserialize(mixed $data) + +

+ +

Unserialize data, if it's a serialized string

+ +

Usage:

+ +
util::maybe_unserialize(5);
+=> Returns 5
+util::maybe_unserialize("a:0:{}");
+=> Returns array()
+
+ +
+

+ fix_broken_serialization + + util::fix_broken_serialization(mixed $data) + +

+ +

+ Attempt to fix a broken serialization string (e.g. where string offsets are incorrect). Can fix + errors that frequently occur with mismatched character sets or higher-than-ASCII characters. +

+ +

Usage:

+ +
util::fix_broken_serialization('a:1:{s:4:"test";s:4:"abc";}');
+=> Returns 'a:1:{s:4:"test";s:3:"abc";}'
+
+
+ +

Other

+ +
+
+

+ force_download + + util::force_download(string $filename, string $content = FALSE) + +

+ +

+ Transmit headers that force a browser to display the download file dialog. Cross + browser compatible. Only fires if headers have not already been sent. +

+ +

Usage:

+ +
util::force_download( 'export.csv', file_get_contents( 'securefile.csv' ) );
+=> The user will be prompted to download the file
+
+ +
+

+ get_client_ip + + util::get_client_ip(bool $trust_proxy_headers = FALSE) + +

+ +

+ Returns the IP address of the client. Only enable $trust_proxy_headers if your server is behind a proxy + that sets the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR headers. +

+ +

Usage:

+ +
util::get_client_ip();
+=> Returns '12.123.12.100'
+
+ +
+

+ get_gravatar + + util::get_gravatar(string $email, int $size = 32) + +

+ +

Return the URL to a user's gravatar

+ +

Usage:

+ +
util::get_gravatar('brandon.wamboldt@gmail.com');
+=> Returns 'http://www.gravatar.com/avatar/46679faeb6780ecb1ea57527fdc66eb3?s=32'
+
+ +
+

+ human_time_diff + + util::human_time_diff(int $from, int $to = '', int $as_text = FALSE, string $suffix = ' ago') + +

+ +

Converts a unix timestamp to a relative time string, such as "3 days ago" or "2 weeks ago"

+ +

Usage:

+ +
util::human_time_diff(time() - 7400);
+=> Returns '2 hours ago'
+util::human_time_diff(time() - 7400, '', TRUE);
+=> Returns 'two hours ago'
+
+ +
+

+ nocache_headers + + util::nocache_headers(mixed $data) + +

+ +

Sets the headers to prevent caching for the different browsers

+ +

+ Different browsers support different nocache headers, so several headers must be sent + so that all of them get the point that no caching should occur +

+ +

Usage:

+ +
util::nocache_headers();
+
+ +
+

+ utf8_headers + + util::utf8_headers(mixed $content_type = 'text/html') + +

+ +

Transmit UTF-8 content headers if the headers haven't already been sent

+ +

Usage:

+ +
util::utf8_headers();
+
+ +
+

+ validate_email + + util::validate_email(string $possible_email) + +

+ +

Validate an email address

+ +

Usage:

+ +
util::validate_email( 'brandon.wamboldt@gmail.com' );
+=> Returns true
+util::validate_email( 'not an email' );
+=> Returns false
+
+
+ +

Constants

+ +
+
+

+ SECONDS_IN_A_MINUTE + + util::SECONDS_IN_A_MINUTE + +

+ +

The number of seconds in a minute, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_AN_HOUR + + util::SECONDS_IN_AN_HOUR + +

+ +

The number of seconds in an hour, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_DAY + + util::SECONDS_IN_A_DAY + +

+ +

The number of seconds in a day, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_WEEK + + util::SECONDS_IN_A_WEEK + +

+ +

The number of seconds in a week (7 days), useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_MONTH + + util::SECONDS_IN_A_MONTH + +

+ +

The number of seconds in a month (30 days), useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_YEAR + + util::SECONDS_IN_A_YEAR + +

+ +

The number of seconds in a year (365 days), useful for making code more verbose

+
+
+ +

Change Log

+ + + +

+ 1.1.0
+ + This release introduces a deprecation notice for slugify(), please update your code.

+ + - Added a cryptographically secure random string function secure_random_string. Thanks to @abhimanyusharma003 via Pull Request #53
+ - Added limit_characters and limit_words functions. Thanks to @abhimanyusharma003 via Pull Request #55
+ - Added rmdir method to recursively delete a directory. Thanks to @ARACOOOL via Pull Request #56
+ - Added set_executable, set_readable, set_writable, directory_size, directory_contents and get_user_dir functions. Thanks to @sergserg via Pull Request #70
+ - Changed parameter ordering for slugify, $css_mode is now the third argument. For backwards compatibility, the old order will still work but it will generate an E_USER_DEPRECATED warning. Thanks to @abhimanyusharma003 via Pull Request #71
+ - Added match_string method. Thanks to @abhimanyusharma003 via Pull Request #72
+ - Renamed internal methods (protected ones) for PSR-2 compliance
+ - General performance improvements, code quality improvements, and increased unit test coverage (special thanks to @hopeseekr for getting us near 100% coverage)
+

+ +

+ 1.0.7
+ - Added fix_broken_serialization to fix broken serialized strings (Thanks to @hopeseekr via Pull Request #48)
+ - Fixed get_current_url appending port 80 or 443 when not needed (Thanks to @scottchiefbaker via Pull Request #49)
+ - var_dump can now handle recursive data structures without crashing
+ - var_dump code was minified and cleaned up
+ - array_flatten was optimized (thanks to @hopeseekr via Pull Request #47)
+ - remove_accents was completely rewritten and is now ~4x faster
+

+ +

+ 1.0.6
+ - Added start_with function
+ - Added ends_with function
+ - Added str_contains function
+ - Added str_icontains function
+ - Added get_file_ext function
+ - Fixing permissions on the files & directories
+ - Fixing a bug with the include path of util.php
+

+ +

+ 1.0.5
+ - Issue #29 Fixed error in var_dump if mbstring extension wasn't present
+ - Adding Composer support
+ - Updating license from GPL to MIT
+ - Adding Changelog to project
+ - Bumping minimum version to PHP 5.3.3
+

+ +

+ 1.0.4
+ - Issue #22 Removed all superglobal *_get functions, you can use the modified array_get now
+ - Issue #22 Modifed the behaviour of array_get, see documentation
+ - Pull Request #21 Added multibyte support to html* functions
+ - Issue #9 Removed the str_to_utf8 function
+ - Issue #3 Removed the absint function
+ - Removed declare() from util.php to avoid errors
+ - Updated PHPUnit tests to use PHPUnit 3.6 +

+ +

+ 1.0.3
+ - Issue #16 Improved performance of slugify
+ - Issue #14 Modified the regex for seems_utf8 to be more accurate
+ - Issue #13 Changed validate_email to be wrapper for filter_var
+ - Added 'ok' to the list of yes words for str_to_bool
+ - str_to_bool matches no followed by any number of 'o's +

+ +

+ 1.0.2
+ - Issue #12 get_current_url now includes the port and user/password if required
+ - Issue #11 human_time_diff now uses the DateTime functions
+ - Issue #10 is_https no longer checks the port as well +

+ +

+ 1.0.1
+ - Issue #7 Added the $trust_proxy_headers parameter to get_client_ip
+ - Issue #6 Removed is_isset as the function did not work as intended
+ - Issue #6 Removed is_empty as it is redundant, use ! with function calls instead
+ - Fixed a bug with get_gravatar +

+ +

+ 1.0.0
+ Initial release of util.php. +

+
+
+ + + diff --git a/e_lib/utilphp-1.1.0/phpunit.xml.dist b/e_lib/utilphp-1.1.0/phpunit.xml.dist new file mode 100644 index 00000000..d4b9366c --- /dev/null +++ b/e_lib/utilphp-1.1.0/phpunit.xml.dist @@ -0,0 +1,25 @@ + + + + + ./tests + + + + + ./src + + + + + + \ No newline at end of file diff --git a/e_lib/utilphp-1.1.0/tests/README.md b/e_lib/utilphp-1.1.0/tests/README.md new file mode 100644 index 00000000..e81d26c3 --- /dev/null +++ b/e_lib/utilphp-1.1.0/tests/README.md @@ -0,0 +1,39 @@ +# UtilityPHP Unit Tests # + +### Introduction + +This is the testing documentation for util.php. The unit tests require PHPUnit, +and can be run in your web browser. + +### Requirements + +PHP Unit >= 3.5.6 + +#### Installation of PHPUnit + + # Download the PHPUnit phar. + wget https://phar.phpunit.de/phpunit.phar + + # You can just run it locally. (Preferred for Windows) + php phpunit.phar --version + + # Or install it system-wide. + mv phpunit.phar phpunit + chmod +x phpunit + sudo mv phpunit /usr/local/bin + phpunit --version + +## Test Suites: + +util.php includes a phpunit config file, so just run `phpunit` from the working +directory to run the test suite. + +``` +phpunit +``` + +If you want code coverage reports, use the following: + +``` +phpunit --coverage-html ./report +``` diff --git a/e_lib/utilphp-1.1.0/tests/UtilTest.php b/e_lib/utilphp-1.1.0/tests/UtilTest.php new file mode 100644 index 00000000..404cf7bd --- /dev/null +++ b/e_lib/utilphp-1.1.0/tests/UtilTest.php @@ -0,0 +1,1183 @@ +data = (object)array('a', 'b', 'c'); + } +} + +/** + * PHPUnit test case for the util.php library + * + * @author Brandon Wamboldt + * @since 1.0.000 + */ +class UtilityPHPTest extends PHPUnit_Framework_TestCase +{ + /** + * Allows for the testing of private and protected methods. + * + * @param $name + * @return \ReflectionMethod + */ + protected static function getMethod($name) + { + $class = new \ReflectionClass('util'); + $method = $class->getMethod($name); + $method->setAccessible(true); + return $method; + } + + public function test_array_get() + { + $_GET = array(); + $_GET['abc'] = 'def'; + $_GET['nested'] = array( 'key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3' ); + + // Looks for $array['abc'] + $this->assertEquals( 'def', util::array_get( $_GET['abc'] ) ); + + // Looks for $array['nested']['key2'] + $this->assertEquals( 'val2', util::array_get( $_GET['nested']['key2'] ) ); + + // Looks for $array['doesnotexist'] + $this->assertEquals( 'defaultval', util::array_get( $_GET['doesnotexist'], 'defaultval' ) ); + } + + public function test_slugify() + { + $this->assertEquals( 'a-simple-title', util::slugify( 'A simple title' ) ); + $this->assertEquals( 'this-post-it-has-a-dash', util::slugify( 'This post -- it has a dash' ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251' ) ); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', '-', true ) ); + + $this->assertEquals( 'a-simple-title', util::slugify( 'A simple title', '-' ) ); + $this->assertEquals( 'this-post-it-has-a-dash', util::slugify( 'This post -- it has a dash', '-' ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251', '-' ) ); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', '-', true ) ); + + $this->assertEquals( 'a_simple_title', util::slugify( 'A simple title', '_' ) ); + $this->assertEquals( 'this_post_it_has_a_dash', util::slugify( 'This post -- it has a dash', '_' ) ); + $this->assertEquals( '123_1251251', util::slugify( '123----1251251', '_' ) ); + $this->assertEquals( 'one23_1251251', util::slugify( '123----1251251', '_', true ) ); + + // Blank seperator test + $this->assertEquals( 'asimpletitle', util::slugify( 'A simple title', '' ) ); + $this->assertEquals( 'thispostithasadash', util::slugify( 'This post -- it has a dash', '' ) ); + $this->assertEquals( '1231251251', util::slugify( '123----1251251', '' ) ); + $this->assertEquals( 'one231251251', util::slugify( '123----1251251', '', true ) ); + + // Test old parameter ordering for backwards compatability + error_reporting(E_ALL ^ E_USER_DEPRECATED); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', true ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251', false ) ); + } + + public function test_seems_utf8() + { + // Test a valid UTF-8 sequence: "ÜTF-8 Fµñ". + $validUTF8 = "\xC3\x9CTF-8 F\xC2\xB5\xC3\xB1"; + $this->assertTrue( util::seems_utf8( $validUTF8 ) ); + + $this->assertTrue( util::seems_utf8( "\xEF\xBF\xBD this has \xEF\xBF\xBD\xEF\xBF\xBD some invalid utf8 \xEF\xBF\xBD" ) ); + + // Test invalid UTF-8 sequences + $invalidUTF8 = "\xc3 this has \xe6\x9d some invalid utf8 \xe6"; + $this->assertFalse( util::seems_utf8( $invalidUTF8 ) ); + + // And test some plain ASCII + $this->assertTrue( util::seems_utf8( 'The quick brown fox jumps over the lazy dog' ) ); + + // Test an invalid non-UTF-8 string. + if (function_exists('mb_convert_encoding')) { + mb_internal_encoding('UTF-8'); + // Converts the 'ç' UTF-8 character to UCS-2LE + $utf8Char = pack('n', 50087); + $ucsChar = mb_convert_encoding($utf8Char, 'UCS-2LE', 'UTF-8'); + + // Ensure that PHP's internal encoding system isn't malconfigured. + $this->assertEquals( $utf8Char, 'ç', 'This PHP system\'s internal character set is not properly set as UTF-8.' ); + $this->assertEquals( $utf8Char, pack('n', 50087), 'Something is wrong with your ICU unicode library.' ); + + // Test for not UTF-8. + $this->assertFalse( util::seems_utf8( $ucsChar) ); + + // Test the worker method. + $method = self::getMethod('seemsUtf8Regex'); + $this->assertFalse($method->invoke(null, $invalidUTF8), 'util::seemsUtf8Regex did not properly detect invalid UTF-8.'); + $this->assertTrue($method->invoke(null, $validUTF8), 'util::seemsUtf8Regex did not properly detect valid UTF-8.'); + } + } + + public function test_size_format() + { + $size = util::size_format( 512, 0 ); + $this->assertEquals( '512 B', $size ); + + $size = util::size_format( 2048, 1 ); + $this->assertEquals( '2.0 KiB', $size ); + + $size = util::size_format( 25151251, 2 ); + $this->assertEquals( '23.99 MiB', $size ); + + $size = util::size_format( 19971597926, 2 ); + $this->assertEquals( '18.60 GiB', $size ); + + $size = util::size_format( 2748779069440, 1 ); + $this->assertEquals( '2.5 TiB', $size ); + + $size = util::size_format( 2.81475e15, 1 ); + $this->assertEquals( '2.5 PiB', $size ); + + $size = util::size_format( 2.81475e19, 1 ); + $this->assertEquals( '25000.0 PiB', $size ); + } + + public function test_maybe_serialize() + { + $obj = new stdClass(); + $obj->prop1 = 'Hello'; + $obj->prop2 = 'World'; + + $this->assertEquals( 'This is a string', util::maybe_serialize( 'This is a string' ) ); + $this->assertEquals( 5.81, util::maybe_serialize( 5.81 ) ); + $this->assertEquals( 'a:0:{}', util::maybe_serialize( array() ) ); + $this->assertEquals( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}', util::maybe_serialize( $obj ) ); + $this->assertEquals( 'a:4:{i:0;s:4:"test";i:1;s:4:"blah";s:5:"hello";s:5:"world";s:5:"array";O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}}', util::maybe_serialize( array( 'test', 'blah', 'hello' => 'world', 'array' => $obj ) ) ); + } + + public function test_maybe_unserialize() + { + $obj = new stdClass(); + $obj->prop1 = 'Hello'; + $obj->prop2 = 'World'; + + $this->assertNull(util::maybe_unserialize(serialize(null))); + $this->assertFalse(util::maybe_unserialize(serialize(false))); + + $this->assertEquals( 'This is a string', util::maybe_unserialize( 'This is a string' ) ); + $this->assertEquals( 5.81, util::maybe_unserialize( 5.81 ) ); + $this->assertEquals( array(), util::maybe_unserialize( 'a:0:{}' ) ); + $this->assertEquals( $obj, util::maybe_unserialize( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}' ) ); + $this->assertEquals( array( 'test', 'blah', 'hello' => 'world', 'array' => $obj ), util::maybe_unserialize( 'a:4:{i:0;s:4:"test";i:1;s:4:"blah";s:5:"hello";s:5:"world";s:5:"array";O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}}' ) ); + + // Test a broken serialization. + $expectedData = array( + 'Normal', + 'High-value Char: '.chr(231).'a-va?', // High-value Char: ça-va? [in ISO-8859-1] + ); + + $brokenSerialization = 'a:2:{i:0;s:6:"Normal";i:1;s:23:"High-value Char: ▒a-va?";}'; + + $unserializedData = util::maybe_unserialize($brokenSerialization); + $this->assertEquals($expectedData[0], $unserializedData[0], 'Did not properly fix the broken serialized data.'); + $this->assertEquals(substr($expectedData[1], 0, 10), substr($unserializedData[1], 0, 10), 'Did not properly fix the broken serialized data.'); + + // Test unfixable serialization. + $unfixableSerialization = 'a:2:{i:0;s:6:"Normal";}'; + $this->assertEquals($unfixableSerialization, util::maybe_unserialize($unfixableSerialization), 'Somehow the [previously?] impossible happened and utilphp thinks it has unserialized an unfixable serialization.'); + } + + public function test_is_serialized() + { + $this->assertFalse( util::is_serialized(1) ); + $this->assertFalse( util::is_serialized(null) ); + $this->assertFalse( util::is_serialized( 's:4:"test;' ) ); + $this->assertFalse( util::is_serialized( 'a:0:{}!' ) ); + $this->assertFalse( util::is_serialized( 'a:0' ) ); + $this->assertFalse( util::is_serialized( 'This is a string' ) ); + $this->assertFalse( util::is_serialized( 'a string' ) ); + $this->assertFalse( util::is_serialized( 'z:0;' ) ); + $this->assertTrue( util::is_serialized( 'N;' ) ); + $this->assertTrue( util::is_serialized( 'b:1;' ) ); + $this->assertTrue( util::is_serialized( 'a:0:{}' ) ); + $this->assertTrue( util::is_serialized( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}' ) ); + } + + public function test_fix_broken_serialization() + { + $expectedData = array( + 'Normal', + 'High-value Char: '.chr(231).'a-va?', // High-value Char: ça-va? [in ISO-8859-1] + ); + + $brokenSerialization = 'a:2:{i:0;s:6:"Normal";i:1;s:23:"High-value Char: ▒a-va?";}'; + + // Temporarily override error handling to ensure that this is, in fact, [still] a broken serialization. + { + $expectedError = array( + 'errno' => 8, + 'errstr' => 'unserialize(): Error at offset 55 of 60 bytes' + ); + + $reportedError = array(); + set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) use (&$reportedError) { + $reportedError = compact('errno', 'errstr'); + }); + + unserialize($brokenSerialization); + + $this->assertEquals($expectedError['errno'], $reportedError['errno']); + // Because HHVM's unserialize() error message does not contain enough info to properly test. + if (!defined('HHVM_VERSION')) { + $this->assertEquals($expectedError['errstr'], $reportedError['errstr']); + } + restore_error_handler(); + } + + $fixedSerialization = util::fix_broken_serialization($brokenSerialization); + $unserializedData = unserialize($fixedSerialization); + $this->assertEquals($expectedData[0], $unserializedData[0], 'Did not properly fix the broken serialized data.'); + + $this->assertEquals(substr($expectedData[1], 0, 10), substr($unserializedData[1], 0, 10), 'Did not properly fix the broken serialized data.'); + } + + public function test_is_https() + { + $_SERVER['HTTPS'] = null; + + $this->assertFalse( util::is_https() ); + + $_SERVER['HTTPS'] = 'on'; + + $this->assertTrue( util::is_https() ); + } + + public function test_add_query_arg() + { + // Regular tests + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( 'user', 5, '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( array( 'user' => 5 ), null, '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?action=edit&user=5', util::add_query_arg( 'user', 5, '/app/admin/users?action=edit' ) ); + $this->assertEquals( '/app/admin/users?action=edit&user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users?action=edit' ) ); + $this->assertEquals( '/app/admin/users?action=edit&tab=personal&user=5', util::add_query_arg( 'user', 5, '/app/admin/users?action=edit&tab=personal' ) ); + $this->assertEquals( '/app/admin/users?action=edit&tab=personal&user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users?action=edit&tab=personal' ) ); + + // Ensure strips false. + $this->assertEquals('/index.php', util::add_query_arg('debug', false, '/index.php')); + + // With a URL fragment + $this->assertEquals( '/app/admin/users?user=5#test', util::add_query_arg( 'user', 5, '/app/admin/users#test' ) ); + + // Full URL + $this->assertEquals( 'http://example.com/?a=b', util::add_query_arg( 'a', 'b', 'http://example.com' ) ); + + // Only the query string + $this->assertEquals( '?a=b&c=d', util::add_query_arg( 'c', 'd', '?a=b' ) ); + $this->assertEquals( 'a=b&c=d', util::add_query_arg( 'c', 'd', 'a=b' ) ); + + // Url encoding test + $this->assertEquals( '/app/admin/users?param=containsa%26sym', util::add_query_arg( 'param', 'containsa&sym', '/app/admin/users' ) ); + + // If not provided, grab the URI from the server. + $_SERVER['REQUEST_URI'] = '/app/admin/users'; + $this->assertEquals( '/app/admin/users?user=6', util::add_query_arg( array( 'user' => 6 ) ) ); + $this->assertEquals( '/app/admin/users?user=7', util::add_query_arg( 'user', 7 ) ); + } + + public function test_remove_query_arg() + { + $this->assertEquals( '/app/admin/users', util::remove_query_arg( 'user', '/app/admin/users?user=5' ) ); + $this->assertEquals( '/app/admin/users?action=edit', util::remove_query_arg( 'user', '/app/admin/users?action=edit&user=5' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::remove_query_arg( array( 'tab', 'action' ), '/app/admin/users?action=edit&tab=personal&user=5' ) ); + } + + public function test_http_build_url() + { + $url = 'http://user:pass@example.com:8080/path/?query#fragment'; + + $expected = 'http://example.com/'; + $actual = util::http_build_url($url, array(), util::HTTP_URL_STRIP_ALL); + $this->assertEquals($expected, $actual); + + $expected = 'http://example.com:8080/path/?query#fragment'; + $actual = util::http_build_url($url, array(), util::HTTP_URL_STRIP_AUTH); + $this->assertEquals($expected, $actual); + + $this->assertEquals('https://dev.example.com/', util::http_build_url('http://example.com/', array('scheme' => 'https', 'host' => 'dev.example.com'))); + $this->assertEquals('http://example.com/#hi', util::http_build_url('http://example.com/', array('fragment' => 'hi'), util::HTTP_URL_REPLACE)); + $this->assertEquals('http://example.com/page', util::http_build_url('http://example.com/', array('path' => 'page'), util::HTTP_URL_JOIN_PATH)); + $this->assertEquals('http://example.com/page', util::http_build_url('http://example.com', array('path' => 'page'), util::HTTP_URL_JOIN_PATH)); + $this->assertEquals('http://example.com/?hi=Bro', util::http_build_url('http://example.com/', array('query' => 'hi=Bro'), util::HTTP_URL_JOIN_QUERY)); + $this->assertEquals('http://example.com/?show=1&hi=Bro', util::http_build_url('http://example.com/?show=1', array('query' => 'hi=Bro'), util::HTTP_URL_JOIN_QUERY)); + + $this->assertEquals('http://admin@example.com/', util::http_build_url('http://example.com/', array('user' => 'admin'))); + $this->assertEquals('http://admin:1@example.com/', util::http_build_url('http://example.com/', array('user' => 'admin', 'pass' => '1'))); + } + + public function test_str_to_bool() + { + $this->assertTrue( util::str_to_bool( 'true' ) ); + $this->assertTrue( util::str_to_bool( 'yes' ) ); + $this->assertTrue( util::str_to_bool( 'y' ) ); + $this->assertTrue( util::str_to_bool( 'oui' ) ); + $this->assertTrue( util::str_to_bool( 'vrai' ) ); + + $this->assertFalse( util::str_to_bool( 'false' ) ); + $this->assertFalse( util::str_to_bool( 'no' ) ); + $this->assertFalse( util::str_to_bool( 'n' ) ); + $this->assertFalse( util::str_to_bool( 'non' ) ); + $this->assertFalse( util::str_to_bool( 'faux' ) ); + + $this->assertFalse( util::str_to_bool( 'test' , false) ); + + } + + public function test_array_pluck() + { + $array = array( + array( + 'name' => 'Bob', + 'age' => 37 + ), + array( + 'name' => 'Fred', + 'age' => 37 + ), + array( + 'name' => 'Jane', + 'age' => 29 + ), + array( + 'name' => 'Brandon', + 'age' => 20 + ), + array( + 'age' => 41 + ) + ); + + $obj_array = array( + 'bob' => (object) array( + 'name' => 'Bob', + 'age' => 37 + ), + 'fred' => (object) array( + 'name' => 'Fred', + 'age' => 37 + ), + 'jane' => (object) array( + 'name' => 'Jane', + 'age' => 29 + ), + 'brandon' => (object) array( + 'name' => 'Brandon', + 'age' => 20 + ), + 'invalid' => (object) array( + 'age' => 41 + ) + ); + + $obj_array_expect = array( + 'bob' => 'Bob', + 'fred' => 'Fred', + 'jane' => 'Jane', + 'brandon' => 'Brandon' + ); + + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon' ), util::array_pluck( $array, 'name' ) ); + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon', array( 'age' => 41 ) ), util::array_pluck( $array, 'name', TRUE, FALSE ) ); + $this->assertEquals( $obj_array_expect, util::array_pluck( $obj_array, 'name' ) ); + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon' ), util::array_pluck( $obj_array, 'name', FALSE ) ); + + $expected = array('Bob', 'Fred', 'Jane', 'Brandon', 'invalid' => (object)array('age' => 41)); + $this->assertEquals($expected, util::array_pluck($obj_array, 'name', FALSE, FALSE)); + $expected = array('Bob', 'Fred', 'Jane', 'Brandon', array('age' => 41)); + $this->assertEquals($expected, util::array_pluck($array, 'name', false, false)); + } + + public function test_htmlentities() + { + $this->assertEquals( 'One & Two', util::htmlentities( 'One & Two' ) ); + $this->assertEquals( 'One & Two', util::htmlentities( 'One & Two', TRUE ) ); + } + + public function test_htmlspecialchars() + { + $this->assertEquals( 'One & Two', util::htmlspecialchars( 'One & Two' ) ); + $this->assertEquals( 'One & Two', util::htmlspecialchars( 'One & Two', TRUE ) ); + } + + public function test_remove_accents() + { + $this->assertEquals( 'A', util::remove_accents( "\xC3\x81" ) ); + $this->assertEquals( 'e', util::remove_accents( "\xC4\x97" ) ); + $this->assertEquals( 'U', util::remove_accents( "\xC3\x9C" ) ); + $this->assertEquals( 'Ae', util::remove_accents( "Ä", 'de' ) ); + $this->assertEquals( 'OEoeAEDHTHssaedhth', util::remove_accents(chr(140) . chr(156) . chr(198) . chr(208) . chr(222) . chr(223) . chr(230) . chr(240) . chr(254))); + } + + public function test_zero_pad() + { + $this->assertEquals( '00000341', util::zero_pad( 341, 8 ) ); + $this->assertEquals( '341', util::zero_pad( 341, 1 ) ); + } + + public function test_human_time_diff() + { + $this->assertEquals( '1 second ago', util::human_time_diff( time() - 1 ) ); + $this->assertEquals( '30 seconds ago', util::human_time_diff( time() - 30 ) ); + $this->assertEquals( '1 minute ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 1.4 ) ) ); + $this->assertEquals( '5 minutes ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 5 ) ) ); + $this->assertEquals( '1 hour ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR ) ) ); + $this->assertEquals( '2 hours ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 2 ) ) ); + $this->assertEquals( '1 day ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 ) ) ); + $this->assertEquals( '5 days ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 5 ) ) ); + $this->assertEquals( '1 week ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 7 ) ) ); + $this->assertEquals( '2 weeks ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 14 ) ) ); + $this->assertEquals( '1 month ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_WEEK * 5 ) ) ); + $this->assertEquals( '2 months ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_WEEK * 10 ) ) ); + $this->assertEquals( '1 year ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 15 ) ) ); + $this->assertEquals( '2 years ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 36 ) ) ); + $this->assertEquals( '11 years ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 140 ) ) ); + + $this->assertEquals( 'fifteen minutes ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 15 ), '', TRUE ) ); + } + + public function test_number_to_word() + { + try { + util::number_to_word('junk data'); + $this->fail('Accepted junk data'); + } catch(\LogicException $e) { + $this->assertEquals('Not a number', $e->getMessage()); + } + + // Partially numeric. + $this->assertEquals('', util::number_to_word('1a')); + + // Decimals + $this->assertEquals( 'five point zero five', util::number_to_word('5.05') ); + $this->assertEquals( 'zero point eight', util::number_to_word( 0.8 ) ); + + // Integers + $this->assertEquals( 'positive one', util::number_to_word( '+1' ) ); + $this->assertEquals( 'negative twelve', util::number_to_word( -12 ) ); + $this->assertEquals( 'one', util::number_to_word( 1 ) ); + $this->assertEquals( 'five', util::number_to_word( 5 ) ); + $this->assertEquals( 'fifteen', util::number_to_word( 15 ) ); + $this->assertEquals( 'twenty-one', util::number_to_word( 21 ) ); + $this->assertEquals( 'thirty-two', util::number_to_word( 32 ) ); + $this->assertEquals( 'forty-three', util::number_to_word( 43 ) ); + $this->assertEquals( 'fifty-four', util::number_to_word( 54 ) ); + $this->assertEquals( 'sixty-six', util::number_to_word( 66 ) ); + $this->assertEquals( 'seventy-seven', util::number_to_word( 77 ) ); + $this->assertEquals( 'eighty-eight', util::number_to_word( 88 ) ); + $this->assertEquals( 'ninety-nine', util::number_to_word( 99 ) ); + $this->assertEquals( 'one hundred and thirty-six', util::number_to_word( 136 ) ); + $this->assertEquals( 'ten', util::number_to_word( 10 ) ); + $this->assertEquals( 'twenty', util::number_to_word( 20 ) ); + $this->assertEquals( 'thirty', util::number_to_word( 30 ) ); + $this->assertEquals( 'forty', util::number_to_word( 40 ) ); + $this->assertEquals( 'fifty', util::number_to_word( 50 ) ); + $this->assertEquals( 'sixty', util::number_to_word( 60 ) ); + $this->assertEquals( 'seventy', util::number_to_word( 70 ) ); + $this->assertEquals( 'eighty', util::number_to_word( 80 ) ); + $this->assertEquals( 'ninety', util::number_to_word( 90 ) ); + $this->assertEquals( 'eleven', util::number_to_word( 11 ) ); + $this->assertEquals( 'thirteen', util::number_to_word( 13 ) ); + $this->assertEquals( 'fourteen', util::number_to_word( 14 ) ); + $this->assertEquals( 'fifteen', util::number_to_word( 15 ) ); + $this->assertEquals( 'sixteen', util::number_to_word( 16 ) ); + $this->assertEquals( 'seventeen', util::number_to_word( 17 ) ); + $this->assertEquals( 'eighteen', util::number_to_word( 18 ) ); + $this->assertEquals( 'nineteen', util::number_to_word( 19 ) ); + $this->assertEquals( 'one thousand', util::number_to_word( 1000 ) ); + $this->assertEquals( 'one million', util::number_to_word( 1000000 ) ); + $this->assertEquals( 'one billion', util::number_to_word( 1000000000 ) ); + $this->assertEquals( 'one trillion', util::number_to_word( 1000000000000 ) ); + $this->assertEquals( 'one quadrillion', util::number_to_word( '1000000000000000' ) ); + $this->assertEquals( 'one quintrillion', util::number_to_word( '1000000000000000000' ) ); + $this->assertEquals( 'one sextillion', util::number_to_word( '1000000000000000000000' ) ); + $this->assertEquals( 'one septillion', util::number_to_word( '1000000000000000000000000' ) ); + $this->assertEquals( 'one octillion', util::number_to_word( '1000000000000000000000000000' ) ); + $this->assertEquals( 'one nonillion', util::number_to_word( '1000000000000000000000000000000' ) ); + $this->assertEquals( 'one decillion', util::number_to_word( '1000000000000000000000000000000000' ) ); + $this->assertEquals( 'one', util::number_to_word( '1000000000000000000000000000000000000000000' ) ); + + } + + public function test_array_search_deep() + { + $users = array( + 1 => (object) array( 'username' => 'brandon', 'age' => 20 ), + 2 => (object) array( 'username' => 'matt', 'age' => 27 ), + 3 => (object) array( 'username' => 'jane', 'age' => 53 ), + 4 => (object) array( 'username' => 'john', 'age' => 41 ), + 5 => (object) array( 'username' => 'steve', 'age' => 11 ), + 6 => (object) array( 'username' => 'fred', 'age' => 42 ), + 7 => (object) array( 'username' => 'rasmus', 'age' => 21 ), + 8 => (object) array( 'username' => 'don', 'age' => 15 ), + 9 => array( 'username' => 'darcy', 'age' => 33 ), + ); + + $test = array( + 1 => 'brandon', + 2 => 'devon', + 3 => array( 'troy' ), + 4 => 'annie' + ); + + $this->assertFalse( util::array_search_deep( $test, 'bob' ) ); + $this->assertEquals( 3, util::array_search_deep( $test, 'troy' ) ); + $this->assertEquals( 4, util::array_search_deep( $test, 'annie' ) ); + $this->assertEquals( 2, util::array_search_deep( $test, 'devon', 'devon' ) ); + $this->assertEquals( 7, util::array_search_deep( $users, 'rasmus', 'username' ) ); + $this->assertEquals( 9, util::array_search_deep( $users, 'darcy', 'username' ) ); + $this->assertEquals( 1, util::array_search_deep( $users, 'brandon' ) ); + } + + public function test_array_map_deep() + { + $input = array( + '<', + 'abc', + '>', + 'def', + array( '&', 'test', '123' ), + (object) array( 'hey', '<>' ) + ); + + $expect = array( + '<', + 'abc', + '>', + 'def', + array( '&', 'test', '123' ), + (object) array( 'hey', '<>' ) + ); + + $this->assertEquals( $expect, util::array_map_deep( $input, 'htmlentities' ) ); + } + + public function test_random_string() + { + // Make sure the generated string contains only human friendly characters and is 30 characters long + $str = util::random_string( 30 ); + $this->assertTrue( (bool) preg_match( '/^([ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnprstuvwxyz23456789]{30})$/', $str ) ); + + // Make sure the generated string is 30 characters long + $str = util::random_string( 30, false, true ); + $this->assertTrue( strlen( $str ) === 30, 'random_string produced an invalid length string' ); + + // Make sure the generated string is 120 characters long + $str = util::random_string( 120 ); + $this->assertTrue(strlen( $str ) === 120, 'random_string produced an invalid length string'); + + // Make sure the string doesn't contain duplicate letters + $str = util::random_string( 53, true, false, true ); + $this->assertTrue(strlen($str) === 53, 'random_string produced an invalid length string'); + $this->assertTrue(count(array_unique(str_split($str))) === strlen($str), 'random_string produced a string with duplicate characters'); + + // Longer length than characters available + try { + $str = util::random_string( 55, true, false, true ); + $this->assertTrue( false ); + } catch (Exception $e) { + $this->assertTrue( true ); + } + + // Test secure variant + $str = util::secure_random_string(16); + $this->assertTrue(strlen($str) === 16); + + // Longer length than characters available + try { + $str = util::secure_random_string(0); + $this->assertTrue(false); + } catch (Exception $e) { + $this->assertTrue(true); + } + } + + public function test_match_string() + { + $this->assertTrue( util::match_string('a', 'a') ); + $this->assertFalse( util::match_string('a', ' a') ); + $this->assertFalse( util::match_string('/', '/something') ); + $this->assertTrue( util::match_string('test/*', 'test/first/second') ); + $this->assertTrue( util::match_string('*/test', 'first/second/test') ); + $this->assertFalse( util::match_string('first/', 'first/second/test') ); + $this->assertFalse( util::match_string('test', 'TEST') ); + $this->assertTrue( util::match_string('test', 'TEST', false) ); + } + + public function test_validate_email() + { + $this->assertTrue( util::validate_email( 'john.smith@gmail.com' ) ); + $this->assertTrue( util::validate_email( 'john.smith+label@gmail.com' ) ); + $this->assertTrue( util::validate_email( 'john.smith@gmail.co.uk' ) ); + } + + public function test_safe_truncate() + { + $this->assertEquals( 'The quick brown fox...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 24 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 55 ) ); + $this->assertEquals( 'Th...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 2 ) ); + $this->assertEquals( 'The...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 7 ) ); + } + + public function test_limit_characters() + { + $this->assertEquals( 'The quick brown fox jump...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 24 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 55 ) ); + $this->assertEquals( 'Th...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 2 ) ); + $this->assertEquals( 'The...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The qui...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 7 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 150 ) ); + } + + public function test_limit_words() + { + $this->assertEquals( 'The quick brown...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The quick brown fox jumps...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 5 ) ); + $this->assertEquals( 'The...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 1 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_words( 'The quick brown fox jumps over the lazy dog', 90 ) ); + $this->assertEquals( 'The quick brown fox jumps over the...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 7 ) ); + } + + public function test_ordinal() + { + $this->assertEquals( '1st', util::ordinal( 1 ) ); + $this->assertEquals( '2nd', util::ordinal( 2 ) ); + $this->assertEquals( '3rd', util::ordinal( 3 ) ); + $this->assertEquals( '4th', util::ordinal( 4 ) ); + $this->assertEquals( '5th', util::ordinal( 5 ) ); + $this->assertEquals( '6th', util::ordinal( 6 ) ); + $this->assertEquals( '7th', util::ordinal( 7 ) ); + $this->assertEquals( '8th', util::ordinal( 8 ) ); + $this->assertEquals( '9th', util::ordinal( 9 ) ); + $this->assertEquals( '22nd', util::ordinal( 22 ) ); + $this->assertEquals( '23rd', util::ordinal( 23 ) ); + $this->assertEquals( '143rd', util::ordinal( 143 ) ); + } + + public function test_array_first() + { + $test = array( 'a' => array( 'a', 'b', 'c' ) ); + + $this->assertEquals( 'a', util::array_first( util::array_get( $test['a'] ) ) ); + } + + public function test_array_first_key() + { + $test = array( 'a' => array( 'a' => 'b', 'c' => 'd' ) ); + + $this->assertEquals( 'a', util::array_first_key( util::array_get( $test['a'] ) ) ); + } + + public function test_array_last() + { + $test = array( 'a' => array( 'a', 'b', 'c' ) ); + + $this->assertEquals( 'c', util::array_last( util::array_get( $test['a'] ) ) ); + } + + public function test_array_last_key() + { + $test = array( 'a' => array( 'a' => 'b', 'c' => 'd' ) ); + + $this->assertEquals( 'c', util::array_last_key( util::array_get( $test['a'] ) ) ); + } + + public function test_array_flatten() + { + $input = array( 'a', 'b', 'c', 'd', array( 'first' => 'e', 'f', 'second' => 'g', array( 'h', 'third' => 'i', array( array( array( array( 'j', 'k', 'l' ) ) ) ) ) ) ); + $expectNoKeys = range( 'a', 'l' ); + $expectWithKeys = array( + 'a', 'b', 'c', 'd', + 'first' => 'e', + 'f', + 'second' => 'g', + 'h', + 'third' => 'i', + 'j', 'k', 'l' + ); + + $this->assertEquals( $expectWithKeys, util::array_flatten( $input ) ); + $this->assertEquals( $expectNoKeys, util::array_flatten( $input, false ) ); + $this->assertEquals( $expectWithKeys, util::array_flatten( $input, true ) ); + } + + public function test_strip_space() + { + $input = ' The quick brown fox jumps over the lazy dog '; + $expect = 'Thequickbrownfoxjumpsoverthelazydog'; + + $this->assertEquals($expect, Util::strip_space($input)); + } + + public function test_sanitize_string() + { + $input = ' Benoit! à New-York? j’ai perçu 1 % : Qu’as-tu "gagné" chez M. V. Noël? Dix francs.'; + $expect = 'benoitanewyorkjaipercu1quastugagnechezmvnoeldixfrancs'; + + $this->assertEquals($expect, Util::sanitize_string($input)); + } + + public function test_get_gravatar() + { + $_SERVER['HTTPS'] = 'on'; + $this->assertEquals('https://secure.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=32', util::get_gravatar('john.doe@example.org')); + $this->assertEquals('https://secure.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=128', util::get_gravatar('john.doe@example.org', 128)); + + $_SERVER['HTTPS'] = 'off'; + $this->assertEquals('http://www.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=32', util::get_gravatar('john.doe@example.org')); + $this->assertEquals('http://www.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=128', util::get_gravatar('john.doe@example.org', 128)); + } + + public function test_get_client_ip() + { + $_SERVER['REMOTE_ADDR'] = '192.168.30.152'; + $_SERVER['HTTP_CLIENT_IP'] = '192.168.30.153'; + $_SERVER['HTTP_X_FORWARDED_FOR'] = '192.168.30.154'; + $this->assertEquals('192.168.30.152', util::get_client_ip()); + $this->assertEquals('192.168.30.153', util::get_client_ip(true)); + + unset($_SERVER['HTTP_CLIENT_IP']); + $this->assertEquals('192.168.30.154', util::get_client_ip(true)); + unset($_SERVER['HTTP_X_FORWARDED_FOR']); + $this->assertEquals('192.168.30.152', util::get_client_ip(true)); + } + + public function test_full_permissions() + { + // Text a non-existant file. + $this->assertFalse(util::full_permissions('faker-123.blah'), 'Gave a permission value for a non-existant file.'); + + // Test an existing file. + $expected = '-rw-rw-rw-'; + $tempFile = tempnam(sys_get_temp_dir(), 'foo'); + $this->assertTrue(chmod($tempFile, 0666), 'Oops. Could not change temp file\'s permissions to 0666.'); + $this->assertEquals($expected, util::full_permissions($tempFile), 'Could not properly obtain permissions of an existing file.'); + unlink($tempFile); + + $this->assertEquals('lr--r--r--', util::full_permissions('fake-file-222', octdec('120444'))); + $this->assertEquals('ur--r--r--', util::full_permissions('fake-file-222', octdec('000444'))); + $this->assertEquals('srwxr-xr-x', util::full_permissions('fake-file-222', octdec('140755'))); + $this->assertEquals('drwxr-xr-x', util::full_permissions('fake-file-222', octdec('40755'))); + $this->assertEquals('brw-rw----', util::full_permissions('fake-file-222', octdec('60660'))); + $this->assertEquals('crw-rw----', util::full_permissions('fake-file-222', octdec('20660'))); + $this->assertEquals('prw-rw----', util::full_permissions('fake-file-222', octdec('10660'))); + $this->assertEquals('---x------', util::full_permissions('fake-file-222', octdec('100100'))); + $this->assertEquals('--w-------', util::full_permissions('fake-file-222', octdec('100200'))); + $this->assertEquals('--wx------', util::full_permissions('fake-file-222', octdec('100300'))); + $this->assertEquals('-r--------', util::full_permissions('fake-file-222', octdec('100400'))); + $this->assertEquals('-r-x------', util::full_permissions('fake-file-222', octdec('100500'))); + $this->assertEquals('-rw-------', util::full_permissions('fake-file-222', octdec('100600'))); + $this->assertEquals('-rwx------', util::full_permissions('fake-file-222', octdec('100700'))); + + // Windows does not have the concept of /. + if (!defined('PHP_WINDOWS_VERSION_MAJOR')) { + $this->assertEquals('drwxr-xr-x', util::full_permissions('/')); + } + } + + public function test_array_clean() + { + $input = array( 'a', 'b', '', null, false, 0); + $expect = array('a', 'b'); + $this->assertEquals($expect, Util::array_clean($input)); + } + + public function test_var_dump_plain() + { + $input = 'var'; + $expect = 'string(3) "var"'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = true; + $expect = 'bool(true)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = 1; + $expect = 'int(1)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = 1.5; + $expect = 'float(1.5)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = null; + $expect = 'NULL'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = fopen('php://memory', 'r'); + $expect = 'resource("stream") "' . $input . '"'; + $this->assertEquals($expect, Util::var_dump_plain($input, -1)); + fclose($input); + + // Test complex arrays. + $input = array(1, 2, 4, 6, 10 => 20, 100 => 200); + $actual = util::var_dump_plain($input, true); + $this->assertContains(')', $actual); + + // Test complex objects. + $experiment = new VarDumpExperiment(); + $actual = util::var_dump_plain($experiment, true); + $this->assertContains('1 => string(1', $actual); + } + + public function test_var_dump() + { + $input = 'var'; + $expect = '
string(3) "var"
'; + + // Ensure the proper output is returned + $this->assertEquals($expect, Util::var_dump($input, true)); + + // Ensure the proper output is actually outputted + $this->expectOutputString($expect); + util::var_dump($input); + + // Ensure we avoid infinite recursion on recursive arrays + $a = array('a' => 'value a', 'b' => 'value b'); + $b = array('test' => &$a); + $c = array('a' => &$a, 'b' => &$b); + $a['c'] = &$c; + $b['c'] = &$c; + $this->assertContains('*RECURSION DETECTED*', Util::var_dump($c, true)); + + // Ensure we avoid infinite recursion on recursive objects + $a = (object) array('a' => 'value a', 'b' => 'value b'); + $b = (object) array('test' => &$a); + $c = (object) array('a' => &$a, 'b' => &$b); + $a->c = &$c; + $b->c = &$c; + $this->assertContains('*RECURSION DETECTED*', Util::var_dump($c, true)); + + // Test class scoping. + $experiment = new VarDumpExperiment(); + $actual = util::var_dump($experiment, true); + + $snippet = substr($actual, strrpos($actual, 'display:inline')); + $this->assertContains('"public"', $snippet); + $this->assertContains('"protected:protected"', $snippet); + $this->assertContains('"private:VarDumpExperiment:private"', $actual); + } + + public function test_linkify() + { + $input = 'great websites: http://www.google.com?param=test and http://yahoo.com/a/nested/folder'; + $expect = 'great websites: http://www.google.com?param=test and http://yahoo.com/a/nested/folder'; + $this->assertEquals($expect, Util::linkify($input)); + + $this->assertEquals($expect, util::linkify($expect), 'linkify() tried to double linkify an href.'); + } + + public function test_start_with() + { + $this->assertTrue(Util::starts_with('start a string', 'start a')); + $this->assertFalse(Util::starts_with('start a string', 'string')); + } + + public function test_end_with() + { + $this->assertTrue(Util::ends_with('start a string', 'a string')); + $this->assertFalse(Util::ends_with('start a string', 'start')); + } + + public function test_contains() + { + $this->assertTrue(Util::str_contains('start a string', 'a string')); + $this->assertFalse(Util::str_contains('start a string', 'Start')); + } + + public function test_iContains() + { + $this->assertTrue(Util::str_icontains('start a string', 'a string')); + $this->assertTrue(Util::str_icontains('start a string', 'Start')); + } + + public function test_get_file_ext() + { + $input = 'a_pdf_fil.pdf'; + $expect = 'pdf'; + $this->assertEquals($expect, Util::get_file_ext($input)); + } + + public function test_rmdir() + { + $dirname = dirname(__FILE__); + + // Test deleting a non-existant directory + $this->assertFalse(file_exists($dirname . '/test1')); + $this->assertTrue(util::rmdir($dirname . '/test1')); + + // Test deleting an empty directory + $dir = $dirname . '/test2'; + mkdir($dir); + + $this->assertTrue(is_dir($dir)); + + if (is_dir($dir)) { + util::rmdir($dir); + $this->assertFalse(is_dir($dir)); + } + + // Test deleting a non-empty directory + $dir = $dirname . '/test3'; + $file = $dirname . '/test3/test.txt'; + mkdir($dir); + touch($file); + + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_file($file)); + + if (is_dir($dir)) { + util::rmdir($dir); + $this->assertFalse(is_dir($dir)); + $this->assertFalse(is_file($file)); + } + + // Test deleting a non-directory path + $file = $dirname . '/test4.txt'; + touch($file); + + try { + $str = util::rmdir($file); + $this->assertTrue(false); + } catch (\Exception $e) { + $this->assertTrue(true); + } + + unlink($file); + + // Test deleting a nested directory + $dir1 = $dirname . '/test5'; + $dir2 = $dirname . '/test5/nested_dir'; + $file1 = $dir1 . '/file1.txt'; + $file2 = $dir2 . '/file2.txt'; + mkdir($dir1); + mkdir($dir2); + touch($file1); + touch($file2); + + $this->assertTrue(is_dir($dir1)); + $this->assertTrue(is_dir($dir2)); + $this->assertTrue(is_file($file1)); + $this->assertTrue(is_file($file2)); + + if (is_dir($dir1)) { + util::rmdir($dir1); + $this->assertFalse(is_dir($dir1)); + $this->assertFalse(is_dir($dir2)); + $this->assertFalse(is_file($file1)); + $this->assertFalse(is_file($file2)); + } + + // Test symlink traversal. + $dir = $dirname . '/test6'; + $nestedDir = "$dir/nested"; + $symlink = "$dir/nested-symlink"; + + mkdir($dir); + mkdir($nestedDir); + + $symlinkStatus = symlink($nestedDir, $symlink); + $this->assertTrue($symlinkStatus, 'The test system does not support making symlinks.'); + + if (!$symlink) { + return; + } + + $this->assertTrue(util::rmdir($symlink, true), 'Could not delete a symlinked directory.'); + $this->assertFalse(file_exists($symlink), 'Could not delete a symlinked directory.'); + util::rmdir($dir, true); + $this->assertFalse(is_dir($dir), 'Could not delete a directory with a symlinked directory inside of it.'); + } + + public function test_get_current_url() + { + $expected = 'http://test.dev/test.php?foo=bar'; + $expectedAuth = 'http://admin:123@test.dev/test.php?foo=bar'; + $expectedPort = 'http://test.dev:443/test.php?foo=bar'; + $expectedPort2 = 'https://test.dev:80/test.php?foo=bar'; + $expectedSSL = 'https://test.dev/test.php?foo=bar'; + + $_SERVER['HTTP_HOST'] = 'test.dev'; + $_SERVER['SERVER_PORT'] = 80; + $_SERVER['REQUEST_URI'] = '/test.php?foo=bar'; + $_SERVER['QUERY_STRING'] = 'foo=bar'; + $_SERVER['PHP_SELF'] = '/test.php'; + + // Test regular. + $this->assertEquals($expected, util::get_current_url()); + + // Test server auth. + $_SERVER['PHP_AUTH_USER'] = 'admin'; + $_SERVER['PHP_AUTH_PW'] = '123'; + $this->assertEquals($expectedAuth, util::get_current_url()); + unset($_SERVER['PHP_AUTH_USER']); + unset($_SERVER['PHP_AUTH_PW']); + + // Test port. + $_SERVER['SERVER_PORT'] = 443; + $this->assertEquals($expectedPort, util::get_current_url()); + + // Test SSL. + $_SERVER['HTTPS'] = 'on'; + $this->assertEquals($expectedSSL, util::get_current_url()); + $_SERVER['SERVER_PORT'] = 80; + $this->assertEquals($expectedPort2, util::get_current_url()); + unset($_SERVER['HTTPS']); + + // Test no $_SERVER['REQUEST_URI'] (e.g., MS IIS). + unset($_SERVER['REQUEST_URI']); + $this->assertEquals($expected, util::get_current_url()); + } + + public function test_set_writable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_writable('/no/such/file')); + + // Create a file to test with + $dirname = dirname(__FILE__); + $file = $dirname . '/test7'; + touch($file); + chmod($file, 0644); + + // The file is owned by us so it should be writable + $this->assertTrue(is_writable($file)); + $this->assertEquals('-rw-r--r--', util::full_permissions($file)); + + // Toggle writable bit off for us + util::set_writable($file, false); + clearstatcache(); + $this->assertFalse(is_writable($file)); + $this->assertEquals('-r--r--r--', util::full_permissions($file)); + + // Toggle writable bit back on for us + util::set_writable($file, true); + clearstatcache(); + $this->assertTrue(is_writable($file)); + $this->assertEquals('-rw-r--r--', util::full_permissions($file)); + + unlink($file); + } + + public function test_set_readable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_readable('/no/such/file')); + + $dirname = dirname(__FILE__); + $file = $dirname . '/test8'; + touch($file); + + $this->assertTrue(is_readable($file)); + + util::set_readable($file, false); + clearstatcache(); + $this->assertFalse(is_readable($file)); + + util::set_readable($file, true); + clearstatcache(); + $this->assertTrue(is_readable($file)); + + unlink($file); + } + + public function test_set_executable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_executable('/no/such/file')); + + $dirname = dirname(__FILE__); + $file = $dirname . '/test9'; + touch($file); + + $this->assertFalse(is_executable($file)); + + util::set_executable($file, true); + clearstatcache(); + $this->assertTrue(is_executable($file)); + + util::set_executable($file, false); + clearstatcache(); + $this->assertFalse(is_executable($file)); + + unlink($file); + } + + public function test_directory_size() { + $dirname = dirname(__FILE__); + $dir = $dirname .'/dir1'; + mkdir($dir); + $file1 = $dir .'/file1'; + file_put_contents($file1, '1234567890'); + $file2 = $dir .'/file2'; + file_put_contents($file2, range('a', 'z')); + $this->assertEquals(10 + 26, util::directory_size($dir)); + util::rmdir($dir); + } + + public function test_get_user_directory() { + // Test for OS Default. + $this->assertTrue(is_writable(util::get_user_directory())); + + $oldServer = $_SERVER; + unset($_SERVER); + // Test for UNIX. + $_SERVER['HOME'] = '/home/unknown'; + $this->assertEquals($_SERVER['HOME'], util::get_user_directory(), 'Could not get the user\'s home directory in UNIX.'); + unset($_SERVER); + + // Test for Windows. + $expected = 'X:\Users\ThisUser'; + $_SERVER['HOMEDRIVE'] = 'X:'; + $_SERVER['HOMEPATH'] = '\Users\ThisUser'; + $this->assertEquals($expected, util::get_user_directory(), 'Could not get the user\'s home directory in Windows.'); + + // In case the tests are not being run in isolation. + $_SERVER = $oldServer; + } + + public function test_directory_contents() { + $dirname = dirname(__FILE__); + $dir = $dirname . DIRECTORY_SEPARATOR .'dir1'; + mkdir($dir); + $file1 = $dir . DIRECTORY_SEPARATOR .'file1'; + touch($file1); + $this->assertEquals(array($file1), util::directory_contents($dir)); + util::rmdir($dir); + } +} diff --git a/f_config/DB.php b/f_config/DB.php index 156f53af..58d04ce8 100644 --- a/f_config/DB.php +++ b/f_config/DB.php @@ -9,4 +9,4 @@ if($SETTING->IsExist()) { Error('설정 파일이 없습니다. 설정을 먼저 하십시요!'); } -?> + diff --git a/f_config/DBS.php b/f_config/DBS.php index 9531d717..6f95263f 100644 --- a/f_config/DBS.php +++ b/f_config/DBS.php @@ -10,4 +10,4 @@ for($i=0; $i < $_serverCount; $i++) { } } -?> + diff --git a/f_config/MAIL.php b/f_config/MAIL.php index 63efdfce..9ababf2d 100644 --- a/f_config/MAIL.php +++ b/f_config/MAIL.php @@ -9,4 +9,4 @@ if($SETTING->IsExist()) { Error('설정 파일이 없습니다. 설정을 먼저 하십시요!'); } -?> + diff --git a/f_config/SESSION.php b/f_config/SESSION.php index d34cca64..2a50f81f 100644 --- a/f_config/SESSION.php +++ b/f_config/SESSION.php @@ -10,4 +10,4 @@ if($SESSION->IsLoggedIn() == false) { exit(1); } -?> + diff --git a/f_config/SETTING.php b/f_config/SETTING.php index ad29ba26..31d4665f 100644 --- a/f_config/SETTING.php +++ b/f_config/SETTING.php @@ -4,4 +4,4 @@ require_once(ROOT.W.F_FUNC.W.'class._Setting.php'); $SETTING = new _Setting(ROOT.W.D_SETTING.W.SET.PHP); -?> + diff --git a/f_config/SETTINGS.php b/f_config/SETTINGS.php index cb2e988a..f1e91f30 100644 --- a/f_config/SETTINGS.php +++ b/f_config/SETTINGS.php @@ -8,4 +8,4 @@ foreach($_serverDirs as $serverDir) { $i++; } -?> + diff --git a/f_config/_common.php b/f_config/_common.php index cea1c49d..b25b4786 100644 --- a/f_config/_common.php +++ b/f_config/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/f_config/app.php b/f_config/app.php index 7900672c..25a61033 100644 --- a/f_config/app.php +++ b/f_config/app.php @@ -42,4 +42,4 @@ $_serverLevels = array( 1 ); -?> + diff --git a/f_config/config.php b/f_config/config.php index 03dd7eac..e6133c67 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -53,4 +53,4 @@ define('SLEEP', 'sleep'); //define(BLOCKBODY, ''); define('BLOCKBODY', 'oncontextmenu="return false" onselectstart="return false" ondragstart="return false"'); -?> + diff --git a/f_func/_common.php b/f_func/_common.php index cea1c49d..b25b4786 100644 --- a/f_func/_common.php +++ b/f_func/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/f_func/class._Chat.php b/f_func/class._Chat.php index 85f5d064..1ada9fc6 100644 --- a/f_func/class._Chat.php +++ b/f_func/class._Chat.php @@ -24,4 +24,4 @@ class _Chat { } } -?> + diff --git a/f_func/class._DB.php b/f_func/class._DB.php index 8ba7d4cf..3b7bc593 100644 --- a/f_func/class._DB.php +++ b/f_func/class._DB.php @@ -142,4 +142,4 @@ class _DB { } } -?> + diff --git a/f_func/class._JSON.php b/f_func/class._JSON.php index 2f3641a0..d34c2018 100644 --- a/f_func/class._JSON.php +++ b/f_func/class._JSON.php @@ -52,4 +52,4 @@ class _JSON { } } -?> + diff --git a/f_func/class._Lock.php b/f_func/class._Lock.php index 5dcf8cfa..ac6e5bc4 100644 --- a/f_func/class._Lock.php +++ b/f_func/class._Lock.php @@ -70,4 +70,4 @@ class _Lock { } } -?> + diff --git a/f_func/class._Log.php b/f_func/class._Log.php index c7c88759..6c3b8bec 100644 --- a/f_func/class._Log.php +++ b/f_func/class._Log.php @@ -45,4 +45,4 @@ class _Log { } } -?> + diff --git a/f_func/class._Mail.php b/f_func/class._Mail.php index 3199a606..9d218d20 100644 --- a/f_func/class._Mail.php +++ b/f_func/class._Mail.php @@ -37,4 +37,4 @@ class _Mail { } } -?> + diff --git a/f_func/class._Process.php b/f_func/class._Process.php index 0d5e6b33..035845a5 100644 --- a/f_func/class._Process.php +++ b/f_func/class._Process.php @@ -33,4 +33,4 @@ class _Process { } } -?> + diff --git a/f_func/class._Queue.php b/f_func/class._Queue.php index 87f9000e..6d04a335 100644 --- a/f_func/class._Queue.php +++ b/f_func/class._Queue.php @@ -39,4 +39,4 @@ class _Queue { return $value; } } -?> + diff --git a/f_func/class._Session.php b/f_func/class._Session.php index a96c4d0b..c9c8df9e 100644 --- a/f_func/class._Session.php +++ b/f_func/class._Session.php @@ -72,4 +72,4 @@ class _Session { } } -?> + diff --git a/f_func/class._Setting.php b/f_func/class._Setting.php index afc0c0eb..5cf3d1ce 100644 --- a/f_func/class._Setting.php +++ b/f_func/class._Setting.php @@ -78,4 +78,4 @@ class _Setting { } } -?> + diff --git a/f_func/class._String.php b/f_func/class._String.php index 6a161790..5ab0cbb6 100644 --- a/f_func/class._String.php +++ b/f_func/class._String.php @@ -234,4 +234,3 @@ class _String { } } -?> diff --git a/f_func/class._Time.php b/f_func/class._Time.php index 9f3c7cf8..cc72e34a 100644 --- a/f_func/class._Time.php +++ b/f_func/class._Time.php @@ -44,4 +44,4 @@ class _Time { } } -?> + diff --git a/f_func/class._Validation.php b/f_func/class._Validation.php index 62ee8d1e..dbf4e7da 100644 --- a/f_func/class._Validation.php +++ b/f_func/class._Validation.php @@ -111,4 +111,4 @@ class _Validation { } } -?> + diff --git a/f_func/func.php b/f_func/func.php index deded7cb..4d8a4377 100644 --- a/f_func/func.php +++ b/f_func/func.php @@ -97,4 +97,4 @@ function delExpiredInDir($dir, $t) { return $success; } -?> + diff --git a/f_install/_common.php b/f_install/_common.php index cea1c49d..b25b4786 100644 --- a/f_install/_common.php +++ b/f_install/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/f_install/install1Post.php b/f_install/install1Post.php index b6772741..f025ec74 100644 --- a/f_install/install1Post.php +++ b/f_install/install1Post.php @@ -49,10 +49,12 @@ foreach($querys as $query) { // 파일로 DB 정보 저장 $file = @fopen(ROOT.W.D_SETTING.W.SET.PHP, 'w') or ErrorToScreen('설정 실패. 디렉토리의 퍼미션을 707로 주십시요'); -@fwrite($file, "\n") or ErrorToScreen('설정 실패. 디렉토리의 퍼미션을 707로 주십시요'); +@fwrite($file, " - + +Go to install2.php
+Todo : Back to replace code diff --git a/f_retrival/_common.php b/f_retrival/_common.php index bc36bd5c..9ed1eefa 100644 --- a/f_retrival/_common.php +++ b/f_retrival/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_banner/banner.php b/i_banner/banner.php index 78dc7a6c..5f8da1ca 100644 --- a/i_banner/banner.php +++ b/i_banner/banner.php @@ -54,4 +54,3 @@ switch(rand()%10) { break; } */ -?> diff --git a/i_entrance/_common.php b/i_entrance/_common.php index d56bd857..f57670c9 100644 --- a/i_entrance/_common.php +++ b/i_entrance/_common.php @@ -8,4 +8,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index c176fe6a..14b36414 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -6,6 +6,7 @@ // $_POST['select'] : 0: 폐쇄, 1: 리셋, 2: 오픈 require_once('_common.php'); +require_once(ROOT.W.E_LIB.W.'util.php'); require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); @@ -23,10 +24,10 @@ function getPost($str){ return $temp; } -$action = getPost('action'); -$notice = getPost('notice'); -$server = getPost('server'); -$select = getPost('select'); +$action = util::array_get($_POST['action'], ''); +$notice = util::array_get($_POST['notice'], ''); +$server = util::array_get($_POST['server'], ''); +$select = util::array_get($_POST['select'], ''); $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); @@ -48,7 +49,10 @@ if($member['GRADE'] < 6) { rename(ROOT.W.$serverDir.'_rest', ROOT.W.$serverDir); $response['result'] = 'SUCCESS'; } elseif($select == 1) { - @unlink(ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP); + if(file_exists(ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP)){ + @unlink(ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP); + } + $response['installURL'] = ROOT.W."{$serverDir}_close/install.php"; $response['result'] = 'SUCCESS'; } elseif($select == 2) { @@ -64,5 +68,3 @@ if($member['GRADE'] < 6) { sleep(1); echo json_encode($response); - -?> diff --git a/i_entrance/donation/Get.php b/i_entrance/donation/Get.php index 24e3d354..629556b8 100644 --- a/i_entrance/donation/Get.php +++ b/i_entrance/donation/Get.php @@ -42,4 +42,4 @@ if($member['GRADE'] < 6) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/donation/Post.php b/i_entrance/donation/Post.php index c0cae029..7a4293cd 100644 --- a/i_entrance/donation/Post.php +++ b/i_entrance/donation/Post.php @@ -55,4 +55,4 @@ if($member['GRADE'] < 6) { echo json_encode($response); -?> + diff --git a/i_entrance/donation/_common.php b/i_entrance/donation/_common.php index 90e4756f..d7a78a7b 100644 --- a/i_entrance/donation/_common.php +++ b/i_entrance/donation/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_entrance/donation/calculatePost.php b/i_entrance/donation/calculatePost.php index f413ccd6..2970d44e 100644 --- a/i_entrance/donation/calculatePost.php +++ b/i_entrance/donation/calculatePost.php @@ -43,4 +43,4 @@ if($member['GRADE'] < 6) { echo json_encode($response); -?> + diff --git a/i_entrance/enterPost.php b/i_entrance/enterPost.php index 550878f4..10e785b4 100644 --- a/i_entrance/enterPost.php +++ b/i_entrance/enterPost.php @@ -19,5 +19,3 @@ $response['result'] = 'SUCCESS'; sleep(1); echo json_encode($response); - -?> diff --git a/i_entrance/logoutPost.php b/i_entrance/logoutPost.php index 5d9a5bf6..990d48c8 100644 --- a/i_entrance/logoutPost.php +++ b/i_entrance/logoutPost.php @@ -13,4 +13,4 @@ $response['result'] = 'SUCCESS'; sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/manage/Get.php b/i_entrance/manage/Get.php index 41d73e00..104ae490 100644 --- a/i_entrance/manage/Get.php +++ b/i_entrance/manage/Get.php @@ -75,4 +75,4 @@ $response['result'] = 'SUCCESS'; sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/manage/_common.php b/i_entrance/manage/_common.php index 90e4756f..d7a78a7b 100644 --- a/i_entrance/manage/_common.php +++ b/i_entrance/manage/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_entrance/manage/deletePost.php b/i_entrance/manage/deletePost.php index f810ef4f..aa08f78c 100644 --- a/i_entrance/manage/deletePost.php +++ b/i_entrance/manage/deletePost.php @@ -44,4 +44,4 @@ if($dt == $rf) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/manage/iconPost.php b/i_entrance/manage/iconPost.php index 623eaa69..a77e3e20 100644 --- a/i_entrance/manage/iconPost.php +++ b/i_entrance/manage/iconPost.php @@ -76,4 +76,4 @@ echo ""; -?> + diff --git a/i_entrance/manage/passwordPost.php b/i_entrance/manage/passwordPost.php index f9d2be5f..b0715c75 100644 --- a/i_entrance/manage/passwordPost.php +++ b/i_entrance/manage/passwordPost.php @@ -36,4 +36,4 @@ if($member['PW'] != $pw) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/manage/quitPost.php b/i_entrance/manage/quitPost.php index 1410fb92..d3e1f51f 100644 --- a/i_entrance/manage/quitPost.php +++ b/i_entrance/manage/quitPost.php @@ -33,4 +33,4 @@ if($member['PW'] != $pw) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index dac7382c..be0b8477 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -87,4 +87,4 @@ if($member['GRADE'] < 6) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/member/Post.php b/i_entrance/member/Post.php index 55a1b047..5f751122 100644 --- a/i_entrance/member/Post.php +++ b/i_entrance/member/Post.php @@ -118,4 +118,4 @@ if($member['GRADE'] < 6) { sleep(1); echo json_encode($response); -?> + diff --git a/i_entrance/member/_common.php b/i_entrance/member/_common.php index 90e4756f..d7a78a7b 100644 --- a/i_entrance/member/_common.php +++ b/i_entrance/member/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_entrance/serverListPost.php b/i_entrance/serverListPost.php index f48df28d..f6d8f2a3 100644 --- a/i_entrance/serverListPost.php +++ b/i_entrance/serverListPost.php @@ -150,5 +150,5 @@ function getTurnTerm($term) { return $str; } -?> + diff --git a/i_login/Post.php b/i_login/Post.php index b6575890..6043d352 100644 --- a/i_login/Post.php +++ b/i_login/Post.php @@ -51,4 +51,4 @@ if($DB->Count($rs) == 1) { sleep(1); echo json_encode($response); -?> + diff --git a/i_login/_common.php b/i_login/_common.php index cea1c49d..b25b4786 100644 --- a/i_login/_common.php +++ b/i_login/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_login/findpw/Get.php b/i_login/findpw/Get.php index 56fc291d..4f3cb3e5 100644 --- a/i_login/findpw/Get.php +++ b/i_login/findpw/Get.php @@ -12,4 +12,4 @@ $response['result'] = 'SUCCESS'; sleep(1); echo json_encode($response); -?> + diff --git a/i_login/findpw/Post.php b/i_login/findpw/Post.php index e771b808..9e80a86e 100644 --- a/i_login/findpw/Post.php +++ b/i_login/findpw/Post.php @@ -120,4 +120,4 @@ $response['msg'] = "정상적으로 비번이 변경되었습니다. ID: {$id}"; sleep(1); echo json_encode($response); -?> + diff --git a/i_login/findpw/_common.php b/i_login/findpw/_common.php index 90e4756f..d7a78a7b 100644 --- a/i_login/findpw/_common.php +++ b/i_login/findpw/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_login/findpw/checkPost.php b/i_login/findpw/checkPost.php index b2be62b9..630abcb1 100644 --- a/i_login/findpw/checkPost.php +++ b/i_login/findpw/checkPost.php @@ -82,4 +82,4 @@ if($type == 0) { sleep(1); echo json_encode($response); -?> + diff --git a/i_login/findpw/sendCodePost.php b/i_login/findpw/sendCodePost.php index 96878d95..e062ef40 100644 --- a/i_login/findpw/sendCodePost.php +++ b/i_login/findpw/sendCodePost.php @@ -46,4 +46,4 @@ if($err == 1) { //sleep(1); echo json_encode($response); -?> + diff --git a/i_login/findpw/verifyCodePost.php b/i_login/findpw/verifyCodePost.php index f704f9b6..9926eaa9 100644 --- a/i_login/findpw/verifyCodePost.php +++ b/i_login/findpw/verifyCodePost.php @@ -45,4 +45,4 @@ if($err == 1) { sleep(1); echo json_encode($response); -?> + diff --git a/i_login/join/Get.php b/i_login/join/Get.php index 56fc291d..4f3cb3e5 100644 --- a/i_login/join/Get.php +++ b/i_login/join/Get.php @@ -12,4 +12,4 @@ $response['result'] = 'SUCCESS'; sleep(1); echo json_encode($response); -?> + diff --git a/i_login/join/_common.php b/i_login/join/_common.php index 90e4756f..d7a78a7b 100644 --- a/i_login/join/_common.php +++ b/i_login/join/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_login/join/sendCodePost.php b/i_login/join/sendCodePost.php index 31f1526f..5c74adfe 100644 --- a/i_login/join/sendCodePost.php +++ b/i_login/join/sendCodePost.php @@ -46,4 +46,4 @@ if($err == 1) { //sleep(1); echo json_encode($response); -?> + diff --git a/i_login/join/verifyCodePost.php b/i_login/join/verifyCodePost.php index f704f9b6..9926eaa9 100644 --- a/i_login/join/verifyCodePost.php +++ b/i_login/join/verifyCodePost.php @@ -45,4 +45,4 @@ if($err == 1) { sleep(1); echo json_encode($response); -?> + diff --git a/i_other/_common.php b/i_other/_common.php index cea1c49d..b25b4786 100644 --- a/i_other/_common.php +++ b/i_other/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/i_popup/_common.php b/i_popup/_common.php index cea1c49d..b25b4786 100644 --- a/i_popup/_common.php +++ b/i_popup/_common.php @@ -7,4 +7,4 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> + diff --git a/install.php b/install.php index c364afb1..09e0de36 100644 --- a/install.php +++ b/install.php @@ -3,4 +3,6 @@ require_once('_common.php'); ?> - + +Go to f_install/install.php
+Todo : Back to replace code diff --git a/twe_close/MYDB.php b/twe_close/MYDB.php index fff8a763..708a2533 100644 --- a/twe_close/MYDB.php +++ b/twe_close/MYDB.php @@ -38,4 +38,3 @@ function MYDB_close($connect) { return mysqli_close($connect); } -?> diff --git a/twe_close/_119_b.php b/twe_close/_119_b.php index 2f3b9668..9f3d1eb9 100644 --- a/twe_close/_119_b.php +++ b/twe_close/_119_b.php @@ -53,5 +53,5 @@ case "락풀기": break; } -echo ""; -?> +//echo ""; +echo '_119.php';//TODO:replace diff --git a/twe_close/_admin1_submit.php b/twe_close/_admin1_submit.php index 3f3bd5b2..1e0f67c0 100644 --- a/twe_close/_admin1_submit.php +++ b/twe_close/_admin1_submit.php @@ -175,6 +175,6 @@ switch($btn) { break; } -echo ""; -?> +//echo ""; +echo '_admin1.php';//TODO:replace diff --git a/twe_close/_admin2_submit.php b/twe_close/_admin2_submit.php index 295d675e..37c04f3f 100644 --- a/twe_close/_admin2_submit.php +++ b/twe_close/_admin2_submit.php @@ -427,6 +427,6 @@ switch($btn) { break; } -echo ""; -?> +//echo ""; +echo '_admin2.php';//TODO:replace diff --git a/twe_close/_admin3_submit.php b/twe_close/_admin3_submit.php index 60ed41b5..10a09171 100644 --- a/twe_close/_admin3_submit.php +++ b/twe_close/_admin3_submit.php @@ -129,6 +129,6 @@ switch($btn) { break; } -echo ""; -?> +//echo ""; +echo '_admin3.php';//TODO:replace diff --git a/twe_close/_admin4_submit.php b/twe_close/_admin4_submit.php index 344f7def..b9cd07b5 100644 --- a/twe_close/_admin4_submit.php +++ b/twe_close/_admin4_submit.php @@ -102,6 +102,6 @@ switch($btn) { break; } -echo ""; -?> +//echo ""; +echo '_admin4.php'; //TODO:replace diff --git a/twe_close/_admin5_submit.php b/twe_close/_admin5_submit.php index 3a6bcb98..129ad500 100644 --- a/twe_close/_admin5_submit.php +++ b/twe_close/_admin5_submit.php @@ -25,6 +25,7 @@ switch($btn) { break; } -echo ""; -?> +//echo ""; +echo '_admin5.php';//TODO:replace + diff --git a/twe_close/_simul.php b/twe_close/_simul.php index b993bd97..5f3b4120 100644 --- a/twe_close/_simul.php +++ b/twe_close/_simul.php @@ -1559,4 +1559,4 @@ function printSimul($game, $i) { "; } -?> + diff --git a/twe_close/a_traffic.php b/twe_close/a_traffic.php index 3731917b..ac80e299 100644 --- a/twe_close/a_traffic.php +++ b/twe_close/a_traffic.php @@ -254,4 +254,4 @@ function getHexCode($hex) { case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F"; } } -?> + diff --git a/twe_close/a_vote.php b/twe_close/a_vote.php index b6acb56c..9af23490 100644 --- a/twe_close/a_vote.php +++ b/twe_close/a_vote.php @@ -335,4 +335,4 @@ function getNewColor($type) { return $color; } -?> + diff --git a/twe_close/analytics.php b/twe_close/analytics.php index bf3f0d19..f0e83ec9 100644 --- a/twe_close/analytics.php +++ b/twe_close/analytics.php @@ -1,4 +1,4 @@ - + +b_betting.php diff --git a/twe_close/c_chiefboard.php b/twe_close/c_chiefboard.php index 2f0fa578..00e01c6b 100644 --- a/twe_close/c_chiefboard.php +++ b/twe_close/c_chiefboard.php @@ -42,8 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } } -echo ""; - +//echo ""; +echo 'b_chiefboard.php';//TODO:replace ?> diff --git a/twe_close/c_dipcenter.php b/twe_close/c_dipcenter.php index 65334296..4cf79a5c 100644 --- a/twe_close/c_dipcenter.php +++ b/twe_close/c_dipcenter.php @@ -56,7 +56,7 @@ if($btn == "국가방침") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -echo ""; +//echo ""; +echo 'b_dipcenter.php';//TODO:replace -?> diff --git a/twe_close/c_double.php b/twe_close/c_double.php index 8c99759b..8a000e70 100644 --- a/twe_close/c_double.php +++ b/twe_close/c_double.php @@ -124,5 +124,4 @@ if($command == 46) { echo ""; } -?> diff --git a/twe_close/c_msgsubmit.php b/twe_close/c_msgsubmit.php index 4a0eba39..2cfcd684 100644 --- a/twe_close/c_msgsubmit.php +++ b/twe_close/c_msgsubmit.php @@ -113,7 +113,6 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { fclose($fp); } -echo ""; - -?> +//echo ""; +echo 'msglist.php';//TODO:replace diff --git a/twe_close/c_myBossInfo.php b/twe_close/c_myBossInfo.php index f12bee51..7b96765c 100644 --- a/twe_close/c_myBossInfo.php +++ b/twe_close/c_myBossInfo.php @@ -250,7 +250,7 @@ if($btn == "추방") { } } -echo ""; +//echo ""; +echo 'b_myBossInfo.php'//TODO:replace -?> diff --git a/twe_close/c_nationboard.php b/twe_close/c_nationboard.php index 6d3544d3..78e31361 100644 --- a/twe_close/c_nationboard.php +++ b/twe_close/c_nationboard.php @@ -42,7 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } } -echo ""; +//echo ""; +echo 'b_nationboard.php';//TODO:replace ?> diff --git a/twe_close/c_nationrule.php b/twe_close/c_nationrule.php index 9744f007..08563c1a 100644 --- a/twe_close/c_nationrule.php +++ b/twe_close/c_nationrule.php @@ -16,7 +16,6 @@ $msg = addslashes(SQ2DQ($msg)); $query = "update nation set rule='$msg' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -echo ""; - -?> +//echo ""; +echo 'b_nationrule.php';//TODO:replace diff --git a/twe_close/c_tournament.php b/twe_close/c_tournament.php index 157dc74a..666531a9 100644 --- a/twe_close/c_tournament.php +++ b/twe_close/c_tournament.php @@ -202,4 +202,5 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { } ?> - + +b_tournament.php diff --git a/twe_close/c_troop.php b/twe_close/c_troop.php index 5dbdfb79..0da27a5f 100644 --- a/twe_close/c_troop.php +++ b/twe_close/c_troop.php @@ -54,5 +54,3 @@ if($btn == "부 대 창 설" && $name != "" && $me[troop] == 0) { echo ""; MYDB_close($connect); -?> - diff --git a/twe_close/c_vacation.php b/twe_close/c_vacation.php index b4062169..8101f999 100644 --- a/twe_close/c_vacation.php +++ b/twe_close/c_vacation.php @@ -14,7 +14,6 @@ $admin[killturn] *= 3; $query = "update general set killturn='$admin[killturn]' where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -echo ""; - -?> +//echo ""; +echo 'b_myPage.php'; //TODO:replace diff --git a/twe_close/c_vote.php b/twe_close/c_vote.php index c9e0d242..67798485 100644 --- a/twe_close/c_vote.php +++ b/twe_close/c_vote.php @@ -73,4 +73,5 @@ if($btn == "수정" && $me[userlevel] >= 5) { } ?> - + +a_vote.php diff --git a/twe_close/d_ally.php b/twe_close/d_ally.php index 3e6b36f4..21c29d87 100644 --- a/twe_close/d_ally.php +++ b/twe_close/d_ally.php @@ -116,5 +116,3 @@ pushGenLog($you, $youlog); echo ""; -?> - diff --git a/twe_close/d_cancel.php b/twe_close/d_cancel.php index 94281351..7dd03327 100644 --- a/twe_close/d_cancel.php +++ b/twe_close/d_cancel.php @@ -95,5 +95,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/twe_close/d_cease.php b/twe_close/d_cease.php index 76c125f7..88dfd30c 100644 --- a/twe_close/d_cease.php +++ b/twe_close/d_cease.php @@ -100,5 +100,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/twe_close/d_merge.php b/twe_close/d_merge.php index d57c213e..9a202e95 100644 --- a/twe_close/d_merge.php +++ b/twe_close/d_merge.php @@ -134,5 +134,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/twe_close/d_scout.php b/twe_close/d_scout.php index 9900e98f..934a0503 100644 --- a/twe_close/d_scout.php +++ b/twe_close/d_scout.php @@ -160,5 +160,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/twe_close/d_setting/_common.php b/twe_close/d_setting/_common.php index 90e4756f..57949e8d 100644 --- a/twe_close/d_setting/_common.php +++ b/twe_close/d_setting/_common.php @@ -7,4 +7,3 @@ require_once(ROOT.W.F_CONFIG.W.APP.PHP); require_once(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); -?> diff --git a/twe_close/d_surrender.php b/twe_close/d_surrender.php index 729fe7fa..799f448a 100644 --- a/twe_close/d_surrender.php +++ b/twe_close/d_surrender.php @@ -124,5 +124,3 @@ pushHistory($connect, $history); echo ""; -?> - diff --git a/twe_close/data/connected.php b/twe_close/data/connected.php index caaabefa..de11d5cd 100644 --- a/twe_close/data/connected.php +++ b/twe_close/data/connected.php @@ -1 +1 @@ - + - diff --git a/twe_close/event_2.php b/twe_close/event_2.php index 94bcc518..b104b92b 100644 --- a/twe_close/event_2.php +++ b/twe_close/event_2.php @@ -253,5 +253,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/twe_close/event_3.php b/twe_close/event_3.php index 48fd3d51..a613f347 100644 --- a/twe_close/event_3.php +++ b/twe_close/event_3.php @@ -114,5 +114,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/twe_close/event_4.php b/twe_close/event_4.php index 9d3b1c10..0b4ec99d 100644 --- a/twe_close/event_4.php +++ b/twe_close/event_4.php @@ -143,5 +143,3 @@ function RegGeneral4($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> - diff --git a/twe_close/func.php b/twe_close/func.php index 31577742..7ef2380e 100644 --- a/twe_close/func.php +++ b/twe_close/func.php @@ -7416,4 +7416,3 @@ function Submit($url, $msg="", $msg2="") { "; } -?> diff --git a/twe_close/func_auction.php b/twe_close/func_auction.php index 9ffd729c..065d6919 100644 --- a/twe_close/func_auction.php +++ b/twe_close/func_auction.php @@ -345,4 +345,3 @@ function processAuction($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/twe_close/func_history.php b/twe_close/func_history.php index bd18360c..210eca7c 100644 --- a/twe_close/func_history.php +++ b/twe_close/func_history.php @@ -128,4 +128,3 @@ function LogHistory($connect, $isFirst=0) { if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Finish'); return true; } -?> diff --git a/twe_close/func_http.php b/twe_close/func_http.php index 09dd69d3..c809b579 100644 --- a/twe_close/func_http.php +++ b/twe_close/func_http.php @@ -285,4 +285,3 @@ class HTTP{ } } } -?> \ No newline at end of file diff --git a/twe_close/func_npc.php b/twe_close/func_npc.php index 9c8f7d1d..c1444023 100644 --- a/twe_close/func_npc.php +++ b/twe_close/func_npc.php @@ -1861,4 +1861,3 @@ function RiceBillRate($connect, $nation, $rate, $rice_rate, $type, $rice) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/twe_close/func_process.php b/twe_close/func_process.php index b75f7a2b..9e9d6a43 100644 --- a/twe_close/func_process.php +++ b/twe_close/func_process.php @@ -6145,4 +6145,3 @@ function process_99($connect, &$general) { pushGenLog($general, $log); } -?> diff --git a/twe_close/func_string.php b/twe_close/func_string.php index 6c8c0c27..c84011af 100644 --- a/twe_close/func_string.php +++ b/twe_close/func_string.php @@ -301,4 +301,3 @@ class _String { } } -?> diff --git a/twe_close/install.php b/twe_close/install.php index 8deff41b..43790b5c 100644 --- a/twe_close/install.php +++ b/twe_close/install.php @@ -74,7 +74,7 @@ if(!$check) {
- +
diff --git a/twe_close/install2_ok.php b/twe_close/install2_ok.php index 9c83711c..1441a8a7 100644 --- a/twe_close/install2_ok.php +++ b/twe_close/install2_ok.php @@ -345,4 +345,3 @@ function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def ) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/twe_close/install3_ok.php b/twe_close/install3_ok.php index 3d4f74b0..5ff3b1d3 100644 --- a/twe_close/install3_ok.php +++ b/twe_close/install3_ok.php @@ -6,5 +6,5 @@ $connect=dbConn(); LogHistory($connect, 1); -echo ""; -?> +//echo ""; +echo 'index.php'; //TODO:replace diff --git a/twe_close/install_ok.php b/twe_close/install_ok.php index 3d0326c3..a4ae6fa8 100644 --- a/twe_close/install_ok.php +++ b/twe_close/install_ok.php @@ -5,6 +5,8 @@ include "func.php"; if(file_exists("d_setting/set.php")) error("이미 set.php가 생성되어 있습니다.

재설치하려면 해당 파일을 지우세요"); + + // 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사 if(isBlank($hostname)) Error("HostName을 입력하세요",""); if(isBlank($user_id)) Error("User ID 를 입력하세요",""); @@ -83,7 +85,7 @@ if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) // 파일로 DB 정보 저장 $file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); @fclose($file); @mkdir("data",0707); @chmod("data",0707); @@ -94,4 +96,3 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); echo ""; -?> diff --git a/twe_close/join_post.php b/twe_close/join_post.php index 52384fb3..f6ab7941 100644 --- a/twe_close/join_post.php +++ b/twe_close/join_post.php @@ -272,4 +272,3 @@ if($id_num) { echo(""); } -?> diff --git a/twe_close/join_post.php.orig b/twe_close/join_post.php.orig index ed10c24b..c796b36b 100644 --- a/twe_close/join_post.php.orig +++ b/twe_close/join_post.php.orig @@ -272,4 +272,3 @@ if($id_num) { echo(""); } -?> diff --git a/twe_close/join_token.php b/twe_close/join_token.php index 87042ec3..dad9d390 100644 --- a/twe_close/join_token.php +++ b/twe_close/join_token.php @@ -55,4 +55,3 @@ $response['intel'] = $abil['intel']; usleep(100*1000); echo json_encode($response); -?> \ No newline at end of file diff --git a/twe_close/lib.php b/twe_close/lib.php index 75399e82..b0807cf0 100644 --- a/twe_close/lib.php +++ b/twe_close/lib.php @@ -7,7 +7,7 @@ // @header ("P3P : CP=\"ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC\""); //디버그용 매크로 -define(__OLINE__,__LINE__); +define('__OLINE__',__LINE__); define(__LINE__,__FILE__." ".__FUNCTION__." ".__LINE__." : "); ini_set("session.cache_expire", 10080); // minutes ini_set("session.gc_maxlifetime", 604800); // seconds @@ -167,4 +167,3 @@ function PrintElapsedTime() { $_endTime = round(getMicroTime() - $_startTime, 3); echo "
경과시간 : {$_endTime}초
"; } -?> diff --git a/twe_close/license.txt b/twe_close/license.txt index ceed7e73..642b3e1a 100644 --- a/twe_close/license.txt +++ b/twe_close/license.txt @@ -1,36 +1 @@ -ZeroBoard에 대한 라이센스 명시입니다. - -아래 라이센스에 동의하시는 분만 제로보드를 사용할수 있습니다. - -프로그램명 : Zeroboard -배포버젼 : 4.1 pl 8 (2006. 3. 15) -개발자 : zero -Homepage : http://zeroboard.com - -1. 제로보드의 배포권은 ZEROBOARD.COM에서 허용한 곳에만 있습니다. - (허락 맡지 않은 재배포는 허용하지 않습니다.) - -2. 제로보드는 저작권을 아래 3번항목에 의해 표기하는 한도내에서 - 개인홈페이지 및 학교나 교회등의 비영리단체, 기업이나 기타 영리단체에서 사용할수 있습니다. - (반국가 단체나 불법 싸이트에서의 사용은 금지합니다) - -3. 제로보드 사용시 저작권 명시부분을 훼손하면 안됩니다. - 프로그램 소스, html소스상의 라이센스 및 웹상 출력물 하단에 있는 카피라이트와 링크를 수정하지 마십시요. - (저작권 표시는 게시판 배포시 작성된 형식만을 허용합니다. 임의 수정은 금지합니다) - -4. 단, 정식 등록버젼은 저작권 표시를 삭제할수 있습니다. - 정식 등록버젼에 대한 문의는 http://zeroboard.com 에서 문의 방법을 찾아주시기 바랍니다. - -5. 링크서비스등의 기본 용도에 맞지 않는 사용은 금지합니다. - -6. 제로보드의 사용으로 인한 데이타 손실 및 기타 손해등 어떠한 사고나 문제에 대해서 ZEROBOARD.COM은 절대 책임을 지지 않습니다. - -7. 제로보드에 대해 ZEROBOARD.COM은 유지/ 보수의 의무가 없습니다. - -8. 제로보드 소스는 개인적으로 사용시 수정하여 사용할수 있지만 수정된 프로그램의 재배포는 금지합니다. - (저작권 관련 부분은 수정금지입니다) - -9. 제로보드에 쓰인 스킨의 저작권은 스킨 제작자에게 있으며 제작자의 동의하에 수정배포가 가능합니다. - -10. 기타 의문사항은 http://zeroboard.com 을 이용해 주시기 바랍니다. - (질문등에 대한 내용은 메일로 받지 않습니다) +Ok Go! \ No newline at end of file diff --git a/twe_close/login_process.php b/twe_close/login_process.php index 1129f3c1..a3d56c76 100644 --- a/twe_close/login_process.php +++ b/twe_close/login_process.php @@ -78,4 +78,3 @@ function DeleteSession() { } MYDB_close($connect); -?> diff --git a/twe_close/logout_process.php b/twe_close/logout_process.php index 17b57479..d892aa75 100644 --- a/twe_close/logout_process.php +++ b/twe_close/logout_process.php @@ -16,10 +16,11 @@ $id = $me[user_id]; $pw = $me[password]; $conmsg = $me[conmsg]; -//Ǻ +//���Ǻ��� ���� session_destroy(); -echo ""; +//echo ""; +echo 'start.php';//TODO:replace /* @@ -33,4 +34,3 @@ a */ -?> diff --git a/twe_close/main.php b/twe_close/main.php index 352962ed..cf243bd1 100644 --- a/twe_close/main.php +++ b/twe_close/main.php @@ -334,5 +334,3 @@ banner(); if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); } if($me[newmsg] == 1) { MessageBox("개인 서신이 도착했습니다!"); } if($me[newvote] == 1) { $develcost = $admin[develcost]*5; MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)"); } -?> - diff --git a/twe_close/map.php b/twe_close/map.php index af42f272..8c33acb7 100644 --- a/twe_close/map.php +++ b/twe_close/map.php @@ -432,4 +432,3 @@ function getCityLevel($region, $level) { return $str; } -?> diff --git a/twe_close/map_history.php b/twe_close/map_history.php index 8f612467..8da98be7 100644 --- a/twe_close/map_history.php +++ b/twe_close/map_history.php @@ -31,4 +31,3 @@ $map = str_replace('<_quot_>', "'", $map); $map = str_replace('<_dquot_>', '"', $map); echo $map; -?> diff --git a/twe_close/npc_login_process.php b/twe_close/npc_login_process.php index 3dd7c0e5..969c95ae 100644 --- a/twe_close/npc_login_process.php +++ b/twe_close/npc_login_process.php @@ -73,4 +73,3 @@ function DeleteSession() { } MYDB_close($connect); -?> diff --git a/twe_close/phpinfo.php b/twe_close/phpinfo.php deleted file mode 100644 index cf608608..00000000 --- a/twe_close/phpinfo.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/twe_close/preprocessing.php b/twe_close/preprocessing.php index bcd7780b..b6e7ad95 100644 --- a/twe_close/preprocessing.php +++ b/twe_close/preprocessing.php @@ -120,5 +120,3 @@ switch($commandtype) { default: command_Other($connect, $turn, $commandtype); break; } -?> - diff --git a/twe_close/proc.php b/twe_close/proc.php index d1e4003d..7d9408b6 100644 --- a/twe_close/proc.php +++ b/twe_close/proc.php @@ -5,4 +5,3 @@ include "func.php"; $connect = dbConn(); increaseRefresh($connect, "자동", 2); checkTurn($connect); -?> diff --git a/twe_close/process_war.php b/twe_close/process_war.php index 6fba7ba9..f6825014 100644 --- a/twe_close/process_war.php +++ b/twe_close/process_war.php @@ -1845,4 +1845,3 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { pushHistory($connect, $history); } -?> diff --git a/twe_close/processing.php b/twe_close/processing.php index e5949299..49788cdd 100644 --- a/twe_close/processing.php +++ b/twe_close/processing.php @@ -3125,5 +3125,3 @@ function command_81($connect, $turn, $command) { "; ender(1); } -?> - diff --git a/twe_close/queue.php b/twe_close/queue.php index 05800144..7fa94915 100644 --- a/twe_close/queue.php +++ b/twe_close/queue.php @@ -38,4 +38,3 @@ class Queue { return $value; } } -?> diff --git a/twe_close/reset.php b/twe_close/reset.php index 07c170b3..98d01c04 100644 --- a/twe_close/reset.php +++ b/twe_close/reset.php @@ -67,7 +67,7 @@ if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) // 파일로 DB 정보 저장 $file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); @fclose($file); @mkdir("data",0707); @chmod("data",0707); @@ -78,4 +78,3 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); echo ""; -?> diff --git a/twe_close/scenario_1.php b/twe_close/scenario_1.php index d62efaf9..e39633f0 100644 --- a/twe_close/scenario_1.php +++ b/twe_close/scenario_1.php @@ -792,4 +792,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_10.php b/twe_close/scenario_10.php index b6ba094e..47588492 100644 --- a/twe_close/scenario_10.php +++ b/twe_close/scenario_10.php @@ -898,4 +898,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_11.php b/twe_close/scenario_11.php index 47ef5b88..e064095a 100644 --- a/twe_close/scenario_11.php +++ b/twe_close/scenario_11.php @@ -897,4 +897,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_12.php b/twe_close/scenario_12.php index 89d6ff15..73d612cc 100644 --- a/twe_close/scenario_12.php +++ b/twe_close/scenario_12.php @@ -1181,4 +1181,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_2.php b/twe_close/scenario_2.php index 32fc1329..8340b15b 100644 --- a/twe_close/scenario_2.php +++ b/twe_close/scenario_2.php @@ -1711,4 +1711,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_20.php b/twe_close/scenario_20.php index d23ac02d..a4ae577f 100644 --- a/twe_close/scenario_20.php +++ b/twe_close/scenario_20.php @@ -746,4 +746,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_21.php b/twe_close/scenario_21.php index 117867cb..6dd317b0 100644 --- a/twe_close/scenario_21.php +++ b/twe_close/scenario_21.php @@ -774,4 +774,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_22.php b/twe_close/scenario_22.php index 0243103b..5176501c 100644 --- a/twe_close/scenario_22.php +++ b/twe_close/scenario_22.php @@ -194,4 +194,3 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p } } -?> diff --git a/twe_close/scenario_23.php b/twe_close/scenario_23.php index b4804c15..dee04c1c 100644 --- a/twe_close/scenario_23.php +++ b/twe_close/scenario_23.php @@ -750,4 +750,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_24.php b/twe_close/scenario_24.php index 5053015c..8fb46725 100644 --- a/twe_close/scenario_24.php +++ b/twe_close/scenario_24.php @@ -325,4 +325,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/twe_close/scenario_25.php b/twe_close/scenario_25.php index 88ac73e7..906f1525 100644 --- a/twe_close/scenario_25.php +++ b/twe_close/scenario_25.php @@ -316,4 +316,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_26.php b/twe_close/scenario_26.php index 271f7876..4f32a294 100644 --- a/twe_close/scenario_26.php +++ b/twe_close/scenario_26.php @@ -313,4 +313,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_27.php b/twe_close/scenario_27.php index 4e66d967..46082d2b 100644 --- a/twe_close/scenario_27.php +++ b/twe_close/scenario_27.php @@ -591,4 +591,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_28.php b/twe_close/scenario_28.php index 9ceca2d3..f233c2bd 100644 --- a/twe_close/scenario_28.php +++ b/twe_close/scenario_28.php @@ -420,4 +420,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_3.php b/twe_close/scenario_3.php index a8c77239..34380b1f 100644 --- a/twe_close/scenario_3.php +++ b/twe_close/scenario_3.php @@ -1752,4 +1752,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_4.php b/twe_close/scenario_4.php index 8658a05c..ffc45ada 100644 --- a/twe_close/scenario_4.php +++ b/twe_close/scenario_4.php @@ -1289,4 +1289,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_5.php b/twe_close/scenario_5.php index 450bfc4c..c621480b 100644 --- a/twe_close/scenario_5.php +++ b/twe_close/scenario_5.php @@ -995,4 +995,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_6.php b/twe_close/scenario_6.php index a4d83d3f..f697a60f 100644 --- a/twe_close/scenario_6.php +++ b/twe_close/scenario_6.php @@ -1041,4 +1041,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_7.php b/twe_close/scenario_7.php index c56de9aa..8cc61f2d 100644 --- a/twe_close/scenario_7.php +++ b/twe_close/scenario_7.php @@ -1093,4 +1093,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_8.php b/twe_close/scenario_8.php index b02d6e0d..6529ca47 100644 --- a/twe_close/scenario_8.php +++ b/twe_close/scenario_8.php @@ -945,4 +945,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/scenario_9.php b/twe_close/scenario_9.php index 5e49bddc..ba703829 100644 --- a/twe_close/scenario_9.php +++ b/twe_close/scenario_9.php @@ -869,4 +869,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/twe_close/schema.php b/twe_close/schema.php index 9479dc2a..ceb9050d 100644 --- a/twe_close/schema.php +++ b/twe_close/schema.php @@ -617,5 +617,3 @@ $history_schema = " "; -?> - diff --git a/twe_close/schema.sql.orig b/twe_close/schema.sql.orig index 1654fc77..fa3318af 100644 --- a/twe_close/schema.sql.orig +++ b/twe_close/schema.sql.orig @@ -617,5 +617,3 @@ $history_schema = " "; -?> - diff --git a/twe_close/select_npc_post.php b/twe_close/select_npc_post.php index 9de8fccc..ebe9997c 100644 --- a/twe_close/select_npc_post.php +++ b/twe_close/select_npc_post.php @@ -124,4 +124,3 @@ if($admin[npcmode] != 1) { echo(""); } -?> diff --git a/twe_close/turn.php b/twe_close/turn.php index 8b475519..f7373898 100644 --- a/twe_close/turn.php +++ b/twe_close/turn.php @@ -85,6 +85,3 @@ case 2: } echo ""; - -?> - diff --git a/twe_close/turn_pop_core.php b/twe_close/turn_pop_core.php index d40de774..4198b506 100644 --- a/twe_close/turn_pop_core.php +++ b/twe_close/turn_pop_core.php @@ -12,6 +12,3 @@ $me = MYDB_fetch_array($result); updateCommand($connect, $me[no], 2); echo ""; - -?> - diff --git a/twe_close/turn_push_core.php b/twe_close/turn_push_core.php index b680cd17..740ae1a7 100644 --- a/twe_close/turn_push_core.php +++ b/twe_close/turn_push_core.php @@ -13,5 +13,3 @@ backupdateCommand($connect, $me[no], 2); echo ""; -?> - From ceb8132f3418b214729ee9bce4842040a23e1318 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 04:01:07 +0900 Subject: [PATCH 011/622] =?UTF-8?q?delInDir=20=EC=88=98=EC=A0=95.=20instal?= =?UTF-8?q?l=5Fok=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 +++- che_close/func.php | 4 ++-- twe_close/data/connected.php | 1 - .../session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 2 +- .../session/sess_bl2knvun8a0dsp2e0hc12u2i06 | 1 - .../session/sess_e67fe7rdm5eaehoqrn0j6rodl1 | 1 - twe_close/func.php | 19 +++++++++++-------- twe_close/install_ok.php | 6 +++++- twe_close/logs/.htaccess | 1 - 9 files changed, 22 insertions(+), 17 deletions(-) delete mode 100644 twe_close/data/connected.php delete mode 100644 twe_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 delete mode 100644 twe_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 delete mode 100644 twe_close/logs/.htaccess diff --git a/.vscode/settings.json b/.vscode/settings.json index 7dc85d41..e2cb2826 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,12 @@ "**/CVS": true, "**/.DS_Store": true, "**/logs/*.txt": true, + "**/session/sess*":true, }, "search.exclude": { - "**/che_close": true, + "**/che_close/*": true, "e_lib/*":true, + }, } \ No newline at end of file diff --git a/che_close/func.php b/che_close/func.php index 7ef2380e..7350c1c3 100644 --- a/che_close/func.php +++ b/che_close/func.php @@ -82,7 +82,7 @@ function delInDir($dir) { while(false !== ($FolderOrFile = readdir($handle))) { if($FolderOrFile != "." && $FolderOrFile != "..") { if(is_dir("$dir/$FolderOrFile")) { - deldir("$dir/$FolderOrFile"); + delInDir("$dir/$FolderOrFile"); } // recursive else { unlink("$dir/$FolderOrFile"); @@ -93,7 +93,7 @@ function delInDir($dir) { // if(rmdir($dir)) { // $success = true; // } - return $success; + return true; } function GetImageURL($imgsvr) { diff --git a/twe_close/data/connected.php b/twe_close/data/connected.php deleted file mode 100644 index de11d5cd..00000000 --- a/twe_close/data/connected.php +++ /dev/null @@ -1 +0,0 @@ -
재설치하려면 해당 파일을 지우세요"); +$hostname = util::array_get($_POST['hostname'], ''); +$user_id = util::array_get($_POST['user_id'], ''); +$password = util::array_get($_POST['password'], ''); +$dbname = util::array_get($_POST['dbname'], ''); // 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사 if(isBlank($hostname)) Error("HostName을 입력하세요",""); diff --git a/twe_close/logs/.htaccess b/twe_close/logs/.htaccess deleted file mode 100644 index 698196ae..00000000 --- a/twe_close/logs/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file From c691c0eecb285d236639381be2b6c64ea4515a5f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 04:15:37 +0900 Subject: [PATCH 012/622] =?UTF-8?q?install2=20=EC=88=98=EC=A0=95.=20func?= =?UTF-8?q?=5Fstring=20=EA=B8=B0=EB=B3=B8=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +-- .vscode/settings.json | 7 ++++--- twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 2 +- twe_close/func_string.php | 2 +- twe_close/install2_ok.php | 9 +++++++++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 66d12619..1421360c 100644 --- a/.gitignore +++ b/.gitignore @@ -116,6 +116,5 @@ d_log/*.txt d_setting/set.php set.php config.php -d_session/sess_* -data/session/sess_* +sess_* */logs/*.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index e2cb2826..d8e64b4b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,12 +6,13 @@ "**/CVS": true, "**/.DS_Store": true, "**/logs/*.txt": true, - "**/session/sess*":true, + "**/session/sess**":true, + "**/che_close": true, }, "search.exclude": { - "**/che_close/*": true, - "e_lib/*":true, + "**/che_close": true, + "e_lib":true, }, } \ No newline at end of file diff --git a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq index 21b7d81a..d8c64fa5 100644 --- a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq +++ b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq @@ -1 +1 @@ -p_ip|s:12:"192.168.0.26";p_time|i:1515870030; \ No newline at end of file +p_ip|s:12:"192.168.0.26";p_time|i:1515870626; \ No newline at end of file diff --git a/twe_close/func_string.php b/twe_close/func_string.php index c84011af..484d057f 100644 --- a/twe_close/func_string.php +++ b/twe_close/func_string.php @@ -240,7 +240,7 @@ class _String { $size = strlen($str); $count = ($maxsize - $size); - + $string = ''; for($i=0; $i < $count; $i++) { $string = $string.$ch; } diff --git a/twe_close/install2_ok.php b/twe_close/install2_ok.php index 1441a8a7..89e2944e 100644 --- a/twe_close/install2_ok.php +++ b/twe_close/install2_ok.php @@ -1,6 +1,15 @@ Date: Sun, 14 Jan 2018 04:16:36 +0900 Subject: [PATCH 013/622] =?UTF-8?q?session=ED=8C=8C=EC=9D=BC=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 | 1 - che_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 | 1 - d_session/sess_0eup4nfjbqt5f6df80rfqkud30 | 1 - d_session/sess_1d9b97ef4dc0ddc65a44502439565ffc | 1 - d_session/sess_4de7efdbbf400fc4008910aa2267de04 | 1 - twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq | 1 - 6 files changed, 6 deletions(-) delete mode 100644 che_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 delete mode 100644 che_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 delete mode 100644 d_session/sess_0eup4nfjbqt5f6df80rfqkud30 delete mode 100644 d_session/sess_1d9b97ef4dc0ddc65a44502439565ffc delete mode 100644 d_session/sess_4de7efdbbf400fc4008910aa2267de04 delete mode 100644 twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq diff --git a/che_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 b/che_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 deleted file mode 100644 index 788e8886..00000000 --- a/che_close/data/session/sess_bl2knvun8a0dsp2e0hc12u2i06 +++ /dev/null @@ -1 +0,0 @@ -p_ip|s:14:"125.209.213.87";p_time|i:1457326503; \ No newline at end of file diff --git a/che_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 b/che_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 deleted file mode 100644 index e2a88960..00000000 --- a/che_close/data/session/sess_e67fe7rdm5eaehoqrn0j6rodl1 +++ /dev/null @@ -1 +0,0 @@ -p_ip|s:14:"125.209.213.86";p_time|i:1457326490; \ No newline at end of file diff --git a/d_session/sess_0eup4nfjbqt5f6df80rfqkud30 b/d_session/sess_0eup4nfjbqt5f6df80rfqkud30 deleted file mode 100644 index e772a66d..00000000 --- a/d_session/sess_0eup4nfjbqt5f6df80rfqkud30 +++ /dev/null @@ -1 +0,0 @@ -ip|s:14:"175.192.80.232";time|i:1457113394; \ No newline at end of file diff --git a/d_session/sess_1d9b97ef4dc0ddc65a44502439565ffc b/d_session/sess_1d9b97ef4dc0ddc65a44502439565ffc deleted file mode 100644 index bea13fff..00000000 --- a/d_session/sess_1d9b97ef4dc0ddc65a44502439565ffc +++ /dev/null @@ -1 +0,0 @@ -ip|s:9:"127.0.0.1";time|i:1320849060;noMember|s:1:"3"; \ No newline at end of file diff --git a/d_session/sess_4de7efdbbf400fc4008910aa2267de04 b/d_session/sess_4de7efdbbf400fc4008910aa2267de04 deleted file mode 100644 index 694e4196..00000000 --- a/d_session/sess_4de7efdbbf400fc4008910aa2267de04 +++ /dev/null @@ -1 +0,0 @@ -ip|s:9:"127.0.0.1";time|i:1321370936; \ No newline at end of file diff --git a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq b/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq deleted file mode 100644 index d8c64fa5..00000000 --- a/twe_close/data/session/sess_0g2lnrmd2poc1blmuai0r5vfoq +++ /dev/null @@ -1 +0,0 @@ -p_ip|s:12:"192.168.0.26";p_time|i:1515870626; \ No newline at end of file From c6f863d44cffade4637bc153994d2d5c56eb4a0c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 04:40:05 +0900 Subject: [PATCH 014/622] =?UTF-8?q?schema=EC=97=90=EC=84=9C=20name2?= =?UTF-8?q?=EB=8A=94=20null=EC=9D=B4=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe_close/schema.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twe_close/schema.php b/twe_close/schema.php index ceb9050d..96f018c7 100644 --- a/twe_close/schema.php +++ b/twe_close/schema.php @@ -23,7 +23,7 @@ $general_schema = " logcnt int(6) default 1, refcnt int(6) default 1, picture char(32) not null, imgsvr int(1) default 0, name char(32) not null, - name2 char(32) not null, + name2 char(32) NULL DEFAULT NULL, nation int(6) default 0, nations char(64) default ',0,', city int(6) default 0, From c5c9137b35437bc99292d59469968d9228f41956 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 04:45:37 +0900 Subject: [PATCH 015/622] =?UTF-8?q?install2=5Fok=20=EC=A0=80=EC=9E=A5.=20f?= =?UTF-8?q?unc=5Fstring=20=EC=A0=80=EC=9E=A5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe_close/func_string.php | 4 ++-- twe_close/install2_ok.php | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/twe_close/func_string.php b/twe_close/func_string.php index 484d057f..4bc7aa2a 100644 --- a/twe_close/func_string.php +++ b/twe_close/func_string.php @@ -220,7 +220,7 @@ class _String { } //중간정렬 - function Fill($str, $maxsize, $ch) { + public static function staticFill($str, $maxsize, $ch) { $size = strlen($str); $count = ($maxsize - $size) / 2; @@ -236,7 +236,7 @@ class _String { } //우측정렬 - function Fill2($str, $maxsize, $ch='0') { + public static function Fill2($str, $maxsize, $ch='0') { $size = strlen($str); $count = ($maxsize - $size); diff --git a/twe_close/install2_ok.php b/twe_close/install2_ok.php index 89e2944e..4b750c63 100644 --- a/twe_close/install2_ok.php +++ b/twe_close/install2_ok.php @@ -302,6 +302,35 @@ insertCity($connect, "파양", 1, 103700, 2000, 2200, 2000, 3800, 3800, 7, insertCity($connect, "탐라", 1, 113000, 2200, 2100, 2000, 4300, 4100, 8, "31|33|34|62"); // 93 : 탐라 insertCity($connect, "유구", 1, 92100, 1700, 1800, 2000, 3700, 3700, 8, "59|69"); // 94 : 유구 +//TODO:replace +switch($scenario) { + case 0: echo "index.php"; break; + case 1: echo "scenario_1.php"; break; + case 2: echo "scenario_2.php"; break; + case 3: echo "scenario_3.php"; break; + case 4: echo "scenario_4.php"; break; + case 5: echo "scenario_5.php"; break; + case 6: echo "scenario_6.php"; break; + case 7: echo "scenario_7.php"; break; + case 8: echo "scenario_8.php"; break; + case 9: echo "scenario_9.php"; break; + case 10: echo "scenario_10.php"; break; + case 11: echo "scenario_11.php"; break; + + case 12: echo "scenario_12.php"; break; + + case 20: echo "scenario_20.php"; break; + case 21: echo "scenario_21.php"; break; + case 22: echo "scenario_22.php"; break; + case 23: echo "scenario_23.php"; break; + case 24: echo "scenario_24.php"; break; + case 25: echo "scenario_25.php"; break; + case 26: echo "scenario_26.php"; break; + case 27: echo "scenario_27.php"; break; + case 28: echo "scenario_28.php"; break; + default: echo "install3_ok.php"; break; +} +/* switch($scenario) { case 0: echo ""; break; case 1: echo ""; break; @@ -329,7 +358,7 @@ switch($scenario) { case 28: echo ""; break; default: echo ""; break; } - +*/ function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def2, $wall2, $region, $path) { switch($level) { case 1: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; From 35e92365f28d001755c660122e027200420e6fa7 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 05:01:11 +0900 Subject: [PATCH 016/622] =?UTF-8?q?twe=5Fclose=EB=A5=BC=20twe=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD(=EC=84=9C=EB=B9=84=EC=8A=A4=EB=AA=A8?= =?UTF-8?q?=EB=93=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD)=20=EC=95=9E=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=B6=94=EA=B0=80=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=9C=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- che_close/func.php | 2 +- che_close/func_tournament.php | 12 ++++++------ che_close/install_ok.php | 6 +++--- i_entrance/adminPost.php | 12 ++++++------ {twe_close => twe}/MYDB.php | 0 {twe_close => twe}/_119.php | 0 {twe_close => twe}/_119_b.php | 0 {twe_close => twe}/_admin1.php | 0 {twe_close => twe}/_admin1_submit.php | 0 {twe_close => twe}/_admin2.php | 0 {twe_close => twe}/_admin2_submit.php | 0 {twe_close => twe}/_admin3.php | 0 {twe_close => twe}/_admin3_submit.php | 0 {twe_close => twe}/_admin4.php | 0 {twe_close => twe}/_admin4_submit.php | 0 {twe_close => twe}/_admin5.php | 0 {twe_close => twe}/_admin5_submit.php | 0 {twe_close => twe}/_admin6.php | 0 {twe_close => twe}/_admin7.php | 0 {twe_close => twe}/_admin8.php | 0 {twe_close => twe}/_simul.php | 0 {twe_close => twe}/a_bestGeneral.php | 0 {twe_close => twe}/a_emperior.php | 0 {twe_close => twe}/a_emperior2.php | 0 {twe_close => twe}/a_genList.php | 0 {twe_close => twe}/a_hallOfFame.php | 0 {twe_close => twe}/a_history.php | 0 {twe_close => twe}/a_kingdomList.php | 0 {twe_close => twe}/a_npcList.php | 0 {twe_close => twe}/a_status.php | 0 {twe_close => twe}/a_traffic.php | 0 {twe_close => twe}/a_vote.php | 0 {twe_close => twe}/analytics.php | 0 {twe_close => twe}/b_auction.php | 0 {twe_close => twe}/b_battleCenter.php | 0 {twe_close => twe}/b_betting.php | 0 {twe_close => twe}/b_chiefboard.php | 0 {twe_close => twe}/b_chiefcenter.php | 0 {twe_close => twe}/b_currentCity.php | 0 {twe_close => twe}/b_dipcenter.php | 0 {twe_close => twe}/b_diplomacy.php | 0 {twe_close => twe}/b_genList.php | 0 {twe_close => twe}/b_myBossInfo.php | 0 {twe_close => twe}/b_myCityInfo.php | 0 {twe_close => twe}/b_myGenInfo.php | 0 {twe_close => twe}/b_myKingdomInfo.php | 0 {twe_close => twe}/b_myPage.php | 0 {twe_close => twe}/b_nationboard.php | 0 {twe_close => twe}/b_nationrule.php | 0 {twe_close => twe}/b_tournament.php | 0 {twe_close => twe}/b_troop.php | 0 {twe_close => twe}/c_auction.php | 0 {twe_close => twe}/c_betting.php | 0 {twe_close => twe}/c_chiefboard.php | 0 {twe_close => twe}/c_dipcenter.php | 0 {twe_close => twe}/c_double.php | 0 {twe_close => twe}/c_msgsubmit.php | 0 {twe_close => twe}/c_myBossInfo.php | 0 {twe_close => twe}/c_nationboard.php | 0 {twe_close => twe}/c_nationrule.php | 0 {twe_close => twe}/c_tournament.php | 0 {twe_close => twe}/c_troop.php | 0 {twe_close => twe}/c_vacation.php | 0 {twe_close => twe}/c_vote.php | 0 {twe_close => twe}/commandlist.php | 0 {twe_close => twe}/confirm.png | Bin {twe_close => twe}/d_ally.php | 0 {twe_close => twe}/d_cancel.php | 0 {twe_close => twe}/d_cease.php | 0 {twe_close => twe}/d_merge.php | 0 {twe_close => twe}/d_scout.php | 0 {twe_close => twe}/d_setting/.htaccess | 0 {twe_close => twe}/d_setting/_common.php | 0 {twe_close => twe}/d_surrender.php | 0 {twe_close => twe}/data/.htaccess | 0 {twe_close => twe}/error.php | 0 {twe_close => twe}/event_1.php | 0 {twe_close => twe}/event_2.php | 0 {twe_close => twe}/event_3.php | 0 {twe_close => twe}/event_4.php | 0 {twe_close => twe}/func.php | 0 {twe_close => twe}/func_auction.php | 0 {twe_close => twe}/func_history.php | 0 {twe_close => twe}/func_http.php | 0 {twe_close => twe}/func_npc.php | 0 {twe_close => twe}/func_process.php | 0 {twe_close => twe}/func_string.php | 0 {twe_close => twe}/func_tournament.php | 0 {twe_close => twe}/gen.xlsx | Bin {twe_close => twe}/genDatabase.txt | 0 {twe_close => twe}/index.php | 0 {twe_close => twe}/install.php | 0 {twe_close => twe}/install1.php | 0 {twe_close => twe}/install2.php | 0 {twe_close => twe}/install2_ok.php | 0 {twe_close => twe}/install3_ok.php | 0 {twe_close => twe}/install_ok.php | 0 {twe_close => twe}/join.php | 0 {twe_close => twe}/join_post.php | 0 {twe_close => twe}/join_post.php.orig | 0 {twe_close => twe}/join_token.php | 0 {twe_close => twe}/jquery-1.11.0.min.js | 0 {twe_close => twe}/lib.php | 0 {twe_close => twe}/license.txt | 0 {twe_close => twe}/lock.txt | 0 {twe_close => twe}/login_process.php | 0 {twe_close => twe}/logout_process.php | 0 {twe_close => twe}/main.php | 0 {twe_close => twe}/map.php | 0 {twe_close => twe}/map_history.php | 0 {twe_close => twe}/msglist.php | 0 {twe_close => twe}/mysql_opt.txt | 0 {twe_close => twe}/new_lib.php | 0 {twe_close => twe}/npc_login.php | 0 {twe_close => twe}/npc_login_process.php | 0 {twe_close => twe}/preprocessing.php | 0 {twe_close => twe}/proc.php | 0 {twe_close => twe}/proc.sh | 0 {twe_close => twe}/process_war.php | 0 {twe_close => twe}/processing.php | 0 {twe_close => twe}/queue.php | 0 {twe_close => twe}/reset.php | 0 {twe_close => twe}/scenario_1.php | 0 {twe_close => twe}/scenario_10.php | 0 {twe_close => twe}/scenario_11.php | 0 {twe_close => twe}/scenario_12.php | 0 {twe_close => twe}/scenario_2.php | 0 {twe_close => twe}/scenario_20.php | 0 {twe_close => twe}/scenario_21.php | 0 {twe_close => twe}/scenario_22.php | 0 {twe_close => twe}/scenario_23.php | 0 {twe_close => twe}/scenario_24.php | 0 {twe_close => twe}/scenario_25.php | 0 {twe_close => twe}/scenario_26.php | 0 {twe_close => twe}/scenario_27.php | 0 {twe_close => twe}/scenario_28.php | 0 {twe_close => twe}/scenario_3.php | 0 {twe_close => twe}/scenario_4.php | 0 {twe_close => twe}/scenario_5.php | 0 {twe_close => twe}/scenario_6.php | 0 {twe_close => twe}/scenario_7.php | 0 {twe_close => twe}/scenario_8.php | 0 {twe_close => twe}/scenario_9.php | 0 {twe_close => twe}/schema.php | 0 {twe_close => twe}/schema.sql.orig | 0 {twe_close => twe}/select_npc.php | 0 {twe_close => twe}/select_npc_post.php | 0 {twe_close => twe}/selection.php | 0 {twe_close => twe}/start.php | 0 {twe_close => twe}/stylesheet.php | 0 {twe_close => twe}/templates/.htaccess | 0 {twe_close => twe}/turn.php | 0 {twe_close => twe}/turn_pop_core.php | 0 {twe_close => twe}/turn_push_core.php | 0 {twe => twe_rest}/index.html | 0 155 files changed, 16 insertions(+), 16 deletions(-) rename {twe_close => twe}/MYDB.php (100%) rename {twe_close => twe}/_119.php (100%) rename {twe_close => twe}/_119_b.php (100%) rename {twe_close => twe}/_admin1.php (100%) rename {twe_close => twe}/_admin1_submit.php (100%) rename {twe_close => twe}/_admin2.php (100%) rename {twe_close => twe}/_admin2_submit.php (100%) rename {twe_close => twe}/_admin3.php (100%) rename {twe_close => twe}/_admin3_submit.php (100%) rename {twe_close => twe}/_admin4.php (100%) rename {twe_close => twe}/_admin4_submit.php (100%) rename {twe_close => twe}/_admin5.php (100%) rename {twe_close => twe}/_admin5_submit.php (100%) rename {twe_close => twe}/_admin6.php (100%) rename {twe_close => twe}/_admin7.php (100%) rename {twe_close => twe}/_admin8.php (100%) rename {twe_close => twe}/_simul.php (100%) rename {twe_close => twe}/a_bestGeneral.php (100%) rename {twe_close => twe}/a_emperior.php (100%) rename {twe_close => twe}/a_emperior2.php (100%) rename {twe_close => twe}/a_genList.php (100%) rename {twe_close => twe}/a_hallOfFame.php (100%) rename {twe_close => twe}/a_history.php (100%) rename {twe_close => twe}/a_kingdomList.php (100%) rename {twe_close => twe}/a_npcList.php (100%) rename {twe_close => twe}/a_status.php (100%) rename {twe_close => twe}/a_traffic.php (100%) rename {twe_close => twe}/a_vote.php (100%) rename {twe_close => twe}/analytics.php (100%) rename {twe_close => twe}/b_auction.php (100%) rename {twe_close => twe}/b_battleCenter.php (100%) rename {twe_close => twe}/b_betting.php (100%) rename {twe_close => twe}/b_chiefboard.php (100%) rename {twe_close => twe}/b_chiefcenter.php (100%) rename {twe_close => twe}/b_currentCity.php (100%) rename {twe_close => twe}/b_dipcenter.php (100%) rename {twe_close => twe}/b_diplomacy.php (100%) rename {twe_close => twe}/b_genList.php (100%) rename {twe_close => twe}/b_myBossInfo.php (100%) rename {twe_close => twe}/b_myCityInfo.php (100%) rename {twe_close => twe}/b_myGenInfo.php (100%) rename {twe_close => twe}/b_myKingdomInfo.php (100%) rename {twe_close => twe}/b_myPage.php (100%) rename {twe_close => twe}/b_nationboard.php (100%) rename {twe_close => twe}/b_nationrule.php (100%) rename {twe_close => twe}/b_tournament.php (100%) rename {twe_close => twe}/b_troop.php (100%) rename {twe_close => twe}/c_auction.php (100%) rename {twe_close => twe}/c_betting.php (100%) rename {twe_close => twe}/c_chiefboard.php (100%) rename {twe_close => twe}/c_dipcenter.php (100%) rename {twe_close => twe}/c_double.php (100%) rename {twe_close => twe}/c_msgsubmit.php (100%) rename {twe_close => twe}/c_myBossInfo.php (100%) rename {twe_close => twe}/c_nationboard.php (100%) rename {twe_close => twe}/c_nationrule.php (100%) rename {twe_close => twe}/c_tournament.php (100%) rename {twe_close => twe}/c_troop.php (100%) rename {twe_close => twe}/c_vacation.php (100%) rename {twe_close => twe}/c_vote.php (100%) rename {twe_close => twe}/commandlist.php (100%) rename {twe_close => twe}/confirm.png (100%) rename {twe_close => twe}/d_ally.php (100%) rename {twe_close => twe}/d_cancel.php (100%) rename {twe_close => twe}/d_cease.php (100%) rename {twe_close => twe}/d_merge.php (100%) rename {twe_close => twe}/d_scout.php (100%) rename {twe_close => twe}/d_setting/.htaccess (100%) rename {twe_close => twe}/d_setting/_common.php (100%) rename {twe_close => twe}/d_surrender.php (100%) rename {twe_close => twe}/data/.htaccess (100%) rename {twe_close => twe}/error.php (100%) rename {twe_close => twe}/event_1.php (100%) rename {twe_close => twe}/event_2.php (100%) rename {twe_close => twe}/event_3.php (100%) rename {twe_close => twe}/event_4.php (100%) rename {twe_close => twe}/func.php (100%) rename {twe_close => twe}/func_auction.php (100%) rename {twe_close => twe}/func_history.php (100%) rename {twe_close => twe}/func_http.php (100%) rename {twe_close => twe}/func_npc.php (100%) rename {twe_close => twe}/func_process.php (100%) rename {twe_close => twe}/func_string.php (100%) rename {twe_close => twe}/func_tournament.php (100%) rename {twe_close => twe}/gen.xlsx (100%) rename {twe_close => twe}/genDatabase.txt (100%) rename {twe_close => twe}/index.php (100%) rename {twe_close => twe}/install.php (100%) rename {twe_close => twe}/install1.php (100%) rename {twe_close => twe}/install2.php (100%) rename {twe_close => twe}/install2_ok.php (100%) rename {twe_close => twe}/install3_ok.php (100%) rename {twe_close => twe}/install_ok.php (100%) rename {twe_close => twe}/join.php (100%) rename {twe_close => twe}/join_post.php (100%) rename {twe_close => twe}/join_post.php.orig (100%) rename {twe_close => twe}/join_token.php (100%) rename {twe_close => twe}/jquery-1.11.0.min.js (100%) rename {twe_close => twe}/lib.php (100%) rename {twe_close => twe}/license.txt (100%) rename {twe_close => twe}/lock.txt (100%) rename {twe_close => twe}/login_process.php (100%) rename {twe_close => twe}/logout_process.php (100%) rename {twe_close => twe}/main.php (100%) rename {twe_close => twe}/map.php (100%) rename {twe_close => twe}/map_history.php (100%) rename {twe_close => twe}/msglist.php (100%) rename {twe_close => twe}/mysql_opt.txt (100%) rename {twe_close => twe}/new_lib.php (100%) rename {twe_close => twe}/npc_login.php (100%) rename {twe_close => twe}/npc_login_process.php (100%) rename {twe_close => twe}/preprocessing.php (100%) rename {twe_close => twe}/proc.php (100%) rename {twe_close => twe}/proc.sh (100%) rename {twe_close => twe}/process_war.php (100%) rename {twe_close => twe}/processing.php (100%) rename {twe_close => twe}/queue.php (100%) rename {twe_close => twe}/reset.php (100%) rename {twe_close => twe}/scenario_1.php (100%) rename {twe_close => twe}/scenario_10.php (100%) rename {twe_close => twe}/scenario_11.php (100%) rename {twe_close => twe}/scenario_12.php (100%) rename {twe_close => twe}/scenario_2.php (100%) rename {twe_close => twe}/scenario_20.php (100%) rename {twe_close => twe}/scenario_21.php (100%) rename {twe_close => twe}/scenario_22.php (100%) rename {twe_close => twe}/scenario_23.php (100%) rename {twe_close => twe}/scenario_24.php (100%) rename {twe_close => twe}/scenario_25.php (100%) rename {twe_close => twe}/scenario_26.php (100%) rename {twe_close => twe}/scenario_27.php (100%) rename {twe_close => twe}/scenario_28.php (100%) rename {twe_close => twe}/scenario_3.php (100%) rename {twe_close => twe}/scenario_4.php (100%) rename {twe_close => twe}/scenario_5.php (100%) rename {twe_close => twe}/scenario_6.php (100%) rename {twe_close => twe}/scenario_7.php (100%) rename {twe_close => twe}/scenario_8.php (100%) rename {twe_close => twe}/scenario_9.php (100%) rename {twe_close => twe}/schema.php (100%) rename {twe_close => twe}/schema.sql.orig (100%) rename {twe_close => twe}/select_npc.php (100%) rename {twe_close => twe}/select_npc_post.php (100%) rename {twe_close => twe}/selection.php (100%) rename {twe_close => twe}/start.php (100%) rename {twe_close => twe}/stylesheet.php (100%) rename {twe_close => twe}/templates/.htaccess (100%) rename {twe_close => twe}/turn.php (100%) rename {twe_close => twe}/turn_pop_core.php (100%) rename {twe_close => twe}/turn_push_core.php (100%) rename {twe => twe_rest}/index.html (100%) diff --git a/che_close/func.php b/che_close/func.php index 7350c1c3..9281a3eb 100644 --- a/che_close/func.php +++ b/che_close/func.php @@ -2879,7 +2879,7 @@ function pushProcessLog($connect, $log) { function delStepLog() { $date = date('Y_m_d'); - @unlink("logs/_{$date}_steplog.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/_{$date}_steplog.txt"); } function pushStepLog($log) { diff --git a/che_close/func_tournament.php b/che_close/func_tournament.php index 569fc988..c18c239a 100644 --- a/che_close/func_tournament.php +++ b/che_close/func_tournament.php @@ -238,12 +238,12 @@ function printFighting($tournament, $phase) { function startTournament($connect, $auto, $type) { for($i=0; $i < 8; $i++) { - @unlink("logs/fight{$i}.txt"); - @unlink("logs/fight1{$i}.txt"); - @unlink("logs/fight2{$i}.txt"); - @unlink("logs/fight3{$i}.txt"); - @unlink("logs/fight4{$i}.txt"); - @unlink("logs/fight5{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight1{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight2{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight3{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight4{$i}.txt"); + @unlink(realpath(dirname(__FILE__))."/logs/fight5{$i}.txt"); } switch($auto) { diff --git a/che_close/install_ok.php b/che_close/install_ok.php index 9ae5d345..762a170f 100644 --- a/che_close/install_ok.php +++ b/che_close/install_ok.php @@ -15,9 +15,9 @@ $connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select
Error!!!",""); -delInDir("logs"); -delInDir("data/session"); -@unlink("data/connected.php"); +delInDir(realpath(dirname(__FILE__))."/logs"); +delInDir(realpath(dirname(__FILE__))."/data/session"); +@unlink(realpath(dirname(__FILE__))."/data/connected.php"); // 관리자 테이블 삭제 if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),""); diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index 14b36414..2c7e7a60 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -45,19 +45,19 @@ if($member['GRADE'] < 6) { $serverDir = $_serverDirs[$server]; if($select == 0) { - rename(ROOT.W.$serverDir, ROOT.W.$serverDir.'_close'); - rename(ROOT.W.$serverDir.'_rest', ROOT.W.$serverDir); + rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir, realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'); + rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_rest', realpath(dirname(__FILE__)).W.ROOT.W.$serverDir); $response['result'] = 'SUCCESS'; } elseif($select == 1) { - if(file_exists(ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP)){ - @unlink(ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP); + if(file_exists(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP)){ + @unlink(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP); } $response['installURL'] = ROOT.W."{$serverDir}_close/install.php"; $response['result'] = 'SUCCESS'; } elseif($select == 2) { - rename(ROOT.W.$serverDir, ROOT.W.$serverDir."_rest"); - rename(ROOT.W.$serverDir."_close", ROOT.W.$serverDir); + rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir, realpath(dirname(__FILE__)).W.ROOT.W.$serverDir."_rest"); + rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir."_close", realpath(dirname(__FILE__)).W.ROOT.W.$serverDir); $response['result'] = 'SUCCESS'; } } else { diff --git a/twe_close/MYDB.php b/twe/MYDB.php similarity index 100% rename from twe_close/MYDB.php rename to twe/MYDB.php diff --git a/twe_close/_119.php b/twe/_119.php similarity index 100% rename from twe_close/_119.php rename to twe/_119.php diff --git a/twe_close/_119_b.php b/twe/_119_b.php similarity index 100% rename from twe_close/_119_b.php rename to twe/_119_b.php diff --git a/twe_close/_admin1.php b/twe/_admin1.php similarity index 100% rename from twe_close/_admin1.php rename to twe/_admin1.php diff --git a/twe_close/_admin1_submit.php b/twe/_admin1_submit.php similarity index 100% rename from twe_close/_admin1_submit.php rename to twe/_admin1_submit.php diff --git a/twe_close/_admin2.php b/twe/_admin2.php similarity index 100% rename from twe_close/_admin2.php rename to twe/_admin2.php diff --git a/twe_close/_admin2_submit.php b/twe/_admin2_submit.php similarity index 100% rename from twe_close/_admin2_submit.php rename to twe/_admin2_submit.php diff --git a/twe_close/_admin3.php b/twe/_admin3.php similarity index 100% rename from twe_close/_admin3.php rename to twe/_admin3.php diff --git a/twe_close/_admin3_submit.php b/twe/_admin3_submit.php similarity index 100% rename from twe_close/_admin3_submit.php rename to twe/_admin3_submit.php diff --git a/twe_close/_admin4.php b/twe/_admin4.php similarity index 100% rename from twe_close/_admin4.php rename to twe/_admin4.php diff --git a/twe_close/_admin4_submit.php b/twe/_admin4_submit.php similarity index 100% rename from twe_close/_admin4_submit.php rename to twe/_admin4_submit.php diff --git a/twe_close/_admin5.php b/twe/_admin5.php similarity index 100% rename from twe_close/_admin5.php rename to twe/_admin5.php diff --git a/twe_close/_admin5_submit.php b/twe/_admin5_submit.php similarity index 100% rename from twe_close/_admin5_submit.php rename to twe/_admin5_submit.php diff --git a/twe_close/_admin6.php b/twe/_admin6.php similarity index 100% rename from twe_close/_admin6.php rename to twe/_admin6.php diff --git a/twe_close/_admin7.php b/twe/_admin7.php similarity index 100% rename from twe_close/_admin7.php rename to twe/_admin7.php diff --git a/twe_close/_admin8.php b/twe/_admin8.php similarity index 100% rename from twe_close/_admin8.php rename to twe/_admin8.php diff --git a/twe_close/_simul.php b/twe/_simul.php similarity index 100% rename from twe_close/_simul.php rename to twe/_simul.php diff --git a/twe_close/a_bestGeneral.php b/twe/a_bestGeneral.php similarity index 100% rename from twe_close/a_bestGeneral.php rename to twe/a_bestGeneral.php diff --git a/twe_close/a_emperior.php b/twe/a_emperior.php similarity index 100% rename from twe_close/a_emperior.php rename to twe/a_emperior.php diff --git a/twe_close/a_emperior2.php b/twe/a_emperior2.php similarity index 100% rename from twe_close/a_emperior2.php rename to twe/a_emperior2.php diff --git a/twe_close/a_genList.php b/twe/a_genList.php similarity index 100% rename from twe_close/a_genList.php rename to twe/a_genList.php diff --git a/twe_close/a_hallOfFame.php b/twe/a_hallOfFame.php similarity index 100% rename from twe_close/a_hallOfFame.php rename to twe/a_hallOfFame.php diff --git a/twe_close/a_history.php b/twe/a_history.php similarity index 100% rename from twe_close/a_history.php rename to twe/a_history.php diff --git a/twe_close/a_kingdomList.php b/twe/a_kingdomList.php similarity index 100% rename from twe_close/a_kingdomList.php rename to twe/a_kingdomList.php diff --git a/twe_close/a_npcList.php b/twe/a_npcList.php similarity index 100% rename from twe_close/a_npcList.php rename to twe/a_npcList.php diff --git a/twe_close/a_status.php b/twe/a_status.php similarity index 100% rename from twe_close/a_status.php rename to twe/a_status.php diff --git a/twe_close/a_traffic.php b/twe/a_traffic.php similarity index 100% rename from twe_close/a_traffic.php rename to twe/a_traffic.php diff --git a/twe_close/a_vote.php b/twe/a_vote.php similarity index 100% rename from twe_close/a_vote.php rename to twe/a_vote.php diff --git a/twe_close/analytics.php b/twe/analytics.php similarity index 100% rename from twe_close/analytics.php rename to twe/analytics.php diff --git a/twe_close/b_auction.php b/twe/b_auction.php similarity index 100% rename from twe_close/b_auction.php rename to twe/b_auction.php diff --git a/twe_close/b_battleCenter.php b/twe/b_battleCenter.php similarity index 100% rename from twe_close/b_battleCenter.php rename to twe/b_battleCenter.php diff --git a/twe_close/b_betting.php b/twe/b_betting.php similarity index 100% rename from twe_close/b_betting.php rename to twe/b_betting.php diff --git a/twe_close/b_chiefboard.php b/twe/b_chiefboard.php similarity index 100% rename from twe_close/b_chiefboard.php rename to twe/b_chiefboard.php diff --git a/twe_close/b_chiefcenter.php b/twe/b_chiefcenter.php similarity index 100% rename from twe_close/b_chiefcenter.php rename to twe/b_chiefcenter.php diff --git a/twe_close/b_currentCity.php b/twe/b_currentCity.php similarity index 100% rename from twe_close/b_currentCity.php rename to twe/b_currentCity.php diff --git a/twe_close/b_dipcenter.php b/twe/b_dipcenter.php similarity index 100% rename from twe_close/b_dipcenter.php rename to twe/b_dipcenter.php diff --git a/twe_close/b_diplomacy.php b/twe/b_diplomacy.php similarity index 100% rename from twe_close/b_diplomacy.php rename to twe/b_diplomacy.php diff --git a/twe_close/b_genList.php b/twe/b_genList.php similarity index 100% rename from twe_close/b_genList.php rename to twe/b_genList.php diff --git a/twe_close/b_myBossInfo.php b/twe/b_myBossInfo.php similarity index 100% rename from twe_close/b_myBossInfo.php rename to twe/b_myBossInfo.php diff --git a/twe_close/b_myCityInfo.php b/twe/b_myCityInfo.php similarity index 100% rename from twe_close/b_myCityInfo.php rename to twe/b_myCityInfo.php diff --git a/twe_close/b_myGenInfo.php b/twe/b_myGenInfo.php similarity index 100% rename from twe_close/b_myGenInfo.php rename to twe/b_myGenInfo.php diff --git a/twe_close/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php similarity index 100% rename from twe_close/b_myKingdomInfo.php rename to twe/b_myKingdomInfo.php diff --git a/twe_close/b_myPage.php b/twe/b_myPage.php similarity index 100% rename from twe_close/b_myPage.php rename to twe/b_myPage.php diff --git a/twe_close/b_nationboard.php b/twe/b_nationboard.php similarity index 100% rename from twe_close/b_nationboard.php rename to twe/b_nationboard.php diff --git a/twe_close/b_nationrule.php b/twe/b_nationrule.php similarity index 100% rename from twe_close/b_nationrule.php rename to twe/b_nationrule.php diff --git a/twe_close/b_tournament.php b/twe/b_tournament.php similarity index 100% rename from twe_close/b_tournament.php rename to twe/b_tournament.php diff --git a/twe_close/b_troop.php b/twe/b_troop.php similarity index 100% rename from twe_close/b_troop.php rename to twe/b_troop.php diff --git a/twe_close/c_auction.php b/twe/c_auction.php similarity index 100% rename from twe_close/c_auction.php rename to twe/c_auction.php diff --git a/twe_close/c_betting.php b/twe/c_betting.php similarity index 100% rename from twe_close/c_betting.php rename to twe/c_betting.php diff --git a/twe_close/c_chiefboard.php b/twe/c_chiefboard.php similarity index 100% rename from twe_close/c_chiefboard.php rename to twe/c_chiefboard.php diff --git a/twe_close/c_dipcenter.php b/twe/c_dipcenter.php similarity index 100% rename from twe_close/c_dipcenter.php rename to twe/c_dipcenter.php diff --git a/twe_close/c_double.php b/twe/c_double.php similarity index 100% rename from twe_close/c_double.php rename to twe/c_double.php diff --git a/twe_close/c_msgsubmit.php b/twe/c_msgsubmit.php similarity index 100% rename from twe_close/c_msgsubmit.php rename to twe/c_msgsubmit.php diff --git a/twe_close/c_myBossInfo.php b/twe/c_myBossInfo.php similarity index 100% rename from twe_close/c_myBossInfo.php rename to twe/c_myBossInfo.php diff --git a/twe_close/c_nationboard.php b/twe/c_nationboard.php similarity index 100% rename from twe_close/c_nationboard.php rename to twe/c_nationboard.php diff --git a/twe_close/c_nationrule.php b/twe/c_nationrule.php similarity index 100% rename from twe_close/c_nationrule.php rename to twe/c_nationrule.php diff --git a/twe_close/c_tournament.php b/twe/c_tournament.php similarity index 100% rename from twe_close/c_tournament.php rename to twe/c_tournament.php diff --git a/twe_close/c_troop.php b/twe/c_troop.php similarity index 100% rename from twe_close/c_troop.php rename to twe/c_troop.php diff --git a/twe_close/c_vacation.php b/twe/c_vacation.php similarity index 100% rename from twe_close/c_vacation.php rename to twe/c_vacation.php diff --git a/twe_close/c_vote.php b/twe/c_vote.php similarity index 100% rename from twe_close/c_vote.php rename to twe/c_vote.php diff --git a/twe_close/commandlist.php b/twe/commandlist.php similarity index 100% rename from twe_close/commandlist.php rename to twe/commandlist.php diff --git a/twe_close/confirm.png b/twe/confirm.png similarity index 100% rename from twe_close/confirm.png rename to twe/confirm.png diff --git a/twe_close/d_ally.php b/twe/d_ally.php similarity index 100% rename from twe_close/d_ally.php rename to twe/d_ally.php diff --git a/twe_close/d_cancel.php b/twe/d_cancel.php similarity index 100% rename from twe_close/d_cancel.php rename to twe/d_cancel.php diff --git a/twe_close/d_cease.php b/twe/d_cease.php similarity index 100% rename from twe_close/d_cease.php rename to twe/d_cease.php diff --git a/twe_close/d_merge.php b/twe/d_merge.php similarity index 100% rename from twe_close/d_merge.php rename to twe/d_merge.php diff --git a/twe_close/d_scout.php b/twe/d_scout.php similarity index 100% rename from twe_close/d_scout.php rename to twe/d_scout.php diff --git a/twe_close/d_setting/.htaccess b/twe/d_setting/.htaccess similarity index 100% rename from twe_close/d_setting/.htaccess rename to twe/d_setting/.htaccess diff --git a/twe_close/d_setting/_common.php b/twe/d_setting/_common.php similarity index 100% rename from twe_close/d_setting/_common.php rename to twe/d_setting/_common.php diff --git a/twe_close/d_surrender.php b/twe/d_surrender.php similarity index 100% rename from twe_close/d_surrender.php rename to twe/d_surrender.php diff --git a/twe_close/data/.htaccess b/twe/data/.htaccess similarity index 100% rename from twe_close/data/.htaccess rename to twe/data/.htaccess diff --git a/twe_close/error.php b/twe/error.php similarity index 100% rename from twe_close/error.php rename to twe/error.php diff --git a/twe_close/event_1.php b/twe/event_1.php similarity index 100% rename from twe_close/event_1.php rename to twe/event_1.php diff --git a/twe_close/event_2.php b/twe/event_2.php similarity index 100% rename from twe_close/event_2.php rename to twe/event_2.php diff --git a/twe_close/event_3.php b/twe/event_3.php similarity index 100% rename from twe_close/event_3.php rename to twe/event_3.php diff --git a/twe_close/event_4.php b/twe/event_4.php similarity index 100% rename from twe_close/event_4.php rename to twe/event_4.php diff --git a/twe_close/func.php b/twe/func.php similarity index 100% rename from twe_close/func.php rename to twe/func.php diff --git a/twe_close/func_auction.php b/twe/func_auction.php similarity index 100% rename from twe_close/func_auction.php rename to twe/func_auction.php diff --git a/twe_close/func_history.php b/twe/func_history.php similarity index 100% rename from twe_close/func_history.php rename to twe/func_history.php diff --git a/twe_close/func_http.php b/twe/func_http.php similarity index 100% rename from twe_close/func_http.php rename to twe/func_http.php diff --git a/twe_close/func_npc.php b/twe/func_npc.php similarity index 100% rename from twe_close/func_npc.php rename to twe/func_npc.php diff --git a/twe_close/func_process.php b/twe/func_process.php similarity index 100% rename from twe_close/func_process.php rename to twe/func_process.php diff --git a/twe_close/func_string.php b/twe/func_string.php similarity index 100% rename from twe_close/func_string.php rename to twe/func_string.php diff --git a/twe_close/func_tournament.php b/twe/func_tournament.php similarity index 100% rename from twe_close/func_tournament.php rename to twe/func_tournament.php diff --git a/twe_close/gen.xlsx b/twe/gen.xlsx similarity index 100% rename from twe_close/gen.xlsx rename to twe/gen.xlsx diff --git a/twe_close/genDatabase.txt b/twe/genDatabase.txt similarity index 100% rename from twe_close/genDatabase.txt rename to twe/genDatabase.txt diff --git a/twe_close/index.php b/twe/index.php similarity index 100% rename from twe_close/index.php rename to twe/index.php diff --git a/twe_close/install.php b/twe/install.php similarity index 100% rename from twe_close/install.php rename to twe/install.php diff --git a/twe_close/install1.php b/twe/install1.php similarity index 100% rename from twe_close/install1.php rename to twe/install1.php diff --git a/twe_close/install2.php b/twe/install2.php similarity index 100% rename from twe_close/install2.php rename to twe/install2.php diff --git a/twe_close/install2_ok.php b/twe/install2_ok.php similarity index 100% rename from twe_close/install2_ok.php rename to twe/install2_ok.php diff --git a/twe_close/install3_ok.php b/twe/install3_ok.php similarity index 100% rename from twe_close/install3_ok.php rename to twe/install3_ok.php diff --git a/twe_close/install_ok.php b/twe/install_ok.php similarity index 100% rename from twe_close/install_ok.php rename to twe/install_ok.php diff --git a/twe_close/join.php b/twe/join.php similarity index 100% rename from twe_close/join.php rename to twe/join.php diff --git a/twe_close/join_post.php b/twe/join_post.php similarity index 100% rename from twe_close/join_post.php rename to twe/join_post.php diff --git a/twe_close/join_post.php.orig b/twe/join_post.php.orig similarity index 100% rename from twe_close/join_post.php.orig rename to twe/join_post.php.orig diff --git a/twe_close/join_token.php b/twe/join_token.php similarity index 100% rename from twe_close/join_token.php rename to twe/join_token.php diff --git a/twe_close/jquery-1.11.0.min.js b/twe/jquery-1.11.0.min.js similarity index 100% rename from twe_close/jquery-1.11.0.min.js rename to twe/jquery-1.11.0.min.js diff --git a/twe_close/lib.php b/twe/lib.php similarity index 100% rename from twe_close/lib.php rename to twe/lib.php diff --git a/twe_close/license.txt b/twe/license.txt similarity index 100% rename from twe_close/license.txt rename to twe/license.txt diff --git a/twe_close/lock.txt b/twe/lock.txt similarity index 100% rename from twe_close/lock.txt rename to twe/lock.txt diff --git a/twe_close/login_process.php b/twe/login_process.php similarity index 100% rename from twe_close/login_process.php rename to twe/login_process.php diff --git a/twe_close/logout_process.php b/twe/logout_process.php similarity index 100% rename from twe_close/logout_process.php rename to twe/logout_process.php diff --git a/twe_close/main.php b/twe/main.php similarity index 100% rename from twe_close/main.php rename to twe/main.php diff --git a/twe_close/map.php b/twe/map.php similarity index 100% rename from twe_close/map.php rename to twe/map.php diff --git a/twe_close/map_history.php b/twe/map_history.php similarity index 100% rename from twe_close/map_history.php rename to twe/map_history.php diff --git a/twe_close/msglist.php b/twe/msglist.php similarity index 100% rename from twe_close/msglist.php rename to twe/msglist.php diff --git a/twe_close/mysql_opt.txt b/twe/mysql_opt.txt similarity index 100% rename from twe_close/mysql_opt.txt rename to twe/mysql_opt.txt diff --git a/twe_close/new_lib.php b/twe/new_lib.php similarity index 100% rename from twe_close/new_lib.php rename to twe/new_lib.php diff --git a/twe_close/npc_login.php b/twe/npc_login.php similarity index 100% rename from twe_close/npc_login.php rename to twe/npc_login.php diff --git a/twe_close/npc_login_process.php b/twe/npc_login_process.php similarity index 100% rename from twe_close/npc_login_process.php rename to twe/npc_login_process.php diff --git a/twe_close/preprocessing.php b/twe/preprocessing.php similarity index 100% rename from twe_close/preprocessing.php rename to twe/preprocessing.php diff --git a/twe_close/proc.php b/twe/proc.php similarity index 100% rename from twe_close/proc.php rename to twe/proc.php diff --git a/twe_close/proc.sh b/twe/proc.sh similarity index 100% rename from twe_close/proc.sh rename to twe/proc.sh diff --git a/twe_close/process_war.php b/twe/process_war.php similarity index 100% rename from twe_close/process_war.php rename to twe/process_war.php diff --git a/twe_close/processing.php b/twe/processing.php similarity index 100% rename from twe_close/processing.php rename to twe/processing.php diff --git a/twe_close/queue.php b/twe/queue.php similarity index 100% rename from twe_close/queue.php rename to twe/queue.php diff --git a/twe_close/reset.php b/twe/reset.php similarity index 100% rename from twe_close/reset.php rename to twe/reset.php diff --git a/twe_close/scenario_1.php b/twe/scenario_1.php similarity index 100% rename from twe_close/scenario_1.php rename to twe/scenario_1.php diff --git a/twe_close/scenario_10.php b/twe/scenario_10.php similarity index 100% rename from twe_close/scenario_10.php rename to twe/scenario_10.php diff --git a/twe_close/scenario_11.php b/twe/scenario_11.php similarity index 100% rename from twe_close/scenario_11.php rename to twe/scenario_11.php diff --git a/twe_close/scenario_12.php b/twe/scenario_12.php similarity index 100% rename from twe_close/scenario_12.php rename to twe/scenario_12.php diff --git a/twe_close/scenario_2.php b/twe/scenario_2.php similarity index 100% rename from twe_close/scenario_2.php rename to twe/scenario_2.php diff --git a/twe_close/scenario_20.php b/twe/scenario_20.php similarity index 100% rename from twe_close/scenario_20.php rename to twe/scenario_20.php diff --git a/twe_close/scenario_21.php b/twe/scenario_21.php similarity index 100% rename from twe_close/scenario_21.php rename to twe/scenario_21.php diff --git a/twe_close/scenario_22.php b/twe/scenario_22.php similarity index 100% rename from twe_close/scenario_22.php rename to twe/scenario_22.php diff --git a/twe_close/scenario_23.php b/twe/scenario_23.php similarity index 100% rename from twe_close/scenario_23.php rename to twe/scenario_23.php diff --git a/twe_close/scenario_24.php b/twe/scenario_24.php similarity index 100% rename from twe_close/scenario_24.php rename to twe/scenario_24.php diff --git a/twe_close/scenario_25.php b/twe/scenario_25.php similarity index 100% rename from twe_close/scenario_25.php rename to twe/scenario_25.php diff --git a/twe_close/scenario_26.php b/twe/scenario_26.php similarity index 100% rename from twe_close/scenario_26.php rename to twe/scenario_26.php diff --git a/twe_close/scenario_27.php b/twe/scenario_27.php similarity index 100% rename from twe_close/scenario_27.php rename to twe/scenario_27.php diff --git a/twe_close/scenario_28.php b/twe/scenario_28.php similarity index 100% rename from twe_close/scenario_28.php rename to twe/scenario_28.php diff --git a/twe_close/scenario_3.php b/twe/scenario_3.php similarity index 100% rename from twe_close/scenario_3.php rename to twe/scenario_3.php diff --git a/twe_close/scenario_4.php b/twe/scenario_4.php similarity index 100% rename from twe_close/scenario_4.php rename to twe/scenario_4.php diff --git a/twe_close/scenario_5.php b/twe/scenario_5.php similarity index 100% rename from twe_close/scenario_5.php rename to twe/scenario_5.php diff --git a/twe_close/scenario_6.php b/twe/scenario_6.php similarity index 100% rename from twe_close/scenario_6.php rename to twe/scenario_6.php diff --git a/twe_close/scenario_7.php b/twe/scenario_7.php similarity index 100% rename from twe_close/scenario_7.php rename to twe/scenario_7.php diff --git a/twe_close/scenario_8.php b/twe/scenario_8.php similarity index 100% rename from twe_close/scenario_8.php rename to twe/scenario_8.php diff --git a/twe_close/scenario_9.php b/twe/scenario_9.php similarity index 100% rename from twe_close/scenario_9.php rename to twe/scenario_9.php diff --git a/twe_close/schema.php b/twe/schema.php similarity index 100% rename from twe_close/schema.php rename to twe/schema.php diff --git a/twe_close/schema.sql.orig b/twe/schema.sql.orig similarity index 100% rename from twe_close/schema.sql.orig rename to twe/schema.sql.orig diff --git a/twe_close/select_npc.php b/twe/select_npc.php similarity index 100% rename from twe_close/select_npc.php rename to twe/select_npc.php diff --git a/twe_close/select_npc_post.php b/twe/select_npc_post.php similarity index 100% rename from twe_close/select_npc_post.php rename to twe/select_npc_post.php diff --git a/twe_close/selection.php b/twe/selection.php similarity index 100% rename from twe_close/selection.php rename to twe/selection.php diff --git a/twe_close/start.php b/twe/start.php similarity index 100% rename from twe_close/start.php rename to twe/start.php diff --git a/twe_close/stylesheet.php b/twe/stylesheet.php similarity index 100% rename from twe_close/stylesheet.php rename to twe/stylesheet.php diff --git a/twe_close/templates/.htaccess b/twe/templates/.htaccess similarity index 100% rename from twe_close/templates/.htaccess rename to twe/templates/.htaccess diff --git a/twe_close/turn.php b/twe/turn.php similarity index 100% rename from twe_close/turn.php rename to twe/turn.php diff --git a/twe_close/turn_pop_core.php b/twe/turn_pop_core.php similarity index 100% rename from twe_close/turn_pop_core.php rename to twe/turn_pop_core.php diff --git a/twe_close/turn_push_core.php b/twe/turn_push_core.php similarity index 100% rename from twe_close/turn_push_core.php rename to twe/turn_push_core.php diff --git a/twe/index.html b/twe_rest/index.html similarity index 100% rename from twe/index.html rename to twe_rest/index.html From 599160d0430373ca254bac99a723c69b0c5ef9e7 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 14 Jan 2018 13:49:50 +0900 Subject: [PATCH 017/622] =?UTF-8?q?require=5Fonce=EB=A5=BC=20require?= =?UTF-8?q?=EB=A1=9C=20=EB=8B=A4=EC=8B=9C=20=EB=B3=80=EA=B2=BD=20server=5F?= =?UTF-8?q?close=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 ++-- che_close/d_setting/_common.php | 6 +++--- che_close/join.php | 2 +- che_close/new_lib.php | 2 +- d_setting/_common.php | 6 +++--- e_lib/includes.php | 4 ++-- e_lib/plates.php | 14 ++++++++++++++ e_lib/plates/plates.php | 14 -------------- f_config/DB.php | 6 +++--- f_config/_common.php | 6 +++--- i_entrance/adminPost.php | 13 ++----------- i_entrance/template/.htaccess | 1 + i_entrance/template/block_htaccess.php | 2 ++ phpinfo.php | 2 ++ 14 files changed, 39 insertions(+), 43 deletions(-) create mode 100644 e_lib/plates.php delete mode 100644 e_lib/plates/plates.php create mode 100644 i_entrance/template/.htaccess create mode 100644 i_entrance/template/block_htaccess.php create mode 100644 phpinfo.php diff --git a/.vscode/settings.json b/.vscode/settings.json index d8e64b4b..92af6b14 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,13 +6,13 @@ "**/CVS": true, "**/.DS_Store": true, "**/logs/*.txt": true, - "**/session/sess**":true, + "**/session/sess*":true, "**/che_close": true, }, "search.exclude": { "**/che_close": true, - "e_lib":true, + "e_lib/*":true, }, } \ No newline at end of file diff --git a/che_close/d_setting/_common.php b/che_close/d_setting/_common.php index 57949e8d..2b789212 100644 --- a/che_close/d_setting/_common.php +++ b/che_close/d_setting/_common.php @@ -2,8 +2,8 @@ if(!defined('ROOT')){ define('ROOT', '../..'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/che_close/join.php b/che_close/join.php index f6462cbc..c6980bcc 100644 --- a/che_close/join.php +++ b/che_close/join.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/e_lib/plates.php b/e_lib/plates.php new file mode 100644 index 00000000..bd1f1534 --- /dev/null +++ b/e_lib/plates.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/e_lib/plates/plates.php b/e_lib/plates/plates.php deleted file mode 100644 index 181037cd..00000000 --- a/e_lib/plates/plates.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/f_config/DB.php b/f_config/DB.php index 58d04ce8..706dbe68 100644 --- a/f_config/DB.php +++ b/f_config/DB.php @@ -1,7 +1,7 @@ IsExist()) { $DB = new _DB($SETTING->DBHost(), $SETTING->DBId(), $SETTING->DBPw(), $SETTING->DBName()); diff --git a/f_config/_common.php b/f_config/_common.php index b25b4786..7b86fa95 100644 --- a/f_config/_common.php +++ b/f_config/_common.php @@ -2,9 +2,9 @@ if(!defined('ROOT')){ define('ROOT', '..'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index 2c7e7a60..b0249781 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -11,17 +11,8 @@ require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); -function getPost($str){ - if(!isset($_POST[$str])){ - return ''; - } - $temp = $_POST[$str]; - $temp=str_replace(" ","",$temp); - $temp=str_replace("\n","",$temp); - $temp=strip_tags($temp); - $temp=str_replace(" ","",$temp); - $temp=str_replace(" ","",$temp); - return $temp; +function escapeIPv4($ip){ + return str_replace('.', '\\.', $ip); } $action = util::array_get($_POST['action'], ''); diff --git a/i_entrance/template/.htaccess b/i_entrance/template/.htaccess new file mode 100644 index 00000000..698196ae --- /dev/null +++ b/i_entrance/template/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/i_entrance/template/block_htaccess.php b/i_entrance/template/block_htaccess.php new file mode 100644 index 00000000..2d485c81 --- /dev/null +++ b/i_entrance/template/block_htaccess.php @@ -0,0 +1,2 @@ +Deny from all +Allow from 192.168.0.40 \ No newline at end of file diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 00000000..bfd863b0 --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,2 @@ + Date: Sun, 14 Jan 2018 14:26:08 +0900 Subject: [PATCH 018/622] require_once -> require --- _common.php | 6 +++--- f_config/DBS.php | 6 +++--- f_config/MAIL.php | 6 +++--- f_config/SESSION.php | 4 ++-- f_config/SETTING.php | 4 ++-- f_config/SETTINGS.php | 4 ++-- f_func/_common.php | 6 +++--- f_func/class._Chat.php | 8 ++++---- f_func/class._DB.php | 4 ++-- f_func/class._Lock.php | 4 ++-- f_func/class._Log.php | 8 ++++---- f_func/class._Mail.php | 4 ++-- f_func/class._Process.php | 6 +++--- f_func/class._Setting.php | 4 ++-- f_func/class._Validation.php | 2 +- f_install/_common.php | 6 +++--- f_install/install.php | 2 +- f_install/install1.php | 2 +- f_install/install1Post.php | 6 +++--- f_install/install2.php | 2 +- f_install/install2Post.php | 6 +++--- f_retrival/_common.php | 6 +++--- i_entrance/Frame.php | 6 +++--- i_entrance/_common.php | 6 +++--- i_entrance/adminInc.php | 2 +- i_entrance/adminPost.php | 11 ++++++----- i_entrance/donation/Frame.php | 2 +- i_entrance/donation/Get.php | 10 +++++----- i_entrance/donation/Post.php | 8 ++++---- i_entrance/donation/_common.php | 6 +++--- i_entrance/donation/calculatePost.php | 8 ++++---- i_entrance/enterPost.php | 8 ++++---- i_entrance/entrance.php | 4 ++-- i_entrance/logoutPost.php | 8 ++++---- i_entrance/manage/Frame.php | 2 +- i_entrance/manage/Get.php | 8 ++++---- i_entrance/manage/_common.php | 6 +++--- i_entrance/manage/deletePost.php | 12 ++++++------ i_entrance/manage/iconPost.php | 10 +++++----- i_entrance/manage/passwordPost.php | 12 ++++++------ i_entrance/manage/quitPost.php | 10 +++++----- i_entrance/member/Frame.php | 2 +- i_entrance/member/Get.php | 8 ++++---- i_entrance/member/Post.php | 12 ++++++------ i_entrance/member/_common.php | 6 +++--- i_entrance/serverListPost.php | 12 ++++++------ i_entrance/template/.htaccess | 2 +- i_entrance/template/block_htaccess.php | 4 +++- i_login/Frame.php | 4 ++-- i_login/Post.php | 10 +++++----- i_login/_common.php | 6 +++--- i_login/findpw/Frame.php | 2 +- i_login/findpw/Get.php | 6 +++--- i_login/findpw/Post.php | 12 ++++++------ i_login/findpw/_common.php | 6 +++--- i_login/findpw/checkPost.php | 10 +++++----- i_login/findpw/sendCodePost.php | 14 +++++++------- i_login/findpw/verifyCodePost.php | 10 +++++----- i_login/join/Frame.php | 2 +- i_login/join/Get.php | 6 +++--- i_login/join/Post.php | 12 ++++++------ i_login/join/_common.php | 6 +++--- i_login/join/checkPost.php | 10 +++++----- i_login/join/sendCodePost.php | 14 +++++++------- i_login/join/verifyCodePost.php | 10 +++++----- i_login/login.php | 2 +- i_other/_common.php | 6 +++--- i_other/help.php | 2 +- i_other/screenshot.php | 2 +- i_popup/Frame.php | 2 +- i_popup/_common.php | 6 +++--- install.php | 2 +- twe/d_setting/_common.php | 6 +++--- twe/install2_ok.php | 2 +- twe/install_ok.php | 2 +- twe/join.php | 2 +- twe/new_lib.php | 2 +- 77 files changed, 235 insertions(+), 232 deletions(-) diff --git a/_common.php b/_common.php index fecd45f7..da8c3bcb 100644 --- a/_common.php +++ b/_common.php @@ -2,8 +2,8 @@ if(!defined('ROOT')){ define('ROOT', '.'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/f_config/DBS.php b/f_config/DBS.php index 6f95263f..225af9d7 100644 --- a/f_config/DBS.php +++ b/f_config/DBS.php @@ -1,7 +1,7 @@ IsExist()) { diff --git a/f_config/MAIL.php b/f_config/MAIL.php index 9ababf2d..31f3bb61 100644 --- a/f_config/MAIL.php +++ b/f_config/MAIL.php @@ -1,7 +1,7 @@ IsExist()) { $MAIL = new _Mail($SETTING->MailHost(), $SETTING->MailPort(), $SETTING->MailId(), $SETTING->MailPw(), $SETTING->MailAddr()); diff --git a/f_config/SESSION.php b/f_config/SESSION.php index 2a50f81f..c31257b0 100644 --- a/f_config/SESSION.php +++ b/f_config/SESSION.php @@ -1,6 +1,6 @@ diff --git a/f_install/install1.php b/f_install/install1.php index 5eed4764..20331bca 100644 --- a/f_install/install1.php +++ b/f_install/install1.php @@ -1,5 +1,5 @@ diff --git a/f_install/install2Post.php b/f_install/install2Post.php index 99579b67..92a789d2 100644 --- a/f_install/install2Post.php +++ b/f_install/install2Post.php @@ -4,9 +4,9 @@ $id = $_POST['id']; $pw = $_POST['pw']; $pw = md5($pw.$pw); -require_once('_common.php'); -require_once(ROOT.W.F_FUNC.W.'class._Time.php'); -require_once(ROOT.W.F_CONFIG.W.DB.PHP); +require('_common.php'); +require(ROOT.W.F_FUNC.W.'class._Time.php'); +require(ROOT.W.F_CONFIG.W.DB.PHP); // 시스템정보 1개 등록 $DB->InsertArray('SYSTEM', array( diff --git a/f_retrival/_common.php b/f_retrival/_common.php index 9ed1eefa..96d7af6e 100644 --- a/f_retrival/_common.php +++ b/f_retrival/_common.php @@ -2,9 +2,9 @@ if(!defined('ROOT')){ define('ROOT', '.'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/i_entrance/Frame.php b/i_entrance/Frame.php index 106f7193..4a80fa1e 100644 --- a/i_entrance/Frame.php +++ b/i_entrance/Frame.php @@ -1,7 +1,7 @@ Select('NOTICE', 'SYSTEM', "NO='1'"); $system = $DB->Get($rs); diff --git a/i_entrance/_common.php b/i_entrance/_common.php index f57670c9..9df83991 100644 --- a/i_entrance/_common.php +++ b/i_entrance/_common.php @@ -3,9 +3,9 @@ if(!defined('ROOT')){ define('ROOT', '..'); } -require_once(ROOT.'/f_config/config.php'); -require_once(ROOT.W.F_CONFIG.W.APP.PHP); -require_once(ROOT.W.F_FUNC.W.FUNC.PHP); +require(ROOT.'/f_config/config.php'); +require(ROOT.W.F_CONFIG.W.APP.PHP); +require(ROOT.W.F_FUNC.W.FUNC.PHP); CustomHeader(); diff --git a/i_entrance/adminInc.php b/i_entrance/adminInc.php index 9fb243e1..6492a9c8 100644 --- a/i_entrance/adminInc.php +++ b/i_entrance/adminInc.php @@ -1,7 +1,7 @@ diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index b0249781..584c1510 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -5,11 +5,12 @@ // $_POST['server'] : 서버 인덱스 // $_POST['select'] : 0: 폐쇄, 1: 리셋, 2: 오픈 -require_once('_common.php'); -require_once(ROOT.W.E_LIB.W.'util.php'); -require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); -require_once(ROOT.W.F_CONFIG.W.DB.PHP); -require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); +require('_common.php'); +require(ROOT.W.E_LIB.W.'util.php'); +require(ROOT.W.E_LIB.W.'util.php'); +require(ROOT.W.F_FUNC.W.'class._JSON.php'); +require(ROOT.W.F_CONFIG.W.DB.PHP); +require(ROOT.W.F_CONFIG.W.SESSION.PHP); function escapeIPv4($ip){ return str_replace('.', '\\.', $ip); diff --git a/i_entrance/donation/Frame.php b/i_entrance/donation/Frame.php index f7d5a032..c2bcae56 100644 --- a/i_entrance/donation/Frame.php +++ b/i_entrance/donation/Frame.php @@ -1,5 +1,5 @@ "; } @@ -53,4 +53,5 @@ case "락풀기": break; } -echo ""; +//echo ""; +echo '_119.php';//TODO:replace diff --git a/che_close/_admin1.php b/che/_admin1.php similarity index 98% rename from che_close/_admin1.php rename to che/_admin1.php index c36a2f8a..ae57c86f 100644 --- a/che_close/_admin1.php +++ b/che/_admin1.php @@ -9,7 +9,7 @@ $query = "select userlevel from general where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me['userlevel'] < 5) { +if($me[userlevel] < 5) { echo " @@ -43,7 +43,7 @@ $admin = getAdmin($connect);
- + @@ -55,7 +55,7 @@ $admin = getAdmin($connect); - + diff --git a/che_close/_admin1_submit.php b/che/_admin1_submit.php similarity index 99% rename from che_close/_admin1_submit.php rename to che/_admin1_submit.php index c48f3ffd..1e0f67c0 100644 --- a/che_close/_admin1_submit.php +++ b/che/_admin1_submit.php @@ -175,4 +175,6 @@ switch($btn) { break; } -echo ""; +//echo ""; +echo '_admin1.php';//TODO:replace + diff --git a/che_close/_admin2.php b/che/_admin2.php similarity index 100% rename from che_close/_admin2.php rename to che/_admin2.php diff --git a/che_close/_admin2_submit.php b/che/_admin2_submit.php similarity index 99% rename from che_close/_admin2_submit.php rename to che/_admin2_submit.php index c08fe206..37c04f3f 100644 --- a/che_close/_admin2_submit.php +++ b/che/_admin2_submit.php @@ -427,5 +427,6 @@ switch($btn) { break; } -echo ""; +//echo ""; +echo '_admin2.php';//TODO:replace diff --git a/che_close/_admin3.php b/che/_admin3.php similarity index 100% rename from che_close/_admin3.php rename to che/_admin3.php diff --git a/che_close/_admin3_submit.php b/che/_admin3_submit.php similarity index 98% rename from che_close/_admin3_submit.php rename to che/_admin3_submit.php index 119d7548..10a09171 100644 --- a/che_close/_admin3_submit.php +++ b/che/_admin3_submit.php @@ -129,4 +129,6 @@ switch($btn) { break; } -echo ""; +//echo ""; +echo '_admin3.php';//TODO:replace + diff --git a/che_close/_admin4.php b/che/_admin4.php similarity index 100% rename from che_close/_admin4.php rename to che/_admin4.php diff --git a/che_close/_admin4_submit.php b/che/_admin4_submit.php similarity index 97% rename from che_close/_admin4_submit.php rename to che/_admin4_submit.php index bea27171..b9cd07b5 100644 --- a/che_close/_admin4_submit.php +++ b/che/_admin4_submit.php @@ -102,4 +102,6 @@ switch($btn) { break; } -echo ""; +//echo ""; +echo '_admin4.php'; //TODO:replace + diff --git a/che_close/_admin5.php b/che/_admin5.php similarity index 100% rename from che_close/_admin5.php rename to che/_admin5.php diff --git a/che_close/_admin5_submit.php b/che/_admin5_submit.php similarity index 89% rename from che_close/_admin5_submit.php rename to che/_admin5_submit.php index 6aa1ea8d..129ad500 100644 --- a/che_close/_admin5_submit.php +++ b/che/_admin5_submit.php @@ -25,4 +25,7 @@ switch($btn) { break; } -echo ""; +//echo ""; +echo '_admin5.php';//TODO:replace + + diff --git a/che_close/_admin6.php b/che/_admin6.php similarity index 100% rename from che_close/_admin6.php rename to che/_admin6.php diff --git a/che_close/_admin7.php b/che/_admin7.php similarity index 100% rename from che_close/_admin7.php rename to che/_admin7.php diff --git a/che_close/_admin8.php b/che/_admin8.php similarity index 100% rename from che_close/_admin8.php rename to che/_admin8.php diff --git a/che_close/_simul.php b/che/_simul.php similarity index 100% rename from che_close/_simul.php rename to che/_simul.php diff --git a/che_close/a_bestGeneral.php b/che/a_bestGeneral.php similarity index 100% rename from che_close/a_bestGeneral.php rename to che/a_bestGeneral.php diff --git a/che_close/a_emperior.php b/che/a_emperior.php similarity index 100% rename from che_close/a_emperior.php rename to che/a_emperior.php diff --git a/che_close/a_emperior2.php b/che/a_emperior2.php similarity index 100% rename from che_close/a_emperior2.php rename to che/a_emperior2.php diff --git a/che_close/a_genList.php b/che/a_genList.php similarity index 100% rename from che_close/a_genList.php rename to che/a_genList.php diff --git a/che_close/a_hallOfFame.php b/che/a_hallOfFame.php similarity index 100% rename from che_close/a_hallOfFame.php rename to che/a_hallOfFame.php diff --git a/che_close/a_history.php b/che/a_history.php similarity index 100% rename from che_close/a_history.php rename to che/a_history.php diff --git a/che_close/a_kingdomList.php b/che/a_kingdomList.php similarity index 100% rename from che_close/a_kingdomList.php rename to che/a_kingdomList.php diff --git a/che_close/a_npcList.php b/che/a_npcList.php similarity index 100% rename from che_close/a_npcList.php rename to che/a_npcList.php diff --git a/che_close/a_status.php b/che/a_status.php similarity index 100% rename from che_close/a_status.php rename to che/a_status.php diff --git a/che_close/a_traffic.php b/che/a_traffic.php similarity index 99% rename from che_close/a_traffic.php rename to che/a_traffic.php index 1f12bb51..ac80e299 100644 --- a/che_close/a_traffic.php +++ b/che/a_traffic.php @@ -254,3 +254,4 @@ function getHexCode($hex) { case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F"; } } + diff --git a/che_close/a_vote.php b/che/a_vote.php similarity index 99% rename from che_close/a_vote.php rename to che/a_vote.php index b225b11c..9af23490 100644 --- a/che_close/a_vote.php +++ b/che/a_vote.php @@ -335,3 +335,4 @@ function getNewColor($type) { return $color; } + diff --git a/che_close/analytics.php b/che/analytics.php similarity index 100% rename from che_close/analytics.php rename to che/analytics.php diff --git a/che_close/b_auction.php b/che/b_auction.php similarity index 100% rename from che_close/b_auction.php rename to che/b_auction.php diff --git a/che_close/b_battleCenter.php b/che/b_battleCenter.php similarity index 100% rename from che_close/b_battleCenter.php rename to che/b_battleCenter.php diff --git a/che_close/b_betting.php b/che/b_betting.php similarity index 100% rename from che_close/b_betting.php rename to che/b_betting.php diff --git a/che_close/b_chiefboard.php b/che/b_chiefboard.php similarity index 100% rename from che_close/b_chiefboard.php rename to che/b_chiefboard.php diff --git a/che_close/b_chiefcenter.php b/che/b_chiefcenter.php similarity index 100% rename from che_close/b_chiefcenter.php rename to che/b_chiefcenter.php diff --git a/che_close/b_currentCity.php b/che/b_currentCity.php similarity index 100% rename from che_close/b_currentCity.php rename to che/b_currentCity.php diff --git a/che_close/b_dipcenter.php b/che/b_dipcenter.php similarity index 100% rename from che_close/b_dipcenter.php rename to che/b_dipcenter.php diff --git a/che_close/b_diplomacy.php b/che/b_diplomacy.php similarity index 100% rename from che_close/b_diplomacy.php rename to che/b_diplomacy.php diff --git a/che_close/b_genList.php b/che/b_genList.php similarity index 100% rename from che_close/b_genList.php rename to che/b_genList.php diff --git a/che_close/b_myBossInfo.php b/che/b_myBossInfo.php similarity index 100% rename from che_close/b_myBossInfo.php rename to che/b_myBossInfo.php diff --git a/che_close/b_myCityInfo.php b/che/b_myCityInfo.php similarity index 100% rename from che_close/b_myCityInfo.php rename to che/b_myCityInfo.php diff --git a/che_close/b_myGenInfo.php b/che/b_myGenInfo.php similarity index 100% rename from che_close/b_myGenInfo.php rename to che/b_myGenInfo.php diff --git a/che_close/b_myKingdomInfo.php b/che/b_myKingdomInfo.php similarity index 100% rename from che_close/b_myKingdomInfo.php rename to che/b_myKingdomInfo.php diff --git a/che_close/b_myPage.php b/che/b_myPage.php similarity index 100% rename from che_close/b_myPage.php rename to che/b_myPage.php diff --git a/che_close/b_nationboard.php b/che/b_nationboard.php similarity index 100% rename from che_close/b_nationboard.php rename to che/b_nationboard.php diff --git a/che_close/b_nationrule.php b/che/b_nationrule.php similarity index 100% rename from che_close/b_nationrule.php rename to che/b_nationrule.php diff --git a/che_close/b_tournament.php b/che/b_tournament.php similarity index 100% rename from che_close/b_tournament.php rename to che/b_tournament.php diff --git a/che_close/b_troop.php b/che/b_troop.php similarity index 100% rename from che_close/b_troop.php rename to che/b_troop.php diff --git a/che_close/c_auction.php b/che/c_auction.php similarity index 99% rename from che_close/c_auction.php rename to che/c_auction.php index 691fcd29..8fc8f1d4 100644 --- a/che_close/c_auction.php +++ b/che/c_auction.php @@ -213,3 +213,4 @@ if($btn == "판매") { } Submit("b_auction.php", $msg, $msg2); + diff --git a/che_close/c_betting.php b/che/c_betting.php similarity index 94% rename from che_close/c_betting.php rename to che/c_betting.php index 7383a23f..c2b12b04 100644 --- a/che_close/c_betting.php +++ b/che/c_betting.php @@ -38,4 +38,5 @@ for($i=0; $i < 16; $i++) { ?> - + +b_betting.php diff --git a/che_close/c_chiefboard.php b/che/c_chiefboard.php similarity index 94% rename from che_close/c_chiefboard.php rename to che/c_chiefboard.php index 2f0fa578..00e01c6b 100644 --- a/che_close/c_chiefboard.php +++ b/che/c_chiefboard.php @@ -42,8 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } } -echo ""; - +//echo ""; +echo 'b_chiefboard.php';//TODO:replace ?> diff --git a/che_close/c_dipcenter.php b/che/c_dipcenter.php similarity index 96% rename from che_close/c_dipcenter.php rename to che/c_dipcenter.php index ffafdf16..4cf79a5c 100644 --- a/che_close/c_dipcenter.php +++ b/che/c_dipcenter.php @@ -56,5 +56,7 @@ if($btn == "국가방침") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -echo ""; +//echo ""; +echo 'b_dipcenter.php';//TODO:replace + diff --git a/che_close/c_double.php b/che/c_double.php similarity index 99% rename from che_close/c_double.php rename to che/c_double.php index d15b8ce5..8a000e70 100644 --- a/che_close/c_double.php +++ b/che/c_double.php @@ -124,3 +124,4 @@ if($command == 46) { echo ""; } + diff --git a/che_close/c_msgsubmit.php b/che/c_msgsubmit.php similarity index 98% rename from che_close/c_msgsubmit.php rename to che/c_msgsubmit.php index 921e575d..2cfcd684 100644 --- a/che_close/c_msgsubmit.php +++ b/che/c_msgsubmit.php @@ -113,5 +113,6 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { fclose($fp); } -echo ""; +//echo ""; +echo 'msglist.php';//TODO:replace diff --git a/che_close/c_myBossInfo.php b/che/c_myBossInfo.php similarity index 99% rename from che_close/c_myBossInfo.php rename to che/c_myBossInfo.php index c4fa16a7..7b96765c 100644 --- a/che_close/c_myBossInfo.php +++ b/che/c_myBossInfo.php @@ -250,5 +250,7 @@ if($btn == "추방") { } } -echo ""; +//echo ""; +echo 'b_myBossInfo.php'//TODO:replace + diff --git a/che_close/c_nationboard.php b/che/c_nationboard.php similarity index 93% rename from che_close/c_nationboard.php rename to che/c_nationboard.php index 6d3544d3..78e31361 100644 --- a/che_close/c_nationboard.php +++ b/che/c_nationboard.php @@ -42,7 +42,8 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } } -echo ""; +//echo ""; +echo 'b_nationboard.php';//TODO:replace ?> diff --git a/che_close/c_nationrule.php b/che/c_nationrule.php similarity index 82% rename from che_close/c_nationrule.php rename to che/c_nationrule.php index 77aeb108..08563c1a 100644 --- a/che_close/c_nationrule.php +++ b/che/c_nationrule.php @@ -16,5 +16,6 @@ $msg = addslashes(SQ2DQ($msg)); $query = "update nation set rule='$msg' where nation='$me[nation]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -echo ""; +//echo ""; +echo 'b_nationrule.php';//TODO:replace diff --git a/che_close/c_tournament.php b/che/c_tournament.php similarity index 99% rename from che_close/c_tournament.php rename to che/c_tournament.php index 6c1fe646..666531a9 100644 --- a/che_close/c_tournament.php +++ b/che/c_tournament.php @@ -3,7 +3,6 @@ include "lib.php"; include "func.php"; - //로그인 검사 CheckLogin(); $connect = dbConn(); @@ -203,4 +202,5 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { } ?> - + +b_tournament.php diff --git a/che_close/c_troop.php b/che/c_troop.php similarity index 100% rename from che_close/c_troop.php rename to che/c_troop.php diff --git a/che_close/c_vacation.php b/che/c_vacation.php similarity index 82% rename from che_close/c_vacation.php rename to che/c_vacation.php index 4f161d1b..8101f999 100644 --- a/che_close/c_vacation.php +++ b/che/c_vacation.php @@ -14,5 +14,6 @@ $admin[killturn] *= 3; $query = "update general set killturn='$admin[killturn]' where user_id='$_SESSION[p_id]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -echo ""; +//echo ""; +echo 'b_myPage.php'; //TODO:replace diff --git a/che_close/c_vote.php b/che/c_vote.php similarity index 97% rename from che_close/c_vote.php rename to che/c_vote.php index c9e0d242..67798485 100644 --- a/che_close/c_vote.php +++ b/che/c_vote.php @@ -73,4 +73,5 @@ if($btn == "수정" && $me[userlevel] >= 5) { } ?> - + +a_vote.php diff --git a/che_close/commandlist.php b/che/commandlist.php similarity index 100% rename from che_close/commandlist.php rename to che/commandlist.php diff --git a/che_close/confirm.png b/che/confirm.png similarity index 100% rename from che_close/confirm.png rename to che/confirm.png diff --git a/che_close/d_ally.php b/che/d_ally.php similarity index 100% rename from che_close/d_ally.php rename to che/d_ally.php diff --git a/che_close/d_cancel.php b/che/d_cancel.php similarity index 100% rename from che_close/d_cancel.php rename to che/d_cancel.php diff --git a/che_close/d_cease.php b/che/d_cease.php similarity index 100% rename from che_close/d_cease.php rename to che/d_cease.php diff --git a/che_close/d_merge.php b/che/d_merge.php similarity index 100% rename from che_close/d_merge.php rename to che/d_merge.php diff --git a/che_close/d_scout.php b/che/d_scout.php similarity index 99% rename from che_close/d_scout.php rename to che/d_scout.php index e427359d..934a0503 100644 --- a/che_close/d_scout.php +++ b/che/d_scout.php @@ -159,3 +159,4 @@ pushAllLog($alllog); pushHistory($connect, $history); echo ""; + diff --git a/che_close/d_setting/.htaccess b/che/d_setting/.htaccess similarity index 100% rename from che_close/d_setting/.htaccess rename to che/d_setting/.htaccess diff --git a/che_close/d_setting/_common.php b/che/d_setting/_common.php similarity index 100% rename from che_close/d_setting/_common.php rename to che/d_setting/_common.php diff --git a/che_close/d_surrender.php b/che/d_surrender.php similarity index 99% rename from che_close/d_surrender.php rename to che/d_surrender.php index d6b37480..799f448a 100644 --- a/che_close/d_surrender.php +++ b/che/d_surrender.php @@ -124,4 +124,3 @@ pushHistory($connect, $history); echo ""; - diff --git a/che_close/data/.htaccess b/che/data/.htaccess similarity index 100% rename from che_close/data/.htaccess rename to che/data/.htaccess diff --git a/che_close/error.php b/che/error.php similarity index 100% rename from che_close/error.php rename to che/error.php diff --git a/che_close/event_1.php b/che/event_1.php similarity index 100% rename from che_close/event_1.php rename to che/event_1.php diff --git a/che_close/event_2.php b/che/event_2.php similarity index 100% rename from che_close/event_2.php rename to che/event_2.php diff --git a/che_close/event_3.php b/che/event_3.php similarity index 100% rename from che_close/event_3.php rename to che/event_3.php diff --git a/che_close/event_4.php b/che/event_4.php similarity index 100% rename from che_close/event_4.php rename to che/event_4.php diff --git a/che_close/func.php b/che/func.php similarity index 99% rename from che_close/func.php rename to che/func.php index 9281a3eb..df78a67b 100644 --- a/che_close/func.php +++ b/che/func.php @@ -80,13 +80,16 @@ function abilityPowint() { function delInDir($dir) { $handle = opendir($dir); while(false !== ($FolderOrFile = readdir($handle))) { - if($FolderOrFile != "." && $FolderOrFile != "..") { - if(is_dir("$dir/$FolderOrFile")) { - delInDir("$dir/$FolderOrFile"); - } // recursive - else { - unlink("$dir/$FolderOrFile"); - } + if($FolderOrFile == "." || $FolderOrFile == "..") { + continue; + } + + $filepath = sprintf('%s/%s', $dir, $FolderOrFile); + if(is_dir($filepath)) { + delInDir($filepath); + } // recursive + else { + @unlink($filepath); } } closedir($handle); @@ -2879,7 +2882,7 @@ function pushProcessLog($connect, $log) { function delStepLog() { $date = date('Y_m_d'); - @unlink(realpath(dirname(__FILE__))."/logs/_{$date}_steplog.txt"); + @unlink("logs/_{$date}_steplog.txt"); } function pushStepLog($log) { diff --git a/che_close/func_auction.php b/che/func_auction.php similarity index 100% rename from che_close/func_auction.php rename to che/func_auction.php diff --git a/che_close/func_history.php b/che/func_history.php similarity index 100% rename from che_close/func_history.php rename to che/func_history.php diff --git a/che_close/func_http.php b/che/func_http.php similarity index 100% rename from che_close/func_http.php rename to che/func_http.php diff --git a/che_close/func_npc.php b/che/func_npc.php similarity index 100% rename from che_close/func_npc.php rename to che/func_npc.php diff --git a/che_close/func_process.php b/che/func_process.php similarity index 99% rename from che_close/func_process.php rename to che/func_process.php index abcc8493..9e9d6a43 100644 --- a/che_close/func_process.php +++ b/che/func_process.php @@ -2395,7 +2395,7 @@ function process_32($connect, &$general) { function process_33($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - global $_basegold, $_baserice; + //global $_basegold, $_baserice; //TODO : 버그로 보여서 지웠는데, 진짜로 지워도 되는지 확인 //탈취는 0까지 무제한 $_basegold = 0; $_baserice = 0; $date = substr($general[turntime],11,5); diff --git a/che_close/func_string.php b/che/func_string.php similarity index 98% rename from che_close/func_string.php rename to che/func_string.php index c84011af..4bc7aa2a 100644 --- a/che_close/func_string.php +++ b/che/func_string.php @@ -220,7 +220,7 @@ class _String { } //중간정렬 - function Fill($str, $maxsize, $ch) { + public static function staticFill($str, $maxsize, $ch) { $size = strlen($str); $count = ($maxsize - $size) / 2; @@ -236,11 +236,11 @@ class _String { } //우측정렬 - function Fill2($str, $maxsize, $ch='0') { + public static function Fill2($str, $maxsize, $ch='0') { $size = strlen($str); $count = ($maxsize - $size); - + $string = ''; for($i=0; $i < $count; $i++) { $string = $string.$ch; } diff --git a/che_close/func_tournament.php b/che/func_tournament.php similarity index 99% rename from che_close/func_tournament.php rename to che/func_tournament.php index c18c239a..569fc988 100644 --- a/che_close/func_tournament.php +++ b/che/func_tournament.php @@ -238,12 +238,12 @@ function printFighting($tournament, $phase) { function startTournament($connect, $auto, $type) { for($i=0; $i < 8; $i++) { - @unlink(realpath(dirname(__FILE__))."/logs/fight{$i}.txt"); - @unlink(realpath(dirname(__FILE__))."/logs/fight1{$i}.txt"); - @unlink(realpath(dirname(__FILE__))."/logs/fight2{$i}.txt"); - @unlink(realpath(dirname(__FILE__))."/logs/fight3{$i}.txt"); - @unlink(realpath(dirname(__FILE__))."/logs/fight4{$i}.txt"); - @unlink(realpath(dirname(__FILE__))."/logs/fight5{$i}.txt"); + @unlink("logs/fight{$i}.txt"); + @unlink("logs/fight1{$i}.txt"); + @unlink("logs/fight2{$i}.txt"); + @unlink("logs/fight3{$i}.txt"); + @unlink("logs/fight4{$i}.txt"); + @unlink("logs/fight5{$i}.txt"); } switch($auto) { diff --git a/che_close/gen.xlsx b/che/gen.xlsx similarity index 100% rename from che_close/gen.xlsx rename to che/gen.xlsx diff --git a/che_close/genDatabase.txt b/che/genDatabase.txt similarity index 100% rename from che_close/genDatabase.txt rename to che/genDatabase.txt diff --git a/che/index.html b/che/index.html deleted file mode 100644 index 2a5d662e..00000000 --- a/che/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/che_close/index.php b/che/index.php similarity index 100% rename from che_close/index.php rename to che/index.php diff --git a/che_close/install.php b/che/install.php similarity index 97% rename from che_close/install.php rename to che/install.php index 8deff41b..43790b5c 100644 --- a/che_close/install.php +++ b/che/install.php @@ -74,7 +74,7 @@ if(!$check) { diff --git a/che_close/install1.php b/che/install1.php similarity index 100% rename from che_close/install1.php rename to che/install1.php diff --git a/che_close/install2.php b/che/install2.php similarity index 100% rename from che_close/install2.php rename to che/install2.php diff --git a/che_close/install2_ok.php b/che/install2_ok.php similarity index 93% rename from che_close/install2_ok.php rename to che/install2_ok.php index 1441a8a7..1c9a3955 100644 --- a/che_close/install2_ok.php +++ b/che/install2_ok.php @@ -1,6 +1,15 @@ location.replace('index.php');"; break; case 1: echo ""; break; @@ -320,7 +358,7 @@ switch($scenario) { case 28: echo ""; break; default: echo ""; break; } - +*/ function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def2, $wall2, $region, $path) { switch($level) { case 1: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; diff --git a/che_close/install3_ok.php b/che/install3_ok.php similarity index 81% rename from che_close/install3_ok.php rename to che/install3_ok.php index 4a5fd495..5ff3b1d3 100644 --- a/che_close/install3_ok.php +++ b/che/install3_ok.php @@ -7,4 +7,4 @@ $connect=dbConn(); LogHistory($connect, 1); //echo ""; -echo "index.php"; //TODO:replace +echo 'index.php'; //TODO:replace diff --git a/che_close/install_ok.php b/che/install_ok.php similarity index 93% rename from che_close/install_ok.php rename to che/install_ok.php index 762a170f..490d3b17 100644 --- a/che_close/install_ok.php +++ b/che/install_ok.php @@ -2,9 +2,15 @@ include "lib.php"; include "schema.php"; include "func.php"; - +require "../e_lib/util.php"; if(file_exists("d_setting/set.php")) error("이미 set.php가 생성되어 있습니다.

재설치하려면 해당 파일을 지우세요"); + +$hostname = util::array_get($_POST['hostname'], ''); +$user_id = util::array_get($_POST['user_id'], ''); +$password = util::array_get($_POST['password'], ''); +$dbname = util::array_get($_POST['dbname'], ''); + // 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사 if(isBlank($hostname)) Error("HostName을 입력하세요",""); if(isBlank($user_id)) Error("User ID 를 입력하세요",""); @@ -15,9 +21,9 @@ $connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select
Error!!!",""); -delInDir(realpath(dirname(__FILE__))."/logs"); -delInDir(realpath(dirname(__FILE__))."/data/session"); -@unlink(realpath(dirname(__FILE__))."/data/connected.php"); +delInDir("logs"); +delInDir("data/session"); +@unlink("data/connected.php"); // 관리자 테이블 삭제 if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),""); @@ -93,4 +99,4 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); -echo "install2.php"; //TODO:location.replace 살려두기 +echo ""; diff --git a/che_close/join.php b/che/join.php similarity index 99% rename from che_close/join.php rename to che/join.php index f20ba17b..6a493f29 100644 --- a/che_close/join.php +++ b/che/join.php @@ -1,7 +1,7 @@ "); echo(""); } + diff --git a/che_close/join_post.php.orig b/che/join_post.php.orig similarity index 100% rename from che_close/join_post.php.orig rename to che/join_post.php.orig diff --git a/che_close/join_token.php b/che/join_token.php similarity index 99% rename from che_close/join_token.php rename to che/join_token.php index 992b5b88..dad9d390 100644 --- a/che_close/join_token.php +++ b/che/join_token.php @@ -54,3 +54,4 @@ $response['intel'] = $abil['intel']; usleep(100*1000); echo json_encode($response); + diff --git a/che_close/jquery-1.11.0.min.js b/che/jquery-1.11.0.min.js similarity index 100% rename from che_close/jquery-1.11.0.min.js rename to che/jquery-1.11.0.min.js diff --git a/che_close/lib.php b/che/lib.php similarity index 89% rename from che_close/lib.php rename to che/lib.php index f6159ad3..c28bd14f 100644 --- a/che_close/lib.php +++ b/che/lib.php @@ -21,9 +21,9 @@ define('STEP_LOG', true); define('PROCESS_LOG', true); $_startTime = getMicroTime(); $_ver = "서비스중"; -$_version = "삼국지 모의전투 PHP v2.29.1"; -$_banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : 유기체(jwh1807@gmail.com)"; -$_helper = "도움 주신 분들 : 하후연묘재, 자소유, 모모리, 반사대선, 마킹, 뒷집할머니, 허기, 헹이, 나나, 유키, SARS"; +$_version = "삼국지 모의전투 PHP HideD v0.1"; +$_banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : 유기체(jwh1807@gmail.com), HideD(hided62@gmail.com)"; +$_helper = "도움 주신 분들"; $_develrate = 50; // 내정시 최하 민심 설정 $_upgradeLimit = 30; // 능력치 상승 경험치 $_dexLimit = 1000000; // 숙련도 제한치 @@ -76,7 +76,7 @@ session_cache_expire(60); // 60분 session_start(); //첫 등장 -if($_SESSION['p_ip'] == "") { +if(!isset($_SESSION['p_ip']) || $_SESSION['p_ip'] == "") { $_SESSION['p_ip'] = getenv("REMOTE_ADDR"); $_SESSION['p_time'] = time(); } @@ -114,25 +114,11 @@ function dbconn($table = "") { // 에러 메세지 출력 function Error($message, $url="") { global $setup, $connect, $dir, $config_dir; - $message .= '
'.var_dump(debug_backtrace()).'
'; include "error.php"; if($connect) @MYDB_close($connect); exit; } -function getPost($str){ - if(!isset($_POST[$str])){ - return ''; - } - $temp = $_POST[$str]; - $temp=str_replace(" ","",$temp); - $temp=str_replace("\n","",$temp); - $temp=strip_tags($temp); - $temp=str_replace(" ","",$temp); - $temp=str_replace(" ","",$temp); - return $temp; -} - // 게시판의 생성유무 검사 function isTable($connect, $str, $dbname='') { if(!$dbname) { @@ -181,3 +167,14 @@ function PrintElapsedTime() { $_endTime = round(getMicroTime() - $_startTime, 3); echo "
운영자메세지'>
중원정세추가 시작시간변경 현재도시훈사
최대 장수
- +
경과시간 : {$_endTime}초
"; } + +function LogText($prefix, $variable){ + $fp = fopen('logs/dbg_logs.txt', 'at'); + fwrite($fp, sprintf('%s : %s\n', $prefix, var_export($_POST, true))); + fclose($fp); +} + +LogText($_SERVER['REQUEST_URI'], $_POST); +extract($_POST, EXTR_SKIP); +//XXX: $_POST를 추출 없이 그냥 쓰는 경우가 많아서 일단 디버깅을 위해 씀!!!! 절대 production 서버에서 사용 금지! +//todo: $_POST로 제공되는 데이터를 각 페이지마다 분석할것. \ No newline at end of file diff --git a/che/license.txt b/che/license.txt new file mode 100644 index 00000000..642b3e1a --- /dev/null +++ b/che/license.txt @@ -0,0 +1 @@ +Ok Go! \ No newline at end of file diff --git a/che_close/lock.txt b/che/lock.txt similarity index 100% rename from che_close/lock.txt rename to che/lock.txt diff --git a/che_close/login_process.php b/che/login_process.php similarity index 100% rename from che_close/login_process.php rename to che/login_process.php diff --git a/che_close/logout_process.php b/che/logout_process.php similarity index 89% rename from che_close/logout_process.php rename to che/logout_process.php index ba8f1379..d892aa75 100644 --- a/che_close/logout_process.php +++ b/che/logout_process.php @@ -19,7 +19,8 @@ $conmsg = $me[conmsg]; //���Ǻ��� ���� session_destroy(); -echo ""; +//echo ""; +echo 'start.php';//TODO:replace /* diff --git a/che_close/main.php b/che/main.php similarity index 99% rename from che_close/main.php rename to che/main.php index 4e774ffa..cf243bd1 100644 --- a/che_close/main.php +++ b/che/main.php @@ -12,7 +12,7 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); //그새 사망이면 -if($me['no'] == 0) { +if($me[no] == 0) { echo "a"; echo ""; exit(0); @@ -334,5 +334,3 @@ banner(); if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); } if($me[newmsg] == 1) { MessageBox("개인 서신이 도착했습니다!"); } if($me[newvote] == 1) { $develcost = $admin[develcost]*5; MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)"); } -?> - diff --git a/che_close/map.php b/che/map.php similarity index 99% rename from che_close/map.php rename to che/map.php index af42f272..8c33acb7 100644 --- a/che_close/map.php +++ b/che/map.php @@ -432,4 +432,3 @@ function getCityLevel($region, $level) { return $str; } -?> diff --git a/che_close/map_history.php b/che/map_history.php similarity index 99% rename from che_close/map_history.php rename to che/map_history.php index 8f612467..8da98be7 100644 --- a/che_close/map_history.php +++ b/che/map_history.php @@ -31,4 +31,3 @@ $map = str_replace('<_quot_>', "'", $map); $map = str_replace('<_dquot_>', '"', $map); echo $map; -?> diff --git a/che_close/msglist.php b/che/msglist.php similarity index 100% rename from che_close/msglist.php rename to che/msglist.php diff --git a/che_close/mysql_opt.txt b/che/mysql_opt.txt similarity index 100% rename from che_close/mysql_opt.txt rename to che/mysql_opt.txt diff --git a/che_close/new_lib.php b/che/new_lib.php similarity index 65% rename from che_close/new_lib.php rename to che/new_lib.php index 8adb3031..5158468e 100644 --- a/che_close/new_lib.php +++ b/che/new_lib.php @@ -1,6 +1,6 @@ diff --git a/che_close/preprocessing.php b/che/preprocessing.php similarity index 99% rename from che_close/preprocessing.php rename to che/preprocessing.php index bcd7780b..b6e7ad95 100644 --- a/che_close/preprocessing.php +++ b/che/preprocessing.php @@ -120,5 +120,3 @@ switch($commandtype) { default: command_Other($connect, $turn, $commandtype); break; } -?> - diff --git a/che_close/proc.php b/che/proc.php similarity index 97% rename from che_close/proc.php rename to che/proc.php index d1e4003d..7d9408b6 100644 --- a/che_close/proc.php +++ b/che/proc.php @@ -5,4 +5,3 @@ include "func.php"; $connect = dbConn(); increaseRefresh($connect, "자동", 2); checkTurn($connect); -?> diff --git a/che_close/proc.sh b/che/proc.sh similarity index 100% rename from che_close/proc.sh rename to che/proc.sh diff --git a/che_close/process_war.php b/che/process_war.php similarity index 99% rename from che_close/process_war.php rename to che/process_war.php index 6fba7ba9..f6825014 100644 --- a/che_close/process_war.php +++ b/che/process_war.php @@ -1845,4 +1845,3 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { pushHistory($connect, $history); } -?> diff --git a/che_close/processing.php b/che/processing.php similarity index 99% rename from che_close/processing.php rename to che/processing.php index e5949299..49788cdd 100644 --- a/che_close/processing.php +++ b/che/processing.php @@ -3125,5 +3125,3 @@ function command_81($connect, $turn, $command) { "; ender(1); } -?> - diff --git a/che_close/queue.php b/che/queue.php similarity index 99% rename from che_close/queue.php rename to che/queue.php index 05800144..7fa94915 100644 --- a/che_close/queue.php +++ b/che/queue.php @@ -38,4 +38,3 @@ class Queue { return $value; } } -?> diff --git a/che_close/reset.php b/che/reset.php similarity index 97% rename from che_close/reset.php rename to che/reset.php index 07c170b3..98d01c04 100644 --- a/che_close/reset.php +++ b/che/reset.php @@ -67,7 +67,7 @@ if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) // 파일로 DB 정보 저장 $file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"\n") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); +@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); @fclose($file); @mkdir("data",0707); @chmod("data",0707); @@ -78,4 +78,3 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); echo ""; -?> diff --git a/che_close/scenario_1.php b/che/scenario_1.php similarity index 99% rename from che_close/scenario_1.php rename to che/scenario_1.php index d62efaf9..e39633f0 100644 --- a/che_close/scenario_1.php +++ b/che/scenario_1.php @@ -792,4 +792,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_10.php b/che/scenario_10.php similarity index 99% rename from che_close/scenario_10.php rename to che/scenario_10.php index b6ba094e..47588492 100644 --- a/che_close/scenario_10.php +++ b/che/scenario_10.php @@ -898,4 +898,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_11.php b/che/scenario_11.php similarity index 99% rename from che_close/scenario_11.php rename to che/scenario_11.php index 47ef5b88..e064095a 100644 --- a/che_close/scenario_11.php +++ b/che/scenario_11.php @@ -897,4 +897,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_12.php b/che/scenario_12.php similarity index 99% rename from che_close/scenario_12.php rename to che/scenario_12.php index 89d6ff15..73d612cc 100644 --- a/che_close/scenario_12.php +++ b/che/scenario_12.php @@ -1181,4 +1181,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_2.php b/che/scenario_2.php similarity index 99% rename from che_close/scenario_2.php rename to che/scenario_2.php index 32fc1329..8340b15b 100644 --- a/che_close/scenario_2.php +++ b/che/scenario_2.php @@ -1711,4 +1711,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_20.php b/che/scenario_20.php similarity index 99% rename from che_close/scenario_20.php rename to che/scenario_20.php index d23ac02d..a4ae577f 100644 --- a/che_close/scenario_20.php +++ b/che/scenario_20.php @@ -746,4 +746,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_21.php b/che/scenario_21.php similarity index 99% rename from che_close/scenario_21.php rename to che/scenario_21.php index 117867cb..6dd317b0 100644 --- a/che_close/scenario_21.php +++ b/che/scenario_21.php @@ -774,4 +774,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_22.php b/che/scenario_22.php similarity index 99% rename from che_close/scenario_22.php rename to che/scenario_22.php index 0243103b..5176501c 100644 --- a/che_close/scenario_22.php +++ b/che/scenario_22.php @@ -194,4 +194,3 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p } } -?> diff --git a/che_close/scenario_23.php b/che/scenario_23.php similarity index 99% rename from che_close/scenario_23.php rename to che/scenario_23.php index b4804c15..dee04c1c 100644 --- a/che_close/scenario_23.php +++ b/che/scenario_23.php @@ -750,4 +750,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_24.php b/che/scenario_24.php similarity index 99% rename from che_close/scenario_24.php rename to che/scenario_24.php index 5053015c..8fb46725 100644 --- a/che_close/scenario_24.php +++ b/che/scenario_24.php @@ -325,4 +325,3 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ ) or Error(__LINE__.MYDB_error($connect),""); } -?> diff --git a/che_close/scenario_25.php b/che/scenario_25.php similarity index 99% rename from che_close/scenario_25.php rename to che/scenario_25.php index 88ac73e7..906f1525 100644 --- a/che_close/scenario_25.php +++ b/che/scenario_25.php @@ -316,4 +316,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_26.php b/che/scenario_26.php similarity index 99% rename from che_close/scenario_26.php rename to che/scenario_26.php index 271f7876..4f32a294 100644 --- a/che_close/scenario_26.php +++ b/che/scenario_26.php @@ -313,4 +313,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_27.php b/che/scenario_27.php similarity index 99% rename from che_close/scenario_27.php rename to che/scenario_27.php index 4e66d967..46082d2b 100644 --- a/che_close/scenario_27.php +++ b/che/scenario_27.php @@ -591,4 +591,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_28.php b/che/scenario_28.php similarity index 99% rename from che_close/scenario_28.php rename to che/scenario_28.php index 9ceca2d3..f233c2bd 100644 --- a/che_close/scenario_28.php +++ b/che/scenario_28.php @@ -420,4 +420,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_3.php b/che/scenario_3.php similarity index 99% rename from che_close/scenario_3.php rename to che/scenario_3.php index a8c77239..34380b1f 100644 --- a/che_close/scenario_3.php +++ b/che/scenario_3.php @@ -1752,4 +1752,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_4.php b/che/scenario_4.php similarity index 99% rename from che_close/scenario_4.php rename to che/scenario_4.php index 8658a05c..ffc45ada 100644 --- a/che_close/scenario_4.php +++ b/che/scenario_4.php @@ -1289,4 +1289,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_5.php b/che/scenario_5.php similarity index 99% rename from che_close/scenario_5.php rename to che/scenario_5.php index 450bfc4c..c621480b 100644 --- a/che_close/scenario_5.php +++ b/che/scenario_5.php @@ -995,4 +995,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_6.php b/che/scenario_6.php similarity index 99% rename from che_close/scenario_6.php rename to che/scenario_6.php index a4d83d3f..f697a60f 100644 --- a/che_close/scenario_6.php +++ b/che/scenario_6.php @@ -1041,4 +1041,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_7.php b/che/scenario_7.php similarity index 99% rename from che_close/scenario_7.php rename to che/scenario_7.php index c56de9aa..8cc61f2d 100644 --- a/che_close/scenario_7.php +++ b/che/scenario_7.php @@ -1093,4 +1093,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_8.php b/che/scenario_8.php similarity index 99% rename from che_close/scenario_8.php rename to che/scenario_8.php index b02d6e0d..6529ca47 100644 --- a/che_close/scenario_8.php +++ b/che/scenario_8.php @@ -945,4 +945,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/scenario_9.php b/che/scenario_9.php similarity index 99% rename from che_close/scenario_9.php rename to che/scenario_9.php index 5e49bddc..ba703829 100644 --- a/che_close/scenario_9.php +++ b/che/scenario_9.php @@ -869,4 +869,3 @@ pushHistory($connect, $history); echo ""; -?> diff --git a/che_close/schema.php b/che/schema.php similarity index 99% rename from che_close/schema.php rename to che/schema.php index 9479dc2a..96f018c7 100644 --- a/che_close/schema.php +++ b/che/schema.php @@ -23,7 +23,7 @@ $general_schema = " logcnt int(6) default 1, refcnt int(6) default 1, picture char(32) not null, imgsvr int(1) default 0, name char(32) not null, - name2 char(32) not null, + name2 char(32) NULL DEFAULT NULL, nation int(6) default 0, nations char(64) default ',0,', city int(6) default 0, @@ -617,5 +617,3 @@ $history_schema = " "; -?> - diff --git a/che_close/schema.sql.orig b/che/schema.sql.orig similarity index 99% rename from che_close/schema.sql.orig rename to che/schema.sql.orig index 1654fc77..fa3318af 100644 --- a/che_close/schema.sql.orig +++ b/che/schema.sql.orig @@ -617,5 +617,3 @@ $history_schema = " "; -?> - diff --git a/che_close/select_npc.php b/che/select_npc.php similarity index 100% rename from che_close/select_npc.php rename to che/select_npc.php diff --git a/che_close/select_npc_post.php b/che/select_npc_post.php similarity index 99% rename from che_close/select_npc_post.php rename to che/select_npc_post.php index 9de8fccc..ebe9997c 100644 --- a/che_close/select_npc_post.php +++ b/che/select_npc_post.php @@ -124,4 +124,3 @@ if($admin[npcmode] != 1) { echo(""); } -?> diff --git a/che_close/selection.php b/che/selection.php similarity index 100% rename from che_close/selection.php rename to che/selection.php diff --git a/che_close/start.php b/che/start.php similarity index 100% rename from che_close/start.php rename to che/start.php diff --git a/che_close/stylesheet.php b/che/stylesheet.php similarity index 100% rename from che_close/stylesheet.php rename to che/stylesheet.php diff --git a/che_close/logs/.htaccess b/che/templates/.htaccess similarity index 100% rename from che_close/logs/.htaccess rename to che/templates/.htaccess diff --git a/che_close/turn.php b/che/turn.php similarity index 99% rename from che_close/turn.php rename to che/turn.php index 8b475519..f7373898 100644 --- a/che_close/turn.php +++ b/che/turn.php @@ -85,6 +85,3 @@ case 2: } echo ""; - -?> - diff --git a/che_close/turn_pop_core.php b/che/turn_pop_core.php similarity index 98% rename from che_close/turn_pop_core.php rename to che/turn_pop_core.php index d40de774..4198b506 100644 --- a/che_close/turn_pop_core.php +++ b/che/turn_pop_core.php @@ -12,6 +12,3 @@ $me = MYDB_fetch_array($result); updateCommand($connect, $me[no], 2); echo ""; - -?> - diff --git a/che_close/turn_push_core.php b/che/turn_push_core.php similarity index 98% rename from che_close/turn_push_core.php rename to che/turn_push_core.php index b680cd17..740ae1a7 100644 --- a/che_close/turn_push_core.php +++ b/che/turn_push_core.php @@ -13,5 +13,3 @@ backupdateCommand($connect, $me[no], 2); echo ""; -?> - diff --git a/che_close/config.php b/che_close/config.php deleted file mode 100644 index c60c8bb5..00000000 --- a/che_close/config.php +++ /dev/null @@ -1,6 +0,0 @@ -<|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 누렁: | 재야 |2016-01-14 22:16:39|오늘은 어디냐!!|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:18:13|오늘은 긔엽긔|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 진리: | 블소 |2016-01-14 22:19:46|유닉이다 무장이다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:19:51|지력보정도 받았다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 누렁: | 재야 |2016-01-14 22:20:32|그리고 재난이다.|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 카토: | 하루카 |2016-01-14 22:20:32|저는 왜 템을 못 받을까요|330000|330000|default.jpg|0 -1| 비월: | 블소 |2016-01-14 22:20:37|기술연구하십쇼...ㅌㅌ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-14 22:21:15|지력 23임|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:21:19|무장끼리 설전 ㄱㄱ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-14 22:21:24|개높음...ㄷㄷ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 누렁: | 재야 |2016-01-14 22:21:30|183년 1월 초 도시에 역병이 발생하였습니다.|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 진리: | 블소 |2016-01-14 22:22:05|누렁국가에 재난을|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:22:12|선물합니다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: | 재야 |2016-01-14 22:22:18|●무력이 1 떨어졌습니다!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-14 22:22:21|받으시겠습니까(Y/Y)|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:22:34|자동수락.. 5초전|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 누렁: | 재야 |2016-01-14 22:22:50|재난신의 총애를 받은 제가 재난을 끌고 임관합니닷! 40분남았다!|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 진리: | 블소 |2016-01-14 22:22:56|강제 재난탄광행|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:23:05|그리고 같은 국가였다고 한다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:23:09|(?)|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 누렁: | 재야 |2016-01-14 22:23:18|멸망 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 비월: | 블소 |2016-01-14 22:23:22|우리나라 재난 일어날때마다 진리님 몰수합니다..ㅌㅌ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 쥬비아: | 재야 |2016-01-14 22:23:27|진리님 이시다|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-14 22:23:41|군주가 부덕한 탓이니 군주를 몰수하고 지옥가겠습니다!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:24:02|안녕하세요 처음보는 닉이지만|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-14 22:24:05|원래 재난은 군주가 부덕한 탓인데 진리님 있는 나라는 예외임...|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-14 22:24:17|놉!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: | 재야 |2016-01-14 22:25:40|오랜만에 뵙네요. 대공황때 뵙고 ..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-14 22:26:15|헐... 대공황 때라니|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:27:14|재난의 박동!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: | 재야 |2016-01-14 22:27:16|사실 그이전에도 계셨는데.. 전메엔 글안쓰시던 ㅠㅠ 바쁘셨나봐요|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-14 22:27:34|저번기랑 이번기만 하고 또 5분아오지행일듯|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-14 22:27:45|할 시간이 음따 ㅠㅠ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 다이스: | 블소 |2016-01-14 22:34:44|무한 환약이 내 손에!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 비월: | 블소 |2016-01-14 22:35:00|우리 이제 진리님이 재난떨구고 우리 다 다치고 다이스님이 다 치료해줌 ㄱㅇㄷ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 다이스: | 블소 |2016-01-14 22:36:17|무한 환약은 나만 치료해줌|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-14 22:36:44|후새드...|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 카토: | 하루카 |2016-01-14 22:37:55|전콘 어떻게 달아요?|330000|330000|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-14 22:38:07|그럼 매 분기마다 초에 재난 가도록 하죠|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:38:46|뉴비 코스프레.. 전콘이라는 단어를 아는거에서 부터 뉴비가 아니라는게 탄로|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: | 하루카 |2016-01-14 22:39:39|아니 계정에서 전콘다는게 있는데 안 올라가지는데..|330000|330000|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-14 22:40:02|10kb 미만으로 된 jpg만 가능합니다 ㅎㅎ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 북오더: |우승후보넥센|2016-01-14 22:40:21|부관님 건국말 축하드려요|A0522D|A0522D|pic_3876.jpg?=20151103|1 -1| 비월: | 블소 |2016-01-14 22:40:36|박일아님껀gif아님?|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:40:52|7말이라고 섭섭해하고 계세요.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: | 하루카 |2016-01-14 22:40:53|답변 감사합니다.|330000|330000|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-14 22:41:11|후훗 이것도 jpg입니다 일종의 속임수죠(?)|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 비월: | 블소 |2016-01-14 22:42:07|영자님 저분 버그쓰는데요!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 북오더: |우승후보넥센|2016-01-14 22:42:13|부관님 맘먹고하시나보다..|A0522D|A0522D|pic_3876.jpg?=20151103|1 -1| 부관: | 긔엽긔 |2016-01-14 22:42:49|감사합니다. 북오더님.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:43:02|어찌됫든 10kb 미만입니다 이것도 ㅋㅋㅋㅋ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:43:19|아흑... 무뚝뚝한척 하는 부관 너무 귀여워....|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 갸오오: |사랑꾼들|2016-01-14 22:44:07|움짤.gif ㅡ> 움짤.jpg ㅡ> 업로드|800000|800000|pic_3128.jpg?=20160114|1 -1| 북오더: |우승후보넥센|2016-01-14 22:44:15|고생이 많으시겠어요.. 옆에서 항상 들볶는 혜....|A0522D|A0522D|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:44:44|사랑을 드리고 있는데요?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:45:27|15템...ㄷㄷㄷㄷ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 橙: | 재야 |2016-01-14 22:48:43|퉤에엣|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1|직장인페이트:| 재야 |2016-01-14 22:52:23|...|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1|직장인페이트:| 재야 |2016-01-14 22:52:35|일때문에 삼모를 못하네 ...|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1|직장인페이트:| 재야 |2016-01-14 22:52:38|(침울|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1| 박일아: | 긔엽긔 |2016-01-14 22:53:13|토닥토닥..|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|ㄷㄱㅎㅈㄷㅀ:| 무광 |2016-01-14 22:53:58|전 14템|330000|330000|default.jpg|0 -1|일기토지배자:| 재야 |2016-01-14 22:57:57|성벽보수 하는국가 건국합니다|FFFFFF|FFFFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-14 23:00:09|ㅎㅇ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 소드락: | 소드락 |2016-01-14 23:01:20|우리나라 오면 템 받습니다|330000|330000|pic_3774.jpg?=20150723|1 -1| 누렁: | 재야 |2016-01-14 23:03:26|간다 재난을 가지고... 누렁이가 간다 !|FFFFFF|FFFFFF|pic_1288.jpg?=20151111|1 -1| 진리: | 블소 |2016-01-14 23:05:43|역시 커플지옥 솔로천국|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 다이스: | 블소 |2016-01-14 23:06:03|재난의 주사위가 돌아간다 !|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 누렁: |사랑꾼들|2016-01-14 23:06:20|솔로여서 행복해요~|800000|800000|pic_1288.jpg?=20151111|1 -1| 비월: | 블소 |2016-01-14 23:12:10|우리나라 무슨 랜임템 미치도록 잘드시네|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| ㅇωㅇ: | 긔엽긔 |2016-01-14 23:15:28|똥나무 점검한다|FFC0CB|FFC0CB|default.jpg|0 -1| 무광: |접속잘안함|2016-01-14 23:21:40|노템이긔...|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 비월: | 블소 |2016-01-14 23:22:19|5명 랜임해서 3명이 템드심 ㅌㅌ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 무광: |접속잘안함|2016-01-14 23:22:59|국명값하러가야디|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 쥬비아: | 소드락 |2016-01-14 23:30:46|템 안받았는데요 . .소님 . .|330000|330000|pic_3901.jpg?=20151210|1 -1| 갸오오: |사랑꾼들|2016-01-14 23:33:56|커플지옥 솔로천국!|800000|800000|pic_3128.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-14 23:38:03|소님이 대신 드셨네요|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 다이스: | 블소 |2016-01-14 23:47:53|솔로천국인데 사랑꾼들 이라니 공명의 함정이다!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 진리: | 블소 |2016-01-14 23:48:48|재난으로 멸망시키러 간거임|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|바닥을탁치고:| 재야 |2016-01-14 23:50:06|탁탁탁!|FFFFFF|FFFFFF|pic_3856.jpg?=20160113|1 -1| 갸오오: |사랑꾼들|2016-01-14 23:52:09|사랑에 성공따윈 없어!!!!!!!!|800000|800000|pic_3128.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-15 00:27:54|탁탁탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 소드락: |어엿븐소드락|2016-01-15 00:38:41|나라가 8갴ㅋㅋㅋ|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 박희수: |우승후보넥센|2016-01-15 00:38:48|군주놈 핵노답|00FFFF|00FFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-15 00:42:57|이거 땅따는 다 할 수 있으려나...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|북두칠성:| 긔엽긔 |2016-01-15 00:47:29|하루카 KAITO 무광 소드락 비월 최태원 갸오오 박희수 魯堂首 북두칠성|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 00:47:46|우헤헤헤헤 명성 10위이당|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 00:47:56|아이좋아 쭈욱 계속 있어랑|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 쥬비아: |어엿븐소드락|2016-01-15 00:56:24|●12월:선정을 실패하여 민심이 1 상승했습니다. 00:12|F5F5DC|F5F5DC|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-15 00:58:53|턴까지 공개하다니|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-15 01:04:02|전콘 드디어 올렸다..|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1| 橙: |우승후보넥센|2016-01-15 01:19:55|퉤에엣|00FFFF|00FFFF|pic_3446.jpg?=20160114|1 -1| 쥬비아: |어엿븐소드락|2016-01-15 01:36:59|12월이라 12분 ..|F5F5DC|F5F5DC|pic_3901.jpg?=20151210|1 -1| 쥬비아: |어엿븐소드락|2016-01-15 01:37:07|라임인데 .....|F5F5DC|F5F5DC|pic_3901.jpg?=20151210|1 -1| 하연주: |어엿븐소드락|2016-01-15 02:18:53|그렇게 건국해도 템 안나오더니, 귀찮아서 랜임하니까 나오네|F5F5DC|F5F5DC|pic_23.jpg?=20160114|1 -1|일기토지배자:|일기토지배자|2016-01-15 03:04:13|방랑군 탈취해야지..|330000|330000|default.jpg|0 -1| SARS: | 재야 |2016-01-15 03:51:20|이왕 이리된거 건국템이나 노려야겠다|FFFFFF|FFFFFF|pic_3797.jpg?=20160108|1 -1| SARS: | 재야 |2016-01-15 03:52:00|초반에 빨리 망할나라 하나 새웁니다 (진짜 빨리 망할거에요, 통솔작만 할거!)|FFFFFF|FFFFFF|pic_3797.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-15 08:04:59|오두미도 ㄱ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 장임: | 재야 |2016-01-15 08:08:42|거병해도 2명이 안되서 건국못할거같다|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| SARS: | SARS |2016-01-15 08:27:14|오두미도 하고싶은데 아무도 안왘ㅋㅋㅋ|330000|330000|pic_3797.jpg?=20160108|1 -1| 갸오오: |사랑꾼들|2016-01-15 08:30:41|장임님 건국 당첨.|800000|800000|pic_3128.jpg?=20160114|1 -1| ㅇωㅇ: | 긔엽긔 |2016-01-15 08:43:52|>ω<|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: | 장임 |2016-01-15 08:59:48|오예|330000|330000|pic_2746.jpg?=20151004|1 -1| 장임: | 장임 |2016-01-15 08:59:59|건국템도 당첨돼랏|330000|330000|pic_2746.jpg?=20151004|1 -1| 갸오오: |사랑꾼들|2016-01-15 09:15:27|사스님도 당첨.|800000|800000|pic_3128.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-15 09:16:40|는 이강주 과실주|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 소드락: |어엿븐소드락|2016-01-15 09:24:48|누가 하내에 건국좀 해주실분|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 니콜: | 블소 |2016-01-15 10:22:19|박희수님 철벽국 열전좀....|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| SARS: |30하고망함|2016-01-15 10:27:00|아 나 템좀 주라고 ㅁㄴㅇㄹ|A0522D|A0522D|pic_3797.jpg?=20160108|1 -1| 카토: |종횡무진|2016-01-15 10:33:01|템은 건국이랑 랜덤임관만 줘요?|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1| 플젠: | 긔엽긔 |2016-01-15 10:35:26|시간지나면서 랜덤으로 득템하기도 하는데 랜임 건국보단 확률이 적죠|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1| 플젠: | 긔엽긔 |2016-01-15 10:35:39|애초에 저 2개도 나올확률이 없으니|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1|바닥을탁치고:|보컬로이드|2016-01-15 10:36:07|아뇨 내정하다보면 랜덤으로 희박하게 주긴해요|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:42:53|랜임|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:42:53|랜임|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:42:53|랜임|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:42:53|랜임|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:42:53|랜임|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:43:10|뭐야이게 도배 죄송합니다|800000|800000|pic_3128.jpg?=20160114|1 -1| 청기사: |사랑꾼들|2016-01-15 10:58:56|잠깐 와봤는데.. 군주님이 이상하다....|800000|800000|pic_2496.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 10:59:53|아뇨 이게 쓰다가 지우려고 버튼 연타 했는데 그게 이동 버튼 이였어요..|800000|800000|pic_3128.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-15 11:02:37|출병하다 성벽에서 유니크를 발견하기도 하고... 뭐 그렇습니다|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-15 11:02:57|모든 것은 주사위의 뜻으로|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 11:03:34|렌임탬 정말 처음떳어요 전.. 체섭에서는.|FFFFFF|FFFFFF|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 11:03:43|처음에서 대박.|FFFFFF|FFFFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-15 11:19:43|갸오오|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 다이스: | 블소 |2016-01-15 11:28:09|갸갸갸 갸갸갸 갸오가이거~ 갸갸갸 갸갸갸 갸오가이거~|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 장임: | 장임 |2016-01-15 11:31:11|아 ㅡㅡ 사스님땜에 건국 2턴간 삽났네... 남해건국이라니|330000|330000|pic_2746.jpg?=20151004|1 -1| 박일아: | 긔엽긔 |2016-01-15 11:32:17|빈땅 많은데..왜 다 여기로 오지...ㅠㅠ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:| 재야 |2016-01-15 11:37:21|긔엽긔 임관하고 싶긔...|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 재야 |2016-01-15 11:40:16|자리가 없긔.. 랜임해야겠긔|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 11:40:56|이번기는 195년 에서 196년쯤에 끝날거같다는 생각이. ㅋㅋ|FFFFFF|FFFFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-15 11:47:00|절대적 1강세력이 없어서, 그렇게 빨리는 안될거같은데...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 소드락: |어엿븐소드락|2016-01-15 12:04:51|10인 채우면 거의 최후의 2국 보장인거 같은데|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 12:08:15|하긴 장수가 적으니|FFFFFF|FFFFFF|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 12:08:25|지난기의 7/10...|FFFFFF|FFFFFF|default.jpg|0 -1|잠둥이션:|일기토지배자|2016-01-15 12:24:47|헐|330000|330000|pic_3944.jpg?=20151116|1 -1|잠둥이션:|일기토지배자|2016-01-15 12:24:52|갠메 지금 확인...|330000|330000|pic_3944.jpg?=20151116|1 -1|잠둥이션:|일기토지배자|2016-01-15 12:24:56|하야하면 어떻게 되나요?|330000|330000|pic_3944.jpg?=20151116|1 -1|북두칠성:| 긔엽긔 |2016-01-15 12:36:01|하야하면응 얼마동안 임관 못해용 아마 12턴~~|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 12:36:11|멍때려야해욤~!~|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 橙: |우승후보넥센|2016-01-15 13:11:22|퉤에엣|00FFFF|00FFFF|pic_3446.jpg?=20160114|1 -1| 무광: |접속잘안함|2016-01-15 13:33:24|몇년 원하시나요~|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 무광: |접속잘안함|2016-01-15 13:33:52|좋은 방사다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 최태원: |우승후보넥센|2016-01-15 13:35:39|저년 원합닏|00FFFF|00FFFF|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-15 13:42:48|75명!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박일아: | 긔엽긔 |2016-01-15 13:43:55|네이년 원합니다|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:|일기토지배자|2016-01-15 13:52:56|●1월:초반제한중 하야는 불가능합니다|330000|330000|pic_3944.jpg?=20151116|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:07:31|한년만 있었으면 좋겠네용 많이는 안 바랄게용|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:08:51|옙 좋은 전략인거 같아요 인원수가 우선 많으니 밀어붙이면 될 듯해용|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:09:07|ㅡ.ㅡ 방사|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:09:26|무슨 전략인지는 모르겠지? ㅠ.ㅠ 젠장|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 플젠: | 긔엽긔 |2016-01-15 14:10:52|방사왕들|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:10:58|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:10:59|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:00|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:00|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:00|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:01|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:01|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:01|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:01|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:01|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 14:11:02|.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 橙: |우승후보넥센|2016-01-15 14:13:16|뭔 점이 이렇게 많아|00FFFF|00FFFF|pic_3446.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:17:18|하루카 소드락 대악마 청기사 무광 고긔가먹고싶 하연주 북두칠성 KAITO 최태원|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:17:29|우와왕 명성 10위였는뎅 8위로 올랐당|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:17:35|쭈욱 올라랑|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-15 14:17:47|근데 어떻게하면 명성이 오르는 거쥐 ㅡ.ㅡ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 다이스: | 블소 |2016-01-15 14:29:31|내정 하세요|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 14:29:50|성공 하세요|800000|800000|pic_3128.jpg?=20160114|1 -1| 플젠: | 긔엽긔 |2016-01-15 15:16:20|내정성공시|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1| 플젠: | 긔엽긔 |2016-01-15 15:17:06|1위하고싶으면 명성이나 공헌많이오르는 성격으로 무지장을 파서 깃수끝날때까지 내정하면됨|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-15 16:11:25|출세가꿀이죠|FFC0CB|FFC0CB|default.jpg|0 -1| 비밀: | 재야 |2016-01-15 16:11:25|비밀|FFFFFF|FFFFFF|default.jpg|0 -1|미친과학:| 재야 |2016-01-15 16:16:18|어 언제 시작했지|FFFFFF|FFFFFF|pic_65.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-15 16:16:29|내가 누구냐고오? 알필요 읎다|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박일아: | 긔엽긔 |2016-01-15 16:18:13|히익|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 이쓰미: | 블소 |2016-01-15 16:21:27|훼신이잖슴|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 16:33:54|어제 저녁에 시작햇습니당|FFFFFF|FFFFFF|default.jpg|0 -1|일기토지배자:|일기토지배자|2016-01-15 17:42:29|배팅하죠|330000|330000|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 17:47:52|그러고보니 삼도에서 비월님이랑 비슷한 닉넴을 본거같은데...|FFFFFF|FFFFFF|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-15 17:53:22|80명 끝인가... 멀티 계정 2개까진 허용해도 괜찮을듯|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 비월: | 블소 |2016-01-15 17:56:26|삼도가 머예영??|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 17:59:28|삼국지 도원결의 카페.|FFFFFF|FFFFFF|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 17:59:48|다른애구나 햇갈렷.|FFFFFF|FFFFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-15 18:00:00|아... 거기 가입 안했어요 ㅎㅎ;;;|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 18:02:55|다른분 정정.|FFFFFF|FFFFFF|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-15 18:25:03|이것이 솔로의 힘!! 전력전 우승!!!|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-15 18:25:09|커플지옥 솔로천국!!!!!|800000|800000|pic_3128.jpg?=20160114|1 -1| 감정: |우승후보넥센|2016-01-15 18:26:00|...!|00FFFF|00FFFF|default.jpg|0 -1|잠둥이션:|무력단련소|2016-01-15 19:05:00|하야하고 싶다. 방법 좀|FF6347|FF6347|pic_3944.jpg?=20151116|1 -1| 박일아: | 긔엽긔 |2016-01-15 19:05:38|왜 전부 이쪽이지...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 19:10:21|군주에게 추방요청을..|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:|무력단련소|2016-01-15 19:14:07|누렁이 부럽다..|FF6347|FF6347|pic_3944.jpg?=20151116|1 -1| 카토: |종횡무진|2016-01-15 19:19:09|눈 깜빡이는거 어떻게 만들어요?|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1| 박일아: | 긔엽긔 |2016-01-15 19:22:35|업로드 하실때, ←↓→← + A 누르시면 됩니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 하루카: |종횡무진|2016-01-15 19:22:39|눈 말고 귀는 안 못 움직여요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-15 19:22:46|아니 못..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-15 19:22:59|키보드가 이상해..자꾸 백스페ㅣ스가 씹혀..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-15 19:25:04|아 옛날에 할 때랑 다르게 적응 안되네|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1|하기싫은데:| 긔엽긔 |2016-01-15 19:40:08|카토 카이토 온몸이그뉵 진공손찬|FFC0CB|FFC0CB|default.jpg|0 -1|하기싫은데:| 긔엽긔 |2016-01-15 19:41:24|Cato|FFC0CB|FFC0CB|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-15 19:41:46|전메가 핑쿠핑쿠|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 갸오오: |사랑꾼들|2016-01-15 19:42:42|사랑의 핑크핑크.. 핑크가 국메천통하는 걸 두고 볼순 없다!|800000|800000|pic_3128.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-15 19:45:23|사랑의 아름다움을 모르는 당신이 불쌍해|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|하기싫은데:| 긔엽긔 |2016-01-15 19:46:34|불끈 자유연맹 야식반|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-15 19:47:50|저는 그저 순수하게 낭만을 꿈꾸는 사랑의 문제아 입니다..|800000|800000|pic_3128.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-15 19:54:37|어디서 아재의 냄새가...킁킁|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|페르시아:|종횡무진|2016-01-15 19:54:53|군주 멍탱이..|FFC0CB|FFC0CB|pic_2002.jpg?=20160114|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-15 20:06:47|그만좀불러소환수야|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-15 20:07:01|/차단 소환수|FFC0CB|FFC0CB|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-15 20:16:35|otl|FFFFFF|FFFFFF|default.jpg|0 -1| 橙: |우승후보넥센|2016-01-15 20:40:40|나라가 죽었다..|00FFFF|00FFFF|pic_3446.jpg?=20160114|1 -1| 감정: |우승후보넥센|2016-01-15 20:43:04|쥬금|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-15 20:43:23|같이 전메를 이색으로 도배하는것은어떠오|00FFFF|00FFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-15 20:46:39|방해|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 누렁: |사랑꾼들|2016-01-15 20:47:22|누렁이가 사륜거를 탔다!|800000|800000|pic_1288.jpg?=20151111|1 -1| 박일아: | 긔엽긔 |2016-01-15 20:49:52|부럽긔..|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:|무력단련소|2016-01-15 20:50:02|하지만 누렁이는 그래도 바보다!|FF6347|FF6347|pic_3944.jpg?=20151116|1 -1| 누렁: |사랑꾼들|2016-01-15 20:53:21|하하하하하하하하 하등한 너굴곰같으니라고!|800000|800000|pic_1288.jpg?=20151111|1 -1| 비밀: |무력단련소|2016-01-15 21:39:34|이 모든건 비밀입니다|FF6347|FF6347|default.jpg|0 -1|일기토지배자:|무력단련소|2016-01-15 21:48:16|전력전도 지배하는 일기토지배자|FF6347|FF6347|default.jpg|0 -1| 이쓰미: | 블소 |2016-01-15 21:48:45|히익 바보 누렁!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|일기토지배자:|무력단련소|2016-01-15 21:49:14|무력단련소인데 지장만 3분오셨다|FF6347|FF6347|default.jpg|0 -1| 다이스: | 블소 |2016-01-15 22:00:09|배고픈 사람이 길을 가다 음식을 주우면?|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-15 22:02:47|푸드득?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-15 22:03:12|이건 배고픈거랑 상관없는데|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 다이스: | 블소 |2016-01-15 22:03:54|먹습니다|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-15 22:13:23|..와아|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 박일아: | 긔엽긔 |2016-01-15 22:59:32|전메가 얼었습니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: |종횡무진|2016-01-15 23:01:06|몇 시간 동안 눈 깜빡이는 이미지 만들었는데 안 올려지고.. 퀄리티도 낮고 슬픕니다ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1| 박일아: | 긔엽긔 |2016-01-15 23:06:46|10kb 미만으로 만드신 후에, gif 확장자를 jpg로 바꾸세요.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: |종횡무진|2016-01-15 23:09:43|해봤는데 1일 1회만 된다네요. 어제 12시 넘어서 올려서 그런가... 좀 있다 다시 해봐야겠네요. 답변 감사해요.|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1|바닥을탁치고:|보컬로이드|2016-01-15 23:31:28|http://www.gifreducer.com 이거쓰면 색감 살짝 낮아지고 5kb정도 줄일수있어요 ㅎㅎ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 갸오오: |사랑꾼들|2016-01-15 23:32:19|꿀팁 감사합니다|800000|800000|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-15 23:38:38|정보 감사합니다ㅎㅎ|FFC0CB|FFC0CB|pic_4007.jpg?=20160115|1 -1| 카토: |종횡무진|2016-01-16 00:11:11|헤헷 올렸다|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 카토: |종횡무진|2016-01-16 00:11:31|너무 빨리 감네 ㅋㅋㅋ|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|직장인페이트:|어엿븐소드락|2016-01-16 03:08:12|...|F5F5DC|F5F5DC|pic_93.jpg?=20150120|1 -1| 아소: | 블소 |2016-01-16 03:23:46|와 페이트님이다|FF0000|FF0000|default.jpg|0 -1|직장인페이트:|어엿븐소드락|2016-01-16 03:35:53|어머 ... 아소아이코님 ... ?|F5F5DC|F5F5DC|pic_93.jpg?=20150120|1 -1| 정휘인: |보컬로이드|2016-01-16 04:22:26|훼제님 바보|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-16 04:23:58|네시 바보|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|하기싫은데:| 긔엽긔 |2016-01-16 05:05:30|저분보면 자꾸 마작치던 페이트떠오름|FFC0CB|FFC0CB|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-16 07:48:41|매번 느끼지만 돚거국은 쌀은 풍족한데 금이 모자란다... 탈취를 해도 초반에 얻는건 쌀... 배부른 돚거... 이게 현실인가?!|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 다이스: | 블소 |2016-01-16 09:18:45|소님 컴컴|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-16 10:01:55|다음엔 다이소를 해볼까|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 샤그니: | 재야 |2016-01-16 10:13:42|서버열린지도 모르고있었네|FFFFFF|FFFFFF|pic_1014.jpg?=20151230|1 -1| 소드락: |어엿븐소드락|2016-01-16 11:27:47|블소국이 낙양이랑 업 먹고 선포 안했으면 좋겠다|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1|바닥을탁치고:|보컬로이드|2016-01-16 12:04:21|탁!탁!탁!!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 다이스: | 블소 |2016-01-16 12:06:52|블소는 블랙소의 줄임말?|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-16 12:11:59|이제 땅 먹을 시간이에요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 소드락: |어엿븐소드락|2016-01-16 12:13:44|블레이드 앤 소울의 줄임말 입니다.|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 이쓰미: | 블소 |2016-01-16 12:15:34|블랙 소 줄임말 입니다|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|제갈여포:|보컬로이드|2016-01-16 12:20:02|배팅을 혼자했네......ㅠ.ㅠ|AFEEEE|AFEEEE|pic_79.jpg?=20140609|1 -1|제갈여포:|보컬로이드|2016-01-16 12:21:14|음... .체섭에서 인탐 할줄이야...|AFEEEE|AFEEEE|pic_79.jpg?=20140609|1 -1| 다이스: | 블소 |2016-01-16 13:03:24|소들의 낙원 소낙원을 만들어보고 싶다!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 플젠: | 긔엽긔 |2016-01-16 13:22:06|블레이드 소울의 줄인말로 아는데|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1| 카토: |종횡무진|2016-01-16 13:22:36|어..? 블소원샷 아니였어요? ...|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 갸오오: |사랑꾼들|2016-01-16 13:22:41|불소 오타난겁니다|800000|800000|pic_3128.jpg?=20160114|1 -1|일본어번역기:|종횡무진|2016-01-16 13:22:59|여러분 선택임관도 템 준답니다|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-16 13:23:53|저건 우연히 턴진행한거랑 임관턴이랑 맞아서 득템한거 아닌가요|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-16 13:24:10|부럽다 ㅂㄷㅂㄷ|800000|800000|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-16 13:24:39|유니크는 팔면 얼마줘요?|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|일본어번역기:|종횡무진|2016-01-16 13:25:05|왜이리 진지하시져..|FFC0CB|FFC0CB|default.jpg|0 -1|일본어번역기:|종횡무진|2016-01-16 13:25:13|돈안줘양|FFC0CB|FFC0CB|default.jpg|0 -1| 진리: | 블소 |2016-01-16 13:25:53|100원줌|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-16 13:26:32|유니크인데 얼마 안주네..|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|일본어번역기:|종횡무진|2016-01-16 13:30:03|빰빰|FFC0CB|FFC0CB|default.jpg|0 -1|일본어번역기:|종횡무진|2016-01-16 13:30:05|빠라밤|FFC0CB|FFC0CB|default.jpg|0 -1|일본어번역기:|종횡무진|2016-01-16 13:30:11|빰빰|FFC0CB|FFC0CB|default.jpg|0 -1| 카토: |종횡무진|2016-01-16 13:34:09|분쟁으로 뺏겼네|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 감정: |우승후보넥센|2016-01-16 13:45:03|충차는 충차충차해|00FFFF|00FFFF|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-16 13:48:48|이번기가 마지막이려나...|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| 박희수: |우승후보넥센|2016-01-16 13:55:06|이번기 재미있어보이넹........ 도토리 키재기 싸움|00FFFF|00FFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-16 13:56:29|도토리끼리 키재면 누가 더 커요?|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: |우승후보넥센|2016-01-16 13:57:37|더큰 도토리요|00FFFF|00FFFF|default.jpg|0 -1| 이쓰미: | 블소 |2016-01-16 14:26:12|더큰 도토리가 아니라 키큰 도토리입니다! 진지!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 소드락: |어엿븐소드락|2016-01-16 14:32:57|둘다 벌레 먹은거라 무의미|F5F5DC|F5F5DC|pic_3774.jpg?=20150723|1 -1| くま: |보컬로이드|2016-01-16 15:24:51|똑똑한 개로군.|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 박일아: | 긔엽긔 |2016-01-16 15:27:21|국가가 너무 부족하당..|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 플젠: | 긔엽긔 |2016-01-16 15:58:04|동물농장이네|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1|고긔가먹고싶:|보컬로이드|2016-01-16 16:06:18|고긔가 먹고싶|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-01-16 16:07:58|고긔가먹고싶:긔엽긔|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 갸오오: |사랑꾼들|2016-01-16 16:20:33|..|800000|800000|pic_3128.jpg?=20160114|1 -1| 쿠요: |우승후보넥센|2016-01-16 16:39:11|흐흐 ...|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 감정: |우승후보넥센|2016-01-16 17:39:19|아국에 피장파장이 발동되었습니다.|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-16 17:39:27|ㅇㅅㅇ!|00FFFF|00FFFF|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-16 17:39:59|ㅇㅅㅇ!|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-16 17:41:20|컴초해서 아얄다시깔아야되는뎅... 다시깔기 귀찮당...|00FFFF|00FFFF|default.jpg|0 -1| 하루카: |종횡무진|2016-01-16 18:44:38|irc가 살아있나요? 작년 말부터 안들어가지던데..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 박일아: | 긔엽긔 |2016-01-16 18:45:12|http://www.62che.com/bbs/bbs/board.php?bo_table=0free&wr_id=35023&sca=&sfl=wr_subject&stx=irc&sop=a|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 하루카: |종횡무진|2016-01-16 18:47:22|아..한아얄 들어가지는구나 루나틱만 갔었는데|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-16 18:54:18|^^ 얘 죽었다는데..|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|고긔가먹고싶:|보컬로이드|2016-01-16 21:12:15|고긔가먹고싶:긔엽긔|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|바닥을탁치고:|보컬로이드|2016-01-16 21:52:24|아 응팔...|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 갸오오: |사랑꾼들|2016-01-16 21:56:01|어차피 남편은..|800000|800000|pic_3128.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-16 22:07:38|김주혁!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| ⓜ손습: | 막겜 |2016-01-16 22:16:56|날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만.|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-16 22:17:51|응팔을 보진 않았지만 박보검은 참 멋있네요|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 감정: |우승후보넥센|2016-01-16 22:29:06|전력전 우승했어욧 ㅇㅅㅇ|00FFFF|00FFFF|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-16 22:29:22|ㅊㅋㅊㅋ|00FFFF|00FFFF|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-16 22:29:32|세금을 장수한테서 데어가야겠다..|00FFFF|00FFFF|default.jpg|0 -1| 정휘인: |보컬로이드|2016-01-16 22:45:30|준우승 2번 콩라인 탑슨|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-16 22:45:40|아 그리고 앵벌스 죽어라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 橙: |우승후보넥센|2016-01-16 23:56:32|퉤에엣|00FFFF|00FFFF|pic_3446.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-17 01:43:25|아, 디바님 턴 전에 칼 날아가나요.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-17 01:43:38|으응 방사네|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 갸오오: |사랑꾼들|2016-01-17 03:50:48|새벽까지 버티는 이 능력.. 솔로만의 특권이다!!|800000|800000|pic_3128.jpg?=20160114|1 -1| 청기사: |사랑꾼들|2016-01-17 05:28:18|네|800000|800000|pic_2496.jpg?=20160114|1 -1| 정휘인: |보컬로이드|2016-01-17 06:27:00|3콩 완성|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|일기토지배자:|사랑꾼들|2016-01-17 13:01:56|일기토를 지배했다|800000|800000|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-17 13:17:27|답없당...|00FFFF|00FFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-17 13:18:14|혼돈이야 혼돈이야|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 감정: |우승후보넥센|2016-01-17 13:24:47|롤이나 하러가야곘어요,,,|00FFFF|00FFFF|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-17 14:23:20|으음|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 최태원: |우승후보넥센|2016-01-17 14:31:46|뭐지 출병하고 템이라니|00FFFF|00FFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-17 14:32:53|+7이지만 살 수 있는 템보다는 높으니 기분 좋네요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 진리: | 블소 |2016-01-17 14:33:02|상대에게 뜯어냄|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 최태원: |우승후보넥센|2016-01-17 14:33:55|우리 쿠요님 유닉 없는데 ...|00FFFF|00FFFF|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-17 14:37:41|군주가 부덕한탓|00FFFF|00FFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-17 14:38:50|장수의 부덕을 군주 탓으로 돌리면 안되요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: |우승후보넥센|2016-01-17 14:39:59|누가봐도 군주 잘못|00FFFF|00FFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-17 14:40:58|카토님 말에 동......동의합니다........?!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 최태원: |우승후보넥센|2016-01-17 14:41:31|이국 군주 사실 박희수랩니다|00FFFF|00FFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-17 14:41:51|심지어 바지 군주이셨어..!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: |우승후보넥센|2016-01-17 14:42:49|쟨 부려먹어야 제맛 꺄르르르르륵|00FFFF|00FFFF|default.jpg|0 -1| 최태원: |우승후보넥센|2016-01-17 14:50:06|아니오 전 회장입니다 노는 회장|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-17 14:53:17|충차한테 노자준다...|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-17 14:53:48|지장할껄 ㅠㅠ...|00FFFF|00FFFF|default.jpg|0 -1| 쿠요: |우승후보넥센|2016-01-17 15:06:55|저는 아니된다 !|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-17 15:09:12|저는 저 주세요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-17 15:09:14|..죄송합니다|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|일본어번역기:|종횡무진|2016-01-17 15:12:16|번역번역행|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-17 15:13:27|으..... 드립 수준 우리 군주 수준 ㅠㅠㅠ|00FFFF|00FFFF|default.jpg|0 -1| 최태원: |우승후보넥센|2016-01-17 15:15:16|야 나도 저런건 안해|00FFFF|00FFFF|default.jpg|0 -1| 박희수: |우승후보넥센|2016-01-17 15:17:04|저게 좀더 나은거 같은뎅|00FFFF|00FFFF|default.jpg|0 -1|강서유서:|종횡무진|2016-01-17 15:17:27|이런 저출산 시대에 저런 드립을...|FFC0CB|FFC0CB|default.jpg|0 -1| 카토: |종횡무진|2016-01-17 15:19:53|정말 다들 저질이네요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 다이스: | 블소 |2016-01-17 15:39:25|저는 아무것도 보지 못했습니다!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-17 15:50:29|궁금하닷~,~ 늦게 들어왔엉 ㅠㅠ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 샤그니: | 재야 |2016-01-17 17:00:05|얍|FFFFFF|FFFFFF|default.jpg|0 -1| ⓜ사량: | 막겜 |2016-01-17 18:10:02|날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만.|FFFFFF|FFFFFF|default.jpg|0 -1| 북오더: |우승후보넥센|2016-01-17 18:47:56|샤그니님 재야되셨네..|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 狂三: | 재야 |2016-01-17 19:03:45|흐응...|FFFFFF|FFFFFF|pic_2353.jpg?=20150204|1 -1| 장임: | 막겜 |2016-01-17 19:27:38|제발 임관좀... 세명 중 한명은 삭이고 한명은 올턴내정...|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 장임: | 막겜 |2016-01-17 19:27:52|건국은 고통이로다|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 니쉬: |접속잘안함|2016-01-17 19:28:39|눈물... 또르르|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-17 19:30:25|제가 임관하고 싶을 정도로 안타깝네요 ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 장임: | 막겜 |2016-01-17 19:33:35|적토마라도 뜨면 위안이 되련만|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 장임: | 막겜 |2016-01-17 19:34:20|의병놈들은 왜 기연 안하죠|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 갸오오: |사랑꾼들|2016-01-17 19:35:46|어 책이다|800000|800000|pic_3128.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-17 19:48:23|탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|미이잉구경용:| 재야 |2016-01-17 19:48:46|100명째다|FFFFFF|FFFFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-17 19:58:04|음?? 책??|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|고긔가먹고싶:|보컬로이드|2016-01-17 20:01:43|장임이 짱임|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 카토: |종횡무진|2016-01-17 20:31:43|우와 많이 이겼어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| ⓜ미조: | 막겜 |2016-01-17 21:13:19|날 버리다니... 곧 전장에서 복수해주겠다...|FFFFFF|FFFFFF|default.jpg|0 -1| 장임: | 막겜 |2016-01-17 21:13:49|아시발 한명늘어서 좋아했는데 의병이 데려온 지력59짜리 무지장이네 ㅡ?|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 장임: | 막겜 |2016-01-17 21:13:56|아시발 한명늘어서 좋아했는데 의병이 데려온 지력59짜리 무지장이네 ㅡㅡ?|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 다이스: | 블소 |2016-01-17 21:30:10|중요해서 두번|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-17 22:21:42|재난의 상태가?|800000|800000|pic_3128.jpg?=20160114|1 -1| 비월: | 블소 |2016-01-17 22:40:51|우리나라는 재난진리님의 가호를 받아 다 피해갔습니다.....크.....|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-17 22:45:42|..저희는 수도에 2연 재난이에요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 감정: |우승후보넥센|2016-01-17 22:53:59|성벽의 상태가...? 어...? 어...?|00FFFF|00FFFF|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-17 22:56:54|서량아 아프지마..|800000|800000|pic_3128.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-17 23:00:06|자동아 아프지마..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 감정: |우승후보넥센|2016-01-17 23:06:32|서량아 나오지마... 집에 들어가있어 훠이훠이....|00FFFF|00FFFF|default.jpg|0 -1| 샤그니: | 재야 |2016-01-17 23:11:54|부릅|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 샤그니: | 재야 |2016-01-17 23:12:33|최근 기수들이 상태가 영 좋지않았더니 유저수도 영 좋지않네|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 샤그니: | 재야 |2016-01-17 23:17:24|재야에 홍보도 별로 없고|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 박일아: | 긔엽긔 |2016-01-17 23:18:02|저희를 도와주세요...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 다이스: | 블소 |2016-01-17 23:18:30|이리와서 펜대를 굴려주세요|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-17 23:19:40|저희국 오시면 펜대 안굴려주셔도 됩니다. 제가 다 만들어욥.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 샤그니: | 재야 |2016-01-17 23:27:39|부관바라기|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 다이스: | 블소 |2016-01-17 23:33:24|모든것은 다이스의 뜻대로.. 랜임! 하세요 ㅌㅌㅌ|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 소드락: |어엿븐소드락|2016-01-17 23:59:11|막 시작했을땐 건국하면 되게 재밌을거 같은데 막상 건국하면 왜 아무것도 하기 싫을까요?|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 청기사: |사랑꾼들|2016-01-18 00:00:33|제가 아는 사람도 그랬죠|800000|800000|pic_2496.jpg?=20160114|1 -1| 샤그니: | 긔엽긔 |2016-01-18 00:06:32|부관님은 어디에 있는가|FFC0CB|FFC0CB|pic_1014.jpg?=20160117|1 -1| 샤그니: | 긔엽긔 |2016-01-18 00:06:41|어서 나타나지 않으면 하야할이|FFC0CB|FFC0CB|pic_1014.jpg?=20160117|1 -1| 샤그니: | 긔엽긔 |2016-01-18 00:06:44|어서 나타나지 않으면 하야하리라|FFC0CB|FFC0CB|pic_1014.jpg?=20160117|1 -1| 북오더: |우승후보넥센|2016-01-18 00:12:54|긔엽긔에 부관없으면 팥없는 단팥소보로!|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:14:18|애초에 부관님이 없었으면 건국도 안했습니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 북오더: |우승후보넥센|2016-01-18 00:15:54|없으니까 국가 파토내시죠!|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 북오더: |우승후보넥센|2016-01-18 00:16:11|진짜 그쪽국채 잠입합니다?!|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:16:58|진짜로 있는데요....?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:17:32|<부관_> 뿌우~ @ ω@)/ ★ 전 매일매일 부관님의 애교를 들으며 지내고있습니다. 행복합니다....|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 00:18:54|<박일아> 뿌우~ @ ω@)/ ★ 저도 매일 군주님의 애교를 들으며 지내고있습니다. 행복합니다.♡|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 부관: | 긔엽긔 |2016-01-18 00:19:15|부관접속. 부관 그런 말 안했습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:20:20|귀여워 부관 핥짝♡|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 북오더: |우승후보넥센|2016-01-18 00:20:30|실제로 잠입하고 5초만에 킥당했다 합니다..|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:21:00|<북오더-> !킥 북오더- (부관님의 귀여움에 스스로 폭파되셨다고 한다)|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-18 00:21:10|부관 핥으시면 안됩니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:22:04|초 카와이이이이이이|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 00:22:37|부관 너구리 안을 수 있는가?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:22:57|부관은 제껍니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 00:23:12|부관, 너구리 살쪄서 통통하다.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 부관: | 긔엽긔 |2016-01-18 00:23:18|부관은 누구의 소유도 아닙니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 부관: | 긔엽긔 |2016-01-18 00:23:39|움직이십시오 잠둥이션님.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 00:24:06|너구리 안아 달라.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 갸오오: |사랑꾼들|2016-01-18 00:24:48|핑크하게 두지 않겠다.|800000|800000|pic_3128.jpg?=20160114|1 -1| 부관: | 긔엽긔 |2016-01-18 00:26:09|부관. 팔이 없습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 북오더: |우승후보넥센|2016-01-18 00:26:09|부관 핥짝.|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 부관: | 긔엽긔 |2016-01-18 00:26:19|부관을 핥으시면 안됩니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 00:26:24|부관 핥짝.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 북오더: |우승후보넥센|2016-01-18 00:27:54|부관 하앍하앍.|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 부관: | 긔엽긔 |2016-01-18 00:29:52|부관. 핥으시면 안됩니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-18 00:32:24|서량에 들어갔어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 갸오오: |사랑꾼들|2016-01-18 00:32:30|클린한 삼모|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-18 00:32:31|클린한 삼모|800000|800000|pic_3128.jpg?=20160114|1 -1| 갸오오: |사랑꾼들|2016-01-18 00:32:32|클린한 삼모|800000|800000|pic_3128.jpg?=20160114|1 -1| 북오더: |우승후보넥센|2016-01-18 00:32:45|혜리 핥짝.?|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 갸오오: |사랑꾼들|2016-01-18 00:32:52|안돼ㅣㅣㅣㅣㅣ|800000|800000|pic_3128.jpg?=20160114|1 -1| 쿠요: |우승후보넥센|2016-01-18 00:34:33|햝햝...|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 박일아: | 긔엽긔 |2016-01-18 00:34:48|전 부관님꺼라서 맘대로 핥으시면 안되는데요|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박희수: |우승후보넥센|2016-01-18 00:36:40|잘가요 서량찡|00FFFF|00FFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-18 00:38:22|서량 벌판을 달립니다!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: |우승후보넥센|2016-01-18 00:38:33|이게다 군주놈이 부덕한탓 꺄르르르르륵|00FFFF|00FFFF|default.jpg|0 -1| 쿠요: |우승후보넥센|2016-01-18 00:39:19|잘가요 서량 ㅠㅠ|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 쿠요: |우승후보넥센|2016-01-18 00:39:34|서량땅에서 중장기병하나 못몰아보고 이렇게 가다니...|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 장임: | 막겜 |2016-01-18 01:04:44|곧 따라가리다|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 하루카: |종횡무진|2016-01-18 01:17:18|겨울인데, 온수로 틀어주세요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 물파스: |종횡무진|2016-01-18 01:19:46|파스파스|FFC0CB|FFC0CB|default.jpg|0 -1| 카토: |종횡무진|2016-01-18 01:30:22|카토는 싸우고 싶어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|바닥을탁치고:|보컬로이드|2016-01-18 01:54:51|탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 카토: |종횡무진|2016-01-18 03:19:05|배고파요 ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 북오더: |우승후보넥센|2016-01-18 03:22:47|하루카 이분.. 감흥같은데..|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 하루카: |종횡무진|2016-01-18 03:37:23|..? 하루카는 다른 사람이 되고 싶지 않은데..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 북오더: |우승후보넥센|2016-01-18 03:49:55|그렇군요 ㅠㅠ 여튼 종횡무진에 감흥이 있을거같은 느낌이 드는군요.|00FFFF|00FFFF|pic_3876.jpg?=20151103|1 -1| 狂三: | 블소 |2016-01-18 06:58:52|흐응...|FF0000|FF0000|pic_2353.jpg?=20150204|1 -1| 청기사: |사랑꾼들|2016-01-18 07:57:04|날씨가...|800000|800000|pic_2496.jpg?=20160114|1 -1| 정휘인: |보컬로이드|2016-01-18 08:02:42|월요일엔 앵벌스 연애충 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 갸오오: |사랑꾼들|2016-01-18 08:08:58|미세먼지 작렬에 먹구름!|800000|800000|pic_3128.jpg?=20160114|1 -1| 감정: |우승후보넥센|2016-01-18 08:10:58|성벽이보고싶다요.... 사람만치는 정란장이되고있엉....|00FFFF|00FFFF|default.jpg|0 -1| 하루카: |종횡무진|2016-01-18 08:16:41|전 밝은 하늘이 보고싶어요..비가 오는 하루는 싫어..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-18 08:17:26|사람치면서 A-찍으면 사람 패고 다님|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-18 08:17:37|교통사고!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 감정: |우승후보넥센|2016-01-18 08:18:40|아 서량 병력사라지면바로출병해야겟네|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-18 08:18:56|는하루카님 모훈사 ㅈㅈ...|00FFFF|00FFFF|default.jpg|0 -1| 감정: |우승후보넥센|2016-01-18 08:19:17|하루카님 저리가세욧!|00FFFF|00FFFF|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-18 08:26:25|평민킬러님 너무 강려크.. 닉언일치..|800000|800000|pic_3128.jpg?=20160114|1 -1| 대악마: |종횡무진|2016-01-18 08:40:38|그아아앗|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-18 09:29:28|전 돌아갈 곳이 없어요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|일본어번역기:|종횡무진|2016-01-18 09:57:18|번역 할거다 빼애애애애애엑|FFC0CB|FFC0CB|default.jpg|0 -1| 청기사: |사랑꾼들|2016-01-18 09:58:09|날씨 끔찍하다...|800000|800000|pic_2496.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-18 10:00:55|카토는 피곤해요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|ⓖ의병장11:| 블소 |2016-01-18 11:50:34|사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요...|FF0000|FF0000|default.jpg|0 -1| 쿠요: |우승후보넥센|2016-01-18 12:03:10|강은 안된다 이놈들아 !|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-18 12:10:55|하루카는 죽을거같아..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-18 12:11:24|군주가 죽으면 안돼!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 정휘인: |보컬로이드|2016-01-18 12:11:36|아쎄|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-18 12:11:59|맘맘맘마~무우우우~|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 박희수: |우승후보넥센|2016-01-18 12:12:43|한방남았땅 고통에서 해방좀|00FFFF|00FFFF|default.jpg|0 -1| 갸오오: |사랑꾼들|2016-01-18 12:14:25|ㅠㅠ|800000|800000|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-18 12:15:21|흑..그럼 병사를 뽑지 말아요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: |우승후보넥센|2016-01-18 12:15:51|32분에 마무리되나|00FFFF|00FFFF|default.jpg|0 -1| 하루카: |종횡무진|2016-01-18 12:17:05|23분의 그분이 아무것도 하지 않기를..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 박희수: |우승후보넥센|2016-01-18 12:17:27|그분 일어났따가 다시 잠드신듯 멍청이놈|00FFFF|00FFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-18 12:19:07|귀가 간지러워 귀신같이 일어나셧다고 합니다.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박희수: |우승후보넥센|2016-01-18 12:19:59|그럴리가 없습니당|00FFFF|00FFFF|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-18 12:25:39|탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 쥬비아: |어엿븐소드락|2016-01-18 12:26:51|타악!|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 비월: | 블소 |2016-01-18 12:27:35|층간소음 개소름.....|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 쿠요: |우승후보넥센|2016-01-18 12:29:13|망명장 주실분 !!|00FFFF|00FFFF|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-18 12:32:08|넥센분들 수고하셨습니다..하루카는 이제 잠들어도 될까요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-18 12:32:13|고생하셧습니다~~~~~ 블소국은 언제나 열려있습니다...|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박희수: | 재야 |2016-01-18 12:34:19|음 어디가지|FFFFFF|FFFFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-18 12:35:56|넥센분들 고생 많으셨습니다 !|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: |종횡무진|2016-01-18 12:37:42|우승후보였던 넥센분들 수고했어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 쿠요: | 재야 |2016-01-18 12:40:15|꺼이꺼이|FFFFFF|FFFFFF|pic_2457.jpg?=20150615|1 -1| 쿠요: | 재야 |2016-01-18 12:40:28|망명장도 안날아왔어,,,|FFFFFF|FFFFFF|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-18 12:43:00|죄송해요..하루카는 무능력해서 쿠요님을 품을 수 없어요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-18 12:44:24|무능해 군주 무능해!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 쿠요: | 재야 |2016-01-18 12:47:45|멍하게 있다가 턴을 날렸지만 선착순으로 날아가야..|FFFFFF|FFFFFF|pic_2457.jpg?=20150615|1 -1| 희지재: | 긔엽긔 |2016-01-18 12:48:05|망명장... 뿌려야될까요?|FFC0CB|FFC0CB|pic_2802.jpg?=20150908|1 -1| 박희수: | 재야 |2016-01-18 12:48:28|박희수가 kbo 최괴 좌완이라니 ㅠㅠ 아무리 그래도 양심이......|FFFFFF|FFFFFF|default.jpg|0 -1| 희지재: | 긔엽긔 |2016-01-18 12:48:31|안좋은 기억이 ...|FFC0CB|FFC0CB|pic_2802.jpg?=20150908|1 -1| 카토: |종횡무진|2016-01-18 12:49:23|야구를 안봐서 박희순인 줄 알았어요.. 박휘순이랑도 헷갈렸엉..|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박일아: | 긔엽긔 |2016-01-18 12:49:55|SK 팬입니다. 박희수 투심하나 만큼은... 그때 그 기량이 돌아온다면 현 KBO정도는 씹어먹을듯... 근데 아마 재기가 되려나요... 진심으로 부활햇으면 좋겠는데...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 니쉬: |접속잘안함|2016-01-18 12:50:20|넥센분들 수고하셨어유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박희수: | 재야 |2016-01-18 12:53:22|에이 그래도 불펜한테 최고 좌완이라고 부르긴 좀 그럼 ㅠㅠ|FFFFFF|FFFFFF|default.jpg|0 -1|잠둥이션:| 긔엽긔 |2016-01-18 13:16:18|니쉬 오랜만이다 니쉬|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 희지재: | 긔엽긔 |2016-01-18 13:39:55|박희수 김광현 대타선발로도 짱이었음!!!|FFC0CB|FFC0CB|pic_2802.jpg?=20150908|1 -1| 니쉬: |접속잘안함|2016-01-18 14:29:55|요즘은 서촉에 잘 안뵈시는 너굴님 오랜만이유~~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 갸오오: | 재야 |2016-01-18 15:31:37|사랑꾼들 여러분 못난 군주 밑에서 고생 많으셨어요|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-18 15:32:07|참사랑 실천하던 사랑꾼들 여러분 고생했어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 다이스: | 블소 |2016-01-18 15:33:00|블소에서 사랑을 전파해 보아요~|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 선비: |접속잘안함|2016-01-18 15:33:16|사랑꾼들국 장수분들 수고하셨습니다~|FFFFFF|FFFFFF|default.jpg|0 -1| 갸오오: | 재야 |2016-01-18 15:33:17|턴실행 몆초전 멸망해서 삽턴난 것도 슬프다..|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-18 15:33:27|Love & BS ~|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 갸오오: | 재야 |2016-01-18 15:35:22|재야 첫글이 아직도 있어..?|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -1| 읭읭: | 재야 |2016-01-18 15:40:13|선착순 등용장 받아양!|FFFFFF|FFFFFF|pic_3471.jpg?=20151008|1 -1| 비월: | 블소 |2016-01-18 15:41:56|사랑꾼들국 장수분들 고생하셧습니다~|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|南ことり:| 재야 |2016-01-18 15:44:33|랜임해놓고 내정이나 하렵니다.|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -1| KAITO: |보컬로이드|2016-01-18 15:45:23|사랑꾼들국 장수분들 수고하셨어요~|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1|南ことり:| 재야 |2016-01-18 15:45:42|결과는 59분에~그러고보면 59분 턴이면 집합장 같은거 하기도 좋은 턴 아닌가..?|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -1| 니쉬: |접속잘안함|2016-01-18 15:45:57|사랑꾼분들 수고하셨어유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-18 15:45:57|페이스북 재미있게 하는 방법 아시는분~|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-18 15:46:36|그러함|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 재야 |2016-01-18 15:46:38|어그로를 끌어 좋아요충이 된다?|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -1| 진리: | 블소 |2016-01-18 15:46:45|그라함!?|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 재야 |2016-01-18 15:47:20|? ㅋㅋㅋㅋㅋㅋㅋㅋㅋ|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -1| 진리: | 블소 |2016-01-18 15:49:19|건담덕후 그라함|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 장임: | 막겜 |2016-01-18 15:50:07|등갑질이나 하려고 했는데 끝내 1등급을 못찍는군|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-18 15:52:44|안타깝네요..|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| KAITO: |보컬로이드|2016-01-18 15:54:13|59분 기대!|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1|南ことり:| 재야 |2016-01-18 15:55:50|혹시나 해서 미리 말씀드리지만...절대로 내정만 합니다. 쟁 같은거 몰라요~집합 정도는 가능할지도...?|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -1| 비월: | 블소 |2016-01-18 15:56:16|환영합니다만???|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-18 15:56:23|내정장 좋아함 내정이 끝이 안나...|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|南ことり:| 재야 |2016-01-18 15:56:45|그나저나 이번 기수는 생성한지 하루만에 나라가 멸명...무슨 두산도 아니고..(....)|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -1|南ことり:| 재야 |2016-01-18 15:58:02|2분 남았당~|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -1| 장임: | 막겜 |2016-01-18 16:01:21|오 블소 당첨이네영|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 진리: | 블소 |2016-01-18 16:01:48|유닉국가 블소|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-18 16:02:18|여러분 우리국 오면 유닉부자됩니다 어서 오십시오|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-18 16:02:20|없는사람이 드물다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|南ことり:| 블소 |2016-01-18 16:02:56|진리라니..진리라니...진리라니...저 녀석을 금욜날 보는게 아니었어...orz|FF0000|FF0000|pic_3947.jpg?=20151116|1 -1|일기토지배자:| 재야 |2016-01-18 16:03:05|진리 아재국 가줘야징|FFFFFF|FFFFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-18 16:03:29|총 14명중에 7명이 유닉이네.....|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-18 16:03:34|굿잡|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-18 16:04:00|내가 이렇게 노동하고 있슴 군주놈보다 벌점 높아!!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-18 16:18:21|소환수한테 도망쳐서 여기왔더니 소환수가 임관했어...|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-18 16:18:29|/차단해제 소환수|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-18 16:52:17|ㅇㅅㅇ...|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 막겜 |2016-01-18 18:36:37|카토님 볼 때마다 막타만치시는듯|FFFF00|FFFF00|pic_3128.jpg?=20160114|1 -1| 갸오오: | 막겜 |2016-01-18 18:36:50|저거 역시 솔로신의 가호를 받아 생긴 일입니다|FFFF00|FFFF00|pic_3128.jpg?=20160114|1 -1| 갸오오: | 막겜 |2016-01-18 18:36:56|커플지옥 솔로천국!|FFFF00|FFFF00|pic_3128.jpg?=20160114|1 -1|고긔가먹고싶:|보컬로이드|2016-01-18 18:37:38|고긔가먹고싶:막겜|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 카토: |종횡무진|2016-01-18 18:38:50|마지막에 치는 건 기쁜걸!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 비월: | 블소 |2016-01-18 18:48:28|비밀님이 출병했다는걸 자꾸 내가 출병했다는걸로 잘못 읽네...|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|고긔가먹고싶:|보컬로이드|2016-01-18 18:48:58|선포할까요 ?|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-01-18 18:49:05|ㄴㄴㄴㄴ|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 장임: | 막겜 |2016-01-18 19:31:20|세 금 +27 세 곡 +25|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-18 19:33:04|27만이나 나와요..?|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박일아: | 긔엽긔 |2016-01-18 19:36:12|장사에서 장사를 하면 장사가 잘됨|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 장임: | 막겜 |2016-01-18 19:36:41|막타의 주인공은 누가 될 것인가|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-18 19:37:12|막타 전문 무등산 폭격기 카토에요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 북오더: | 긔엽긔 |2016-01-18 19:51:52|막겜의 수호신 장임!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 북오더: | 긔엽긔 |2016-01-18 19:52:07|막겜의 수호신 장임!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|일본어번역기:|종횡무진|2016-01-18 19:55:10|번역킥!|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 막겜 |2016-01-18 20:06:56|내 나이가 어때서~~|FFFF00|FFFF00|pic_3128.jpg?=20160114|1 -1| 장임: | 막겜 |2016-01-18 20:15:38|영릉에 무려 5만 대군이 있군|FFFF00|FFFF00|pic_2746.jpg?=20151004|1 -1| 갸오오: | 막겜 |2016-01-18 20:16:03|저게뭐야 세상에|FFFF00|FFFF00|pic_3128.jpg?=20160114|1 -1| 북오더: | 긔엽긔 |2016-01-18 20:22:39|●187년 8월:【선포】접속잘안함(이)가 보컬로이드에 선전 포고 하였습니다.|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 비월: | 블소 |2016-01-18 21:03:29|이번깃수 끝나고 니콜님이 블소국 정모한다는데요 오실분?|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 비월: | 블소 |2016-01-18 21:03:36|니콜님이 한턱 쏜답니다|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-18 21:07:28|전체 메시지에서 말씀하시는 건 하루카같은 다른 국 사람들도 갈 수 있는건가요..?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-18 21:07:30|막겜국 여러분 고생하셧습니다.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 비월: | 블소 |2016-01-18 21:07:45|니콜님이 금수저라 가능하실듯 합니다만?!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 니쉬: |접속잘안함|2016-01-18 21:08:29|막겜분들 고생하셨어유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-18 21:08:37|막겜국 여러분 고생 많으셨습니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 북오더: | 긔엽긔 |2016-01-18 21:09:04|수고하셨습니다.|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 최태원: | 재야 |2016-01-18 21:12:40|한혈마 먹고튐 ㅋㅋㅋㅋㅋ|FFFFFF|FFFFFF|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-18 21:12:51|나이스 스틸(?!)|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 비월: | 블소 |2016-01-18 21:12:55|ㄹㅇ 한혈마 먹튘ㅋㅋ ㄱㅇㄷ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박희수: | 재야 |2016-01-18 21:16:26|와 ㅋㅋㅋ 저놈 먹튀보소 ㅋㅋㅋ 먹자마자 나라 멸망|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-18 21:28:15|온 몸에 소름이 돋아요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 장임: | 재야 |2016-01-18 21:32:57|굿|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 장임: | 재야 |2016-01-18 21:33:50|거 두 나라 색좀 바꾸면 안되나요|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 박일아: | 긔엽긔 |2016-01-18 21:34:48|저..저희는 핑쿠핑쿠해야하는데...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 장임: | 재야 |2016-01-18 21:35:16|종횡무진이랑 핑크는 안어울림|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 장임: | 재야 |2016-01-18 21:36:00|접속잘안함 가면 등갑 뽑을 수 있으려나|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 장임: | 재야 |2016-01-18 21:36:21|이번기 목표는 칼등갑 뽑아서 숙먹튀였는데....|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 박일아: | 긔엽긔 |2016-01-18 21:36:44|저희국 오시면 등갑 뽑으실수 있습니닷!|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 하루카: |종횡무진|2016-01-18 21:40:32|하루카는 분홍색이 좋은데..국명은 다른 분이 정해주셔서..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 무광: |접속잘안함|2016-01-18 21:46:36|국명값을 하고 싶다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 니쉬: |접속잘안함|2016-01-18 21:55:03|국명 반대로 가고 있... 고통스럽습니다아~~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 무광: |접속잘안함|2016-01-18 21:56:09|남해가 따이기 전까진 등갑이 나온다 오바|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 정휘인: |보컬로이드|2016-01-18 21:57:10|앵벌수 죽어라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 감정: | 긔엽긔 |2016-01-18 21:59:59|보병이 가장좋아하는 등갑만 특수병종입니다 딴건 기본... ㅌㅌ|FFC0CB|FFC0CB|default.jpg|0 -1|일기토지배자:| 블소 |2016-01-18 22:00:54|일기토좀요 ㅠㅠ|FF0000|FF0000|default.jpg|0 -1| 橙: | 재야 |2016-01-18 22:01:37|체에에에에에에에에에엔 분양 받을분------ 퉷!!!! 이 시점으로 빨리 갠메 보내 국에게 갑니다아아아아ㅏㅏㅏㅏ|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-18 22:03:08|색깔은 빨간색과 파란색이 좋은걸요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 橙: | 재야 |2016-01-18 22:03:29|----이미 분양된 고양이입니다 ----------|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-18 22:03:54|무슨 분양이 초단위로 ㄷㄷ|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 쿠요: | 긔엽긔 |2016-01-18 22:04:18|과연 어디로 갈거신가 !|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 장임: | 재야 |2016-01-18 22:06:10|힘의 균형이 무너지는군|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 쿠요: | 긔엽긔 |2016-01-18 22:08:13|힘의 균형은 유지되어야 한다|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 무광: |접속잘안함|2016-01-18 22:09:12|도와줘!라고 말해야겠지만 얼른 망하고 싶은 심정이다 기차나|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 박희수: | 긔엽긔 |2016-01-18 22:09:13|랜임만 하는중인데 여기옴|FFC0CB|FFC0CB|default.jpg|0 -1| 橙: | 재야 |2016-01-18 22:09:30|아니 긔엽긔 천통 유력국인가요? 퉤에엣 다른곳 가야겟는데요 저거!!|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1| 감정: | 긔엽긔 |2016-01-18 22:11:36|앙대여 아마 내가먼저 갠메를 줫을꺼같은데 ㅌㅌ|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 긔엽긔 |2016-01-18 22:12:11|솔로|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-18 22:12:16|솔로!|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 소드락: |어엿븐소드락|2016-01-18 22:16:51|님들 장안 업 낙약 북평 남피가 비었습니다. 먹는 사람이 임자!|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 카토: |종횡무진|2016-01-18 22:18:24|도적이 땅을 내주다니 믿을 수 없네요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|잠둥이션:| 긔엽긔 |2016-01-18 22:19:07|그렇다면 제가 너구리특공대 4만여명을 보내서 함락시킨 뒤 너구리 왕국의 재건을 노려보겠습니다.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 橙: | 재야 |2016-01-18 22:20:02|퉤에엣|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-18 22:20:30|전부 몰고 가면 되는건가요?|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 무광: |접속잘안함|2016-01-18 22:23:03|커맨드센터 띄워서 가야겠어요|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1|북두칠성:| 긔엽긔 |2016-01-18 22:31:39|오오 그 위대한 너구리 제국의 부활을 또 다시 볼 수 있는 것인가!!!!!!!|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-18 22:32:21|장군!!!!! 제가 선봉에 서겠나이닷~+×+×+×+×+×|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 검임: | 긔엽긔 |2016-01-18 22:33:04|아 이거 캐리어가야돼요|FFC0CB|FFC0CB|pic_3890.jpg?=20160114|1 -1| 橙: | 재야 |2016-01-18 22:33:16|매우 고민되는데 큭 퉷|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -1| 감정: | 긔엽긔 |2016-01-18 22:33:51|오라오라오라오라오라|FFC0CB|FFC0CB|default.jpg|0 -1|북두칠성:| 긔엽긔 |2016-01-18 22:34:54|저 귀여운 눈망울 탐나는도다|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 소드락: |어엿븐소드락|2016-01-18 22:38:41|큰성 먹고 큰나라 되기 캠페인|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 소드락: |어엿븐소드락|2016-01-18 22:40:17|오빵~ 나 악귀병 갖고 시펑! / 그래? 오빠가 장안성 사줄게!|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 소드락: |어엿븐소드락|2016-01-18 22:40:44|장안성이 지금 사시면 40년 무이자할부로 드립니다.|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1|북두칠성:| 긔엽긔 |2016-01-18 22:44:31|얼마면 되 얼마면 되냐구 예약 해놩 내가 다 살꼬야 일시불로 사주쥥|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-18 22:46:40|지금 알았네 북 쪽 대박이네 접경지 성들만 빼고 먹었네 전쟁 안 할라궁|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 북오더: | 긔엽긔 |2016-01-18 22:47:05|나는 부관 먹었으니 그걸로 만족함 ^ㅁ^|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 감정: | 긔엽긔 |2016-01-18 23:23:14|부관님 긔엽긔|FFC0CB|FFC0CB|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-18 23:24:58|부관 카와이이|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-18 23:25:23|부관 보다 귀여우신분은 많습니다. 그리고 부관. 먹히지 않았습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-18 23:26:04|히익!? 그럼 부관이 먹는거임? 잔인해!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 샤그니: | 긔엽긔 |2016-01-18 23:26:29|부관님의 귀여움은 마치 바다와도 같지. 끝이 없어|FFC0CB|FFC0CB|pic_1014.jpg?=20160117|1 -1| 부관: | 긔엽긔 |2016-01-18 23:28:32|부관 먹지 않습니다. 그리고 샤그니님 부관 부끄럽습니다....|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 샤그니: | 긔엽긔 |2016-01-18 23:31:21|오타가 있으니 정정합니다. 바다가 아니라 초은하와 같습니다.|FFC0CB|FFC0CB|pic_1014.jpg?=20160117|1 -1| 이쓰미: | 블소 |2016-01-18 23:31:59|안먹는다니! 그럼 흡수!?|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 부관: | 긔엽긔 |2016-01-18 23:44:01|부관. 그렇게 귀엽지 않습니다. 그리고 흡수도 안합니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 검임: | 긔엽긔 |2016-01-18 23:46:05|내가 임관하면 사람이 많아지는건가 많아질 나라에 내가 임관하는건가...혼란하다 혼란해|FFC0CB|FFC0CB|pic_3890.jpg?=20160114|1 -1| 박일아: | 긔엽긔 |2016-01-18 23:47:48|검임효과?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 감정: | 긔엽긔 |2016-01-18 23:49:34|부관님 긔엽긔|FFC0CB|FFC0CB|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-18 23:52:04|삼모의 아이돌. 삼모의 아이콘. 부관이 있음으로써 삼모는 존재한다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-18 23:58:01|부관. 아이돌 아닙니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-18 23:58:25|그럼 아이돌이 부관이군요!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 플젠: | 긔엽긔 |2016-01-19 00:00:13|천잰데?|FFC0CB|FFC0CB|pic_2524.jpg?=20160115|1 -1|잠둥이션:| 긔엽긔 |2016-01-19 00:01:50|부관, 핥짝|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 긔엽긔 |2016-01-19 00:04:57|부관, 너구리는 어떻게 생각하는가?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 이쓰미: | 블소 |2016-01-19 00:10:44|라면이라고 생각할듯 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 박일아: | 긔엽긔 |2016-01-19 00:11:03|ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박희수: | 긔엽긔 |2016-01-19 00:11:36|너구리는 안먹는지도 모름|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-19 00:13:45|너구리가 맛있는데..신라면은 너무 매워요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 북오더: | 긔엽긔 |2016-01-19 00:19:11|여기와서 가장좋은게... 합법적으로 부관핥짝 할수있어요!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-19 00:22:20|부관 핥짝|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|잠둥이션:| 긔엽긔 |2016-01-19 00:23:37|부관 핥짝|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 부관: | 긔엽긔 |2016-01-19 00:27:04|.........|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 검임: | 긔엽긔 |2016-01-19 00:29:07|핥짝|FFC0CB|FFC0CB|pic_3890.jpg?=20160114|1 -1| DVa: |접속잘안함|2016-01-19 00:38:23|time to raise my apm!|FFFFFF|FFFFFF|pic_1714.jpg?=20160102|1 -1| 북오더: | 긔엽긔 |2016-01-19 00:42:31|부관 핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 쿠요: | 긔엽긔 |2016-01-19 01:17:16|햝햝//|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 갸오오: | 긔엽긔 |2016-01-19 01:43:36|새벽만 되면 감수성이 풍부해집니다.|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 장임: |접속잘안함|2016-01-19 01:43:46|의병장아 조금만 더 힘을 내!|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 갸오오: | 긔엽긔 |2016-01-19 01:44:22|마법도 쓸 수 있죠.|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 01:46:39|삼모의 최고존엄 장임님께서는 이미 대마법사가 되었답니다.|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 부관: | 긔엽긔 |2016-01-19 01:53:30|장임님의 마나가 부족합니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| SARS: | 긔엽긔 |2016-01-19 02:07:31|의병장 저새끼 죽여버리고싶다...|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1|강서유서:|종횡무진|2016-01-19 02:17:44|점점 우리 땅이 늘어나는거 같애....|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-19 02:31:35|..분명 국가 색은 상관없다고 해서 하루카가 정한건데..분홍색은 종횡무진이랑 안어울린다고 혼나요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|하기싫은데:| 긔엽긔 |2016-01-19 02:33:39|몇몇 계정새로파신분들보이는거같은데...내가생각하는 그분들 맞으면 다중계정신고할그임!|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: |접속잘안함|2016-01-19 02:36:19|전금 건 건가...|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| SARS: | 긔엽긔 |2016-01-19 02:37:40|접속국은 전금이잖아요?|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 하루카: |종횡무진|2016-01-19 02:44:47|하루카는 무장이지만, 책을 받았습니다. 마음의 양식으로..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 감정: | 긔엽긔 |2016-01-19 02:58:28|감정이도 충차지만 노자잘받았습니다 금100이 되기를 졸려...|FFC0CB|FFC0CB|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-19 02:59:19|부관 핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 부관: | 긔엽긔 |2016-01-19 03:05:02|부관 핥으시면 안됩니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 장임: |접속잘안함|2016-01-19 03:37:26|양양 디펜스!|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 橙: | 긔엽긔 |2016-01-19 06:06:52|퉤에엣|FFC0CB|FFC0CB|pic_3446.jpg?=20160114|1 -1| DVa: |접속잘안함|2016-01-19 08:20:21|체에에에엔|FFFFFF|FFFFFF|pic_1714.jpg?=20160102|1 -1| 비밀: | 긔엽긔 |2016-01-19 09:40:31|내 모든건 비밀입니다.|FFC0CB|FFC0CB|default.jpg|0 -1| 다이스: | 블소 |2016-01-19 09:53:55|힝 소가찌|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 11:05:24|의병장은 싸맞아야합니다|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 11:05:45|라고 소환수가 말해줬어요 뭔 개소린진 몰라도|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 11:06:14|나의 꿀잠을 꺠우는 소환수는 /차단 소환수|FFC0CB|FFC0CB|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-19 11:23:47|담깃수부턴 절대 건국하지말아야지..|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| くま: |보컬로이드|2016-01-19 11:33:00|엇? 박일아님이 군주였네.|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 박일아: | 긔엽긔 |2016-01-19 11:39:51|왜 건할못 건할못 하는지 알거같음. 수뇌일때랑은 스트레스 받는양이 다르군..;;|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: |종횡무진|2016-01-19 11:40:59|군주는 힘들어요! 근데 우리 군주는 안 힘든가봐요! 죽어라!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 진리: | 블소 |2016-01-19 11:53:42|수뇌로 군주짓하면 많이 받는데|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 11:53:50|결국 별 차이 없..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-19 11:54:56|진리님이 계신데 왜 거긴 재난이 없나요? 체섭에서 재난 신이라시던데!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 진리: | 블소 |2016-01-19 11:55:33|재난 많이 맞았는데|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 11:55:44|군주아니면 뭐 재난률은 괜찮음|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 11:55:54|군주가 할 짓이 아닌게 재난때문이지!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-19 11:56:13|이 나라도 군주가 부덕해서 세수가 반토막났어요 ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 진리: | 블소 |2016-01-19 11:56:29|재난으로 망한적도 있어서..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 11:56:38|내정을 10년했는데 내정이 끝이 없..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-19 12:01:54|ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 박희수: | 긔엽긔 |2016-01-19 12:13:38|저주받은 진리형|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: | 긔엽긔 |2016-01-19 12:14:03|아니면 축복을 받았는데 받은게 제난신한테서....|FFC0CB|FFC0CB|default.jpg|0 -1|하기싫은데:| 긔엽긔 |2016-01-19 12:24:24|네오?기 대공황|FFC0CB|FFC0CB|default.jpg|0 -1| 진리: | 블소 |2016-01-19 12:27:21|윽|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 소드락: |어엿븐소드락|2016-01-19 13:09:01|탈취한번 못해보고 망하는건가.....|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 박희수: | 긔엽긔 |2016-01-19 13:56:41|망구나 일침보소 ㅋㅋㅋ|FFC0CB|FFC0CB|default.jpg|0 -1|ⓖ의병장6:| 긔엽긔 |2016-01-19 14:45:55|어디 추방해가면서 잘되나 보자... 꼭 복수하겠다...|FFFFFF|FFFFFF|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-19 14:53:11|카이사르님 7회피로그 축하드립니다..|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|바닥을탁치고:|보컬로이드|2016-01-19 15:09:15|탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 소드락: |어엿븐소드락|2016-01-19 15:33:41|돚거 야캐요...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 감정: | 긔엽긔 |2016-01-19 15:35:07|충차가 귀병뽑는 신기함에 난노답이구나라고 머리에박힘|FFC0CB|FFC0CB|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-19 15:47:48|참고로 귀병 6600있는와중에 충차 300 징병하고있음... 노답|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 15:49:33|내소환수가 저렇게 노답일줄은 몰랐네|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 15:49:49|노답소환수는 ... /차단 소환수|FFC0CB|FFC0CB|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-19 16:25:22|모출출 3반복넣고 도망감|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|일기토지배자:| 블소 |2016-01-19 16:38:18|일기토좀제발 ㅠ|FF0000|FF0000|default.jpg|0 -1|북두칠성:| 긔엽긔 |2016-01-19 16:40:31|페이스북 잼 없또|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 북오더: | 긔엽긔 |2016-01-19 16:44:09|너무 뚜드러맞는다.. 5시간만 휴전합시다!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|북두칠성:| 긔엽긔 |2016-01-19 17:02:25|너무들 하냉 크흑 ㅠ,ㅠ 실제 전쟁에도 임시 휴전이 있잖앙 그만해라 많이 먹었다 아니가|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 박일아: | 긔엽긔 |2016-01-19 17:03:03|일하세요.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 북오더: | 긔엽긔 |2016-01-19 17:18:43|부관핥짝.|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 북오더: | 긔엽긔 |2016-01-19 17:19:12|부관핥짝 금지하시면 하야함. ㅋㅋ|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|바닥을탁치고:|보컬로이드|2016-01-19 17:20:04|탁!!!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|고긔가먹고싶:|보컬로이드|2016-01-19 17:44:07|강서유서님이 강서유서님인가요? 아니면 항상프로폘셜인가요?|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 찌찌맨: | 재야 |2016-01-19 17:54:17|후후후|FFFFFF|FFFFFF|pic_2603.jpg?=20150916|1 -1| 찌찌맨: | 재야 |2016-01-19 17:54:26|나는 찌찌맨이다|FFFFFF|FFFFFF|pic_2603.jpg?=20150916|1 -1| 찌찌맨: | 재야 |2016-01-19 17:54:28|모두 만져버리겠다|FFFFFF|FFFFFF|pic_2603.jpg?=20150916|1 -1| 북오더: | 긔엽긔 |2016-01-19 17:55:32|...? 안핥나요?|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 박일아: | 긔엽긔 |2016-01-19 17:58:07|강서유서님은 다른닉 쓰고있고, 강서유서닉은 다른사람임|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|강서유서:|종횡무진|2016-01-19 18:38:00|!!|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-19 18:56:11|2. 접속잘안함 ㄷㄱㅎㅈㄷㅀ 강서유서 2등. 귀찮 (설문조사에서 긁어옴 ㅌㅌ)|FFC0CB|FFC0CB|default.jpg|0 -1| 비밀: | 긔엽긔 |2016-01-19 19:02:05|내 모든건 비밀입니다|FFC0CB|FFC0CB|default.jpg|0 -1| 비월: | 블소 |2016-01-19 19:10:24|내가 누구냐고? 알필요 없다|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박일아: | 긔엽긔 |2016-01-19 19:15:39|저는 부관핥짝이 입니다. 부관 핥짝|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 니쉬: |접속잘안함|2016-01-19 19:28:16|긔엽긔에서 칠성단 이라도 쌓고 재사 중인가유... 상용에 왠 재난 연타가|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 정휘인: |보컬로이드|2016-01-19 19:30:21|앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 박일아: | 긔엽긔 |2016-01-19 19:31:46|다음재난은 양양입니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 무광: |접속잘안함|2016-01-19 19:36:25|살려줭|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 니쉬: |접속잘안함|2016-01-19 19:37:46|마음만 받겠습니다|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|혹한기춥다:| 재야 |2016-01-19 19:42:11|머야 나 이제 아이디 만들었는데 왜 죽으란더야|FFFFFF|FFFFFF|pic_1699.jpg?=20151231|1 -1|바닥을탁치고:|보컬로이드|2016-01-19 19:49:02|똑똑|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 진리: | 블소 |2016-01-19 19:56:22|다음재난은|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 19:56:33|남중되겠습니다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 19:56:58|재난을 튕겨내겠다!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-19 19:57:00|왜 저희국은 분기마다 최소 2성은 재난인거죠? 너무해요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 니쉬: |접속잘안함|2016-01-19 19:57:58|수도만 남기신체 다 배푸시면 해결 되실겁...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-19 19:59:02|남중이라면 귀양, 주시군요|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 하루카: |종횡무진|2016-01-19 20:03:04|..주시는 괜찮지만 귀양은 봐주세요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|일본어번역기:|종횡무진|2016-01-19 20:16:14|がんべんしてください ):|FFC0CB|FFC0CB|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-19 20:18:29|암 변사 하십시오가 무슨말입니까??|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박일아: | 긔엽긔 |2016-01-19 20:22:42|용서해달라는뜻|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|바닥을탁치고:|보컬로이드|2016-01-19 20:26:00|그렇군요|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 진리: | 블소 |2016-01-19 20:38:23|갑등이 나오는 모든지역이 남중!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 긔엽긔 |2016-01-19 20:46:22|군주를 안하니 벌점이 쭉쭉 떨어지는군|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-19 21:03:42|..저도 벌점이 낮아지고 싶어요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-19 21:04:13|쟁도 아닌데 접속이 과한듯|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 정휘인: |보컬로이드|2016-01-19 21:12:01|훼신님들 훼력에 뉴비는 치여 웁니다|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 하루카: |종횡무진|2016-01-19 21:14:50|군주가 자면 다 잔다면서 협박받아서 ..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 니쉬: |접속잘안함|2016-01-19 21:16:13|군주 안재우는 분이 계시다니. 하야 타셔야겠네유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 비밀: | 긔엽긔 |2016-01-19 21:26:27|내 모든건 비밀|FFC0CB|FFC0CB|default.jpg|0 -1| 다이스: | 블소 |2016-01-19 21:27:44|벤치마킹 하겠습니다.|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1|일기토지배자:| 블소 |2016-01-19 21:28:10|왜 일기토 안열어줌?|FF0000|FF0000|default.jpg|0 -1| 카토: |종횡무진|2016-01-19 21:28:27|군주는 못됬어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 하루카: |종횡무진|2016-01-19 21:30:51|..저기 저 분이 협박범이에요. 잡아가주세요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|일본어번역기:|종횡무진|2016-01-19 21:30:59|군주 바보|FFC0CB|FFC0CB|default.jpg|0 -1| 니쉬: |접속잘안함|2016-01-19 21:31:30|망명장 드리면 되나요?|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-19 21:32:27|..이번만 눈감아줄래요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|ⓖ의병장20:| 긔엽긔 |2016-01-19 21:41:25|추방이라... 내가 무얼 잘못했단 말인가...|FFFFFF|FFFFFF|default.jpg|0 -1|잠둥이션:| 긔엽긔 |2016-01-19 21:58:53|나 집금오 너구리가 그대를 위해 남은 업무를 처리하겠소. 그대는 강릉을 빛추는 북두칠성이오. 건강을 관리해야 하오. 들어가시오.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|북두칠성:| 긔엽긔 |2016-01-19 22:00:11|네 이노옴 너의 죄를 정녕 모른단 말인가???? 감히 의병장으로 올려줬더니 국가 기밀을 빼내고도 정신을 못차리다닛 그동안의 공훈으로 목숨만은 건졌으니 시골가서 반성하거랏|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 22:01:53|명분 세탁은 좋지 아니합니다.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-19 22:02:26|쟤 아무 죄없는데|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|카이사르:|접속잘안함|2016-01-19 22:02:30|피곤하다~|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 박일아: | 긔엽긔 |2016-01-19 22:02:48|굳이따지자면 안귀여운거?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|ⓖ의병장22:| 긔엽긔 |2016-01-19 22:05:13|인덕이 제일이거늘... 추방이 웬말인가... 저주한다!|FFFFFF|FFFFFF|default.jpg|0 -1|북두칠성:| 긔엽긔 |2016-01-19 22:07:06|네 이노옴 너의 죄를 정녕 모른단 말인가???? 감히 의병장으로 올려줬더니 국가 기밀을 빼내고도 정신을 못차리다닛 그동안의 공훈으로 목숨만은 건졌으니 시골가서 반성하거랏|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 소드락: |어엿븐소드락|2016-01-19 22:07:39|그건 비겁한 변명입니다|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 니쉬: |접속잘안함|2016-01-19 22:09:47|매크로성 답변...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|ⓖ의병장19:| 긔엽긔 |2016-01-19 22:16:37|인덕이 제일이거늘... 추방이 웬말인가... 저주한다!|FFFFFF|FFFFFF|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-19 22:16:49|남들다하는추방 저도 해보겠습니다.|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 니쉬: |접속잘안함|2016-01-19 22:18:27|징, 모병 턴 직전에 하시는것을 추천 드리겠...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-19 22:25:04|2 재난씩 맞는다던 종횡국에 무재난 떴네요. 축하드려유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 22:26:50|원기옥|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 북오더: | 긔엽긔 |2016-01-19 22:28:19|부관 핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 진리: | 블소 |2016-01-19 22:29:54|유닉부자 블소국|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 22:30:15|없는사람이 드무네|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-19 22:31:50|돚거가 털렸다? ●10월:하내에서 금과 쌀을 도둑맞았습니다.|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-19 22:33:06|전체 37개의 유닉 중 블소가 11개 저희가 5개 다른 국가가 21개... 치트 치셨나요|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-19 22:33:21|유닉드시고 싶으신가요? 블소국으로 오세요|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박일아: | 긔엽긔 |2016-01-19 22:34:56|유니크 현질하시는듯|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 카토: |종횡무진|2016-01-19 22:35:44|카토도 현질할래요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 니쉬: |접속잘안함|2016-01-19 22:35:56|아 22개 구나. 긔엽긔 10개, 종횡무진 5개, 보컬로이드 4개, 어엿븐소드락 3개|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-19 22:38:04|소속 인원 중 과반수 이상이 유닉 가진 나라가 블소와 접속잘안함 뿐이네요. (은근 자ㄹ...)|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 22:42:41|야심한 밤에도 턴넣으라고 부르네요 이러다 새벽까지부를까봐무서워요|FFC0CB|FFC0CB|default.jpg|0 -1| 비월: | 블소 |2016-01-19 22:43:24|닉값하시면서 화내시면 댑니다 ㅎㅎ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 니쉬: |접속잘안함|2016-01-19 22:46:49|●10월:ⓖ의병장20(이)가 생활고가 나아지지 않는다며 떠났습니다. <- 긔엽긔국 저임금 논란|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-19 22:48:09|긔엽긔에서 추방당해서 생활고가 나아지지 않은것입니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 비월: | 블소 |2016-01-19 23:00:29|저걸로 알수있는건 긔엽긔국이 지급율이 낮다는 것이죠!!!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 박일아: | 긔엽긔 |2016-01-19 23:04:09|그런 불쌍한 긔엽긔국으로 원조좀|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-19 23:06:46|광물이 고갈되었습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-19 23:11:46|으아아아ㅏ 휴대폰부술까아아 부르는소리듣기싫어어어어|FFC0CB|FFC0CB|default.jpg|0 -1| 박일아: | 긔엽긔 |2016-01-19 23:12:32|방문을 여세욥|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 이쓰미: | 블소 |2016-01-19 23:16:54|결론은 긔엽긔는 인권탄압국!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:20:49|명예회손죄로 모삼국제제판에 회부하는 바이오.|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:21:27|합의금은 저렴하다오|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:24:04|그러다 무고죄가 성립 될 수 있을걸유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: | 블소 |2016-01-19 23:24:25|전 사실만을 말할뿐입니다! 법으로 싸웁시다! 내가 책보는거 안보임!@?|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 북오더: | 긔엽긔 |2016-01-19 23:25:38|부관핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:25:42|764조(명예훼손의 경우의 특칙) 타인의 명예를 훼손한 자에 대하여는 법원은 피해자의 청구에 의하여 손해배상에 갈음하거나 손해배상과 함께 명예회복에 적당한 처분을 명할 수 있다|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:25:50|개 열심히 책 보시는게 보이네유 딱봐도.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:26:05|손해배상을 청구하는 바이요|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 정휘인: |보컬로이드|2016-01-19 23:27:32|앵벌수 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-19 23:27:40|혼돈! 파괘! 구닌!|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 북오더: | 긔엽긔 |2016-01-19 23:28:10|부관 핥짝 // 이거 합법입니다!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 이쓰미: | 블소 |2016-01-19 23:29:40|형법 제307조 일반규정으로 '공연히 사실이나 허위사실을 적시하여 사람의 명예를 훼손함으로써 성립하는 범죄'라 규정하고 있다. 즉 허위사실이 아니라 괜찮 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-01-19 23:30:23|한나라 법전인 구장률에 근거하여 관아에 신고 하셔야쥬. 764조 그런거 몰라유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:31:07|307조(명예훼손) ① 공연히 사실을 적시하여 사람의 명예를 훼손한 자는 2년 이하의 징역이나 금고 또는 500만원 이하의 벌금에 처한다.|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:31:22|이건 사실을 유포하면 죄가 되는거임|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:31:52|아하 ㅋㅋㅋ 허위라구요?|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:32:02|기둘 딸걸렸음|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:33:10|아니 뭐래 ㅋㅋㅋ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:28|사랑이란|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:31|두근거린다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:33:36|허위사실이 아니라하면 사실이라고 한거니깜 명예훼손죄에 걸리미|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:38|청춘이란|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:42|두근거린다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:44|아프니깐|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:33:47|에프다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:33:58|사실을 유포하면 명예회손|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:34:08|사실이 아닌데 한거면 무고죄|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 북오더: | 긔엽긔 |2016-01-19 23:35:01|투닥투닥 뚜드려 맞는다 ㅠ|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 이쓰미: | 블소 |2016-01-19 23:35:15|제310조(위법성의 조각) 제307조제1항의 행위가 진실한 사실로서 오로지 공공의 이익에 관한 때에는 처벌하지 아니한다. 라고 되어있음 이건 뭐를 봐도 조각사유라서 괜찮 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 북오더: | 긔엽긔 |2016-01-19 23:35:17|부관 핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:35:25|젠장 다 지워졌네 ㅠㅠ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:35:33|증거가 없어 증거가|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:36:38|이제 된 듯 하니 책 고만보세유. 눈 더 나빠지시겠다는.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: | 블소 |2016-01-19 23:36:55|쨋든 부관잘못이라고 합의합시다 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:37:11|공공의 이익이 아니라 타국의 이익을 위해서 모함한 것으로 보미다아아|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:37:52|크흑 이것이 약소국의 비애란 말이더냐|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 이쓰미: | 블소 |2016-01-19 23:38:03|결론적으로 부관잘못인걸로 합의가 되었습니다 땅땅땅!~|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:38:43|안되~~~~~~|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:40:18|양양에 있는 관아로 압송을...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:41:27|늦었소이다|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:42:13|[이쓰미:블소]<2016-01-19 23:38:03> 결론적으로 부관잘못인걸로 합의가 되었습니다 땅땅땅!~ 이미3번 첬소이다 그냥 합의된거이미 죄명과 형량은 없소이닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:42:47|따라서 부관의신병은 압송할 수 없소이닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 북오더: | 긔엽긔 |2016-01-19 23:43:21|결론은 부관핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:25|판사를 파직하시지얌 크크크|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 이쓰미: | 블소 |2016-01-19 23:43:29|괜찮 원래 형사와 민사는 별도!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:43|부관은 우라것이닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:50|부관은 우리것니ㄷ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:50|부관은 우리것니ㄷ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:51|부관은 우리것니ㄷ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:43:57|부관은 우리것이닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:44:22|이쓰미님이 다시 반을 벌리시니 개판이구만유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:45:22|이잰 다 내려가서 증거가 없소이닷 증거불충분으로 구속기소는 안걸거외다|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 이쓰미: | 블소 |2016-01-19 23:46:47|우하하 부관잘못으로 결론이 났으니 성공!@ 성공적이야!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-01-19 23:47:14|으음... 그럼 구속 기소 말고 저희 접속잘안함에서 캐스팅 하겠습니다아|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-19 23:48:19|별로 한 거 없이 잘못을 한게 된 부관님 이었습니다|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:48:41|항소가 있소이닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:49:34|증거불충분으로 항소하는 바이오|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:50:07|기각 하면 그만인 항소...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:50:56|크흑 약소국의 비애란 말이더냐|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 박일아: | 긔엽긔 |2016-01-19 23:51:48|부관님은 저 좋아하는데...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-19 23:52:25|님들 이런 로그 받아본적 있어요? <부관_> 이것 저것 알려주시는 혜리님 좋아요 @ ω@)/ ★|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:52:58|부관님은 누구에게나|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:53:06|'사랑' 을 나눠주십니다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:53:08|.....................|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-19 23:53:19|그런적 없다한 부관님의 전메를 본 기억이 있네유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:| 긔엽긔 |2016-01-19 23:53:26|부관님 인기쟁이네|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 갸오오: | 긔엽긔 |2016-01-19 23:53:59|삼모계의 아이돌|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 부관: | 긔엽긔 |2016-01-19 23:54:53|부관. 자폭할까 하고 심각하게 고민중입니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-19 23:55:00|긔엽긔국 인구의 비밀이 그런거였나|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-19 23:55:05|저거 진짜로 하신겁니다.|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 박일아: | 긔엽긔 |2016-01-19 23:55:31|저보고 온 분은 실제로 얼마 안되십니다. 다 부관님의 덕...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-19 23:57:07|부관. 아무것도 하지 않았습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 00:05:41|부관, 핥짝|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|북두칠성:| 긔엽긔 |2016-01-20 00:06:28|부관님의 인기 비결은 아무것도 하지 않는 매력인감 😮.😮 배워야 겠군|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| 부관: | 긔엽긔 |2016-01-20 00:08:58|부관 핥으시면 안됩니다. 그리고 부관 인기 없습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 00:12:28|부관 너구리 쓰담쓰담 그만해달라. 너구리 털 복실복실하다. 부관 핥짝 핥짝 좋다|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 갸오오: | 긔엽긔 |2016-01-20 00:13:20|전메를 천통하게 둘순 없다!|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 00:13:24|아 나도 긔엽긔국이지|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|북두칠성:| 긔엽긔 |2016-01-20 00:16:31|한칸|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|북두칠성:| 긔엽긔 |2016-01-20 00:16:38|ㅋㅋㅋ 전메 통일|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| DVa: |접속잘안함|2016-01-20 00:23:30|I play to win!|FFFFFF|FFFFFF|pic_1714.jpg?=20160102|1 -1| 북오더: | 긔엽긔 |2016-01-20 00:28:02|부관 핥짝|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 북오더: | 긔엽긔 |2016-01-20 00:31:33|이와중에 천재..|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 북오더: | 긔엽긔 |2016-01-20 00:34:24|아이돌마스터와 러브라이브를 모두 섬렵하신 부관님이 인기가 없다니!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|일기토지배자:| 블소 |2016-01-20 00:35:53|일기토좀|FF0000|FF0000|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-20 00:48:05|소환수는 트롤인데 전력전은 잘하네 @@...|FFC0CB|FFC0CB|default.jpg|0 -1| 부관: | 긔엽긔 |2016-01-20 00:50:48|부관. 인기없습니다. 다른분께서 더 인기많으십니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 비월: | 블소 |2016-01-20 00:52:27|부관님 햘짝햘짝 하시는분들이 많은거 같습니다만??|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 부관: | 긔엽긔 |2016-01-20 00:53:23|다른분도 핥짝해주시길 바랍니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 부관: | 긔엽긔 |2016-01-20 00:53:41|부관을 핥으시면 안됩니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-20 00:54:10|... 먼가 흠 좀|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 북오더: | 긔엽긔 |2016-01-20 00:57:39|거짓말! 부관핥짝을 조건으로 온건데!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 아소: | 블소 |2016-01-20 00:58:52|부관 얌냠~ '~'|FF0000|FF0000|default.jpg|0 -1| 부관: | 긔엽긔 |2016-01-20 00:59:51|부관. 말을 좀 이상하게 했습니다. 정정하겠습니다. 다른분을 핥짝해주시길 바랍니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160114|1 -1| 북오더: | 긔엽긔 |2016-01-20 01:00:32|이미 스크랩 떠놨어요. 다른분들도 핥짝해주시길 바랍니다..!!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 부관: | 긔엽긔 |2016-01-20 01:03:15|........|FFC0CB|FFC0CB|pic_2719.jpg?=20160120|1 -1| 박일아: | 긔엽긔 |2016-01-20 01:05:01|우리국 핥짝으로만은 모자란건가...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 부관: | 긔엽긔 |2016-01-20 01:06:09|부관의 실수였습니다. 부디 다른분을 핥짝해주시길 바랍니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160120|1 -1| 아소: | 블소 |2016-01-20 01:07:16|부관 얌냠냠 ' ~ '|FF0000|FF0000|default.jpg|0 -1| 부관: | 긔엽긔 |2016-01-20 01:08:56|부관을 냠냠 할 정도로 맛 없습니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160120|1 -1|고긔가먹고싶:|보컬로이드|2016-01-20 01:11:38|고긔엽긔|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 부관: | 긔엽긔 |2016-01-20 01:13:10|귀여우신 고긔가먹고싶님을 핥으시길 바랍니다. 그리고 얌냠냠도 하시길 바랍니다.|FFC0CB|FFC0CB|pic_2719.jpg?=20160120|1 -1|일기토지배자:| 블소 |2016-01-20 01:14:59|일기토는..?|FF0000|FF0000|default.jpg|0 -1| 니쉬: |접속잘안함|2016-01-20 01:18:05|맛이 없으면 냠냠 퉤 하면 되나유~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 북오더: | 긔엽긔 |2016-01-20 01:40:37|좋아... 군주 자러갔고.. 몰수턴 넣었고.. 모반턴 넣었다.. 완벽해! 이제 부관은 나의것이다!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 비월: | 블소 |2016-01-20 01:53:49|나는 그 어떤 아국 장수보다 늦게자겠다...|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 02:21:20|시상에나|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 魯堂首: | 블소 |2016-01-20 02:25:35|실패하셨습니다 군주님|FF0000|FF0000|pic_3436.jpg?=20150223|1 -1| 비월: | 블소 |2016-01-20 02:26:12|아직 안자는데요 ㅎㅎ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 魯堂首: | 블소 |2016-01-20 02:26:32|칫|FF0000|FF0000|pic_3436.jpg?=20150223|1 -1| 장임: |접속잘안함|2016-01-20 03:15:12|헐 북오더님 수비를끄시다니|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 북오더: | 긔엽긔 |2016-01-20 03:23:11|시상 날아간건데요|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 카토: |종횡무진|2016-01-20 04:37:12|카토는 출병해서 신나요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 진리: | 블소 |2016-01-20 07:43:28|뭔 귀모가 실접임|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 07:43:33|무지장이면서 깨있다니 --|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-20 07:44:50|실접무지장은 좋은 인적자원이지유.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 갸오오: | 긔엽긔 |2016-01-20 07:46:56|덜덜|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 물파스: |종횡무진|2016-01-20 08:01:28|적에게 당해 상처입은 성벽엔 물파스를.. 적이 공격해오면 눈에 물파스를..|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-20 08:03:55|하루카는 이제 왕이에요!|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-20 08:58:53|카토도 장군이 되어버렸어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 갸오오: | 긔엽긔 |2016-01-20 09:32:11|막타 ㄷㄷ|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-20 09:35:23|진격의 카토!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|일본어번역기:|종횡무진|2016-01-20 09:57:42|すごい!!!|FFC0CB|FFC0CB|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-20 10:31:50|◆수 기병【소드락】 0 (-8100) VS 3957 (-693) 【평민킬러】연노|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 진리: | 블소 |2016-01-20 10:48:32|미트인가보네|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비밀: | 긔엽긔 |2016-01-20 11:30:06|비밀스럽게 잠입하겠다|FFC0CB|FFC0CB|default.jpg|0 -1|북두칠성:| 긔엽긔 |2016-01-20 11:40:45|평민킬러님 댐지봐라 9천이넹|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-20 11:52:39|성벽상대로 7턴중 6턴회피하면 뭐하나...... 소환수개객끼|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-20 11:55:45|^^... 좋지머|FFC0CB|FFC0CB|default.jpg|0 -1| 비밀: | 긔엽긔 |2016-01-20 12:18:06|비밀스럽게 등장해서 비밀스럽게 사라지는 비밀스러운 비밀|FFC0CB|FFC0CB|default.jpg|0 -1| 진리: | 블소 |2016-01-20 12:25:43|길뚫잼|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 12:26:45|역시 삼모는 정 떨어져..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 장임: |접속잘안함|2016-01-20 12:28:31|진리님이당|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|카이사르:|접속잘안함|2016-01-20 12:29:24|벽이 보인다아!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 진리: | 블소 |2016-01-20 12:31:54|ㅎㅇ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| SARS: | 긔엽긔 |2016-01-20 12:31:57|개지침...|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 카토: |종횡무진|2016-01-20 12:32:23|막타는 카토야!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1|북두칠성:| 긔엽긔 |2016-01-20 12:32:33|우리 1:1합시닷|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| SARS: | 긔엽긔 |2016-01-20 12:35:12|아니 접속잘안함국은 접속 잘 안한다면서 뭔 저리 지휘가 발 빠릅니까?|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 12:35:39|총공격하라! 총사령관 너구리가 명하노라! 전군 진격하라!|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 장임: |접속잘안함|2016-01-20 12:36:24|닳고 닳은 인간들만 있어서...|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-20 12:36:30|ㄷㄱㅎㅈㄷㅀ님 접속 안하시잖아요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 장임: |접속잘안함|2016-01-20 12:36:44|ㅇㅇ 그분은 삭|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| SARS: | 긔엽긔 |2016-01-20 12:38:31|나라명값좀 하세여 부끄러운줄 알아야지!|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 장임: |접속잘안함|2016-01-20 12:41:24|그렇게 치면 사스님도...|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-20 12:41:40|카토도 나라명값하고 있어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 감정: | 긔엽긔 |2016-01-20 12:42:19|사스님 긔엽긔|FFC0CB|FFC0CB|default.jpg|0 -1|카이사르:|접속잘안함|2016-01-20 12:44:09|감정님 저번에 군주셨을땐 열심히 안하던데..요즘은 접률 좋으신듯|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| SARS: | 긔엽긔 |2016-01-20 12:44:58|할말이 없네요 그건...|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 카토: |종횡무진|2016-01-20 12:45:20|군주되면 다들 일 안하는 병에 걸린 것 같아요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160116|1 -1| 감정: | 긔엽긔 |2016-01-20 12:46:17|방학이라 그래ㅇ...|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-20 12:47:37|저번 군주때도 방학이였는데 그떈 그 뭐지 여름방학 특별캠프인가 그런게많았어요... ㅇ.ㅇ|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-20 12:49:06|군주지만 방학엔 늦잠자고싶어..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 갸오오: | 긔엽긔 |2016-01-20 12:51:53|다이숙희|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 12:52:04|옥희도키|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-20 13:01:59|카토의 이미지 변신이야!|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 박일아: | 긔엽긔 |2016-01-20 13:05:15|방학부럽소...|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| SARS: | 긔엽긔 |2016-01-20 13:06:04|왔으면 지휘좀 나 퇴근합시다|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 카토: |종횡무진|2016-01-20 13:09:30|긔엽긔 무서워요..|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 박일아: | 긔엽긔 |2016-01-20 13:13:53|긔엽긔는 짱긔엽긔|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 감정: | 긔엽긔 |2016-01-20 13:22:07|긔엽긔|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 긔엽긔 |2016-01-20 13:29:34|간때문이야~|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 13:29:45|참께보리야~|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-20 13:31:14|지금까지 카토의 손을 벗어난 성은 없었다구?|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 박일아: | 긔엽긔 |2016-01-20 13:33:50|충차왜안함|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 갸오오: | 긔엽긔 |2016-01-20 13:33:52|내 정보 & 설정 에서 장수 열전에 가득하실듯|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-20 13:34:16|이 나라의 충차는 카토야!|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| SARS: | 긔엽긔 |2016-01-20 13:34:33|수뇌보다 더 못자거든|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| くま: |보컬로이드|2016-01-20 13:36:19|크앙 - ☆|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 갸오오: | 긔엽긔 |2016-01-20 13:55:15|갸옭 - ★|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|페르시아:|종횡무진|2016-01-20 13:56:51|냐앙 - ☆|FFC0CB|FFC0CB|pic_2002.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 13:58:10|타악 - ★|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 13:59:59|너굴 - ★|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 박일아: | 긔엽긔 |2016-01-20 14:02:35|핥짝 - ★|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 하루카: |종횡무진|2016-01-20 14:19:31|....?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-20 14:22:16|전멘가 이상해요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 감정: | 긔엽긔 |2016-01-20 14:28:56|감쟝 -★|FFC0CB|FFC0CB|default.jpg|0 -1| 다이스: | 블소 |2016-01-20 14:30:03|이미 침으로 범벅이 된 메세지 입니다|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1|그만좀불러좀:| 긔엽긔 |2016-01-20 14:34:04|감쟝거릴시간에 노자나내놔 소환수넘아|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-20 14:34:34|지잩도아닌게 노자는 개뿔|FFC0CB|FFC0CB|default.jpg|0 -1|그만좀불러좀:| 긔엽긔 |2016-01-20 14:34:40|지장도아닌게 노자는 개뿔|FFC0CB|FFC0CB|default.jpg|0 -1|일기토지배자:| 블소 |2016-01-20 14:37:59|일기토 왜안열어줌|FF0000|FF0000|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-20 14:39:53|핥짝 - ★|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 진리: | 블소 |2016-01-20 15:27:03|위성국이네 ㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:27:14|삼모 아름답다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| SARS: | 긔엽긔 |2016-01-20 15:29:58|나 언제망해?|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-20 15:30:03|이야 탈취 못한다고 하더니 자기 윗국가라서 못하는거였구낰ㅋㅋㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:30:59|이번기까지만 하려고 하긴했지만 진짜 ㅋㅋㅋㅋㅋㅋㅋ 대놓고 저러니까 어처구니 없당|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 북오더: | 긔엽긔 |2016-01-20 15:30:59|우리 망하는건 모두 어둠의 흑막 HideD의 손안에...|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 진리: | 블소 |2016-01-20 15:32:15|저렇게 해서 천통하면 삼모재미남?|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 박일아: | 긔엽긔 |2016-01-20 15:35:21|???? 무슨일임?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1| 진리: | 블소 |2016-01-20 15:36:43|소드락국에서 종횡국이랑 외교없이 전쟁할때 탈취할곳없다고 함|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:36:56|그런데 정작 지금 길뚫하고 난 뒤에 탈취가 우리한테 들어오네 ㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:37:01|= 위성국|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:38:26|멋진세상|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:38:49|저기있는 장수들은 무슨죄지 ㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 박희수: | 긔엽긔 |2016-01-20 15:46:22|ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: | 긔엽긔 |2016-01-20 15:46:29|저런게 없으면 심심하지|FFC0CB|FFC0CB|default.jpg|0 -1| 진리: | 블소 |2016-01-20 15:46:49|이야 오랫만에 삼모하고 숫자도 줄었는데 개판일세 ㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:47:12|숙련도 높고 숫자도 비슷해서 서로 할만할텐데 저렇게까지 해서 이기고 싶나|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: |어엿븐소드락|2016-01-20 15:48:30|풀모병양파를까고 잤는데 수비를한번했다 뭐지|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-20 15:49:21|종횡무진에서 하내 먹고 난뒤에 홍농 출병 거의 안했거든요 ㅋㅋㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:49:24|위성국이라섴ㅋㅋㅋㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:49:37|내가 개전부터 지켜봤는데 ㅋㅋㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 긔엽긔 |2016-01-20 15:49:41|아 신자한테 붙잡혀서 서서 1시간 설명 들음|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 15:50:05|버스 3대 놓쳐서 ㅂㄷㅂㄷ하다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 진리: | 블소 |2016-01-20 15:50:14|생각해보니 숙련쟁까지 한거네? ㅋㅋㅋㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: |어엿븐소드락|2016-01-20 15:50:19|음.. 이런거싫은데..|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-20 15:50:46|등용장 드랄깝쇼?|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 긔엽긔 |2016-01-20 15:51:12|마지막엔 교회와서 세례 받으라기에 거절하고 마침 버스 와서 ㅌㅌ|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-20 15:51:17|..? 위성국은 무슨 말씀인지 모르겠네요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 갸오오: | 긔엽긔 |2016-01-20 15:51:35|모두 새해 복 많이 받으세요|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 쥬비아: |어엿븐소드락|2016-01-20 15:51:36|1분장이라도 필요하시면 주셔용|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 진리: | 블소 |2016-01-20 15:52:02|위성국으로 만든게 아니라도 하는건 위성국인데 뭔|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 15:52:21|하내 먹고 홍농 출병을 안한건 블소국이 다른 땅을 다 먹을까봐 그랬던건데요;;|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 15:52:55|낙양 업 도적이랑 쟁하는 와중에 다 드셔서 남피라도 먹어야겠다 하고 달렸는데 짜고친다는 표현을 하시니 듣기가 좀 그렇네요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 15:53:28|이야 그럼 탈취는 왜 돚거에서 우리한테만 하고 있을까요 ㅋㅋㅋㅋ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:53:42|거기랑 개전하고 외교 없었던 시간이 3년은 넘는것 같은데|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 긔엽긔 |2016-01-20 15:53:51|날씨가 맑다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-20 15:54:07|저희는 그저 쟁하는 와중에 블소국이 선포왔고, 그래서 전쟁 준비기간이 필요해서 종전 요청을 받아들였을 뿐입니다.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 15:54:29|탈취는 저희쪽엔 할 땅이 없었나보죠. 실제로 선포하곤 안정에서 몇번 탈취당하기도 했는데..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 15:56:21|외교 컨텍했을때 거절했고 이미 쟁할꺼 아는 상황에서 땅먹는 순서자체가 의심스럽기 그지 없는데 뭐 말해봐야 증거도 없고|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 15:56:43|증거도 없고 아무것도 없는데 왜 전메에서 그렇게 비난하시는지 모르겠다는게 제 생각이에요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 15:56:56|당해보면 비난할만 하지|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:57:14|길뚫도 보고 탈취도 보고 숙련까지 쌓는것도 봤는데|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|일기토지배자:| 블소 |2016-01-20 15:57:14|돚거는 진압이 답인데 끆|FF0000|FF0000|default.jpg|0 -1| 하루카: |종횡무진|2016-01-20 15:57:25|외교는 짧은 연장을 원하시는데 그 기간이 타국과 겹쳐서 거절했습니다. 그때 당시에 접속안함 국과 정확히 동일한 년도에 풀리는 걸 요청하셨는데 그걸 안받아줬다고 정황증거가 되나요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| SARS: | 긔엽긔 |2016-01-20 15:58:25|길뚫 길막 하고싶으면 이제 해도 뭐라 안하는 섭임 그냥 넘어갑시다|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-20 15:58:45|이야 삼모안하는 사이 길뚫길막자유화도 됬나|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 15:58:52|좋은개판이네|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 15:59:05|뭣보다 저희가 선포당했는데 이게 길뚫인가요..? 적당히 땅 먹고 종전하고 저희가 선포했으면 할 말이 없겠습니다만..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 15:59:31|저희는 도적 다 정리하고 선포하려고 했는데 선포 당했습니다만..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| SARS: | 긔엽긔 |2016-01-20 15:59:43|유기체가 밴하지도 않고, 일단 개요에 써두긴 하지만 그거 어긴다고 논란화 되봤자 다음기에 돌아오면 별거 없음|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 하루카: |종횡무진|2016-01-20 16:00:28|먼저 선포당해서 쟁 준비할 시간이 없다보니 종전요청 받았고 종전했는데 이걸 길뚫이라고 전메에서 비난하시니 어떻게 설명드려야 할 지 감을 못잡겠네요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 16:00:32|사람이 적으니까 별별게 다 편해졌네|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 16:00:53|뻔히 쟁할꺼 아는데 업 비었다고 호관먼저 먹는게 말이 되나|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 16:01:01|하나 잡고 딴거 잡는게 정상이지|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|일기토지배자:| 블소 |2016-01-20 16:01:15|근데 님네 욕하는거보다는 돚거 까는게 더큰덧 ㅇ.ㅇ|FF0000|FF0000|default.jpg|0 -1| 진리: | 블소 |2016-01-20 16:01:27|소드락국은 그냥 감옥인데 그냥 종전된다는게 더 신기|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 16:01:31|;; 왜 말이 안된다고 생각하시는지가 더 이상하네요. 업은 블소랑 쟁하게 되면 주요 접경지인데..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 16:01:51|아뇨 전 저희를 까시던 말던 국가 안에선 상관이 없는데 전메에서 보란듯이 말씀하시는게 보기 싫을 뿐입니다.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 16:02:08|룰상으로 어긴 것도 없고 잘못한 게 없는데 왜 비난당해야 하나요? 선포 당하고도 길뚫이라고 하면 뭐라고 해야하나요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 16:02:22|아얄도 죽었는데 이제 그런거 말할데가 전메밖에 더 있나|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 16:02:22|사람 적으니까 정말 편해졌네요 한두명이 전메에서 언플도 하고.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 16:02:31|??|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 진리: | 블소 |2016-01-20 16:02:34|그냥 비난받고 천통하셈 ㅇㅇ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-20 16:03:01|임관금지국에 천통을 하라는거도 웃기네요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 대악마: |종횡무진|2016-01-20 16:03:35|문제 될게 하나도 없는데 전메에서 이러는것도 웃기네요|FFC0CB|FFC0CB|default.jpg|0 -1| 하루카: |종횡무진|2016-01-20 16:03:38|뭣보다 받아야 할 이유가 없는 비난을 받으라는것도 상당히 웃긴 일이지만요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-20 16:04:18|옛날같았으면 난리날일이니까 ㅇㅇ 옛날사람이라서 이런거에 예민한듯|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 16:04:25|종횡vs 소드락 -> 불소>종횡 선포 -> 종횡,소드락 휴전 -> 소드락 불소 도적질 -> 항의? 임?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 하루카: |종횡무진|2016-01-20 16:04:40|그런 점까진 이해하겠는데 그걸 전메에서 말씀하시면 저희같은 뉴비는 이해할 수 없는 비난이 되는거죠..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|페르시아:|종횡무진|2016-01-20 16:04:43|딱히 옛날이어도 문제없는 부분이라고 생각하는데요..|FFC0CB|FFC0CB|pic_2002.jpg?=20160114|1 -1| SARS: | 긔엽긔 |2016-01-20 16:05:35|소드락이랑 블소랑 길막길뚫금지 외교가 있어도 종횡이 소드락을 밀려고 했는데 블소에서 선포당해서 종전했다는 말이 틀린말은 아닌데|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 하루카: |종횡무진|2016-01-20 16:05:36|어디까지나 선포가 없었다면 저희는 도적 멸망시키고 선포했을겁니다. 선포가 너무 빨리와서 종전 요청을 받아들이는게 자국에 이득이기 때문이였지, 다른 의도는 없어요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-20 16:06:01|저희에게 이득이면 당연히 블소에게는 손해이지만, 그게 저희가 비난받을 일은 아니잔아요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| SARS: | 긔엽긔 |2016-01-20 16:06:24|블소국 입장에선 호관먹는건 몰라도 업까지 때리니까 '화'가 날 순 있어도, 그걸로 비난할건덕지는 모르겠음.|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 16:06:49|2222 동의|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 하루카: |종횡무진|2016-01-20 16:07:50|여튼 불만이신 점은 잘 알겠지만 그럴 의도는 없었고 정말 오해라는 점을 말씀드리고 싶네요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 쥬비아: |어엿븐소드락|2016-01-20 16:08:09|깃수마다 이런게 한번씩있어야 재밌죠 저번기는 너무 슉지나가서ㅌㅌ|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 하루카: |종횡무진|2016-01-20 16:09:09|그리고 쥬비아님이 수비 못하신건..저희도 모르겠어요 ㅠ 하내랑 흉노에 사람 많겠지 하고 엄청 계략 넣었는데 아무도 없고..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|일기토지배자:| 블소 |2016-01-20 16:09:23|ㅇㅇ? 뭐가 재밌다는거지 좆같은거가 재밌다는건가|FF0000|FF0000|default.jpg|0 -1| 쥬비아: |어엿븐소드락|2016-01-20 16:11:10|하내에있을땐 풀훈사라 두번했어요! 그뒤엔 훙농으로발령해줄사람이없어서 못한거지만..|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 갸오오: | 긔엽긔 |2016-01-20 16:12:19|응원가 노래가 안나온다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| SARS: | 긔엽긔 |2016-01-20 16:13:08|근데 블소국이 소드락한테 빡친건 낙양 탈취해서 그런건가여?|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1|랜임1분장:| 블소 |2016-01-20 16:17:26|쥬비아기여어|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 16:19:38|잠둥 더 기여어|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 쥬비아: |어엿븐소드락|2016-01-20 16:19:39|제 재밌다는 전메로 화가나신분이 계시다면 죄송해요 생각없이전메썼네요.롤배치 1승5패중이라.. 자숙의 의미로 1승10패하고오겠습니다..|FFA500|FFA500|pic_3901.jpg?=20151210|1 -1| 감정: | 긔엽긔 |2016-01-20 16:22:41|어쩃든 우리 쟁끝났으면 좋겠다.. 언제끝나지...|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-20 16:22:48|긔엽긔...|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: | 긔엽긔 |2016-01-20 16:22:59|삼모 핵꿀잼|FFC0CB|FFC0CB|default.jpg|0 -1| 최태원: | 긔엽긔 |2016-01-20 16:28:03|멍청이|FFC0CB|FFC0CB|default.jpg|0 -1| 정휘인: |보컬로이드|2016-01-20 16:28:13|당연히 잘해야 되는데 벌점값 못해서 죄송합니다!|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-20 16:29:10|그리고 앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 감정: | 긔엽긔 |2016-01-20 16:29:39|이번기 벌스님없지않나여 ㅇㅅㅇ|FFC0CB|FFC0CB|default.jpg|0 -1| SARS: | 긔엽긔 |2016-01-20 16:29:55|벌스 접은지 좀..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 갸오오: | 긔엽긔 |2016-01-20 16:32:18|뒷담이라한다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 정휘인: |보컬로이드|2016-01-20 16:32:19|없어도 접었어도 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 박희수: | 긔엽긔 |2016-01-20 16:32:54|레알 열전 개먹튀 ㅡㅡ|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: | 긔엽긔 |2016-01-20 16:33:02|진짜 업어다가 천통시켰는데 ㅂㄷㅂㄷ|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 긔엽긔 |2016-01-20 16:38:39|천지개벽의 악몽|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 16:38:48|그전인가?|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 박희수: | 긔엽긔 |2016-01-20 16:40:12|뭐 재미있었던 기수였으니 만족하지만 멍청한 장임도 까고|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: |접속잘안함|2016-01-20 17:01:44|ㅡㅡ|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 17:17:39|하..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박희수: | 긔엽긔 |2016-01-20 17:23:39|크 천지개벽 천통허용군주 갓장임님이 시다|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: |접속잘안함|2016-01-20 17:25:19|휘놈 부랄을 터트려야|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 박희수: | 긔엽긔 |2016-01-20 17:27:00|반징훈사출 5반복이나 합시다|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: |접속잘안함|2016-01-20 17:31:11|휴훈훈사출 5반복점여|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 박희수: | 긔엽긔 |2016-01-20 17:32:24|휴훈모훈사인데 ㅉㅉ|FFC0CB|FFC0CB|default.jpg|0 -1| 박희수: | 긔엽긔 |2016-01-20 17:32:28|멍청장임 아니랄까봐|FFC0CB|FFC0CB|default.jpg|0 -1| 장임: |접속잘안함|2016-01-20 17:40:48|심지어 출병도 없네|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 18:10:51|짜증|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 북오더: | 긔엽긔 |2016-01-20 18:31:11|이싸움 왜하는거에요,... 그냥 그만하면 안됨?|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 감정: | 긔엽긔 |2016-01-20 18:36:51|@~@<,,|FFC0CB|FFC0CB|default.jpg|0 -1| 쿠요: | 긔엽긔 |2016-01-20 18:43:42|쿠아아아ㅏㅏ아아아|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 쿠요: | 긔엽긔 |2016-01-20 18:43:47|쿠우우우우우우우우우우ㅜㅜ|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 정휘인: |보컬로이드|2016-01-20 19:05:11|사비야 아프지마 ㅠㅠ|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 쥬비아: | 블소 |2016-01-20 19:08:31|배치3승6패 마지막판중.. 떨린다..|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 19:12:01|쥬비아님 원래 티어가?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 북오더: | 긔엽긔 |2016-01-20 19:32:56|나도 돌려야지.. 저번에 2승8패해서 골1올라가느라 한세월이였는데..|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 정휘인: |보컬로이드|2016-01-20 19:33:19|실송합니다 흑흑흑|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 19:37:41|배치는 내년 겨울에 봐야합니다 ㅋㅋ 그래야 원하는 티어나옵니다|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 19:38:03|아아 내년이래 올해요 히힛|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 장임: |접속잘안함|2016-01-20 19:46:03|배치 1패 후 5연승 후후후|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 19:47:17|2승해놨는데 ㅎㅎ|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|일기토지배자:| 블소 |2016-01-20 19:47:33|전 일단 1승 ㅎㅎ|FF0000|FF0000|default.jpg|0 -1| 쥬비아: | 블소 |2016-01-20 19:55:45|전시즌 골1 3승7패 실버4받았네요|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1| 쥬비아: | 블소 |2016-01-20 19:56:18|이제 던져야겠어요|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 19:56:27|ㅎㄷㄷ 히... 힘내세요|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 쿠요: | 긔엽긔 |2016-01-20 20:05:32|좋아, 일단 1패야 !|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 20:08:32|나중에해요~ 그거 밑에서부터 채워지는거라서 첨에 다 그래요 애들좀 차면 해요 ㅋㅋ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 쥬비아: | 블소 |2016-01-20 20:08:43|잇승.. 케이틀린보고싶다|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1| 쿠요: | 긔엽긔 |2016-01-20 20:21:40|잇승잇승|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 진리: | 블소 |2016-01-20 20:35:20|ㅋㅋㅋㅋㅋㅋㅋ 던지다니|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 20:35:35|시즌초는 랭크 압축률이 높아서|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-20 20:35:52|등급자체는 낮게 나옴 윗 랭크가 좀 많이 생기기 시작해야 좀 위로 배치가능..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쥬비아: | 블소 |2016-01-20 20:38:15|지금 서버때문에 한겜하기도어렵네요..|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1| 갸오오: | 긔엽긔 |2016-01-20 20:41:56|롤 랭겜 하고싶은데 30분째 첫판도 못함 ㅋㅋ|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 장임: |접속잘안함|2016-01-20 20:43:15|앵벌스 등장|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 갸오오: | 긔엽긔 |2016-01-20 20:47:29|저건 사칭일꺼야!|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 장임: |접속잘안함|2016-01-20 20:49:40|아오 탑람머스 토나오네 미친듯이 탱키탱키|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 20:51:51|솔직히 탑 탐캔치가 더 무섭.. 탐캔지 카운터 있나요?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 20:54:52|일라오이 완전무섭..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 진리: | 블소 |2016-01-20 20:55:58|라이즈?|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 20:57:19|사실 손이 카운터죠..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 장임: |접속잘안함|2016-01-20 20:57:55|그브가 탐켄치 카운터라던데|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|하기싫은데:| 긔엽긔 |2016-01-20 21:00:50|롤망겜하지마시고 삼모하세요|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 긔엽긔 |2016-01-20 21:26:34|어예 배치 플5|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 21:26:50|가고싶다|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-20 21:27:25|탑캔치 카운터는 어 음..? 뽀삐!?|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 갸오오: | 긔엽긔 |2016-01-20 21:30:24|후 벌써부터 대리가 보인다..|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 21:30:48|브론즈 야스오가 cs 분당 10.5개를 먹을리가 없어!..|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 비밀: | 긔엽긔 |2016-01-20 21:33:58|비밀스럽게 등장해서 비밀스럽게 사라진다|FFC0CB|FFC0CB|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-20 21:38:33|아이디좀 알려주세요! 구경가능한가요? ㅎㅎ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 감정: | 긔엽긔 |2016-01-20 21:38:57|똥싸서 배치 1패...|FFC0CB|FFC0CB|default.jpg|0 -1| 감정: | 긔엽긔 |2016-01-20 21:39:11|브랜드vs벨코즈 ... 브랜드너무쌔다|FFC0CB|FFC0CB|default.jpg|0 -1|고긔가먹고싶:|보컬로이드|2016-01-20 21:45:14|불소 잼있냐요?|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 쥬비아: | 블소 |2016-01-20 21:46:34|렉때매 밴못해서 30분 패널티먹었어요;;|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1| 무광: |접속잘안함|2016-01-20 22:11:20|안돼 수도에 재난이|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 감정: | 긔엽긔 |2016-01-20 22:25:44|맹수병을 써보자! ㅌㅌ|FFC0CB|FFC0CB|default.jpg|0 -1| 정휘인: |보컬로이드|2016-01-20 22:46:44|사비야 그만아프렴ㅠㅠ|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 23:02:30|일기토나왔는데..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 23:02:43|1등이시군 ㅋㅋ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 비밀: | 긔엽긔 |2016-01-20 23:07:33|비밀입니다|FFC0CB|FFC0CB|default.jpg|0 -1| 갸오오: | 긔엽긔 |2016-01-20 23:11:42|여러분 말자하하세요 짱쉽고 짱쌤|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 23:12:00|미드 말자하 쉬움?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 23:12:05|말자하 라인 어디감?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 이쓰미: | 블소 |2016-01-20 23:15:24|서풋요 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 23:16:56|서폿 쉽고 좋은거 추천 좀 잔나밖에 못하는데 챔폭좀 늘릴까해서|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 긔엽긔 |2016-01-20 23:17:01|소라카 쉬움?|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 청기사: | 블소 |2016-01-20 23:17:10|고급레스토랑 재밌습니다.|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-20 23:18:05|소나쉬움 걍 QWE 누르기만하면됨 ㅇㅇ|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1| 갸오오: | 긔엽긔 |2016-01-20 23:18:37|전 말자하 올라인|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 갸오오: | 긔엽긔 |2016-01-20 23:19:04|탑갈땐 텔!|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| 북오더: | 긔엽긔 |2016-01-20 23:21:15|또 보컬, 접속잘안함 선포네요.. 이번엔 뭔가요..?|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|오늘도삼모냐:| 재야 |2016-01-20 23:21:29|외로운 밤 여러분과 함께 보내고싶습니다 ㅠㅠ.|FFFFFF|FFFFFF|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-20 23:21:42|쉔 서폿?|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 23:21:53|트런들 서폿?!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 쿠요: | 긔엽긔 |2016-01-20 23:26:48|느낌상 땅분배이지 않을까..|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1|북두칠성:| 긔엽긔 |2016-01-20 23:41:02|그 안에 우리를 끝낼 수 있다고 생각한거 아닐까욤 ㅋㅋ|FFC0CB|FFC0CB|pic_3986.jpg?=20160108|1 -1| くま: |보컬로이드|2016-01-20 23:44:59|크앙 - ☆|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 이쓰미: | 블소 |2016-01-20 23:48:52|어흥!|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|바닥을탁치고:|보컬로이드|2016-01-20 23:53:40|포토샵을 배워보고싶다..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 누렁: | 긔엽긔 |2016-01-21 00:01:36|멍멍|FFC0CB|FFC0CB|pic_1288.jpg?=20151111|1 -1| 정휘인: |보컬로이드|2016-01-21 00:11:57|안냐세옇 마마무에서 보컬과 퍼포먼스를 맡고있는 휘이익! 휘인입니다|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 00:24:27|고양이가 지옥에가면? 헬로키티 하앜.... 이말년......|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 청기사: | 블소 |2016-01-21 00:39:32|hell..|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 아소: | 블소 |2016-01-21 00:55:48|hell로키티|FF0000|FF0000|default.jpg|0 -1| 북오더: | 긔엽긔 |2016-01-21 01:03:19|음.. 다음엔 어딜가서 숙딸을 쳐야할까..|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1|카이사르:|접속잘안함|2016-01-21 01:03:24|무광대사님의 즉위식 ㄱㄱ|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| KAITO: |보컬로이드|2016-01-21 01:23:33|어머 맹수다|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1|일기토지배자:| 블소 |2016-01-21 01:28:11|일기토 이거 우승하면 95퍼 넘겠네|FF0000|FF0000|default.jpg|0 -1| 정휘인: |보컬로이드|2016-01-21 01:48:55|●1월:앵벌스(이)가 안타깝게도 번개에 맞아 죽고 말았습니다.|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-21 01:49:02|앵벌스 죽었다!|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 북오더: | 긔엽긔 |2016-01-21 01:50:38|최종보스 SARS!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 쿠요: | 긔엽긔 |2016-01-21 02:05:37|크윽....|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 북오더: | 긔엽긔 |2016-01-21 02:40:11|접속국은 이제 다 자러갔네요..|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 청기사: | 블소 |2016-01-21 03:00:52|기술연구|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 03:14:29|탁!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 북오더: | 긔엽긔 |2016-01-21 03:18:06|살필거 없어. 드루와~|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| 정휘인: |보컬로이드|2016-01-21 04:05:12|사비야 아프지마...|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 북오더: | 긔엽긔 |2016-01-21 04:10:00|때리고 아프지 말라는건...!! 무서워!|FFC0CB|FFC0CB|pic_3876.jpg?=20151103|1 -1| DVa: |접속잘안함|2016-01-21 05:39:20|time to raise my apm!|FFFFFF|FFFFFF|pic_1714.jpg?=20160102|1 -1| 물파스: |종횡무진|2016-01-21 06:05:08|주무세여|FFC0CB|FFC0CB|default.jpg|0 -1| 카토: |종횡무진|2016-01-21 07:07:18|추워요..|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 쿠요: | 긔엽긔 |2016-01-21 07:16:53|굳모닝!!|FFC0CB|FFC0CB|pic_2457.jpg?=20150615|1 -1| 플젠: | 긔엽긔 |2016-01-21 07:17:51|기여운 쿠요찡~|FFC0CB|FFC0CB|pic_2524.jpg?=20160119|1 -1| 갸오오: | 긔엽긔 |2016-01-21 08:32:34|어이쿠-요|FFC0CB|FFC0CB|pic_3128.jpg?=20160114|1 -1| SARS: | 긔엽긔 |2016-01-21 10:05:58|자금 17 군량 35 충차라서 돈도안줌 ㅋㅋㅋㅋㅋ|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-21 10:13:03|제 귀병학살한 살인충차 사스님..|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| KAITO: |보컬로이드|2016-01-21 10:14:34|긔엽긔국 분들 수고하셨습니다|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 니콜: | 블소 |2016-01-21 10:15:33|수고하셨어요오오|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 무광: |접속잘안함|2016-01-21 10:15:39|수고하셨습니다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 비월: | 블소 |2016-01-21 10:18:09|고생많으셧습니다~|FF0000|FF0000|pic_233.jpg?=20140830|1 -1|카이사르:|접속잘안함|2016-01-21 10:18:34|수고하셨어요~|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 니쉬: |접속잘안함|2016-01-21 10:19:34|고생하셨습니다!|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |종횡무진|2016-01-21 10:19:39|긔엽긔분들 수고 많았어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 10:38:07|고생하셨어요~|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 물파스: |종횡무진|2016-01-21 10:38:56|고생많으셨습니다|FFC0CB|FFC0CB|default.jpg|0 -1| SARS: | 재야 |2016-01-21 10:51:59|●도주하며 금7 쌀13을 분실했습니다. 와 시발 이거 너무하잖아 ㅋㅋㅋㅋ|FFFFFF|FFFFFF|pic_3797.jpg?=20160108|1 -1| 카토: |종횡무진|2016-01-21 10:52:58|단련도 못하시네요..|FFC0CB|FFC0CB|pic_4007.jpg?=20160120|1 -1| 진리: | 블소 |2016-01-21 10:53:23|빈대 뼈까지 먹어가는 치밀함|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비밀: | 재야 |2016-01-21 11:02:41|비밀스럽게 졸린|FFFFFF|FFFFFF|default.jpg|0 -1| 비밀: | 재야 |2016-01-21 11:05:41|현재 쟁 중, 먼저 망명장 온곳 이 2가지 조건에 맞춰진곳에 갑니다|FFFFFF|FFFFFF|default.jpg|0 -1| 비밀: | 재야 |2016-01-21 11:06:04|하지만 아무도 망명장을 주지 않아서 캐삭|FFFFFF|FFFFFF|default.jpg|0 -1| 다이스: | 블소 |2016-01-21 11:09:47|블소로 모이소~|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 다이스: | 블소 |2016-01-21 11:10:16|오이소~~|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| KAITO: |보컬로이드|2016-01-21 11:16:02|현재 쟁중이 너무 어려운 조건이예요|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1|잠둥이션:| 재야 |2016-01-21 11:16:49|종횡무진 등용장 보내줄 수 있음?|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 재야 |2016-01-21 11:17:23|모병쟁 시켜줄 수 있음?|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 플젠: | 블소 |2016-01-21 11:17:53|어디 가든 모병쟁은 안될듯?|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|잠둥이션:| 재야 |2016-01-21 11:18:20|(너무륵..)|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 재야 |2016-01-21 11:18:41|재야나 해야지..)|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 다이스: | 블소 |2016-01-21 11:19:05|모.. 모병쟁? ㅌㅌㅌㅌ|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 이쓰미: | 블소 |2016-01-21 11:25:14|곰과 너구리의 차이가 뭔가요?|FF0000|FF0000|pic_3717.jpg?=20150821|1 -1|잠둥이션:| 재야 |2016-01-21 11:26:19|너구리는 귀엽고 곰은 사악무도합니다.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 다이스: | 블소 |2016-01-21 11:32:12|귀여우니 이리 오시죠|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-21 11:36:58|내정과 진쟁 히실 생각은 없으신가유 서촉도 영토에 있는|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|南ことり:| 블소 |2016-01-21 11:38:02|코토리쨩 날아욧! 츙츙!|FF0000|FF0000|pic_3947.jpg?=20151116|1 -1| 박희수: |보컬로이드|2016-01-21 11:44:02|아저씨 자제좀요|AFEEEE|AFEEEE|default.jpg|0 -1| 최태원: | 재야 |2016-01-21 11:48:19|멍청이님 자제좀요|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |종횡무진|2016-01-21 11:48:40|히익!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1|南ことり:| 블소 |2016-01-21 11:49:03|코토리가 난다는데 뭐가 불만이야! 난다고 날아!|FF0000|FF0000|pic_3947.jpg?=20151116|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 12:00:16|손습이 능환이 어서와....ㅜㅜ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박희수: |보컬로이드|2016-01-21 12:04:40|그 말을 하는 사람이 아저씨라는게문제|AFEEEE|AFEEEE|default.jpg|0 -1| 박희수: |보컬로이드|2016-01-21 12:08:00|찾아보니 코토리 16살인데..... 어...... 어휴...|AFEEEE|AFEEEE|default.jpg|0 -1| 박희수: |보컬로이드|2016-01-21 12:08:14|20사....ㄹ.......ㅊ...ㅏ....ㅇ.....ㅣ....|AFEEEE|AFEEEE|default.jpg|0 -1| 카토: |종횡무진|2016-01-21 12:09:54|부녀지간인가요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1| 박희수: |보컬로이드|2016-01-21 12:10:27|적절한 일침이네여|AFEEEE|AFEEEE|default.jpg|0 -1| 박희수: |보컬로이드|2016-01-21 12:10:49|부녀는 조금 그러니까 어... 노총각 삼촌???|AFEEEE|AFEEEE|default.jpg|0 -1| 장임: |접속잘안함|2016-01-21 12:10:50|에휴|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 갸오오: | 블소 |2016-01-21 12:12:03|난다요|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-21 12:12:10|고래가 난다요|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 플젠: | 블소 |2016-01-21 12:15:23|나이차이는 관계없음!|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 갸오오: | 블소 |2016-01-21 12:18:16|맞음 사랑에 나이따윈 관계없따|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-21 12:20:49|하지만 자기보다 많은건 안되죠?|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1| 비월: | 블소 |2016-01-21 12:37:41|관계는 없지만 철컹철컹 가능함|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 감정: |접속잘안함|2016-01-21 12:40:33|●185년 2월:노자(+15)(을)를 습득 육도(계략)을 습득했습니다! ...? 이번기 유니크의상태가...?|FFFFFF|FFFFFF|default.jpg|0 -1|그만좀불러좀:|접속잘안함|2016-01-21 12:42:59|아 감정타도연합군 구합니다 노자나줄것이지...|FFFFFF|FFFFFF|default.jpg|0 -1|북두칠성:| 재야 |2016-01-21 12:53:36|임관 거절당하미 ㅠ,ㅠ 수비5분장 쓰실분???|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|카이사르:|접속잘안함|2016-01-21 12:55:08|접속잘안함국으로 오시면 만사가 편합니다!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 플젠: | 블소 |2016-01-21 12:58:21|여기오세양|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 쿠요: |어엿븐소드락|2016-01-21 12:59:20|인생은 랜임...|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 갸오오: | 블소 |2016-01-21 13:05:17|어잌후-요|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 비월: | 블소 |2016-01-21 13:05:34|하하. 정말 재밋다|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| くま: |보컬로이드|2016-01-21 13:24:52|임관에 거절이 어디 있...|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 쿠요: |어엿븐소드락|2016-01-21 13:30:49|임관 금지 아닐까요|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| くま: |보컬로이드|2016-01-21 13:33:12|어 그럼 전 조용히 하겠습니다;|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1|잠둥이션:|종횡무진|2016-01-21 13:33:16|ㅠㅠ 밝은 별 북두칠성.. 흐규흐규|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 쿠요: |어엿븐소드락|2016-01-21 13:34:35|헉... 쿠마님 ㅠㅠ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-21 13:35:03|절대 저격은 아니었어요...|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|북두칠성:| 블소 |2016-01-21 13:35:08|장균 ㅠ.ㅠ 장균따라가려했으나 거절당했너이닷 ㅠ.ㅠ|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1|잠둥이션:|종횡무진|2016-01-21 13:36:02|흑흑... 밝은 별 북두칠성이 없으니 누가 내 마음을 밝게 비춰주리오. 내 식음을 전폐하고 신선술을 연마하며 그대를 볼 날을 기다리겠소.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 쥬비아: | 블소 |2016-01-21 13:36:17|저격수 쿠요|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1|북두칠성:| 블소 |2016-01-21 13:36:29|수도를 밝게 비추던 교지태수 북두칠성 캐삭할까 하옵나이닷 크윽 ㅠ.ㅠ 살아서뭐하미|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1|북두칠성:| 블소 |2016-01-21 13:37:11|장균 크윽 ㅠ.ㅠ 저역시 밥이 안넘어가옵니닷 크윽|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 플젠: | 블소 |2016-01-21 13:37:16|북두칠성공은 내 수하요|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 플젠: | 블소 |2016-01-21 13:37:40|내 등용장을 받고 왔으니 내가 죽거든 죽으시오 ㅎㅎ|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|잠둥이션:|종횡무진|2016-01-21 13:37:56|나 또한 옛 나라의 관원으로서 밝게 빛나던 교지를 잃어서 슬픔에 잠겨있소다.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1|북두칠성:| 블소 |2016-01-21 13:38:28|왔더니 홀대허더외다 크윽 ㅠ.ㅠ 700원들고 구걸하고 있나이닷 ㅠ.ㅠ|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1|잠둥이션:|종횡무진|2016-01-21 13:38:36|어찌 운명이란 이리 가혹하단 말이오. 크흣.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 플젠: | 블소 |2016-01-21 13:39:14|어쩔수없소... 우리 옛관원들이 전부 거지라...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|북두칠성:| 블소 |2016-01-21 13:39:27|망국의 자식으로써 이리 사옵나이닷 크윽|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 플젠: | 블소 |2016-01-21 13:39:29|맞춰줄려고 하니 금쌀이 부족하오...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|북두칠성:| 블소 |2016-01-21 13:40:16|우리 주군과 사스님은 나를 버리고 갔나더이덧 크윽|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 플젠: | 블소 |2016-01-21 13:40:47|사실 나도 저리가려 했으나 임관금지였소...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 하루카: |종횡무진|2016-01-21 13:42:01|에..죄송합니다..먼저 갠메온 분들부터 받아주다 보니 국고가 0이 되서..;|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|잠둥이션:|종횡무진|2016-01-21 13:43:34|밝게 빛나는 별 북두칠성이 없으니 내 눈앞이 깜깜할 따름이오.|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 니콜: | 블소 |2016-01-21 13:43:40|처음부터 국고가 0이여서 모든분들을 받을수있었습니다|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 플젠: | 블소 |2016-01-21 13:44:56|나는 이곳이 마지막이요 여기가 망하면 삭턴탈것이오...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 다이스: | 블소 |2016-01-21 13:45:28|도둑이야!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 플젠: | 블소 |2016-01-21 13:48:37|북두칠성공 받고싶은 관직이있소?|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|북두칠성:| 블소 |2016-01-21 13:49:31|밝게 빛나는 수도 태수자리는 받아줘야하지 않겠나이까|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-21 13:49:36|국고에 금쌀 4만씩 있었던 시절이 있었는데|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-21 13:49:47|다 털림..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 청기사: | 블소 |2016-01-21 13:50:31|기술연구|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 플젠: | 블소 |2016-01-21 13:50:45|마침 비어있구려|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 플젠: | 블소 |2016-01-21 13:51:42|체섭도 망했는데 퉤섭도 망했소... 엔장 등신새기들...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1| 진리: | 블소 |2016-01-21 13:52:06|퉤섭 빨리와서 금쌀 나눠먹읍세|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-21 13:52:10|●군량이 모자라 병사들이 소집해제되었습니다! ●군량 부족으로 패퇴합니다.|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-21 13:52:12|ㅂㄷㅂㄷ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쿠요: |어엿븐소드락|2016-01-21 13:53:04|이나라 살아있는 사람이 없어 ㅠㅠ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|북두칠성:| 블소 |2016-01-21 13:53:14|블소국의 수도를을 밝게비추는|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-21 13:53:38|국고는 빠방할듯 탈취많이 해서|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1|북두칠성:| 블소 |2016-01-21 13:53:40|블소국의 수도를 밝게비추는 초 태수 북두칠성 선봉에서서 적들을 막어보겠나이닷아아아|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 플젠: | 블소 |2016-01-21 13:54:10|등용장 드리오?|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|북두칠성:| 블소 |2016-01-21 13:54:32|장균. 주군. 사스님 미안하외다아아 블소국은 못 뚫으외다아아|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| 쿠요: |어엿븐소드락|2016-01-21 13:56:17|흠.... 이런나라라도 비재야 망명은 좀...|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 플젠: | 블소 |2016-01-21 14:02:23|사실 턴이없소...|FF0000|FF0000|pic_2524.jpg?=20160119|1 -1|일기토지배자:| 블소 |2016-01-21 14:35:20|비재야 망명은 그런나라에서 티라고 있는건뎅 ㅇ.ㅇ|FF0000|FF0000|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-21 14:39:09|ㅇㅇ 여기 있어봐야 침몰하는 배일뿐임|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 이루나: | 재야 |2016-01-21 14:41:10|ㄷㄷ해... 군대갔다왔더니 100명밖에 없네;|FFFFFF|FFFFFF|default.jpg|0 -1| 갸오오: | 블소 |2016-01-21 14:42:08|다른분들 다 군대가서 그럼|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 이루나: | 재야 |2016-01-21 14:43:18|히익........... 150명이나..?|FFFFFF|FFFFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-21 14:43:46|다 군대가다니|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-21 14:43:54|푸릇푸릇하구만|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 갸오오: | 블소 |2016-01-21 14:44:26|물론 농담...|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 니콜: | 블소 |2016-01-21 14:46:54|쿠요님은 오렌지색이 어울립니다|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 쿠요: |어엿븐소드락|2016-01-21 14:47:38|으앗 탈취하겠다아ㅏ아|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 다이스: | 블소 |2016-01-21 14:51:19|힝.. 소갔지|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 니콜: | 블소 |2016-01-21 15:38:15|도둑분들 사지를찢어야......|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 진리: | 블소 |2016-01-21 15:40:01|도둑 손목자르고 싶다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-21 15:40:08|겸사겸사 목도|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 니콜: | 블소 |2016-01-21 16:11:54|ㄴㄴ 몰수하세여|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 장임: |접속잘안함|2016-01-21 16:19:51|쟁하고싶당|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 카토: |종횡무진|2016-01-21 16:21:48|전쟁광 무서워요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1| 박일아: |종횡무진|2016-01-21 16:23:16|전쟁 G긋Z긋|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|랜임1분장:| 블소 |2016-01-21 16:30:15|슬슬 저의 지모를발휘해야겠군요|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1|랜임1분장:| 블소 |2016-01-21 16:36:19| 수뇌가 아닙니다 발닦고 주무세욥|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1|랜임1분장:| 블소 |2016-01-21 16:53:15|어 혜리님 넘 쎈데....|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1| 북오더: | 블소 |2016-01-21 16:56:25|혜리님이 돌격기병으로 캐리하시는군요.|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1|랜임1분장:| 블소 |2016-01-21 16:59:09|그렇다면 닷지다|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1|하기싫은데:| 재야 |2016-01-21 17:22:19|롤하실분|FFFFFF|FFFFFF|default.jpg|0 -1| Air: | 재야 |2016-01-21 17:32:50|망햇네;|FFFFFF|FFFFFF|pic_1673.jpg?=20151213|1 -1| 쥬비아: | 블소 |2016-01-21 17:34:14|쥬비!|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1|하기싫은데:| 재야 |2016-01-21 17:36:07|충차스탯주워가실분|FFFFFF|FFFFFF|default.jpg|0 -1| Air: | 재야 |2016-01-21 17:36:44|빠른랜임|FFFFFF|FFFFFF|pic_1673.jpg?=20151213|1 -1| 북오더: | 블소 |2016-01-21 17:45:09|혜리님 하이..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| KAITO: |보컬로이드|2016-01-21 17:45:14|충차!!!|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 박일아: |종횡무진|2016-01-21 17:46:13|ㅎㅇ|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|하기싫은데:| 재야 |2016-01-21 17:46:42|ㅂㅇ|FFFFFF|FFFFFF|default.jpg|0 -1|하기싫은데:| 재야 |2016-01-21 17:47:27|선약으로 충차스탯들고왔더니 망할때까지 집합만함 ㅋㅋㅋㅋㅋㅋㅋ 그덕에 접률도 폭망|FFFFFF|FFFFFF|default.jpg|0 -1|하기싫은데:| 재야 |2016-01-21 17:48:25|이게 다 부덕한 박일아때문입니다 여러분. 삼할못 삼부덕 삼노잼 삼위일체.|FFFFFF|FFFFFF|default.jpg|0 -1| 박일아: |종횡무진|2016-01-21 17:49:50|원래 요즘 접률 폭망아님?|FFC0CB|FFC0CB|pic_3305.jpg?=20151216|1 -1|하기싫은데:| 재야 |2016-01-21 17:50:50|사실 흥미가떨어지긴했음...쟁장안햐고있는것도있고...|FFFFFF|FFFFFF|default.jpg|0 -1| Air: | 재야 |2016-01-21 17:51:40|랜임이 갑|FFFFFF|FFFFFF|pic_1673.jpg?=20151213|1 -1|하기싫은데:| 재야 |2016-01-21 17:52:13|열정이생길 건덕지가안보임...멀티천통이후로ㅇㅇ...|FFFFFF|FFFFFF|default.jpg|0 -1|하기싫은데:| 재야 |2016-01-21 17:53:27|내 사기126의 정란 76기가 굶어죽게생겼다...흑흑...|FFFFFF|FFFFFF|default.jpg|0 -1| Air: | 재야 |2016-01-21 17:56:52|노잼 되긴햇음|FFFFFF|FFFFFF|pic_1673.jpg?=20151213|1 -1| Air: | 재야 |2016-01-21 17:56:57|이번기부터안할려햇는데..|FFFFFF|FFFFFF|pic_1673.jpg?=20151213|1 -1| 쿠요: |어엿븐소드락|2016-01-21 17:59:49|3탈취 3실패... ㅂㄷㅂㄷ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|하기싫은데:| 재야 |2016-01-21 18:00:53|귀모뜨시고 전턴탈취실패하신 장인분계십니다 글내려주세요...|FFFFFF|FFFFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-21 18:02:08|장안하면 그냥 성공할듯|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| KAITO: |보컬로이드|2016-01-21 18:02:32|랜덤신이 우리나라를 보우하시는구나|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 청기사: | 블소 |2016-01-21 18:02:50|확실히 흥미가 떨어진 사람이 보이는게 멜군만해도 멀티천통때 그렇게 화내고선 삼모 얘기가 통 없네요.|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|하기싫은데:| 재야 |2016-01-21 18:03:23|보우는 부산대역 앞에있는 오락실이름입니다.|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: | 블소 |2016-01-21 18:03:26|멜군 놀리던 맛이 있었는데 말이죠...|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|하기싫은데:| 재야 |2016-01-21 18:03:50|카라멜군만두|FFFFFF|FFFFFF|default.jpg|0 -1| 쥬비아: | 블소 |2016-01-21 18:04:59|접어라 멜군|FF0000|FF0000|pic_3901.jpg?=20151210|1 -1| 비밀: | 블소 |2016-01-21 18:07:28|모든것은 비밀로 이어짐|FF0000|FF0000|default.jpg|0 -1| KAITO: |보컬로이드|2016-01-21 18:08:49|치안 올릴만한데로 발령해주세여|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| KAITO: |보컬로이드|2016-01-21 18:08:56|방사지만 뭐...|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 카토: |종횡무진|2016-01-21 18:09:34|남피오세요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1|하기싫은데:| 재야 |2016-01-21 18:09:37|그냥국메처럼쓰셔도될듯|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: | 블소 |2016-01-21 18:11:01|멜군 삼모 얘기 통 없는거보고 진짜 신기했죠|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 18:12:20|멜군님 근황좀|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|하기싫은데:| 재야 |2016-01-21 18:12:54|아직도 벌점높아질 열정있는게 신기...|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: | 블소 |2016-01-21 18:13:29|멜군이여? 요즘 스카이림하던데여|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|하기싫은데:| 재야 |2016-01-21 18:15:35|폴아웃한다더니|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: | 블소 |2016-01-21 18:16:47|폴아웃 잠깐 하던가 싶더니 스카이림 만지더라구요 ㅋㅋㅋㅋ|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-21 18:20:37|오호 그렇군요|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 갸오오: | 블소 |2016-01-21 18:23:10|아임 리얼 맨|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 북오더: | 블소 |2016-01-21 18:24:48|금 920원.. 쓸데없는걸 주웠군..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 감정: |접속잘안함|2016-01-21 19:48:30|육도계략은 쓸일이 없으니 팔아야징|FFFFFF|FFFFFF|default.jpg|0 -1| 다이스: | 블소 |2016-01-21 20:17:34|오라메디 바른 다이소닷!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 쿠요: |어엿븐소드락|2016-01-21 20:51:56|아... 도적국 왜 만드나 했었는데...|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-21 20:51:59|이 재미로 하는구나.....|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-21 20:52:20|손맛이 있네요 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 카토: |종횡무진|2016-01-21 20:53:19|손 맛을 알아버리셨어..!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1|고긔가먹고싶:|보컬로이드|2016-01-21 20:58:49|다음기언제인가요?|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-01-21 20:59:19|난 삽터란적없음 삭턴도 거의없음|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-01-21 20:59:41|아 실수로 전메예|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 하루카: |종횡무진|2016-01-21 21:03:27|쿠요..먹고싶어요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 니콜: | 블소 |2016-01-21 21:17:33|VS 25 (-19165) 【백랑】성벽 저는 쓸모없는 응가입니다|FF0000|FF0000|pic_3744.jpg?=20151022|1 -1| 청기사: | 블소 |2016-01-21 21:32:03|응가님..|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 쿠요: |어엿븐소드락|2016-01-21 21:47:39|ㅋㅋㅋㅋㅋ... 25라니|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-21 21:47:55|●금1256 쌀376을 획득했습니다. 핫 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-21 21:50:09|탈취로그를 전메에서 공개하는건 상대국이 좀 불쾌하지 않을까요..;|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|랜임1분장:| 블소 |2016-01-21 21:50:31|아뇨 얼마탈취당한지 몰랐는데 ㄳ|FF0000|FF0000|pic_3063.jpg?=20151213|1 -1|구경학개론:| 재야 |2016-01-21 22:03:58|수능국 열전보러 왔는데|FFFFFF|FFFFFF|default.jpg|0 -1|카이사르:|접속잘안함|2016-01-21 22:05:02|완전 도둑놈이로군... 금1256이라니|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|일기토지배자:| 블소 |2016-01-21 22:17:39|제가 턴걸 저기서 또털어가는구뇨|FF0000|FF0000|default.jpg|0 -1| 쿠요: |어엿븐소드락|2016-01-21 22:25:55|아... 그런가요... 그런걸생각도 못했네요 ㅠㅠ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 다이스: | 블소 |2016-01-21 22:26:19|소도둑인가!!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 비월: | 블소 |2016-01-21 22:33:41|너무 불쾌하네욧!! 우리나라로 넘어오면 용서해줄께욧!!!!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 갸오오: | 블소 |2016-01-21 22:52:09|오시는김에 금쌀 다 포상받고 오세양|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 무광: |접속잘안함|2016-01-22 00:10:17|묻혀서 탈취하고싶다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 다이스: | 블소 |2016-01-22 00:21:25|재난아 힘을 줘!!|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 무광: |접속잘안함|2016-01-22 01:44:29|안돼 상용에 또맞음|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 북오더: | 블소 |2016-01-22 03:06:50|소드락국 저렇게 행동하는건 비매너라 생각해서 블소국왔는데..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1|북두칠성:| 블소 |2016-01-22 03:08:37|공 근위【북두칠성】 454 (-3156) VS 1463 (-6848) 【평민킬러】연노|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1|북두칠성:| 블소 |2016-01-22 03:08:48|크크크 이겼당|FF0000|FF0000|pic_3986.jpg?=20160108|1 -1| SARS: |종횡무진|2016-01-22 03:13:22|도적이 탈취하는게 빡칠일이지 비매너라 불릴일은..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 진리: | 블소 |2016-01-22 03:14:13|그 탈취때문에 사실상 2:1|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 03:14:22|털린양이 5만이 넘는당..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| SARS: |종횡무진|2016-01-22 03:15:20|외교미스야 어쩔 수 없지 머..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 북오더: | 블소 |2016-01-22 03:42:52|도적이 탈취하는건 상관없지만 대놓고 한개국가만 타겟으로..? 아니 '서포터국가'로서 활동하는게 좀 그래서요.|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| SARS: |종횡무진|2016-01-22 03:44:40|어쩌겠어여, 흉노는 탈취해봤자 금쌀 나오지도 않고, 종횡은 블소한테 선포맞고 바로 소드락이랑 외교 정리해뒀는데. 그러다고 땅 1개가지고 내정만 할것도 아니고 ㅋㅋ|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 북오더: | 블소 |2016-01-22 03:45:15|우리 천통생각없고 먹었던 땅도 너희 줄꺼고 너희 적국에 탈취러쉬해줄테니 그대신... 음..뭐받았을까요? 다음기수 선약?|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 북오더: | 블소 |2016-01-22 03:46:16|뭐 사전에 외교못한 블소책임도 있으니 뭐라할건 없죠..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| SARS: |종횡무진|2016-01-22 03:46:19|이건 블소국이 종횡에 선포한순간 자초한일이고 위성국이나 서포터나 편들었다는건 블소국 외교미스라.. 어쩔 수 없죠 뭐|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 하루카: |종횡무진|2016-01-22 03:46:33|소설은 잘 쓰시는데 장르가 판타지라 아쉽네요. 전 문학만 읽어서..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 대악마: |종횡무진|2016-01-22 03:46:47|전메에 소설로 어그로ㄴㄴ|FFC0CB|FFC0CB|default.jpg|0 -1| 북오더: | 블소 |2016-01-22 03:47:00|흔히 말하는 풀옵션 외교 하고 뒤통수 맞으면 맺은사람 잘못이니까요.|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 하루카: |종횡무진|2016-01-22 03:47:08|그래서 풀옵션 외교 하셨나요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 북오더: | 블소 |2016-01-22 03:47:49|결론은 제3자 입장에서 좀 그래보여서 와서 조용히 싸워주고 있을뿐..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 하루카: |종횡무진|2016-01-22 03:48:16|전메에선 전혀 조용하지 않네요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-22 03:48:50|북오더님 모토는 100명이 기분나빠도 5명이 기분좋으면 그만인줄 알고 있었는데, 가치관이 바뀌신줄도 이제야 알게되네요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 북오더: | 블소 |2016-01-22 03:48:57|국매에선 조용하답니다 ㅇㅅㅇ;|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| SARS: |종횡무진|2016-01-22 03:49:03|아니 딱히 풀옵션이라고 할것도 없잖아여. 종횡이 소드락이랑 종전하고 블소부터 잡는다는 선택지를 준게 잘못이지..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 대악마: |종횡무진|2016-01-22 03:49:03|외교적미스를 왜 여기에다가 자꾸 책임전가 하시는지 궁금하네요|FFC0CB|FFC0CB|default.jpg|0 -1| 북오더: | 블소 |2016-01-22 03:50:01|? 말했는데요.. 블소국도 잘못했다고..|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 하연주: |어엿븐소드락|2016-01-22 03:50:15|뭔진 모르겠지만 전메가 불타오르고 있다|FFA500|FFA500|pic_23.jpg?=20160114|1 -1| 하루카: |종횡무진|2016-01-22 03:50:46|블소국이 잘못한건 둘째치고 저희국에 무슨 대가로 다음기 선약을 받았느니 뭐니 하시는게 잘못이라는 겁니다|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| SARS: |종횡무진|2016-01-22 03:50:51|블소국'만' 잘못한거지 이건, 다른국한테 기분이 상할 순 있어도 잘못했다고 할건 없음... 다굴도 비매너라고 불리던 시절이 있긴했었지만 이젠 아니잖아여|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 대악마: |종횡무진|2016-01-22 03:52:23|'도' 가 아니라 님들만 잘못한겁니다|FFC0CB|FFC0CB|default.jpg|0 -1| SARS: |종횡무진|2016-01-22 03:52:23|종횡국은 블소한테 선포받아서 제대로 대처한것뿐이고, 도적국은 도적 컨셉 맞게 외교 안된 국에 탈취하는거라 잘못이라할게 안됨.|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| SARS: |종횡무진|2016-01-22 03:52:46|한 4,5기전에 오티님도 나한테 탈취당해서 전쟁 망할때 그냥 탈취 짜증난다/빡친다에서 끝났지 위성국이다 이런말은 안하셨잖아여|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 북오더: | 블소 |2016-01-22 03:54:58|뭐 종횡국 외교 잘한건 인정합니다. 음.. 전메에는 그만 말할게요.|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 북오더: | 블소 |2016-01-22 03:55:53|폰으로 새로고침하는사이에 이야기가 커졌네요;; 필요하면 아얄 접할께요|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 비월: | 블소 |2016-01-22 03:56:40|지금 이상황에선 두국과 외교가 없을때 소드락vs종횡 됐을때 소드락국에 늦게라도 선포 안할걸 후회하고 있을뿐입니다.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 비월: | 블소 |2016-01-22 03:56:41|소드락국이나 종횡국에 잘못이 있는건 없고 제가 초보군주라 외교에 신경을 잘 못쓴것 뿐이니 그만들 싸워주셧으면 합니다.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| SARS: |종횡무진|2016-01-22 03:58:33|외교미스로 망하는 나라가 한둘도 아니고 종종 있는거죠 ..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 북오더: | 블소 |2016-01-22 03:59:06|어쩐지 왕따당하는 학생본가같아서 말한건데.. 일단 사과드립니다.|FF0000|FF0000|pic_3876.jpg?=20151103|1 -1| 비월: | 블소 |2016-01-22 03:59:24|맞죠 제가 삼모 한두깃수 한것도 아니고, 삼모 망한나라는 거의 대다수가 외교미스죠.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 비월: | 블소 |2016-01-22 04:00:00|북오더님도 뭐 나쁜뜻으로 그런거 같진 않으니 그만들 싸워주세요 ^^;; 전메에서 싸우는건 그렇게 보기 좋지 않답니다 ^^|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:00:25|다 이해하고 넘어갈 수 있지만 대가로 다음 기 선약? 같은 말도 안되는 말씀을 하셔서 너무 감정적인 대응을 했던 것 같네요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:02:26|자자 그만 싸우고 전력전이나 하죠 ㅎㅎ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:02:47|맨날 16강 탈락이라 싫어요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-22 04:02:57|근데 참가 안해도 유저수가 적어서인지 자꾸 참가해버리네요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:03:23|16강은 올라가시네 부럽...|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:03:56|...손수건 빌려드릴까요. 눈물이 갑자기..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:04:29|아뇨 그보다 빼앗긴 허창의 호황을 돌려줘요....|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 비월: | 블소 |2016-01-22 04:04:45|호황호황 하앜하앜 호황!!!!!!!!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:05:57|..으음, 어째서인지 블소라는 국명에 책임감을 느끼게 됩니다만, 돌려주면 기병장 카토가 저를 죽일거에요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:06:41|기병장이라... 보병장인 저는 걍 가만히...ㅎㅎ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 카토: |종횡무진|2016-01-22 04:07:13|맹수주세요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160121|1 -1| 하루카: |종횡무진|2016-01-22 04:07:22|보병 약한데, 왜 보병하셨나요...전 다들 자기들끼리 고르더니 보병 없네 너 해라 하면서..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-22 04:08:01|카토는 역시 이게 마음에 들어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1| 비월: | 블소 |2016-01-22 04:08:18|그냥 무장하면 보,궁,기 하나씩 번갈아 가면서 ㅎㅎ;;; 맹수는 우리와 종전하고 저쪽국이랑...................(소심..)|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:08:23|전 카토는 역시 마음에 안들어요!|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-22 04:08:51|그러고보니, 지난기는 기병이셨던 기억이 납니다.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:09:30|?? 나도 몰랐는데.. 하루카님 글보고 아 기병이었구나....기억났는데 그걸 왜 굳이 기억해요 ㅋㅋ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:10:56|..그야 제 국가의 장수인데, 기억하지 못하면 안되지 않을까요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:11:29|아 그랬나.. 깃수 리셋하면 머릿속도 리셋되서 ㅎㅎ;;;|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:12:17|..너무해, 이제 아는 척 안할거야..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:13:41|아하하하하하핳하하하하하하하하하하하하ㅏ하하하하하하하ㅏ하하하하ㅏ하하하하하ㅏ하하핳 ㅈㅅ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-22 04:17:01|그렇게 서로 모르는 사이|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 04:17:07|다시 알아가기로 합시다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 04:17:14|삼모연애시뮬레이션|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 04:17:38|군주와 군주를 결혼시켜서 고려처럼 정부세우죠|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-22 04:19:09|결혼하면 종전각?! ㅌㅌ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-22 04:19:31|결혼하면 통합각|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-22 04:21:33|아 그렇겠네....|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:22:37|..죄송한 말씀이지만 저는 이미 언약을 한 사람이..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:22:50|나 차임? ㅠㅠ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:23:35|비월님은 더 좋은 사람 만나실 수 있을거에요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 진리: | 블소 |2016-01-22 04:24:07|군주 차였다고 합니다|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 04:24:16|이 상황이 불쌍하면 원조주세요|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 04:24:18|ㅈㅁㅁ|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-22 04:24:53|솔...솔로천국..............|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-22 04:25:28|답은 원조교제다!|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-22 04:26:16|경찰아저씨 여기요.|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:27:00|저기 저 비월아저씨에요. 잡아가 주세요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:27:28|왜...왜 저죠???? 에잇 이왕 이리된거 뒷국방에 야사올리고 튄닷!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 진리: | 블소 |2016-01-22 04:28:43|음란마귀들|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 비월: | 블소 |2016-01-22 04:28:59|는 나 뒷국방 올릴줄 모름 ㅎㅎ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:32:02|Diagnosis@da..아..아닙니다|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:32:24|난 지금 하루카님의 상태를 알지 후후후후후후후|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:33:39|저는 지금 졸려서 죽을 것 같아요...|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:34:59|그건 저도 그런데..... 우리 잘어울리네요 결혼하죠|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 하루카: |종횡무진|2016-01-22 04:36:12|..친구로 시작해서 끝내면 안될까요?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 04:39:42|흥핏쳇!!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 狂三: | 블소 |2016-01-22 07:54:07|흐응...|FF0000|FF0000|pic_2353.jpg?=20150204|1 -1| 이루나: |보컬로이드|2016-01-22 10:07:00|심심해|AFEEEE|AFEEEE|default.jpg|0 -1|일본어번역기:|종횡무진|2016-01-22 10:12:06|쿠루미 카와이|FFC0CB|FFC0CB|default.jpg|0 -1| 狂三: | 블소 |2016-01-22 10:22:05|5분장답게 사라지기|FF0000|FF0000|pic_2353.jpg?=20150204|1 -1| 무광: |접속잘안함|2016-01-22 10:25:58|돚거들 잡으러 가고 싶다 완 털리네 ㅜㅜ|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 소드락: |어엿븐소드락|2016-01-22 10:38:52|우리 아님... 아 완이라도 털고 싶다|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 다이스: | 블소 |2016-01-22 10:58:38|소도둑!!! 나쁨 흑흑 귀모 종횡가도 나빠 ㅌㅌㅌ|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 11:00:54|오나라오나라|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 11:01:29|여러분 사랑하기 좋은 계절입니다|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 무광: |접속잘안함|2016-01-22 11:14:46|헐 누가 턴거지 ㅂㄷㅂㄷ|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 하루카: |종횡무진|2016-01-22 11:47:44|으음..저희 귀모장은 지금도 업을 털고있네요..재야의 모든 금쌀을 털 생각인가아..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 샤그니: | 재야 |2016-01-22 12:03:37|이몸이 죽고 죽어 일백번 고쳐죽어|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 샤그니: | 재야 |2016-01-22 12:04:25|백골이 진토되어 넉이라도 있고 없고|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 샤그니: | 재야 |2016-01-22 12:04:43|부관 향한 일편 단심 가실 줄 있으랴|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1|카이사르:|접속잘안함|2016-01-22 12:08:18|재야왕 납셨네|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 청기사: | 블소 |2016-01-22 12:50:39|군주님.. 저흰 끝난 것입니까...?|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 청기사: | 블소 |2016-01-22 12:51:09|우린 진작에 끝났다! 팝콘이나 가져와!!|FF0000|FF0000|pic_2496.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 14:30:23|지하철에서 내리고 계단 올라가는데 어떤 여자가 계단 빠르게 내려오고 닫히는 문속으로 다이빙함|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 14:30:45|보면서 살짝 소름돋음|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 카토: |종횡무진|2016-01-22 14:31:13|카토는 결국 10번의 패배를 기록하고야 말았어요...흑..|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1| 갸오오: | 블소 |2016-01-22 14:31:26|정작 뒤에 따라오는 친구는 못탔지만..|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 14:31:56|10패..부럽습니다|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 갸오오: | 블소 |2016-01-22 14:33:11|일부로 던지면서 해도 하기힘든 10패..|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 감정: |접속잘안함|2016-01-22 14:43:44|2승 4패 ㅠㅠ 더돌려야되나|FFFFFF|FFFFFF|default.jpg|0 -1| 하루카: |종횡무진|2016-01-22 14:46:17|혹시 그 여성분..아이실드를 착용하고 있었나요..?|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 갸오오: | 블소 |2016-01-22 15:00:20|엌.. 두꺼운 패딩이였습니다. 그 속에 아이실드를 입었을 수도 ㅌㅌ|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| 비밀: | 블소 |2016-01-22 16:11:29|비밀스럽게 등장하고 비밀스럽게 퇴장한다|FF0000|FF0000|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 16:12:37|하루 5회이상 접속금지! 역시 국명값이군요! ㅌㅌ|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 16:12:58|끄앙 방사...|FFFFFF|FFFFFF|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-22 17:00:55|헐 내가 저거 먹고 완 탈취 하려고 했는데... ㅠㅠ 뺏겼다...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 하루카: |종횡무진|2016-01-22 17:04:48|근위는 하루카의 must-have에요!|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1|잠둥이션:|종횡무진|2016-01-22 17:07:42|하루카는 너구리의 must-have에요!|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 소드락: |어엿븐소드락|2016-01-22 17:09:37|젠장 장안 치안 몇이에요?|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 진리: | 블소 |2016-01-22 17:09:50|0 예상|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 17:09:56|0 ~높아봐야 2000|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 소드락: |어엿븐소드락|2016-01-22 17:12:31|양양까지 가야되나.... 가는길에 완에 들려보면 되겠네|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-22 17:16:54|군면제라 좋아해야하나 말아야 하나..|FFFFFF|FFFFFF|default.jpg|0 -1| 이루나: |보컬로이드|2016-01-22 17:19:48|장단점이 있지요..|AFEEEE|AFEEEE|default.jpg|0 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-22 17:21:16|장점은..?|FFFFFF|FFFFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-22 17:22:29|하스 클린덱 만들다가 등급 다 떨어진당|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 17:22:33|하나만 하자니 노잼..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 이루나: |보컬로이드|2016-01-22 17:25:40|남들 군대2년동안 200원시급 받고 노예짓할동안 밖에서 최저시급받고 개인공부가 된다는것?|AFEEEE|AFEEEE|default.jpg|0 -1| 이루나: |보컬로이드|2016-01-22 17:26:15|본인이 군생활 28일남은상태에서 말해드리는거임!|AFEEEE|AFEEEE|default.jpg|0 -1| 샤그니: | 재야 |2016-01-22 17:37:27|단점은|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 샤그니: | 재야 |2016-01-22 17:37:44|사회 모든곳에서 군대도 안간놈 취급을 받는다는것|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1|ㄷㄱㅎㅈㄷㅀ:|접속잘안함|2016-01-22 17:41:30|키잇...|FFFFFF|FFFFFF|default.jpg|0 -1|고긔가먹고싶:|보컬로이드|2016-01-22 17:41:50|재야왕이여. 저장된 금쌀은 츙분한가.|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 샤그니: | 재야 |2016-01-22 17:44:14|나 재야왕 선양한지 오랜데|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 이루나: |보컬로이드|2016-01-22 17:50:29|근데 막막하다.. 전문하사할까봐ㅣ|AFEEEE|AFEEEE|default.jpg|0 -1| 정휘인: |보컬로이드|2016-01-22 17:59:39|중위진 앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 무광: |접속잘안함|2016-01-22 18:45:57|도둑이야|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 소드락: |어엿븐소드락|2016-01-22 19:05:08|와 진짜 누구지 괴도네 괴도|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 무광: |접속잘안함|2016-01-22 19:11:04|저희국은 주민복지를 위해 국고가 텅텅비었습니다 털지마세욤|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 감정: |접속잘안함|2016-01-22 19:17:01|지급율이 무려 200%!|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 19:17:04|지급율이 무려 200%!|FFFFFF|FFFFFF|default.jpg|0 -1| 비월: | 블소 |2016-01-22 19:17:28|괴도 쿠요..............|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 쿠요: |어엿븐소드락|2016-01-22 19:19:42|흠칫|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-22 19:20:56|음... 다른나라에 들어가서 템이 사지나요 ?|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-22 19:21:36|앗 방사..|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 진리: | 블소 |2016-01-22 19:25:38|살 수 있음|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 무광: |접속잘안함|2016-01-22 19:40:31|저놈 자바라|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 감정: |접속잘안함|2016-01-22 19:58:19|도둑잡아라@@@|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 20:04:51|물어볼거있는데 소드락국 탈취 어떻게함? 사곡에서 완까지 계략거리 안닿는데 ㅇㅁㅇ...??|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 20:05:34|완에서 사곡 계략못거는뎅 ㅇㅅㅇ..|FFFFFF|FFFFFF|default.jpg|0 -1|강서유서:|종횡무진|2016-01-22 20:12:57|확률은 낮지만 3칸도 가능합니다..|FFC0CB|FFC0CB|default.jpg|0 -1| 무광: |접속잘안함|2016-01-22 20:13:06|ㄹㅇ 어떤 돚거께서 자꾸 터시고 계시는 지|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 감정: |접속잘안함|2016-01-22 20:22:39|3칸도 된다니 몰랐네...|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-22 20:22:43|버그인줄|FFFFFF|FFFFFF|default.jpg|0 -1| 진리: | 블소 |2016-01-22 20:25:49|3칸이상은 그냥 도박임|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 20:26:08|확률이 거지라서 시도에 쓴 금쌀 > 탈취량|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 20:26:26|그런데도 털고있음|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 진리: | 블소 |2016-01-22 20:36:02|명전노리나..|FF0000|FF0000|pic_3989.jpg?=20160101|1 -1| 쿠요: |어엿븐소드락|2016-01-22 22:33:03|아무리 첩보를 돌려봐도 치안 6천이 없넹..|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-22 22:35:40|ㅈ....제보 받아요|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-22 22:38:01|허창 6천이에요.|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 비월: | 블소 |2016-01-22 22:38:46|허창 치안 6238입니다!|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 소드락: |어엿븐소드락|2016-01-22 22:39:04|등잔 밑이 어두운 법이지|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 비월: | 블소 |2016-01-22 22:39:07|6283이구나 ㅌㅌ|FF0000|FF0000|pic_233.jpg?=20140830|1 -1| 415161: | 재야 |2016-01-22 23:19:59|다음기가 61기입니까?|FFFFFF|FFFFFF|default.jpg|0 -1| 다이스: | 블소 |2016-01-22 23:24:27|넹|FF0000|FF0000|pic_1135.jpg?=20160114|1 -1| 쿠요: |어엿븐소드락|2016-01-22 23:30:50|【허창】(으)로 강행|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-22 23:30:54|허창에서 뵈요 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 갸오오: | 블소 |2016-01-22 23:45:00|롤 일본음성 패치법 아시는 분 갠매점ㅌㅌ|FF0000|FF0000|pic_3128.jpg?=20160114|1 -1| KAITO: |보컬로이드|2016-01-22 23:45:23|저희도 6000 넘는거 하나 있긴 한데 비밀|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 쿠요: |어엿븐소드락|2016-01-22 23:47:29|ㅅ...사실 알긴합니다만 거긴 너무 멀어서 포기했어요 ㅠㅠ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 소드락: |어엿븐소드락|2016-01-22 23:50:00|다음기 하려나...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 쿠요: |어엿븐소드락|2016-01-23 00:04:04|지금 허창엔 3개국가의 사람들이 모여있습니다 ..!|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 무광: |접속잘안함|2016-01-23 00:07:15|저도 사러 가고 싶군요|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 소드락: |어엿븐소드락|2016-01-23 00:08:59|와 진자 우리나라 사람이지만 개신기 하시네...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 소드락: |어엿븐소드락|2016-01-23 00:09:15|어떻게 성공하는거지...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 하루카: |종횡무진|2016-01-23 00:17:37|3칸 계략이 엄청 확률이 낮은데 도적이나 귀모 보정은 걍 그대로 +되니까 의외로 들어가는것 같아요..|FFC0CB|FFC0CB|pic_4006.jpg?=20160112|1 -1| 무광: |접속잘안함|2016-01-23 00:27:06|ㅂㄷㅂㄷ 완 경찰양성중|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| SARS: |종횡무진|2016-01-23 03:28:01|소드락 왜 임금이에여?|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 무광: |접속잘안함|2016-01-23 06:37:43|수고하셨습니다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1|강서유서:|종횡무진|2016-01-23 06:40:49|수고하셨습니다 이제 자요 흑흑|FFC0CB|FFC0CB|default.jpg|0 -1| 쿠요: |어엿븐소드락|2016-01-23 07:06:52|저처럼 랜임으로 이나라 들어오는 희생자를 줄이기 위해서....?|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-23 07:07:23|블소분들 수고하셨습니다!|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 狂三: | 재야 |2016-01-23 08:06:32|흐음...|FFFFFF|FFFFFF|pic_2353.jpg?=20150204|1 -1| 소드락: |어엿븐소드락|2016-01-23 08:10:04|말했다 시피 이 배는 곧 침몰할 예정이라...|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 소드락: |어엿븐소드락|2016-01-23 08:11:35|랜임 하실분은 안전하게 지뢰국을 피할수 있을겁니다|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 카토: |종횡무진|2016-01-23 09:15:25|블소 여러분 고생하셨어요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1| 니콜: | 재야 |2016-01-23 10:25:12|랜덤임관해욧|FFFFFF|FFFFFF|pic_3744.jpg?=20151022|1 -1| 이루나: |보컬로이드|2016-01-23 10:30:26|'ㅇ';; 요즘은 벌써 누가 2인남을지 보이네요 ..|AFEEEE|AFEEEE|default.jpg|0 -1| 희지재: | 재야 |2016-01-23 10:57:19|나라가 망한지 몇년이 흘렀군...|FFFFFF|FFFFFF|pic_2802.jpg?=20150908|1 -1| 니쉬: |접속잘안함|2016-01-23 10:57:29|블소분들 수고하셨어유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 소드락: |어엿븐소드락|2016-01-23 11:36:16|와 황건적 세수가 몇천이 날라가네|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 샤그니: | 재야 |2016-01-23 12:53:34|부관님이 재야에 있는데 어찌 재야를 떠나리오|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1|카이사르:|접속잘안함|2016-01-23 14:06:24|재야왕 화이팅!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 니쉬: |접속잘안함|2016-01-23 14:08:07|재야의 공기는 좋습니까아...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 감정: |접속잘안함|2016-01-23 14:27:23|이번기 왤캐운이좋져...|FFFFFF|FFFFFF|default.jpg|0 -1| 플젠: | 재야 |2016-01-23 15:17:58|와 개꿀 이번기 벌써끝나네 히히 해방이당|FFFFFF|FFFFFF|pic_2524.jpg?=20160119|1 -1| 아소: |접속잘안함|2016-01-23 15:22:10|아소가 접속잘안함~|FFFFFF|FFFFFF|default.jpg|0 -1| 비월: | 재야 |2016-01-23 15:30:37|망했군.............. 이제 잠도 맘대로 자고 돌겜도 맘대로 해야지 이히힛|FFFFFF|FFFFFF|pic_233.jpg?=20140830|1 -1| 진리: |접속잘안함|2016-01-23 15:44:23|돌겜하시나|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-01-23 15:44:37|돌겜 새 덱 만들다가 포풍 털리는중|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 비월: | 재야 |2016-01-23 15:52:56|탈진도적 개꿀... 힘들긴하고 어리도 아프지만 재밋음 ㅋㅋㅋㅋ|FFFFFF|FFFFFF|pic_233.jpg?=20140830|1 -1| 진리: |접속잘안함|2016-01-23 16:16:47|손에 잘 안잡히면 고자행|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-01-23 16:16:57|탈진도적할때 노루만나면 자군야포 쳐맞고 집가야됨 ㅠㅠ|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 이루나: |보컬로이드|2016-01-23 16:33:20|할꺼 더럽게없다|AFEEEE|AFEEEE|default.jpg|0 -1| 이루나: |보컬로이드|2016-01-23 17:14:27|휴대폰이 없어서 가입을 못한다니;;|AFEEEE|AFEEEE|default.jpg|0 -1| SARS: |종횡무진|2016-01-23 17:15:54|귀모라서 도적국갈려니까 안 받아줌 이뭐..|FFC0CB|FFC0CB|pic_3797.jpg?=20160108|1 -1| 쿠요: |어엿븐소드락|2016-01-23 17:20:30|하하하...|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 카토: |종횡무진|2016-01-23 21:10:40|맹수병 부러워요!|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-23 21:42:08|고양이~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-23 21:42:17|얼룩 고양이~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|고긔가먹고싶:|보컬로이드|2016-01-23 21:50:12|웅담이먹고싶|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-01-23 21:50:20|올턴모반|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 니쉬: |접속잘안함|2016-01-23 22:07:49|훌륭한 신하로서의 자세이십니다.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 정휘인: |보컬로이드|2016-01-23 22:16:09|군인의 주적은 간부!|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1| 정휘인: |보컬로이드|2016-01-23 22:16:16|그러므로 중위진 앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|잠둥이션:|종횡무진|2016-01-23 22:29:32|전군! 나를 따르라!|FFC0CB|FFC0CB|pic_3944.jpg?=20151116|1 -1| 감정: |접속잘안함|2016-01-23 22:30:00|공성충차가 저기가서 출병하고싶습니다|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-23 22:30:49|접속잘안함국근처에 몇개만공백지만들어주세양 후후...⊙◆⊙|FFFFFF|FFFFFF|default.jpg|0 -1|하기싫은데:|보컬로이드|2016-01-23 22:34:33|혜리가 남겨준 유산인 정예정란79기가 이렇게 사라지는구나...|AFEEEE|AFEEEE|default.jpg|0 -1| 비월: |보컬로이드|2016-01-23 22:40:21|담기엔 지장이나 해야징|AFEEEE|AFEEEE|pic_233.jpg?=20140830|1 -1| 소드락: |어엿븐소드락|2016-01-23 23:43:43|접속 안함이 호로 치면 방랑 타야지|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 쿠요: |어엿븐소드락|2016-01-24 00:21:54|방랑방랑 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 카토: |종횡무진|2016-01-24 00:33:13|카토가 졌어요...ㅠㅠ|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1|하기싫은데:|보컬로이드|2016-01-24 00:57:26|혜리 보고있나? 185년에 징병한 정란이 197년에 전멸했다! 부덕한 군주같으니라고...|AFEEEE|AFEEEE|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-24 00:59:08|아카리내사랑 ㅠ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 비월: |보컬로이드|2016-01-24 01:05:59|●특기 【징병】(을)를 익혔습니다! // 보임 양파의 흔적임|AFEEEE|AFEEEE|pic_233.jpg?=20140830|1 -1| 카토: |종횡무진|2016-01-24 01:19:31|뭐라도 전특만 떴으면 좋겠어요..|FFC0CB|FFC0CB|pic_4007.jpg?=20160122|1 -1|하기싫은데:|보컬로이드|2016-01-24 04:43:30|무장신중..?|AFEEEE|AFEEEE|default.jpg|0 -1| 다이스: | 재야 |2016-01-24 09:14:35|전쟁의 다이스를 굴려보장|FFFFFF|FFFFFF|pic_1135.jpg?=20160114|1 -1| 하연주: |어엿븐소드락|2016-01-24 09:26:54|템사고 싶은데 치안6000인 곳 어디 없나요..|FFA500|FFA500|pic_23.jpg?=20160114|1 -1| 소드락: |어엿븐소드락|2016-01-24 09:32:58|알려주시면 원조 dream|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1|야근탈출:|보컬로이드|2016-01-24 09:47:19|위례요|AFEEEE|AFEEEE|pic_2926.jpg?=20151115|1 -1| 이루나: |보컬로이드|2016-01-24 11:58:20|왠지 너무빨리진행되는ㄴ낌;|AFEEEE|AFEEEE|default.jpg|0 -1|카이사르:|접속잘안함|2016-01-24 12:07:04|보호색이 있으니 헷갈린다아...!!!!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|북두칠성:|접속잘안함|2016-01-24 12:11:23|장균 잘 계시옵니까아아아|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-24 12:11:52|저는 좋은 복지 받으며 그럭저럭 잘 지내옵니다아아아|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|잠둥이션:|종횡무진|2016-01-24 12:33:51|그대가 없는 나는 빛을 잃고 생을 잃어가는 남루한 선비일 따름이오.|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 다이스: | 재야 |2016-01-24 12:35:52|보컬이랑 종횡이랑 색깔이 비슷하당.. 보호색인가!!|FFFFFF|FFFFFF|pic_1135.jpg?=20160114|1 -1|북두칠성:|접속잘안함|2016-01-24 12:39:48|내 눈에는 또렷이 구분되는데용|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-24 12:40:24|안과한번 들리시는것이.......(걱정 반 농담 반)|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-24 12:41:22|장균~~~~ 다음 생에도장균의 수하가 되고 싶나이다앗😇😇😇😇😇😇😇😇|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-24 12:43:31|광활한 너구리 제국의 부흥을 위하여 언제나 밝게 빛나는 북두칠성이 항상 장균의 앞길을 환하게 비추겠나이닷아아아아|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 이루나: |보컬로이드|2016-01-24 12:46:35|북두칠성.. 화천에서 참 밝게 보이던데|AFEEEE|AFEEEE|default.jpg|0 -1| くま: |보컬로이드|2016-01-24 12:47:42|원조 후 탈취...인가|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 소드락: |어엿븐소드락|2016-01-24 12:49:06|... 아니 원조는 위례 치안을 알려주신것에 대한 보답이고... 탈취는 저희가 아닌거 같습니다|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 이루나: |보컬로이드|2016-01-24 12:51:05|예전 도적국해서 탈취잼잼했는데 그립다|AFEEEE|AFEEEE|default.jpg|0 -1| くま: |보컬로이드|2016-01-24 12:51:28|탈취는 무섭습니다 ㅠㅠ 계락장님 자비좀.... (또르르)|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 카토: |종횡무진|2016-01-24 13:02:05|전특이 망했어요.. 더 이상 꿈도 희망도 없어요...|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1|북두칠성:|접속잘안함|2016-01-24 13:07:22|탈취는 어캐하미??? 나도 할 수 있나미?? 궁금하미..... 하고싶다능......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 이루나: |보컬로이드|2016-01-24 13:07:37|계략보면 탈취가능해영 !|AFEEEE|AFEEEE|default.jpg|0 -1| 소드락: |어엿븐소드락|2016-01-24 13:20:44|●봉급으로 금 5663을 받았습니다.|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1|북두칠성:|접속잘안함|2016-01-24 13:22:19|그대의 봉급이 내 전 제산과 같구려|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-24 13:22:37|이거이거 삼모에서도 빈부격차가.......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 13:33:42|https://docs.google.com/forms/d/1Z7X3ohHhJUG-klN2GN_0M8vJ5wwyqhj_7fZ9Ov2PtYM/viewform?usp=send_form|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 13:34:07|우리 형님 누님들 설문조사한번... 굽신굽신|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 소드락: |어엿븐소드락|2016-01-24 13:41:04|쿨탐 되서 의병장 소환 했더니 200% 못받음 ㅠㅠ|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 이루나: |보컬로이드|2016-01-24 13:46:23|현대는 투표하기가 싫다!|AFEEEE|AFEEEE|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-24 14:02:47|모두 맛점하세욧! ㅋㅋ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 하연주: |어엿븐소드락|2016-01-24 14:06:10|●12월:위례(으)로 강행했습니다. 12:45 // ●1월:흑색마(+6)(을)를 구입했습니다. 13:45|FFA500|FFA500|pic_23.jpg?=20160114|1 -1| 하연주: |어엿븐소드락|2016-01-24 14:06:38|험난한 여정 끝에 희귀하다는 흑색마를 구입하였습니다. 길들이기가 힘들군영.|FFA500|FFA500|pic_23.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 14:08:43|오호 그게 되는군요..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 소드락: |어엿븐소드락|2016-01-24 14:12:06|어서 돌아오셔서 돈 버세요 국고가 텅텅|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 다이스: | 재야 |2016-01-24 16:16:20|자동차도 없는데 저런 설문이라니!!!!|FFFFFF|FFFFFF|pic_1135.jpg?=20160114|1 -1| 다이스: | 재야 |2016-01-24 16:16:29|그나저나 간편주소 되지 않나요|FFFFFF|FFFFFF|pic_1135.jpg?=20160114|1 -1| 다이스: | 재야 |2016-01-24 16:17:11|설문지 간편주소 되던거 같은데..|FFFFFF|FFFFFF|pic_1135.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 18:13:30|;; 그렇군요 ㅋㅋ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 니콜: |보컬로이드|2016-01-24 20:39:14|소나타 타다가 버스랑 박았는데 에어백이 안터졌어요 ㅠ|AFEEEE|AFEEEE|pic_3744.jpg?=20151022|1 -1| くま: |보컬로이드|2016-01-24 20:42:29|네...?|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1|하기싫은데:|보컬로이드|2016-01-24 20:43:02|ㄷㄷㄷ 괜찮으신가여;;|AFEEEE|AFEEEE|default.jpg|0 -1| 다이스: |보컬로이드|2016-01-24 21:03:29|진짜 교통사고 나셨네 ㄷㄷㄷ|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 21:13:38|헐 괜찮으세요?|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 다이스: |보컬로이드|2016-01-24 21:15:40|버스랑 승용차랑 부딪히면 승용차는 그야말로... 쿠킹호일처럼 구겨지던데..|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 다이스: |보컬로이드|2016-01-24 21:15:49|이 추운날에 ... ㄷㄷㄷ|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 소드락: |어엿븐소드락|2016-01-24 21:45:53|누가 외양간에 보일러좀 놔주세요 얼어 죽겠어요|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 21:47:00|창문이 얼었어요ㅜ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|바닥을탁치고:|보컬로이드|2016-01-24 22:26:57|노자!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 니쉬: |접속잘안함|2016-01-24 22:34:40|유닉은 조흔겁니다아|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 감정: |접속잘안함|2016-01-24 23:13:35|내가판유닠이 히데디님에게갔다!|FFFFFF|FFFFFF|default.jpg|0 -1| HideD: |접속잘안함|2016-01-24 23:14:57|으잉 왠 책.|FFFFFF|FFFFFF|pic_781.jpg?=20151012|1 -1| 정휘인: |보컬로이드|2016-01-25 01:41:49|중위진 앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|하기싫은데:|보컬로이드|2016-01-25 02:01:50|ㄷㄷ|AFEEEE|AFEEEE|default.jpg|0 -1| 다이스: |보컬로이드|2016-01-25 09:05:59|진리님의 재난이 현실에 영향을..|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 쿠요: |어엿븐소드락|2016-01-25 09:21:54|오늘밤 낙양의 금쌀을 훔쳐가겠어요 - 괴도 K|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 소드락: |어엿븐소드락|2016-01-25 10:34:35|여기다 선포한 나라는 전부 뒤가 안좋은데 지금이라도 무르시는게?|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 카토: |종횡무진|2016-01-25 12:23:55|강궁 아파요....|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 카토: |종횡무진|2016-01-25 12:34:55|◆성 【카토】 2323 (-2481) VS 0 (-10000) 【】성벽 사람 치러 가서 벽만 쳤네요...|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1|바닥을탁치고:|보컬로이드|2016-01-25 12:37:19|나니!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| くま: |보컬로이드|2016-01-25 12:46:46|가난한 사람들을 괴롭히다니...|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| くま: |보컬로이드|2016-01-25 12:47:48|헤헤.. 감사합니다|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 카토: |종횡무진|2016-01-25 12:47:52|도적국이 그토록 염원하던 쌍 특성 탈취가 가능해졌군요!|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 쿠요: |어엿븐소드락|2016-01-25 12:50:05|큿... 멸망하기전에 장안 한번 터는게 꿈이었건만 이루어지리다 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-25 13:00:49|고향에 끌려내려가야되서 의욕이 없었는데, 뭔가 그 와중에 숙련은 많이 올랐네요..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-25 13:19:04|먹티군주는 죽어버려요!|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 하루카: |종횡무진|2016-01-25 13:21:39|카토가 한 치명적인 실수들을 생각해보면 카토부터 죽어야하지 않을까요..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-25 13:25:26|..? 저격에 4필살이라니, 자객병 강해요..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-25 13:26:58|제게 더 강해요!|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 이루나: |보컬로이드|2016-01-25 13:40:47|2주안에 천통나오겠네|AFEEEE|AFEEEE|default.jpg|0 -1| 비밀: |접속잘안함|2016-01-25 13:53:46|비밀스럽게 이나라 저나라 바꾼다|FFFFFF|FFFFFF|default.jpg|0 -1| 비밀: |접속잘안함|2016-01-25 13:53:54|그리고 접속을 잘 안하겠다|FFFFFF|FFFFFF|default.jpg|0 -1| 쿠요: |어엿븐소드락|2016-01-25 14:45:13|꿈은 이루어진다 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|카가미네렌:|보컬로이드|2016-01-25 16:23:00|!!|AFEEEE|AFEEEE|default.jpg|0 -1| 진리: |접속잘안함|2016-01-25 16:23:24|적토마|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 쿠요: |어엿븐소드락|2016-01-25 16:56:41|ㅊㅊㅊㅊㅊ|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|잠둥이션:|종횡무진|2016-01-25 17:00:10|남문으로 병력을 집결하라! 적들이 넘어오거늘 한차례 숨을 죽인뒤 궁기를 이용해 요격하도록 하라!|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 니쉬: |접속잘안함|2016-01-25 17:21:08|요즘 추운데 너구리 털은 좀 따뜻한가유?|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|고긔가먹고싶:|보컬로이드|2016-01-25 17:31:40|사유재산몰수라늬 멧돌손잡이가 없네!|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 다이스: |보컬로이드|2016-01-25 18:14:15|나에겐 무한 환약이 있다!|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1|북두칠성:|접속잘안함|2016-01-25 18:38:33|◆공 등갑【북두칠성】 5982 (-2673) VS 2343 (-5508) 【박일아】중장|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-25 18:38:46|미안합니다아 크윽|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-25 18:39:29|장균...... 더 이상은...... 크흑......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|잠둥이션:|종횡무진|2016-01-25 19:38:39|아직 희망은 있도다. 내 홀홀단신으로 서역으로가 20만 대군을 빌려서 오겠소.|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 쿠요: |어엿븐소드락|2016-01-25 19:43:53|야....야만족 ?!|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 카토: |종횡무진|2016-01-25 20:28:11|다 주시지 너무해요 25라니..|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1|잠둥이션:|종횡무진|2016-01-25 21:00:24|적의 공성이 시작된다! 남문에 궁시를 집중하라!|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 6974: |종횡무진|2016-01-25 21:47:01|https://www.youtube.com/watch?v=kNAJE1mXwW0|7FFFD4|7FFFD4|pic_1794.jpg?=20150804|1 -1| 6974: |종횡무진|2016-01-25 21:47:05|보컬로이드가고싶어요|7FFFD4|7FFFD4|pic_1794.jpg?=20150804|1 -1|잠둥이션:|종횡무진|2016-01-25 22:15:44|등갑병의 위력은 너무 강력합니다.|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 쿠요: |어엿븐소드락|2016-01-25 22:16:16|헉.... 템들을 샀는데 가장 중요한 환약을 사지 않았다니..|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|북두칠성:|접속잘안함|2016-01-25 22:29:22|장균 제가 돌격하나이다 그 군대는 자그마치 8000만 대군이올시다........ 등갑병이옵지여|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-25 22:30:11|장균의 목은 제 손으로 크흑......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-25 22:30:25|주군의 목은 제가....... 크흑|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-25 22:30:56|사스님은....... 못본척할테니....... 도.....망....... 크흑......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|잠둥이션:|종횡무진|2016-01-25 22:36:46|전군 궁시를 준비하라! 성도성을 잃으면 안 된다!|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1|잠둥이션:|종횡무진|2016-01-25 22:37:02|곧 서역에서 30만 대군이 원군으로 온다! 조금만 버티어라!|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1|북두칠성:|접속잘안함|2016-01-25 22:49:55|원군은 안 오옵니닷 장균 포기하소서|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 쿠요: |어엿븐소드락|2016-01-25 22:50:32|우오 ! 내가 바로 홍농의 대도. 쿠요다 !|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1|잠둥이션:|종횡무진|2016-01-25 22:51:31|동문 앞에 가장 밝게 빛나고 있는 자가 명장 북두칠성이니라 궁시를 저쪽으로 집중하라!|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 샤그니: | 재야 |2016-01-25 23:11:16|내 전쟁으로 인해 고통받는 민초들이 불쌍하여 재야를 떠돌면 모은 곡식을 싸게 넘길테니 거래장을 보시구려|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 다이스: |보컬로이드|2016-01-25 23:20:44|내 저격화살에 쓰러져라~~|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1|랜임1분장:|보컬로이드|2016-01-26 00:04:09|쌀도없는백성들이거늘 쌀을 구매할 금은 어디서나온단 말이오?|AFEEEE|AFEEEE|pic_3063.jpg?=20151213|1 -1| KAITO: |보컬로이드|2016-01-26 00:18:07|◆판매자의 군량 부족으로 75번 거래 유찰! 이러지 마여...|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 니쉬: |접속잘안함|2016-01-26 00:22:45|=_= b|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 하루카: |종횡무진|2016-01-26 10:00:35|원조받고싶다 근데 국가가 없다..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-26 10:04:28|깡기병 그만 쓰게 망하고 싶어요...|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 대악마: |종횡무진|2016-01-26 10:04:44|원조주시면 임관하러갈테니 원조좀|7FFFD4|7FFFD4|default.jpg|0 -1| 카토: |종횡무진|2016-01-26 10:05:53|말 사주시면 달려가요|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| KAITO: |보컬로이드|2016-01-26 10:23:06|헤헤|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 소드락: |어엿븐소드락|2016-01-26 10:39:45|아직 살아 있군... 낙양이나 털어야지|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 하루카: |종횡무진|2016-01-26 11:07:57|보병명장 수뇌자원 닭가슴살에 팔려가욧..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 샤그니: | 재야 |2016-01-26 11:10:55|그 잠깐사이에 산적이 곡식을 훔쳐갈줄 누가 알았으리오|FFFFFF|FFFFFF|pic_1014.jpg?=20160117|1 -1| 소드락: |어엿븐소드락|2016-01-26 11:37:10|이곳에 금쌀은 모두 저기에 있소. 성도를 빼앗는자가 내 보물을 모두 손에 넣을수 있소이다|FFA500|FFA500|pic_3774.jpg?=20150723|1 -1| 하루카: |종횡무진|2016-01-26 11:37:36|성도 가난해요.|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-26 11:44:48|?!..원조 감사합니다..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1|바닥을탁치고:|보컬로이드|2016-01-26 12:26:43|1책 12법|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 쿠요: |어엿븐소드락|2016-01-26 12:31:40|흑흑흐|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 쿠요: |어엿븐소드락|2016-01-26 14:00:26|우와 마초님 저격맞고도 5필살 .....|FFA500|FFA500|pic_2457.jpg?=20150615|1 -1| 하루카: |종횡무진|2016-01-26 14:13:11|하루카는 저격을 잘해요|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 장임: |접속잘안함|2016-01-26 14:16:56|알보병이 등갑을 쳐바르네 아이구 ㅠㅠ|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|카이사르:|접속잘안함|2016-01-26 14:19:41|소드락국 장수분들 수고하셨습니다아~!!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|바닥을탁치고:|보컬로이드|2016-01-26 14:21:03|고생하셨습니다..|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 청기사: |보컬로이드|2016-01-26 14:22:13|예쁜 소드락분들 고생하셨습니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160114|1 -1| KAITO: |보컬로이드|2016-01-26 14:23:48|소드락국 분들 수고하셨어요|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 카토: |종횡무진|2016-01-26 14:24:12|소드락국분들 수고하셨어요|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 하루카: |종횡무진|2016-01-26 14:26:34|보병..강해요..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 소드락: | 재야 |2016-01-26 14:40:59|금1400 쌀1488을 획득했습니다. 도주하며 금1132 쌀737을 분실했습니다. 개이득?|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| KAITO: |보컬로이드|2016-01-26 14:50:15|삼모 사상 성도 성벽이 도끼 유지된 상태에서 제일 많이 까인듯|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 카토: |종횡무진|2016-01-26 14:51:39|어제 6만보고 잤는데 줄 지 않고 계속 늘어나요 후...|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 이루나: |보컬로이드|2016-01-26 14:58:57|..내눈에 보이는 성도 성벽이 사실인가|AFEEEE|AFEEEE|default.jpg|0 -1| 하루카: |종횡무진|2016-01-26 15:02:19|나나님 저거 도끼가 아니라 칼인ㄷ..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| KAITO: |보컬로이드|2016-01-26 15:02:45|마음은 아직도 부족전쟁에 있나봐요|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 하루카: |종횡무진|2016-01-26 15:03:14|..그러다 다음엔 도끼가 아니라 바리깡으로 보이시겠는데요|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| KAITO: |보컬로이드|2016-01-26 15:05:36|그전에 데스스타로 보이겠죠|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 하루카: |종횡무진|2016-01-26 15:08:31|..아니 몇개를 거쳐오신거야 대체?!|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 박희수: |보컬로이드|2016-01-26 15:13:52|안거친 사람이 적을텐데...|AFEEEE|AFEEEE|default.jpg|0 -1| 카토: |종횡무진|2016-01-26 15:19:01|깡기라 슬퍼요...|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| KAITO: |보컬로이드|2016-01-26 15:22:59|등갑살려|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| KAITO: |보컬로이드|2016-01-26 15:23:11|그러고보니 근위를 쓸 수 있구나|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 카토: |종횡무진|2016-01-26 15:24:06|맹수만 주시면 안될까요|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 하루카: |종횡무진|2016-01-26 15:24:09|후후, 깡보병이 제일 쌥니다. 깡보쓰세요.|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 하루카: |종횡무진|2016-01-26 15:24:25|맹수 나와도 쌀없어서 금지야 이 트롤카토야;|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-26 15:25:27|몸 팔아서 벌어오셈|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 하루카: |종횡무진|2016-01-26 15:26:36|카토 금1만 쌀1만에 팝니다 원조오면 바로 망명장 태워 보내드려요|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 카토: |종횡무진|2016-01-26 15:29:40|? 인신매매보소..|7FFFD4|7FFFD4|pic_4007.jpg?=20160122|1 -1| 하루카: |종횡무진|2016-01-26 15:29:49|몸 팔아서 벌라며..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-26 15:34:49|비쌈|AFEEEE|AFEEEE|pic_2496.jpg?=20160114|1 -1| 소드락: | 재야 |2016-01-26 15:36:14|아 그정도면 제가 살걸 그랬네요 세배까진 드릴수 있었는데 진작 말하시지|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 하루카: |종횡무진|2016-01-26 15:37:21|저희국이 다 비싼데 카토만 좀 싸요|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1|카이사르:|접속잘안함|2016-01-26 15:54:47|성도 함락이 되질않는다...|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 橙: |보컬로이드|2016-01-26 16:00:28|커어억|AFEEEE|AFEEEE|pic_3446.jpg?=20160126|1 -1| 하루카: |종횡무진|2016-01-26 16:08:21|성도는 성도 높아요|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1| 橙: |보컬로이드|2016-01-26 16:57:36|커-어억|AFEEEE|AFEEEE|pic_3446.jpg?=20160126|1 -1| 이루나: |보컬로이드|2016-01-26 16:59:20|담깃수 충차나해야겠가|AFEEEE|AFEEEE|default.jpg|0 -1|잠둥이션:|종횡무진|2016-01-26 16:59:49|귀국의 서열 6위이자 전장의 선봉에서 수많은 적들을 쓰러뜨리는 서촉의 명장 너구리는 얼마입니까?|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 하루카: |종횡무진|2016-01-26 17:00:53|오동통통 농심 너구리 한마리에 690원..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1|잠둥이션:|종횡무진|2016-01-26 17:01:45|아닐 겁니다. 그의 무공은 하늘이 알아주고, 저 깊숙한 바다에도 널리 퍼져 바다의 악당 오징어도 겁에 지린다고 들었습니다.|7FFFD4|7FFFD4|pic_3944.jpg?=20151116|1 -1| 하루카: |종횡무진|2016-01-26 17:03:33|오징어보단 비쌀거에요..|7FFFD4|7FFFD4|pic_4006.jpg?=20160112|1 -1|고긔가먹고싶:|보컬로이드|2016-01-26 17:10:02|여러분의 입대를 환영합니다.|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 이루나: |보컬로이드|2016-01-26 17:27:16|전역 D-DAY 24|AFEEEE|AFEEEE|default.jpg|0 -1|북두칠성:|접속잘안함|2016-01-26 17:32:58|장균 서열이 낮습니당 흑흑|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|카이사르:|접속잘안함|2016-01-26 19:07:20|서열이라..|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| Anes: |접속잘안함|2016-01-26 19:13:33|종횡무진분들 수고하셨습니다|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| 니쉬: |접속잘안함|2016-01-26 19:13:57|종횡무진분들 수고하셨습니다.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|카이사르:|접속잘안함|2016-01-26 19:14:33|성도에서 농성한다고 고생많으셨습니다. 이제는 접속국에 오셔서 천통쟁을 즐겨보세요~|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|바닥을탁치고:|보컬로이드|2016-01-26 19:15:35|고생하셨습니다 종횡무진분들|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| KAITO: |보컬로이드|2016-01-26 19:18:59|종횡무진 분들 수고하셨어요~|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 카토: | 재야 |2016-01-26 19:23:24|6말에 노예 데려갈 주인찾아요 흑..|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1| KAITO: |보컬로이드|2016-01-26 19:24:11|오세요 6말|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 니쉬: |접속잘안함|2016-01-26 19:25:08|군주거나 사유재산이 많으면 바로 모셨을텐대 : (|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 무광: |접속잘안함|2016-01-26 19:26:18|수고하셨습니다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 카토: | 재야 |2016-01-26 19:26:37|아얄 주소가 안 먹히는데 알려주실 분...?|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1|바닥을탁치고:|보컬로이드|2016-01-26 19:27:17|222.122.47.78 입니다 카토님|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 무광: |접속잘안함|2016-01-26 19:27:57|연결해제 하시고 222.122.47.78 포트 6667|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 카토: | 재야 |2016-01-26 19:28:26|감사합니다 ㅎ|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-26 19:33:00|물질주의?!|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |보컬로이드|2016-01-26 19:35:02|속물카토에요..ㅠㅠ|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-26 19:38:47|**카토님은 뇌물에 약하다. 메모메모|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|잠둥이션:| 재야 |2016-01-26 19:41:05|이제 속세에서 일은 끝났으니 내 산속으로 들어가 곡기를 끊고 신선이 되리라.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|고긔가먹고싶:|보컬로이드|2016-01-26 19:44:52|그렇게 신선이되었지만.. 1800년이 지나고 2000년초반 삼모계에 발을...|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 니쉬: |접속잘안함|2016-01-26 19:44:57|산이라면 우리 영토에 많이 있어유.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|북두칠성:|접속잘안함|2016-01-26 20:52:04|장균 천통쟁 하시고 나랑 같이 신선되시유|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|잠둥이션:| 재야 |2016-01-26 20:57:10|하늘의 일곱 푸른별..|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:| 재야 |2016-01-26 20:58:44|내 신선이 되서도 그대와 함께한 시간. 잊지 않으리.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:|접속잘안함|2016-01-26 21:28:59|내 그저 나라를 잃고 두눈에 눈물이 하염없이 흘러 한치 앞이 안 보였소. 허나 그때 저 멀리 밝은 읽곱개의 별을 따라 하염없이 걷고 또 걸었소.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 소드락: | 재야 |2016-01-26 22:11:23|호랑이에게 물려 크게 다쳤습니다. 맛있더냐?...|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1|잠둥이션:|접속잘안함|2016-01-26 22:18:01|저도 한 입만 맛볼 수 있을까요?|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 하루카: | 재야 |2016-01-26 22:43:06|하루카는 뉴비에요 망명장 보내지 말아주세요..!|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1|잠둥이션:|접속잘안함|2016-01-26 22:45:06|사실 제가 하루카님의 소중한 비밀을, 씨크릿을 3가지 알고 있습니다.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 하루카: | 재야 |2016-01-26 22:46:02|에|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-26 22:46:16|짐작가는게 없네요...|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 소드락: | 재야 |2016-01-26 22:46:32|저는 그게 팬더가 아니라는걸 알고 있죠|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 나나미: | 재야 |2016-01-26 22:58:58|아직도 하고 있구나|FFFFFF|FFFFFF|pic_20.jpg?=20150313|1 -1| 나나미: | 재야 |2016-01-26 22:59:04|심심한데 다시 할까|FFFFFF|FFFFFF|pic_20.jpg?=20150313|1 -1| 감정: |접속잘안함|2016-01-26 23:30:18|100명달성☆★|FFFFFF|FFFFFF|default.jpg|0 -1| 하루카: | 재야 |2016-01-26 23:55:30|저희 국 숙련도가 많이 높다보니 한쪽으로 쏠리면 균형을 맞춰서 임관하려고 했는데..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1|잠둥이션:|접속잘안함|2016-01-26 23:55:46|ㅎㅎㅎ|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 하루카: | 재야 |2016-01-26 23:55:54|적절하게 흩어진 상태로 유지되는듯 하니 저도 이만 물러갑니다 ㅇㅅㅇ;|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1|잠둥이션:|접속잘안함|2016-01-26 23:56:17|ㅜㅜ|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 하루카: | 재야 |2016-01-26 23:56:33|다들 즐거운 천통쟁 되시고 언젠가 갓흥겜 삼모전이 되면 그때 뵈어욥|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 내나: |접속잘안함|2016-01-26 23:56:37|하루카♡|FFFFFF|FFFFFF|default.jpg|0 -1| 하루카: | 재야 |2016-01-26 23:57:18|하트빼랑|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-26 23:57:58|무리인 이야기로..|AFEEEE|AFEEEE|pic_2496.jpg?=20160114|1 -1| 하루카: | 재야 |2016-01-26 23:58:22|청기사님이 무지장을 그만두고 군주나 수뇌를 뛰시면 가능할지도..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-26 23:58:50|기수 거의 끝나가니 전콘 체인지!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-26 23:59:03|청기사는 군대를 갔습니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-26 23:59:20|뭐여 멜균놈이네|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-26 23:59:22|넌 안될듯..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-26 23:59:47|이미 군주나 수뇌를 뛰어서 무지장을 한다고 합니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-26 23:59:50|주르륵...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:00:02|너 사랑꾼에 있지않았나?|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:00:17|근데 무지장 짱편함;;;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:00:25|수몰타이밍 너무 이상했음 수뇌나 군주경험에 비해서 매우 안일하고 무책임한 지시 아닙니까..는 지시자가 멜균이 아녔을려나|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:00:55|수몰 날리라고는 했는데 ㅋㅋㅋ 그렇게 날릴줄은 몰랐지|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-27 00:01:26|그냥 지나가는 식으로 저기다가 수몰 날리고 출병 차례대로 박으면 먹는다고 얘기했는데 수몰 턴의 상태가...?|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:02:03|첫턴부터 스핀해서 다다다 박았으면 좀 위기였을텐데|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-27 00:02:33|담부턴 좀 확실하게 조언도 하고 지휘도 하세욥..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:02:44|머 이번기는 그냥 지나가는 식으로 게임해서 ㅋㅋ....|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-27 00:03:49|아니 솔직히 이제 삼모 남은 사람들 다 제 밥그릇 챙기고 거기에 한그릇 더 챙기시는 분들 아닙니까...? 저처럼 무식한 사람은 지휘할 짬이 안 됩니다..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:03:53|넘아쉬웠음 그때 수몰자체는 좋은데 왜 지금와? 이러면서..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-27 00:04:11|나같은 고인물에 선정성으로 천년정지당한놈도 지휘하는데 못할사람이 어딧..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:04:33|;;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-27 00:04:55|저는 지휘할만한 그릇이 안 됩니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:05:48|겜 다 접구 삼모만 보면 충분히 하고도 남을듯..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-27 00:06:39|나도 본업은 클로저지만 턴조사하고 연감뒤져서 추정치뽑고 켬끔지휘하고 한다고 지난 토욜까지 레비아 세워두고 구경만 함..|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:06:52|황무지는 버릴 수 없습니다.. 그리고 2월 5일에 나오는 엑스컴2로 지구도 구해야합니다!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-27 00:07:29|저에겐 션을 찾아야하는 의무와 지구를 구해야한다는 의무가 있어서 지휘를 할 수 없습니다..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 하루카: | 재야 |2016-01-27 00:07:52|후..청기사님한테 사과해라.|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-27 00:08:36|ㅎ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쿠요: |접속잘안함|2016-01-27 01:03:36|션...?|FFFFFF|FFFFFF|pic_2457.jpg?=20150615|1 -1| 쿠요: |접속잘안함|2016-01-27 01:21:41|●1월:부관(이)가 독살을 준비하다 독에 걸려 죽고 말았습니다.|FFFFFF|FFFFFF|pic_2457.jpg?=20150615|1 -1|북두칠성:|접속잘안함|2016-01-27 01:41:47|부관님 ㅠ,ㅠ|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-27 01:42:18|크흑......|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-27 01:42:39|길이길이 기억하겠나이닷 ㅠ,ㅠ|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-27 01:43:47|월급날마다 ㅠ,ㅠ|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 무광: |접속잘안함|2016-01-27 03:24:47|ㅜㅜ|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 쥬비아: |접속잘안함|2016-01-27 05:36:48|처..청기사님 전콘상태가ㅡㅡ|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 소드락: | 재야 |2016-01-27 09:39:13|고소 가능 할듯|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 니콜: |보컬로이드|2016-01-27 09:41:05|옆집나라님들 0분턴 수뇌 있으신가요오?|AFEEEE|AFEEEE|pic_3744.jpg?=20151022|1 -1| 니콜: |보컬로이드|2016-01-27 09:41:52|발령이 적당히들어가서 행복하지못합니다ㅠ|AFEEEE|AFEEEE|pic_3744.jpg?=20151022|1 -1| 박일아: |보컬로이드|2016-01-27 09:44:07|부관님 죽으셨네.... 부관님을 기리기 위해 재야로 돌아가겠습니다|AFEEEE|AFEEEE|pic_3305.jpg?=20151216|1 -1|하기싫은데:|보컬로이드|2016-01-27 09:44:51|저분 최소 하야왕2nd|AFEEEE|AFEEEE|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-27 10:03:43|ㄷㄷ|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박일아: | 재야 |2016-01-27 10:08:09|ㅇㅇ? 하야하랄때 다들 ㅃㅃ 해주던데|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1|바닥을탁치고:|보컬로이드|2016-01-27 10:11:51|히익!|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 박일아: | 재야 |2016-01-27 10:12:34|이제 재야에서 부관님을 기리다 죽을뿐...|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 하루카: | 재야 |2016-01-27 11:21:32|이 땅 그대로 가는건가 접속이 너무후달릴것같은데...|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1|고긔가먹고싶:|보컬로이드|2016-01-27 12:00:46|하야미|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|북두칠성:|접속잘안함|2016-01-27 12:20:47|주군 잘가시노~~ 부관님께 안부전해줍쇼~~1월마다 제사 올려드릴겝쇼~~|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|일본어번역기:| 재야 |2016-01-27 12:35:34|삼천결순! 난 거절한다!|FFFFFF|FFFFFF|default.jpg|0 -1| 장임: |접속잘안함|2016-01-27 12:40:43|오... 쟁장 수도 똑같네. 천통쟁이 재밌어지려나|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|잠둥이션:|접속잘안함|2016-01-27 12:41:54|나를 선봉에 세워주시오.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 니쉬: |접속잘안함|2016-01-27 12:43:47|선봉에 서시려면 누구보다 빠른 턴시간이 필요합니다~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |보컬로이드|2016-01-27 12:45:12|장임아재 엉덩이만 노린다|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-27 12:48:58|6말은 사셨나요|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |보컬로이드|2016-01-27 12:50:14|여기 안 사주네요 후.. 쟁 시작전까지 통솔 보정을 달지 못한다면 망명해버릴거에요! ㅌㅌ|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-27 12:51:55|계약 불이행이네유. 망명하시죠|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이루나: |보컬로이드|2016-01-27 12:52:22|사드릴게요|AFEEEE|AFEEEE|default.jpg|0 -1| 이루나: |보컬로이드|2016-01-27 12:52:25|언젠가는|AFEEEE|AFEEEE|default.jpg|0 -1| 카토: |보컬로이드|2016-01-27 12:52:52|그건 안되요! 아직 시간이 남았어요!|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 카토: |보컬로이드|2016-01-27 12:53:15|언젠가는이 심히 불안해요..|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-27 12:53:34|원래 기다리다 때먹히는겁니당.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| Anes: |접속잘안함|2016-01-27 12:54:27|오시면 일시불로 사드림|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| 비밀: |접속잘안함|2016-01-27 13:15:14|여자친구(이)가 바람난 배우자에게 독살당하고 말았습니다. 바람난 여자친구는 독살입니다|FFFFFF|FFFFFF|default.jpg|0 -1| 소드락: | 재야 |2016-01-27 13:18:07|꿈에서 전쟁중 어느 나라에 임관 했는데 수뇌부가 모병 하라고 돈주고 모병하니까,누가 자꾸 쌀을 몰수해서 소집해제 되는게 반복 되서, 왜 그러냐니까 탈취한 만큼 몰수 한다고...|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 소드락: | 재야 |2016-01-27 13:18:57|계속 소집 해제 되는 악몽을 꿨음...|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 카토: |보컬로이드|2016-01-27 13:19:23|가슴이 아프네요 도적질도 마음 편히 못한다니..|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 청기사: |보컬로이드|2016-01-27 13:37:30|치료가 나만 치료 아니던가?? 의술템이나 나오지;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-27 14:24:54|사람 진짜 없군 96명;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 소드락: | 재야 |2016-01-27 15:01:54|재야에 20명 빼면 70명 쟁이 천통쟁|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| KAITO: |보컬로이드|2016-01-27 15:45:56|저 이틀연속 삼모꿈꿨어요|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 장임: |접속잘안함|2016-01-27 16:49:23|멜군냄새|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 박일아: | 재야 |2016-01-27 17:05:59|삼창 탈출중 (80%)|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 청기사: |보컬로이드|2016-01-27 18:13:11|삼모 꿈꾸면 중증아님?|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|카이사르:|접속잘안함|2016-01-27 18:29:13|삼창도 병임 ㅇㅇ|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 비밀: |접속잘안함|2016-01-27 18:32:01|삼창인생분들|FFFFFF|FFFFFF|default.jpg|0 -1|바닥을탁치고:|보컬로이드|2016-01-27 18:43:35|엉엉|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1| 橙: |보컬로이드|2016-01-27 20:17:57|커 어억|AFEEEE|AFEEEE|pic_3446.jpg?=20160126|1 -1|바닥을탁치고:|보컬로이드|2016-01-27 21:20:57|능환이 뭐했니?|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|그만좀불러좀:|접속잘안함|2016-01-27 21:38:58|모종의 거래를 통하여 다음기부터는 안부른답니다 ^^ 급할때빼고... 행복합니다|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-01-27 21:48:38|급할때 부르면 행복하지 않겠군요..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-27 21:50:43|쥬비!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 이쓰미: |접속잘안함|2016-01-27 23:10:28|착하게 때릴듯 ㅁㅅㅁㅅ|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| KAITO: |보컬로이드|2016-01-27 23:11:23|역시 능환이 에이스네 아무도 모르던 오환을 먹음|AFEEEE|AFEEEE|pic_293.jpg?=20130820|0 -1| 청기사: |보컬로이드|2016-01-27 23:30:55|관심이 없던게 아닙..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|아르카나하트:|접속잘안함|2016-01-27 23:35:05|춘화첩(사기) 이건 일회용인가요|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-01-27 23:36:30|계속 사용 가능합니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|아르카나하트:|접속잘안함|2016-01-27 23:37:25|먼기능이지..|FFFFFF|FFFFFF|default.jpg|0 -1| 니쉬: |접속잘안함|2016-01-27 23:41:56|훈련 사기 중 사기치를 올려줍니다.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|아르카나하트:|접속잘안함|2016-01-27 23:45:07|애매하네용|FFFFFF|FFFFFF|default.jpg|0 -1| 橙: |보컬로이드|2016-01-28 00:01:05|커 어억|AFEEEE|AFEEEE|pic_3446.jpg?=20160126|1 -1| 橙: |보컬로이드|2016-01-28 00:01:27|전력전 참가하지도 않았는데 우승이라니 커 어억|AFEEEE|AFEEEE|pic_3446.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-28 00:15:16|곧 죽나요|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 다이스: |보컬로이드|2016-01-28 00:27:39|랜덤참가했을때 승률이 높지요|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 쥬비아: |접속잘안함|2016-01-28 03:00:13|쥬비!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 이루나: |보컬로이드|2016-01-28 09:39:48|말획득!|AFEEEE|AFEEEE|default.jpg|0 -1| 박일아: | 재야 |2016-01-28 11:25:59|삼창탈출중...(95%)|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 청기사: |보컬로이드|2016-01-28 11:28:46|열전주세요|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|랜임1분장:|보컬로이드|2016-01-28 11:30:50|테베신성대 열전좀|AFEEEE|AFEEEE|pic_3063.jpg?=20151213|1 -1|북두칠성:|접속잘안함|2016-01-28 15:45:46|주군 잘강~~~~~나 잊지망~~~~~나 마지막이양~~~~~나중에 또 올겡~~~~~~|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 박일아: | 재야 |2016-01-28 17:02:17|누가 소환하지 않는이상 자발적으로 삼모는 이제 안할듯 ㅇㅇ/ 다들 빠빠잉|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 이루나: |보컬로이드|2016-01-28 17:11:48|하앍.. 20개월만에 이렇게 바뀔수가 있구나 'ㅇ';;|AFEEEE|AFEEEE|default.jpg|0 -1|카이사르:|접속잘안함|2016-01-28 18:02:36|그렇다는말은 지인이 소환하면 삼창인생이란말임 ㅇㅇ|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 청기사: |보컬로이드|2016-01-28 18:03:30|제가 박일아님을 삼창으로 만들기 위해서 건국하겠습니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 정휘인: |보컬로이드|2016-01-28 18:55:24|앵벌스 주거라|AFEEEE|AFEEEE|pic_3955.jpg?=20160107|1 -1|고긔가먹고싶:|보컬로이드|2016-01-28 19:09:03|삼창기사|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 박일아: | 재야 |2016-01-28 19:47:49|저에겐 지인이 얼마 없기때문에 후후훗|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 박일아: | 재야 |2016-01-28 19:48:10|아얄 자체를 끊어버리면 날 호출할수있는 사람은 극히 줄어들게되죠 후후후|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1|직장인페이트:|접속잘안함|2016-01-28 20:00:26|...|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1|직장인페이트:|접속잘안함|2016-01-28 20:00:55|국가명이, 현실을 이렇게 잘 반영한적은 처음이라 생각합니다.|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1| 소드락: | 재야 |2016-01-28 20:04:51|근데 언제 싸움? 마지막 기수지만 결말은 보고 싶은데|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 무광: |접속잘안함|2016-01-28 21:03:10|일요일부터 싸울꺼같아영|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1|카이사르:|접속잘안함|2016-01-28 21:34:06|우리국 진짜 접속잘안함 ㅇㅇ|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 하루카: | 재야 |2016-01-28 23:46:29|멜군 건국하면 누가 호출좀요. 저젹국 세웁니다.|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 하루카: | 재야 |2016-01-28 23:47:24|죽고 나서야 쟁이 시작되겠군.|FFFFFF|FFFFFF|pic_4006.jpg?=20160112|1 -1| 청기사: |보컬로이드|2016-01-28 23:59:43|ㅎㅎ... 이터널시티나 하러갑니둥|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 이루나: |보컬로이드|2016-01-29 10:08:48|블레스하세욧!|AFEEEE|AFEEEE|default.jpg|0 -1| 진리: |접속잘안함|2016-01-29 11:51:07|똥겜블레스라는데|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-01-29 11:51:14|생성장수명이 ㄷㄷ|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-01-29 11:51:29|트오세가 낫나요 블레스가 낫나요|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 이쓰미: |접속잘안함|2016-01-29 11:57:09|똥기도가 좋아보여요? 똥나무가 좋아보여요?|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 진리: |접속잘안함|2016-01-29 12:04:27|크 둘다 똥인가|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-01-29 12:04:33|요즘 할거 없어서 해보려고 했더니|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1|일기토지배자:|보컬로이드|2016-01-29 13:06:27|삼모 글리젠 수쥰..|AFEEEE|AFEEEE|default.jpg|0 -1| 이루나: |보컬로이드|2016-01-29 13:19:53|블레스가 더 나은듯|AFEEEE|AFEEEE|default.jpg|0 -1| 플젠: | 재야 |2016-01-29 13:46:08|죽지도않고 벌점도 아직잇네|FFFFFF|FFFFFF|pic_2524.jpg?=20160119|1 -1| 박일아: | 재야 |2016-01-29 17:47:47|부관님을 따라가기까지 앞으로 24턴...|FFFFFF|FFFFFF|pic_3305.jpg?=20151216|1 -1| 橙: |보컬로이드|2016-01-29 17:53:49|부들부들|AFEEEE|AFEEEE|pic_3446.jpg?=20160129|1 -1|북두칠성:|접속잘안함|2016-01-29 20:52:25|잘강 주군 내일 없넹~.~ 굿바이~.~😢😢😢😢😢😢😢😢😢😢😢😢|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 다끝남: | 재야 |2016-01-29 21:42:50|안 끝났네|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-01-30 00:10:50|조조 멋져여|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-30 01:52:00|쥬비!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-01-30 01:55:37|쥬비는 죽어라|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-30 03:41:56|너무사네.. 사람막죽이고..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-01-30 03:51:33|넌 죽어도됨 ;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-30 04:20:03|저 학교들어가기전에 건국좀요|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 이쓰미: |접속잘안함|2016-01-30 13:29:33|군주가 부덕하다!|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-01-30 14:04:25|부덕~ 부덕~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: |접속잘안함|2016-01-30 14:07:14|나무늘모도 부덕하다!|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-01-30 14:08:33|동물들이 다 부덕하다로 퉁~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-30 14:10:07|음? 가만보니 전 나무늘모가 아니니 관계가 없었네유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 소드락: | 재야 |2016-01-30 14:52:32|??|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1|강서유서:|접속잘안함|2016-01-30 14:59:04|나무늘보도 부덕하다!|FFFFFF|FFFFFF|default.jpg|0 -1| 니쉬: |접속잘안함|2016-01-30 15:00:51|전 선량해유~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| HideD: |접속잘안함|2016-01-30 16:19:39|천통쟁을 40 vs 40으로 하는 때가 되었군|FFFFFF|FFFFFF|pic_781.jpg?=20151012|1 -1|고긔가먹고싶:|보컬로이드|2016-01-30 17:33:15|장수가부족해서 커버가안되네..|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 다이스: |보컬로이드|2016-01-30 17:54:19|충차가 실접하는 곳이 이기겠네요;|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 청기사: |보컬로이드|2016-01-30 18:06:25|귀신같이 안한다고 합니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-30 18:11:48|하이 호 실버!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 니쉬: |접속잘안함|2016-01-30 18:44:14|뭔가 하니님이 생각나는 외침...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 청기사: |보컬로이드|2016-01-30 19:08:08|우리가 바로 이지중대다!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 소드락: | 재야 |2016-01-30 19:13:24|이제 정말로 반 친구들 부르면 천통 하는 시대가 됬음|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 감정: |접속잘안함|2016-01-30 19:13:30|실접은시러양|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-30 19:14:45|충차도 모훈사출출해도되나욧?!|FFFFFF|FFFFFF|default.jpg|0 -1|북두칠성:|접속잘안함|2016-01-30 19:14:56|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:01|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:07|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:09|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:16|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:25|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:26|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:26|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:26|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:29|5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다.|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:15:56|주군 제가 주군의 죽음을 세상에 알렸나이닷 크흑 편히 가서소|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:16:00|주군 제가 주군의 죽음을 세상에 알렸나이닷 크흑 편히 가서소|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:16:00|주군 제가 주군의 죽음을 세상에 알렸나이닷 크흑 편히 가서소|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:16:01|주군 제가 주군의 죽음을 세상에 알렸나이닷 크흑 편히 가서소|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-30 19:16:01|주군 제가 주군의 죽음을 세상에 알렸나이닷 크흑 편히 가서소|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 청기사: |보컬로이드|2016-01-30 19:18:01|?????????????//|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|카이사르:|접속잘안함|2016-01-30 19:29:19|??|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|고긔가먹고싶:|보컬로이드|2016-01-30 19:52:56|도배 ;;|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 쥬비아: |접속잘안함|2016-01-30 21:32:28|ㅋㅋㅋㅋ ....|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-01-31 04:01:12|우사밍별에서 온 전쟁알람이다요|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-31 04:02:40|건국좀|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| Anes: |접속잘안함|2016-01-31 04:02:55|천통쟁 시작|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| Anes: |접속잘안함|2016-01-31 04:03:26|쟁참여가 좀더 됬으면 좋았을텐데|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| 장임: |접속잘안함|2016-01-31 04:03:49|빈 땅이 몇 개여...|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| Anes: |접속잘안함|2016-01-31 04:03:59|양쪽다 장수가 비슷하네|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| Anes: |접속잘안함|2016-01-31 04:04:11|사람이 적어..|FFFFFF|FFFFFF|pic_3135.jpg?=20150819|1 -1| 청기사: |보컬로이드|2016-01-31 04:04:14|거 쥬비아놈 쥬비쥬비거리는거 손가락을 뿐질러버려야..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-31 04:04:34|장임 아재 ㅎㅇ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 04:04:45|멜군은 그냥 다 뿐질러야|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 청기사: |보컬로이드|2016-01-31 04:05:02|흑흑 아재가 나 싫어한다|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 04:05:13|쟁하러 온 건 아니고... 작업좀 하다가 갑자기 생각나서 왔는데 딱 쟁이네|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 청기사: |보컬로이드|2016-01-31 04:05:17|뭐 아재는 공공의 적이지만여!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-31 04:05:40|쌤통|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-01-31 04:06:19|뭐가 쌤통이냐 저 양반은 원래 나 싫어했어|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 04:06:38|명색이 천통쟁인데 아직까지 출병 1개|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 장임: |접속잘안함|2016-01-31 04:06:48|ㄴㄴ 귀여워함 멜군 ㅎ|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 청기사: |보컬로이드|2016-01-31 04:07:08|ㅗ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-01-31 04:07:17|멜군이 전메하니 허창에재난이 뙇|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-01-31 04:07:18|어맛 키보드의 무서움이 여기서 또|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-31 04:07:31|여러분 키보드의 ㅗ는 떼버려야합니다 ㅗ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-31 04:07:44|헉 또 ㅗ가.. 무의식적으로...!!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 04:08:22|님들 7등급 찍음?|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 청기사: |보컬로이드|2016-01-31 04:09:14|찍은지 오래임|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-31 04:09:32|님들도 7등급 찍었져? 다 압니다.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 04:09:52|8등급인데|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 청기사: |보컬로이드|2016-01-31 04:10:27|구라치는거 보소...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 무광: |접속잘안함|2016-01-31 04:11:22|지금 디아3를하면 자겠찌|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 청기사: |보컬로이드|2016-01-31 04:12:04|넹|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 무광: |접속잘안함|2016-01-31 04:12:40|얼른 디아 일균돌러 가세염|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 청기사: |보컬로이드|2016-01-31 04:13:07|저 어차피 무지장이라 헤헤|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|바닥을탁치고:|보컬로이드|2016-01-31 04:31:33|그릉 그릉|AFEEEE|AFEEEE|pic_3856.jpg?=20160113|1 -1|잠둥이션:|접속잘안함|2016-01-31 13:51:09|쿠마님 넘나 쎔 ㅠㅠ|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| くま: |보컬로이드|2016-01-31 13:53:37|환술이 안 터졌어 ㅠㅠㅠ|AFEEEE|AFEEEE|pic_63.jpg?=20150919|1 -1| 이쓰미: |접속잘안함|2016-01-31 13:57:51|곰과 너구리의 차이가 뭐죠?!|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-01-31 13:59:12|글자수 부터가 다릅니다~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-01-31 13:59:36|곰은 뒤집어도 말이 되지만 너구리는 뒤집으면 말이 안되쥬.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: |접속잘안함|2016-01-31 14:07:30|하지만 너구리는 라면팔아서 갑부지!|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 다이스: |보컬로이드|2016-01-31 14:15:28|오동통통 탱글탱글 XX 너구리|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 니쉬: |접속잘안함|2016-01-31 14:19:44|콜라 판 곰이 더 부자죠.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: |접속잘안함|2016-01-31 14:21:24|원래 재주는 곰이 부리고 돈은 왕서방이 버는거라서 곰은 착취당하는거야! 열정페이지!|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1|잠둥이션:|접속잘안함|2016-01-31 14:26:00|ㅜㅜ 쿠마님 너무 쌤 ㅠㅠ 흑흑 내 전특 쓰레기 ㅠㅠ|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 카토: |보컬로이드|2016-01-31 14:58:12|맹수인지 중장인지 모르겠어요.. 너무 약해요 ㅠㅠ|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|강서유서:|접속잘안함|2016-01-31 15:43:03|카토 ㅂㄷㅂㄷ|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-01-31 16:03:23|강궁 아파요!|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 이루나: |보컬로이드|2016-01-31 16:27:49|병력을 9천이나 뽑을수있으면뭐하나 못이기는데 ㅠㅠ|AFEEEE|AFEEEE|default.jpg|0 -1| 소드락: | 재야 |2016-01-31 16:38:07|함곡의 주민으로부터 함곡의 많은 정보를 듣겠습니까? (Y/N)|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1|잠둥이션:|접속잘안함|2016-01-31 16:38:38|Y|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 감정: |접속잘안함|2016-01-31 16:39:35|함곡은 소가 특산품이라네 껄껄껄 .... ㅌㅌ|FFFFFF|FFFFFF|default.jpg|0 -1|카이사르:|접속잘안함|2016-01-31 16:40:13|N|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 소드락: | 재야 |2016-01-31 16:40:21|어제 송씨네 암소의 발정기가 시작 되었다고 한다. 더 들으시겠습니까 (Y/N)|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1|잠둥이션:|접속잘안함|2016-01-31 16:40:44|N|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 청기사: |보컬로이드|2016-01-31 16:44:15|N|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 소드락: | 재야 |2016-01-31 16:44:16|(대화를 그만하려 했는데 이 주민은 수다쟁이 인거 같다.) 함곡에 주둔중인 병력의 상세한 정보를 원하시나요? (Y/N)|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 청기사: |보컬로이드|2016-01-31 16:44:54|N|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 니쉬: |접속잘안함|2016-01-31 16:47:30|저 주민을 관아로 끌고갑니다.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 소드락: | 재야 |2016-01-31 16:48:27|사양 말고 들으시게나 내 소상히 알려드리리다. 우선 이곳엔 무지장이 둘이나 있는데 그중에 하나는 집합장이 아닐까 생각되네. 집합장의 턴 시간이 궁금하신가요? (Y/N)|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 감정: |접속잘안함|2016-01-31 16:51:29|둘다 성수쌓는다카더라...|FFFFFF|FFFFFF|default.jpg|0 -1| 다이스: |보컬로이드|2016-01-31 19:32:53|국명불일치!!|AFEEEE|AFEEEE|pic_1135.jpg?=20160114|1 -1| 이쓰미: |접속잘안함|2016-01-31 19:34:45|울국 너무 접안하는듯|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1|악마사냥꾼:|접속잘안함|2016-01-31 19:36:42|무광 사람 부려먹는데 일가견 있는 사람임 ;;|FFFFFF|FFFFFF|default.jpg|0 -1| 무광: |접속잘안함|2016-01-31 19:45:05|일해라 악마사냥꾼|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 카토: |보컬로이드|2016-01-31 19:46:45|저기 국가명은 접속잘안함인데 여긴 안함으로 바꿔야할 듯|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 무광: |접속잘안함|2016-01-31 19:46:55|유일한 의사가 악마사냥꾸이네 죄송합니다 의느님|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1|악마사냥꾼:|접속잘안함|2016-01-31 19:53:57|?? 의느님한테 막 대하다니|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-31 20:00:16|맹수병 등갑병 헌납할시간!|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-01-31 20:33:15|덤벼라 깡기로 잡아줄테니|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 카토: |보컬로이드|2016-01-31 20:33:38|그 후 카토는 이길 수 없었다한다..ㅠㅠ|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-01-31 20:34:41|갓서유서님과 카이사르님이 반겨주실꺼에유|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 카토: |보컬로이드|2016-01-31 20:36:20|흥! 장임아재 엉덩이나 때릴래요|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 청기사: |보컬로이드|2016-01-31 20:43:06|더러움;;|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 장임: |접속잘안함|2016-01-31 21:04:18|멜가야 너만할까|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1|북두칠성:|접속잘안함|2016-01-31 21:04:37|◆수 등갑【북두칠성】 3578 (-2399) VS 0 (-2841) 【평민킬러】석궁|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-31 21:04:46|궁숙1위를 이겼도다!!!!!!!|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-31 21:04:57|경축!!!|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-31 21:04:59|경축!!!|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-01-31 21:05:06|축하메시지는 겐메로~~|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 니쉬: |접속잘안함|2016-01-31 21:06:02|그런건 없습니다유.|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|잠둥이션:|접속잘안함|2016-01-31 21:45:58|완을 지키는 밝게 빛나는 일곱별 북두칠성 축하해ㅎ|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|카이사르:|접속잘안함|2016-01-31 21:58:06|그대는 진정한 완 태수시오.|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|일기토지배자:|보컬로이드|2016-01-31 22:18:54|일기토 승률 0.1퍼만 올리면 1등이넹|AFEEEE|AFEEEE|default.jpg|0 -1| 감정: |접속잘안함|2016-01-31 22:21:02|오 일기토지배자님 명전갱신하셨구나 축하드려요!! ㅊㅊ!!!|FFFFFF|FFFFFF|default.jpg|0 -1|일기토지배자:|보컬로이드|2016-01-31 22:22:28|지금 삼망겜 상황상 명전찍기 딱좋은거 찾아서 노려봤어용|AFEEEE|AFEEEE|default.jpg|0 -1|북두칠성:|접속잘안함|2016-01-31 22:28:25|감솨하니당 완을 밝게 비추는 완 태수 북두칠서있는한 적국의 백만대군이 온다한들 완을 넘지 못할거외덧|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 감정: |접속잘안함|2016-01-31 22:29:13|다음기는 설전지배자 다다음기는통솔전지배자 어떠신지요!!!|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-31 22:47:15|@~@|FFFFFF|FFFFFF|default.jpg|0 -1| 소현: | 재야 |2016-01-31 22:57:54|100명도 안되네...|FFFFFF|FFFFFF|pic_180.jpg?=20150307|1 -1| 감정: |접속잘안함|2016-01-31 23:01:16|중반쯤엔 100명이였는데...|FFFFFF|FFFFFF|default.jpg|0 -1| 엄백호: |보컬로이드|2016-01-31 23:01:45|접속잘안함국 강하네요 ㄷㄷ|AFEEEE|AFEEEE|pic_3886.jpg?=20151012|1 -1| 쥬비아: |접속잘안함|2016-01-31 23:09:29|쥬비!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 감정: |접속잘안함|2016-01-31 23:10:48|이번기 유닠 3개먹음 ㅋㅋㅋㅋㅋㅋㅋ|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-01-31 23:11:11|무지스탯맞춰놨더키저게뜨네 ㅡㅡ...|FFFFFF|FFFFFF|default.jpg|0 -1|눈팅하러옴:| 재야 |2016-01-31 23:24:04|눈팅하려니까 천통쟁이네|FFFFFF|FFFFFF|default.jpg|0 -1|눈팅하러옴:| 재야 |2016-01-31 23:26:40|삼모 망했네...천통쟁이라 유저수보는데 100명도 안되네|FFFFFF|FFFFFF|default.jpg|0 -1|눈팅하러옴:| 재야 |2016-01-31 23:30:35|눈팅좀할겸 랜임에 수비강화 1반복해놨습니다 아무데나 던져주세여 이만 자러^^|FFFFFF|FFFFFF|default.jpg|0 -1| 이쓰미: |접속잘안함|2016-01-31 23:33:23|중독성 강한 맛으로 자꾸 찾게 되는 음식을 두고 흔히 마약 같다고 얘기하는데요, 중국에서 음식에 진짜 마약을 넣고 팔아온 식당들이 적발됐습니다.|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1|눈팅하러옴:| 재야 |2016-01-31 23:34:09|세상이 판타지|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-01-31 23:41:10|아!! 아!!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-01-31 23:41:19|재미가 없군|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 비밀: |접속잘안함|2016-01-31 23:50:22|단칸방의 참략자를 보고 있습니다|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-02-01 00:09:18|SOX|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-01 00:13:19|야해|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-01 00:16:17|뼛속까지 더러운 자로군|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|눈팅하러옴:|접속잘안함|2016-02-01 01:01:56|사칭하는 아저씨로군|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-02-01 01:09:43|사칭!|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-02-01 01:13:09|마을점령하고 템먹으면 점령로그가 기록이안되네요 ㅠㅠ|FFFFFF|FFFFFF|default.jpg|0 -1|북두칠성:|접속잘안함|2016-02-01 01:32:20|◆수 등갑【북두칠성】 1753 (-1013) VS 0 (-1179) 【평민킬러】석궁|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-01 01:32:33|또이겼닷 !!!!아쏴|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-01 01:32:47|다 이겨주겠오!!!!|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-01 01:33:06|경축!!! 축하는 겐메로|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 무광: |접속잘안함|2016-02-01 01:38:16|완의 수호자|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1|북두칠성:|접속잘안함|2016-02-01 02:00:17|새로운 주군께서(내 주군 돌아가시미 ㅠ.ㅠ) 완을 밝게 비추는 완 태수 북두칠성을 치하해주시니 몸둘 바를 모르겠나이다|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-01 02:00:29|몸을 불살라 완을 지키겠나이닷|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 청기사: |보컬로이드|2016-02-01 04:58:25|불사르거르ㅡ...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-01 05:14:04|부.불..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 감정: |접속잘안함|2016-02-01 07:40:56|일기토지배자님 93.79로 명전 1위갱신!!! 축하드려요!|FFFFFF|FFFFFF|default.jpg|0 -1| 니쉬: |접속잘안함|2016-02-01 09:46:43|6말에 넘어 가신 카토님을 카이사르님께 제물로 올려드려야...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|카이사르:|접속잘안함|2016-02-01 11:09:17|그럼 카토님 있는곳으로 출병을 해야...|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 이쓰미: |접속잘안함|2016-02-01 11:10:13|힉 훼신둘|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 카토: |보컬로이드|2016-02-01 11:11:02|카토는 거기 없어요! 히힛|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|카이사르:|접속잘안함|2016-02-01 11:13:13|숨바꼭질..|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 니쉬: |접속잘안함|2016-02-01 11:25:03|꼭꼭 숨어라~!|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 이쓰미: |접속잘안함|2016-02-01 11:34:26|힉 훼신셋|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 니쉬: |접속잘안함|2016-02-01 13:21:42|찾았다~!|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|눈팅하러옴:|접속잘안함|2016-02-01 13:32:06|20깃수전엔 유저 300명이였는데 망했네|FFFFFF|FFFFFF|default.jpg|0 -1| 사망: | 재야 |2016-02-01 13:58:50|사-망-|FFFFFF|FFFFFF|default.jpg|0 -1| 이쓰미: |접속잘안함|2016-02-01 14:43:56|͡° ͜ʖ ͡°✧ 잘생김|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1|고긔가먹고싶:|보컬로이드|2016-02-01 14:53:08|엇 김붙었어욧|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1|고긔가먹고싶:|보컬로이드|2016-02-01 14:53:24|모오오오옹ㆍ으옷. 생김|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 하연주: |보컬로이드|2016-02-01 15:30:51|일기토지배자님은 일기토를 지배하셨네 ㄷㄷ|AFEEEE|AFEEEE|pic_23.jpg?=20160114|1 -1| 이루나: |보컬로이드|2016-02-01 17:30:50|그러ㅗ게요ㅕ 제가군대가기전만해도 300명이였는데|AFEEEE|AFEEEE|default.jpg|0 -1|잠둥이션:|접속잘안함|2016-02-01 18:48:25|내 드디어 서열 2위 승상에 올랐도다. 너구리 승상의 업적을 이곳에 기록하리오.|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|북두칠성:|접속잘안함|2016-02-01 18:49:12|경하드리옵니다 모두 업그려 찬양하거랏|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-01 18:49:55|완 수호자 북두칠성은 황제폐하에게 밀서를 받고 임무 수행중이옵니닷|FFFFFF|FFFFFF|pic_3986.jpg?=20160108|1 -1| 橙: |보컬로이드|2016-02-01 19:04:08|부들부들 부들부들|AFEEEE|AFEEEE|pic_3446.jpg?=20160201|1 -1| 북오더: |접속잘안함|2016-02-01 19:04:14|천통쟁이 한창인 지금.. 삼모 총인원수는 87명입니다..|FFFFFF|FFFFFF|pic_3876.jpg?=20151103|1 -1| 진리: |접속잘안함|2016-02-01 19:04:41|어지럽다|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-01 19:04:45|내려야징|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-01 19:04:46|내려야징|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-01 19:04:46|내려야징|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-01 19:04:47|내려야징|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-01 19:04:49|내려야징|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1|잠둥이션:|접속잘안함|2016-02-01 19:07:13|내려야징|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:|접속잘안함|2016-02-01 19:07:20|태위의 이름으로 내리겠소|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|잠둥이션:|접속잘안함|2016-02-01 19:07:21|태위의 이름으로 내리겠소|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1|카이사르:|접속잘안함|2016-02-01 19:08:00|완태수 북두칠성은 완을 수호한 공로로 허창점령시 허창테수로 임명하겠소|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 니쉬: |접속잘안함|2016-02-01 19:18:14|그것보다 완 증축이 더 큰 포상일지도유?|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|눈팅하러옴:|접속잘안함|2016-02-01 19:56:21|1인 1성 삼모세계~~|FFFFFF|FFFFFF|default.jpg|0 -1|눈팅하러옴:|접속잘안함|2016-02-01 19:56:29|1인 1성 삼모세계~~|FFFFFF|FFFFFF|default.jpg|0 -1|카이사르:|접속잘안함|2016-02-01 20:00:33|1인 1관직 얻기.|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 카토: |보컬로이드|2016-02-01 20:02:50|아프다|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-02-01 20:06:28|카토님 카이사르님이 호 해드리게 가만계세요|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|강서유서:|접속잘안함|2016-02-01 20:14:30|꼼딱마!|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-02-01 20:14:55|드루와 드루와|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 카토: |보컬로이드|2016-02-01 20:31:13|장임아재 엉덩이 팡야팡야|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|카이사르:|접속잘안함|2016-02-01 20:38:34|ㅋㅋㅋ 진짜 장임님 털었네 -_-|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 장임: |접속잘안함|2016-02-01 20:45:30|으악|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 무광: |접속잘안함|2016-02-01 20:58:45|참교육|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 狂三: |접속잘안함|2016-02-01 21:00:21|흐응...|FFFFFF|FFFFFF|pic_2353.jpg?=20150204|1 -1| 감정: |접속잘안함|2016-02-01 21:13:53|쾅 이건사람이다|FFFFFF|FFFFFF|default.jpg|0 -1| DVa: |접속잘안함|2016-02-01 21:15:03|쾅 이것도 사람이다.|FFFFFF|FFFFFF|pic_1714.jpg?=20160102|1 -1| 청기사: |보컬로이드|2016-02-01 21:17:48|발-사!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 이쓰미: |접속잘안함|2016-02-01 21:18:23|사실 인조인간 이더라 ㅌㅌ|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 무광: |접속잘안함|2016-02-01 21:21:41|지금와서 든 생각이지만 국명좀 신중하게 정할 껄 그랬어요|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -1| 청기사: |보컬로이드|2016-02-01 21:26:09|ㅋ... 묵왕무광아재..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|카이사르:|접속잘안함|2016-02-01 21:27:26|접속... 잘안함 ???|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 감정: |접속잘안함|2016-02-01 21:27:46|물어볼거있어요! 국메에서 청기사님이 멜군님이라는데! 청기사님인가여 멜군님인가요..?!|FFFFFF|FFFFFF|default.jpg|0 -1|카이사르:|접속잘안함|2016-02-01 21:27:57|스코야님 보고싶다..|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 청기사: |보컬로이드|2016-02-01 21:28:20|스코야 걔 요즘 바빠여|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-01 21:28:43|당연히 멜군님입니다. 청기사는 군대갔지요.|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 카토: |보컬로이드|2016-02-01 21:28:58|멜군은 그냥 노답입니다|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 감정: |접속잘안함|2016-02-01 21:29:38|여태까지 청기사님인줄 ... ㅌㅌ|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-02-01 21:32:11|아!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|카이사르:|접속잘안함|2016-02-01 22:18:55|●10월:부관님바라기(이)가 황제를 모독하다가 처형당하고 말았습니다. 어느누가 황제를 모독한단말이가!|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 장임: |접속잘안함|2016-02-01 22:27:47|멜균새긴 군대안가나|FFFFFF|FFFFFF|pic_2746.jpg?=20151004|1 -1| 감정: |접속잘안함|2016-02-01 22:31:25|이미갔다오시지않았나용|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-02-01 22:31:54|그렇게 젊으신건아니라고 아는데 '"'|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-02-01 22:32:19|군대는 바이러스 취급 안해요!|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 청기사: |보컬로이드|2016-02-01 22:33:26|하 악의 무리가 또..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 비밀: |접속잘안함|2016-02-01 22:40:24|아오키시 주포를 발사해라|FFFFFF|FFFFFF|default.jpg|0 -1| 쥬비아: |접속잘안함|2016-02-01 22:51:07|노답!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 橙: |보컬로이드|2016-02-02 00:06:33|여러분을 어지럽게 하겠습니다|AFEEEE|AFEEEE|pic_3446.jpg?=20160201|1 -1| 진리: |접속잘안함|2016-02-02 00:09:25|1|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:27|2|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:28|3|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:28|4|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:29|5|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:30|6|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:31|7|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:32|8|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:09:36|이제 안보이네|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 쥬비아: |접속잘안함|2016-02-02 00:11:43|모바일은 눈이아퍼요|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 소드락: | 재야 |2016-02-02 00:14:46|공백지 남겨두고 1국이 방랑타면 언제 리셋이 될까요?|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1| 니쉬: |접속잘안함|2016-02-02 00:15:44|심히 눈에 거슬려서 adblock에서 커스텀 차단 해버렸습니다아|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:18:48|강제리셋요청해주면 해줌|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 00:18:55|왕조에는 기록도 안남지 ㄲㄲ|FFFFFF|FFFFFF|pic_3989.jpg?=20160101|1 -1| 쥬비아: |접속잘안함|2016-02-02 00:20:12|1땅남겨두고 리셋되서 사라진깃수가있었죠..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1|카이사르:|접속잘안함|2016-02-02 00:21:33|ㅇㅇ 그거 저도 기억나요~ 고의로 한 땅 남겨놨다가 리셋...|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 쥬비아: |접속잘안함|2016-02-02 00:23:09|상당히 구린깃수였는데 뭐가 구린지 기억은 안나는..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 이쓰미: |접속잘안함|2016-02-02 00:27:07|천통전에 서버가 날라간적도 있었음..ㅌㅌ n모님이 군주엿..|FFFFFF|FFFFFF|pic_3717.jpg?=20150821|1 -1| 청기사: |보컬로이드|2016-02-02 00:38:35|비연님이 구려!|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 00:38:40|ㅌㅌ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 00:38:54|사실 그 삭제된 기수는 모두 다 구린걸로 ㅇㅇ...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 00:39:54|임관금지랑 소환수 대결이라던가 뭐 천통수뇌 정하겠다고 땅 미뤄서 안먹는다거나 참전하네 안하네 하면서 자동에서 디펜스 하던 사람들 빡치게 하던 국가라던지|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 00:40:05|얘기해보니 다 구리네 머|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 00:44:00|이런 구린 양반들..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1|악마사냥꾼:|접속잘안함|2016-02-02 00:52:41|멜군님이 ... 가장 구려용!|FFFFFF|FFFFFF|default.jpg|0 -1| 청기사: |보컬로이드|2016-02-02 00:54:33|저처럼 트렌드에 맞춰 사는 사람이 어딨습니까|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 니쉬: |접속잘안함|2016-02-02 00:55:18|구구구구구구|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1| 쥬비아: |접속잘안함|2016-02-02 00:56:33|풉..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 01:05:49|쥬비아놈..|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 북오더: |접속잘안함|2016-02-02 02:40:09|여긴어디? 적도 없고 아군도 없는 고독한 5출째..|FFFFFF|FFFFFF|pic_3876.jpg?=20151103|1 -1| 청기사: |보컬로이드|2016-02-02 04:12:42|4시 12분|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 橙: |보컬로이드|2016-02-02 04:18:17|xnpdpdpt|AFEEEE|AFEEEE|pic_3446.jpg?=20160201|1 -1| 橙: |보컬로이드|2016-02-02 04:18:54|은퇴하기전에 천하통일을 보고 싶소이다..|AFEEEE|AFEEEE|pic_3446.jpg?=20160201|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:20:07|4시19분|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:20:09|아ㅋㅋ 심란하다 전콘|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:21:03|폰이라 밀지도못하겠당|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:21:53|쥬비 안자고 머하냐|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:23:14|미리 시차적응하는중..은개뿔 잠이안와아|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:23:54|멍청ㅋㅋ|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:25:20|그런데 멜쨩이야말로 요즘 밤샘이잦으신데 잘리셨나..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:28:22|ㅇㅇ 그만뒀음|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 청기사: |보컬로이드|2016-02-02 04:28:48|지금 깨있는 이유는 걍 복통때문에 잠을 잘 수가 없다...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:29:54|ㄷㄷ 요즘 새벽에접하길래 싸 하다했더니 역시!|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:30:35|하그리브스급 유리몸이신듯|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:30:55|아 이따가 사무실좀 가야되는데 귀찮다...|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:32:41|집돌이처럼 집에만있지말고 바람쐬러...ㄱㄱ...|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:41:02|넌 자라 좀|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:43:22|왜..왜그러셈...|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1| 청기사: |보컬로이드|2016-02-02 04:45:18|사람이 말야 밤에 잠을 안자면 몸이 망가지기 십상이여|AFEEEE|AFEEEE|pic_2496.jpg?=20160126|1 -1| 쥬비아: |접속잘안함|2016-02-02 04:49:10|어차피 학교들어가면 아침시간에자서 ㄱㅊ..|FFFFFF|FFFFFF|pic_3901.jpg?=20151210|1 -1|직장인페이트:|접속잘안함|2016-02-02 10:38:49|홍농 발령좀 주세요|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1|직장인페이트:|접속잘안함|2016-02-02 10:39:12|헉... 왜 전메로..|FFFFFF|FFFFFF|pic_93.jpg?=20150120|1 -1| 감정: |접속잘안함|2016-02-02 10:53:44|ㅡㅁ.ㅡ........ 계림에 의병장 병력있는데 ㅠㅠ 출병못하겠당|FFFFFF|FFFFFF|default.jpg|0 -1| 감정: |접속잘안함|2016-02-02 10:53:52|...! 방사|FFFFFF|FFFFFF|default.jpg|0 -1|갓서유서:| 재야 |2016-02-02 10:58:10|갓-서유서|FFFFFF|FFFFFF|default.jpg|0 -1|강서유서:|접속잘안함|2016-02-02 11:00:39|!!|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-02-02 11:20:53|애석하구나 sss를 못 찍다니..|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|잠둥이션:|접속잘안함|2016-02-02 11:22:54|저자가 적장 카토다! 궁시를 집중하라!|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 카토: |보컬로이드|2016-02-02 11:23:23|드루와 드루와|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|잠둥이션:|접속잘안함|2016-02-02 11:23:59|●적로(+13)(을)를 습득했습니다! 깃수 마지막에....... 내 명마 적로로 그대를 사로 잡으리!|FFFFFF|FFFFFF|pic_3944.jpg?=20151116|1 -1| 카토: |보컬로이드|2016-02-02 11:31:09|한국인 답게 계림에서 망하고 싶으니 유구랑 대좀 빨리 정리해주세요 아무도 없는데..|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|카이사르:|접속잘안함|2016-02-02 11:34:14|카토님 깡기병일듯|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1| 카토: |보컬로이드|2016-02-02 11:35:13|마지막 백마가 간다! 서양 백마! ㅌㅌ|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-02-02 11:51:28|적장 물리치는 날이 오나요|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|강서유서:|접속잘안함|2016-02-02 12:08:14|평킬님한테 계속지넹...흑흑|FFFFFF|FFFFFF|default.jpg|0 -1| 니쉬: |접속잘안함|2016-02-02 12:10:01|그건 강서유서님이 평민이셔서...?!|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|카이사르:|접속잘안함|2016-02-02 12:14:38|카토님 아프실듯|FFFFFF|FFFFFF|pic_2922.jpg?=20140901|1 -1|강서유서:|접속잘안함|2016-02-02 12:14:48|평민이라니요 갓-서유서인데요!|FFFFFF|FFFFFF|default.jpg|0 -1|고긔가먹고싶:|보컬로이드|2016-02-02 12:16:01|계림은 안된다 이놈든아|AFEEEE|AFEEEE|pic_1430.jpg?=20151030|1 -1| 니쉬: |접속잘안함|2016-02-02 12:18:08|실은 갓킬러셨더거나...|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -1|일기토지배자:|보컬로이드|2016-02-02 12:29:54|너 왜 시비냐?|AFEEEE|AFEEEE|default.jpg|0 -1|갓서유서:| 재야 |2016-02-02 13:22:26|갓-서유서|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-02-02 13:31:03|모병양파하니까 썰리네|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1|갓서유서:| 재야 |2016-02-02 13:56:07|갓서유서 미만잡|FFFFFF|FFFFFF|default.jpg|0 -1| 카토: |보컬로이드|2016-02-02 14:06:57|마지막까지 양파는 까야겠다|AFEEEE|AFEEEE|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-02-02 14:09:13|보컬로이드분들 수고하셨습니당.|FFFF00|FFFF00|pic_3992.jpg?=20160101|1 -1| 니쉬: |접속잘안함|2016-02-02 14:09:31|특히 카토님과 의병장 분들...|FFFF00|FFFF00|pic_3992.jpg?=20160101|1 -1| Anes: |접속잘안함|2016-02-02 14:09:36|모두 수고하셨습니다|FFFF00|FFFF00|pic_3135.jpg?=20150819|1 -1| 카토: | 재야 |2016-02-02 14:10:02|모두 수고하셨습니다.|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1| 카토: | 재야 |2016-02-02 14:10:09|무광님 천통 축하드립니다.|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1|잠둥이션:|접속잘안함|2016-02-02 14:10:23|수고하셨습니다. (꾸벅)|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1| 카토: | 재야 |2016-02-02 14:10:54|3만만 더 올렸음 sss인데 아깝네 쩝..|FFFFFF|FFFFFF|pic_4007.jpg?=20160122|1 -1| 니쉬: |접속잘안함|2016-02-02 14:20:26|깃수 참여하신 모든 분들 수고 하셨어유.|FFFF00|FFFF00|pic_3992.jpg?=20160101|1 -1| 청기사: |접속잘안함|2016-02-02 14:22:49|헐 나도 열심히 했는뎅|FFFF00|FFFF00|pic_2496.jpg?=20160126|1 -1|카이사르:|접속잘안함|2016-02-02 14:24:02|다음기수때 뵈어요~|FFFF00|FFFF00|pic_2922.jpg?=20140901|1 -1| 감정: |접속잘안함|2016-02-02 14:39:05|열전 주셔야합니다 무광님!!|FFFF00|FFFF00|default.jpg|0 -1| 감정: |접속잘안함|2016-02-02 14:39:06|열전 주셔야합니다 무광님!!|FFFF00|FFFF00|default.jpg|0 -1| 쥬비아: |접속잘안함|2016-02-02 14:44:02|임관이 목적이였군 의병장47녀석..|FFFF00|FFFF00|pic_3901.jpg?=20151210|1 -1| 비밀: |접속잘안함|2016-02-02 15:07:06|내 정체는 비밀이다. 내가 누구인지는 아무도 모른다|FFFF00|FFFF00|default.jpg|0 -1| 감정: |접속잘안함|2016-02-02 15:59:39|비밀이예요!|FFFF00|FFFF00|default.jpg|0 -1| 청기사: | 재야 |2016-02-02 17:23:55|기수 끝났으니 퍼뜩 장사 접어야겠구만|FFFFFF|FFFFFF|pic_2496.jpg?=20160126|1 -1| 이쓰미: |접속잘안함|2016-02-02 17:37:57|비밀을 알지만 비밀임!|FFFF00|FFFF00|pic_3717.jpg?=20150821|1 -1|북두칠성:|접속잘안함|2016-02-02 18:57:47|즐거운 삼모였으미 잘 대해주신 분들 감사하미 주군, 사스님, 잠듕님, 무광님 고맙스미(주군,사스님께는 장균님이 전해주시와요) 무광님 대우잘 해줘서 고맙스미 마지막 전쟁 풍족하게|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|잠둥이션:|접속잘안함|2016-02-02 18:58:48|반짝반짝 북두칠성 사랑해|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1|북두칠성:|접속잘안함|2016-02-02 18:59:06|하였으미 잊지않고 겐메주신 세심한 행동하나하나로 무광님께 감동받아 여러 장수들이 힘을모아 재임관한듯 하미 고맙스미|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 18:59:14|크흑|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 18:59:25|크흑떠나기전 주균께 인사못하나 슬펐으미 ㅠ,ㅠ|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 18:59:47|다행이나미 사랑한다 장균 나 잊으면 안 되미|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|잠둥이션:|접속잘안함|2016-02-02 19:02:14|헐 이번깃수가 마지막이에요?|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1|잠둥이션:|접속잘안함|2016-02-02 19:02:57|아하... 수능 잘 봐요 ㅠㅠ 흑흑 이과?|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1|카이사르:|접속잘안함|2016-02-02 19:27:10|둘이 사귐?|FFFF00|FFFF00|pic_2922.jpg?=20140901|1 -1| 진리: |접속잘안함|2016-02-02 19:38:16|ee|FFFF00|FFFF00|pic_3989.jpg?=20160101|1 -1| 진리: |접속잘안함|2016-02-02 19:38:18|ㄷㄷ|FFFF00|FFFF00|pic_3989.jpg?=20160101|1 -1|북두칠성:|접속잘안함|2016-02-02 19:44:22|대학원생이에요 석사1년 남아서 이번에 빡세게해야 빨리 졸업하고 박사가서요|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 19:44:44|석사 졸업하고 올게유 ㅠ,ㅠ 잊지 말아유 알러뷰 ㅠ,ㅠ|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 19:45:26|이건 장군과 부하의 우정이외다 더럽히지 마시라우|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|북두칠성:|접속잘안함|2016-02-02 19:45:33|질투하냥|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1|잠둥이션:|접속잘안함|2016-02-02 19:52:22|대박 부릎당..ㅠㅠㅠ 대학원 ㅠㅠ|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1|잠둥이션:|접속잘안함|2016-02-02 19:52:26|빠이팅ㅇㅇㅇ|FFFF00|FFFF00|pic_3944.jpg?=20151116|1 -1|북두칠성:|접속잘안함|2016-02-02 19:53:57|장균도 퐈이링|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1| 비밀: |접속잘안함|2016-02-02 19:54:30|이 모든건 비밀로 이루어져 있습니다|FFFF00|FFFF00|default.jpg|0 -1|북두칠성:|접속잘안함|2016-02-02 19:54:56|내 이름도 넣어주시와우 완의 수호자 북두칠성이 평민킬러님을 2번이나 이긴 공훈을 잊으면 안되미|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 -1| 엄백호: | 재야 |2016-02-02 20:17:02|[접속잘안함]국의 천하통일을 축하합니다.|FFFFFF|FFFFFF|pic_3886.jpg?=20151012|1 -1| 비월: | 재야 |2016-02-02 20:47:09|모두들 고생 많으셧고 천통 축하드립니다~|FFFFFF|FFFFFF|pic_233.jpg?=20140830|1 -1| 소드락: | 재야 |2016-02-02 22:15:43|ㅂㅂ2|FFFFFF|FFFFFF|pic_3774.jpg?=20150723|1 -1|그만좀불러좀:|접속잘안함|2016-02-02 22:21:53|타도 감정 타도 감정 타도 감정 타도감정|FFFF00|FFFF00|default.jpg|0 -1|북두칠성:|접속잘안함|2016-02-03 00:13:23|나 개인열전 적었어욤 댓글 달아줘용|FFFF00|FFFF00|pic_3986.jpg?=20160108|1 diff --git a/che_close/logs/_alllog.txt b/che_close/logs/_alllog.txt deleted file mode 100644 index eef1abc6..00000000 --- a/che_close/logs/_alllog.txt +++ /dev/null @@ -1,8559 +0,0 @@ -●8월:귀양에서 갸오오(이)라는 호걸이 천하에 이름을 알립니다. -●8월:주시에서 카토(이)라는 호걸이 천하에 이름을 알립니다. -●8월:에서 비월(이)라는 호걸이 천하에 이름을 알립니다. -●8월:강주에서 페르시아(이)라는 호걸이 천하에 이름을 알립니다. -●8월:교지에서 부관(이)라는 호걸이 천하에 이름을 알립니다. -●8월:평원에서 평민킬러(이)라는 호걸이 천하에 이름을 알립니다. -●8월:하내에서 감정(이)라는 호걸이 천하에 이름을 알립니다. -●8월:서량에서 하루카(이)라는 호걸이 천하에 이름을 알립니다. -●8월:하비에서 재야(이)라는 호걸이 천하에 이름을 알립니다. -●8월:졸본에서 Air(이)라는 호걸이 천하에 이름을 알립니다. -●8월:영안에서 그만좀불러좀(이)라는 호걸이 천하에 이름을 알립니다. -●8월:비월(이)가 에서 거병하였습니다. -●8월:졸본에서 강서유서(이)라는 호걸이 천하에 이름을 알립니다. -●8월:안정에서 카이사르(이)라는 호걸이 천하에 이름을 알립니다. -●8월:계양에서 ㄷㄱㅎㅈㄷㅀ(이)라는 호걸이 천하에 이름을 알립니다. -●8월:진류에서 쥬비아(이)라는 호걸이 천하에 이름을 알립니다. -●8월:교지에서 청기사(이)라는 호걸이 천하에 이름을 알립니다. -●8월:에서 박일아(이)라는 호걸이 천하에 이름을 알립니다. -●8월:진류에서 일본어번역기(이)라는 호걸이 천하에 이름을 알립니다. -●8월:에서 대악마(이)라는 호걸이 천하에 이름을 알립니다. -●8월:진류에서 박희수(이)라는 호걸이 천하에 이름을 알립니다. -●8월:서량에서 최태원(이)라는 호걸이 천하에 이름을 알립니다. -●8월:강하에서 무광(이)라는 호걸이 천하에 이름을 알립니다. -●8월:운남에서 魯堂首(이)라는 호걸이 천하에 이름을 알립니다. -●8월:한중에서 북두칠성(이)라는 호걸이 천하에 이름을 알립니다. -●8월:상용에서 검임(이)라는 호걸이 천하에 이름을 알립니다. -●9월:계림에서 KAITO(이)라는 호걸이 천하에 이름을 알립니다. -●9월:진류에서 플젠(이)라는 호걸이 천하에 이름을 알립니다. -●9월:졸본에서 임쥐(이)라는 호걸이 천하에 이름을 알립니다. -●9월:교지에서 제갈여포(이)라는 호걸이 천하에 이름을 알립니다. -●9월:남영에서 ㅇωㅇ(이)라는 호걸이 천하에 이름을 알립니다. -●9월:진류에서 카이스트(이)라는 호걸이 천하에 이름을 알립니다. -●9월:남영에서 코토와르(이)라는 호걸이 천하에 이름을 알립니다. -●9월:부관(이)가 교지에서 거병하였습니다. -●9월:에서 잠둥이션(이)라는 호걸이 천하에 이름을 알립니다. -●9월:하비에서 이쓰미(이)라는 호걸이 천하에 이름을 알립니다. -●9월:KAITO(이)가 계림에서 거병하였습니다. -●9월:졸본에서 임사영(이)라는 호걸이 천하에 이름을 알립니다. -●9월:하내에서 Anes(이)라는 호걸이 천하에 이름을 알립니다. -●9월:상동에서 진리(이)라는 호걸이 천하에 이름을 알립니다. -●9월:귀양에서 정휘인(이)라는 호걸이 천하에 이름을 알립니다. -●9월:카이스트(이)가 비월임관했습니다. -●9월:영안에서 낭군(이)라는 호걸이 천하에 이름을 알립니다. -●9월:코토와르(이)가 KAITO임관했습니다. -●9월:무광(이)가 강하에서 거병하였습니다. -●9월:낭군(이)가 부관임관했습니다. -●9월:최태원(이)가 서량에서 거병하였습니다. -●9월:ㅇωㅇ(이)가 오석산(치료)(을)를 습득했습니다! -●9월:ㅇωㅇ(이)가 부관임관했습니다. -●9월:에서 다이스(이)라는 호걸이 천하에 이름을 알립니다. -●9월:남해에서 북오더(이)라는 호걸이 천하에 이름을 알립니다. -●9월:이쓰미(이)가 비월임관했습니다. -●9월:정휘인(이)가 논어(+7)(을)를 습득했습니다! -●9월:정휘인(이)가 KAITO임관했습니다. -●9월:하루카(이)가 서량에서 거병하였습니다. -●9월:카토(이)가 하루카임관했습니다. -●9월:갸오오(이)가 귀양에서 거병하였습니다. -●9월:ㄷㄱㅎㅈㄷㅀ(이)가 적란마(+14)(을)를 습득했습니다! -●9월:ㄷㄱㅎㅈㄷㅀ(이)가 무광임관했습니다. -●9월:무릉에서 물파스(이)라는 호걸이 천하에 이름을 알립니다. -●9월:자동에서 DVa(이)라는 호걸이 천하에 이름을 알립니다. -●9월:제갈여포(이)가 KAITO임관했습니다. -●9월:박희수(이)가 최태원임관했습니다. -●9월:그만좀불러좀(이)가 부관임관했습니다. -●9월:북오더(이)가 의적주(사기)(을)를 습득했습니다! -●9월:북오더(이)가 최태원임관했습니다. -●9월:평민킬러(이)가 하루카임관했습니다. -●9월:박일아(이)가 부관임관했습니다. -●9월:청기사(이)가 갸오오임관했습니다. -●9월:비월(이)가 에 국가를 건설하였습니다. -●9월:魯堂首(이)가 철편(+7)(을)를 습득했습니다! -●9월:魯堂首(이)가 갸오오임관했습니다. -●9월:계림에서 하연주(이)라는 호걸이 천하에 이름을 알립니다. -●10월:임사영(이)가 백마(+7)(을)를 습득했습니다! -●10월:임사영(이)가 최태원임관했습니다. -●10월:Anes(이)가 부관임관했습니다. -●10월:플젠(이)가 부관임관했습니다. -●10월:홍농에서 소드락(이)라는 호걸이 천하에 이름을 알립니다. -●10월:감정(이)가 최태원임관했습니다. -●10월:안평에서 누렁(이)라는 호걸이 천하에 이름을 알립니다. -●10월:안정에서 니콜(이)라는 호걸이 천하에 이름을 알립니다. -●10월:카이사르(이)가 무광임관했습니다. -●10월:부관(이)가 기주마(+7)(을)를 습득했습니다! -●10월:부관(이)가 교지에 국가를 건설하였습니다. -●10월:DVa(이)가 양주마(+8)(을)를 습득했습니다! -●10월:DVa(이)가 무광임관했습니다. -●10월:KAITO(이)가 계림에 국가를 건설하였습니다. -●10월:진리(이)가 구국론(+10)(을)를 습득했습니다! -●10월:진리(이)가 블소임관했습니다. -●10월:덕양에서 하기싫은데(이)라는 호걸이 천하에 이름을 알립니다. -●10월:안평에서 내나(이)라는 호걸이 천하에 이름을 알립니다. -●10월:최태원(이)가 서량에 국가를 건설하였습니다. -●10월:다이스(이)가 무후행군(치료)(을)를 습득했습니다! -●10월:다이스(이)가 블소임관했습니다. -●10월:신야에서 일기토지배자(이)라는 호걸이 천하에 이름을 알립니다. -●10월:갸오오(이)가 귀양에 국가를 건설하였습니다. -●10월:하기싫은데(이)가 긔엽긔임관했습니다. -●10월:소드락(이)가 홍농에서 거병하였습니다. -●10월:사비에서 橙(이)라는 호걸이 천하에 이름을 알립니다. -●10월:하연주(이)가 의천검(+15)(을)를 습득했습니다! -●10월:하연주(이)가 소드락임관했습니다. -●10월:평양에서 직장인페이트(이)라는 호걸이 천하에 이름을 알립니다. -●10월:직장인페이트(이)가 철질여골(+8)(을)를 습득했습니다! -●10월:직장인페이트(이)가 소드락임관했습니다. -●10월:橙(이)가 우승후보넥센임관했습니다. -●10월:대악마(이)가 하루카임관했습니다. -●11월:Air(이)가 긔엽긔임관했습니다. -●11월:강서유서(이)가 하루카임관했습니다. -●11월:누렁(이)가 사랑꾼들임관했습니다. -●11월:북두칠성(이)가 긔엽긔임관했습니다. -●11월:일기토지배자(이)가 신야에서 거병하였습니다. -●11월:안정에서 연이(이)라는 호걸이 천하에 이름을 알립니다. -●11월:홍농에서 엄백호(이)라는 호걸이 천하에 이름을 알립니다. -●11월:니콜(이)가 철척사모(+12)(을)를 습득했습니다! -●11월:니콜(이)가 블소임관했습니다. -●11월:쥬비아(이)가 소드락임관했습니다. -●11월:진류에서 니쉬(이)라는 호걸이 천하에 이름을 알립니다. -●11월:북해에서 러스티건(이)라는 호걸이 천하에 이름을 알립니다. -●11월:무광(이)가 신야에 국가를 건설하였습니다. -●11월:계양에서 야근탈출(이)라는 호걸이 천하에 이름을 알립니다. -●11월:하루카(이)가 하변에 국가를 건설하였습니다. -●11월:평원에서 휴식휴식휴식(이)라는 호걸이 천하에 이름을 알립니다. -●11월:소드락(이)가 기주마(+7)(을)를 습득했습니다! -●11월:소드락(이)가 홍농에 국가를 건설하였습니다. -●11월:이도에서 선비(이)라는 호걸이 천하에 이름을 알립니다. -●11월:고창에서 바닥을탁치고(이)라는 호걸이 천하에 이름을 알립니다. -●11월:강주에서 발암맨(이)라는 호걸이 천하에 이름을 알립니다. -●11월:계양에서 희지재(이)라는 호걸이 천하에 이름을 알립니다. -●12월:야근탈출(이)가 사랑꾼들임관했습니다. -●12월:니쉬(이)가 대부(+10)(을)를 습득했습니다! -●12월:니쉬(이)가 접속잘안함임관했습니다. -●12월:러스티건(이)가 보컬로이드임관했습니다. -●12월:계양에서 고긔가먹고싶(이)라는 호걸이 천하에 이름을 알립니다. -●12월:바닥을탁치고(이)가 보컬로이드임관했습니다. -●12월:에서 6974(이)라는 호걸이 천하에 이름을 알립니다. -●12월:천수에서 아소(이)라는 호걸이 천하에 이름을 알립니다. -●12월:연이(이)가 종횡무진임관했습니다. -●12월:페르시아(이)가 종횡무진임관했습니다. -●12월:선비(이)가 칠엽청점(치료)(을)를 습득했습니다! -●12월:선비(이)가 접속잘안함임관했습니다. -●12월:박희수(이)가 국기를 변경하였습니다. -◆1월:180년이 되었습니다. -●1월:아소(이)가 블소임관했습니다. -●1월:고긔가먹고싶(이)가 언월도(+14)(을)를 습득했습니다! -●1월:고긔가먹고싶(이)가 보컬로이드임관했습니다. -●1월:발암맨(이)가 종횡무진임관했습니다. -●1월:내나(이)가 종횡무진임관했습니다. -●2월:물파스(이)가 종횡무진임관했습니다. -●2월:임쥐(이)가 농사중 호미에 머리를 맞아 죽고말았습니다. -●3월:상동에서 SARS(이)라는 호걸이 천하에 이름을 알립니다. -●4월:SARS(이)가 상동에서 거병하였습니다. -●4월:엄백호(이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다. -●4월:재야(이)가 어엿븐소드락임관했습니다. -●4월:휴식휴식휴식(이)가 역병에 걸려 죽고 말았습니다. -●7월:여남에서 HideD(이)라는 호걸이 천하에 이름을 알립니다. -●7월:건녕에서 くま(이)라는 호걸이 천하에 이름을 알립니다. -●8월:회계에서 장임(이)라는 호걸이 천하에 이름을 알립니다. -●8월:복양에서 진(이)라는 호걸이 천하에 이름을 알립니다. -●8월:장임(이)가 회계에서 거병하였습니다. -●8월:진(이)가 장임임관했습니다. -●8월:HideD(이)가 접속잘안함임관했습니다. -●8월:くま(이)가 보컬로이드임관했습니다. -●8월:영릉에서 리안(이)라는 호걸이 천하에 이름을 알립니다. -●9월:하비에서 내정달인(이)라는 호걸이 천하에 이름을 알립니다. -●9월:내정달인(이)가 전론(+8)(을)를 습득했습니다! -●9월:내정달인(이)가 블소임관했습니다. -●9월:리안(이)가 SARS임관했습니다. -●10월:SARS(이)가 남해에 국가를 건설하였습니다. -●11월:잠둥이션(이)가 일기토지배자임관했습니다. -●12월:바닥을탁치고(이)가 위료자(+7)(을)를 습득했습니다! -●12월:진양에서 Navy마초(이)라는 호걸이 천하에 이름을 알립니다. -●12월:Navy마초(이)가 춘추전(+11)(을)를 습득했습니다! -●12월:Navy마초(이)가 30하고망함임관했습니다. -●12월:여남에서 정력왕(이)라는 호걸이 천하에 이름을 알립니다. -◆1월:181년이 되었습니다. -●1월:운남에서 읭읭(이)라는 호걸이 천하에 이름을 알립니다. -●1월:SARS(이)가 긔엽긔선전 포고 하였습니다. -●1월:장임(이)가 남영에 국가를 건설하였습니다. -●1월:무릉에서 푸린푸린♥(이)라는 호걸이 천하에 이름을 알립니다. -●1월:읭읭(이)가 사랑꾼들임관했습니다. -●2월:정력왕(이)가 삼첨도(+10)(을)를 습득했습니다! -●2월:정력왕(이)가 일기토지배자임관했습니다. -●3월:에서 그래도우리는(이)라는 호걸이 천하에 이름을 알립니다. -●4월:영릉에서 을지바람(이)라는 호걸이 천하에 이름을 알립니다. -●4월:북해에서 비밀(이)라는 호걸이 천하에 이름을 알립니다. -●4월:여강에서 미친과학(이)라는 호걸이 천하에 이름을 알립니다. -●4월:비밀(이)가 일기토지배자임관했습니다. -●4월:미친과학(이)가 30하고망함임관했습니다. -●5월:을지바람(이)가 막겜임관했습니다. -●5월:진양에서 전인호(이)라는 호걸이 천하에 이름을 알립니다. -●5월:전인호(이)가 블소임관했습니다. -●6월:누렁(이)가 사륜거(+12)(을)를 습득했습니다! -●6월:일기토지배자(이)가 태평요술(회피)(을)를 습득했습니다! -●6월:일기토지배자(이)가 여남에 국가를 건설하였습니다. -●6월:상동에서 류화영(이)라는 호걸이 천하에 이름을 알립니다. -●6월:류화영(이)가 상동에서 거병하였습니다. -●7월:비월(이)가 무력단련소선전 포고 하였습니다. -●8월:에서 바쁘다바빠(이)라는 호걸이 천하에 이름을 알립니다. -●8월:강하에서 운록이(이)라는 호걸이 천하에 이름을 알립니다. -●8월:운록이(이)가 보컬로이드임관했습니다. -●8월:영릉에서 천괴금(이)라는 호걸이 천하에 이름을 알립니다. -●9월:장임(이)가 ⓜ하후공(이)라는 인재를 영입하였습니다! -●9월:졸본에서 10(이)라는 호걸이 천하에 이름을 알립니다. -●10월:졸본에서 피곤한조자룡(이)라는 호걸이 천하에 이름을 알립니다. -●10월:천수에서 뒷집할머니(이)라는 호걸이 천하에 이름을 알립니다. -●11월:장임(이)가 ⓜ손습(이)라는 인재를 영입하였습니다! -●11월:뒷집할머니(이)가 우승후보넥센임관했습니다. -●12월:운남에서 엄백호(이)라는 호걸이 천하에 이름을 알립니다. -●12월:엄백호(이)가 무력단련소임관했습니다. -◆1월:182년이 되었습니다. -●1월:이도에서 네시(이)라는 호걸이 천하에 이름을 알립니다. -●2월:천괴금(이)가 일확천금에 놀라 심장마비로 죽고 말았습니다. -●2월:10(이)가 천하 정세를 비관하며 분신하고 말았습니다. -●5월:천수에서 랜임1분장(이)라는 호걸이 천하에 이름을 알립니다. -●6월:랜임1분장(이)가 사기(+8)(을)를 습득했습니다! -●6월:랜임1분장(이)가 우승후보넥센임관했습니다. -●6월:네시(이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다. -●8월:류화영(이)가 세력을 해산했습니다. -●10월:계양에서 샤그니(이)라는 호걸이 천하에 이름을 알립니다. -●10월:안정에서 쿠요(이)라는 호걸이 천하에 이름을 알립니다. -◆1월:183년이 되었습니다. -●1월:우승후보넥센임사영(이)가 천수(으)로 진격합니다. -●1월:임사영(이)가 귀병(으)로 성벽을 공격합니다. -●1월:블소아소(이)가 수춘(으)로 진격합니다. -●1월:아소(이)가 기병(으)로 성벽을 공격합니다. -●1월:종횡무진강서유서(이)가 가정(으)로 진격합니다. -●1월:강서유서(이)가 궁병(으)로 성벽을 공격합니다. -●1월:강서유서(이)가 가정 공략에 성공했습니다. -●1월:긔엽긔Anes(이)가 남만(으)로 진격합니다. -●1월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●1월:사랑꾼들야근탈출(이)가 강주(으)로 진격합니다. -●1월:야근탈출(이)가 기병(으)로 성벽을 공격합니다. -●1월:희지재(이)가 긔엽긔임관했습니다. -●1월:긔엽긔북두칠성(이)가 남만(으)로 진격합니다. -●1월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●1월:북두칠성(이)가 남만 공략에 성공했습니다. -●1월:긔엽긔플젠(이)가 남해(으)로 진격합니다. -●1월:플젠(이)가 보병(으)로 성벽을 공격합니다. -●1월:접속잘안함니쉬(이)가 상용(으)로 진격합니다. -●1월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●1월:우승후보넥센랜임1분장(이)가 (으)로 진격합니다. -●1월:랜임1분장(이)가 기병(으)로 성벽을 공격합니다. -●1월:접속잘안함카이사르(이)가 상용(으)로 진격합니다. -●1월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●1월:긔엽긔부관(이)가 남해(으)로 진격합니다. -●1월:부관(이)가 귀병(으)로 성벽을 공격합니다. -●1월:막겜장임(이)가 영릉(으)로 진격합니다. -●1월:장임(이)가 보병(으)로 성벽을 공격합니다. -●1월:접속잘안함DVa(이)가 양양(으)로 진격합니다. -●1월:DVa(이)가 기병(으)로 성벽을 공격합니다. -●1월:6974(이)가 종횡무진임관했습니다. -●1월:블소진리(이)가 정도(으)로 진격합니다. -●1월:진리(이)가 기병(으)로 성벽을 공격합니다. -●1월:진리(이)가 정도 공략에 성공했습니다. -●1월:검임(이)가 긔엽긔임관했습니다. -●1월:보컬로이드코토와르(이)가 이도(으)로 진격합니다. -●1월:코토와르(이)가 궁병(으)로 성벽을 공격합니다. -●1월:일본어번역기(이)가 장자(+9)(을)를 습득했습니다! -●1월:일본어번역기(이)가 종횡무진임관했습니다. -●1월:접속잘안함무광(이)가 양양(으)로 진격합니다. -●1월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●1월:긔엽긔낭군(이)가 남해(으)로 진격합니다. -●1월:낭군(이)가 귀병(으)로 성벽을 공격합니다. -●1월:우승후보넥센최태원(이)가 (으)로 진격합니다. -●1월:최태원(이)가 귀병(으)로 성벽을 공격합니다. -●1월:긔엽긔ㅇωㅇ(이)가 남해(으)로 진격합니다. -●1월:ㅇωㅇ(이)가 귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함HideD(이)가 상용(으)로 진격합니다. -●1월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●1월:종횡무진하루카(이)가 (으)로 진격합니다. -●1월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●1월:하루카(이)가 공략에 성공했습니다. -●1월:종횡무진카토(이)가 안정(으)로 진격합니다. -●1월:카토(이)가 기병(으)로 성벽을 공격합니다. -●1월:사랑꾼들갸오오(이)가 강주(으)로 진격합니다. -●1월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●1월:긔엽긔하기싫은데(이)가 남해(으)로 진격합니다. -●1월:하기싫은데(이)가 보병(으)로 성벽을 공격합니다. -●1월:잠둥이션(이)가 긔엽긔(으)로 망명하였습니다. -●1월:어엿븐소드락소드락(이)가 하내(으)로 진격합니다. -●1월:소드락(이)가 기병(으)로 성벽을 공격합니다. -●1월:어엿븐소드락재야(이)가 하내(으)로 진격합니다. -●1월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●1월:우승후보넥센박희수(이)가 (으)로 진격합니다. -●1월:박희수(이)가 기병(으)로 성벽을 공격합니다. -●1월:박희수(이)가 공략에 성공했습니다. -●1월:긔엽긔그만좀불러좀(이)가 남해(으)로 진격합니다. -●1월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●1월:우승후보넥센북오더(이)가 천수(으)로 진격합니다. -●1월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●1월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●1월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●1월:종횡무진평민킬러(이)가 가맹(으)로 진격합니다. -●1월:평민킬러(이)가 궁병(으)로 성벽을 공격합니다. -●1월:어엿븐소드락하연주(이)가 사곡(으)로 진격합니다. -●1월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●1월:긔엽긔박일아(이)가 남해(으)로 진격합니다. -●1월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●1월:긔엽긔잠둥이션(이)가 남해(으)로 진격합니다. -●1월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●1월:잠둥이션(이)가 남해 공략에 성공했습니다. -●1월:누군가가 여남(을)를 살피는 것 같습니다. -●1월:사랑꾼들魯堂首(이)가 강주(으)로 진격합니다. -●1월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●1월:종횡무진내나(이)가 가맹(으)로 진격합니다. -●1월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●1월:종횡무진대악마(이)가 안정(으)로 진격합니다. -●1월:대악마(이)가 기병(으)로 성벽을 공격합니다. -●2월:바쁘다바빠(이)가 보컬로이드임관했습니다. -●2월:우승후보넥센임사영(이)가 천수(으)로 진격합니다. -●2월:임사영(이)가 귀병(으)로 성벽을 공격합니다. -●2월:블소아소(이)가 (으)로 진격합니다. -●2월:아소(이)가 기병(으)로 성벽을 공격합니다. -●2월:종횡무진강서유서(이)가 안정(으)로 진격합니다. -●2월:강서유서(이)가 궁병(으)로 성벽을 공격합니다. -●2월:사랑꾼들야근탈출(이)가 강주(으)로 진격합니다. -●2월:야근탈출(이)가 기병(으)로 성벽을 공격합니다. -●2월:긔엽긔북두칠성(이)가 (으)로 진격합니다. -●2월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●2월:접속잘안함니쉬(이)가 상용(으)로 진격합니다. -●2월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●2월:우승후보넥센랜임1분장(이)가 천수(으)로 진격합니다. -●2월:랜임1분장(이)가 기병(으)로 성벽을 공격합니다. -●2월:랜임1분장(이)가 천수 공략에 성공했습니다. -●2월:어엿븐소드락쥬비아(이)가 하내(으)로 진격합니다. -●2월:쥬비아(이)가 귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함카이사르(이)가 상용(으)로 진격합니다. -●2월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●2월:막겜장임(이)가 영릉(으)로 진격합니다. -●2월:장임(이)가 보병(으)로 성벽을 공격합니다. -●2월:접속잘안함DVa(이)가 양양(으)로 진격합니다. -●2월:DVa(이)가 기병(으)로 성벽을 공격합니다. -●2월:블소진리(이)가 (으)로 진격합니다. -●2월:진리(이)가 기병(으)로 성벽을 공격합니다. -●2월:접속잘안함무광(이)가 양양(으)로 진격합니다. -●2월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함HideD(이)가 양양(으)로 진격합니다. -●2월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●2월:하루카(이)가 우승후보넥센선전 포고 하였습니다. -●2월:종횡무진하루카(이)가 안정(으)로 진격합니다. -●2월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●2월:하루카(이)가 안정 공략에 성공했습니다. -●2월:사랑꾼들갸오오(이)가 강주(으)로 진격합니다. -●2월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●2월:갸오오(이)가 강주 공략에 성공했습니다. -●2월:어엿븐소드락소드락(이)가 하내(으)로 진격합니다. -●2월:소드락(이)가 기병(으)로 성벽을 공격합니다. -●2월:어엿븐소드락재야(이)가 하내(으)로 진격합니다. -●2월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●2월:재야(이)가 하내 공략에 성공했습니다. -●2월:우승후보넥센박희수(이)가 적도(으)로 진격합니다. -●2월:박희수(이)가 기병(으)로 성벽을 공격합니다. -●2월:박희수(이)가 적도 공략에 성공했습니다. -●2월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●2월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●2월:종횡무진평민킬러(이)가 가맹(으)로 진격합니다. -●2월:평민킬러(이)가 궁병(으)로 성벽을 공격합니다. -●2월:평민킬러(이)가 가맹 공략에 성공했습니다. -●2월:어엿븐소드락하연주(이)가 사곡(으)로 진격합니다. -●2월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:긔엽긔박일아(이)가 (으)로 진격합니다. -●2월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●2월:긔엽긔잠둥이션(이)가 (으)로 진격합니다. -●2월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●2월:사랑꾼들魯堂首(이)가 주시(으)로 진격합니다. -●2월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●2월:종횡무진내나(이)가 자동(으)로 진격합니다. -●2월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●3월:블소아소(이)가 (으)로 진격합니다. -●3월:아소(이)가 기병(으)로 성벽을 공격합니다. -●3월:아소의 기병(이)가 퇴각했습니다. -●3월:긔엽긔Anes(이)가 상동(으)로 진격합니다. -●3월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●3월:접속잘안함카이사르(이)가 상용(으)로 진격합니다. -●3월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●3월:카이사르(이)가 상용 공략에 성공했습니다. -●3월:긔엽긔부관(이)가 (으)로 진격합니다. -●3월:부관(이)가 귀병(으)로 성벽을 공격합니다. -●3월:부관(이)가 공략에 성공했습니다. -●3월:막겜장임(이)가 영릉(으)로 진격합니다. -●3월:장임(이)가 보병(으)로 성벽을 공격합니다. -●3월:접속잘안함DVa(이)가 양양(으)로 진격합니다. -●3월:DVa(이)가 기병(으)로 성벽을 공격합니다. -●3월:DVa의 기병(이)가 퇴각했습니다. -●3월:블소진리(이)가 (으)로 진격합니다. -●3월:진리(이)가 기병(으)로 성벽을 공격합니다. -●3월:진리(이)가 공략에 성공했습니다. -●3월:접속잘안함무광(이)가 양양(으)로 진격합니다. -●3월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●3월:무광의 귀병(이)가 퇴각했습니다. -●3월:접속잘안함HideD(이)가 양양(으)로 진격합니다. -●3월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●3월:HideD의 귀병(이)가 퇴각했습니다. -●3월:종횡무진하루카(이)가 자동(으)로 진격합니다. -●3월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●3월:종횡무진카토(이)가 자동(으)로 진격합니다. -●3월:카토(이)가 기병(으)로 성벽을 공격합니다. -●3월:긔엽긔하기싫은데(이)가 산월(으)로 진격합니다. -●3월:하기싫은데(이)가 보병(으)로 성벽을 공격합니다. -●3월:소드락(이)가 국기를 변경하였습니다. -●3월:어엿븐소드락소드락(이)가 사곡(으)로 진격합니다. -●3월:소드락(이)가 기병(으)로 성벽을 공격합니다. -●3월:소드락(이)가 사곡 공략에 성공했습니다. -●3월:긔엽긔그만좀불러좀(이)가 상동(으)로 진격합니다. -●3월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●3월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●3월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●3월:くま의 귀병(이)가 퇴각했습니다. -●3월:푸린푸린♥(이)가 종횡무진임관했습니다. -●3월:쿠요(이)가 우승후보넥센임관했습니다. -●3월:종횡무진평민킬러(이)가 자동(으)로 진격합니다. -●3월:평민킬러(이)가 궁병(으)로 성벽을 공격합니다. -●3월:평민킬러(이)가 자동 공략에 성공했습니다. -●3월:긔엽긔박일아(이)가 상동(으)로 진격합니다. -●3월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●3월:박일아의 기병(이)가 퇴각했습니다. -●3월:긔엽긔잠둥이션(이)가 상동(으)로 진격합니다. -●3월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●3월:잠둥이션(이)가 상동 공략에 성공했습니다. -●3월:사랑꾼들魯堂首(이)가 덕양(으)로 진격합니다. -●3월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●3월:샤그니(이)가 단식운동을 하다가 굶어 죽고말았습니다. -●3월:사랑꾼들읭읭(이)가 덕양(으)로 진격합니다. -●3월:읭읭(이)가 기병(으)로 성벽을 공격합니다. -●3월:종횡무진대악마(이)가 양평(으)로 진격합니다. -●3월:대악마(이)가 기병(으)로 성벽을 공격합니다. -●4월:종횡무진강서유서(이)가 양평(으)로 진격합니다. -●4월:강서유서(이)가 궁병(으)로 성벽을 공격합니다. -●4월:강서유서(이)가 양평 공략에 성공했습니다. -●4월:긔엽긔Anes(이)가 산월(으)로 진격합니다. -●4월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●4월:Anes(이)가 산월 공략에 성공했습니다. -●4월:에서 금과 쌀을 도둑맞았습니다. -●4월:긔엽긔부관(이)가 유구(으)로 진격합니다. -●4월:부관(이)가 귀병(으)로 성벽을 공격합니다. -●4월:부관(이)가 유구 공략에 성공했습니다. -●4월:막겜장임(이)가 영릉(으)로 진격합니다. -●4월:장임(이)가 보병(으)로 성벽을 공격합니다. -●4월:장임(이)가 영릉 공략에 성공했습니다. -●4월:종횡무진하루카(이)가 한중(으)로 진격합니다. -●4월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●4월:종횡무진카토(이)가 한중(으)로 진격합니다. -●4월:카토(이)가 기병(으)로 성벽을 공격합니다. -●4월:카토의 기병(이)가 퇴각했습니다. -●4월:사랑꾼들갸오오(이)가 덕양(으)로 진격합니다. -●4월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●4월:어엿븐소드락재야(이)가 호관(으)로 진격합니다. -●4월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●4월:재야의 귀병(이)가 퇴각했습니다. -●4월:긔엽긔그만좀불러좀(이)가 계양(으)로 진격합니다. -●4월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●4월:그만좀불러좀의 귀병(이)가 퇴각했습니다. -●4월:종횡무진평민킬러(이)가 한중(으)로 진격합니다. -●4월:평민킬러(이)가 궁병(으)로 성벽을 공격합니다. -●4월:사랑꾼들읭읭(이)가 덕양(으)로 진격합니다. -●4월:읭읭(이)가 기병(으)로 성벽을 공격합니다. -●4월:읭읭의 기병(이)가 퇴각했습니다. -●4월:종횡무진내나(이)가 한중(으)로 진격합니다. -●4월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●4월:내나의 귀병(이)가 퇴각했습니다. -●4월:종횡무진대악마(이)가 한중(으)로 진격합니다. -●4월:대악마(이)가 기병(으)로 성벽을 공격합니다. -●5월:종횡무진강서유서(이)가 한중(으)로 진격합니다. -●5월:강서유서(이)가 궁병(으)로 성벽을 공격합니다. -●5월:강서유서(이)가 한중 공략에 성공했습니다. -●5월:리안(이)가 우승후보넥센임관했습니다. -●5월:SARS(이)가 긔엽긔임관했습니다. -●5월:긔엽긔부관(이)가 (으)로 진격합니다. -●5월:부관(이)가 귀병(으)로 성벽을 공격합니다. -●5월:부관의 귀병(이)가 퇴각했습니다. -●5월:종횡무진일본어번역기(이)가 기산(으)로 진격합니다. -●5월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●5월:일본어번역기(이)가 기산 공략에 성공했습니다. -●5월:긔엽긔하기싫은데(이)가 계양(으)로 진격합니다. -●5월:하기싫은데(이)가 보병(으)로 성벽을 공격합니다. -●5월:하기싫은데의 보병(이)가 퇴각했습니다. -●5월:접속잘안함선비(이)가 양양(으)로 진격합니다. -●5월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●5월:하비에서 천괴금(이)라는 호걸이 천하에 이름을 알립니다. -●6월:긔엽긔플젠(이)가 회계(으)로 진격합니다. -●6월:플젠(이)가 보병(으)로 성벽을 공격합니다. -●6월:에서 금과 쌀을 도둑맞았습니다. -●6월:보컬로이드KAITO(이)가 탐라(으)로 진격합니다. -●6월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●6월:KAITO(이)가 탐라 공략에 성공했습니다. -●6월:천괴금(이)가 서량마(+11)(을)를 습득했습니다! -●6월:천괴금(이)가 블소임관했습니다. -●6월:보컬로이드코토와르(이)가 이도(으)로 진격합니다. -●6월:코토와르(이)가 궁병(으)로 성벽을 공격합니다. -●6월:코토와르(이)가 이도 공략에 성공했습니다. -●6월:종횡무진일본어번역기(이)가 면죽(으)로 진격합니다. -●6월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드운록이(이)가 위례(으)로 진격합니다. -●6월:운록이(이)가 귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함ㄷㄱㅎㅈㄷㅀ(이)가 양양(으)로 진격합니다. -●6월:ㄷㄱㅎㅈㄷㅀ(이)가 기병(으)로 성벽을 공격합니다. -●6월:어엿븐소드락하연주(이)가 함곡(으)로 진격합니다. -●6월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●6월:누군가가 여남(을)를 살피는 것 같습니다. -●7월:긔엽긔Air(이)가 고창(으)로 진격합니다. -●7월:Air(이)가 기병(으)로 성벽을 공격합니다. -●7월:블소아소(이)가 여남(으)로 진격합니다. -●7월:아소의 기병(와)과 엄백호의 보병(이)가 대결합니다. -●7월:긔엽긔플젠(이)가 회계(으)로 진격합니다. -●7월:플젠(이)가 보병(으)로 성벽을 공격합니다. -●7월:에서 금과 쌀을 도둑맞았습니다. -●7월:접속잘안함니쉬(이)가 양양(으)로 진격합니다. -●7월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●7월:블소니콜(이)가 수춘(으)로 진격합니다. -●7월:니콜(이)가 기병(으)로 성벽을 공격합니다. -●7월:어엿븐소드락쥬비아(이)가 진양(으)로 진격합니다. -●7월:쥬비아(이)가 귀병(으)로 성벽을 공격합니다. -●7월:접속잘안함카이사르(이)가 양양(으)로 진격합니다. -●7월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●7월:카이사르(이)가 양양 공략에 성공했습니다. -●7월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●7월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●7월:블소카이스트(이)가 여남(으)로 진격합니다. -●7월:카이스트의 귀병(와)과 엄백호의 보병(이)가 대결합니다. -●7월:엄백호의 보병(이)가 전멸했습니다. -●7월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●7월:코토와르(이)가 궁병(으)로 성벽을 공격합니다. -●7월:코토와르(이)가 공략에 성공했습니다. -●7월:블소다이스(이)가 여남(으)로 진격합니다. -●7월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●7월:블소이쓰미(이)가 여남(으)로 진격합니다. -●7월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●7월:블소전인호(이)가 여남(으)로 진격합니다. -●7월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●7월:사랑꾼들갸오오(이)가 덕양(으)로 진격합니다. -●7월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●7월:갸오오의 귀병(이)가 퇴각했습니다. -●7월:어엿븐소드락하연주(이)가 함곡(으)로 진격합니다. -●7월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●7월:하연주(이)가 함곡 공략에 성공했습니다. -●7월:박일아(이)가 보컬로이드선전 포고 하였습니다. -●7월:긔엽긔박일아(이)가 계양(으)로 진격합니다. -●7월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●7월:긔엽긔잠둥이션(이)가 고창(으)로 진격합니다. -●7월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●7월:블소비월(이)가 여남(으)로 진격합니다. -●7월:비월(이)가 보병(으)로 성벽을 공격합니다. -●8월:긔엽긔Air(이)가 고창(으)로 진격합니다. -●8월:Air(이)가 기병(으)로 성벽을 공격합니다. -●8월:블소아소(이)가 여남(으)로 진격합니다. -●8월:아소(이)가 기병(으)로 성벽을 공격합니다. -●8월:긔엽긔Anes(이)가 회계(으)로 진격합니다. -●8월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●8월:사랑꾼들야근탈출(이)가 덕양(으)로 진격합니다. -●8월:야근탈출(이)가 기병(으)로 성벽을 공격합니다. -●8월:야근탈출(이)가 덕양 공략에 성공했습니다. -●8월:접속잘안함니쉬(이)가 (으)로 진격합니다. -●8월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●8월:니쉬의 귀병(이)가 퇴각했습니다. -●8월:우승후보넥센랜임1분장(이)가 흉노(으)로 진격합니다. -●8월:랜임1분장(이)가 기병(으)로 성벽을 공격합니다. -●8월:랜임1분장의 기병(이)가 퇴각했습니다. -●8월:어엿븐소드락쥬비아(이)가 진양(으)로 진격합니다. -●8월:쥬비아(이)가 귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함카이사르(이)가 장판(으)로 진격합니다. -●8월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●8월:카이사르(이)가 장판 공략에 성공했습니다. -●8월:막겜장임(이)가 장사(으)로 진격합니다. -●8월:장임(이)가 보병(으)로 성벽을 공격합니다. -●8월:블소카이스트(이)가 여남(으)로 진격합니다. -●8월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●8월:종횡무진일본어번역기(이)가 면죽(으)로 진격합니다. -●8월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●8월:일본어번역기의 귀병(이)가 퇴각했습니다. -●8월:접속잘안함무광(이)가 (으)로 진격합니다. -●8월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●8월:블소다이스(이)가 여남(으)로 진격합니다. -●8월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●8월:블소이쓰미(이)가 여남(으)로 진격합니다. -●8월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●8월:블소전인호(이)가 여남(으)로 진격합니다. -●8월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●8월:전인호(이)가 여남 공략에 성공했습니다. -●8월:접속잘안함ㄷㄱㅎㅈㄷㅀ(이)가 (으)로 진격합니다. -●8월:ㄷㄱㅎㅈㄷㅀ(이)가 기병(으)로 성벽을 공격합니다. -●8월:블소비월(이)가 수춘(으)로 진격합니다. -●8월:비월(이)가 보병(으)로 성벽을 공격합니다. -●8월:魯堂首(이)가 종횡무진선전 포고 하였습니다. -●8월:사랑꾼들魯堂首(이)가 주시(으)로 진격합니다. -●8월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●9월:긔엽긔Anes(이)가 회계(으)로 진격합니다. -●9월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●9월:Anes(이)가 회계 공략에 성공했습니다. -●9월:긔엽긔북두칠성(이)가 계양(으)로 진격합니다. -●9월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●9월:일기토지배자(이)가 사랑꾼들임관했습니다. -●9월:블소니콜(이)가 수춘(으)로 진격합니다. -●9월:니콜(이)가 기병(으)로 성벽을 공격합니다. -●9월:접속잘안함카이사르(이)가 적벽(으)로 진격합니다. -●9월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●9월:카이사르(이)가 적벽 공략에 성공했습니다. -●9월:긔엽긔부관(이)가 고창(으)로 진격합니다. -●9월:부관(이)가 귀병(으)로 성벽을 공격합니다. -●9월:부관(이)가 고창 공략에 성공했습니다. -●9월:막겜장임(이)가 장사(으)로 진격합니다. -●9월:장임(이)가 보병(으)로 성벽을 공격합니다. -●9월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●9월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●9월:KAITO의 보병(이)가 퇴각했습니다. -●9월:블소진리(이)가 허창(으)로 진격합니다. -●9월:진리(이)가 정란(으)로 성벽을 공격합니다. -●9월:보컬로이드코토와르(이)가 위례(으)로 진격합니다. -●9월:코토와르(이)가 궁병(으)로 성벽을 공격합니다. -●9월:코토와르의 궁병(이)가 퇴각했습니다. -●9월:접속잘안함무광(이)가 강릉(으)로 진격합니다. -●9월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함HideD(이)가 강릉(으)로 진격합니다. -●9월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●9월:블소다이스(이)가 수춘(으)로 진격합니다. -●9월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●9월:다이스의 궁병(이)가 퇴각했습니다. -●9월:종횡무진하루카(이)가 면죽(으)로 진격합니다. -●9월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●9월:하루카(이)가 면죽 공략에 성공했습니다. -●9월:접속잘안함선비(이)가 (으)로 진격합니다. -●9월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●9월:블소비월(이)가 수춘(으)로 진격합니다. -●9월:비월(이)가 보병(으)로 성벽을 공격합니다. -●9월:비월의 보병(이)가 퇴각했습니다. -●10월:긔엽긔북두칠성(이)가 계양(으)로 진격합니다. -●10월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●10월:에서 ㅁㄴㅇ(이)라는 호걸이 천하에 이름을 알립니다. -●10월:블소니콜(이)가 수춘(으)로 진격합니다. -●10월:니콜(이)가 기병(으)로 성벽을 공격합니다. -●10월:니콜의 기병(이)가 퇴각했습니다. -●10월:접속잘안함카이사르(이)가 여강(으)로 진격합니다. -●10월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●10월:막겜장임(이)가 장사(으)로 진격합니다. -●10월:장임(이)가 보병(으)로 성벽을 공격합니다. -●10월:접속잘안함DVa(이)가 강릉(으)로 진격합니다. -●10월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●10월:블소진리(이)가 수춘(으)로 진격합니다. -●10월:진리(이)가 정란(으)로 성벽을 공격합니다. -●10월:진리(이)가 수춘 공략에 성공했습니다. -●10월:ⓜ손습(이)가 막겜에서 추방당하였습니다. -●10월:보컬로이드바닥을탁치고(이)가 위례(으)로 진격합니다. -●10월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함무광(이)가 강릉(으)로 진격합니다. -●10월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●10월:무광의 귀병(이)가 퇴각했습니다. -●10월:접속잘안함HideD(이)가 강릉(으)로 진격합니다. -●10월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드정휘인(이)가 위례(으)로 진격합니다. -●10월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●10월:계양에서 네시(이)라는 호걸이 천하에 이름을 알립니다. -●10월:접속잘안함ㄷㄱㅎㅈㄷㅀ(이)가 (으)로 진격합니다. -●10월:ㄷㄱㅎㅈㄷㅀ(이)가 기병(으)로 성벽을 공격합니다. -●10월:어엿븐소드락재야(이)가 호관(으)로 진격합니다. -●10월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●10월:북오더(이)가 ⓜ동공(이)라는 인재를 영입하였습니다! -●10월:보컬로이드くま(이)가 위례(으)로 진격합니다. -●10월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●10월:사랑꾼들魯堂首(이)가 주시(으)로 진격합니다. -●10월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●11월:북해에서 김우민(이)라는 호걸이 천하에 이름을 알립니다. -●11월:긔엽긔북두칠성(이)가 계양(으)로 진격합니다. -●11월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●11월:긔엽긔플젠(이)가 (으)로 진격합니다. -●11월:플젠(이)가 보병(으)로 성벽을 공격합니다. -●11월:김우민(이)가 접속잘안함임관했습니다. -●11월:접속잘안함카이사르(이)가 여강(으)로 진격합니다. -●11월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●11월:카이사르의 궁병(이)가 퇴각했습니다. -●11월:긔엽긔SARS(이)가 계양(으)로 진격합니다. -●11월:SARS(이)가 정란(으)로 성벽을 공격합니다. -●11월:SARS(이)가 계양 공략에 성공했습니다. -●11월:접속잘안함DVa(이)가 강릉(으)로 진격합니다. -●11월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●11월:DVa(이)가 강릉 공략에 성공했습니다. -●11월:블소진리(이)가 합비(으)로 진격합니다. -●11월:진리(이)가 정란(으)로 성벽을 공격합니다. -●11월:진리(이)가 합비 공략에 성공했습니다. -●11월:보컬로이드바닥을탁치고(이)가 위례(으)로 진격합니다. -●11월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●11월:바닥을탁치고의 귀병(이)가 퇴각했습니다. -●11월:긔엽긔낭군(이)가 시상(으)로 진격합니다. -●11월:낭군(이)가 귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함HideD(이)가 강하(으)로 진격합니다. -●11월:HideD(이)가 귀병(으)로 성벽을 공격합니다. -●11월:HideD의 귀병(이)가 퇴각했습니다. -●11월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●11월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●11월:어엿븐소드락소드락(이)가 흉노(으)로 진격합니다. -●11월:소드락(이)가 기병(으)로 성벽을 공격합니다. -●11월:소드락의 기병(이)가 퇴각했습니다. -●11월:비밀(이)가 긔엽긔임관했습니다. -●11월:어엿븐소드락재야(이)가 호관(으)로 진격합니다. -●11월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●11월:재야(이)가 호관 공략에 성공했습니다. -●11월:미친과학(이)가 우승후보넥센임관했습니다. -●11월:Navy마초(이)가 사랑꾼들임관했습니다. -●11월:긔엽긔박일아(이)가 시상(으)로 진격합니다. -●11월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●11월:긔엽긔잠둥이션(이)가 시상(으)로 진격합니다. -●11월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●11월:사랑꾼들魯堂首(이)가 주시(으)로 진격합니다. -●11월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●11월:魯堂首(이)가 주시 공략에 성공했습니다. -●12월:긔엽긔Air(이)가 시상(으)로 진격합니다. -●12월:Air(이)가 기병(으)로 성벽을 공격합니다. -●12월:긔엽긔플젠(이)가 (으)로 진격합니다. -●12월:플젠(이)가 보병(으)로 성벽을 공격합니다. -●12월:플젠의 보병(이)가 퇴각했습니다. -●12월:접속잘안함니쉬(이)가 (으)로 진격합니다. -●12월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●12월:감정(이)가 ⓜ공손료(이)라는 인재를 영입하였습니다! -●12월:긔엽긔SARS(이)가 시상(으)로 진격합니다. -●12월:SARS(이)가 정란(으)로 성벽을 공격합니다. -●12월:접속잘안함DVa(이)가 무릉(으)로 진격합니다. -●12월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●12월:블소진리(이)가 허창(으)로 진격합니다. -●12월:진리(이)가 정란(으)로 성벽을 공격합니다. -●12월:블소카이스트(이)가 허창(으)로 진격합니다. -●12월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●12월:긔엽긔낭군(이)가 시상(으)로 진격합니다. -●12월:낭군(이)가 귀병(으)로 성벽을 공격합니다. -●12월:낭군의 귀병(이)가 퇴각했습니다. -●12월:엄백호(이)가 보컬로이드임관했습니다. -●12월:블소이쓰미(이)가 허창(으)로 진격합니다. -●12월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●12월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●12월:정휘인의 귀병(이)가 퇴각했습니다. -●12월:블소전인호(이)가 허창(으)로 진격합니다. -●12월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●12월:제갈여포(이)가 ⓜ유찬(이)라는 인재를 영입하였습니다! -●12월:어엿븐소드락재야(이)가 진양(으)로 진격합니다. -●12월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●12월:긔엽긔그만좀불러좀(이)가 시상(으)로 진격합니다. -●12월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●12월:긔엽긔박일아(이)가 시상(으)로 진격합니다. -●12월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●12월:박일아(이)가 시상 공략에 성공했습니다. -◆1월:184년이 되었습니다. -●1월:사랑꾼들야근탈출(이)가 영안(으)로 진격합니다. -●1월:야근탈출(이)가 기병(으)로 성벽을 공격합니다. -●1월:접속잘안함니쉬(이)가 (으)로 진격합니다. -●1월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함DVa(이)가 무릉(으)로 진격합니다. -●1월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●1월:보컬로이드코토와르(이)가 위례(으)로 진격합니다. -●1월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●1월:네시(이)가 우승후보넥센임관했습니다. -●1월:블소다이스(이)가 허창(으)로 진격합니다. -●1월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●1월:블소전인호(이)가 허창(으)로 진격합니다. -●1월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함선비(이)가 장사(으)로 진격합니다. -●1월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●1월:블소비월(이)가 복양(으)로 진격합니다. -●1월:비월(이)가 정란(으)로 성벽을 공격합니다. -●2월:접속잘안함니쉬(이)가 여강(으)로 진격합니다. -●2월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●2월:니쉬의 귀병(이)가 퇴각했습니다. -●2월:어엿븐소드락쥬비아(이)가 진양(으)로 진격합니다. -●2월:쥬비아(이)가 귀병(으)로 성벽을 공격합니다. -●2월:쥬비아(이)가 진양 공략에 성공했습니다. -●2월:막겜장임(이)가 장사(으)로 진격합니다. -●2월:장임(이)가 보병(으)로 성벽을 공격합니다. -●2월:접속잘안함DVa(이)가 무릉(으)로 진격합니다. -●2월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●2월:DVa(이)가 무릉 공략에 성공했습니다. -●2월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●2월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●2월:KAITO(이)가 공략에 성공했습니다. -●2월:무광(이)가 긔엽긔선전 포고 하였습니다. -●2월:보컬로이드くま(이)가 위례(으)로 진격합니다. -●2월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●2월:블소비월(이)가 복양(으)로 진격합니다. -●2월:비월(이)가 정란(으)로 성벽을 공격합니다. -●2월:비월의 정란(이)가 퇴각했습니다. -●3월:김우민(이)가 대완마(+10)(을)를 습득했습니다! -●3월:막겜장임(이)가 장사(으)로 진격합니다. -●3월:장임(이)가 보병(으)로 성벽을 공격합니다. -●3월:접속잘안함DVa(이)가 여강(으)로 진격합니다. -●3월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●3월:DVa(이)가 여강 공략에 성공했습니다. -●3월:접속잘안함선비(이)가 장사(으)로 진격합니다. -●3월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●3월:선비(이)가 장사 공략에 성공했습니다. -●3월:ㅁㄴㅇ(이)가 일확천금에 놀라 심장마비로 죽고 말았습니다. -●3월:보컬로이드くま(이)가 위례(으)로 진격합니다. -●3월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●3월:くま의 귀병(이)가 퇴각했습니다. -●4월:정력왕(이)가 긔엽긔임관했습니다. -●4월:접속잘안함카이사르(이)가 (으)로 진격합니다. -●4월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●4월:카이사르(이)가 공략에 성공했습니다. -●4월:막겜장임(이)가 건녕(으)로 진격합니다. -●4월:장임(이)가 보병(으)로 성벽을 공격합니다. -●4월:접속잘안함DVa(이)가 파양(으)로 진격합니다. -●4월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●4월:DVa의 정란(이)가 퇴각했습니다. -●4월:블소진리(이)가 허창(으)로 진격합니다. -●4월:진리(이)가 기병(으)로 성벽을 공격합니다. -●4월:블소카이스트(이)가 허창(으)로 진격합니다. -●4월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●4월:카이스트(이)가 허창 공략에 성공했습니다. -●4월:보컬로이드코토와르(이)가 위례(으)로 진격합니다. -●4월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●4월:코토와르(이)가 위례 공략에 성공했습니다. -●5월:블소카이스트(이)가 관도(으)로 진격합니다. -●5월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●5월:카이스트(이)가 관도 공략에 성공했습니다. -●5월:블소전인호(이)가 서주(으)로 진격합니다. -●5월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●6월:블소진리(이)가 사수(으)로 진격합니다. -●6월:진리(이)가 기병(으)로 성벽을 공격합니다. -●7월:ⓖ의병장5(이)가 ⓜ사량(이)라는 인재를 영입하였습니다! -●7월:어엿븐소드락재야(이)가 흉노(으)로 진격합니다. -●7월:재야(이)가 귀병(으)로 성벽을 공격합니다. -●7월:재야(이)가 흉노 공략에 성공했습니다. -●7월:그래도우리는(이)가 사랑꾼들임관했습니다. -●7월:블소비월(이)가 복양(으)로 진격합니다. -●7월:비월(이)가 정란(으)로 성벽을 공격합니다. -●8월:막겜장임(이)가 건녕(으)로 진격합니다. -●8월:장임(이)가 보병(으)로 성벽을 공격합니다. -●8월:북오더(이)가 ⓜ관이(이)라는 인재를 영입하였습니다! -●8월:블소비월(이)가 복양(으)로 진격합니다. -●8월:비월(이)가 정란(으)로 성벽을 공격합니다. -●9월:막겜장임(이)가 건녕(으)로 진격합니다. -●9월:장임(이)가 보병(으)로 성벽을 공격합니다. -●9월:블소진리(이)가 사수(으)로 진격합니다. -●9월:진리(이)가 기병(으)로 성벽을 공격합니다. -●9월:진리(이)가 사수 공략에 성공했습니다. -●9월:블소전인호(이)가 서주(으)로 진격합니다. -●9월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●9월:블소비월(이)가 복양(으)로 진격합니다. -●9월:비월(이)가 정란(으)로 성벽을 공격합니다. -●9월:비월(이)가 복양 공략에 성공했습니다. -●10월:막겜장임(이)가 건녕(으)로 진격합니다. -●10월:장임(이)가 보병(으)로 성벽을 공격합니다. -●10월:장임(이)가 건녕 공략에 성공했습니다. -●10월:블소진리(이)가 진류(으)로 진격합니다. -●10월:진리(이)가 기병(으)로 성벽을 공격합니다. -●10월:진리의 기병(이)가 퇴각했습니다. -●10월:블소다이스(이)가 호로(으)로 진격합니다. -●10월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●10월:블소이쓰미(이)가 진류(으)로 진격합니다. -●10월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●10월:블소전인호(이)가 서주(으)로 진격합니다. -●10월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●10월:전인호의 귀병(이)가 퇴각했습니다. -●10월:블소비월(이)가 계교(으)로 진격합니다. -●10월:비월(이)가 정란(으)로 성벽을 공격합니다. -●10월:비월(이)가 계교 공략에 성공했습니다. -●11월:블소니콜(이)가 호로(으)로 진격합니다. -●11월:니콜(이)가 정란(으)로 성벽을 공격합니다. -●11월:니콜(이)가 호로 공략에 성공했습니다. -●11월:막겜장임(이)가 운남(으)로 진격합니다. -●11월:장임(이)가 보병(으)로 성벽을 공격합니다. -●11월:장임의 보병(이)가 퇴각했습니다. -●11월:블소이쓰미(이)가 진류(으)로 진격합니다. -●11월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●11월:평양에서 엘마쨩상향좀(이)라는 호걸이 천하에 이름을 알립니다. -●11월:엘마쨩상향좀(이)가 종횡무진임관했습니다. -●11월:블소비월(이)가 (으)로 진격합니다. -●11월:비월(이)가 정란(으)로 성벽을 공격합니다. -●11월:비월의 정란(이)가 퇴각했습니다. -●12월:사랑꾼들야근탈출(이)가 영안(으)로 진격합니다. -●12월:야근탈출(이)가 기병(으)로 성벽을 공격합니다. -●12월:야근탈출의 기병(이)가 퇴각했습니다. -●12월:블소니콜(이)가 북해(으)로 진격합니다. -●12월:니콜(이)가 정란(으)로 성벽을 공격합니다. -●12월:쥬비아(이)가 동추(+7)(을)를 습득했습니다! -●12월:누군가가 평원(을)를 살피는 것 같습니다. -●12월:누군가가 의 성벽을 허물었습니다. -●12월:강하에서 南ことり(이)라는 호걸이 천하에 이름을 알립니다. -●12월:南ことり(이)가 우승후보넥센임관했습니다. -◆1월:185년이 되었습니다. -●1월:블소니콜(이)가 북해(으)로 진격합니다. -●1월:니콜(이)가 정란(으)로 성벽을 공격합니다. -●1월:장임(이)가 긔엽긔선전 포고 하였습니다. -●1월:누군가가 (을)를 살피는 것 같습니다. -●1월:블소카이스트(이)가 진류(으)로 진격합니다. -●1월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●1월:(이)가 불타고 있습니다. -●1월:영안에서 11(이)라는 호걸이 천하에 이름을 알립니다. -●1월:블소다이스(이)가 평원(으)로 진격합니다. -●1월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●1월:누군가가 가정(을)를 살피는 것 같습니다. -●1월:누군가가 의 성벽을 허물었습니다. -●2월:종횡무진강서유서(이)가 천수(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 박희수의 보병(이)가 대결합니다. -●2월:운남에서 난동(이)라는 호걸이 천하에 이름을 알립니다. -●2월:감정(이)가 노자(+15)(을)를 습득했습니다! -●2월:블소니콜(이)가 북해(으)로 진격합니다. -●2월:니콜(이)가 정란(으)로 성벽을 공격합니다. -●2월:니콜(이)가 북해 공략에 성공했습니다. -●2월:종횡무진일본어번역기(이)가 (으)로 진격합니다. -●2월:일본어번역기의 귀병(와)과 네시의 귀병(이)가 대결합니다. -●2월:우승후보넥센최태원(이)가 가정(으)로 진격합니다. -●2월:최태원의 귀병(와)과 대악마의 중장기병(이)가 대결합니다. -●2월:블소다이스(이)가 평원(으)로 진격합니다. -●2월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●2월:다이스의 궁병(이)가 퇴각했습니다. -●2월:블소전인호(이)가 서주(으)로 진격합니다. -●2월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●2월:종횡무진하루카(이)가 (으)로 진격합니다. -●2월:하루카의 보병(와)과 임사영의 귀병(이)가 대결합니다. -●2월:종횡무진카토(이)가 (으)로 진격합니다. -●2월:카토의 중장기병(와)과 쿠요의 기병(이)가 대결합니다. -●2월:카토(이)가 철쇄(+7)(을)를 습득했습니다! -●2월:누군가가 안정(을)를 살피는 것 같습니다. -●2월:누군가가 서량(을)를 살피는 것 같습니다. -●2월:우승후보넥센북오더(이)가 가정(으)로 진격합니다. -●2월:북오더의 궁병(와)과 내나의 귀병(이)가 대결합니다. -●2월:종횡무진평민킬러(이)가 천수(으)로 진격합니다. -●2월:평민킬러의 연노병(와)과 박희수의 보병(이)가 대결합니다. -●2월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●2월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:종횡무진내나(이)가 (으)로 진격합니다. -●2월:내나의 귀병(와)과 임사영의 귀병(이)가 대결합니다. -●2월:임사영의 귀병(이)가 전멸했습니다. -●2월:내나의 귀병(와)과 북오더의 궁병(이)가 대결합니다. -●2월:북오더의 궁병(이)가 전멸했습니다. -●2월:내나의 귀병(와)과 쿠요의 기병(이)가 대결합니다. -●2월:종횡무진대악마(이)가 (으)로 진격합니다. -●2월:대악마의 중장기병(와)과 네시의 귀병(이)가 대결합니다. -●2월:네시의 귀병(이)가 전멸했습니다. -●2월:대악마의 중장기병(와)과 최태원의 귀병(이)가 대결합니다. -●2월:최태원의 귀병(이)가 전멸했습니다. -●2월:대악마의 중장기병(와)과 쿠요의 기병(이)가 대결합니다. -●2월:쿠요의 기병(이)가 전멸했습니다. -●3월:종횡무진강서유서(이)가 천수(으)로 진격합니다. -●3월:강서유서의 연노병(와)과 박희수의 보병(이)가 대결합니다. -●3월:박희수의 보병(이)가 전멸했습니다. -●3월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●3월:블소니콜(이)가 동황(으)로 진격합니다. -●3월:니콜(이)가 정란(으)로 성벽을 공격합니다. -●3월:니콜의 정란(이)가 퇴각했습니다. -●3월:막겜장임(이)가 운남(으)로 진격합니다. -●3월:장임(이)가 보병(으)로 성벽을 공격합니다. -●3월:블소진리(이)가 동황(으)로 진격합니다. -●3월:진리(이)가 기병(으)로 성벽을 공격합니다. -●3월:진리(이)가 동황 공략에 성공했습니다. -●3월:종횡무진일본어번역기(이)가 (으)로 진격합니다. -●3월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●3월:블소이쓰미(이)가 진류(으)로 진격합니다. -●3월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●3월:종횡무진하루카(이)가 (으)로 진격합니다. -●3월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●3월:하루카(이)가 공략에 성공했습니다. -●3월:종횡무진카토(이)가 천수(으)로 진격합니다. -●3월:카토의 중장기병(와)과 감정의 정란(이)가 대결합니다. -●3월:감정의 정란(이)가 전멸했습니다. -●3월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:누군가가 천수(을)를 살피는 것 같습니다. -●3월:종횡무진평민킬러(이)가 천수(으)로 진격합니다. -●3월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●3월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●3월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●3월:ⓜ손습(이)가 사랑꾼들임관했습니다. -●3월:종횡무진대악마(이)가 천수(으)로 진격합니다. -●3월:대악마의 중장기병(와)과 박희수의 보병(이)가 대결합니다. -●3월:박희수의 보병(이)가 전멸했습니다. -●3월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:종횡무진강서유서(이)가 천수(으)로 진격합니다. -●4월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●4월:강서유서(이)가 천수 공략에 성공했습니다. -●4월:막겜장임(이)가 운남(으)로 진격합니다. -●4월:장임(이)가 보병(으)로 성벽을 공격합니다. -●4월:누군가가 서량(을)를 살피는 것 같습니다. -●4월:블소진리(이)가 안평(으)로 진격합니다. -●4월:진리(이)가 기병(으)로 성벽을 공격합니다. -●4월:종횡무진하루카(이)가 서량(으)로 진격합니다. -●4월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●4월:류화영(이)가 긔엽긔임관했습니다. -●4월:종횡무진평민킬러(이)가 서량(으)로 진격합니다. -●4월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●4월:영안에서 샤그니(이)라는 호걸이 천하에 이름을 알립니다. -●5월:접속잘안함카이사르(이)가 강하(으)로 진격합니다. -●5월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●5월:막겜장임(이)가 운남(으)로 진격합니다. -●5월:장임(이)가 보병(으)로 성벽을 공격합니다. -●5월:장임(이)가 운남 공략에 성공했습니다. -●5월:블소카이스트(이)가 진류(으)로 진격합니다. -●5월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●5월:카이스트(이)가 진류 공략에 성공했습니다. -●6월:ⓜ사량(이)가 막겜에서 추방당하였습니다. -●6월:접속잘안함카이사르(이)가 강하(으)로 진격합니다. -●6월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●6월:카이사르의 궁병(이)가 퇴각했습니다. -●6월:사비에서 오티누스(이)라는 호걸이 천하에 이름을 알립니다. -●6월:블소카이스트(이)가 평원(으)로 진격합니다. -●6월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●6월:누군가가 (을)를 살피는 것 같습니다. -●6월:누군가가 덕양(을)를 살피는 것 같습니다. -●6월:블소비월(이)가 안평(으)로 진격합니다. -●6월:비월(이)가 정란(으)로 성벽을 공격합니다. -●6월:종횡무진내나(이)가 서량(으)로 진격합니다. -●6월:내나의 귀병(와)과 박희수의 보병(이)가 대결합니다. -●6월:평양에서 메구리네루카(이)라는 호걸이 천하에 이름을 알립니다. -●7월:사비에서 狂三(이)라는 호걸이 천하에 이름을 알립니다. -●7월:평원에서 더문더문(이)라는 호걸이 천하에 이름을 알립니다. -●7월:11(이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다. -●7월:블소카이스트(이)가 평원(으)로 진격합니다. -●7월:카이스트(이)가 귀병(으)로 성벽을 공격합니다. -●7월:카이스트의 귀병(이)가 퇴각했습니다. -●7월:종횡무진일본어번역기(이)가 서량(으)로 진격합니다. -●7월:일본어번역기의 귀병(와)과 북오더의 궁병(이)가 대결합니다. -●7월:누군가가 서량(을)를 살피는 것 같습니다. -●7월:블소이쓰미(이)가 평원(으)로 진격합니다. -●7월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●7월:이쓰미(이)가 평원 공략에 성공했습니다. -●7월:종횡무진카토(이)가 서량(으)로 진격합니다. -●7월:카토의 중장기병(와)과 최태원의 귀병(이)가 대결합니다. -●7월:더문더문(이)가 접속잘안함임관했습니다. -●7월:갸오오(이)가 오자병법(+14)(을)를 습득했습니다! -●7월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●7월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●7월:하비에서 미이잉구경용(이)라는 호걸이 천하에 이름을 알립니다. -●7월:블소비월(이)가 안평(으)로 진격합니다. -●7월:비월(이)가 정란(으)로 성벽을 공격합니다. -●7월:비월(이)가 안평 공략에 성공했습니다. -●7월:비월(이)가 사마법(+7)(을)를 습득했습니다! -●7월:난동(이)가 거리에서 갑자기 객사하고 말았습니다. -●7월:종횡무진내나(이)가 적도(으)로 진격합니다. -●7월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●7월:메구리네루카(이)가 보컬로이드임관했습니다. -●7월:종횡무진대악마(이)가 서량(으)로 진격합니다. -●7월:대악마의 중장기병(와)과 박희수의 보병(이)가 대결합니다. -●7월:狂三(이)가 블소임관했습니다. -●8월:종횡무진강서유서(이)가 서량(으)로 진격합니다. -●8월:강서유서의 연노병(와)과 임사영의 귀병(이)가 대결합니다. -●8월:사랑꾼들야근탈출(이)가 자동(으)로 진격합니다. -●8월:야근탈출의 기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:종횡무진일본어번역기(이)가 서량(으)로 진격합니다. -●8월:일본어번역기의 귀병(와)과 임사영의 귀병(이)가 대결합니다. -●8월:임사영의 귀병(이)가 전멸했습니다. -●8월:일본어번역기의 귀병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:일본어번역기의 귀병(이)가 퇴각했습니다. -●8월:블소다이스(이)가 서주(으)로 진격합니다. -●8월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●8월:블소전인호(이)가 서주(으)로 진격합니다. -●8월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●8월:종횡무진하루카(이)가 서량(으)로 진격합니다. -●8월:하루카의 보병(와)과 북오더의 궁병(이)가 대결합니다. -●8월:북오더의 궁병(이)가 전멸했습니다. -●8월:하루카의 보병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:종횡무진카토(이)가 서량(으)로 진격합니다. -●8월:카토의 중장기병(와)과 최태원의 귀병(이)가 대결합니다. -●8월:최태원의 귀병(이)가 전멸했습니다. -●8월:카토의 중장기병(와)과 박희수의 보병(이)가 대결합니다. -●8월:박희수의 보병(이)가 전멸했습니다. -●8월:카토의 중장기병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:쿠요의 기병(이)가 전멸했습니다. -●8월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●8월:사랑꾼들갸오오(이)가 자동(으)로 진격합니다. -●8월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●8월:ⓖ의병장5(이)가 ⓜ미조(이)라는 인재를 영입하였습니다! -●8월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●8월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●8월:블소비월(이)가 졸본(으)로 진격합니다. -●8월:비월(이)가 정란(으)로 성벽을 공격합니다. -●8월:비월의 정란(이)가 퇴각했습니다. -●8월:사랑꾼들魯堂首(이)가 자동(으)로 진격합니다. -●8월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●8월:사랑꾼들읭읭(이)가 자동(으)로 진격합니다. -●8월:읭읭의 기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:종횡무진내나(이)가 서량(으)로 진격합니다. -●8월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●8월:내나의 귀병(이)가 퇴각했습니다. -●8월:종횡무진대악마(이)가 서량(으)로 진격합니다. -●8월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:사랑꾼들야근탈출(이)가 자동(으)로 진격합니다. -●9월:야근탈출의 기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:야근탈출의 기병(이)가 퇴각했습니다. -●9월:ⓜ미조(이)가 막겜에서 추방당하였습니다. -●9월:누군가가 회계(을)를 살피는 것 같습니다. -●9월:누군가가 서량의 성벽을 허물었습니다. -●9월:블소다이스(이)가 서주(으)로 진격합니다. -●9월:다이스(이)가 궁병(으)로 성벽을 공격합니다. -●9월:다이스의 궁병(이)가 퇴각했습니다. -●9월:블소전인호(이)가 서주(으)로 진격합니다. -●9월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●9월:종횡무진카토(이)가 서량(으)로 진격합니다. -●9월:카토의 중장기병(와)과 감정의 정란(이)가 대결합니다. -●9월:감정의 정란(이)가 전멸했습니다. -●9월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:카토의 중장기병(이)가 퇴각했습니다. -●9월:사랑꾼들갸오오(이)가 자동(으)로 진격합니다. -●9월:갸오오의 귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:평민킬러의 연노병(이)가 전멸했습니다. -●9월:갸오오(이)가 귀병(으)로 성벽을 공격합니다. -●9월:사비에서 박보영(이)라는 호걸이 천하에 이름을 알립니다. -●9월:누군가가 (을)를 살피는 것 같습니다. -●9월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●9월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●9월:하연주의 궁병(이)가 퇴각했습니다. -●9월:사랑꾼들魯堂首(이)가 자동(으)로 진격합니다. -●9월:魯堂首(이)가 보병(으)로 성벽을 공격합니다. -●9월:사랑꾼들읭읭(이)가 자동(으)로 진격합니다. -●9월:읭읭(이)가 기병(으)로 성벽을 공격합니다. -●9월:읭읭의 기병(이)가 퇴각했습니다. -●9월:종횡무진대악마(이)가 서량(으)로 진격합니다. -●9월:대악마의 중장기병(와)과 橙의 기병(이)가 대결합니다. -●9월:대악마의 중장기병(이)가 퇴각했습니다. -●10월:종횡무진강서유서(이)가 서량(으)로 진격합니다. -●10월:강서유서의 연노병(와)과 橙의 기병(이)가 대결합니다. -●10월:橙의 기병(이)가 전멸했습니다. -●10월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●10월:접속잘안함카이사르(이)가 강하(으)로 진격합니다. -●10월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●10월:카이사르(이)가 강하 공략에 성공했습니다. -●10월:보컬로이드KAITO(이)가 회계(으)로 진격합니다. -●10월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●10월:누군가가 서량(을)를 살피는 것 같습니다. -●10월:블소전인호(이)가 서주(으)로 진격합니다. -●10월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●10월:전인호(이)가 서주 공략에 성공했습니다. -●10월:종횡무진하루카(이)가 서량(으)로 진격합니다. -●10월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●10월:보컬로이드제갈여포(이)가 회계(으)로 진격합니다. -●10월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●10월:영안에서 샌프란시스코(이)라는 호걸이 천하에 이름을 알립니다. -●10월:보컬로이드くま(이)가 (으)로 진격합니다. -●10월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●10월:종횡무진평민킬러(이)가 서량(으)로 진격합니다. -●10월:평민킬러의 연노병(와)과 쿠요의 기병(이)가 대결합니다. -●10월:샤그니(이)가 일확천금에 놀라 심장마비로 죽고 말았습니다. -●10월:평양에서 차오루(이)라는 호걸이 천하에 이름을 알립니다. -●11월:블소아소(이)가 졸본(으)로 진격합니다. -●11월:아소(이)가 기병(으)로 성벽을 공격합니다. -●11월:아소의 기병(이)가 퇴각했습니다. -●11월:종횡무진강서유서(이)가 서량(으)로 진격합니다. -●11월:강서유서의 연노병(와)과 북오더의 궁병(이)가 대결합니다. -●11월:강서유서의 연노병(이)가 퇴각했습니다. -●11월:샌프란시스코(이)가 종횡무진임관했습니다. -●11월:졸본에서 샤그니(이)라는 호걸이 천하에 이름을 알립니다. -●11월:오티누스(이)가 요절하고 말았습니다. -●11월:보컬로이드KAITO(이)가 회계(으)로 진격합니다. -●11월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●11월:보컬로이드바닥을탁치고(이)가 회계(으)로 진격합니다. -●11월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●11월:바닥을탁치고(이)가 회계 공략에 성공했습니다. -●11월:누군가가 시상(을)를 살피는 것 같습니다. -●11월:블소이쓰미(이)가 졸본(으)로 진격합니다. -●11월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●11월:누군가가 산월(을)를 살피는 것 같습니다. -●11월:차오루(이)가 종횡무진임관했습니다. -●11월:블소전인호(이)가 졸본(으)로 진격합니다. -●11월:전인호(이)가 귀병(으)로 성벽을 공격합니다. -●11월:전인호의 귀병(이)가 퇴각했습니다. -●11월:종횡무진하루카(이)가 서량(으)로 진격합니다. -●11월:하루카의 보병(와)과 ⓜ공손료의 귀병(이)가 대결합니다. -●11월:하루카의 보병(이)가 퇴각했습니다. -●11월:보컬로이드제갈여포(이)가 파양(으)로 진격합니다. -●11월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●11월:제갈여포(이)가 파양 공략에 성공했습니다. -●11월:샤그니(이)가 긔엽긔임관했습니다. -●11월:보컬로이드くま(이)가 (으)로 진격합니다. -●11월:くま의 귀병(와)과 ⓖ의병장21의 귀병(이)가 대결합니다. -●12월:보컬로이드코토와르(이)가 산월(으)로 진격합니다. -●12월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●12월:종횡무진일본어번역기(이)가 서량(으)로 진격합니다. -●12월:일본어번역기의 귀병(와)과 북오더의 궁병(이)가 대결합니다. -●12월:북오더의 궁병(이)가 전멸했습니다. -●12월:일본어번역기의 귀병(와)과 쿠요의 기병(이)가 대결합니다. -●12월:블소이쓰미(이)가 졸본(으)로 진격합니다. -●12월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●12월:이쓰미(이)가 졸본 공략에 성공했습니다. -●12월:보컬로이드정휘인(이)가 산월(으)로 진격합니다. -●12월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●12월:정휘인(이)가 산월 공략에 성공했습니다. -●12월:종횡무진카토(이)가 서량(으)로 진격합니다. -●12월:카토의 중장기병(와)과 쿠요의 기병(이)가 대결합니다. -●12월:쿠요의 기병(이)가 전멸했습니다. -●12월:카토의 중장기병(와)과 ⓜ공손료의 귀병(이)가 대결합니다. -●12월:ⓜ공손료의 귀병(이)가 전멸했습니다. -●12월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●12월:카토(이)가 서량 공략에 성공했습니다. -●12월:누군가가 자동(을)를 살피는 것 같습니다. -●12월:종횡무진내나(이)가 (으)로 진격합니다. -●12월:내나의 귀병(와)과 쿠요의 기병(이)가 대결합니다. -●12월:누군가가 상동(을)를 살피는 것 같습니다. -◆1월:186년이 되었습니다. -●1월:사랑꾼들누렁(이)가 자동(으)로 진격합니다. -●1월:누렁의 귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:사랑꾼들야근탈출(이)가 자동(으)로 진격합니다. -●1월:야근탈출의 기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:평민킬러의 연노병(이)가 전멸했습니다. -●1월:미이잉구경용(이)가 누군가의 사주로 자객에게 암살당했습니다. -●1월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●1월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●1월:코토와르의 기병(이)가 퇴각했습니다. -●1월:종횡무진일본어번역기(이)가 적도(으)로 진격합니다. -●1월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●1월:일본어번역기의 귀병(이)가 퇴각했습니다. -●1월:누군가가 덕양(을)를 살피는 것 같습니다. -●1월:블소이쓰미(이)가 오환(으)로 진격합니다. -●1월:이쓰미(이)가 귀병(으)로 성벽을 공격합니다. -●1월:이쓰미의 귀병(이)가 퇴각했습니다. -●1월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●1월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●1월:정휘인(이)가 공략에 성공했습니다. -●1월:평양에서 미이잉구경용(이)라는 호걸이 천하에 이름을 알립니다. -●1월:사랑꾼들갸오오(이)가 자동(으)로 진격합니다. -●1월:갸오오의 귀병(와)과 카토의 중장기병(이)가 대결합니다. -●1월:누군가가 가맹(을)를 살피는 것 같습니다. -●1월:사랑꾼들魯堂首(이)가 자동(으)로 진격합니다. -●1월:魯堂首의 등갑병(와)과 카토의 중장기병(이)가 대결합니다. -●1월:카토의 중장기병(이)가 전멸했습니다. -●1월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●1월:사랑꾼들읭읭(이)가 자동(으)로 진격합니다. -●1월:읭읭의 기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:종횡무진내나(이)가 (으)로 진격합니다. -●1월:내나의 귀병(와)과 임사영의 귀병(이)가 대결합니다. -●2월:사랑꾼들누렁(이)가 자동(으)로 진격합니다. -●2월:누렁의 귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●2월:평민킬러의 연노병(이)가 전멸했습니다. -●2월:누렁(이)가 귀병(으)로 성벽을 공격합니다. -●2월:사랑꾼들야근탈출(이)가 자동(으)로 진격합니다. -●2월:야근탈출의 기병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:야근탈출의 기병(이)가 퇴각했습니다. -●2월:자동에서 금과 쌀을 도둑맞았습니다. -●2월:접속잘안함니쉬(이)가 시상(으)로 진격합니다. -●2월:니쉬의 귀병(와)과 ⓖ의병장21의 귀병(이)가 대결합니다. -●2월:ⓖ의병장21의 귀병(이)가 전멸했습니다. -●2월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함카이사르(이)가 시상(으)로 진격합니다. -●2월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●2월:접속잘안함DVa(이)가 시상(으)로 진격합니다. -●2월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●2월:DVa(이)가 시상 공략에 성공했습니다. -●2월:누군가가 고창(을)를 살피는 것 같습니다. -●2월:보컬로이드정휘인(이)가 유구(으)로 진격합니다. -●2월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●2월:사랑꾼들갸오오(이)가 자동(으)로 진격합니다. -●2월:갸오오의 귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:갸오오의 귀병(이)가 퇴각했습니다. -●2월:접속잘안함선비(이)가 고창(으)로 진격합니다. -●2월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●2월:ⓖ의병장5(이)가 ⓜ능환(이)라는 인재를 영입하였습니다! -●2월:어엿븐소드락하연주(이)가 (으)로 진격합니다. -●2월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:하연주(이)가 공략에 성공했습니다. -●2월:사랑꾼들魯堂首(이)가 자동(으)로 진격합니다. -●2월:魯堂首의 등갑병(와)과 카토의 중장기병(이)가 대결합니다. -●2월:사랑꾼들읭읭(이)가 자동(으)로 진격합니다. -●2월:읭읭의 기병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:읭읭의 기병(이)가 퇴각했습니다. -●2월:종횡무진대악마(이)가 적도(으)로 진격합니다. -●2월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:종횡무진강서유서(이)가 덕양(으)로 진격합니다. -●3월:강서유서의 연노병(와)과 누렁의 귀병(이)가 대결합니다. -●3월:누렁의 귀병(이)가 전멸했습니다. -●3월:강서유서의 연노병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●3월:魯堂首의 등갑병(이)가 전멸했습니다. -●3월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●3월:자동에서 금과 쌀을 도둑맞았습니다. -●3월:접속잘안함니쉬(이)가 고창(으)로 진격합니다. -●3월:니쉬(이)가 귀병(으)로 성벽을 공격합니다. -●3월:누군가가 남만(을)를 살피는 것 같습니다. -●3월:보컬로이드코토와르(이)가 건업(으)로 진격합니다. -●3월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●3월:접속잘안함무광(이)가 고창(으)로 진격합니다. -●3월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●3월:무광(이)가 고창 공략에 성공했습니다. -●3월:박보영(이)가 산책중 곰에게 할퀴어 죽고 말았습니다. -●3월:종횡무진하루카(이)가 덕양(으)로 진격합니다. -●3월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●3월:종횡무진카토(이)가 덕양(으)로 진격합니다. -●3월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:카토의 중장기병(이)가 퇴각했습니다. -●3월:우승후보넥센박희수(이)가 서량(으)로 진격합니다. -●3월:박희수의 보병(와)과 내나의 귀병(이)가 대결합니다. -●3월:우승후보넥센북오더(이)가 서량(으)로 진격합니다. -●3월:북오더의 궁병(와)과 내나의 귀병(이)가 대결합니다. -●3월:내나의 귀병(이)가 전멸했습니다. -●3월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●3월:종횡무진대악마(이)가 적도(으)로 진격합니다. -●3월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:대악마(이)가 적도 공략에 성공했습니다. -●4월:종횡무진강서유서(이)가 덕양(으)로 진격합니다. -●4월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●4월:강서유서(이)가 덕양 공략에 성공했습니다. -●4월:보컬로이드러스티건(이)가 건업(으)로 진격합니다. -●4월:러스티건(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:종횡무진하루카(이)가 (으)로 진격합니다. -●4월:하루카의 보병(와)과 감정의 정란(이)가 대결합니다. -●4월:감정의 정란(이)가 전멸했습니다. -●4월:하루카의 보병(와)과 박희수의 보병(이)가 대결합니다. -●4월:우승후보넥센박희수(이)가 서량(으)로 진격합니다. -●4월:박희수의 보병(와)과 하루카의 보병(이)가 대결합니다. -●4월:강주에서 금과 쌀을 도둑맞았습니다. -●4월:우승후보넥센북오더(이)가 서량(으)로 진격합니다. -●4월:북오더의 궁병(와)과 하루카의 보병(이)가 대결합니다. -●4월:하루카의 보병(이)가 전멸했습니다. -●4월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●4월:어엿븐소드락하연주(이)가 역경(으)로 진격합니다. -●4월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●4월:하연주(이)가 역경 공략에 성공했습니다. -●4월:종횡무진대악마(이)가 (으)로 진격합니다. -●4월:대악마의 중장기병(와)과 임사영의 귀병(이)가 대결합니다. -●4월:임사영의 귀병(이)가 전멸했습니다. -●4월:대악마의 중장기병(와)과 북오더의 궁병(이)가 대결합니다. -●4월:대악마의 중장기병(이)가 퇴각했습니다. -●5월:종횡무진강서유서(이)가 강주(으)로 진격합니다. -●5월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●5월:강서유서의 연노병(이)가 퇴각했습니다. -●5월:보컬로이드러스티건(이)가 건업(으)로 진격합니다. -●5월:러스티건(이)가 궁기병(으)로 성벽을 공격합니다. -●5월:접속잘안함무광(이)가 상동(으)로 진격합니다. -●5월:무광의 귀병(와)과 ⓖ의병장20의 기병(이)가 대결합니다. -●5월:블소ⓖ의병장15(이)가 백랑(으)로 진격합니다. -●5월:ⓖ의병장15(이)가 귀병(으)로 성벽을 공격합니다. -●5월:ⓖ의병장15(이)가 백랑 공략에 성공했습니다. -●5월:우승후보넥센북오더(이)가 서량(으)로 진격합니다. -●5월:북오더의 궁병(와)과 카토의 중장기병(이)가 대결합니다. -●5월:북오더의 궁병(이)가 퇴각했습니다. -●5월:보컬로이드くま(이)가 건업(으)로 진격합니다. -●5월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●5월:우승후보넥센쿠요(이)가 서량(으)로 진격합니다. -●5월:쿠요의 기병(와)과 카토의 중장기병(이)가 대결합니다. -●5월:쿠요의 기병(이)가 퇴각했습니다. -●5월:누군가가 (을)를 살피는 것 같습니다. -●6월:보컬로이드러스티건(이)가 건업(으)로 진격합니다. -●6월:러스티건(이)가 궁기병(으)로 성벽을 공격합니다. -●6월:러스티건의 궁기병(이)가 퇴각했습니다. -●6월:접속잘안함카이사르(이)가 상동(으)로 진격합니다. -●6월:카이사르의 궁병(와)과 ⓖ의병장20의 기병(이)가 대결합니다. -●6월:ⓖ의병장20의 기병(이)가 전멸했습니다. -●6월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●6월:접속잘안함DVa(이)가 이릉(으)로 진격합니다. -●6월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●6월:DVa(이)가 이릉 공략에 성공했습니다. -●6월:보컬로이드정휘인(이)가 건업(으)로 진격합니다. -●6월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●6월:종횡무진평민킬러(이)가 강주(으)로 진격합니다. -●6월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●6월:종횡무진내나(이)가 (으)로 진격합니다. -●6월:내나의 귀병(와)과 최태원의 귀병(이)가 대결합니다. -●6월:미이잉구경용(이)가 전재산을 잃고 화병으로 죽고말았습니다. -●7월:접속잘안함니쉬(이)가 상동(으)로 진격합니다. -●7월:니쉬의 귀병(와)과 ⓖ의병장18의 기병(이)가 대결합니다. -●7월:접속잘안함카이사르(이)가 상동(으)로 진격합니다. -●7월:카이사르의 궁병(와)과 ⓖ의병장17의 귀병(이)가 대결합니다. -●7월:접속잘안함DVa(이)가 영안(으)로 진격합니다. -●7월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●7월:DVa(이)가 영안 공략에 성공했습니다. -●7월:보컬로이드KAITO(이)가 건업(으)로 진격합니다. -●7월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●7월:KAITO(이)가 건업 공략에 성공했습니다. -●7월:접속잘안함무광(이)가 상동(으)로 진격합니다. -●7월:무광의 귀병(와)과 ⓖ의병장18의 기병(이)가 대결합니다. -●7월:ⓖ의병장18의 기병(이)가 전멸했습니다. -●7월:무광의 귀병(와)과 ⓖ의병장17의 귀병(이)가 대결합니다. -●7월:ⓖ의병장17의 귀병(이)가 전멸했습니다. -●7월:무광(이)가 귀병(으)로 성벽을 공격합니다. -●7월:종횡무진카토(이)가 (으)로 진격합니다. -●7월:카토의 중장기병(와)과 최태원의 귀병(이)가 대결합니다. -●7월:최태원의 귀병(이)가 전멸했습니다. -●7월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●7월:사랑꾼들갸오오(이)가 덕양(으)로 진격합니다. -●7월:갸오오의 귀병(와)과 일본어번역기의 귀병(이)가 대결합니다. -●7월:강주에서 금과 쌀을 도둑맞았습니다. -●7월:종횡무진평민킬러(이)가 강주(으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 갸오오의 귀병(이)가 대결합니다. -●7월:갸오오의 귀병(이)가 전멸했습니다. -●7월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●7월:종횡무진내나(이)가 (으)로 진격합니다. -●7월:내나의 귀병(와)과 박희수의 보병(이)가 대결합니다. -●7월:내나의 귀병(이)가 퇴각했습니다. -●8월:접속잘안함카이사르(이)가 상동(으)로 진격합니다. -●8월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●8월:카이사르(이)가 상동 공략에 성공했습니다. -●8월:KAITO(이)가 긔엽긔선전 포고 하였습니다. -●8월:보컬로이드KAITO(이)가 광릉(으)로 진격합니다. -●8월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●8월:KAITO(이)가 광릉 공략에 성공했습니다. -●8월:종횡무진카토(이)가 (으)로 진격합니다. -●8월:카토의 중장기병(와)과 박희수의 보병(이)가 대결합니다. -●8월:박희수의 보병(이)가 전멸했습니다. -●8월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●8월:카토의 중장기병(이)가 퇴각했습니다. -●8월:종횡무진대악마(이)가 강주(으)로 진격합니다. -●8월:대악마의 중장기병(와)과 갸오오의 귀병(이)가 대결합니다. -●9월:종횡무진강서유서(이)가 강주(으)로 진격합니다. -●9월:강서유서의 연노병(와)과 읭읭의 기병(이)가 대결합니다. -●9월:읭읭의 기병(이)가 전멸했습니다. -●9월:강서유서의 연노병(와)과 갸오오의 귀병(이)가 대결합니다. -●9월:우승후보넥센감정(이)가 적도(으)로 진격합니다. -●9월:감정(이)가 정란(으)로 성벽을 공격합니다. -●9월:종횡무진일본어번역기(이)가 강주(으)로 진격합니다. -●9월:일본어번역기의 귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●9월:갸오오의 귀병(이)가 전멸했습니다. -●9월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●9월:종횡무진하루카(이)가 (으)로 진격합니다. -●9월:하루카의 보병(와)과 북오더의 궁병(이)가 대결합니다. -●9월:북오더의 궁병(이)가 전멸했습니다. -●9월:하루카의 보병(와)과 쿠요의 기병(이)가 대결합니다. -●9월:ⓜ사량(이)가 블소임관했습니다. -●9월:보컬로이드くま(이)가 평양(으)로 진격합니다. -●9월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●9월:우승후보넥센쿠요(이)가 서량(으)로 진격합니다. -●9월:쿠요의 기병(와)과 하루카의 보병(이)가 대결합니다. -●9월:쿠요의 기병(이)가 퇴각했습니다. -●9월:종횡무진대악마(이)가 강주(으)로 진격합니다. -●9월:대악마의 중장기병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●9월:魯堂首의 등갑병(이)가 전멸했습니다. -●9월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:대악마(이)가 강주 공략에 성공했습니다. -●10월:접속잘안함DVa(이)가 계양(으)로 진격합니다. -●10월:DVa(이)가 정란(으)로 성벽을 공격합니다. -●10월:DVa(이)가 계양 공략에 성공했습니다. -●10월:ⓜ미조(이)가 어엿븐소드락임관했습니다. -●10월:종횡무진하루카(이)가 (으)로 진격합니다. -●10월:하루카의 보병(와)과 임사영의 귀병(이)가 대결합니다. -●10월:접속잘안함선비(이)가 남해(으)로 진격합니다. -●10월:선비의 귀병(와)과 ⓖ의병장22의 기병(이)가 대결합니다. -●10월:보컬로이드くま(이)가 평양(으)로 진격합니다. -●10월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●10월:くま의 귀병(이)가 퇴각했습니다. -●10월:종횡무진대악마(이)가 귀양(으)로 진격합니다. -●10월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●11월:종횡무진강서유서(이)가 (으)로 진격합니다. -●11월:강서유서의 연노병(와)과 최태원의 귀병(이)가 대결합니다. -●11월:최태원의 귀병(이)가 전멸했습니다. -●11월:강서유서의 연노병(와)과 임사영의 귀병(이)가 대결합니다. -●11월:임사영의 귀병(이)가 전멸했습니다. -●11월:누군가가 남해(을)를 살피는 것 같습니다. -●11월:보컬로이드KAITO(이)가 평양(으)로 진격합니다. -●11월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●11월:보컬로이드정휘인(이)가 유구(으)로 진격합니다. -●11월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●11월:평양에서 미이잉구경(이)라는 호걸이 천하에 이름을 알립니다. -●11월:접속잘안함선비(이)가 남해(으)로 진격합니다. -●11월:선비의 귀병(와)과 ⓖ의병장21의 귀병(이)가 대결합니다. -●11월:선비의 귀병(이)가 퇴각했습니다. -●11월:종횡무진내나(이)가 (으)로 진격합니다. -●11월:내나의 귀병(와)과 박희수의 보병(이)가 대결합니다. -●11월:박희수의 보병(이)가 전멸했습니다. -●11월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●12월:종횡무진강서유서(이)가 (으)로 진격합니다. -●12월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●12월:강서유서의 연노병(이)가 퇴각했습니다. -●12월:접속잘안함카이사르(이)가 남해(으)로 진격합니다. -●12월:카이사르의 궁병(와)과 ⓖ의병장22의 기병(이)가 대결합니다. -●12월:ⓖ의병장22의 기병(이)가 전멸했습니다. -●12월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●12월:보컬로이드KAITO(이)가 평양(으)로 진격합니다. -●12월:KAITO(이)가 보병(으)로 성벽을 공격합니다. -●12월:KAITO의 보병(이)가 퇴각했습니다. -●12월:보컬로이드바닥을탁치고(이)가 사비(으)로 진격합니다. -●12월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드정휘인(이)가 유구(으)로 진격합니다. -●12월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●12월:정휘인(이)가 유구 공략에 성공했습니다. -●12월:종횡무진카토(이)가 (으)로 진격합니다. -●12월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●12월:카토(이)가 공략에 성공했습니다. -●12월:쿠요(이)가 긔엽긔(으)로 망명하였습니다. -◆1월:187년이 되었습니다. -●1월:긔엽긔Air(이)가 남영(으)로 진격합니다. -●1월:Air의 기병(와)과 장임의 보병(이)가 대결합니다. -●1월:막겜ⓖ의병장7(이)가 남만(으)로 진격합니다. -●1월:ⓖ의병장7의 귀병(와)과 Anes의 기병(이)가 대결합니다. -●1월:ⓜ동공(이)가 사랑꾼들임관했습니다. -●1월:긔엽긔Anes(이)가 남영(으)로 진격합니다. -●1월:Anes의 기병(와)과 진의 귀병(이)가 대결합니다. -●1월:긔엽긔북두칠성(이)가 남영(으)로 진격합니다. -●1월:북두칠성의 보병(와)과 ⓜ하후공의 귀병(이)가 대결합니다. -●1월:누군가가 교지(을)를 살피는 것 같습니다. -●1월:감정(이)가 긔엽긔임관했습니다. -●1월:랜임1분장(이)가 블소임관했습니다. -●1월:긔엽긔SARS(이)가 남영(으)로 진격합니다. -●1월:SARS의 궁병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●1월:누군가가 남만(을)를 살피는 것 같습니다. -●1월:긔엽긔ⓖ의병장21(이)가 남영(으)로 진격합니다. -●1월:ⓖ의병장21의 귀병(와)과 ⓖ의병장5의 보병(이)가 대결합니다. -●1월:ⓖ의병장21의 귀병(이)가 퇴각했습니다. -●1월:보컬로이드바닥을탁치고(이)가 사비(으)로 진격합니다. -●1월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●1월:바닥을탁치고의 귀병(이)가 퇴각했습니다. -●1월:종횡무진일본어번역기(이)가 귀양(으)로 진격합니다. -●1월:일본어번역기의 귀병(와)과 누렁의 귀병(이)가 대결합니다. -●1월:ⓜ관이(이)가 접속잘안함임관했습니다. -●1월:막겜ⓖ의병장3(이)가 남만(으)로 진격합니다. -●1월:ⓖ의병장3의 보병(와)과 박일아의 기병(이)가 대결합니다. -●1월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●1월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●1월:정휘인(이)가 공략에 성공했습니다. -●1월:종횡무진카토(이)가 귀양(으)로 진격합니다. -●1월:카토의 중장기병(와)과 누렁의 귀병(이)가 대결합니다. -●1월:누렁의 귀병(이)가 전멸했습니다. -●1월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●1월:보컬로이드제갈여포(이)가 사비(으)로 진격합니다. -●1월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●1월:막겜ⓖ의병장5(이)가 남만(으)로 진격합니다. -●1월:ⓖ의병장5의 보병(와)과 낭군의 귀병(이)가 대결합니다. -●1월:긔엽긔비밀(이)가 남영(으)로 진격합니다. -●1월:비밀의 귀병(와)과 장임의 보병(이)가 대결합니다. -●1월:박희수(이)가 막겜임관했습니다. -●1월:긔엽긔그만좀불러좀(이)가 남영(으)로 진격합니다. -●1월:그만좀불러좀의 귀병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●1월:ⓜ능환의 귀병(이)가 전멸했습니다. -●1월:그만좀불러좀의 귀병(와)과 진의 귀병(이)가 대결합니다. -●1월:종횡무진평민킬러(이)가 귀양(으)로 진격합니다. -●1월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●1월:막겜ⓜ하후공(이)가 남만(으)로 진격합니다. -●1월:ⓜ하후공의 귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●1월:ⓜ하후공의 귀병(이)가 퇴각했습니다. -●1월:긔엽긔박일아(이)가 남영(으)로 진격합니다. -●1월:박일아의 기병(와)과 진의 귀병(이)가 대결합니다. -●1월:진의 귀병(이)가 전멸했습니다. -●1월:박일아의 기병(와)과 ⓖ의병장7의 귀병(이)가 대결합니다. -●1월:ⓖ의병장7의 귀병(이)가 전멸했습니다. -●1월:박일아의 기병(와)과 장임의 보병(이)가 대결합니다. -●1월:긔엽긔잠둥이션(이)가 남영(으)로 진격합니다. -●1월:잠둥이션의 귀병(와)과 ⓖ의병장3의 보병(이)가 대결합니다. -●1월:ⓖ의병장3의 보병(이)가 전멸했습니다. -●1월:잠둥이션의 귀병(와)과 장임의 보병(이)가 대결합니다. -●1월:장임의 보병(이)가 전멸했습니다. -●1월:잠둥이션의 귀병(와)과 ⓖ의병장5의 보병(이)가 대결합니다. -●1월:ⓖ의병장5의 보병(이)가 전멸했습니다. -●1월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●1월:종횡무진내나(이)가 귀양(으)로 진격합니다. -●1월:내나의 귀병(와)과 Navy마초의 등갑병(이)가 대결합니다. -●1월:Navy마초의 등갑병(이)가 전멸했습니다. -●1월:내나의 귀병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●1월:橙(이)가 막겜임관했습니다. -●2월:긔엽긔Air(이)가 남영(으)로 진격합니다. -●2월:Air(이)가 기병(으)로 성벽을 공격합니다. -●2월:임사영(이)가 종횡무진임관했습니다. -●2월:긔엽긔북두칠성(이)가 남영(으)로 진격합니다. -●2월:북두칠성(이)가 보병(으)로 성벽을 공격합니다. -●2월:강주에서 금과 쌀을 도둑맞았습니다. -●2월:긔엽긔감정(이)가 남영(으)로 진격합니다. -●2월:감정(이)가 정란(으)로 성벽을 공격합니다. -●2월:감정의 정란(이)가 퇴각했습니다. -●2월:긔엽긔SARS(이)가 남영(으)로 진격합니다. -●2월:SARS(이)가 궁병(으)로 성벽을 공격합니다. -●2월:SARS의 궁병(이)가 퇴각했습니다. -●2월:종횡무진하루카(이)가 귀양(으)로 진격합니다. -●2월:하루카의 보병(와)과 야근탈출의 기병(이)가 대결합니다. -●2월:종횡무진카토(이)가 귀양(으)로 진격합니다. -●2월:카토의 중장기병(와)과 읭읭의 기병(이)가 대결합니다. -●2월:읭읭의 기병(이)가 전멸했습니다. -●2월:카토의 중장기병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:긔엽긔비밀(이)가 남영(으)로 진격합니다. -●2월:비밀(이)가 귀병(으)로 성벽을 공격합니다. -●2월:비밀의 귀병(이)가 퇴각했습니다. -●2월:긔엽긔그만좀불러좀(이)가 운남(으)로 진격합니다. -●2월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●2월:북오더(이)가 긔엽긔임관했습니다. -●2월:보컬로이드くま(이)가 평양(으)로 진격합니다. -●2월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●2월:긔엽긔ⓖ의병장20(이)가 남영(으)로 진격합니다. -●2월:ⓖ의병장20(이)가 기병(으)로 성벽을 공격합니다. -●2월:ⓖ의병장20(이)가 남영 공략에 성공했습니다. -●2월:긔엽긔쿠요(이)가 운남(으)로 진격합니다. -●2월:쿠요(이)가 기병(으)로 성벽을 공격합니다. -●2월:쿠요(이)가 운남 공략에 성공했습니다. -●2월:종횡무진평민킬러(이)가 귀양(으)로 진격합니다. -●2월:평민킬러의 연노병(와)과 갸오오의 귀병(이)가 대결합니다. -●2월:갸오오의 귀병(이)가 전멸했습니다. -●2월:평민킬러의 연노병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:평민킬러의 연노병(이)가 퇴각했습니다. -●2월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●2월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:종횡무진대악마(이)가 주시(으)로 진격합니다. -●2월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:접속잘안함카이사르(이)가 남해(으)로 진격합니다. -●3월:카이사르(이)가 궁병(으)로 성벽을 공격합니다. -●3월:카이사르(이)가 남해 공략에 성공했습니다. -●3월:종횡무진일본어번역기(이)가 귀양(으)로 진격합니다. -●3월:일본어번역기의 귀병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●3월:魯堂首의 등갑병(이)가 전멸했습니다. -●3월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●3월:일본어번역기의 귀병(이)가 퇴각했습니다. -●3월:종횡무진하루카(이)가 주시(으)로 진격합니다. -●3월:하루카(이)가 보병(으)로 성벽을 공격합니다. -●3월:하루카(이)가 주시 공략에 성공했습니다. -●3월:종횡무진카토(이)가 귀양(으)로 진격합니다. -●3월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:카토(이)가 귀양 공략에 성공했습니다. -●3월:접속잘안함선비(이)가 교지(으)로 진격합니다. -●3월:선비의 귀병(와)과 정력왕의 귀병(이)가 대결합니다. -●3월:긔엽긔그만좀불러좀(이)가 영릉(으)로 진격합니다. -●3월:그만좀불러좀(이)가 귀병(으)로 성벽을 공격합니다. -●3월:그만좀불러좀의 귀병(이)가 퇴각했습니다. -●3월:보컬로이드くま(이)가 평양(으)로 진격합니다. -●3월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●3월:くま(이)가 평양 공략에 성공했습니다. -●3월:긔엽긔ⓖ의병장20(이)가 건녕(으)로 진격합니다. -●3월:ⓖ의병장20(이)가 기병(으)로 성벽을 공격합니다. -●3월:긔엽긔쿠요(이)가 건녕(으)로 진격합니다. -●3월:쿠요(이)가 기병(으)로 성벽을 공격합니다. -●3월:쿠요(이)가 건녕 공략에 성공했습니다. -●3월:긔엽긔잠둥이션(이)가 영릉(으)로 진격합니다. -●3월:잠둥이션의 귀병(와)과 ⓖ의병장6의 보병(이)가 대결합니다. -●3월:잠둥이션의 귀병(이)가 퇴각했습니다. -●3월:魯堂首(이)가 블소임관했습니다. -●3월:ⓜ손습(이)가 긔엽긔임관했습니다. -●3월:南ことり(이)가 과실주(훈련)(을)를 습득했습니다! -●3월:南ことり(이)가 블소임관했습니다. -●4월:종횡무진강서유서(이)가 성도(으)로 진격합니다. -●4월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●4월:긔엽긔북두칠성(이)가 영릉(으)로 진격합니다. -●4월:북두칠성의 보병(와)과 ⓖ의병장6의 보병(이)가 대결합니다. -●4월:북두칠성의 보병(이)가 퇴각했습니다. -●4월:일기토지배자(이)가 블소임관했습니다. -●4월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●4월:니쉬의 귀병(와)과 플젠의 보병(이)가 대결합니다. -●4월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●4월:카이사르의 궁병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●4월:카이사르의 궁병(이)가 퇴각했습니다. -●4월:보컬로이드코토와르(이)가 사비(으)로 진격합니다. -●4월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●4월:접속잘안함무광(이)가 교지(으)로 진격합니다. -●4월:무광의 귀병(와)과 정력왕의 귀병(이)가 대결합니다. -●4월:정력왕의 귀병(이)가 전멸했습니다. -●4월:무광의 귀병(와)과 플젠의 보병(이)가 대결합니다. -●4월:긔엽긔낭군(이)가 영릉(으)로 진격합니다. -●4월:낭군의 귀병(와)과 ⓖ의병장6의 보병(이)가 대결합니다. -●4월:ⓖ의병장6의 보병(이)가 전멸했습니다. -●4월:낭군(이)가 귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함HideD(이)가 교지(으)로 진격합니다. -●4월:HideD의 귀병(와)과 플젠의 보병(이)가 대결합니다. -●4월:플젠의 보병(이)가 전멸했습니다. -●4월:HideD의 귀병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●4월:ㅇωㅇ의 귀병(이)가 전멸했습니다. -●4월:갸오오(이)가 막겜임관했습니다. -●4월:긔엽긔하기싫은데(이)가 영릉(으)로 진격합니다. -●4월:하기싫은데(이)가 정란(으)로 성벽을 공격합니다. -●4월:접속잘안함선비(이)가 교지(으)로 진격합니다. -●4월:선비(이)가 귀병(으)로 성벽을 공격합니다. -●4월:선비의 귀병(이)가 퇴각했습니다. -●4월:보컬로이드제갈여포(이)가 사비(으)로 진격합니다. -●4월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:제갈여포(이)가 사비 공략에 성공했습니다. -●4월:긔엽긔북오더(이)가 영릉(으)로 진격합니다. -●4월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●4월:미이잉구경(이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다. -●4월:긔엽긔박일아(이)가 영릉(으)로 진격합니다. -●4월:박일아의 기병(와)과 ⓖ의병장4의 귀병(이)가 대결합니다. -●4월:박일아의 기병(이)가 퇴각했습니다. -●4월:청기사(이)가 블소임관했습니다. -●4월:읭읭(이)가 블소(으)로 망명하였습니다. -●4월:종횡무진대악마(이)가 성도(으)로 진격합니다. -●4월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:ⓜ공손료(이)가 어엿븐소드락임관했습니다. -●5월:ⓜ동공(이)가 긔엽긔임관했습니다. -●5월:종횡무진강서유서(이)가 성도(으)로 진격합니다. -●5월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●5월:긔엽긔Anes(이)가 영릉(으)로 진격합니다. -●5월:Anes의 기병(와)과 ⓖ의병장4의 귀병(이)가 대결합니다. -●5월:ⓖ의병장4의 귀병(이)가 전멸했습니다. -●5월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●5월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●5월:니쉬의 귀병(와)과 ⓖ의병장17의 귀병(이)가 대결합니다. -●5월:니쉬의 귀병(이)가 퇴각했습니다. -●5월:누렁(이)가 긔엽긔(으)로 망명하였습니다. -●5월:접속잘안함무광(이)가 교지(으)로 진격합니다. -●5월:무광의 귀병(와)과 Anes의 기병(이)가 대결합니다. -●5월:무광의 귀병(이)가 퇴각했습니다. -●5월:접속잘안함HideD(이)가 교지(으)로 진격합니다. -●5월:HideD의 귀병(와)과 Anes의 기병(이)가 대결합니다. -●5월:HideD의 귀병(이)가 퇴각했습니다. -●5월:종횡무진카토(이)가 성도(으)로 진격합니다. -●5월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●5월:긔엽긔ⓖ의병장17(이)가 남해(으)로 진격합니다. -●5월:ⓖ의병장17의 귀병(와)과 ㄷㄱㅎㅈㄷㅀ의 기병(이)가 대결합니다. -●5월:ⓖ의병장17의 귀병(이)가 퇴각했습니다. -●5월:긔엽긔하기싫은데(이)가 영릉(으)로 진격합니다. -●5월:하기싫은데의 정란(와)과 장임의 보병(이)가 대결합니다. -●5월:긔엽긔북오더(이)가 영릉(으)로 진격합니다. -●5월:북오더의 궁병(와)과 진의 귀병(이)가 대결합니다. -●5월:북오더의 궁병(이)가 퇴각했습니다. -●5월:보컬로이드くま(이)가 하비(으)로 진격합니다. -●5월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●5월:くま의 귀병(이)가 퇴각했습니다. -●5월:긔엽긔ⓖ의병장20(이)가 남해(으)로 진격합니다. -●5월:ⓖ의병장20의 기병(와)과 ㄷㄱㅎㅈㄷㅀ의 기병(이)가 대결합니다. -●5월:ㄷㄱㅎㅈㄷㅀ의 기병(이)가 전멸했습니다. -●5월:미친과학(이)가 보컬로이드임관했습니다. -●5월:종횡무진내나(이)가 성도(으)로 진격합니다. -●5월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●5월:종횡무진대악마(이)가 성도(으)로 진격합니다. -●5월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●5월:대악마의 중장기병(이)가 퇴각했습니다. -●6월:긔엽긔Air(이)가 영릉(으)로 진격합니다. -●6월:Air의 기병(와)과 진의 귀병(이)가 대결합니다. -●6월:진의 귀병(이)가 전멸했습니다. -●6월:종횡무진강서유서(이)가 성도(으)로 진격합니다. -●6월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●6월:강서유서의 연노병(이)가 퇴각했습니다. -●6월:보컬로이드정휘인(이)가 하비(으)로 진격합니다. -●6월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●6월:종횡무진카토(이)가 성도(으)로 진격합니다. -●6월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●6월:카토(이)가 성도 공략에 성공했습니다. -●6월:긔엽긔비밀(이)가 영릉(으)로 진격합니다. -●6월:비밀의 귀병(와)과 장임의 보병(이)가 대결합니다. -●6월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●6월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●6월:하연주의 궁병(이)가 퇴각했습니다. -●6월:종횡무진내나(이)가 장안(으)로 진격합니다. -●6월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●7월:긔엽긔Air(이)가 영릉(으)로 진격합니다. -●7월:Air의 기병(와)과 장임의 보병(이)가 대결합니다. -●7월:장임의 보병(이)가 전멸했습니다. -●7월:Air(이)가 기병(으)로 성벽을 공격합니다. -●7월:긔엽긔SARS(이)가 영릉(으)로 진격합니다. -●7월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●7월:SARS(이)가 영릉 공략에 성공했습니다. -●7월:보컬로이드정휘인(이)가 하비(으)로 진격합니다. -●7월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●7월:정휘인의 귀병(이)가 퇴각했습니다. -●7월:종횡무진카토(이)가 장안(으)로 진격합니다. -●7월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●7월:긔엽긔그만좀불러좀(이)가 장사(으)로 진격합니다. -●7월:그만좀불러좀의 귀병(와)과 박희수의 보병(이)가 대결합니다. -●7월:그래도우리는(이)가 긔엽긔임관했습니다. -●7월:긔엽긔쿠요(이)가 장사(으)로 진격합니다. -●7월:쿠요의 기병(와)과 장임의 보병(이)가 대결합니다. -●7월:종횡무진내나(이)가 장안(으)로 진격합니다. -●7월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●7월:내나의 귀병(이)가 퇴각했습니다. -●8월:긔엽긔북두칠성(이)가 장사(으)로 진격합니다. -●8월:북두칠성의 등갑병(와)과 갸오오의 귀병(이)가 대결합니다. -●8월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●8월:카이사르의 궁병(와)과 누렁의 귀병(이)가 대결합니다. -●8월:긔엽긔SARS(이)가 무릉(으)로 진격합니다. -●8월:SARS의 충차(와)과 니쉬의 귀병(이)가 대결합니다. -●8월:긔엽긔부관(이)가 장사(으)로 진격합니다. -●8월:부관의 귀병(와)과 박희수의 보병(이)가 대결합니다. -●8월:누군가가 영릉(을)를 살피는 것 같습니다. -●8월:무광(이)가 보컬로이드선전 포고 하였습니다. -●8월:최태원(이)가 한혈마(+15)(을)를 습득했습니다! -●8월:최태원(이)가 막겜임관했습니다. -●8월:긔엽긔그만좀불러좀(이)가 장사(으)로 진격합니다. -●8월:그만좀불러좀의 귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●8월:그만좀불러좀의 귀병(이)가 퇴각했습니다. -●8월:긔엽긔쿠요(이)가 장사(으)로 진격합니다. -●8월:쿠요의 기병(와)과 장임의 보병(이)가 대결합니다. -●8월:긔엽긔잠둥이션(이)가 장사(으)로 진격합니다. -●8월:잠둥이션의 귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●8월:갸오오의 귀병(이)가 전멸했습니다. -●8월:잠둥이션의 귀병(와)과 진의 귀병(이)가 대결합니다. -●8월:하비에서 아르카나하트(이)라는 호걸이 천하에 이름을 알립니다. -●9월:긔엽긔Air(이)가 장사(으)로 진격합니다. -●9월:Air의 기병(와)과 장임의 보병(이)가 대결합니다. -●9월:장임의 보병(이)가 전멸했습니다. -●9월:Air의 기병(와)과 진의 귀병(이)가 대결합니다. -●9월:진의 귀병(이)가 전멸했습니다. -●9월:Air의 기병(와)과 박희수의 보병(이)가 대결합니다. -●9월:박희수의 보병(이)가 전멸했습니다. -●9월:Air(이)가 기병(으)로 성벽을 공격합니다. -●9월:Air의 기병(이)가 퇴각했습니다. -●9월:아르카나하트(이)가 어엿븐소드락임관했습니다. -●9월:긔엽긔북두칠성(이)가 장사(으)로 진격합니다. -●9월:북두칠성(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:긔엽긔플젠(이)가 장사(으)로 진격합니다. -●9월:플젠(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:플젠(이)가 장사 공략에 성공했습니다. -●9월:접속잘안함니쉬(이)가 영릉(으)로 진격합니다. -●9월:니쉬의 귀병(와)과 낭군의 귀병(이)가 대결합니다. -●9월:니쉬의 귀병(이)가 퇴각했습니다. -●9월:ⓜ능환(이)가 긔엽긔임관했습니다. -●9월:긔엽긔감정(이)가 계양(으)로 진격합니다. -●9월:감정(이)가 충차(으)로 성벽을 공격합니다. -●9월:감정(이)가 계양 공략에 성공했습니다. -●9월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●9월:카이사르의 궁병(와)과 부관의 귀병(이)가 대결합니다. -●9월:부관의 귀병(이)가 전멸했습니다. -●9월:누군가가 영릉(을)를 살피는 것 같습니다. -●9월:누군가가 남영(을)를 살피는 것 같습니다. -●9월:긔엽긔ⓖ의병장21(이)가 무릉(으)로 진격합니다. -●9월:ⓖ의병장21의 남귀병(와)과 HideD의 귀병(이)가 대결합니다. -●9월:HideD의 귀병(이)가 전멸했습니다. -●9월:갸오오(이)가 긔엽긔임관했습니다. -●9월:박희수(이)가 긔엽긔임관했습니다. -●9월:최태원(이)가 긔엽긔(으)로 망명하였습니다. -●9월:긔엽긔북오더(이)가 무릉(으)로 진격합니다. -●9월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●9월:긔엽긔쿠요(이)가 무릉(으)로 진격합니다. -●9월:쿠요(이)가 기병(으)로 성벽을 공격합니다. -●9월:쿠요(이)가 무릉 공략에 성공했습니다. -●9월:ⓖ의병장6(이)가 긔엽긔임관했습니다. -●9월:Navy마초(이)가 보컬로이드임관했습니다. -●9월:누군가가 남해(을)를 살피는 것 같습니다. -●9월:ⓖ의병장2(이)가 보컬로이드임관했습니다. -●10월:긔엽긔누렁(이)가 강릉(으)로 진격합니다. -●10월:누렁의 귀병(와)과 무광의 귀병(이)가 대결합니다. -●10월:누렁의 귀병(이)가 퇴각했습니다. -●10월:긔엽긔플젠(이)가 강릉(으)로 진격합니다. -●10월:플젠의 등갑병(와)과 선비의 귀병(이)가 대결합니다. -●10월:누군가가 강릉(을)를 살피는 것 같습니다. -●10월:접속잘안함카이사르(이)가 무릉(으)로 진격합니다. -●10월:카이사르의 궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:카이사르의 궁병(이)가 퇴각했습니다. -●10월:장임(이)가 접속잘안함임관했습니다. -●10월:누군가가 장사(을)를 살피는 것 같습니다. -●10월:누군가가 교지(을)를 살피는 것 같습니다. -●10월:긔엽긔낭군(이)가 강릉(으)로 진격합니다. -●10월:낭군의 귀병(와)과 무광의 귀병(이)가 대결합니다. -●10월:낭군의 귀병(이)가 퇴각했습니다. -●10월:접속잘안함선비(이)가 장사(으)로 진격합니다. -●10월:선비의 귀병(와)과 Anes의 기병(이)가 대결합니다. -●10월:선비의 귀병(이)가 퇴각했습니다. -●10월:ⓖ의병장5(이)가 보컬로이드임관했습니다. -●10월:긔엽긔북오더(이)가 강릉(으)로 진격합니다. -●10월:북오더의 궁병(와)과 무광의 귀병(이)가 대결합니다. -●10월:무광의 귀병(이)가 전멸했습니다. -●10월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●10월:ⓜ하후공(이)가 블소임관했습니다. -●10월:긔엽긔박일아(이)가 강릉(으)로 진격합니다. -●10월:박일아(이)가 기병(으)로 성벽을 공격합니다. -●10월:긔엽긔잠둥이션(이)가 강릉(으)로 진격합니다. -●10월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●10월:잠둥이션(이)가 강릉 공략에 성공했습니다. -●10월:橙(이)가 긔엽긔임관했습니다. -●11월:누군가가 무릉(을)를 살피는 것 같습니다. -●11월:진(이)가 둔갑천서(회피)(을)를 습득했습니다! -●11월:진(이)가 접속잘안함임관했습니다. -●11월:ⓖ의병장3(이)가 보컬로이드임관했습니다. -●11월:보컬로이드정휘인(이)가 하비(으)로 진격합니다. -●11월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●11월:긔엽긔북오더(이)가 이릉(으)로 진격합니다. -●11월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●11월:ⓖ의병장4(이)가 어엿븐소드락임관했습니다. -●12월:야근탈출(이)가 철질여골(+8)(을)를 습득했습니다! -●12월:야근탈출(이)가 긔엽긔임관했습니다. -●12월:긔엽긔감정(이)가 이릉(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:감정의 충차(이)가 퇴각했습니다. -●12월:보컬로이드정휘인(이)가 하비(으)로 진격합니다. -●12월:정휘인(이)가 귀병(으)로 성벽을 공격합니다. -●12월:정휘인(이)가 하비 공략에 성공했습니다. -●12월:긔엽긔하기싫은데(이)가 이릉(으)로 진격합니다. -●12월:하기싫은데(이)가 정란(으)로 성벽을 공격합니다. -●12월:하기싫은데(이)가 이릉 공략에 성공했습니다. -●12월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●12월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -◆1월:188년이 되었습니다. -●1월:긔엽긔Air(이)가 영안(으)로 진격합니다. -●1월:Air(이)가 기병(으)로 성벽을 공격합니다. -●1월:6974(이)가 철벽서(훈련)(을)를 습득했습니다! -●1월:긔엽긔ⓖ의병장22(이)가 남해(으)로 진격합니다. -●1월:ⓖ의병장22(이)가 기병(으)로 성벽을 공격합니다. -●1월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●1월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:ⓖ의병장7(이)가 보컬로이드임관했습니다. -●2월:긔엽긔SARS(이)가 영안(으)로 진격합니다. -●2월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●2월:SARS(이)가 영안 공략에 성공했습니다. -●2월:누군가가 시상(을)를 살피는 것 같습니다. -●2월:누군가가 교지(을)를 살피는 것 같습니다. -●2월:하루카(이)가 역경(+9)(을)를 습득했습니다! -●2월:누군가가 장판(을)를 살피는 것 같습니다. -●2월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●2월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●2월:하연주의 궁병(이)가 퇴각했습니다. -●3월:누군가가 장판(을)를 살피는 것 같습니다. -●3월:누군가가 양양(을)를 살피는 것 같습니다. -●3월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●3월:카이사르의 연노병(와)과 최태원의 귀병(이)가 대결합니다. -●3월:긔엽긔SARS(이)가 장판(으)로 진격합니다. -●3월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●3월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●3월:장임의 등갑병(와)과 쿠요의 기병(이)가 대결합니다. -●3월:접속잘안함DVa(이)가 교지(으)로 진격합니다. -●3월:DVa의 정란(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●3월:접속잘안함진(이)가 교지(으)로 진격합니다. -●3월:진의 신귀병(와)과 최태원의 귀병(이)가 대결합니다. -●3월:최태원의 귀병(이)가 전멸했습니다. -●3월:진의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●3월:긔엽긔하기싫은데(이)가 장판(으)로 진격합니다. -●3월:하기싫은데(이)가 정란(으)로 성벽을 공격합니다. -●3월:하기싫은데(이)가 장판 공략에 성공했습니다. -●4월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●4월:카이사르의 연노병(와)과 Anes의 기병(이)가 대결합니다. -●4월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●4월:장임의 등갑병(와)과 부관의 신귀병(이)가 대결합니다. -●4월:접속잘안함DVa(이)가 교지(으)로 진격합니다. -●4월:DVa의 정란(와)과 박희수의 등갑병(이)가 대결합니다. -●4월:DVa의 정란(이)가 퇴각했습니다. -●4월:하루카(이)가 어엿븐소드락선전 포고 하였습니다. -●5월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●5월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●5월:장임의 등갑병(이)가 퇴각했습니다. -●6월:누군가가 남해(을)를 살피는 것 같습니다. -●6월:어엿븐소드락ⓖ의병장4(이)가 장안(으)로 진격합니다. -●6월:ⓖ의병장4(이)가 귀병(으)로 성벽을 공격합니다. -●7월:피곤한조자룡(이)가 일확천금에 놀라 심장마비로 죽고 말았습니다. -●7월:어엿븐소드락ⓖ의병장4(이)가 장안(으)로 진격합니다. -●7월:ⓖ의병장4(이)가 귀병(으)로 성벽을 공격합니다. -●8월:어엿븐소드락ⓖ의병장4(이)가 장안(으)로 진격합니다. -●8월:ⓖ의병장4(이)가 귀병(으)로 성벽을 공격합니다. -●8월:ⓖ의병장4의 귀병(이)가 퇴각했습니다. -●8월:누군가가 양양(을)를 살피는 것 같습니다. -●9월:접속잘안함니쉬(이)가 장사(으)로 진격합니다. -●9월:니쉬의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●9월:누군가가 장판(을)를 살피는 것 같습니다. -●9월:누군가가 신야(을)를 살피는 것 같습니다. -●9월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●9월:선비의 신귀병(와)과 갸오오의 신귀병(이)가 대결합니다. -●9월:긔엽긔비밀(이)가 양양(으)로 진격합니다. -●9월:비밀의 신귀병(와)과 무광의 신귀병(이)가 대결합니다. -●9월:긔엽긔박일아(이)가 양양(으)로 진격합니다. -●9월:박일아의 기병(와)과 카이사르의 연노병(이)가 대결합니다. -●9월:박일아의 기병(이)가 퇴각했습니다. -●10월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●10월:플젠의 등갑병(와)과 HideD의 신귀병(이)가 대결합니다. -●10월:긔엽긔SARS(이)가 강하(으)로 진격합니다. -●10월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●10월:SARS(이)가 강하 공략에 성공했습니다. -●10월:긔엽긔ⓖ의병장21(이)가 적벽(으)로 진격합니다. -●10월:ⓖ의병장21(이)가 남귀병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장21의 남귀병(이)가 퇴각했습니다. -●10월:긔엽긔갸오오(이)가 양양(으)로 진격합니다. -●10월:갸오오의 신귀병(와)과 장임의 등갑병(이)가 대결합니다. -●10월:긔엽긔ⓖ의병장18(이)가 적벽(으)로 진격합니다. -●10월:ⓖ의병장18(이)가 기병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장18(이)가 적벽 공략에 성공했습니다. -●10월:긔엽긔비밀(이)가 양양(으)로 진격합니다. -●10월:비밀의 신귀병(와)과 HideD의 신귀병(이)가 대결합니다. -●10월:비밀의 신귀병(이)가 퇴각했습니다. -●10월:긔엽긔잠둥이션(이)가 양양(으)로 진격합니다. -●10월:잠둥이션의 귀병(와)과 진의 신귀병(이)가 대결합니다. -●11월:누군가가 양양(을)를 살피는 것 같습니다. -●11월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●11월:장임의 등갑병(와)과 누렁의 신귀병(이)가 대결합니다. -●11월:보컬로이드KAITO(이)가 여강(으)로 진격합니다. -●11월:KAITO(이)가 수병(으)로 성벽을 공격합니다. -●11월:KAITO(이)가 여강 공략에 성공했습니다. -●11월:접속잘안함진(이)가 장판(으)로 진격합니다. -●11월:진의 신귀병(와)과 북오더의 궁병(이)가 대결합니다. -●11월:낭군(이)가 고정도(+11)(을)를 습득했습니다! -●11월:긔엽긔갸오오(이)가 양양(으)로 진격합니다. -●11월:갸오오의 신귀병(와)과 무광의 신귀병(이)가 대결합니다. -●11월:갸오오의 신귀병(이)가 퇴각했습니다. -●11월:긔엽긔박희수(이)가 양양(으)로 진격합니다. -●11월:박희수의 등갑병(와)과 무광의 신귀병(이)가 대결합니다. -●11월:긔엽긔그만좀불러좀(이)가 양양(으)로 진격합니다. -●11월:그만좀불러좀의 신귀병(와)과 카이사르의 연노병(이)가 대결합니다. -●11월:긔엽긔쿠요(이)가 남해(으)로 진격합니다. -●11월:쿠요(이)가 기병(으)로 성벽을 공격합니다. -●11월:쿠요(이)가 남해 공략에 성공했습니다. -●11월:누군가가 산월(을)를 살피는 것 같습니다. -●11월:긔엽긔잠둥이션(이)가 양양(으)로 진격합니다. -●11월:잠둥이션의 귀병(와)과 진의 신귀병(이)가 대결합니다. -●11월:잠둥이션의 귀병(이)가 퇴각했습니다. -●12월:긔엽긔야근탈출(이)가 양양(으)로 진격합니다. -●12월:야근탈출의 기병(와)과 HideD의 신귀병(이)가 대결합니다. -●12월:야근탈출의 기병(이)가 퇴각했습니다. -●12월:긔엽긔북두칠성(이)가 양양(으)로 진격합니다. -●12월:북두칠성의 등갑병(와)과 카이사르의 연노병(이)가 대결합니다. -●12월:접속잘안함진(이)가 장판(으)로 진격합니다. -●12월:진의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●12월:진의 신귀병(이)가 퇴각했습니다. -●12월:긔엽긔박희수(이)가 양양(으)로 진격합니다. -●12월:박희수의 등갑병(와)과 니쉬의 신귀병(이)가 대결합니다. -●12월:박희수의 등갑병(이)가 퇴각했습니다. -●12월:긔엽긔그만좀불러좀(이)가 양양(으)로 진격합니다. -●12월:그만좀불러좀의 신귀병(와)과 니쉬의 신귀병(이)가 대결합니다. -●12월:그만좀불러좀의 신귀병(이)가 퇴각했습니다. -●12월:보컬로이드くま(이)가 남해(으)로 진격합니다. -●12월:くま(이)가 귀병(으)로 성벽을 공격합니다. -◆1월:189년이 되었습니다. -●1월:긔엽긔북두칠성(이)가 양양(으)로 진격합니다. -●1월:북두칠성의 등갑병(와)과 니쉬의 신귀병(이)가 대결합니다. -●1월:북두칠성의 등갑병(이)가 퇴각했습니다. -●1월:접속잘안함니쉬(이)가 장판(으)로 진격합니다. -●1월:니쉬의 신귀병(와)과 Air의 기병(이)가 대결합니다. -●1월:니쉬의 신귀병(이)가 퇴각했습니다. -●1월:보컬로이드러스티건(이)가 남해(으)로 진격합니다. -●1월:러스티건(이)가 궁기병(으)로 성벽을 공격합니다. -●1월:보컬로이드바닥을탁치고(이)가 남해(으)로 진격합니다. -●1월:바닥을탁치고(이)가 귀병(으)로 성벽을 공격합니다. -●1월:바닥을탁치고(이)가 남해 공략에 성공했습니다. -●1월:ⓖ의병장3(이)가 자기가 없어도 될것 같다며 떠났습니다. -●1월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●1월:선비의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●1월:긔엽긔북오더(이)가 양양(으)로 진격합니다. -●1월:북오더의 궁병(와)과 장임의 등갑병(이)가 대결합니다. -●1월:장임의 등갑병(이)가 전멸했습니다. -●1월:북오더의 궁병(와)과 무광의 신귀병(이)가 대결합니다. -●1월:무광의 신귀병(이)가 전멸했습니다. -●1월:북오더(이)가 궁병(으)로 성벽을 공격합니다. -●1월:어엿븐소드락하연주(이)가 남피(으)로 진격합니다. -●1월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●1월:하연주(이)가 남피 공략에 성공했습니다. -●2월:긔엽긔누렁(이)가 양양(으)로 진격합니다. -●2월:누렁(이)가 신귀병(으)로 성벽을 공격합니다. -●2월:긔엽긔감정(이)가 양양(으)로 진격합니다. -●2월:감정(이)가 충차(으)로 성벽을 공격합니다. -●2월:긔엽긔SARS(이)가 양양(으)로 진격합니다. -●2월:SARS의 충차(와)과 카이사르의 연노병(이)가 대결합니다. -●2월:SARS의 충차(이)가 퇴각했습니다. -●2월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●2월:바닥을탁치고의 귀병(와)과 박일아의 기병(이)가 대결합니다. -●2월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●2월:코토와르의 기병(와)과 ㅇωㅇ의 신귀병(이)가 대결합니다. -●2월:긔엽긔낭군(이)가 양양(으)로 진격합니다. -●2월:낭군의 신귀병(와)과 카이사르의 연노병(이)가 대결합니다. -●2월:낭군의 신귀병(이)가 퇴각했습니다. -●2월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●2월:엄백호의 청주병(와)과 부관의 신귀병(이)가 대결합니다. -●2월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●2월:정휘인의 귀병(와)과 박일아의 기병(이)가 대결합니다. -●2월:박일아의 기병(이)가 전멸했습니다. -●2월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●2월:선비의 신귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●2월:선비의 신귀병(이)가 퇴각했습니다. -●2월:긔엽긔비밀(이)가 양양(으)로 진격합니다. -●2월:비밀의 신귀병(와)과 카이사르의 연노병(이)가 대결합니다. -●2월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●2월:くま의 귀병(와)과 부관의 신귀병(이)가 대결합니다. -●2월:부관의 신귀병(이)가 전멸했습니다. -●2월:くま의 귀병(와)과 ㅇωㅇ의 신귀병(이)가 대결합니다. -●2월:보컬로이드미친과학(이)가 교지(으)로 진격합니다. -●2월:미친과학의 귀병(와)과 ㅇωㅇ의 신귀병(이)가 대결합니다. -●2월:ㅇωㅇ의 신귀병(이)가 전멸했습니다. -●2월:미친과학(이)가 귀병(으)로 성벽을 공격합니다. -●2월:ⓖ의병장6(이)가 긔엽긔에서 추방당하였습니다. -●2월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●2월:Navy마초(이)가 청주병(으)로 성벽을 공격합니다. -●2월:누군가가 교지(을)를 살피는 것 같습니다. -●3월:긔엽긔Air(이)가 양양(으)로 진격합니다. -●3월:Air의 기병(와)과 카이사르의 연노병(이)가 대결합니다. -●3월:카이사르의 연노병(이)가 전멸했습니다. -●3월:Air(이)가 기병(으)로 성벽을 공격합니다. -●3월:Air의 기병(이)가 퇴각했습니다. -●3월:ⓖ의병장7(이)가 의견차이를 좁히지 못하고 떠났습니다. -●3월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●3월:플젠(이)가 등갑병(으)로 성벽을 공격합니다. -●3월:보컬로이드KAITO(이)가 상동(으)로 진격합니다. -●3월:KAITO(이)가 수병(으)로 성벽을 공격합니다. -●3월:KAITO(이)가 상동 공략에 성공했습니다. -●3월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●3월:코토와르의 기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●3월:코토와르의 기병(이)가 퇴각했습니다. -●3월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●3월:엄백호의 청주병(와)과 Anes의 기병(이)가 대결합니다. -●3월:엄백호의 청주병(이)가 퇴각했습니다. -●3월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●3월:정휘인의 귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●3월:정휘인의 귀병(이)가 퇴각했습니다. -●3월:긔엽긔비밀(이)가 양양(으)로 진격합니다. -●3월:비밀의 신귀병(와)과 HideD의 신귀병(이)가 대결합니다. -●3월:비밀의 신귀병(이)가 퇴각했습니다. -●3월:긔엽긔쿠요(이)가 양양(으)로 진격합니다. -●3월:쿠요의 기병(와)과 HideD의 신귀병(이)가 대결합니다. -●3월:어엿븐소드락하연주(이)가 북평(으)로 진격합니다. -●3월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●3월:ⓖ의병장6(이)가 판단 착오였다며 떠났습니다. -●3월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●3월:Navy마초의 청주병(와)과 갸오오의 신귀병(이)가 대결합니다. -●3월:갸오오의 신귀병(이)가 전멸했습니다. -●4월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●4월:플젠의 등갑병(와)과 진의 신귀병(이)가 대결합니다. -●4월:ⓖ의병장11(이)가 생활고가 나아지지 않는다며 떠났습니다. -●4월:보컬로이드KAITO(이)가 고창(으)로 진격합니다. -●4월:KAITO(이)가 수병(으)로 성벽을 공격합니다. -●4월:KAITO(이)가 고창 공략에 성공했습니다. -●4월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●4월:바닥을탁치고의 귀병(와)과 그만좀불러좀의 신귀병(이)가 대결합니다. -●4월:그만좀불러좀의 신귀병(이)가 전멸했습니다. -●4월:바닥을탁치고의 귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●4월:바닥을탁치고의 귀병(이)가 퇴각했습니다. -●4월:접속잘안함진(이)가 장판(으)로 진격합니다. -●4월:진의 신귀병(와)과 야근탈출의 기병(이)가 대결합니다. -●4월:야근탈출의 기병(이)가 전멸했습니다. -●4월:접속잘안함HideD(이)가 장판(으)로 진격합니다. -●4월:HideD의 신귀병(와)과 ⓖ의병장18의 기병(이)가 대결합니다. -●4월:안정에서 금과 쌀을 도둑맞았습니다. -●4월:긔엽긔쿠요(이)가 양양(으)로 진격합니다. -●4월:쿠요의 기병(와)과 니쉬의 신귀병(이)가 대결합니다. -●4월:어엿븐소드락하연주(이)가 북평(으)로 진격합니다. -●4월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●5월:ⓖ의병장14(이)가 푸대접에 실망하여 떠났습니다. -●5월:긔엽긔북두칠성(이)가 양양(으)로 진격합니다. -●5월:북두칠성의 등갑병(와)과 니쉬의 신귀병(이)가 대결합니다. -●5월:북두칠성의 등갑병(이)가 퇴각했습니다. -●5월:접속잘안함니쉬(이)가 장판(으)로 진격합니다. -●5월:니쉬의 신귀병(와)과 누렁의 신귀병(이)가 대결합니다. -●5월:니쉬의 신귀병(이)가 퇴각했습니다. -●5월:보컬로이드KAITO(이)가 시상(으)로 진격합니다. -●5월:KAITO(이)가 수병(으)로 성벽을 공격합니다. -●5월:KAITO(이)가 시상 공략에 성공했습니다. -●5월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●5월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●5월:교지에서 국민기업(이)라는 호걸이 천하에 이름을 알립니다. -●5월:ⓖ의병장15(이)가 푸대접에 실망하여 떠났습니다. -●5월:긔엽긔북오더(이)가 양양(으)로 진격합니다. -●5월:북오더의 연노병(와)과 카이사르의 연노병(이)가 대결합니다. -●5월:어엿븐소드락하연주(이)가 북평(으)로 진격합니다. -●5월:하연주(이)가 궁병(으)로 성벽을 공격합니다. -●5월:하연주의 궁병(이)가 퇴각했습니다. -●5월:긔엽긔박일아(이)가 양양(으)로 진격합니다. -●5월:박일아의 기병(와)과 무광의 신귀병(이)가 대결합니다. -●5월:ⓖ의병장2(이)가 아무 이유 없이 떠났습니다. -●5월:남해에서 찌찌맨(이)라는 호걸이 천하에 이름을 알립니다. -●5월:누군가가 교지(을)를 살피는 것 같습니다. -●6월:접속잘안함카이사르(이)가 장판(으)로 진격합니다. -●6월:카이사르의 연노병(와)과 박일아의 기병(이)가 대결합니다. -●6월:박일아의 기병(이)가 전멸했습니다. -●6월:보컬로이드KAITO(이)가 장사(으)로 진격합니다. -●6월:KAITO(이)가 수병(으)로 성벽을 공격합니다. -●6월:국민기업(이)가 긔엽긔임관했습니다. -●6월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●6월:선비의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●6월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●6월:제갈여포의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●6월:갸오오의 신귀병(이)가 전멸했습니다. -●6월:제갈여포의 궁기병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●6월:ⓖ의병장5(이)가 생활고가 나아지지 않는다며 떠났습니다. -●6월:긔엽긔북오더(이)가 양양(으)로 진격합니다. -●6월:북오더의 연노병(와)과 무광의 신귀병(이)가 대결합니다. -●6월:북오더의 연노병(이)가 퇴각했습니다. -●6월:보컬로이드미친과학(이)가 교지(으)로 진격합니다. -●6월:미친과학의 귀병(와)과 Anes의 기병(이)가 대결합니다. -●6월:미친과학의 귀병(이)가 퇴각했습니다. -●6월:ⓖ의병장4(이)가 판단 착오였다며 떠났습니다. -●7월:ⓖ의병장16(이)가 자기 목적은 달성했다며 떠났습니다. -●7월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●7월:러스티건의 궁기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●7월:ⓖ의병장12(이)가 자기 목적은 달성했다며 떠났습니다. -●7월:긔엽긔낭군(이)가 양양(으)로 진격합니다. -●7월:낭군의 신귀병(와)과 장임의 청주병(이)가 대결합니다. -●7월:낭군의 신귀병(이)가 퇴각했습니다. -●7월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●7월:정휘인의 신귀병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●7월:ㅇωㅇ의 귀병(이)가 전멸했습니다. -●7월:정휘인의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●7월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●7월:선비의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●7월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●7월:제갈여포의 궁기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●7월:잠둥이션의 귀병(이)가 전멸했습니다. -●7월:제갈여포의 궁기병(와)과 Anes의 기병(이)가 대결합니다. -●7월:Anes의 기병(이)가 전멸했습니다. -●7월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●7월:사비에서 혹한기춥다(이)라는 호걸이 천하에 이름을 알립니다. -●7월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●7월:くま(이)가 귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●7월:Navy마초(이)가 청주병(으)로 성벽을 공격합니다. -●8월:ⓖ의병장13(이)가 아무 이유 없이 떠났습니다. -●8월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●8월:플젠의 등갑병(와)과 진의 신귀병(이)가 대결합니다. -●8월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●8월:러스티건의 궁기병(와)과 감정의 충차(이)가 대결합니다. -●8월:블소니콜(이)가 낙양(으)로 진격합니다. -●8월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●8월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●8월:장임의 청주병(와)과 Air의 기병(이)가 대결합니다. -●8월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●8월:바닥을탁치고의 신귀병(와)과 부관의 신귀병(이)가 대결합니다. -●8월:접속잘안함진(이)가 장판(으)로 진격합니다. -●8월:진의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●8월:정휘인의 신귀병(와)과 부관의 신귀병(이)가 대결합니다. -●8월:부관의 신귀병(이)가 전멸했습니다. -●8월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●8월:안정에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●8월:くま의 귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●8월:긔엽긔쿠요(이)가 양양(으)로 진격합니다. -●8월:쿠요의 기병(와)과 니쉬의 신귀병(이)가 대결합니다. -●8월:쿠요의 기병(이)가 퇴각했습니다. -●8월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●8월:Navy마초의 청주병(와)과 비밀의 신귀병(이)가 대결합니다. -●8월:비밀의 신귀병(이)가 전멸했습니다. -●8월:Navy마초(이)가 청주병(으)로 성벽을 공격합니다. -●9월:긔엽긔북두칠성(이)가 양양(으)로 진격합니다. -●9월:북두칠성의 등갑병(와)과 HideD의 신귀병(이)가 대결합니다. -●9월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●9월:플젠의 등갑병(와)과 니쉬의 신귀병(이)가 대결합니다. -●9월:플젠의 등갑병(이)가 퇴각했습니다. -●9월:접속잘안함니쉬(이)가 장판(으)로 진격합니다. -●9월:니쉬의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●9월:니쉬의 신귀병(이)가 퇴각했습니다. -●9월:블소니콜(이)가 낙양(으)로 진격합니다. -●9월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●9월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●9월:장임의 청주병(와)과 박희수의 등갑병(이)가 대결합니다. -●9월:박희수의 등갑병(이)가 전멸했습니다. -●9월:장임의 청주병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●9월:장임의 청주병(이)가 퇴각했습니다. -●9월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●9월:바닥을탁치고의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●9월:접속잘안함진(이)가 장판(으)로 진격합니다. -●9월:진의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●9월:북두칠성의 등갑병(이)가 전멸했습니다. -●9월:진의 신귀병(와)과 ⓖ의병장18의 기병(이)가 대결합니다. -●9월:ⓖ의병장18의 기병(이)가 전멸했습니다. -●9월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:진의 신귀병(이)가 퇴각했습니다. -●9월:접속잘안함HideD(이)가 장판(으)로 진격합니다. -●9월:HideD(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:ⓖ의병장20(이)가 긔엽긔에서 추방당하였습니다. -●9월:누군가가 교지(을)를 살피는 것 같습니다. -●10월:ⓖ의병장22(이)가 긔엽긔에서 추방당하였습니다. -●10월:블소니콜(이)가 낙양(으)로 진격합니다. -●10월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●10월:니콜(이)가 낙양 공략에 성공했습니다. -●10월:접속잘안함카이사르(이)가 장판(으)로 진격합니다. -●10월:카이사르의 연노병(와)과 북오더의 연노병(이)가 대결합니다. -●10월:ⓖ의병장19(이)가 긔엽긔에서 추방당하였습니다. -●10월:접속잘안함무광(이)가 장판(으)로 진격합니다. -●10월:무광의 신귀병(와)과 북오더의 연노병(이)가 대결합니다. -●10월:누군가가 남피(을)를 살피는 것 같습니다. -●10월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●10월:정휘인의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●10월:정휘인의 신귀병(이)가 퇴각했습니다. -●10월:전인호(이)가 보령압주(사기)(을)를 습득했습니다! -●10월:하내에서 금과 쌀을 도둑맞았습니다. -●10월:ⓖ의병장19(이)가 자기 목적은 달성했다며 떠났습니다. -●10월:ⓖ의병장20(이)가 생활고가 나아지지 않는다며 떠났습니다. -●10월:누군가가 하내의 성벽을 허물었습니다. -●10월:보컬로이드Navy마초(이)가 계양(으)로 진격합니다. -●10월:Navy마초(이)가 청주병(으)로 성벽을 공격합니다. -●10월:Navy마초의 청주병(이)가 퇴각했습니다. -●11월:찌찌맨(이)가 천하 정세를 비관하며 분신하고 말았습니다. -●11월:접속잘안함카이사르(이)가 장판(으)로 진격합니다. -●11월:카이사르의 연노병(와)과 야근탈출의 기병(이)가 대결합니다. -●11월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●11월:KAITO의 수병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●11월:누군가가 흉노(을)를 살피는 것 같습니다. -●11월:흉노(이)가 불타고 있습니다. -●11월:접속잘안함무광(이)가 장판(으)로 진격합니다. -●11월:무광의 신귀병(와)과 야근탈출의 기병(이)가 대결합니다. -●11월:야근탈출의 기병(이)가 전멸했습니다. -●11월:무광의 신귀병(와)과 북오더의 연노병(이)가 대결합니다. -●11월:북오더의 연노병(이)가 전멸했습니다. -●11월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●11월:선비의 신귀병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●11월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●11월:제갈여포의 궁기병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●11월:ⓖ의병장22(이)가 아무 이유 없이 떠났습니다. -●12월:을지바람(이)가 고리대금에 시달리다가 자살하고 말았습니다. -●12월:누군가가 하내(을)를 살피는 것 같습니다. -●12월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●12월:코토와르의 기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●12월:누군가가 하내의 성벽을 허물었습니다. -●12월:안정에서 돌아온꼰대(이)라는 기재가 천하에 이름을 알립니다. -●12월:필살 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다. -●12월:접속잘안함선비(이)가 장판(으)로 진격합니다. -●12월:선비의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●12월:선비의 신귀병(이)가 퇴각했습니다. -●12월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●12월:제갈여포의 궁기병(와)과 부관의 신귀병(이)가 대결합니다. -●12월:하내에서 금과 쌀을 도둑맞았습니다. -●12월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●12월:くま의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●12월:누군가가 하내의 성벽을 허물었습니다. -●12월:돌아온꼰대(이)가 보컬로이드임관했습니다. -●12월:흉노(이)가 불타고 있습니다. -●12월:누군가가 교지(을)를 살피는 것 같습니다. -◆1월:190년이 되었습니다. -●1월:접속잘안함니쉬(이)가 장판(으)로 진격합니다. -●1월:니쉬의 신귀병(와)과 누렁의 신귀병(이)가 대결합니다. -●1월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●1월:장임의 청주병(와)과 플젠의 등갑병(이)가 대결합니다. -●1월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●1월:KAITO의 수병(와)과 Air의 기병(이)가 대결합니다. -●1월:KAITO의 수병(이)가 퇴각했습니다. -●1월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●1월:바닥을탁치고의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●1월:접속잘안함진(이)가 장판(으)로 진격합니다. -●1월:진의 신귀병(와)과 누렁의 신귀병(이)가 대결합니다. -●1월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●1월:코토와르의 기병(와)과 부관의 신귀병(이)가 대결합니다. -●1월:부관의 신귀병(이)가 전멸했습니다. -●1월:코토와르의 기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●1월:혹한기춥다(이)가 유산 상속 문제로 다투다가 살해당했습니다. -●1월:접속잘안함HideD(이)가 장판(으)로 진격합니다. -●1월:HideD의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●1월:누군가가 흉노의 성벽을 허물었습니다. -●1월:ⓖ의병장17(이)가 자기 목적은 달성했다며 떠났습니다. -●1월:흉노에서 금과 쌀을 도둑맞았습니다. -●1월:누군가가 여강(을)를 살피는 것 같습니다. -●1월:누군가가 흉노의 성벽을 허물었습니다. -●1월:누군가가 시상(을)를 살피는 것 같습니다. -●1월:흉노(이)가 불타고 있습니다. -●1월:누군가가 흉노의 성벽을 허물었습니다. -●2월:긔엽긔플젠(이)가 양양(으)로 진격합니다. -●2월:플젠의 등갑병(와)과 니쉬의 신귀병(이)가 대결합니다. -●2월:접속잘안함니쉬(이)가 장판(으)로 진격합니다. -●2월:니쉬의 신귀병(와)과 누렁의 신귀병(이)가 대결합니다. -●2월:누렁의 신귀병(이)가 전멸했습니다. -●2월:니쉬의 신귀병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●2월:니쉬의 신귀병(이)가 퇴각했습니다. -●2월:긔엽긔SARS(이)가 시상(으)로 진격합니다. -●2월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●2월:SARS(이)가 시상 공략에 성공했습니다. -●2월:접속잘안함장임(이)가 장판(으)로 진격합니다. -●2월:장임의 청주병(와)과 플젠의 등갑병(이)가 대결합니다. -●2월:플젠의 등갑병(이)가 전멸했습니다. -●2월:장임의 청주병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●2월:그만좀불러좀의 귀병(이)가 전멸했습니다. -●2월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●2월:접속잘안함DVa(이)가 장판(으)로 진격합니다. -●2월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●2월:DVa(이)가 장판 공략에 성공했습니다. -●2월:ⓖ의병장21(이)가 자기 목적은 달성했다며 떠났습니다. -●2월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●2월:바닥을탁치고의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●2월:낭군의 신귀병(이)가 전멸했습니다. -●2월:바닥을탁치고의 신귀병(와)과 갸오오의 신귀병(이)가 대결합니다. -●2월:바닥을탁치고의 신귀병(이)가 퇴각했습니다. -●2월:흉노(이)가 불타고 있습니다. -●2월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●2월:엄백호의 등갑병(와)과 갸오오의 신귀병(이)가 대결합니다. -●2월:갸오오의 신귀병(이)가 전멸했습니다. -●2월:엄백호의 등갑병(와)과 Air의 기병(이)가 대결합니다. -●2월:Air의 기병(이)가 전멸했습니다. -●2월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●2월:정휘인의 신귀병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●2월:누군가가 (을)를 살피는 것 같습니다. -●2월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●2월:くま의 신귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●2월:누군가가 파양(을)를 살피는 것 같습니다. -●2월:누군가가 흉노의 성벽을 허물었습니다. -●2월:낙양에서 금과 쌀을 도둑맞았습니다. -●2월:보컬로이드Navy마초(이)가 계양(으)로 진격합니다. -●2월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●2월:Navy마초(이)가 계양 공략에 성공했습니다. -●2월:누군가가 여강(을)를 살피는 것 같습니다. -●2월:누군가가 흉노의 성벽을 허물었습니다. -●3월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●3월:러스티건의 궁기병(와)과 비밀의 신귀병(이)가 대결합니다. -●3월:접속잘안함카이사르(이)가 강릉(으)로 진격합니다. -●3월:카이사르의 연노병(와)과 북오더의 연노병(이)가 대결합니다. -●3월:긔엽긔SARS(이)가 고창(으)로 진격합니다. -●3월:SARS의 충차(와)과 미친과학의 신귀병(이)가 대결합니다. -●3월:접속잘안함장임(이)가 강릉(으)로 진격합니다. -●3월:장임의 청주병(와)과 야근탈출의 기병(이)가 대결합니다. -●3월:야근탈출의 기병(이)가 전멸했습니다. -●3월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●3월:접속잘안함DVa(이)가 강릉(으)로 진격합니다. -●3월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●3월:누군가가 흉노(을)를 살피는 것 같습니다. -●3월:접속잘안함진(이)가 강릉(으)로 진격합니다. -●3월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●3월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●3월:엄백호의 등갑병(와)과 쿠요의 기병(이)가 대결합니다. -●3월:엄백호의 등갑병(이)가 퇴각했습니다. -●3월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●3월:정휘인의 신귀병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●3월:ㅇωㅇ의 귀병(이)가 전멸했습니다. -●3월:정휘인의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●3월:쿠요의 기병(이)가 전멸했습니다. -●3월:정휘인의 신귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●3월:비밀의 신귀병(이)가 전멸했습니다. -●3월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●3월:누군가가 홍농의 성벽을 허물었습니다. -●3월:ⓖ의병장18(이)가 자기가 없어도 될것 같다며 떠났습니다. -●3월:긔엽긔북오더(이)가 장판(으)로 진격합니다. -●3월:북오더의 연노병(와)과 무광의 신귀병(이)가 대결합니다. -●3월:낙양에서 금과 쌀을 도둑맞았습니다. -●3월:보컬로이드Navy마초(이)가 장사(으)로 진격합니다. -●3월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:바쁘다바빠(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다. -●4월:종횡무진강서유서(이)가 흉노(으)로 진격합니다. -●4월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●4월:강서유서(이)가 흉노 공략에 성공했습니다. -●4월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●4월:러스티건의 궁기병(와)과 박일아의 기병(이)가 대결합니다. -●4월:블소니콜(이)가 (으)로 진격합니다. -●4월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●4월:접속잘안함장임(이)가 강릉(으)로 진격합니다. -●4월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●4월:장임의 청주병(이)가 퇴각했습니다. -●4월:접속잘안함DVa(이)가 강릉(으)로 진격합니다. -●4월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●4월:DVa(이)가 강릉 공략에 성공했습니다. -●4월:누군가가 하내(을)를 살피는 것 같습니다. -●4월:종횡무진하루카(이)가 하내(으)로 진격합니다. -●4월:하루카의 등갑병(와)과 쥬비아의 귀병(이)가 대결합니다. -●4월:종횡무진카토(이)가 하내(으)로 진격합니다. -●4월:카토의 중장기병(와)과 쥬비아의 귀병(이)가 대결합니다. -●4월:쥬비아의 귀병(이)가 전멸했습니다. -●4월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●4월:제갈여포의 궁기병(와)과 부관의 귀병(이)가 대결합니다. -●4월:종횡무진평민킬러(이)가 하내(으)로 진격합니다. -●4월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●4월:평민킬러(이)가 하내 공략에 성공했습니다. -●4월:보컬로이드Navy마초(이)가 장사(으)로 진격합니다. -●4월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:종횡무진대악마(이)가 호관(으)로 진격합니다. -●4월:대악마의 중장기병(와)과 하연주의 궁병(이)가 대결합니다. -●5월:종횡무진강서유서(이)가 호관(으)로 진격합니다. -●5월:강서유서의 연노병(와)과 ⓜ공손료의 귀병(이)가 대결합니다. -●5월:ⓜ공손료의 귀병(이)가 전멸했습니다. -●5월:블소니콜(이)가 (으)로 진격합니다. -●5월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●5월:접속잘안함DVa(이)가 이릉(으)로 진격합니다. -●5월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●5월:보컬로이드KAITO(이)가 시상(으)로 진격합니다. -●5월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●5월:누군가가 홍농(을)를 살피는 것 같습니다. -●5월:접속잘안함무광(이)가 적벽(으)로 진격합니다. -●5월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●5월:종횡무진하루카(이)가 호관(으)로 진격합니다. -●5월:하루카의 등갑병(와)과 하연주의 궁병(이)가 대결합니다. -●5월:하연주의 궁병(이)가 전멸했습니다. -●5월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●5월:종횡무진카토(이)가 호관(으)로 진격합니다. -●5월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●5월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●5월:제갈여포의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●5월:누군가가 (을)를 살피는 것 같습니다. -●5월:종횡무진평민킬러(이)가 홍농(으)로 진격합니다. -●5월:평민킬러의 연노병(와)과 소드락의 기병(이)가 대결합니다. -●5월:ⓖ의병장28(이)가 ⓜ강찬(이)라는 인재를 영입하였습니다! -●5월:종횡무진내나(이)가 홍농(으)로 진격합니다. -●5월:내나의 귀병(와)과 소드락의 기병(이)가 대결합니다. -●5월:소드락의 기병(이)가 전멸했습니다. -●5월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●5월:종횡무진대악마(이)가 호관(으)로 진격합니다. -●5월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●6월:종횡무진강서유서(이)가 호관(으)로 진격합니다. -●6월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●6월:블소니콜(이)가 (으)로 진격합니다. -●6월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●6월:접속잘안함DVa(이)가 이릉(으)로 진격합니다. -●6월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●6월:DVa(이)가 이릉 공략에 성공했습니다. -●6월:보컬로이드KAITO(이)가 시상(으)로 진격합니다. -●6월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:KAITO(이)가 시상 공략에 성공했습니다. -●6월:누군가가 하내(을)를 살피는 것 같습니다. -●6월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●6월:바닥을탁치고의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●6월:종횡무진하루카(이)가 호관(으)로 진격합니다. -●6월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:종횡무진카토(이)가 호관(으)로 진격합니다. -●6월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●6월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●6월:くま의 신귀병(와)과 북오더의 연노병(이)가 대결합니다. -●6월:뒷집할머니(이)가 역병에 걸려 죽고 말았습니다. -●6월:종횡무진평민킬러(이)가 호관(으)로 진격합니다. -●6월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●6월:평민킬러(이)가 호관 공략에 성공했습니다. -●6월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●6월:돌아온꼰대의 기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:종횡무진내나(이)가 홍농(으)로 진격합니다. -●6월:내나의 귀병(와)과 소드락의 기병(이)가 대결합니다. -●6월:소드락의 기병(이)가 전멸했습니다. -●6월:종횡무진대악마(이)가 진양(으)로 진격합니다. -●6월:대악마(이)가 중장기병(으)로 성벽을 공격합니다. -●6월:대악마의 중장기병(이)가 퇴각했습니다. -●7월:종횡무진강서유서(이)가 (으)로 진격합니다. -●7월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●7월:강서유서(이)가 공략에 성공했습니다. -●7월:누군가가 장사(을)를 살피는 것 같습니다. -●7월:접속잘안함DVa(이)가 영안(으)로 진격합니다. -●7월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●7월:DVa(이)가 영안 공략에 성공했습니다. -●7월:보컬로이드KAITO(이)가 장사(으)로 진격합니다. -●7월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:KAITO(이)가 장사 공략에 성공했습니다. -●7월:누군가가 홍농(을)를 살피는 것 같습니다. -●7월:누군가가 호관(을)를 살피는 것 같습니다. -●7월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●7월:바닥을탁치고의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●7월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●7월:코토와르의 기병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●7월:종횡무진일본어번역기(이)가 홍농(으)로 진격합니다. -●7월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●7월:다이스(이)가 종횡무진선전 포고 하였습니다. -●7월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●7월:정휘인의 신귀병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●7월:종횡무진하루카(이)가 진양(으)로 진격합니다. -●7월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:하루카(이)가 진양 공략에 성공했습니다. -●7월:에서 금과 쌀을 도둑맞았습니다. -●7월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●7월:くま의 신귀병(와)과 북오더의 연노병(이)가 대결합니다. -●7월:くま의 신귀병(이)가 퇴각했습니다. -●7월:종횡무진평민킬러(이)가 홍농(으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 소드락의 기병(이)가 대결합니다. -●7월:소드락의 기병(이)가 전멸했습니다. -●7월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●7월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●7월:돌아온꼰대의 기병(와)과 부관의 귀병(이)가 대결합니다. -●7월:돌아온꼰대의 기병(이)가 퇴각했습니다. -●7월:종횡무진내나(이)가 홍농(으)로 진격합니다. -●7월:내나(이)가 귀병(으)로 성벽을 공격합니다. -●7월:내나의 귀병(이)가 퇴각했습니다. -●8월:종횡무진강서유서(이)가 홍농(으)로 진격합니다. -●8월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●8월:강서유서의 연노병(이)가 퇴각했습니다. -●8월:접속잘안함니쉬(이)가 무릉(으)로 진격합니다. -●8월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함장임(이)가 무릉(으)로 진격합니다. -●8월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●8월:장임(이)가 무릉 공략에 성공했습니다. -●8월:접속잘안함DVa(이)가 강하(으)로 진격합니다. -●8월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●8월:DVa(이)가 강하 공략에 성공했습니다. -●8월:누군가가 남피(을)를 살피는 것 같습니다. -●8월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●8월:코토와르의 기병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:코토와르의 기병(이)가 퇴각했습니다. -●8월:종횡무진일본어번역기(이)가 홍농(으)로 진격합니다. -●8월:일본어번역기(이)가 귀병(으)로 성벽을 공격합니다. -●8월:일본어번역기의 귀병(이)가 퇴각했습니다. -●8월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●8월:엄백호의 등갑병(와)과 부관의 귀병(이)가 대결합니다. -●8월:부관의 귀병(이)가 전멸했습니다. -●8월:엄백호의 등갑병(와)과 북오더의 연노병(이)가 대결합니다. -●8월:엄백호의 등갑병(이)가 퇴각했습니다. -●8월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●8월:정휘인의 신귀병(와)과 북오더의 연노병(이)가 대결합니다. -●8월:북오더의 연노병(이)가 전멸했습니다. -●8월:정휘인의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●8월:쿠요의 기병(이)가 전멸했습니다. -●8월:정휘인의 신귀병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●8월:ⓜ능환의 귀병(이)가 전멸했습니다. -●8월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●8월:종횡무진하루카(이)가 (으)로 진격합니다. -●8월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●8월:하루카의 등갑병(이)가 퇴각했습니다. -●8월:에서 금과 쌀을 도둑맞았습니다. -●8월:종횡무진평민킬러(이)가 홍농(으)로 진격합니다. -●8월:평민킬러의 연노병(와)과 소드락의 기병(이)가 대결합니다. -●8월:소드락의 기병(이)가 전멸했습니다. -●8월:평민킬러의 연노병(와)과 ⓖ의병장29의 귀병(이)가 대결합니다. -●8월:누군가가 교지(을)를 살피는 것 같습니다. -●9월:접속잘안함니쉬(이)가 영릉(으)로 진격합니다. -●9월:니쉬의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●9월:누군가가 장사(을)를 살피는 것 같습니다. -●9월:하내에서 안돼요안돼요(이)라는 호걸이 천하에 이름을 알립니다. -●9월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●9월:카이사르의 연노병(와)과 플젠의 등갑병(이)가 대결합니다. -●9월:누군가가 계양(을)를 살피는 것 같습니다. -●9월:접속잘안함장임(이)가 영릉(으)로 진격합니다. -●9월:장임의 청주병(와)과 박희수의 등갑병(이)가 대결합니다. -●9월:누군가가 홍농(을)를 살피는 것 같습니다. -●9월:접속잘안함진(이)가 영릉(으)로 진격합니다. -●9월:진의 신귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●9월:접속잘안함무광(이)가 영릉(으)로 진격합니다. -●9월:무광의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●9월:박희수의 등갑병(이)가 전멸했습니다. -●9월:종횡무진카토(이)가 (으)로 진격합니다. -●9월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●9월:카토(이)가 공략에 성공했습니다. -●9월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●9월:제갈여포의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●9월:어엿븐소드락ⓖ의병장29(이)가 하내(으)로 진격합니다. -●9월:ⓖ의병장29의 귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:평민킬러의 연노병(이)가 전멸했습니다. -●9월:ⓖ의병장29(이)가 귀병(으)로 성벽을 공격합니다. -●9월:에서 금과 쌀을 도둑맞았습니다. -●9월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●9월:Navy마초의 궁기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:접속잘안함니쉬(이)가 영릉(으)로 진격합니다. -●10월:니쉬의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●10월:니쉬의 신귀병(이)가 퇴각했습니다. -●10월:긔엽긔감정(이)가 계양(으)로 진격합니다. -●10월:감정(이)가 충차(으)로 성벽을 공격합니다. -●10월:감정(이)가 계양 공략에 성공했습니다. -●10월:하비에서 여자친구(이)라는 호걸이 천하에 이름을 알립니다. -●10월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●10월:카이사르의 연노병(와)과 비밀의 신귀병(이)가 대결합니다. -●10월:카이사르의 연노병(이)가 퇴각했습니다. -●10월:누군가가 상동(을)를 살피는 것 같습니다. -●10월:접속잘안함장임(이)가 영릉(으)로 진격합니다. -●10월:장임의 청주병(와)과 박일아의 기병(이)가 대결합니다. -●10월:장임의 청주병(이)가 퇴각했습니다. -●10월:접속잘안함진(이)가 영릉(으)로 진격합니다. -●10월:진의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●10월:접속잘안함무광(이)가 영릉(으)로 진격합니다. -●10월:무광의 신귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●10월:비밀의 신귀병(이)가 전멸했습니다. -●10월:종횡무진카토(이)가 역경(으)로 진격합니다. -●10월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●10월:접속잘안함선비(이)가 영릉(으)로 진격합니다. -●10월:선비의 신귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●10월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●10월:제갈여포의 궁기병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●10월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●10월:Navy마초의 궁기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:누군가가 무릉(을)를 살피는 것 같습니다. -●10월:종횡무진대악마(이)가 역경(으)로 진격합니다. -●10월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●10월:대악마(이)가 역경 공략에 성공했습니다. -●11월:어엿븐소드락ⓖ의병장33(이)가 하내(으)로 진격합니다. -●11월:ⓖ의병장33의 궁병(와)과 하루카의 등갑병(이)가 대결합니다. -●11월:긔엽긔감정(이)가 장사(으)로 진격합니다. -●11월:감정(이)가 충차(으)로 성벽을 공격합니다. -●11월:감정(이)가 장사 공략에 성공했습니다. -●11월:긔엽긔SARS(이)가 상동(으)로 진격합니다. -●11월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●11월:SARS(이)가 상동 공략에 성공했습니다. -●11월:보컬로이드KAITO(이)가 상동(으)로 진격합니다. -●11월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●11월:바닥을탁치고의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●11월:Anes의 기병(이)가 전멸했습니다. -●11월:바닥을탁치고의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●11월:어엿븐소드락ⓖ의병장32(이)가 하내(으)로 진격합니다. -●11월:ⓖ의병장32의 귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:누군가가 강릉(을)를 살피는 것 같습니다. -●11월:긔엽긔그만좀불러좀(이)가 무릉(으)로 진격합니다. -●11월:그만좀불러좀(이)가 신귀병(으)로 성벽을 공격합니다. -●11월:에서 금과 쌀을 도둑맞았습니다. -●11월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●11월:くま의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●11월:누군가가 시상(을)를 살피는 것 같습니다. -●11월:긔엽긔잠둥이션(이)가 무릉(으)로 진격합니다. -●11월:잠둥이션(이)가 귀병(으)로 성벽을 공격합니다. -●11월:잠둥이션(이)가 무릉 공략에 성공했습니다. -●11월:종횡무진내나(이)가 홍농(으)로 진격합니다. -●11월:내나의 귀병(와)과 재야의 귀병(이)가 대결합니다. -●11월:안돼요안돼요(이)가 종횡무진임관했습니다. -●11월:종횡무진대악마(이)가 남피(으)로 진격합니다. -●11월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●11월:대악마(이)가 남피 공략에 성공했습니다. -●11월:어엿븐소드락ⓜ공손료(이)가 하내(으)로 진격합니다. -●11월:ⓜ공손료의 귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:종횡무진강서유서(이)가 북평(으)로 진격합니다. -●12월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●12월:누군가가 고창(을)를 살피는 것 같습니다. -●12월:어엿븐소드락ⓖ의병장33(이)가 하내(으)로 진격합니다. -●12월:ⓖ의병장33의 궁병(와)과 하루카의 등갑병(이)가 대결합니다. -●12월:ⓖ의병장33의 궁병(이)가 퇴각했습니다. -●12월:긔엽긔감정(이)가 시상(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:감정(이)가 시상 공략에 성공했습니다. -●12월:소드락(이)가 종횡무진(와)과 종전 합의 하였습니다. -●12월:누군가가 파양(을)를 살피는 것 같습니다. -●12월:보컬로이드KAITO(이)가 시상(으)로 진격합니다. -●12월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●12월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●12월:바닥을탁치고의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●12월:낭군의 신귀병(이)가 전멸했습니다. -●12월:바닥을탁치고의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●12월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●12월:엄백호의 등갑병(와)과 ㅇωㅇ의 귀병(이)가 대결합니다. -●12월:ㅇωㅇ의 귀병(이)가 전멸했습니다. -●12월:엄백호의 등갑병(와)과 쿠요의 기병(이)가 대결합니다. -●12월:쿠요의 기병(이)가 전멸했습니다. -●12월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●12월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●12월:종횡무진하루카(이)가 장안(으)로 진격합니다. -●12월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●12월:종횡무진카토(이)가 북평(으)로 진격합니다. -●12월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●12월:카토(이)가 북평 공략에 성공했습니다. -●12월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●12월:くま(이)가 신귀병(으)로 성벽을 공격합니다. -●12월:긔엽긔잠둥이션(이)가 강릉(으)로 진격합니다. -●12월:잠둥이션의 귀병(와)과 HideD의 신귀병(이)가 대결합니다. -●12월:잠둥이션의 귀병(이)가 퇴각했습니다. -●12월:누군가가 교지(을)를 살피는 것 같습니다. -◆1월:191년이 되었습니다. -●1월:긔엽긔감정(이)가 적벽(으)로 진격합니다. -●1월:감정(이)가 충차(으)로 성벽을 공격합니다. -●1월:감정(이)가 적벽 공략에 성공했습니다. -●1월:어엿븐소드락ⓖ의병장30(이)가 장안(으)로 진격합니다. -●1월:ⓖ의병장30(이)가 궁병(으)로 성벽을 공격합니다. -●1월:누군가가 장판(을)를 살피는 것 같습니다. -●1월:보컬로이드KAITO(이)가 시상(으)로 진격합니다. -●1월:KAITO의 등갑병(와)과 야근탈출의 기병(이)가 대결합니다. -●1월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●1월:바닥을탁치고의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:바닥을탁치고의 신귀병(이)가 퇴각했습니다. -●1월:엄백호(이)가 초선화(사기)(을)를 습득했습니다! -●1월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●1월:정휘인의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:북두칠성의 등갑병(이)가 전멸했습니다. -●1월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:누군가가 평원(을)를 살피는 것 같습니다. -●1월:종횡무진카토(이)가 장안(으)로 진격합니다. -●1월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●1월:카토(이)가 장안 공략에 성공했습니다. -●1월:긔엽긔그만좀불러좀(이)가 장판(으)로 진격합니다. -●1월:그만좀불러좀(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:그만좀불러좀의 신귀병(이)가 퇴각했습니다. -●1월:보컬로이드くま(이)가 시상(으)로 진격합니다. -●1월:くま의 신귀병(와)과 야근탈출의 기병(이)가 대결합니다. -●1월:くま의 신귀병(이)가 퇴각했습니다. -●1월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●1월:돌아온꼰대의 수렵기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●2월:긔엽긔감정(이)가 장판(으)로 진격합니다. -●2월:감정의 충차(와)과 카이사르의 연노병(이)가 대결합니다. -●2월:감정의 충차(이)가 퇴각했습니다. -●2월:블소니콜(이)가 오환(으)로 진격합니다. -●2월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●2월:니콜(이)가 오환 공략에 성공했습니다. -●2월:누군가가 고창(을)를 살피는 것 같습니다. -●2월:접속잘안함장임(이)가 장사(으)로 진격합니다. -●2월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●2월:접속잘안함DVa(이)가 적벽(으)로 진격합니다. -●2월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●2월:접속잘안함진(이)가 장사(으)로 진격합니다. -●2월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●2월:진(이)가 장사 공략에 성공했습니다. -●2월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●2월:코토와르의 기병(와)과 박일아의 기병(이)가 대결합니다. -●2월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●2월:정휘인의 신귀병(와)과 갸오오의 신귀병(이)가 대결합니다. -●2월:정휘인의 신귀병(이)가 퇴각했습니다. -●2월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●2월:제갈여포의 궁기병(와)과 Anes의 기병(이)가 대결합니다. -●2월:Anes의 기병(이)가 전멸했습니다. -●2월:낙양에서 금과 쌀을 도둑맞았습니다. -●2월:에서 금과 쌀을 도둑맞았습니다. -●2월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●2월:Navy마초의 궁기병(와)과 비밀의 신귀병(이)가 대결합니다. -●2월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●2월:돌아온꼰대의 수렵기병(와)과 Air의 기병(이)가 대결합니다. -●2월:돌아온꼰대의 수렵기병(이)가 퇴각했습니다. -●3월:접속잘안함니쉬(이)가 무릉(으)로 진격합니다. -●3월:니쉬의 신귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●3월:접속잘안함카이사르(이)가 적벽(으)로 진격합니다. -●3월:카이사르(이)가 연노병(으)로 성벽을 공격합니다. -●3월:누군가가 장사(을)를 살피는 것 같습니다. -●3월:접속잘안함장임(이)가 영릉(으)로 진격합니다. -●3월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●3월:접속잘안함DVa(이)가 적벽(으)로 진격합니다. -●3월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●3월:DVa(이)가 적벽 공략에 성공했습니다. -●3월:접속잘안함진(이)가 영릉(으)로 진격합니다. -●3월:진의 신귀병(와)과 북오더의 궁병(이)가 대결합니다. -●3월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●3월:코토와르의 기병(와)과 정력왕의 신귀병(이)가 대결합니다. -●3월:코토와르의 기병(이)가 퇴각했습니다. -●3월:접속잘안함무광(이)가 무릉(으)로 진격합니다. -●3월:무광의 신귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●3월:접속잘안함선비(이)가 무릉(으)로 진격합니다. -●3월:선비(이)가 신귀병(으)로 성벽을 공격합니다. -●3월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●3월:제갈여포의 궁기병(와)과 정력왕의 신귀병(이)가 대결합니다. -●3월:정력왕의 신귀병(이)가 전멸했습니다. -●3월:제갈여포의 궁기병(와)과 비밀의 신귀병(이)가 대결합니다. -●3월:긔엽긔박희수(이)가 장사(으)로 진격합니다. -●3월:박희수의 등갑병(와)과 카이사르의 연노병(이)가 대결합니다. -●3월:에서 금과 쌀을 도둑맞았습니다. -●3월:진류에서 1(이)라는 호걸이 천하에 이름을 알립니다. -●3월:낙양에서 금과 쌀을 도둑맞았습니다. -●3월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●3월:Navy마초의 궁기병(와)과 Air의 기병(이)가 대결합니다. -●3월:Air의 기병(이)가 전멸했습니다. -●3월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:접속잘안함니쉬(이)가 무릉(으)로 진격합니다. -●4월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●4월:니쉬(이)가 무릉 공략에 성공했습니다. -●4월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●4월:카이사르의 연노병(와)과 야근탈출의 기병(이)가 대결합니다. -●4월:야근탈출의 기병(이)가 전멸했습니다. -●4월:카이사르의 연노병(와)과 플젠의 등갑병(이)가 대결합니다. -●4월:카이사르의 연노병(이)가 퇴각했습니다. -●4월:접속잘안함장임(이)가 영릉(으)로 진격합니다. -●4월:장임의 청주병(와)과 플젠의 등갑병(이)가 대결합니다. -●4월:플젠의 등갑병(이)가 전멸했습니다. -●4월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●4월:접속잘안함DVa(이)가 시상(으)로 진격합니다. -●4월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●4월:DVa(이)가 시상 공략에 성공했습니다. -●4월:접속잘안함진(이)가 영릉(으)로 진격합니다. -●4월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●4월:누군가가 계양(을)를 살피는 것 같습니다. -●4월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●4월:제갈여포의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●4월:제갈여포의 궁기병(이)가 퇴각했습니다. -●4월:낙양에서 금과 쌀을 도둑맞았습니다. -●5월:남피에서 금과 쌀을 도둑맞았습니다. -●5월:누군가가 영릉(을)를 살피는 것 같습니다. -●5월:접속잘안함장임(이)가 계양(으)로 진격합니다. -●5월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●5월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●5월:KAITO의 등갑병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●5월:접속잘안함진(이)가 영릉(으)로 진격합니다. -●5월:진의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●5월:진의 신귀병(이)가 퇴각했습니다. -●5월:접속잘안함무광(이)가 영릉(으)로 진격합니다. -●5월:무광의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●5월:무광의 신귀병(이)가 퇴각했습니다. -●5월:에서 금과 쌀을 도둑맞았습니다. -●5월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●5월:くま의 흑귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●5월:북두칠성의 등갑병(이)가 전멸했습니다. -●5월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함니쉬(이)가 계양(으)로 진격합니다. -●6월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●6월:니쉬(이)가 계양 공략에 성공했습니다. -●6월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●6월:러스티건의 궁기병(와)과 Anes의 기병(이)가 대결합니다. -●6월:Anes의 기병(이)가 전멸했습니다. -●6월:러스티건의 궁기병(와)과 Air의 기병(이)가 대결합니다. -●6월:보컬로이드KAITO(이)가 상동(으)로 진격합니다. -●6월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:KAITO(이)가 상동 공략에 성공했습니다. -●6월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●6월:바닥을탁치고의 흑귀병(와)과 Air의 기병(이)가 대결합니다. -●6월:Air의 기병(이)가 전멸했습니다. -●6월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●6월:쥬비아(이)가 블소(으)로 망명하였습니다. -●6월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●6월:정휘인의 흑귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●6월:졸본에서 9(이)라는 호걸이 천하에 이름을 알립니다. -●6월:누군가가 복양(을)를 살피는 것 같습니다. -●6월:누군가가 북해(을)를 살피는 것 같습니다. -●7월:접속잘안함니쉬(이)가 영릉(으)로 진격합니다. -●7월:니쉬의 신귀병(와)과 부관의 귀병(이)가 대결합니다. -●7월:니쉬의 신귀병(이)가 퇴각했습니다. -●7월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●7월:러스티건의 궁기병(와)과 야근탈출의 기병(이)가 대결합니다. -●7월:야근탈출의 기병(이)가 전멸했습니다. -●7월:러스티건의 궁기병(와)과 비밀의 신귀병(이)가 대결합니다. -●7월:비밀의 신귀병(이)가 전멸했습니다. -●7월:러스티건(이)가 궁기병(으)로 성벽을 공격합니다. -●7월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●7월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●7월:바닥을탁치고의 흑귀병(와)과 쿠요의 기병(이)가 대결합니다. -●7월:누군가가 허창(을)를 살피는 것 같습니다. -●7월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●7월:정휘인의 흑귀병(와)과 쿠요의 기병(이)가 대결합니다. -●7월:쿠요의 기병(이)가 전멸했습니다. -●7월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●7월:누군가가 서주(을)를 살피는 것 같습니다. -●7월:에서 금과 쌀을 도둑맞았습니다. -●7월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●7월:Navy마초의 궁기병(와)과 북오더의 궁병(이)가 대결합니다. -●8월:남피에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드러스티건(이)가 교지(으)로 진격합니다. -●8월:러스티건의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●8월:갸오오의 신귀병(이)가 전멸했습니다. -●8월:러스티건의 궁기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●8월:러스티건의 궁기병(이)가 퇴각했습니다. -●8월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●8월:카이사르의 연노병(와)과 박일아의 기병(이)가 대결합니다. -●8월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●8월:엄백호의 등갑병(와)과 북오더의 궁병(이)가 대결합니다. -●8월:북오더의 궁병(이)가 전멸했습니다. -●8월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●8월:정휘인의 흑귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●8월:정휘인의 흑귀병(이)가 퇴각했습니다. -●8월:누군가가 (을)를 살피는 것 같습니다. -●8월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●8월:제갈여포의 궁기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●8월:북두칠성의 등갑병(이)가 전멸했습니다. -●8월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●8월:평양에서 앵벌스(이)라는 호걸이 천하에 이름을 알립니다. -●8월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●8월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●8월:누군가가 진류(을)를 살피는 것 같습니다. -●8월:낙양에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●8월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●8월:누군가가 남피(을)를 살피는 것 같습니다. -●8월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●8월:돌아온꼰대의 수렵기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●8월:메구리네루카(이)가 이강주(훈련)(을)를 습득했습니다! -●9월:접속잘안함카이사르(이)가 영릉(으)로 진격합니다. -●9월:카이사르의 연노병(와)과 부관의 귀병(이)가 대결합니다. -●9월:부관의 귀병(이)가 전멸했습니다. -●9월:카이사르의 연노병(와)과 박일아의 기병(이)가 대결합니다. -●9월:접속잘안함장임(이)가 영릉(으)로 진격합니다. -●9월:장임의 청주병(와)과 박일아의 기병(이)가 대결합니다. -●9월:박일아의 기병(이)가 전멸했습니다. -●9월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●9월:장임(이)가 영릉 공략에 성공했습니다. -●9월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●9월:코토와르의 기병(와)과 Anes의 기병(이)가 대결합니다. -●9월:Anes의 기병(이)가 전멸했습니다. -●9월:누군가가 남영(을)를 살피는 것 같습니다. -●9월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●9월:엄백호의 등갑병(와)과 Air의 기병(이)가 대결합니다. -●9월:엄백호의 등갑병(이)가 퇴각했습니다. -●9월:접속잘안함선비(이)가 남영(으)로 진격합니다. -●9월:선비(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●9월:제갈여포의 궁기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●9월:잠둥이션의 귀병(이)가 전멸했습니다. -●9월:제갈여포의 궁기병(와)과 Air의 기병(이)가 대결합니다. -●9월:Air의 기병(이)가 전멸했습니다. -●9월:1(이)가 누군가의 사주로 자객에게 암살당했습니다. -●9월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●9월:くま의 흑귀병(와)과 그만좀불러좀의 신귀병(이)가 대결합니다. -●9월:くま의 흑귀병(이)가 퇴각했습니다. -●9월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●9월:돌아온꼰대의 수렵기병(와)과 그만좀불러좀의 신귀병(이)가 대결합니다. -●9월:돌아온꼰대의 수렵기병(이)가 퇴각했습니다. -●10월:접속잘안함니쉬(이)가 남영(으)로 진격합니다. -●10월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함장임(이)가 남영(으)로 진격합니다. -●10월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●10월:장임(이)가 남영 공략에 성공했습니다. -●10월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●10월:코토와르의 기병(와)과 그만좀불러좀의 신귀병(이)가 대결합니다. -●10월:그만좀불러좀의 신귀병(이)가 전멸했습니다. -●10월:코토와르(이)가 기병(으)로 성벽을 공격합니다. -●10월:접속잘안함무광(이)가 건녕(으)로 진격합니다. -●10월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:운록이(이)가 무리하게 단련을 하다가 죽고말았습니다. -●10월:접속잘안함선비(이)가 건녕(으)로 진격합니다. -●10월:선비(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:선비(이)가 건녕 공략에 성공했습니다. -●10월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●10월:제갈여포의 궁기병(와)과 갸오오의 신귀병(이)가 대결합니다. -●10월:제갈여포의 궁기병(이)가 퇴각했습니다. -●10월:누군가가 교지(을)를 살피는 것 같습니다. -●11월:접속잘안함장임(이)가 운남(으)로 진격합니다. -●11월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●11월:누군가가 남만(을)를 살피는 것 같습니다. -●11월:KAITO(이)가 접속잘안함선전 포고 하였습니다. -●11월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●11월:KAITO의 등갑병(와)과 박희수의 등갑병(이)가 대결합니다. -●11월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●11월:바닥을탁치고의 흑귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●11월:에서 오늘도삼모냐(이)라는 호걸이 천하에 이름을 알립니다. -●11월:접속잘안함무광(이)가 운남(으)로 진격합니다. -●11월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●11월:무광(이)가 운남 공략에 성공했습니다. -●11월:오늘도삼모냐(이)가 어엿븐소드락임관했습니다. -●11월:여자친구(이)가 긔엽긔임관했습니다. -●11월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●11월:선비의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●11월:선비의 신귀병(이)가 퇴각했습니다. -●11월:낙양에서 금과 쌀을 도둑맞았습니다. -●11월:누군가가 남만(을)를 살피는 것 같습니다. -●12월:접속잘안함니쉬(이)가 남만(으)로 진격합니다. -●12월:니쉬의 신귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●12월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●12월:장임의 청주병(와)과 낭군의 신귀병(이)가 대결합니다. -●12월:낭군의 신귀병(이)가 전멸했습니다. -●12월:장임(이)가 청주병(으)로 성벽을 공격합니다. -●12월:접속잘안함DVa(이)가 남만(으)로 진격합니다. -●12월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●12월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●12월:바닥을탁치고의 흑귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●12월:접속잘안함진(이)가 남만(으)로 진격합니다. -●12월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●12월:접속잘안함무광(이)가 남만(으)로 진격합니다. -●12월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●12월:무광(이)가 남만 공략에 성공했습니다. -●12월:9(이)가 무리하게 단련을 하다가 죽고말았습니다. -●12월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●12월:정휘인의 신귀병(와)과 야근탈출의 기병(이)가 대결합니다. -●12월:야근탈출의 기병(이)가 전멸했습니다. -●12월:정휘인의 신귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●12월:누군가가 낙양(을)를 살피는 것 같습니다. -●12월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●12월:Navy마초의 궁기병(와)과 북오더의 궁병(이)가 대결합니다. -◆1월:192년이 되었습니다. -●1월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●1월:카이사르의 연노병(와)과 북오더의 궁병(이)가 대결합니다. -●1월:북오더의 궁병(이)가 전멸했습니다. -●1월:카이사르의 연노병(와)과 박일아의 기병(이)가 대결합니다. -●1월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●1월:장임의 청주병(와)과 Anes의 기병(이)가 대결합니다. -●1월:장임의 청주병(이)가 퇴각했습니다. -●1월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●1월:KAITO의 등갑병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●1월:바닥을탁치고의 흑귀병(와)과 Air의 맹수병(이)가 대결합니다. -●1월:바닥을탁치고의 흑귀병(이)가 퇴각했습니다. -●1월:접속잘안함무광(이)가 교지(으)로 진격합니다. -●1월:무광의 신귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●1월:잠둥이션의 귀병(이)가 전멸했습니다. -●1월:무광의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●1월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●1월:엄백호의 등갑병(와)과 Anes의 기병(이)가 대결합니다. -●1월:엄백호의 등갑병(이)가 퇴각했습니다. -●1월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●1월:정휘인의 신귀병(와)과 비밀의 신귀병(이)가 대결합니다. -●1월:비밀의 신귀병(이)가 전멸했습니다. -●1월:에서 금과 쌀을 도둑맞았습니다. -●1월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●1월:くま의 흑귀병(와)과 Air의 맹수병(이)가 대결합니다. -●1월:Air의 맹수병(이)가 전멸했습니다. -●1월:くま의 흑귀병(와)과 박일아의 기병(이)가 대결합니다. -●1월:박일아의 기병(이)가 전멸했습니다. -●1월:낙양에서 금과 쌀을 도둑맞았습니다. -●1월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●1월:Navy마초의 궁기병(와)과 쿠요의 기병(이)가 대결합니다. -●1월:앵벌스(이)가 안타깝게도 번개에 맞아 죽고 말았습니다. -●2월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●2월:카이사르의 연노병(와)과 누렁의 귀병(이)가 대결합니다. -●2월:카이사르의 연노병(이)가 퇴각했습니다. -●2월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●2월:KAITO의 등갑병(와)과 부관의 귀병(이)가 대결합니다. -●2월:접속잘안함HideD(이)가 교지(으)로 진격합니다. -●2월:HideD의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●2월:북두칠성의 등갑병(이)가 패퇴했습니다. -●2월:HideD의 신귀병(와)과 최태원의 귀병(이)가 대결합니다. -●2월:류화영(이)가 칠성검(+12)(을)를 습득했습니다! -●2월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●2월:くま의 흑귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●2월:くま의 흑귀병(이)가 퇴각했습니다. -●2월:낙양에서 금과 쌀을 도둑맞았습니다. -●3월:누군가가 교지(을)를 살피는 것 같습니다. -●3월:접속잘안함HideD(이)가 교지(으)로 진격합니다. -●3월:HideD의 신귀병(와)과 낭군의 귀병(이)가 대결합니다. -●3월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●3월:돌아온꼰대의 수렵기병(와)과 갸오오의 귀병(이)가 대결합니다. -●3월:갸오오의 귀병(이)가 전멸했습니다. -●4월:남피에서 금과 쌀을 도둑맞았습니다. -●4월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●4월:니쉬의 신귀병(와)과 북오더의 궁병(이)가 대결합니다. -●4월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●4월:코토와르의 기병(와)과 쿠요의 기병(이)가 대결합니다. -●4월:보컬로이드돌아온꼰대(이)가 교지(으)로 진격합니다. -●4월:돌아온꼰대의 수렵기병(와)과 플젠의 등갑병(이)가 대결합니다. -●4월:돌아온꼰대의 수렵기병(이)가 퇴각했습니다. -●5월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●5월:니쉬의 신귀병(와)과 비밀의 귀병(이)가 대결합니다. -●5월:니쉬의 신귀병(이)가 퇴각했습니다. -●5월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●5월:장임의 등갑병(와)과 SARS의 충차(이)가 대결합니다. -●5월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●5월:바닥을탁치고의 흑귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●5월:보컬로이드코토와르(이)가 교지(으)로 진격합니다. -●5월:코토와르의 기병(와)과 북오더의 궁병(이)가 대결합니다. -●5월:코토와르의 기병(이)가 퇴각했습니다. -●5월:접속잘안함무광(이)가 교지(으)로 진격합니다. -●5월:무광의 신귀병(와)과 부관의 귀병(이)가 대결합니다. -●5월:부관의 귀병(이)가 전멸했습니다. -●5월:무광의 신귀병(와)과 낭군의 귀병(이)가 대결합니다. -●5월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●5월:정휘인의 신귀병(와)과 최태원의 귀병(이)가 대결합니다. -●5월:낙양의 백성들이 동요하고 있습니다. -●5월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●5월:Navy마초의 궁기병(와)과 북오더의 궁병(이)가 대결합니다. -●6월:북두칠성(이)가 과하마(+9)(을)를 습득했습니다! -●6월:남피에서 금과 쌀을 도둑맞았습니다. -●6월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●6월:카이사르의 연노병(와)과 박희수의 등갑병(이)가 대결합니다. -●6월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●6월:장임의 등갑병(와)과 박희수의 등갑병(이)가 대결합니다. -●6월:누군가가 교지(을)를 살피는 것 같습니다. -●6월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●6월:KAITO의 등갑병(와)과 낭군의 귀병(이)가 대결합니다. -●6월:낭군의 귀병(이)가 전멸했습니다. -●6월:KAITO의 등갑병(와)과 누렁의 귀병(이)가 대결합니다. -●6월:누군가가 평원(을)를 살피는 것 같습니다. -●6월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●6월:바닥을탁치고의 흑귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:잠둥이션의 귀병(이)가 전멸했습니다. -●6월:바닥을탁치고의 흑귀병(와)과 최태원의 귀병(이)가 대결합니다. -●6월:접속잘안함무광(이)가 교지(으)로 진격합니다. -●6월:무광의 신귀병(와)과 북오더의 궁병(이)가 대결합니다. -●6월:북오더의 궁병(이)가 패퇴했습니다. -●6월:무광의 신귀병(와)과 비밀의 귀병(이)가 대결합니다. -●6월:비밀의 귀병(이)가 전멸했습니다. -●6월:무광의 신귀병(와)과 최태원의 귀병(이)가 대결합니다. -●6월:최태원의 귀병(이)가 전멸했습니다. -●6월:누군가가 하내(을)를 살피는 것 같습니다. -●6월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●6월:정휘인의 신귀병(와)과 여자친구의 귀병(이)가 대결합니다. -●6월:하기싫은데(이)가 두강주(사기)(을)를 습득했습니다! -●6월:낙양에서 금과 쌀을 도둑맞았습니다. -●6월:허창에서 금과 쌀을 도둑맞았습니다. -●6월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●6월:くま의 흑귀병(와)과 누렁의 귀병(이)가 대결합니다. -●6월:누렁의 귀병(이)가 전멸했습니다. -●6월:くま의 흑귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●6월:박희수의 등갑병(이)가 전멸했습니다. -●6월:くま의 흑귀병(와)과 쿠요의 기병(이)가 대결합니다. -●6월:누군가가 평원(을)를 살피는 것 같습니다. -●6월:보컬로이드Navy마초(이)가 교지(으)로 진격합니다. -●6월:Navy마초의 궁기병(와)과 쿠요의 기병(이)가 대결합니다. -●6월:쿠요의 기병(이)가 전멸했습니다. -●6월:Navy마초의 궁기병(와)과 SARS의 충차(이)가 대결합니다. -●6월:SARS의 충차(이)가 전멸했습니다. -●6월:Navy마초의 궁기병(와)과 여자친구의 귀병(이)가 대결합니다. -●6월:여자친구의 귀병(이)가 전멸했습니다. -●6월:Navy마초(이)가 궁기병(으)로 성벽을 공격합니다. -●7월:종횡무진임사영(이)가 평원(으)로 진격합니다. -●7월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:블소아소(이)가 호관(으)로 진격합니다. -●7월:아소의 호표기병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●7월:종횡무진강서유서(이)가 평원(으)로 진격합니다. -●7월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●7월:강서유서(이)가 평원 공략에 성공했습니다. -●7월:블소랜임1분장(이)가 호관(으)로 진격합니다. -●7월:랜임1분장의 호표기병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●7월:일본어번역기의 악귀병(이)가 전멸했습니다. -●7월:랜임1분장(이)가 호표기병(으)로 성벽을 공격합니다. -●7월:누군가가 호관(을)를 살피는 것 같습니다. -●7월:블소쥬비아(이)가 호관(으)로 진격합니다. -●7월:쥬비아(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●7월:카이사르의 연노병(와)과 야근탈출의 기병(이)가 대결합니다. -●7월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●7월:장임의 등갑병(와)과 플젠의 등갑병(이)가 대결합니다. -●7월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●7월:KAITO의 등갑병(와)과 SARS의 등갑병(이)가 대결합니다. -●7월:누군가가 (을)를 살피는 것 같습니다. -●7월:누군가가 남피(을)를 살피는 것 같습니다. -●7월:보컬로이드바닥을탁치고(이)가 교지(으)로 진격합니다. -●7월:바닥을탁치고의 흑귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●7월:바닥을탁치고의 흑귀병(이)가 퇴각했습니다. -●7월:블소다이스(이)가 호관(으)로 진격합니다. -●7월:다이스의 궁기병(와)과 하루카의 등갑병(이)가 대결합니다. -●7월:블소이쓰미(이)가 호관(으)로 진격합니다. -●7월:이쓰미의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●7월:보컬로이드정휘인(이)가 교지(으)로 진격합니다. -●7월:정휘인의 신귀병(와)과 플젠의 등갑병(이)가 대결합니다. -●7월:정휘인의 신귀병(이)가 퇴각했습니다. -●7월:블소전인호(이)가 호관(으)로 진격합니다. -●7월:전인호의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●7월:종횡무진카토(이)가 계교(으)로 진격합니다. -●7월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●7월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●7월:제갈여포의 궁기병(와)과 SARS의 등갑병(이)가 대결합니다. -●7월:SARS의 등갑병(이)가 전멸했습니다. -●7월:제갈여포의 궁기병(와)과 야근탈출의 기병(이)가 대결합니다. -●7월:야근탈출의 기병(이)가 전멸했습니다. -●7월:제갈여포의 궁기병(와)과 플젠의 등갑병(이)가 대결합니다. -●7월:플젠의 등갑병(이)가 전멸했습니다. -●7월:낙양에서 금과 쌀을 도둑맞았습니다. -●7월:에서 금과 쌀을 도둑맞았습니다. -●7월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●7월:くま의 흑귀병(와)과 비밀의 귀병(이)가 대결합니다. -●7월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 진리의 호표기병(이)가 대결합니다. -●7월:블소비월(이)가 호관(으)로 진격합니다. -●7월:비월의 근위병(와)과 내나의 악귀병(이)가 대결합니다. -●7월:내나의 악귀병(이)가 전멸했습니다. -●7월:블소魯堂首(이)가 호관(으)로 진격합니다. -●7월:魯堂首(이)가 근위병(으)로 성벽을 공격합니다. -●7월:종횡무진대악마(이)가 북해(으)로 진격합니다. -●7월:대악마의 돌격기병(와)과 읭읭의 호표기병(이)가 대결합니다. -●8월:종횡무진임사영(이)가 (으)로 진격합니다. -●8월:임사영의 악귀병(와)과 진리의 호표기병(이)가 대결합니다. -●8월:진리의 호표기병(이)가 전멸했습니다. -●8월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:블소아소(이)가 호관(으)로 진격합니다. -●8월:아소의 호표기병(와)과 카토의 돌격기병(이)가 대결합니다. -●8월:아소의 호표기병(이)가 퇴각했습니다. -●8월:종횡무진강서유서(이)가 북해(으)로 진격합니다. -●8월:강서유서의 연노병(와)과 읭읭의 호표기병(이)가 대결합니다. -●8월:읭읭의 호표기병(이)가 전멸했습니다. -●8월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●8월:블소랜임1분장(이)가 호관(으)로 진격합니다. -●8월:랜임1분장의 호표기병(와)과 카토의 돌격기병(이)가 대결합니다. -●8월:랜임1분장의 호표기병(이)가 퇴각했습니다. -●8월:블소니콜(이)가 호관(으)로 진격합니다. -●8월:니콜의 충차(와)과 카토의 돌격기병(이)가 대결합니다. -●8월:카토의 돌격기병(이)가 전멸했습니다. -●8월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●8월:블소쥬비아(이)가 호관(으)로 진격합니다. -●8월:쥬비아(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●8월:장임의 등갑병(와)과 박일아의 기병(이)가 대결합니다. -●8월:장임의 등갑병(이)가 퇴각했습니다. -●8월:보컬로이드KAITO(이)가 교지(으)로 진격합니다. -●8월:KAITO의 등갑병(와)과 Anes의 기병(이)가 대결합니다. -●8월:KAITO의 등갑병(이)가 퇴각했습니다. -●8월:누군가가 낙양(을)를 살피는 것 같습니다. -●8월:블소다이스(이)가 호관(으)로 진격합니다. -●8월:다이스의 궁기병(와)과 하루카의 등갑병(이)가 대결합니다. -●8월:블소이쓰미(이)가 호관(으)로 진격합니다. -●8월:이쓰미의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●8월:하루카의 등갑병(이)가 전멸했습니다. -●8월:이쓰미(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:이쓰미의 마귀병(이)가 퇴각했습니다. -●8월:블소전인호(이)가 호관(으)로 진격합니다. -●8월:전인호(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함선비(이)가 교지(으)로 진격합니다. -●8월:선비의 신귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●8월:북두칠성의 등갑병(이)가 패퇴했습니다. -●8월:선비의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●8월:보컬로이드제갈여포(이)가 교지(으)로 진격합니다. -●8월:제갈여포의 궁기병(와)과 갸오오의 귀병(이)가 대결합니다. -●8월:갸오오의 귀병(이)가 전멸했습니다. -●8월:제갈여포의 궁기병(와)과 최태원의 귀병(이)가 대결합니다. -●8월:보컬로이드くま(이)가 교지(으)로 진격합니다. -●8월:くま의 흑귀병(와)과 정력왕의 귀병(이)가 대결합니다. -●8월:정력왕의 귀병(이)가 전멸했습니다. -●8월:くま의 흑귀병(와)과 박일아의 기병(이)가 대결합니다. -●8월:くま의 흑귀병(이)가 퇴각했습니다. -●8월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●8월:평민킬러의 연노병(와)과 진리의 호표기병(이)가 대결합니다. -●8월:진리의 호표기병(이)가 전멸했습니다. -●8월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●8월:낙양에서 금과 쌀을 도둑맞았습니다. -●8월:블소비월(이)가 호관(으)로 진격합니다. -●8월:비월의 근위병(와)과 카토의 돌격기병(이)가 대결합니다. -●8월:비월의 근위병(이)가 퇴각했습니다. -●8월:블소魯堂首(이)가 호관(으)로 진격합니다. -●8월:魯堂首의 근위병(와)과 카토의 돌격기병(이)가 대결합니다. -●8월:카토의 돌격기병(이)가 전멸했습니다. -●8월:魯堂首의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:종횡무진대악마(이)가 북해(으)로 진격합니다. -●8월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●8월:대악마(이)가 북해 공략에 성공했습니다. -●9월:종횡무진임사영(이)가 (으)로 진격합니다. -●9월:임사영의 악귀병(와)과 ⓜ하후공의 귀병(이)가 대결합니다. -●9월:임사영의 악귀병(이)가 퇴각했습니다. -●9월:종횡무진강서유서(이)가 (으)로 진격합니다. -●9월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●9월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●9월:니쉬의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●9월:박일아의 기병(이)가 패퇴했습니다. -●9월:니쉬의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●9월:블소니콜(이)가 호관(으)로 진격합니다. -●9월:니콜의 충차(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●9월:니콜의 충차(이)가 퇴각했습니다. -●9월:누군가가 교지(을)를 살피는 것 같습니다. -●9월:누군가가 교지(을)를 살피는 것 같습니다. -●9월:블소카이스트(이)가 호관(으)로 진격합니다. -●9월:카이스트의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●9월:보컬로이드엄백호(이)가 교지(으)로 진격합니다. -●9월:엄백호의 등갑병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●9월:잠둥이션의 귀병(이)가 전멸했습니다. -●9월:엄백호의 등갑병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●9월:접속잘안함선비(이)가 교지(으)로 진격합니다. -●9월:선비의 신귀병(와)과 Anes의 기병(이)가 대결합니다. -●9월:Anes의 기병(이)가 패퇴했습니다. -●9월:선비의 신귀병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●9월:선비의 신귀병(이)가 퇴각했습니다. -●9월:에서 금과 쌀을 도둑맞았습니다. -●9월:종횡무진대악마(이)가 (으)로 진격합니다. -●9월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●9월:대악마(이)가 공략에 성공했습니다. -●10월:종횡무진강서유서(이)가 정도(으)로 진격합니다. -●10월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●10월:강서유서의 연노병(이)가 퇴각했습니다. -●10월:남피에서 금과 쌀을 도둑맞았습니다. -●10월:접속잘안함니쉬(이)가 교지(으)로 진격합니다. -●10월:니쉬의 신귀병(와)과 쿠요의 기병(이)가 대결합니다. -●10월:니쉬의 신귀병(이)가 퇴각했습니다. -●10월:접속잘안함카이사르(이)가 교지(으)로 진격합니다. -●10월:카이사르의 연노병(와)과 그만좀불러좀의 귀병(이)가 대결합니다. -●10월:그만좀불러좀의 귀병(이)가 전멸했습니다. -●10월:카이사르의 연노병(와)과 쿠요의 기병(이)가 대결합니다. -●10월:쿠요의 기병(이)가 전멸했습니다. -●10월:카이사르(이)가 연노병(으)로 성벽을 공격합니다. -●10월:접속잘안함장임(이)가 교지(으)로 진격합니다. -●10월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:접속잘안함DVa(이)가 교지(으)로 진격합니다. -●10월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●10월:DVa(이)가 교지 공략에 성공했습니다. -●10월:누군가가 낙양(을)를 살피는 것 같습니다. -●10월:블소카이스트(이)가 호관(으)로 진격합니다. -●10월:카이스트의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●10월:블소ⓜ하후공(이)가 호관(으)로 진격합니다. -●10월:ⓜ하후공의 귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●10월:ⓜ하후공의 귀병(이)가 퇴각했습니다. -●11월:플젠(이)가 블소임관했습니다. -●11월:ⓜ능환(이)가 보컬로이드임관했습니다. -●11월:SARS(이)가 종횡무진임관했습니다. -●11월:낭군(이)가 블소임관했습니다. -●11월:갸오오(이)가 블소임관했습니다. -●11월:비밀(이)가 블소(으)로 망명하였습니다. -●11월:박희수(이)가 보컬로이드임관했습니다. -●11월:에서 금과 쌀을 도둑맞았습니다. -●11월:북오더(이)가 블소임관했습니다. -●11월:박일아(이)가 종횡무진임관했습니다. -●11월:잠둥이션(이)가 종횡무진임관했습니다. -●11월:ⓜ손습(이)가 보컬로이드임관했습니다. -●12월:블소아소(이)가 호관(으)로 진격합니다. -●12월:아소의 호표기병(와)과 카토의 중장기병(이)가 대결합니다. -●12월:Anes(이)가 블소임관했습니다. -●12월:감정(이)가 육도(계략)(을)를 습득했습니다! -●12월:감정(이)가 접속잘안함임관했습니다. -●12월:블소랜임1분장(이)가 호관(으)로 진격합니다. -●12월:랜임1분장의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:랜임1분장의 호표기병(이)가 퇴각했습니다. -●12월:블소쥬비아(이)가 호관(으)로 진격합니다. -●12월:쥬비아의 마귀병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●12월:블소진리(이)가 남피(으)로 진격합니다. -●12월:진리의 호표기병(와)과 임사영의 악귀병(이)가 대결합니다. -●12월:최태원(이)가 보컬로이드임관했습니다. -●12월:블소다이스(이)가 호관(으)로 진격합니다. -●12월:다이스의 궁기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:블소전인호(이)가 호관(으)로 진격합니다. -●12월:전인호의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●12월:그만좀불러좀(이)가 접속잘안함(으)로 망명하였습니다. -●12월:쿠요(이)가 어엿븐소드락임관했습니다. -●12월:블소魯堂首(이)가 호관(으)로 진격합니다. -●12월:魯堂首의 근위병(와)과 카토의 중장기병(이)가 대결합니다. -●12월:종횡무진내나(이)가 (으)로 진격합니다. -●12월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●12월:내나의 악귀병(이)가 퇴각했습니다. -◆1월:193년이 되었습니다. -●1월:종횡무진임사영(이)가 (으)로 진격합니다. -●1월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:임사영의 악귀병(이)가 퇴각했습니다. -●1월:ⓜ동공(이)가 어엿븐소드락임관했습니다. -●1월:블소아소(이)가 호관(으)로 진격합니다. -●1월:아소의 호표기병(와)과 카토의 중장기병(이)가 대결합니다. -●1월:아소의 호표기병(이)가 퇴각했습니다. -●1월:남피에서 금과 쌀을 도둑맞았습니다. -●1월:북두칠성(이)가 블소(으)로 망명하였습니다. -●1월:블소니콜(이)가 평원(으)로 진격합니다. -●1월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●1월:니콜(이)가 평원 공략에 성공했습니다. -●1월:블소쥬비아(이)가 호관(으)로 진격합니다. -●1월:쥬비아의 마귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:쥬비아의 마귀병(이)가 퇴각했습니다. -●1월:누군가가 낙양(을)를 살피는 것 같습니다. -●1월:블소진리(이)가 남피(으)로 진격합니다. -●1월:진리의 호표기병(와)과 대악마의 돌격기병(이)가 대결합니다. -●1월:진리의 호표기병(이)가 퇴각했습니다. -●1월:계림에서 태극권(이)라는 호걸이 천하에 이름을 알립니다. -●1월:블소다이스(이)가 호관(으)로 진격합니다. -●1월:다이스의 궁기병(와)과 하루카의 등갑병(이)가 대결합니다. -●1월:다이스의 궁기병(이)가 퇴각했습니다. -●1월:블소이쓰미(이)가 호관(으)로 진격합니다. -●1월:이쓰미의 마귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:블소전인호(이)가 호관(으)로 진격합니다. -●1월:전인호의 마귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:전인호의 마귀병(이)가 퇴각했습니다. -●1월:낙양에서 금과 쌀을 도둑맞았습니다. -●1월:태극권(이)가 블소임관했습니다. -●1월:종횡무진대악마(이)가 평원(으)로 진격합니다. -●1월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●2월:블소플젠(이)가 호관(으)로 진격합니다. -●2월:플젠의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●2월:플젠의 등갑병(이)가 퇴각했습니다. -●2월:블소니콜(이)가 북해(으)로 진격합니다. -●2월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●2월:니콜(이)가 북해 공략에 성공했습니다. -●2월:누군가가 (을)를 살피는 것 같습니다. -●2월:블소카이스트(이)가 호관(으)로 진격합니다. -●2월:카이스트의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●2월:블소이쓰미(이)가 호관(으)로 진격합니다. -●2월:이쓰미의 마귀병(와)과 카토의 중장기병(이)가 대결합니다. -●2월:이쓰미의 마귀병(이)가 퇴각했습니다. -●2월:검임(이)가 접속잘안함(으)로 망명하였습니다. -●2월:에서 금과 쌀을 도둑맞았습니다. -●2월:신야에서 이루나(이)라는 호걸이 천하에 이름을 알립니다. -●2월:낙양에서 금과 쌀을 도둑맞았습니다. -●2월:누군가가 호관(을)를 살피는 것 같습니다. -●2월:블소魯堂首(이)가 호관(으)로 진격합니다. -●2월:魯堂首의 근위병(와)과 하루카의 등갑병(이)가 대결합니다. -●2월:橙(이)가 과하마(+9)(을)를 습득했습니다! -●2월:橙(이)가 보컬로이드임관했습니다. -●2월:종횡무진대악마(이)가 평원(으)로 진격합니다. -●2월:대악마의 돌격기병(와)과 비월의 근위병(이)가 대결합니다. -●3월:이루나(이)가 보컬로이드임관했습니다. -●3월:블소니콜(이)가 (으)로 진격합니다. -●3월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●3월:니콜(이)가 공략에 성공했습니다. -●3월:블소카이스트(이)가 호관(으)로 진격합니다. -●3월:카이스트의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●3월:카이스트의 마귀병(이)가 퇴각했습니다. -●3월:블소갸오오(이)가 호관(으)로 진격합니다. -●3월:갸오오의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●3월:갸오오의 마귀병(이)가 퇴각했습니다. -●3월:낙양에서 금과 쌀을 도둑맞았습니다. -●3월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●3월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●3월:종횡무진박일아(이)가 평원(으)로 진격합니다. -●3월:박일아(이)가 돌격기병(으)로 성벽을 공격합니다. -●3월:박일아(이)가 평원 공략에 성공했습니다. -●3월:누군가가 남피(을)를 살피는 것 같습니다. -●3월:종횡무진잠둥이션(이)가 (으)로 진격합니다. -●3월:잠둥이션의 악귀병(와)과 ⓜ하후공의 남귀병(이)가 대결합니다. -●4월:정력왕(이)가 블소임관했습니다. -●4월:남피에서 금과 쌀을 도둑맞았습니다. -●4월:종횡무진SARS(이)가 계교(으)로 진격합니다. -●4월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●4월:누군가가 낙양(을)를 살피는 것 같습니다. -●4월:종횡무진카토(이)가 계교(으)로 진격합니다. -●4월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●4월:평민킬러의 연노병(와)과 ⓜ하후공의 남귀병(이)가 대결합니다. -●4월:ⓜ하후공의 남귀병(이)가 전멸했습니다. -●4월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●4월:종횡무진박일아(이)가 계교(으)로 진격합니다. -●4월:박일아의 돌격기병(와)과 랜임1분장의 호표기병(이)가 대결합니다. -●4월:류화영(이)가 접속잘안함(으)로 망명하였습니다. -●5월:종횡무진임사영(이)가 (으)로 진격합니다. -●5월:임사영의 악귀병(와)과 전인호의 마귀병(이)가 대결합니다. -●5월:블소아소(이)가 호관(으)로 진격합니다. -●5월:아소의 호표기병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:누군가가 평원(을)를 살피는 것 같습니다. -●5월:종횡무진SARS(이)가 백랑(으)로 진격합니다. -●5월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●5월:SARS(이)가 백랑 공략에 성공했습니다. -●5월:블소진리(이)가 호관(으)로 진격합니다. -●5월:진리의 백마병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●5월:블소낭군(이)가 호관(으)로 진격합니다. -●5월:낭군의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●5월:블소다이스(이)가 호관(으)로 진격합니다. -●5월:다이스의 궁기병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:블소전인호(이)가 호관(으)로 진격합니다. -●5월:전인호의 마귀병(와)과 카토의 중장기병(이)가 대결합니다. -●5월:전인호의 마귀병(이)가 퇴각했습니다. -●5월:블소북오더(이)가 평원(으)로 진격합니다. -●5월:북오더의 궁기병(와)과 박일아의 돌격기병(이)가 대결합니다. -●5월:박일아의 돌격기병(이)가 전멸했습니다. -●5월:북오더(이)가 궁기병(으)로 성벽을 공격합니다. -●5월:블소읭읭(이)가 호관(으)로 진격합니다. -●5월:읭읭의 호표기병(와)과 카토의 중장기병(이)가 대결합니다. -●6월:Air(이)가 보컬로이드임관했습니다. -●6월:종횡무진임사영(이)가 (으)로 진격합니다. -●6월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:블소아소(이)가 호관(으)로 진격합니다. -●6월:아소의 호표기병(와)과 대악마의 돌격기병(이)가 대결합니다. -●6월:아소의 호표기병(이)가 퇴각했습니다. -●6월:누군가가 (을)를 살피는 것 같습니다. -●6월:블소북두칠성(이)가 호관(으)로 진격합니다. -●6월:북두칠성의 근위병(와)과 대악마의 돌격기병(이)가 대결합니다. -●6월:북두칠성의 근위병(이)가 퇴각했습니다. -●6월:블소플젠(이)가 호관(으)로 진격합니다. -●6월:플젠의 근위병(와)과 대악마의 돌격기병(이)가 대결합니다. -●6월:블소랜임1분장(이)가 평원(으)로 진격합니다. -●6월:랜임1분장(이)가 호표기병(으)로 성벽을 공격합니다. -●6월:랜임1분장의 호표기병(이)가 퇴각했습니다. -●6월:누군가가 호관(을)를 살피는 것 같습니다. -●6월:블소쥬비아(이)가 호관(으)로 진격합니다. -●6월:쥬비아의 마귀병(와)과 대악마의 돌격기병(이)가 대결합니다. -●6월:쥬비아의 마귀병(이)가 퇴각했습니다. -●6월:종횡무진SARS(이)가 오환(으)로 진격합니다. -●6월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●6월:SARS(이)가 오환 공략에 성공했습니다. -●6월:블소낭군(이)가 호관(으)로 진격합니다. -●6월:낭군의 마귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●6월:강서유서의 연노병(이)가 전멸했습니다. -●6월:낭군의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●6월:낭군의 마귀병(이)가 퇴각했습니다. -●6월:블소다이스(이)가 호관(으)로 진격합니다. -●6월:다이스의 궁기병(와)과 내나의 악귀병(이)가 대결합니다. -●6월:내나의 악귀병(이)가 전멸했습니다. -●6월:다이스의 궁기병(와)과 대악마의 돌격기병(이)가 대결합니다. -●6월:대악마의 돌격기병(이)가 전멸했습니다. -●6월:다이스(이)가 궁기병(으)로 성벽을 공격합니다. -●6월:다이스의 궁기병(이)가 퇴각했습니다. -●6월:하기싫은데(이)가 보컬로이드임관했습니다. -●6월:낙양의 백성들이 동요하고 있습니다. -●6월:낙양에서 금과 쌀을 도둑맞았습니다. -●6월:블소비월(이)가 평원(으)로 진격합니다. -●6월:비월(이)가 근위병(으)로 성벽을 공격합니다. -●6월:비월(이)가 평원 공략에 성공했습니다. -●6월:블소魯堂首(이)가 호관(으)로 진격합니다. -●6월:魯堂首의 근위병(와)과 하루카의 등갑병(이)가 대결합니다. -●6월:블소읭읭(이)가 호관(으)로 진격합니다. -●6월:읭읭의 호표기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●6월:읭읭의 호표기병(이)가 퇴각했습니다. -●6월:내나(이)가 한서(+7)(을)를 습득했습니다! -●7월:종횡무진임사영(이)가 평원(으)로 진격합니다. -●7월:임사영의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●7월:임사영의 악귀병(이)가 퇴각했습니다. -●7월:블소플젠(이)가 호관(으)로 진격합니다. -●7월:플젠의 근위병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●7월:플젠의 근위병(이)가 퇴각했습니다. -●7월:신야에서 랜임2분장(이)라는 호걸이 천하에 이름을 알립니다. -●7월:누군가가 낙양(을)를 살피는 것 같습니다. -●7월:블소카이스트(이)가 호관(으)로 진격합니다. -●7월:카이스트의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●7월:잠둥이션의 악귀병(이)가 전멸했습니다. -●7월:카이스트(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:에서 오티누스(이)라는 호걸이 천하에 이름을 알립니다. -●7월:블소이쓰미(이)가 호관(으)로 진격합니다. -●7월:이쓰미(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:종횡무진하루카(이)가 평원(으)로 진격합니다. -●7월:하루카의 등갑병(와)과 비월의 근위병(이)가 대결합니다. -●7월:비월의 근위병(이)가 전멸했습니다. -●7월:하루카(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:블소갸오오(이)가 호관(으)로 진격합니다. -●7월:갸오오의 백귀병(와)과 카토의 중장기병(이)가 대결합니다. -●7월:갸오오의 백귀병(이)가 퇴각했습니다. -●7월:누군가가 서주(을)를 살피는 것 같습니다. -●7월:블소비밀(이)가 남피(으)로 진격합니다. -●7월:비밀의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●7월:하루카의 등갑병(이)가 전멸했습니다. -●7월:비밀(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:블소북오더(이)가 호관(으)로 진격합니다. -●7월:북오더(이)가 궁기병(으)로 성벽을 공격합니다. -●7월:블소魯堂首(이)가 호관(으)로 진격합니다. -●7월:魯堂首의 근위병(와)과 박일아의 돌격기병(이)가 대결합니다. -●7월:魯堂首의 근위병(이)가 퇴각했습니다. -●8월:랜임2분장(이)가 블소임관했습니다. -●8월:블소Anes(이)가 호관(으)로 진격합니다. -●8월:Anes의 호표기병(와)과 카토의 중장기병(이)가 대결합니다. -●8월:카토의 중장기병(이)가 전멸했습니다. -●8월:Anes(이)가 호표기병(으)로 성벽을 공격합니다. -●8월:남피에서 금과 쌀을 도둑맞았습니다. -●8월:계림에서 미이잉구경(이)라는 호걸이 천하에 이름을 알립니다. -●8월:블소카이스트(이)가 호관(으)로 진격합니다. -●8월:카이스트(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:블소이쓰미(이)가 호관(으)로 진격합니다. -●8월:이쓰미의 마귀병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●8월:이쓰미의 마귀병(이)가 퇴각했습니다. -●8월:블소비밀(이)가 남피(으)로 진격합니다. -●8월:비밀의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:비밀의 마귀병(이)가 퇴각했습니다. -●8월:블소북오더(이)가 호관(으)로 진격합니다. -●8월:북오더의 궁기병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●8월:북오더의 궁기병(이)가 퇴각했습니다. -●8월:종횡무진평민킬러(이)가 평원(으)로 진격합니다. -●8월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●8월:평민킬러(이)가 평원 공략에 성공했습니다. -●8월:낙양에서 금과 쌀을 도둑맞았습니다. -●8월:종횡무진박일아(이)가 계교(으)로 진격합니다. -●8월:박일아의 돌격기병(와)과 랜임1분장의 호표기병(이)가 대결합니다. -●8월:랜임1분장의 호표기병(이)가 전멸했습니다. -●8월:종횡무진대악마(이)가 계교(으)로 진격합니다. -●8월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●8월:대악마(이)가 계교 공략에 성공했습니다. -●9월:남피에서 금과 쌀을 도둑맞았습니다. -●9월:블소니콜(이)가 백랑(으)로 진격합니다. -●9월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●9월:누군가가 (을)를 살피는 것 같습니다. -●9월:블소진리(이)가 호관(으)로 진격합니다. -●9월:진리의 백마병(와)과 강서유서의 연노병(이)가 대결합니다. -●9월:낙양에서 금과 쌀을 도둑맞았습니다. -●9월:종횡무진평민킬러(이)가 복양(으)로 진격합니다. -●9월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●9월:평민킬러(이)가 복양 공략에 성공했습니다. -●9월:낙양에서 금과 쌀을 도둑맞았습니다. -●9월:에서 구경학개론(이)라는 호걸이 천하에 이름을 알립니다. -●10월:누군가가 계교(을)를 살피는 것 같습니다. -●10월:블소아소(이)가 호관(으)로 진격합니다. -●10월:아소의 호표기병(와)과 강서유서의 연노병(이)가 대결합니다. -●10월:누군가가 허창(을)를 살피는 것 같습니다. -●10월:블소니콜(이)가 백랑(으)로 진격합니다. -●10월:니콜의 충차(와)과 내나의 악귀병(이)가 대결합니다. -●10월:니콜의 충차(이)가 퇴각했습니다. -●10월:블소진리(이)가 호관(으)로 진격합니다. -●10월:진리의 백마병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●10월:진리의 백마병(이)가 퇴각했습니다. -●10월:블소낭군(이)가 남피(으)로 진격합니다. -●10월:낭군의 마귀병(와)과 임사영의 악귀병(이)가 대결합니다. -●10월:블소다이스(이)가 호관(으)로 진격합니다. -●10월:다이스의 궁기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●10월:블소전인호(이)가 평원(으)로 진격합니다. -●10월:전인호의 마귀병(와)과 박일아의 철기병(이)가 대결합니다. -●10월:낙양에서 금과 쌀을 도둑맞았습니다. -●10월:낙양에서 금과 쌀을 도둑맞았습니다. -●10월:종횡무진평민킬러(이)가 진류(으)로 진격합니다. -●10월:병량 부족으로 진류의 수비병들이 패퇴합니다. -●10월:평민킬러(이)가 진류 공략에 성공했습니다. -●10월:여자친구(이)가 접속잘안함(으)로 망명하였습니다. -●10월:블소읭읭(이)가 호관(으)로 진격합니다. -●10월:읭읭의 호표기병(와)과 카토의 돌격기병(이)가 대결합니다. -●10월:종횡무진대악마(이)가 정도(으)로 진격합니다. -●10월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●11월:블소아소(이)가 호관(으)로 진격합니다. -●11월:아소의 호표기병(와)과 내나의 악귀병(이)가 대결합니다. -●11월:아소의 호표기병(이)가 퇴각했습니다. -●11월:종횡무진강서유서(이)가 허창(으)로 진격합니다. -●11월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●11월:강서유서의 연노병(이)가 퇴각했습니다. -●11월:블소북두칠성(이)가 호관(으)로 진격합니다. -●11월:북두칠성의 근위병(와)과 내나의 악귀병(이)가 대결합니다. -●11월:북두칠성의 근위병(이)가 퇴각했습니다. -●11월:블소플젠(이)가 호관(으)로 진격합니다. -●11월:플젠의 근위병(와)과 내나의 악귀병(이)가 대결합니다. -●11월:내나의 악귀병(이)가 전멸했습니다. -●11월:플젠의 근위병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●11월:잠둥이션의 악귀병(이)가 전멸했습니다. -●11월:플젠(이)가 근위병(으)로 성벽을 공격합니다. -●11월:누군가가 교지(을)를 살피는 것 같습니다. -●11월:접속잘안함DVa(이)가 여강(으)로 진격합니다. -●11월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●11월:DVa(이)가 여강 공략에 성공했습니다. -●11월:보컬로이드바닥을탁치고(이)가 남만(으)로 진격합니다. -●11월:바닥을탁치고의 흑귀병(와)과 카이사르의 연노병(이)가 대결합니다. -●11월:보컬로이드코토와르(이)가 남만(으)로 진격합니다. -●11월:코토와르의 수렵기병(와)과 카이사르의 연노병(이)가 대결합니다. -●11월:카이사르의 연노병(이)가 전멸했습니다. -●11월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●11월:하변에서 카가미네렌(이)라는 호걸이 천하에 이름을 알립니다. -●11월:블소낭군(이)가 계교(으)로 진격합니다. -●11월:낭군(이)가 마귀병(으)로 성벽을 공격합니다. -●11월:낭군의 마귀병(이)가 퇴각했습니다. -●11월:보컬로이드엄백호(이)가 남만(으)로 진격합니다. -●11월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:블소전인호(이)가 평원(으)로 진격합니다. -●11월:전인호의 마귀병(와)과 박일아의 철기병(이)가 대결합니다. -●11월:박일아의 철기병(이)가 전멸했습니다. -●11월:전인호(이)가 마귀병(으)로 성벽을 공격합니다. -●11월:누군가가 북해(을)를 살피는 것 같습니다. -●11월:보컬로이드제갈여포(이)가 남만(으)로 진격합니다. -●11월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●11월:제갈여포(이)가 남만 공략에 성공했습니다. -●11월:낙양에서 금과 쌀을 도둑맞았습니다. -●11월:종횡무진평민킬러(이)가 허창(으)로 진격합니다. -●11월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●11월:평민킬러의 연노병(이)가 퇴각했습니다. -●11월:낙양에서 금과 쌀을 도둑맞았습니다. -●11월:블소魯堂首(이)가 호관(으)로 진격합니다. -●11월:魯堂首의 근위병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●11월:블소읭읭(이)가 호관(으)로 진격합니다. -●11월:읭읭의 호표기병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●11월:일본어번역기의 악귀병(이)가 전멸했습니다. -●11월:읭읭(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:종횡무진대악마(이)가 허창(으)로 진격합니다. -●11월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●12월:종횡무진임사영(이)가 (으)로 진격합니다. -●12월:임사영의 악귀병(와)과 狂三의 마귀병(이)가 대결합니다. -●12월:임사영의 악귀병(이)가 퇴각했습니다. -●12월:야근탈출(이)가 보컬로이드임관했습니다. -●12월:블소플젠(이)가 호관(으)로 진격합니다. -●12월:플젠의 근위병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●12월:누군가가 평원(을)를 살피는 것 같습니다. -●12월:종횡무진SARS(이)가 허창(으)로 진격합니다. -●12월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●12월:누군가가 (을)를 살피는 것 같습니다. -●12월:블소카이스트(이)가 호관(으)로 진격합니다. -●12월:카이스트의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●12월:잠둥이션의 악귀병(이)가 전멸했습니다. -●12월:카이스트(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드코토와르(이)가 운남(으)로 진격합니다. -●12월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●12월:카가미네렌(이)가 보컬로이드임관했습니다. -●12월:누군가가 (을)를 살피는 것 같습니다. -●12월:블소이쓰미(이)가 평원(으)로 진격합니다. -●12월:이쓰미의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●12월:블소전인호(이)가 평원(으)로 진격합니다. -●12월:전인호의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●12월:전인호의 마귀병(이)가 퇴각했습니다. -●12월:누군가가 허창(을)를 살피는 것 같습니다. -●12월:종횡무진카토(이)가 허창(으)로 진격합니다. -●12월:카토(이)가 돌격기병(으)로 성벽을 공격합니다. -●12월:보컬로이드제갈여포(이)가 운남(으)로 진격합니다. -●12월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●12월:제갈여포(이)가 운남 공략에 성공했습니다. -●12월:블소북오더(이)가 호관(으)로 진격합니다. -●12월:북오더(이)가 궁기병(으)로 성벽을 공격합니다. -●12월:블소ⓜ하후공(이)가 평원(으)로 진격합니다. -●12월:ⓜ하후공의 백귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●12월:블소비월(이)가 평원(으)로 진격합니다. -●12월:비월의 근위병(와)과 박일아의 철기병(이)가 대결합니다. -●12월:블소魯堂首(이)가 남피(으)로 진격합니다. -●12월:魯堂首(이)가 근위병(으)로 성벽을 공격합니다. -●12월:블소狂三(이)가 남피(으)로 진격합니다. -●12월:狂三의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -◆1월:194년이 되었습니다. -●1월:블소Anes(이)가 남피(으)로 진격합니다. -●1월:Anes의 호표기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●1월:잠둥이션의 악귀병(이)가 전멸했습니다. -●1월:Anes(이)가 호표기병(으)로 성벽을 공격합니다. -●1월:보컬로이드ⓜ능환(이)가 여강(으)로 진격합니다. -●1월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●1월:리안(이)가 황제를 모독하다가 처형당하고 말았습니다. -●1월:종횡무진SARS(이)가 허창(으)로 진격합니다. -●1월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●1월:미이잉구경(이)가 안타깝게도 번개에 맞아 죽고 말았습니다. -●1월:오티누스(이)가 농약을 술인줄 알고 마셔 죽고말았습니다. -●1월:블소카이스트(이)가 호관(으)로 진격합니다. -●1월:카이스트(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:블소이쓰미(이)가 평원(으)로 진격합니다. -●1월:이쓰미의 마귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●1월:이쓰미의 마귀병(이)가 퇴각했습니다. -●1월:보컬로이드제갈여포(이)가 건녕(으)로 진격합니다. -●1월:제갈여포(이)가 궁기병(으)로 성벽을 공격합니다. -●1월:낙양의 백성들이 동요하고 있습니다. -●1월:블소비밀(이)가 남피(으)로 진격합니다. -●1월:비밀의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:블소북오더(이)가 호관(으)로 진격합니다. -●1월:북오더(이)가 궁기병(으)로 성벽을 공격합니다. -●1월:블소ⓜ하후공(이)가 평원(으)로 진격합니다. -●1월:ⓜ하후공의 백귀병(와)과 박일아의 철기병(이)가 대결합니다. -●1월:ⓜ하후공의 백귀병(이)가 퇴각했습니다. -●1월:블소비월(이)가 평원(으)로 진격합니다. -●1월:비월의 근위병(와)과 대악마의 돌격기병(이)가 대결합니다. -●1월:비월의 근위병(이)가 퇴각했습니다. -●1월:블소狂三(이)가 남피(으)로 진격합니다. -●1월:狂三의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:狂三의 마귀병(이)가 퇴각했습니다. -●2월:블소Anes(이)가 호관(으)로 진격합니다. -●2월:Anes의 호표기병(와)과 카토의 중장기병(이)가 대결합니다. -●2월:Anes의 호표기병(이)가 퇴각했습니다. -●2월:종횡무진SARS(이)가 허창(으)로 진격합니다. -●2월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●2월:SARS(이)가 허창 공략에 성공했습니다. -●2월:블소진리(이)가 호관(으)로 진격합니다. -●2월:진리의 백마병(와)과 카토의 중장기병(이)가 대결합니다. -●2월:카토의 중장기병(이)가 전멸했습니다. -●2월:진리(이)가 백마병(으)로 성벽을 공격합니다. -●2월:보컬로이드엄백호(이)가 건녕(으)로 진격합니다. -●2월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●2월:엄백호(이)가 건녕 공략에 성공했습니다. -●2월:누군가가 정도(을)를 살피는 것 같습니다. -●2월:블소갸오오(이)가 호관(으)로 진격합니다. -●2월:갸오오의 마귀병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●2월:블소비밀(이)가 남피(으)로 진격합니다. -●2월:비밀의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●2월:비밀의 마귀병(이)가 퇴각했습니다. -●2월:에서 금과 쌀을 도둑맞았습니다. -●2월:블소북오더(이)가 호관(으)로 진격합니다. -●2월:북오더의 궁기병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●2월:일본어번역기의 악귀병(이)가 전멸했습니다. -●2월:북오더(이)가 궁기병(으)로 성벽을 공격합니다. -●2월:북오더의 궁기병(이)가 퇴각했습니다. -●2월:낙양에서 금과 쌀을 도둑맞았습니다. -●2월:종횡무진내나(이)가 (으)로 진격합니다. -●2월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:종횡무진대악마(이)가 북해(으)로 진격합니다. -●2월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●3월:종횡무진강서유서(이)가 (으)로 진격합니다. -●3월:강서유서의 연노병(와)과 카이스트의 마귀병(이)가 대결합니다. -●3월:블소북두칠성(이)가 남피(으)로 진격합니다. -●3월:북두칠성의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:감정(이)가 ⓜ이지(이)라는 인재를 영입하였습니다! -●3월:누군가가 (을)를 살피는 것 같습니다. -●3월:블소진리(이)가 허창(으)로 진격합니다. -●3월:진리의 백마병(와)과 강서유서의 연노병(이)가 대결합니다. -●3월:진리의 백마병(이)가 퇴각했습니다. -●3월:누군가가 (을)를 살피는 것 같습니다. -●3월:블소다이스(이)가 남피(으)로 진격합니다. -●3월:다이스의 궁기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●3월:구경학개론(이)가 독살을 준비하다 독에 걸려 죽고 말았습니다. -●3월:에서 금과 쌀을 도둑맞았습니다. -●3월:블소읭읭(이)가 남피(으)로 진격합니다. -●3월:읭읭의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:종횡무진내나(이)가 (으)로 진격합니다. -●3월:내나의 악귀병(와)과 플젠의 근위병(이)가 대결합니다. -●3월:종횡무진대악마(이)가 북해(으)로 진격합니다. -●3월:대악마(이)가 돌격기병(으)로 성벽을 공격합니다. -●3월:대악마(이)가 북해 공략에 성공했습니다. -●4월:종횡무진임사영(이)가 (으)로 진격합니다. -●4월:임사영의 악귀병(와)과 魯堂首의 근위병(이)가 대결합니다. -●4월:블소아소(이)가 남피(으)로 진격합니다. -●4월:아소의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●4월:평민킬러의 연노병(이)가 전멸했습니다. -●4월:아소의 호표기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●4월:누군가가 수춘(을)를 살피는 것 같습니다. -●4월:블소다이스(이)가 남피(으)로 진격합니다. -●4월:다이스의 궁기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●4월:잠둥이션의 악귀병(이)가 전멸했습니다. -●4월:다이스(이)가 궁기병(으)로 성벽을 공격합니다. -●4월:다이스의 궁기병(이)가 퇴각했습니다. -●4월:종횡무진하루카(이)가 (으)로 진격합니다. -●4월:하루카의 등갑병(와)과 갸오오의 마귀병(이)가 대결합니다. -●4월:갸오오의 마귀병(이)가 전멸했습니다. -●4월:하루카의 등갑병(와)과 플젠의 근위병(이)가 대결합니다. -●4월:무릉에서 1(이)라는 기재가 천하에 이름을 알립니다. -●4월:저격 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다. -●4월:에서 금과 쌀을 도둑맞았습니다. -●5월:종횡무진하루카(이)가 (으)로 진격합니다. -●5월:하루카의 등갑병(와)과 비월의 근위병(이)가 대결합니다. -●5월:종횡무진카토(이)가 정도(으)로 진격합니다. -●5월:병량 부족으로 정도의 수비병들이 패퇴합니다. -●5월:카토(이)가 정도 공략에 성공했습니다. -●5월:블소魯堂首(이)가 허창(으)로 진격합니다. -●5월:魯堂首의 근위병(와)과 하루카의 등갑병(이)가 대결합니다. -●5월:魯堂首의 근위병(이)가 퇴각했습니다. -●6월:종횡무진SARS(이)가 동황(으)로 진격합니다. -●6월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●6월:SARS(이)가 동황 공략에 성공했습니다. -●6월:종횡무진하루카(이)가 (으)로 진격합니다. -●6월:하루카의 등갑병(와)과 북오더의 궁기병(이)가 대결합니다. -●6월:북오더의 궁기병(이)가 패퇴했습니다. -●6월:하루카의 등갑병(와)과 카이스트의 마귀병(이)가 대결합니다. -●6월:하루카의 등갑병(이)가 퇴각했습니다. -●6월:종횡무진카토(이)가 (으)로 진격합니다. -●6월:카토의 호표기병(와)과 狂三의 마귀병(이)가 대결합니다. -●6월:블소비월(이)가 정도(으)로 진격합니다. -●6월:비월의 근위병(와)과 박일아의 철기병(이)가 대결합니다. -●7월:종횡무진강서유서(이)가 (으)로 진격합니다. -●7월:강서유서의 연노병(와)과 갸오오의 마귀병(이)가 대결합니다. -●7월:갸오오의 마귀병(이)가 전멸했습니다. -●7월:강서유서의 연노병(와)과 진리의 백마병(이)가 대결합니다. -●7월:종횡무진SARS(이)가 안평(으)로 진격합니다. -●7월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●7월:SARS(이)가 안평 공략에 성공했습니다. -●7월:누군가가 (을)를 살피는 것 같습니다. -●7월:블소진리(이)가 허창(으)로 진격합니다. -●7월:진리의 백마병(와)과 임사영의 악귀병(이)가 대결합니다. -●7월:진리의 백마병(이)가 퇴각했습니다. -●7월:블소카이스트(이)가 허창(으)로 진격합니다. -●7월:카이스트의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●7월:카이스트의 마귀병(이)가 퇴각했습니다. -●7월:종횡무진카토(이)가 (으)로 진격합니다. -●7월:카토의 호표기병(와)과 다이스의 궁기병(이)가 대결합니다. -●7월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 비밀의 마귀병(이)가 대결합니다. -●7월:종횡무진내나(이)가 (으)로 진격합니다. -●7월:내나의 악귀병(와)과 아소의 호표기병(이)가 대결합니다. -●7월:아소의 호표기병(이)가 전멸했습니다. -●7월:내나의 악귀병(와)과 플젠의 근위병(이)가 대결합니다. -●7월:내나의 악귀병(이)가 퇴각했습니다. -●7월:종횡무진대악마(이)가 (으)로 진격합니다. -●7월:대악마의 호표기병(와)과 랜임1분장의 호표기병(이)가 대결합니다. -●8월:종횡무진임사영(이)가 (으)로 진격합니다. -●8월:임사영의 악귀병(와)과 읭읭의 호표기병(이)가 대결합니다. -●8월:읭읭의 호표기병(이)가 전멸했습니다. -●8월:임사영의 악귀병(와)과 플젠의 근위병(이)가 대결합니다. -●8월:플젠의 근위병(이)가 전멸했습니다. -●8월:종횡무진강서유서(이)가 (으)로 진격합니다. -●8월:강서유서의 연노병(와)과 북두칠성의 근위병(이)가 대결합니다. -●8월:북두칠성의 근위병(이)가 전멸했습니다. -●8월:강서유서의 연노병(와)과 다이스의 궁기병(이)가 대결합니다. -●8월:다이스의 궁기병(이)가 전멸했습니다. -●8월:강서유서의 연노병(와)과 비밀의 마귀병(이)가 대결합니다. -●8월:비밀의 마귀병(이)가 전멸했습니다. -●8월:강서유서의 연노병(와)과 狂三의 마귀병(이)가 대결합니다. -●8월:狂三의 마귀병(이)가 전멸했습니다. -●8월:종횡무진SARS(이)가 졸본(으)로 진격합니다. -●8월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●8월:SARS(이)가 졸본 공략에 성공했습니다. -●8월:종횡무진평민킬러(이)가 (으)로 진격합니다. -●8월:평민킬러의 연노병(와)과 전인호의 마귀병(이)가 대결합니다. -●8월:평민킬러의 연노병(이)가 퇴각했습니다. -●8월:에서 금과 쌀을 도둑맞았습니다. -●8월:ⓖ의병장28(이)가 처자식이 그립다며 떠났습니다. -●8월:종횡무진대악마(이)가 (으)로 진격합니다. -●8월:대악마의 호표기병(와)과 Anes의 백마병(이)가 대결합니다. -●8월:Anes의 백마병(이)가 전멸했습니다. -●8월:대악마의 호표기병(와)과 랜임1분장의 호표기병(이)가 대결합니다. -●9월:종횡무진임사영(이)가 (으)로 진격합니다. -●9월:임사영의 악귀병(와)과 전인호의 마귀병(이)가 대결합니다. -●9월:전인호의 마귀병(이)가 전멸했습니다. -●9월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:임사영의 악귀병(이)가 퇴각했습니다. -●9월:어엿븐소드락ⓖ의병장33(이)가 낙양(으)로 진격합니다. -●9월:ⓖ의병장33(이)가 궁병(으)로 성벽을 공격합니다. -●9월:종횡무진SARS(이)가 관도(으)로 진격합니다. -●9월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●9월:SARS(이)가 관도 공략에 성공했습니다. -●9월:종횡무진일본어번역기(이)가 (으)로 진격합니다. -●9월:일본어번역기(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:ⓖ의병장27(이)가 푸대접에 실망하여 떠났습니다. -●9월:강하에서 8(이)라는 호걸이 천하에 이름을 알립니다. -●9월:종횡무진박일아(이)가 (으)로 진격합니다. -●9월:박일아(이)가 철기병(으)로 성벽을 공격합니다. -●9월:박일아(이)가 공략에 성공했습니다. -●9월:종횡무진대악마(이)가 (으)로 진격합니다. -●9월:대악마(이)가 호표기병(으)로 성벽을 공격합니다. -●9월:대악마의 호표기병(이)가 퇴각했습니다. -●10월:어엿븐소드락ⓖ의병장33(이)가 낙양(으)로 진격합니다. -●10월:ⓖ의병장33(이)가 궁병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장30(이)가 아무 이유 없이 떠났습니다. -●10월:종횡무진SARS(이)가 (으)로 진격합니다. -●10월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●10월:누군가가 수춘(을)를 살피는 것 같습니다. -●10월:종횡무진일본어번역기(이)가 수춘(으)로 진격합니다. -●10월:일본어번역기의 악귀병(와)과 비월의 청주병(이)가 대결합니다. -●10월:일본어번역기의 악귀병(이)가 퇴각했습니다. -●10월:네시(이)가 아무 이유 없이 죽고말았습니다. -●10월:블소이쓰미(이)가 정도(으)로 진격합니다. -●10월:이쓰미의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●10월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●10월:하루카의 등갑병(와)과 낭군의 귀병(이)가 대결합니다. -●10월:종횡무진카토(이)가 (으)로 진격합니다. -●10월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●10월:카토(이)가 공략에 성공했습니다. -●10월:1(이)가 저세상이 궁금하다며 자살하고 말았습니다. -●10월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●10월:박일아의 철기병(와)과 魯堂首의 청주병(이)가 대결합니다. -●10월:블소魯堂首(이)가 (으)로 진격합니다. -●10월:魯堂首의 청주병(와)과 임사영의 악귀병(이)가 대결합니다. -●10월:魯堂首의 청주병(이)가 퇴각했습니다. -●11월:어엿븐소드락ⓖ의병장33(이)가 낙양(으)로 진격합니다. -●11월:ⓖ의병장33(이)가 궁병(으)로 성벽을 공격합니다. -●11월:ⓖ의병장33의 궁병(이)가 퇴각했습니다. -●11월:종횡무진SARS(이)가 (으)로 진격합니다. -●11월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●11월:SARS의 충차(이)가 퇴각했습니다. -●11월:누군가가 (을)를 살피는 것 같습니다. -●11월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●11월:하루카의 등갑병(와)과 카이스트의 귀병(이)가 대결합니다. -●11월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●11월:박일아의 철기병(와)과 갸오오의 귀병(이)가 대결합니다. -●11월:박일아의 철기병(이)가 퇴각했습니다. -●12월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●12월:강서유서의 연노병(와)과 비월의 청주병(이)가 대결합니다. -●12월:블소카이스트(이)가 (으)로 진격합니다. -●12월:카이스트의 귀병(와)과 내나의 악귀병(이)가 대결합니다. -●12월:카이스트의 귀병(이)가 퇴각했습니다. -●12월:ⓖ의병장32(이)가 자기가 없어도 될것 같다며 떠났습니다. -●12월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●12월:하루카의 등갑병(와)과 전인호의 귀병(이)가 대결합니다. -●12월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●12월:카토의 호표기병(와)과 갸오오의 귀병(이)가 대결합니다. -●12월:갸오오의 귀병(이)가 전멸했습니다. -●12월:카토의 호표기병(와)과 비월의 청주병(이)가 대결합니다. -●12월:ⓜ사량(이)가 푸대접에 실망하여 떠났습니다. -●12월:종횡무진평민킬러(이)가 서주(으)로 진격합니다. -●12월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●12월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●12월:내나의 악귀병(와)과 비월의 청주병(이)가 대결합니다. -●12월:비월의 청주병(이)가 전멸했습니다. -●12월:내나의 악귀병(와)과 이쓰미의 마귀병(이)가 대결합니다. -●12월:이쓰미의 마귀병(이)가 전멸했습니다. -●12월:내나의 악귀병(와)과 전인호의 귀병(이)가 대결합니다. -●12월:종횡무진대악마(이)가 서주(으)로 진격합니다. -●12월:대악마(이)가 호표기병(으)로 성벽을 공격합니다. -●12월:대악마(이)가 서주 공략에 성공했습니다. -◆1월:195년이 되었습니다. -●1월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●1월:임사영의 악귀병(와)과 전인호의 귀병(이)가 대결합니다. -●1월:전인호의 귀병(이)가 전멸했습니다. -●1월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●1월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●1월:누군가가 수춘(을)를 살피는 것 같습니다. -●1월:접속잘안함무광(이)가 호로(으)로 진격합니다. -●1월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:종횡무진카토(이)가 호로(으)로 진격합니다. -●1월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●1월:ⓖ의병장29(이)가 자기가 없어도 될것 같다며 떠났습니다. -●1월:종횡무진평민킬러(이)가 호로(으)로 진격합니다. -●1월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●1월:평민킬러(이)가 호로 공략에 성공했습니다. -●1월:종횡무진잠둥이션(이)가 수춘(으)로 진격합니다. -●1월:잠둥이션의 악귀병(와)과 이쓰미의 귀병(이)가 대결합니다. -●1월:이쓰미의 귀병(이)가 전멸했습니다. -●1월:잠둥이션의 악귀병(와)과 다이스의 기병(이)가 대결합니다. -●1월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●1월:내나의 악귀병(와)과 魯堂首의 청주병(이)가 대결합니다. -●1월:魯堂首의 청주병(이)가 전멸했습니다. -●1월:내나의 악귀병(와)과 다이스의 기병(이)가 대결합니다. -●1월:다이스의 기병(이)가 전멸했습니다. -●1월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:내나의 악귀병(이)가 퇴각했습니다. -●1월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●1월:대악마(이)가 호표기병(으)로 성벽을 공격합니다. -●2월:종횡무진임사영(이)가 여남(으)로 진격합니다. -●2월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:임사영의 악귀병(이)가 퇴각했습니다. -●2월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●2월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●2월:강서유서의 연노병(이)가 퇴각했습니다. -●2월:종횡무진일본어번역기(이)가 수춘(으)로 진격합니다. -●2월:일본어번역기의 악귀병(와)과 Anes의 기병(이)가 대결합니다. -●2월:Anes의 기병(이)가 전멸했습니다. -●2월:일본어번역기(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●2월:카토의 호표기병(와)과 낭군의 귀병(이)가 대결합니다. -●2월:카토의 호표기병(이)가 퇴각했습니다. -●2월:종횡무진평민킬러(이)가 낙양(으)로 진격합니다. -●2월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●2월:평민킬러의 연노병(이)가 퇴각했습니다. -●2월:종횡무진잠둥이션(이)가 여남(으)로 진격합니다. -●2월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●2월:ⓖ의병장31(이)가 아무 이유 없이 떠났습니다. -●2월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●2월:대악마의 호표기병(와)과 전인호의 귀병(이)가 대결합니다. -●3월:ⓖ의병장33(이)가 푸대접에 실망하여 떠났습니다. -●3월:종횡무진일본어번역기(이)가 수춘(으)로 진격합니다. -●3월:일본어번역기의 악귀병(와)과 Anes의 기병(이)가 대결합니다. -●3월:일본어번역기의 악귀병(이)가 퇴각했습니다. -●3월:8(이)가 단식운동을 하다가 굶어 죽고말았습니다. -●3월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●3월:박일아의 호표기병(와)과 아소의 기병(이)가 대결합니다. -●3월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●3월:대악마의 호표기병(와)과 비밀의 귀병(이)가 대결합니다. -●3월:대악마의 호표기병(이)가 퇴각했습니다. -●4월:블소아소(이)가 (으)로 진격합니다. -●4월:아소의 기병(와)과 하루카의 등갑병(이)가 대결합니다. -●4월:아소의 기병(이)가 퇴각했습니다. -●4월:에서 악마사냥꾼(이)라는 호걸이 천하에 이름을 알립니다. -●4월:종횡무진SARS(이)가 낙양(으)로 진격합니다. -●4월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●4월:누군가가 수춘(을)를 살피는 것 같습니다. -●4월:블소카이스트(이)가 (으)로 진격합니다. -●4월:카이스트의 귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●4월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●4월:하루카의 등갑병(와)과 북두칠성의 청주병(이)가 대결합니다. -●4월:어엿븐소드락소드락(이)가 낙양(으)로 진격합니다. -●4월:소드락(이)가 충차(으)로 성벽을 공격합니다. -●4월:소드락(이)가 낙양 공략에 성공했습니다. -●4월:블소비밀(이)가 (으)로 진격합니다. -●4월:비밀의 귀병(와)과 박일아의 호표기병(이)가 대결합니다. -●4월:악마사냥꾼(이)가 접속잘안함임관했습니다. -●5월:종횡무진SARS(이)가 (으)로 진격합니다. -●5월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●5월:SARS(이)가 공략에 성공했습니다. -●5월:블소이쓰미(이)가 서주(으)로 진격합니다. -●5월:이쓰미의 귀병(와)과 대악마의 호표기병(이)가 대결합니다. -●5월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●5월:내나의 악귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●6월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●6월:임사영의 악귀병(와)과 낭군의 귀병(이)가 대결합니다. -●6월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●6월:강서유서의 연노병(와)과 비월의 청주병(이)가 대결합니다. -●6월:종횡무진SARS(이)가 사수(으)로 진격합니다. -●6월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●6월:영안에서 이시리스(이)라는 호걸이 천하에 이름을 알립니다. -●6월:블소낭군(이)가 서주(으)로 진격합니다. -●6월:낭군의 귀병(와)과 대악마의 호표기병(이)가 대결합니다. -●6월:대악마의 호표기병(이)가 전멸했습니다. -●6월:낭군(이)가 귀병(으)로 성벽을 공격합니다. -●6월:낭군의 귀병(이)가 퇴각했습니다. -●6월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●6월:카토의 호표기병(와)과 랜임1분장의 기병(이)가 대결합니다. -●6월:에서 금과 쌀을 도둑맞았습니다. -●6월:종횡무진평민킬러(이)가 수춘(으)로 진격합니다. -●6월:평민킬러의 연노병(와)과 이쓰미의 귀병(이)가 대결합니다. -●6월:이쓰미의 귀병(이)가 전멸했습니다. -●6월:평민킬러의 연노병(와)과 북두칠성의 청주병(이)가 대결합니다. -●6월:종횡무진잠둥이션(이)가 수춘(으)로 진격합니다. -●6월:잠둥이션의 악귀병(와)과 전인호의 귀병(이)가 대결합니다. -●6월:전인호의 귀병(이)가 전멸했습니다. -●6월:잠둥이션의 악귀병(와)과 진리의 기병(이)가 대결합니다. -●6월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●6월:내나의 악귀병(와)과 Anes의 기병(이)가 대결합니다. -●6월:Anes의 기병(이)가 전멸했습니다. -●6월:내나의 악귀병(와)과 북두칠성의 청주병(이)가 대결합니다. -●7월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●7월:임사영의 악귀병(와)과 魯堂首의 청주병(이)가 대결합니다. -●7월:魯堂首의 청주병(이)가 전멸했습니다. -●7월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●7월:강서유서의 연노병(와)과 비월의 청주병(이)가 대결합니다. -●7월:비월의 청주병(이)가 전멸했습니다. -●7월:강서유서의 연노병(와)과 진리의 기병(이)가 대결합니다. -●7월:블소북두칠성(이)가 서주(으)로 진격합니다. -●7월:북두칠성의 청주병(와)과 강서유서의 연노병(이)가 대결합니다. -●7월:강서유서의 연노병(이)가 전멸했습니다. -●7월:북두칠성(이)가 청주병(으)로 성벽을 공격합니다. -●7월:북두칠성의 청주병(이)가 퇴각했습니다. -●7월:종횡무진SARS(이)가 사수(으)로 진격합니다. -●7월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●7월:SARS(이)가 사수 공략에 성공했습니다. -●7월:누군가가 수춘(을)를 살피는 것 같습니다. -●7월:종횡무진일본어번역기(이)가 여남(으)로 진격합니다. -●7월:일본어번역기(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●7월:카토의 호표기병(와)과 카이스트의 귀병(이)가 대결합니다. -●7월:에서 금과 쌀을 도둑맞았습니다. -●7월:종횡무진평민킬러(이)가 수춘(으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 비밀의 귀병(이)가 대결합니다. -●7월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●7월:박일아의 호표기병(와)과 다이스의 궁병(이)가 대결합니다. -●7월:종횡무진잠둥이션(이)가 수춘(으)로 진격합니다. -●7월:잠둥이션의 악귀병(와)과 진리의 기병(이)가 대결합니다. -●7월:진리의 기병(이)가 전멸했습니다. -●7월:잠둥이션의 악귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●7월:갸오오의 귀병(이)가 전멸했습니다. -●7월:잠둥이션의 악귀병(와)과 다이스의 궁병(이)가 대결합니다. -●8월:종횡무진SARS(이)가 여남(으)로 진격합니다. -●8월:SARS(이)가 충차(으)로 성벽을 공격합니다. -●8월:SARS의 충차(이)가 퇴각했습니다. -●8월:블소카이스트(이)가 (으)로 진격합니다. -●8월:카이스트의 귀병(와)과 하루카의 근위병(이)가 대결합니다. -●8월:카이스트의 귀병(이)가 퇴각했습니다. -●8월:종횡무진일본어번역기(이)가 여남(으)로 진격합니다. -●8월:일본어번역기(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:일본어번역기(이)가 여남 공략에 성공했습니다. -●8월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●8월:하루카의 근위병(와)과 아소의 기병(이)가 대결합니다. -●8월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●8월:카토의 호표기병(와)과 아소의 기병(이)가 대결합니다. -●8월:아소의 기병(이)가 전멸했습니다. -●8월:카토의 호표기병(와)과 비밀의 귀병(이)가 대결합니다. -●8월:비밀의 귀병(이)가 전멸했습니다. -●8월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●8월:누군가가 장안(을)를 살피는 것 같습니다. -●8월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●8월:박일아의 호표기병(와)과 이쓰미의 귀병(이)가 대결합니다. -●9월:KAITO(이)가 종횡무진선전 포고 하였습니다. -●9월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●9월:하루카의 근위병(와)과 비월의 청주병(이)가 대결합니다. -●9월:의 백성들이 동요하고 있습니다. -●9월:누군가가 한중(을)를 살피는 것 같습니다. -●9월:ⓜ하후공(이)가 자기가 없어도 될것 같다며 떠났습니다. -●10월:누군가가 수춘(을)를 살피는 것 같습니다. -●10월:국민기업(이)가 보컬로이드임관했습니다. -●10월:블소낭군(이)가 서주(으)로 진격합니다. -●10월:낭군의 귀병(와)과 대악마의 호표기병(이)가 대결합니다. -●10월:누군가가 위례(을)를 살피는 것 같습니다. -●10월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●10월:내나의 악귀병(와)과 랜임1분장의 기병(이)가 대결합니다. -●10월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●10월:대악마의 호표기병(와)과 비밀의 귀병(이)가 대결합니다. -●11월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●11월:임사영의 악귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●11월:갸오오의 귀병(이)가 전멸했습니다. -●11월:임사영의 악귀병(와)과 비월의 청주병(이)가 대결합니다. -●11월:상동에서 415161(이)라는 호걸이 천하에 이름을 알립니다. -●11월:종횡무진평민킬러(이)가 수춘(으)로 진격합니다. -●11월:평민킬러의 연노병(와)과 이쓰미의 귀병(이)가 대결합니다. -●11월:에서 금과 쌀을 도둑맞았습니다. -●11월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●11월:내나의 악귀병(와)과 魯堂首의 청주병(이)가 대결합니다. -●11월:내나의 악귀병(이)가 퇴각했습니다. -●12월:이시리스(이)가 농사중 호미에 머리를 맞아 죽고말았습니다. -●12월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●12월:임사영의 악귀병(와)과 다이스의 궁병(이)가 대결합니다. -●12월:다이스의 궁병(이)가 전멸했습니다. -●12월:임사영의 악귀병(와)과 랜임1분장의 기병(이)가 대결합니다. -●12월:랜임1분장의 기병(이)가 전멸했습니다. -●12월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●12월:강서유서의 연노병(와)과 비월의 청주병(이)가 대결합니다. -●12월:비월의 청주병(이)가 전멸했습니다. -●12월:강서유서의 연노병(와)과 이쓰미의 귀병(이)가 대결합니다. -●12월:블소니콜(이)가 (으)로 진격합니다. -●12월:니콜의 정란(와)과 하루카의 근위병(이)가 대결합니다. -●12월:종횡무진일본어번역기(이)가 수춘(으)로 진격합니다. -●12월:일본어번역기의 악귀병(와)과 북두칠성의 청주병(이)가 대결합니다. -●12월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●12월:카토의 호표기병(와)과 전인호의 귀병(이)가 대결합니다. -●12월:종횡무진평민킬러(이)가 수춘(으)로 진격합니다. -●12월:평민킬러의 연노병(와)과 북두칠성의 청주병(이)가 대결합니다. -●12월:북두칠성의 청주병(이)가 패퇴했습니다. -●12월:평민킬러의 연노병(와)과 카이스트의 귀병(이)가 대결합니다. -●12월:평민킬러의 연노병(이)가 퇴각했습니다. -●12월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●12월:박일아의 호표기병(와)과 카이스트의 귀병(이)가 대결합니다. -●12월:종횡무진잠둥이션(이)가 수춘(으)로 진격합니다. -●12월:잠둥이션의 악귀병(와)과 카이스트의 귀병(이)가 대결합니다. -●12월:카이스트의 귀병(이)가 전멸했습니다. -●12월:잠둥이션의 악귀병(와)과 전인호의 귀병(이)가 대결합니다. -●12월:전인호의 귀병(이)가 전멸했습니다. -●12월:잠둥이션의 악귀병(와)과 魯堂首의 청주병(이)가 대결합니다. -●12월:魯堂首의 청주병(이)가 전멸했습니다. -◆1월:196년이 되었습니다. -●1월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●1월:강서유서의 연노병(와)과 아소의 기병(이)가 대결합니다. -●1월:아소의 기병(이)가 전멸했습니다. -●1월:강서유서의 연노병(와)과 이쓰미의 귀병(이)가 대결합니다. -●1월:블소니콜(이)가 여남(으)로 진격합니다. -●1월:니콜의 정란(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●1월:니콜의 정란(이)가 퇴각했습니다. -●1월:누군가가 수춘(을)를 살피는 것 같습니다. -●1월:종횡무진일본어번역기(이)가 수춘(으)로 진격합니다. -●1월:일본어번역기의 악귀병(와)과 이쓰미의 귀병(이)가 대결합니다. -●1월:일본어번역기의 악귀병(이)가 퇴각했습니다. -●1월:하루카(이)가 가맹(으)로 천도를 명령하였습니다. -●1월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●1월:하루카의 근위병(와)과 낭군의 귀병(이)가 대결합니다. -●1월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●1월:카토의 호표기병(와)과 이쓰미의 귀병(이)가 대결합니다. -●1월:이쓰미의 귀병(이)가 전멸했습니다. -●1월:카토의 호표기병(와)과 낭군의 귀병(이)가 대결합니다. -●1월:의 백성들이 동요하고 있습니다. -●1월:종횡무진박일아(이)가 수춘(으)로 진격합니다. -●1월:박일아의 호표기병(와)과 갸오오의 귀병(이)가 대결합니다. -●1월:갸오오의 귀병(이)가 전멸했습니다. -●1월:박일아의 호표기병(와)과 비밀의 귀병(이)가 대결합니다. -●1월:박일아의 호표기병(이)가 퇴각했습니다. -●1월:종횡무진잠둥이션(이)가 수춘(으)로 진격합니다. -●1월:잠둥이션의 악귀병(와)과 비밀의 귀병(이)가 대결합니다. -●1월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●2월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 낭군의 귀병(이)가 대결합니다. -●2월:낭군의 귀병(이)가 전멸했습니다. -●2월:강서유서의 연노병(와)과 비밀의 귀병(이)가 대결합니다. -●2월:비밀의 귀병(이)가 전멸했습니다. -●2월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●2월:강서유서의 연노병(이)가 퇴각했습니다. -●2월:종횡무진하루카(이)가 수춘(으)로 진격합니다. -●2월:하루카의 근위병(와)과 다이스의 궁병(이)가 대결합니다. -●2월:다이스의 궁병(이)가 전멸했습니다. -●2월:하루카(이)가 근위병(으)로 성벽을 공격합니다. -●2월:종횡무진카토(이)가 수춘(으)로 진격합니다. -●2월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●2월:카토의 호표기병(이)가 퇴각했습니다. -●2월:에서 금과 쌀을 도둑맞았습니다. -●2월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●2월:대악마의 호표기병(와)과 魯堂首의 청주병(이)가 대결합니다. -●3월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●3월:내나의 악귀병(와)과 쥬비아의 남귀병(이)가 대결합니다. -●3월:쥬비아의 남귀병(이)가 전멸했습니다. -●3월:내나의 악귀병(와)과 전인호의 귀병(이)가 대결합니다. -●3월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●3월:대악마의 호표기병(와)과 전인호의 귀병(이)가 대결합니다. -●3월:전인호의 귀병(이)가 전멸했습니다. -●3월:대악마의 호표기병(와)과 魯堂首의 청주병(이)가 대결합니다. -●3월:魯堂首의 청주병(이)가 전멸했습니다. -●4월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●4월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:누군가가 수춘(을)를 살피는 것 같습니다. -●4월:종횡무진평민킬러(이)가 수춘(으)로 진격합니다. -●4월:평민킬러의 연노병(와)과 낭군의 귀병(이)가 대결합니다. -●4월:낭군의 귀병(이)가 전멸했습니다. -●4월:종횡무진내나(이)가 수춘(으)로 진격합니다. -●4월:내나의 악귀병(와)과 읭읭의 기병(이)가 대결합니다. -●4월:종횡무진대악마(이)가 수춘(으)로 진격합니다. -●4월:대악마의 호표기병(와)과 이쓰미의 귀병(이)가 대결합니다. -●4월:이쓰미의 귀병(이)가 전멸했습니다. -●4월:대악마의 호표기병(와)과 갸오오의 귀병(이)가 대결합니다. -●4월:대악마의 호표기병(이)가 퇴각했습니다. -●5월:종횡무진임사영(이)가 수춘(으)로 진격합니다. -●5월:임사영의 악귀병(와)과 갸오오의 귀병(이)가 대결합니다. -●5월:갸오오의 귀병(이)가 전멸했습니다. -●5월:임사영의 악귀병(와)과 읭읭의 기병(이)가 대결합니다. -●5월:읭읭의 기병(이)가 전멸했습니다. -●5월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:종횡무진강서유서(이)가 수춘(으)로 진격합니다. -●5월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●5월:강서유서(이)가 수춘 공략에 성공했습니다. -●5월:누군가가 합비(을)를 살피는 것 같습니다. -●5월:희대의 사기꾼 415161(이)가 사망했습니다. -●5월:종횡무진평민킬러(이)가 합비(으)로 진격합니다. -●5월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●6월:종횡무진강서유서(이)가 합비(으)로 진격합니다. -●6월:강서유서의 연노병(와)과 아소의 기병(이)가 대결합니다. -●6월:하루카(이)가 자동(으)로 천도를 명령하였습니다. -●6월:종횡무진하루카(이)가 합비(으)로 진격합니다. -●6월:하루카의 근위병(와)과 아소의 기병(이)가 대결합니다. -●6월:아소의 기병(이)가 전멸했습니다. -●6월:하루카(이)가 근위병(으)로 성벽을 공격합니다. -●6월:종횡무진카토(이)가 합비(으)로 진격합니다. -●6월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●6월:카토(이)가 합비 공략에 성공했습니다. -●7월:코토와르(이)가 맥궁(+7)(을)를 습득했습니다! -●8월:진리(이)가 접속잘안함임관했습니다. -●8월:전인호(이)가 접속잘안함임관했습니다. -●8월:에서 금과 쌀을 도둑맞았습니다. -●8월:狂三(이)가 접속잘안함임관했습니다. -●9월:낭군(이)가 보컬로이드임관했습니다. -●9월:하루카(이)가 면죽(으)로 천도를 명령하였습니다. -●9월:비밀(이)가 접속잘안함(으)로 망명하였습니다. -●9월:魯堂首(이)가 접속잘안함임관했습니다. -●10월:Anes(이)가 접속잘안함임관했습니다. -●10월:이쓰미(이)가 접속잘안함임관했습니다. -●11월:북두칠성(이)가 접속잘안함임관했습니다. -●11월:니콜(이)가 보컬로이드임관했습니다. -●11월:쥬비아(이)가 접속잘안함임관했습니다. -●12월:하루카(이)가 성도(으)로 천도를 명령하였습니다. -●12월:청기사(이)가 보컬로이드임관했습니다. -◆1월:197년이 되었습니다. -●1월:일기토지배자(이)가 보컬로이드임관했습니다. -●1월:내정달인(이)가 보컬로이드임관했습니다. -●1월:카이스트(이)가 접속잘안함임관했습니다. -●2월:아소(이)가 접속잘안함(으)로 망명하였습니다. -●4월:비월(이)가 보컬로이드임관했습니다. -●5월:랜임1분장(이)가 보컬로이드임관했습니다. -●6월:ⓜ유찬(이)가 자기가 없어도 될것 같다며 떠났습니다. -●7월:누군가가 사곡(을)를 살피는 것 같습니다. -●7월:천괴금(이)가 보컬로이드임관했습니다. -●7월:읭읭(이)가 접속잘안함임관했습니다. -●8월:누군가가 주시(을)를 살피는 것 같습니다. -●8월:누군가가 안평(을)를 살피는 것 같습니다. -●8월:북오더(이)가 접속잘안함(으)로 망명하였습니다. -●8월:누군가가 합비(을)를 살피는 것 같습니다. -●9월:보컬로이드Air(이)가 동황(으)로 진격합니다. -●9월:Air(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:종횡무진강서유서(이)가 건녕(으)로 진격합니다. -●9월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●9월:건녕의 백성들이 동요하고 있습니다. -●9월:보컬로이드KAITO(이)가 주시(으)로 진격합니다. -●9월:KAITO의 등갑병(와)과 하루카의 근위병(이)가 대결합니다. -●9월:보컬로이드바닥을탁치고(이)가 동황(으)로 진격합니다. -●9월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드코토와르(이)가 서주(으)로 진격합니다. -●9월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●9월:코토와르(이)가 서주 공략에 성공했습니다. -●9월:보컬로이드카가미네렌(이)가 귀양(으)로 진격합니다. -●9월:카가미네렌의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●9월:보컬로이드낭군(이)가 동황(으)로 진격합니다. -●9월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:낭군(이)가 동황 공략에 성공했습니다. -●9월:보컬로이드엄백호(이)가 안평(으)로 진격합니다. -●9월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:누군가가 운남(을)를 살피는 것 같습니다. -●9월:보컬로이드정휘인(이)가 합비(으)로 진격합니다. -●9월:정휘인(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:누군가가 건업(을)를 살피는 것 같습니다. -●9월:보컬로이드제갈여포(이)가 주시(으)로 진격합니다. -●9월:제갈여포의 석궁병(와)과 임사영의 악귀병(이)가 대결합니다. -●9월:종횡무진평민킬러(이)가 운남(으)로 진격합니다. -●9월:평민킬러의 연노병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●9월:야근탈출의 맹수병(이)가 전멸했습니다. -●9월:평민킬러의 연노병(와)과 미친과학의 흑귀병(이)가 대결합니다. -●9월:보컬로이드Navy마초(이)가 안평(으)로 진격합니다. -●9월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:Navy마초(이)가 안평 공략에 성공했습니다. -●9월:남해에서 리안(이)라는 호걸이 천하에 이름을 알립니다. -●9월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●9월:대악마의 호표기병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●10월:종횡무진임사영(이)가 운남(으)로 진격합니다. -●10월:임사영의 악귀병(와)과 미친과학의 흑귀병(이)가 대결합니다. -●10월:미친과학의 흑귀병(이)가 전멸했습니다. -●10월:임사영의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●10월:임사영의 악귀병(이)가 퇴각했습니다. -●10월:종횡무진강서유서(이)가 운남(으)로 진격합니다. -●10월:강서유서의 연노병(와)과 KAITO의 등갑병(이)가 대결합니다. -●10월:리안(이)가 보컬로이드임관했습니다. -●10월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●10월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●10월:보컬로이드카가미네렌(이)가 귀양(으)로 진격합니다. -●10월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:보컬로이드낭군(이)가 북해(으)로 진격합니다. -●10월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드정휘인(이)가 합비(으)로 진격합니다. -●10월:정휘인의 신귀병(와)과 박일아의 호표기병(이)가 대결합니다. -●10월:종횡무진카토(이)가 운남(으)로 진격합니다. -●10월:카토의 호표기병(와)과 비월의 등갑병(이)가 대결합니다. -●10월:보컬로이드하기싫은데(이)가 북해(으)로 진격합니다. -●10월:하기싫은데(이)가 정란(으)로 성벽을 공격합니다. -●10월:하기싫은데의 정란(이)가 퇴각했습니다. -●10월:보컬로이드くま(이)가 북해(으)로 진격합니다. -●10월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●10월:くま(이)가 북해 공략에 성공했습니다. -●10월:종횡무진평민킬러(이)가 운남(으)로 진격합니다. -●10월:평민킬러의 연노병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●10월:평민킬러의 연노병(이)가 퇴각했습니다. -●10월:보컬로이드Navy마초(이)가 백랑(으)로 진격합니다. -●10월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:Navy마초(이)가 백랑 공략에 성공했습니다. -●10월:종횡무진박일아(이)가 건업(으)로 진격합니다. -●10월:박일아의 호표기병(와)과 이루나의 흑귀병(이)가 대결합니다. -●10월:종횡무진잠둥이션(이)가 건업(으)로 진격합니다. -●10월:잠둥이션의 악귀병(와)과 정휘인의 신귀병(이)가 대결합니다. -●10월:정휘인의 신귀병(이)가 전멸했습니다. -●10월:잠둥이션의 악귀병(와)과 이루나의 흑귀병(이)가 대결합니다. -●10월:이루나의 흑귀병(이)가 전멸했습니다. -●10월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드돌아온꼰대(이)가 주시(으)로 진격합니다. -●10월:돌아온꼰대의 맹수병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●10월:돌아온꼰대의 맹수병(이)가 퇴각했습니다. -●10월:종횡무진내나(이)가 운남(으)로 진격합니다. -●10월:내나의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●10월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●10월:대악마(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:보컬로이드Air(이)가 졸본(으)로 진격합니다. -●11월:Air(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:건녕의 백성들이 동요하고 있습니다. -●11월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●11월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●11월:코토와르의 수렵기병(이)가 퇴각했습니다. -●11월:종횡무진일본어번역기(이)가 운남(으)로 진격합니다. -●11월:일본어번역기의 악귀병(와)과 비월의 등갑병(이)가 대결합니다. -●11월:일본어번역기의 악귀병(이)가 퇴각했습니다. -●11월:보컬로이드엄백호(이)가 졸본(으)로 진격합니다. -●11월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:엄백호(이)가 졸본 공략에 성공했습니다. -●11월:종횡무진카토(이)가 운남(으)로 진격합니다. -●11월:카토의 호표기병(와)과 비월의 등갑병(이)가 대결합니다. -●11월:비월의 등갑병(이)가 전멸했습니다. -●11월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:보컬로이드박희수(이)가 주시(으)로 진격합니다. -●11월:박희수의 등갑병(와)과 하루카의 근위병(이)가 대결합니다. -●11월:보컬로이드くま(이)가 평원(으)로 진격합니다. -●11월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●11월:보컬로이드Navy마초(이)가 북평(으)로 진격합니다. -●11월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:종횡무진내나(이)가 운남(으)로 진격합니다. -●11월:내나의 악귀병(와)과 비월의 등갑병(이)가 대결합니다. -●12월:보컬로이드Air(이)가 합비(으)로 진격합니다. -●12월:Air의 맹수병(와)과 박일아의 호표기병(이)가 대결합니다. -●12월:박일아의 호표기병(이)가 전멸했습니다. -●12월:Air(이)가 맹수병(으)로 성벽을 공격합니다. -●12월:Air의 맹수병(이)가 퇴각했습니다. -●12월:건녕의 백성들이 동요하고 있습니다. -●12월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●12월:엄백호의 등갑병(와)과 하루카의 근위병(이)가 대결합니다. -●12월:종횡무진카토(이)가 운남(으)로 진격합니다. -●12월:카토의 호표기병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●12월:카토의 호표기병(이)가 퇴각했습니다. -●12월:보컬로이드くま(이)가 평원(으)로 진격합니다. -●12월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●12월:くま(이)가 평원 공략에 성공했습니다. -●12월:보컬로이드Navy마초(이)가 북평(으)로 진격합니다. -●12월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:Navy마초(이)가 북평 공략에 성공했습니다. -●12월:누군가가 주시(을)를 살피는 것 같습니다. -◆1월:198년이 되었습니다. -●1월:보컬로이드야근탈출(이)가 주시(으)로 진격합니다. -●1월:야근탈출의 맹수병(와)과 임사영의 악귀병(이)가 대결합니다. -●1월:야근탈출의 맹수병(이)가 퇴각했습니다. -●1월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●1월:엄백호의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:엄백호의 등갑병(이)가 퇴각했습니다. -●1월:보컬로이드제갈여포(이)가 주시(으)로 진격합니다. -●1월:제갈여포의 석궁병(와)과 임사영의 악귀병(이)가 대결합니다. -●1월:임사영의 악귀병(이)가 전멸했습니다. -●1월:보컬로이드くま(이)가 남피(으)로 진격합니다. -●1월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●1월:くま의 흑귀병(이)가 퇴각했습니다. -●1월:누군가가 귀양(을)를 살피는 것 같습니다. -●2월:종횡무진강서유서(이)가 운남(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 KAITO의 등갑병(이)가 대결합니다. -●2월:강서유서의 연노병(이)가 퇴각했습니다. -●2월:보컬로이드KAITO(이)가 주시(으)로 진격합니다. -●2월:KAITO의 등갑병(와)과 대악마의 호표기병(이)가 대결합니다. -●2월:KAITO의 등갑병(이)가 퇴각했습니다. -●2월:보컬로이드바닥을탁치고(이)가 (으)로 진격합니다. -●2월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드카가미네렌(이)가 귀양(으)로 진격합니다. -●2월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●2월:보컬로이드정휘인(이)가 합비(으)로 진격합니다. -●2월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드제갈여포(이)가 주시(으)로 진격합니다. -●2월:제갈여포의 석궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●2월:제갈여포의 석궁병(이)가 퇴각했습니다. -●2월:종횡무진평민킬러(이)가 운남(으)로 진격합니다. -●2월:평민킬러의 연노병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●2월:돌아온꼰대의 맹수병(이)가 전멸했습니다. -●2월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●2월:누군가가 합비(을)를 살피는 것 같습니다. -●2월:보컬로이드橙(이)가 남피(으)로 진격합니다. -●2월:橙(이)가 충차(으)로 성벽을 공격합니다. -●2월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●2월:대악마의 호표기병(와)과 비월의 등갑병(이)가 대결합니다. -●3월:보컬로이드ⓜ능환(이)가 귀양(으)로 진격합니다. -●3월:ⓜ능환(이)가 흑귀병(으)로 성벽을 공격합니다. -●3월:ⓜ능환(이)가 귀양 공략에 성공했습니다. -●3월:누군가가 강주(을)를 살피는 것 같습니다. -●3월:보컬로이드바닥을탁치고(이)가 (으)로 진격합니다. -●3월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●3월:바닥을탁치고(이)가 공략에 성공했습니다. -●3월:보컬로이드낭군(이)가 합비(으)로 진격합니다. -●3월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●3월:낭군(이)가 합비 공략에 성공했습니다. -●3월:종횡무진내나(이)가 운남(으)로 진격합니다. -●3월:내나의 악귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●3월:누군가가 주시(을)를 살피는 것 같습니다. -●3월:보컬로이드橙(이)가 남피(으)로 진격합니다. -●3월:橙(이)가 충차(으)로 성벽을 공격합니다. -●3월:橙(이)가 남피 공략에 성공했습니다. -●3월:종횡무진대악마(이)가 귀양(으)로 진격합니다. -●3월:대악마의 호표기병(와)과 ⓜ능환의 흑귀병(이)가 대결합니다. -●3월:대악마의 호표기병(이)가 퇴각했습니다. -●4월:주시에서 금과 쌀을 도둑맞았습니다. -●4월:보컬로이드ⓜ능환(이)가 강주(으)로 진격합니다. -●4월:ⓜ능환(이)가 흑귀병(으)로 성벽을 공격합니다. -●4월:ⓜ능환의 흑귀병(이)가 퇴각했습니다. -●4월:누군가가 (을)를 살피는 것 같습니다. -●4월:보컬로이드낭군(이)가 수춘(으)로 진격합니다. -●4월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●4월:종횡무진카토(이)가 귀양(으)로 진격합니다. -●4월:카토의 호표기병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●4월:종횡무진내나(이)가 운남(으)로 진격합니다. -●4월:내나의 악귀병(와)과 엄백호의 등갑병(이)가 대결합니다. -●4월:보컬로이드橙(이)가 (으)로 진격합니다. -●4월:橙(이)가 충차(으)로 성벽을 공격합니다. -●4월:橙(이)가 공략에 성공했습니다. -●5월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●5월:코토와르의 수렵기병(와)과 박일아의 호표기병(이)가 대결합니다. -●5월:보컬로이드낭군(이)가 수춘(으)로 진격합니다. -●5월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●5월:엄백호의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●5월:보컬로이드정휘인(이)가 수춘(으)로 진격합니다. -●5월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●5월:종횡무진카토(이)가 귀양(으)로 진격합니다. -●5월:카토의 호표기병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●5월:카가미네렌의 석궁병(이)가 전멸했습니다. -●5월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●5월:보컬로이드박희수(이)가 주시(으)로 진격합니다. -●5월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●5월:보컬로이드くま(이)가 계교(으)로 진격합니다. -●5월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드橙(이)가 관도(으)로 진격합니다. -●5월:橙(이)가 충차(으)로 성벽을 공격합니다. -●6월:종횡무진강서유서(이)가 귀양(으)로 진격합니다. -●6월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●6월:강서유서(이)가 귀양 공략에 성공했습니다. -●6월:보컬로이드야근탈출(이)가 주시(으)로 진격합니다. -●6월:야근탈출(이)가 맹수병(으)로 성벽을 공격합니다. -●6월:누군가가 평원(을)를 살피는 것 같습니다. -●6월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●6월:코토와르의 수렵기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●6월:코토와르의 수렵기병(이)가 퇴각했습니다. -●6월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●6월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:엄백호의 등갑병(이)가 퇴각했습니다. -●6월:보컬로이드정휘인(이)가 수춘(으)로 진격합니다. -●6월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드하기싫은데(이)가 계교(으)로 진격합니다. -●6월:하기싫은데(이)가 충차(으)로 성벽을 공격합니다. -●6월:하기싫은데(이)가 계교 공략에 성공했습니다. -●6월:보컬로이드제갈여포(이)가 주시(으)로 진격합니다. -●6월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●6월:누군가가 주시(을)를 살피는 것 같습니다. -●6월:보컬로이드橙(이)가 관도(으)로 진격합니다. -●6월:橙(이)가 충차(으)로 성벽을 공격합니다. -●6월:橙(이)가 관도 공략에 성공했습니다. -●7월:종횡무진임사영(이)가 서주(으)로 진격합니다. -●7월:임사영의 악귀병(와)과 이루나의 흑귀병(이)가 대결합니다. -●7월:보컬로이드야근탈출(이)가 주시(으)로 진격합니다. -●7월:야근탈출(이)가 맹수병(으)로 성벽을 공격합니다. -●7월:누군가가 서주(을)를 살피는 것 같습니다. -●7월:보컬로이드정휘인(이)가 수춘(으)로 진격합니다. -●7월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●7월:정휘인의 흑귀병(이)가 퇴각했습니다. -●7월:보컬로이드제갈여포(이)가 주시(으)로 진격합니다. -●7월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●7월:제갈여포(이)가 주시 공략에 성공했습니다. -●7월:누군가가 귀양(을)를 살피는 것 같습니다. -●7월:보컬로이드橙(이)가 허창(으)로 진격합니다. -●7월:橙(이)가 충차(으)로 성벽을 공격합니다. -●7월:橙의 충차(이)가 퇴각했습니다. -●7월:종횡무진대악마(이)가 주시(으)로 진격합니다. -●7월:대악마의 호표기병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●8월:종횡무진임사영(이)가 서주(으)로 진격합니다. -●8월:임사영의 악귀병(와)과 Air의 맹수병(이)가 대결합니다. -●8월:임사영의 악귀병(이)가 퇴각했습니다. -●8월:카이사르(이)가 양양(으)로 천도를 명령하였습니다. -●8월:무광(이)가 종횡무진선전 포고 하였습니다. -●8월:보컬로이드Navy마초(이)가 역경(으)로 진격합니다. -●8월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●8월:종횡무진대악마(이)가 주시(으)로 진격합니다. -●8월:대악마의 호표기병(와)과 KAITO의 등갑병(이)가 대결합니다. -●8월:대악마의 호표기병(이)가 퇴각했습니다. -●9월:누군가가 계교(을)를 살피는 것 같습니다. -●9월:보컬로이드바닥을탁치고(이)가 복양(으)로 진격합니다. -●9월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●9월:하루카(이)가 국기를 변경하였습니다. -●9월:종횡무진카토(이)가 주시(으)로 진격합니다. -●9월:카토의 호표기병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●9월:누군가가 성도(을)를 살피는 것 같습니다. -●9월:보컬로이드Navy마초(이)가 역경(으)로 진격합니다. -●9월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:보컬로이드돌아온꼰대(이)가 수춘(으)로 진격합니다. -●9월:돌아온꼰대(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:돌아온꼰대(이)가 수춘 공략에 성공했습니다. -●10월:누군가가 건녕(을)를 살피는 것 같습니다. -●10월:보컬로이드바닥을탁치고(이)가 복양(으)로 진격합니다. -●10월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●10월:바닥을탁치고(이)가 복양 공략에 성공했습니다. -●10월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●10월:코토와르의 수렵기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●10월:이쓰미(이)가 사모(+13)(을)를 습득했습니다! -●10월:종횡무진카토(이)가 주시(으)로 진격합니다. -●10월:카토의 호표기병(와)과 KAITO의 등갑병(이)가 대결합니다. -●10월:누군가가 위례(을)를 살피는 것 같습니다. -●10월:평민킬러(이)가 방천화극(+14)(을)를 습득했습니다! -●10월:보컬로이드Navy마초(이)가 역경(으)로 진격합니다. -●10월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:Navy마초(이)가 역경 공략에 성공했습니다. -●10월:보컬로이드돌아온꼰대(이)가 (으)로 진격합니다. -●10월:돌아온꼰대의 맹수병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●10월:잠둥이션의 악귀병(이)가 전멸했습니다. -●10월:돌아온꼰대(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:돌아온꼰대의 맹수병(이)가 퇴각했습니다. -●10월:누군가가 귀양(을)를 살피는 것 같습니다. -●11월:보컬로이드Air(이)가 (으)로 진격합니다. -●11월:Air(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:Air의 맹수병(이)가 퇴각했습니다. -●11월:종횡무진강서유서(이)가 주시(으)로 진격합니다. -●11월:강서유서의 연노병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●11월:보컬로이드야근탈출(이)가 강주(으)로 진격합니다. -●11월:야근탈출의 맹수병(와)과 평민킬러의 연노병(이)가 대결합니다. -●11월:야근탈출의 맹수병(이)가 퇴각했습니다. -●11월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●11월:코토와르(이)가 수렵기병(으)로 성벽을 공격합니다. -●11월:보컬로이드제갈여포(이)가 강주(으)로 진격합니다. -●11월:제갈여포의 석궁병(와)과 하루카의 등갑병(이)가 대결합니다. -●11월:제갈여포의 석궁병(이)가 퇴각했습니다. -●11월:누군가가 건업(을)를 살피는 것 같습니다. -●11월:보컬로이드박희수(이)가 강주(으)로 진격합니다. -●11월:박희수의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●11월:박희수의 등갑병(이)가 퇴각했습니다. -●11월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●11월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:Navy마초의 석궁병(이)가 퇴각했습니다. -●11월:고창에서 미이잉구경용(이)라는 호걸이 천하에 이름을 알립니다. -●12월:종횡무진강서유서(이)가 주시(으)로 진격합니다. -●12월:강서유서의 연노병(와)과 KAITO의 등갑병(이)가 대결합니다. -●12월:KAITO의 등갑병(이)가 전멸했습니다. -●12월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●12월:보컬로이드ⓜ능환(이)가 (으)로 진격합니다. -●12월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●12월:ⓜ능환(이)가 공략에 성공했습니다. -●12월:보컬로이드랜임1분장(이)가 귀양(으)로 진격합니다. -●12월:랜임1분장의 맹수병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:보컬로이드낭군(이)가 여남(으)로 진격합니다. -●12월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드くま(이)가 (으)로 진격합니다. -●12월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●12월:에서 금과 쌀을 도둑맞았습니다. -●12월:종횡무진대악마(이)가 주시(으)로 진격합니다. -●12월:대악마의 호표기병(와)과 비월의 등갑병(이)가 대결합니다. -◆1월:199년이 되었습니다. -●1월:종횡무진강서유서(이)가 주시(으)로 진격합니다. -●1월:강서유서의 연노병(와)과 비월의 등갑병(이)가 대결합니다. -●1월:비월의 등갑병(이)가 전멸했습니다. -●1월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●1월:강서유서(이)가 주시 공략에 성공했습니다. -●1월:정력왕(이)가 보컬로이드임관했습니다. -●1월:보컬로이드ⓜ능환(이)가 진양(으)로 진격합니다. -●1월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드이루나(이)가 (으)로 진격합니다. -●1월:이루나(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드랜임1분장(이)가 귀양(으)로 진격합니다. -●1월:랜임1분장(이)가 맹수병(으)로 성벽을 공격합니다. -●1월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●1월:누군가가 수춘(을)를 살피는 것 같습니다. -●1월:누군가가 운남(을)를 살피는 것 같습니다. -●1월:보컬로이드낭군(이)가 여남(으)로 진격합니다. -●1월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:낭군(이)가 여남 공략에 성공했습니다. -●1월:보컬로이드くま(이)가 진류(으)로 진격합니다. -●1월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●1월:종횡무진내나(이)가 운남(으)로 진격합니다. -●1월:내나의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●1월:누군가가 귀양(을)를 살피는 것 같습니다. -●2월:종횡무진임사영(이)가 관도(으)로 진격합니다. -●2월:임사영의 악귀병(와)과 바닥을탁치고의 흑귀병(이)가 대결합니다. -●2월:종횡무진강서유서(이)가 운남(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 엄백호의 등갑병(이)가 대결합니다. -●2월:강서유서의 연노병(이)가 퇴각했습니다. -●2월:보컬로이드ⓜ능환(이)가 진양(으)로 진격합니다. -●2월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●2월:ⓜ능환의 귀병(이)가 퇴각했습니다. -●2월:보컬로이드이루나(이)가 (으)로 진격합니다. -●2월:이루나(이)가 마귀병(으)로 성벽을 공격합니다. -●2월:이루나(이)가 공략에 성공했습니다. -●2월:의 백성들이 동요하고 있습니다. -●2월:보컬로이드카가미네렌(이)가 귀양(으)로 진격합니다. -●2월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●2월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●2월:엄백호의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●2월:종횡무진카토(이)가 운남(으)로 진격합니다. -●2월:카토의 호표기병(와)과 엄백호의 등갑병(이)가 대결합니다. -●2월:엄백호의 등갑병(이)가 전멸했습니다. -●2월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●2월:보컬로이드くま(이)가 진류(으)로 진격합니다. -●2월:くま(이)가 흑귀병(으)로 성벽을 공격합니다. -●2월:くま의 흑귀병(이)가 퇴각했습니다. -●2월:종횡무진잠둥이션(이)가 (으)로 진격합니다. -●2월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:종횡무진내나(이)가 운남(으)로 진격합니다. -●2월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●3월:의 백성들이 동요하고 있습니다. -●3월:종횡무진일본어번역기(이)가 (으)로 진격합니다. -●3월:일본어번역기의 악귀병(와)과 코토와르의 수렵기병(이)가 대결합니다. -●3월:보컬로이드카가미네렌(이)가 귀양(으)로 진격합니다. -●3월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:카가미네렌(이)가 귀양 공략에 성공했습니다. -●3월:종횡무진카토(이)가 운남(으)로 진격합니다. -●3월:카토의 호표기병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●3월:야근탈출의 맹수병(이)가 전멸했습니다. -●3월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●3월:에서 금과 쌀을 도둑맞았습니다. -●3월:종횡무진평민킬러(이)가 운남(으)로 진격합니다. -●3월:평민킬러의 연노병(와)과 KAITO의 등갑병(이)가 대결합니다. -●3월:보컬로이드Navy마초(이)가 사수(으)로 진격합니다. -●3월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:종횡무진잠둥이션(이)가 (으)로 진격합니다. -●3월:잠둥이션의 악귀병(와)과 Air의 맹수병(이)가 대결합니다. -●3월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●3월:보컬로이드돌아온꼰대(이)가 진류(으)로 진격합니다. -●3월:돌아온꼰대(이)가 수렵기병(으)로 성벽을 공격합니다. -●3월:돌아온꼰대(이)가 진류 공략에 성공했습니다. -●3월:누군가가 주시(을)를 살피는 것 같습니다. -●4월:종횡무진임사영(이)가 관도(으)로 진격합니다. -●4월:임사영의 악귀병(와)과 정휘인의 마귀병(이)가 대결합니다. -●4월:임사영의 악귀병(이)가 퇴각했습니다. -●4월:보컬로이드이루나(이)가 허창(으)로 진격합니다. -●4월:이루나의 마귀병(와)과 박일아의 호표기병(이)가 대결합니다. -●4월:이루나의 마귀병(이)가 퇴각했습니다. -●4월:보컬로이드카가미네렌(이)가 주시(으)로 진격합니다. -●4월:카가미네렌의 석궁병(와)과 대악마의 호표기병(이)가 대결합니다. -●4월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●4월:보컬로이드낭군(이)가 허창(으)로 진격합니다. -●4월:낭군의 신귀병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●4월:낭군의 신귀병(이)가 퇴각했습니다. -●4월:다이스(이)가 보컬로이드임관했습니다. -●4월:누군가가 허창(을)를 살피는 것 같습니다. -●4월:보컬로이드제갈여포(이)가 허창(으)로 진격합니다. -●4월:제갈여포의 석궁병(와)과 박일아의 호표기병(이)가 대결합니다. -●4월:종횡무진평민킬러(이)가 귀양(으)로 진격합니다. -●4월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●4월:평민킬러의 연노병(이)가 퇴각했습니다. -●4월:에서 금과 쌀을 도둑맞았습니다. -●4월:보컬로이드Navy마초(이)가 사수(으)로 진격합니다. -●4월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●5월:보컬로이드Air(이)가 허창(으)로 진격합니다. -●5월:Air의 맹수병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●5월:일본어번역기의 악귀병(이)가 전멸했습니다. -●5월:Air의 맹수병(와)과 박일아의 호표기병(이)가 대결합니다. -●5월:Air의 맹수병(이)가 퇴각했습니다. -●5월:보컬로이드바닥을탁치고(이)가 주시(으)로 진격합니다. -●5월:바닥을탁치고의 흑귀병(와)과 하루카의 등갑병(이)가 대결합니다. -●5월:보컬로이드제갈여포(이)가 허창(으)로 진격합니다. -●5월:제갈여포의 석궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:미이잉구경용(이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다. -●5월:보컬로이드Navy마초(이)가 허창(으)로 진격합니다. -●5월:Navy마초의 석궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:Navy마초의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드돌아온꼰대(이)가 허창(으)로 진격합니다. -●5월:돌아온꼰대의 수렵기병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:강서유서의 연노병(이)가 전멸했습니다. -●5월:돌아온꼰대(이)가 수렵기병(으)로 성벽을 공격합니다. -●6월:보컬로이드KAITO(이)가 주시(으)로 진격합니다. -●6월:KAITO의 등갑병(와)과 내나의 악귀병(이)가 대결합니다. -●6월:KAITO의 등갑병(이)가 퇴각했습니다. -●6월:보컬로이드바닥을탁치고(이)가 허창(으)로 진격합니다. -●6월:바닥을탁치고(이)가 흑귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드정휘인(이)가 허창(으)로 진격합니다. -●6월:정휘인의 마귀병(와)과 카토의 호표기병(이)가 대결합니다. -●6월:정휘인의 마귀병(이)가 퇴각했습니다. -●6월:보컬로이드제갈여포(이)가 허창(으)로 진격합니다. -●6월:제갈여포의 석궁병(와)과 카토의 호표기병(이)가 대결합니다. -●6월:카토의 호표기병(이)가 전멸했습니다. -●6월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●6월:제갈여포의 석궁병(이)가 퇴각했습니다. -●6월:보컬로이드くま(이)가 허창(으)로 진격합니다. -●6월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●6월:에서 금과 쌀을 도둑맞았습니다. -●6월:보컬로이드돌아온꼰대(이)가 허창(으)로 진격합니다. -●6월:돌아온꼰대의 수렵기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●6월:돌아온꼰대의 수렵기병(이)가 퇴각했습니다. -●6월:누군가가 주시(을)를 살피는 것 같습니다. -●6월:보컬로이드橙(이)가 정도(으)로 진격합니다. -●6월:橙(이)가 충차(으)로 성벽을 공격합니다. -●6월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●6월:대악마의 호표기병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●7월:누군가가 허창(을)를 살피는 것 같습니다. -●7월:보컬로이드야근탈출(이)가 주시(으)로 진격합니다. -●7월:야근탈출의 맹수병(와)과 대악마의 호표기병(이)가 대결합니다. -●7월:야근탈출의 맹수병(이)가 퇴각했습니다. -●7월:의 백성들이 동요하고 있습니다. -●7월:보컬로이드くま(이)가 진양(으)로 진격합니다. -●7월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:くま(이)가 진양 공략에 성공했습니다. -●7월:미친과학(이)가 유산 상속 문제로 다투다가 살해당했습니다. -●7월:종횡무진내나(이)가 귀양(으)로 진격합니다. -●7월:내나의 악귀병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●7월:내나의 악귀병(이)가 퇴각했습니다. -●7월:보컬로이드橙(이)가 정도(으)로 진격합니다. -●7월:橙(이)가 충차(으)로 성벽을 공격합니다. -●7월:橙(이)가 정도 공략에 성공했습니다. -●8월:누군가가 호로(을)를 살피는 것 같습니다. -●8월:보컬로이드이루나(이)가 허창(으)로 진격합니다. -●8월:이루나(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:이루나(이)가 허창 공략에 성공했습니다. -●8월:보컬로이드코토와르(이)가 하내(으)로 진격합니다. -●8월:코토와르의 수렵기병(와)과 임사영의 악귀병(이)가 대결합니다. -●8월:보컬로이드카가미네렌(이)가 주시(으)로 진격합니다. -●8월:카가미네렌의 석궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●8월:보컬로이드박희수(이)가 하내(으)로 진격합니다. -●8월:박희수의 등갑병(와)과 박일아의 호표기병(이)가 대결합니다. -●8월:보컬로이드くま(이)가 하내(으)로 진격합니다. -●8월:くま의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●8월:くま의 마귀병(이)가 퇴각했습니다. -●8월:종횡무진평민킬러(이)가 귀양(으)로 진격합니다. -●8월:평민킬러(이)가 연노병(으)로 성벽을 공격합니다. -●8월:평민킬러(이)가 귀양 공략에 성공했습니다. -●8월:누군가가 강주(을)를 살피는 것 같습니다. -●9월:종횡무진강서유서(이)가 진양(으)로 진격합니다. -●9월:강서유서의 연노병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●9월:보컬로이드코토와르(이)가 하내(으)로 진격합니다. -●9월:코토와르의 수렵기병(와)과 강서유서의 연노병(이)가 대결합니다. -●9월:코토와르의 수렵기병(이)가 퇴각했습니다. -●9월:ㅇωㅇ(이)가 웃다가 숨이 넘어가 죽고 말았습니다. -●9월:에서 금과 쌀을 도둑맞았습니다. -●9월:보컬로이드박희수(이)가 하내(으)로 진격합니다. -●9월:박희수의 등갑병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●9월:종횡무진평민킬러(이)가 운남(으)로 진격합니다. -●9월:평민킬러의 연노병(와)과 KAITO의 등갑병(이)가 대결합니다. -●9월:평민킬러의 연노병(이)가 퇴각했습니다. -●9월:보컬로이드Navy마초(이)가 하내(으)로 진격합니다. -●9월:Navy마초의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●9월:Navy마초의 석궁병(이)가 퇴각했습니다. -●9월:종횡무진잠둥이션(이)가 진양(으)로 진격합니다. -●9월:잠둥이션의 악귀병(와)과 바닥을탁치고의 흑귀병(이)가 대결합니다. -●9월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●9월:누군가가 하내(을)를 살피는 것 같습니다. -●9월:누군가가 호관(을)를 살피는 것 같습니다. -●10월:종횡무진임사영(이)가 진양(으)로 진격합니다. -●10월:임사영의 악귀병(와)과 낭군의 신귀병(이)가 대결합니다. -●10월:임사영의 악귀병(이)가 퇴각했습니다. -●10월:종횡무진강서유서(이)가 진양(으)로 진격합니다. -●10월:강서유서의 연노병(와)과 정휘인의 마귀병(이)가 대결합니다. -●10월:강서유서의 연노병(이)가 퇴각했습니다. -●10월:보컬로이드ⓜ능환(이)가 사수(으)로 진격합니다. -●10월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드KAITO(이)가 주시(으)로 진격합니다. -●10월:KAITO의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●10월:KAITO의 등갑병(이)가 퇴각했습니다. -●10월:보컬로이드바닥을탁치고(이)가 하내(으)로 진격합니다. -●10월:바닥을탁치고의 흑귀병(와)과 박일아의 호표기병(이)가 대결합니다. -●10월:바닥을탁치고의 흑귀병(이)가 퇴각했습니다. -●10월:보컬로이드낭군(이)가 호관(으)로 진격합니다. -●10월:낭군(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●10월:엄백호의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●10월:HideD(이)가 노자(+15)(을)를 습득했습니다! -●10월:보컬로이드다이스(이)가 귀양(으)로 진격합니다. -●10월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:보컬로이드하기싫은데(이)가 호관(으)로 진격합니다. -●10월:하기싫은데(이)가 충차(으)로 성벽을 공격합니다. -●10월:보컬로이드제갈여포(이)가 하내(으)로 진격합니다. -●10월:제갈여포의 석궁병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●10월:일본어번역기의 악귀병(이)가 전멸했습니다. -●10월:제갈여포의 석궁병(와)과 박일아의 호표기병(이)가 대결합니다. -●10월:박일아의 호표기병(이)가 전멸했습니다. -●10월:보컬로이드돌아온꼰대(이)가 하내(으)로 진격합니다. -●10월:돌아온꼰대의 수렵기병(와)과 카토의 돌격기병(이)가 대결합니다. -●10월:누군가가 주시(을)를 살피는 것 같습니다. -●10월:보컬로이드橙(이)가 호관(으)로 진격합니다. -●10월:橙(이)가 충차(으)로 성벽을 공격합니다. -●10월:橙(이)가 호관 공략에 성공했습니다. -●11월:의 백성들이 동요하고 있습니다. -●11월:보컬로이드다이스(이)가 귀양(으)로 진격합니다. -●11월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:다이스(이)가 귀양 공략에 성공했습니다. -●11월:보컬로이드정휘인(이)가 하내(으)로 진격합니다. -●11월:정휘인의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●11월:종횡무진하루카(이)가 운남(으)로 진격합니다. -●11월:하루카의 등갑병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●11월:하루카의 등갑병(이)가 퇴각했습니다. -●11월:종횡무진카토(이)가 진양(으)로 진격합니다. -●11월:카토의 돌격기병(와)과 Air의 맹수병(이)가 대결합니다. -●11월:Air의 맹수병(이)가 전멸했습니다. -●11월:누군가가 하내(을)를 살피는 것 같습니다. -●11월:보컬로이드비월(이)가 주시(으)로 진격합니다. -●11월:비월의 등갑병(와)과 대악마의 돌격기병(이)가 대결합니다. -●11월:종횡무진내나(이)가 호관(으)로 진격합니다. -●11월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:누군가가 강주(을)를 살피는 것 같습니다. -●11월:보컬로이드橙(이)가 낙양(으)로 진격합니다. -●11월:橙(이)가 충차(으)로 성벽을 공격합니다. -●11월:橙(이)가 낙양 공략에 성공했습니다. -●11월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●11월:대악마의 돌격기병(와)과 국민기업의 등갑병(이)가 대결합니다. -●11월:국민기업의 등갑병(이)가 전멸했습니다. -●12월:보컬로이드야근탈출(이)가 주시(으)로 진격합니다. -●12월:야근탈출의 맹수병(와)과 대악마의 돌격기병(이)가 대결합니다. -●12월:야근탈출의 맹수병(이)가 퇴각했습니다. -●12월:보컬로이드ⓜ능환(이)가 하내(으)로 진격합니다. -●12월:ⓜ능환의 귀병(와)과 카토의 돌격기병(이)가 대결합니다. -●12월:카토의 돌격기병(이)가 전멸했습니다. -●12월:ⓜ능환의 귀병(와)과 내나의 악귀병(이)가 대결합니다. -●12월:내나의 악귀병(이)가 전멸했습니다. -●12월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드다이스(이)가 강주(으)로 진격합니다. -●12월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:보컬로이드제갈여포(이)가 강주(으)로 진격합니다. -●12월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:보컬로이드くま(이)가 하내(으)로 진격합니다. -●12월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:누군가가 하내(을)를 살피는 것 같습니다. -●12월:보컬로이드橙(이)가 사수(으)로 진격합니다. -●12월:橙(이)가 충차(으)로 성벽을 공격합니다. -●12월:종횡무진대악마(이)가 운남(으)로 진격합니다. -●12월:대악마의 돌격기병(와)과 러스티건의 석궁병(이)가 대결합니다. -●12월:대악마의 돌격기병(이)가 퇴각했습니다. -◆1월:200년이 되었습니다. -●1월:KAITO(이)가 어엿븐소드락선전 포고 하였습니다. -●1월:보컬로이드코토와르(이)가 하내(으)로 진격합니다. -●1월:코토와르의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:낙양에서 금과 쌀을 도둑맞았습니다. -●1월:보컬로이드박희수(이)가 하내(으)로 진격합니다. -●1월:박희수의 등갑병(와)과 임사영의 악귀병(이)가 대결합니다. -●1월:보컬로이드くま(이)가 하내(으)로 진격합니다. -●1월:くま의 마귀병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●1월:종횡무진평민킬러(이)가 진양(으)로 진격합니다. -●1월:평민킬러의 연노병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●1월:보컬로이드Navy마초(이)가 하내(으)로 진격합니다. -●1월:Navy마초의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●1월:Navy마초의 석궁병(이)가 퇴각했습니다. -●1월:종횡무진박일아(이)가 진양(으)로 진격합니다. -●1월:박일아의 중장기병(와)과 바닥을탁치고의 흑귀병(이)가 대결합니다. -●1월:보컬로이드비월(이)가 주시(으)로 진격합니다. -●1월:비월의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:비월의 등갑병(이)가 퇴각했습니다. -●1월:누군가가 흉노(을)를 살피는 것 같습니다. -●1월:보컬로이드橙(이)가 사수(으)로 진격합니다. -●1월:橙(이)가 충차(으)로 성벽을 공격합니다. -●1월:橙(이)가 사수 공략에 성공했습니다. -●2월:종횡무진임사영(이)가 진양(으)로 진격합니다. -●2월:임사영의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●2월:임사영의 악귀병(이)가 퇴각했습니다. -●2월:샌프란시스코(이)가 종횡무진에서 추방당하였습니다. -●2월:아르카나하트(이)가 춘화첩(사기)(을)를 습득했습니다! -●2월:종횡무진강서유서(이)가 귀양(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●2월:차오루(이)가 종횡무진에서 추방당하였습니다. -●2월:보컬로이드바닥을탁치고(이)가 하내(으)로 진격합니다. -●2월:바닥을탁치고의 흑귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●2월:바닥을탁치고의 흑귀병(이)가 퇴각했습니다. -●2월:보컬로이드코토와르(이)가 하내(으)로 진격합니다. -●2월:코토와르의 호표기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●2월:코토와르의 호표기병(이)가 퇴각했습니다. -●2월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●2월:엄백호의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:강서유서의 연노병(이)가 전멸했습니다. -●2월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●2월:보컬로이드박희수(이)가 하내(으)로 진격합니다. -●2월:박희수의 등갑병(와)과 카토의 돌격기병(이)가 대결합니다. -●2월:박희수의 등갑병(이)가 퇴각했습니다. -●2월:보컬로이드くま(이)가 하내(으)로 진격합니다. -●2월:くま의 마귀병(와)과 카토의 돌격기병(이)가 대결합니다. -●2월:くま의 마귀병(이)가 퇴각했습니다. -●2월:종횡무진박일아(이)가 진양(으)로 진격합니다. -●2월:박일아의 중장기병(와)과 낭군의 마귀병(이)가 대결합니다. -●2월:박일아의 중장기병(이)가 퇴각했습니다. -●2월:종횡무진잠둥이션(이)가 진양(으)로 진격합니다. -●2월:잠둥이션의 악귀병(와)과 정휘인의 마귀병(이)가 대결합니다. -●2월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●2월:누군가가 적도(을)를 살피는 것 같습니다. -●3월:의 백성들이 동요하고 있습니다. -●3월:보컬로이드카가미네렌(이)가 강주(으)로 진격합니다. -●3월:카가미네렌의 석궁병(와)과 하루카의 등갑병(이)가 대결합니다. -●3월:보컬로이드낭군(이)가 하내(으)로 진격합니다. -●3월:낭군의 마귀병(와)과 카토의 돌격기병(이)가 대결합니다. -●3월:낭군의 마귀병(이)가 퇴각했습니다. -●3월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●3월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●3월:보컬로이드정휘인(이)가 하내(으)로 진격합니다. -●3월:정휘인의 마귀병(와)과 카토의 돌격기병(이)가 대결합니다. -●3월:정휘인의 마귀병(이)가 퇴각했습니다. -●3월:종횡무진하루카(이)가 귀양(으)로 진격합니다. -●3월:하루카의 등갑병(와)과 이루나의 마귀병(이)가 대결합니다. -●3월:낙양에서 금과 쌀을 도둑맞았습니다. -●3월:진양에서 금과 쌀을 도둑맞았습니다. -●3월:종횡무진내나(이)가 귀양(으)로 진격합니다. -●3월:내나의 악귀병(와)과 다이스의 석궁병(이)가 대결합니다. -●3월:누군가가 강주(을)를 살피는 것 같습니다. -●4월:보컬로이드KAITO(이)가 하내(으)로 진격합니다. -●4월:KAITO의 등갑병(와)과 카토의 돌격기병(이)가 대결합니다. -●4월:카토의 돌격기병(이)가 전멸했습니다. -●4월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●4월:KAITO(이)가 하내 공략에 성공했습니다. -●4월:보컬로이드국민기업(이)가 주시(으)로 진격합니다. -●4월:국민기업(이)가 맹수병(으)로 성벽을 공격합니다. -●4월:보컬로이드엄백호(이)가 주시(으)로 진격합니다. -●4월:엄백호(이)가 등갑병(으)로 성벽을 공격합니다. -●4월:엄백호(이)가 주시 공략에 성공했습니다. -●4월:종횡무진하루카(이)가 귀양(으)로 진격합니다. -●4월:하루카의 등갑병(와)과 정력왕의 마귀병(이)가 대결합니다. -●4월:정력왕의 마귀병(이)가 전멸했습니다. -●4월:보컬로이드제갈여포(이)가 강주(으)로 진격합니다. -●4월:제갈여포의 석궁병(와)과 하루카의 등갑병(이)가 대결합니다. -●4월:제갈여포의 석궁병(이)가 퇴각했습니다. -●4월:돌아온꼰대(이)가 오석산(치료)(을)를 습득했습니다! -●4월:누군가가 흉노(을)를 살피는 것 같습니다. -●4월:보컬로이드橙(이)가 호로(으)로 진격합니다. -●4월:橙(이)가 충차(으)로 성벽을 공격합니다. -●5월:보컬로이드카가미네렌(이)가 강주(으)로 진격합니다. -●5월:카가미네렌의 석궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드비월(이)가 강주(으)로 진격합니다. -●5월:비월의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●5월:종횡무진내나(이)가 귀양(으)로 진격합니다. -●5월:내나의 악귀병(와)과 비월의 등갑병(이)가 대결합니다. -●5월:비월의 등갑병(이)가 전멸했습니다. -●5월:내나의 악귀병(와)과 다이스의 석궁병(이)가 대결합니다. -●5월:내나의 악귀병(이)가 퇴각했습니다. -●5월:누군가가 적도(을)를 살피는 것 같습니다. -●5월:종횡무진대악마(이)가 귀양(으)로 진격합니다. -●5월:대악마의 돌격기병(와)과 이루나의 마귀병(이)가 대결합니다. -●5월:이루나의 마귀병(이)가 전멸했습니다. -●5월:대악마의 돌격기병(와)과 다이스의 석궁병(이)가 대결합니다. -●6월:종횡무진강서유서(이)가 귀양(으)로 진격합니다. -●6월:강서유서의 연노병(와)과 다이스의 석궁병(이)가 대결합니다. -●6월:다이스의 석궁병(이)가 전멸했습니다. -●6월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●6월:보컬로이드KAITO(이)가 흉노(으)로 진격합니다. -●6월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:KAITO(이)가 흉노 공략에 성공했습니다. -●6월:하내에서 금과 쌀을 도둑맞았습니다. -●6월:종횡무진평민킬러(이)가 주시(으)로 진격합니다. -●6월:평민킬러의 연노병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●6월:야근탈출의 맹수병(이)가 전멸했습니다. -●6월:평민킬러의 연노병(와)과 국민기업의 맹수병(이)가 대결합니다. -●6월:누군가가 강주(을)를 살피는 것 같습니다. -●6월:종횡무진대악마(이)가 귀양(으)로 진격합니다. -●6월:대악마의 돌격기병(와)과 정휘인의 마귀병(이)가 대결합니다. -●6월:대악마의 돌격기병(이)가 퇴각했습니다. -●7월:종횡무진강서유서(이)가 귀양(으)로 진격합니다. -●7월:강서유서의 연노병(와)과 정휘인의 마귀병(이)가 대결합니다. -●7월:정휘인의 마귀병(이)가 전멸했습니다. -●7월:강서유서(이)가 연노병(으)로 성벽을 공격합니다. -●7월:누군가가 한중(을)를 살피는 것 같습니다. -●7월:보컬로이드くま(이)가 적도(으)로 진격합니다. -●7월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:하내에서 금과 쌀을 도둑맞았습니다. -●7월:종횡무진평민킬러(이)가 주시(으)로 진격합니다. -●7월:평민킬러의 연노병(와)과 국민기업의 맹수병(이)가 대결합니다. -●7월:평민킬러의 연노병(이)가 퇴각했습니다. -●8월:접속잘안함아소(이)가 호로(으)로 진격합니다. -●8월:아소(이)가 기병(으)로 성벽을 공격합니다. -●8월:접속잘안함Anes(이)가 한중(으)로 진격합니다. -●8월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●8월:접속잘안함북두칠성(이)가 한중(으)로 진격합니다. -●8월:북두칠성(이)가 등갑병(으)로 성벽을 공격합니다. -●8월:북두칠성(이)가 한중 공략에 성공했습니다. -●8월:접속잘안함카이사르(이)가 덕양(으)로 진격합니다. -●8월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●8월:접속잘안함장임(이)가 강주(으)로 진격합니다. -●8월:장임의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●8월:강서유서의 연노병(이)가 전멸했습니다. -●8월:장임의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●8월:보컬로이드엄백호(이)가 강주(으)로 진격합니다. -●8월:엄백호의 등갑병(와)과 하루카의 등갑병(이)가 대결합니다. -●8월:엄백호의 등갑병(이)가 퇴각했습니다. -●8월:종횡무진하루카(이)가 귀양(으)로 진격합니다. -●8월:하루카의 등갑병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●8월:하루카의 등갑병(이)가 퇴각했습니다. -●8월:낙양에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드くま(이)가 적도(으)로 진격합니다. -●8월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:くま(이)가 적도 공략에 성공했습니다. -●9월:접속잘안함아소(이)가 호로(으)로 진격합니다. -●9월:아소(이)가 기병(으)로 성벽을 공격합니다. -●9월:아소(이)가 호로 공략에 성공했습니다. -●9월:접속잘안함니쉬(이)가 기산(으)로 진격합니다. -●9월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함카이사르(이)가 덕양(으)로 진격합니다. -●9월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●9월:카이사르(이)가 덕양 공략에 성공했습니다. -●9월:접속잘안함장임(이)가 강주(으)로 진격합니다. -●9월:장임의 등갑병(와)과 내나의 악귀병(이)가 대결합니다. -●9월:누군가가 기산(을)를 살피는 것 같습니다. -●9월:보컬로이드카가미네렌(이)가 강주(으)로 진격합니다. -●9월:카가미네렌의 석궁병(와)과 내나의 악귀병(이)가 대결합니다. -●9월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●9월:보컬로이드다이스(이)가 강주(으)로 진격합니다. -●9월:다이스의 석궁병(와)과 내나의 악귀병(이)가 대결합니다. -●9월:내나의 악귀병(이)가 전멸했습니다. -●9월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:누군가가 양평(을)를 살피는 것 같습니다. -●9월:낙양에서 금과 쌀을 도둑맞았습니다. -●9월:접속잘안함비밀(이)가 강주(으)로 진격합니다. -●9월:비밀(이)가 신귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드くま(이)가 천수(으)로 진격합니다. -●9월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●9월:くま(이)가 천수 공략에 성공했습니다. -●9월:하내에서 금과 쌀을 도둑맞았습니다. -●9월:누군가가 강주(을)를 살피는 것 같습니다. -●9월:보컬로이드비월(이)가 강주(으)로 진격합니다. -●9월:비월(이)가 근위병(으)로 성벽을 공격합니다. -●9월:접속잘안함魯堂首(이)가 기산(으)로 진격합니다. -●9월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:누군가가 강주(을)를 살피는 것 같습니다. -●10월:보컬로이드야근탈출(이)가 강주(으)로 진격합니다. -●10월:야근탈출(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:접속잘안함니쉬(이)가 기산(으)로 진격합니다. -●10월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함카이사르(이)가 강주(으)로 진격합니다. -●10월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●10월:접속잘안함장임(이)가 자동(으)로 진격합니다. -●10월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:장임의 등갑병(이)가 퇴각했습니다. -●10월:접속잘안함DVa(이)가 기산(으)로 진격합니다. -●10월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●10월:DVa(이)가 기산 공략에 성공했습니다. -●10월:보컬로이드KAITO(이)가 안정(으)로 진격합니다. -●10월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:접속잘안함무광(이)가 양평(으)로 진격합니다. -●10월:무광(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함HideD(이)가 양평(으)로 진격합니다. -●10월:HideD(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드다이스(이)가 강주(으)로 진격합니다. -●10월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:접속잘안함이쓰미(이)가 자동(으)로 진격합니다. -●10월:이쓰미(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함선비(이)가 강주(으)로 진격합니다. -●10월:선비(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드제갈여포(이)가 강주(으)로 진격합니다. -●10월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:접속잘안함비밀(이)가 강주(으)로 진격합니다. -●10월:비밀(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드くま(이)가 안정(으)로 진격합니다. -●10월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●10월:くま(이)가 안정 공략에 성공했습니다. -●10월:하내에서 금과 쌀을 도둑맞았습니다. -●10월:에서 금과 쌀을 도둑맞았습니다. -●10월:보컬로이드비월(이)가 강주(으)로 진격합니다. -●10월:비월(이)가 근위병(으)로 성벽을 공격합니다. -●10월:접속잘안함魯堂首(이)가 양평(으)로 진격합니다. -●10월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:보컬로이드돌아온꼰대(이)가 강주(으)로 진격합니다. -●10월:돌아온꼰대(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:접속잘안함Anes(이)가 장안(으)로 진격합니다. -●11월:Anes(이)가 기병(으)로 성벽을 공격합니다. -●11월:보컬로이드야근탈출(이)가 강주(으)로 진격합니다. -●11월:야근탈출(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:접속잘안함니쉬(이)가 장안(으)로 진격합니다. -●11월:니쉬(이)가 신귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함감정(이)가 장안(으)로 진격합니다. -●11월:감정(이)가 충차(으)로 성벽을 공격합니다. -●11월:감정(이)가 장안 공략에 성공했습니다. -●11월:보컬로이드랜임1분장(이)가 강주(으)로 진격합니다. -●11월:랜임1분장(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:랜임1분장(이)가 강주 공략에 성공했습니다. -●11월:접속잘안함DVa(이)가 양평(으)로 진격합니다. -●11월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●11월:보컬로이드KAITO(이)가 가정(으)로 진격합니다. -●11월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:KAITO의 등갑병(이)가 퇴각했습니다. -●11월:종횡무진일본어번역기(이)가 덕양(으)로 진격합니다. -●11월:일본어번역기의 악귀병(와)과 이쓰미의 신귀병(이)가 대결합니다. -●11월:이쓰미의 신귀병(이)가 전멸했습니다. -●11월:일본어번역기의 악귀병(와)과 선비의 신귀병(이)가 대결합니다. -●11월:접속잘안함HideD(이)가 양평(으)로 진격합니다. -●11월:HideD(이)가 신귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함비밀(이)가 자동(으)로 진격합니다. -●11월:비밀의 신귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●11월:비밀의 신귀병(이)가 퇴각했습니다. -●11월:보컬로이드돌아온꼰대(이)가 가정(으)로 진격합니다. -●11월:돌아온꼰대(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:종횡무진대악마(이)가 덕양(으)로 진격합니다. -●11월:대악마의 철기병(와)과 선비의 신귀병(이)가 대결합니다. -●11월:선비의 신귀병(이)가 전멸했습니다. -●11월:대악마의 철기병(와)과 Anes의 기병(이)가 대결합니다. -●12월:접속잘안함감정(이)가 자동(으)로 진격합니다. -●12월:감정의 충차(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:감정의 충차(이)가 퇴각했습니다. -●12월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●12월:랜임1분장의 맹수병(와)과 임사영의 악귀병(이)가 대결합니다. -●12월:접속잘안함카이사르(이)가 자동(으)로 진격합니다. -●12월:카이사르의 강궁병(와)과 카토의 중장기병(이)가 대결합니다. -●12월:카이사르의 강궁병(이)가 퇴각했습니다. -●12월:접속잘안함DVa(이)가 양평(으)로 진격합니다. -●12월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●12월:DVa(이)가 양평 공략에 성공했습니다. -●12월:보컬로이드KAITO(이)가 가정(으)로 진격합니다. -●12월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●12월:보컬로이드바닥을탁치고(이)가 가정(으)로 진격합니다. -●12월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:바닥을탁치고(이)가 가정 공략에 성공했습니다. -●12월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●12월:엄백호의 등갑병(와)과 대악마의 철기병(이)가 대결합니다. -●12월:엄백호의 등갑병(이)가 퇴각했습니다. -●12월:누군가가 자동(을)를 살피는 것 같습니다. -●12월:종횡무진카토(이)가 덕양(으)로 진격합니다. -●12월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●12월:카토(이)가 덕양 공략에 성공했습니다. -●12월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●12월:제갈여포의 석궁병(와)과 임사영의 악귀병(이)가 대결합니다. -●12월:임사영의 악귀병(이)가 전멸했습니다. -●12월:제갈여포의 석궁병(와)과 대악마의 철기병(이)가 대결합니다. -●12월:제갈여포의 석궁병(이)가 퇴각했습니다. -●12월:소드락(이)가 접속잘안함선전 포고 하였습니다. -●12월:하내에서 금과 쌀을 도둑맞았습니다. -●12월:보컬로이드Navy마초(이)가 하변(으)로 진격합니다. -●12월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:보컬로이드돌아온꼰대(이)가 하변(으)로 진격합니다. -●12월:돌아온꼰대(이)가 호표기병(으)로 성벽을 공격합니다. -●12월:돌아온꼰대의 호표기병(이)가 퇴각했습니다. -●12월:누군가가 하변(을)를 살피는 것 같습니다. -●12월:종횡무진대악마(이)가 강주(으)로 진격합니다. -●12월:대악마의 철기병(와)과 정휘인의 마귀병(이)가 대결합니다. -●12월:정휘인의 마귀병(이)가 전멸했습니다. -◆1월:201년이 되었습니다. -●1월:보컬로이드이루나(이)가 하변(으)로 진격합니다. -●1월:이루나의 마귀병(와)과 박일아의 중장기병(이)가 대결합니다. -●1월:이루나의 마귀병(이)가 퇴각했습니다. -●1월:보컬로이드KAITO(이)가 하변(으)로 진격합니다. -●1월:KAITO의 등갑병(와)과 박일아의 중장기병(이)가 대결합니다. -●1월:KAITO의 등갑병(이)가 퇴각했습니다. -●1월:보컬로이드바닥을탁치고(이)가 하변(으)로 진격합니다. -●1월:바닥을탁치고의 마귀병(와)과 박일아의 중장기병(이)가 대결합니다. -●1월:박일아의 중장기병(이)가 전멸했습니다. -●1월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●1월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●1월:접속잘안함무광(이)가 자동(으)로 진격합니다. -●1월:무광의 신귀병(와)과 하루카의 자객병(이)가 대결합니다. -●1월:무광의 신귀병(이)가 퇴각했습니다. -●1월:보컬로이드낭군(이)가 하변(으)로 진격합니다. -●1월:낭군(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●1월:다이스의 석궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●1월:다이스의 석궁병(이)가 퇴각했습니다. -●1월:접속잘안함전인호(이)가 덕양(으)로 진격합니다. -●1월:전인호(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:종횡무진카토(이)가 양평(으)로 진격합니다. -●1월:카토(이)가 중장기병(으)로 성벽을 공격합니다. -●1월:카토의 중장기병(이)가 퇴각했습니다. -●1월:보컬로이드박희수(이)가 하변(으)로 진격합니다. -●1월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●1월:종횡무진잠둥이션(이)가 강주(으)로 진격합니다. -●1월:잠둥이션의 악귀병(와)과 정력왕의 마귀병(이)가 대결합니다. -●1월:정력왕의 마귀병(이)가 전멸했습니다. -●2월:종횡무진강서유서(이)가 강주(으)로 진격합니다. -●2월:강서유서의 연노병(와)과 비월의 근위병(이)가 대결합니다. -●2월:접속잘안함장임(이)가 덕양(으)로 진격합니다. -●2월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●2월:장임(이)가 덕양 공략에 성공했습니다. -●2월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●2월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●2월:코토와르(이)가 공략에 성공했습니다. -●2월:보컬로이드카가미네렌(이)가 성도(으)로 진격합니다. -●2월:카가미네렌의 석궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●2월:보컬로이드낭군(이)가 하변(으)로 진격합니다. -●2월:낭군(이)가 마귀병(으)로 성벽을 공격합니다. -●2월:종횡무진하루카(이)가 덕양(으)로 진격합니다. -●2월:하루카의 자객병(와)과 장임의 등갑병(이)가 대결합니다. -●2월:보컬로이드하기싫은데(이)가 하변(으)로 진격합니다. -●2월:하기싫은데의 충차(와)과 박일아의 중장기병(이)가 대결합니다. -●2월:하기싫은데의 충차(이)가 퇴각했습니다. -●2월:보컬로이드박희수(이)가 하변(으)로 진격합니다. -●2월:박희수의 등갑병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●2월:보컬로이드くま(이)가 하변(으)로 진격합니다. -●2월:くま의 마귀병(와)과 박일아의 중장기병(이)가 대결합니다. -●2월:박일아의 중장기병(이)가 전멸했습니다. -●2월:くま의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●2월:잠둥이션의 악귀병(이)가 전멸했습니다. -●2월:장안에서 금과 쌀을 도둑맞았습니다. -●2월:보컬로이드Navy마초(이)가 하변(으)로 진격합니다. -●2월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:종횡무진강서유서(이)가 덕양(으)로 진격합니다. -●3월:강서유서의 연노병(와)과 장임의 등갑병(이)가 대결합니다. -●3월:강서유서의 연노병(이)가 퇴각했습니다. -●3월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●3월:니쉬의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●3월:장임의 등갑병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:장임의 등갑병(이)가 퇴각했습니다. -●3월:접속잘안함DVa(이)가 자동(으)로 진격합니다. -●3월:DVa의 충차(와)과 내나의 악귀병(이)가 대결합니다. -●3월:DVa의 충차(이)가 퇴각했습니다. -●3월:보컬로이드코토와르(이)가 서량(으)로 진격합니다. -●3월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●3월:코토와르(이)가 서량 공략에 성공했습니다. -●3월:보컬로이드낭군(이)가 하변(으)로 진격합니다. -●3월:낭군의 마귀병(와)과 박일아의 중장기병(이)가 대결합니다. -●3월:낭군의 마귀병(이)가 퇴각했습니다. -●3월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●3월:이쓰미의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:누군가가 성도(을)를 살피는 것 같습니다. -●3월:보컬로이드くま(이)가 하변(으)로 진격합니다. -●3월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●3월:보컬로이드Navy마초(이)가 하변(으)로 진격합니다. -●3월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:Navy마초(이)가 하변 공략에 성공했습니다. -●4월:종횡무진임사영(이)가 덕양(으)로 진격합니다. -●4월:임사영의 천귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●4월:임사영의 천귀병(이)가 퇴각했습니다. -●4월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●4월:Anes의 기병(와)과 대악마의 철기병(이)가 대결합니다. -●4월:접속잘안함북두칠성(이)가 자동(으)로 진격합니다. -●4월:북두칠성의 등갑병(와)과 박일아의 중장기병(이)가 대결합니다. -●4월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●4월:니쉬의 악귀병(와)과 대악마의 철기병(이)가 대결합니다. -●4월:니쉬의 악귀병(이)가 퇴각했습니다. -●4월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●4월:랜임1분장의 맹수병(와)과 일본어번역기의 악귀병(이)가 대결합니다. -●4월:일본어번역기의 악귀병(이)가 전멸했습니다. -●4월:랜임1분장의 맹수병(와)과 대악마의 철기병(이)가 대결합니다. -●4월:접속잘안함카이사르(이)가 자동(으)로 진격합니다. -●4월:카이사르의 강궁병(와)과 내나의 천귀병(이)가 대결합니다. -●4월:강주의 백성들이 동요하고 있습니다. -●4월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●4월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●4월:코토와르(이)가 공략에 성공했습니다. -●4월:카가미네렌(이)가 적토마(+15)(을)를 습득했습니다! -●4월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●4월:엄백호의 근위병(와)과 대악마의 철기병(이)가 대결합니다. -●4월:대악마의 철기병(이)가 전멸했습니다. -●4월:엄백호(이)가 근위병(으)로 성벽을 공격합니다. -●4월:접속잘안함HideD(이)가 자동(으)로 진격합니다. -●4월:HideD의 신귀병(와)과 하루카의 자객병(이)가 대결합니다. -●4월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●4월:전인호(이)가 신귀병(으)로 성벽을 공격합니다. -●4월:종횡무진하루카(이)가 덕양(으)로 진격합니다. -●4월:하루카의 자객병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●4월:하루카의 자객병(이)가 퇴각했습니다. -●4월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●4월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●4월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●4월:魯堂首의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●4월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●4월:돌아온꼰대의 돌격기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●4월:평민킬러의 연노병(이)가 전멸했습니다. -●4월:돌아온꼰대(이)가 돌격기병(으)로 성벽을 공격합니다. -●4월:접속잘안함읭읭(이)가 자동(으)로 진격합니다. -●4월:읭읭의 중장기병(와)과 카토의 중장기병(이)가 대결합니다. -●4월:보컬로이드橙(이)가 가맹(으)로 진격합니다. -●4월:橙(이)가 충차(으)로 성벽을 공격합니다. -●5월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●5월:Anes의 기병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●5월:희지재(이)가 농사중 호미에 머리를 맞아 죽고말았습니다. -●5월:접속잘안함북두칠성(이)가 자동(으)로 진격합니다. -●5월:북두칠성의 등갑병(와)과 카토의 중장기병(이)가 대결합니다. -●5월:보컬로이드이루나(이)가 가맹(으)로 진격합니다. -●5월:이루나(이)가 황귀병(으)로 성벽을 공격합니다. -●5월:강하에서 미이잉구경(이)라는 호걸이 천하에 이름을 알립니다. -●5월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●5월:랜임1분장의 맹수병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●5월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●5월:접속잘안함카이사르(이)가 자동(으)로 진격합니다. -●5월:카이사르의 강궁병(와)과 카토의 중장기병(이)가 대결합니다. -●5월:카토의 중장기병(이)가 전멸했습니다. -●5월:카이사르의 강궁병(와)과 박일아의 중장기병(이)가 대결합니다. -●5월:박일아의 중장기병(이)가 전멸했습니다. -●5월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●5월:강주의 백성들이 동요하고 있습니다. -●5월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●5월:바닥을탁치고의 마귀병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●5월:접속잘안함카이스트(이)가 자동(으)로 진격합니다. -●5월:카이스트(이)가 신귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●5월:코토와르의 호표기병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●5월:잠둥이션의 천귀병(이)가 전멸했습니다. -●5월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●5월:코토와르의 호표기병(이)가 퇴각했습니다. -●5월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●5월:HideD(이)가 신귀병(으)로 성벽을 공격합니다. -●5월:HideD의 신귀병(이)가 퇴각했습니다. -●5월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●5월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●5월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●5월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●5월:누군가가 가맹(을)를 살피는 것 같습니다. -●5월:보컬로이드橙(이)가 가맹(으)로 진격합니다. -●5월:橙(이)가 충차(으)로 성벽을 공격합니다. -●6월:보컬로이드이루나(이)가 가맹(으)로 진격합니다. -●6월:이루나(이)가 황귀병(으)로 성벽을 공격합니다. -●6월:이루나(이)가 가맹 공략에 성공했습니다. -●6월:접속잘안함카이사르(이)가 자동(으)로 진격합니다. -●6월:카이사르의 강궁병(와)과 박일아의 기병(이)가 대결합니다. -●6월:박일아의 기병(이)가 전멸했습니다. -●6월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●6월:강주의 백성들이 동요하고 있습니다. -●6월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●6월:바닥을탁치고의 마귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●6월:바닥을탁치고의 마귀병(이)가 퇴각했습니다. -●6월:접속잘안함카이스트(이)가 자동(으)로 진격합니다. -●6월:카이스트(이)가 신귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함무광(이)가 자동(으)로 진격합니다. -●6월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●6월:다이스의 석궁병(와)과 대악마의 기병(이)가 대결합니다. -●6월:다이스의 석궁병(이)가 퇴각했습니다. -●6월:장안에서 금과 쌀을 도둑맞았습니다. -●6월:장안에서 금과 쌀을 도둑맞았습니다. -●6월:보컬로이드Navy마초(이)가 자동(으)로 진격합니다. -●6월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●6월:보컬로이드橙(이)가 자동(으)로 진격합니다. -●6월:橙(이)가 충차(으)로 성벽을 공격합니다. -●7월:강주의 백성들이 동요하고 있습니다. -●7월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●7월:장임의 등갑병(와)과 임사영의 천귀병(이)가 대결합니다. -●7월:접속잘안함DVa(이)가 자동(으)로 진격합니다. -●7월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●7월:접속잘안함무광(이)가 자동(으)로 진격합니다. -●7월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:무광(이)가 자동 공략에 성공했습니다. -●7월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●7월:낭군의 마귀병(와)과 내나의 천귀병(이)가 대결합니다. -●7월:누군가가 성도(을)를 살피는 것 같습니다. -●7월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●7월:이쓰미의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●7월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●7월:비월의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:종횡무진임사영(이)가 덕양(으)로 진격합니다. -●8월:임사영의 천귀병(와)과 니쉬의 악귀병(이)가 대결합니다. -●8월:종횡무진강서유서(이)가 덕양(으)로 진격합니다. -●8월:강서유서의 연노병(와)과 북오더의 강궁병(이)가 대결합니다. -●8월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●8월:니쉬의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●8월:니쉬의 악귀병(이)가 퇴각했습니다. -●8월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●8월:장임의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●8월:누군가가 성도(을)를 살피는 것 같습니다. -●8월:누군가가 면죽(을)를 살피는 것 같습니다. -●8월:접속잘안함무광(이)가 면죽(으)로 진격합니다. -●8월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:무광의 악귀병(이)가 퇴각했습니다. -●8월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●8월:낭군의 마귀병(와)과 하루카의 보병(이)가 대결합니다. -●8월:낭군의 마귀병(이)가 퇴각했습니다. -●8월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●8월:엄백호의 근위병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●8월:엄백호의 근위병(이)가 퇴각했습니다. -●8월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●8월:이쓰미의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●8월:박일아의 기병(이)가 전멸했습니다. -●8월:보컬로이드정휘인(이)가 성도(으)로 진격합니다. -●8월:정휘인의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:평민킬러의 연노병(이)가 전멸했습니다. -●8월:정휘인의 마귀병(와)과 하루카의 보병(이)가 대결합니다. -●8월:정휘인의 마귀병(이)가 퇴각했습니다. -●8월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●8월:전인호의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●8월:하루카의 보병(이)가 전멸했습니다. -●8월:전인호의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●8월:종횡무진카토(이)가 강주(으)로 진격합니다. -●8월:카토의 기병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●8월:카토의 기병(이)가 퇴각했습니다. -●8월:장안에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드박희수(이)가 성도(으)로 진격합니다. -●8월:박희수의 등갑병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●8월:일본어번역기의 천귀병(이)가 전멸했습니다. -●8월:보컬로이드くま(이)가 성도(으)로 진격합니다. -●8월:くま의 마귀병(와)과 내나의 천귀병(이)가 대결합니다. -●8월:내나의 천귀병(이)가 전멸했습니다. -●8월:くま의 마귀병(와)과 대악마의 기병(이)가 대결합니다. -●8월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●8월:비월의 근위병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●8월:비월의 근위병(이)가 퇴각했습니다. -●8월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●8월:魯堂首의 등갑병(와)과 박일아의 기병(이)가 대결합니다. -●9월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●9월:Anes의 중장기병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●9월:사비에서 미친과학(이)라는 호걸이 천하에 이름을 알립니다. -●9월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●9월:랜임1분장의 맹수병(와)과 박일아의 기병(이)가 대결합니다. -●9월:박일아의 기병(이)가 전멸했습니다. -●9월:랜임1분장의 맹수병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●9월:잠둥이션의 천귀병(이)가 전멸했습니다. -●9월:랜임1분장(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●9월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:장임의 등갑병(이)가 퇴각했습니다. -●9월:접속잘안함DVa(이)가 면죽(으)로 진격합니다. -●9월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●9월:DVa(이)가 면죽 공략에 성공했습니다. -●9월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●9월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●9월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●9월:보컬로이드카가미네렌(이)가 성도(으)로 진격합니다. -●9월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●9월:HideD의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●9월:제갈여포의 석궁병(와)과 내나의 천귀병(이)가 대결합니다. -●9월:장안에서 금과 쌀을 도둑맞았습니다. -●9월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●9월:비밀의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:평민킬러의 연노병(이)가 전멸했습니다. -●9월:비밀의 악귀병(와)과 내나의 천귀병(이)가 대결합니다. -●9월:보컬로이드くま(이)가 성도(으)로 진격합니다. -●9월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●9월:くま의 마귀병(이)가 퇴각했습니다. -●9월:미친과학(이)가 보컬로이드임관했습니다. -●9월:하내에서 금과 쌀을 도둑맞았습니다. -●9월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●9월:魯堂首의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●9월:돌아온꼰대의 돌격기병(와)과 박일아의 기병(이)가 대결합니다. -●10월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●10월:Anes의 중장기병(와)과 내나의 천귀병(이)가 대결합니다. -●10월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●10월:랜임1분장의 맹수병(와)과 평민킬러의 연노병(이)가 대결합니다. -●10월:평민킬러의 연노병(이)가 전멸했습니다. -●10월:랜임1분장의 맹수병(와)과 내나의 천귀병(이)가 대결합니다. -●10월:내나의 천귀병(이)가 전멸했습니다. -●10월:랜임1분장의 맹수병(와)과 박일아의 기병(이)가 대결합니다. -●10월:박일아의 기병(이)가 전멸했습니다. -●10월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●10월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●10월:누군가가 성도(을)를 살피는 것 같습니다. -●10월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●10월:KAITO의 등갑병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●10월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●10월:바닥을탁치고의 마귀병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●10월:잠둥이션의 천귀병(이)가 전멸했습니다. -●10월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●10월:카이스트(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●10월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●10월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●10월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:HideD의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●10월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●10월:비밀(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:비밀의 악귀병(이)가 퇴각했습니다. -●10월:접속잘안함그만좀불러좀(이)가 성도(으)로 진격합니다. -●10월:그만좀불러좀(이)가 신귀병(으)로 성벽을 공격합니다. -●10월:태극권(이)가 이튿날 침실에서 죽은채로발견되었습니다. -●10월:누군가가 성도(을)를 살피는 것 같습니다. -●10월:희대의 사기꾼 미이잉구경(이)가 사망했습니다. -●10월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●10월:돌아온꼰대의 돌격기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●10월:돌아온꼰대의 돌격기병(이)가 퇴각했습니다. -●10월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●10월:읭읭의 중장기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●10월:여남에서 ㅁㄴㅇ(이)라는 호걸이 천하에 이름을 알립니다. -●11월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●11월:아소의 기병(와)과 대악마의 기병(이)가 대결합니다. -●11월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●11월:북두칠성의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:샌프란시스코(이)가 우울증에 걸려 자살하고 말았습니다. -●11월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●11월:카이사르의 강궁병(와)과 임사영의 천귀병(이)가 대결합니다. -●11월:카이사르의 강궁병(이)가 퇴각했습니다. -●11월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●11월:KAITO의 등갑병(와)과 박일아의 기병(이)가 대결합니다. -●11월:KAITO의 등갑병(이)가 퇴각했습니다. -●11월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●11월:국민기업의 호표기병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●11월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●11월:바닥을탁치고의 마귀병(와)과 대악마의 기병(이)가 대결합니다. -●11월:바닥을탁치고의 마귀병(이)가 퇴각했습니다. -●11월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●11월:카이스트의 신귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:카이스트의 신귀병(이)가 퇴각했습니다. -●11월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●11월:코토와르의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●11월:코토와르의 호표기병(이)가 퇴각했습니다. -●11월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●11월:다이스의 석궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●11월:북오더의 강궁병(와)과 박일아의 기병(이)가 대결합니다. -●11월:박일아의 기병(이)가 전멸했습니다. -●11월:북오더의 강궁병(와)과 임사영의 천귀병(이)가 대결합니다. -●11월:누군가가 사곡(을)를 살피는 것 같습니다. -●12월:종횡무진임사영(이)가 덕양(으)로 진격합니다. -●12월:임사영의 천귀병(와)과 니쉬의 악귀병(이)가 대결합니다. -●12월:임사영의 천귀병(이)가 퇴각했습니다. -●12월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●12월:아소의 기병(와)과 대악마의 기병(이)가 대결합니다. -●12월:아소의 기병(이)가 퇴각했습니다. -●12월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●12월:북두칠성의 등갑병(와)과 대악마의 기병(이)가 대결합니다. -●12월:북두칠성의 등갑병(이)가 퇴각했습니다. -●12월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●12월:니쉬의 악귀병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●12월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●12월:국민기업의 호표기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:국민기업의 호표기병(이)가 퇴각했습니다. -●12월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●12월:무광의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:평민킬러의 연노병(이)가 전멸했습니다. -●12월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●12월:낭군의 마귀병(와)과 박일아의 기병(이)가 대결합니다. -●12월:박일아의 기병(이)가 전멸했습니다. -●12월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●12월:엄백호의 자객병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●12월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●12월:다이스의 석궁병(와)과 대악마의 기병(이)가 대결합니다. -●12월:다이스의 석궁병(이)가 퇴각했습니다. -●12월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●12월:이쓰미의 악귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●12월:일본어번역기의 천귀병(이)가 전멸했습니다. -●12월:이쓰미의 악귀병(와)과 대악마의 기병(이)가 대결합니다. -●12월:대악마의 기병(이)가 전멸했습니다. -●12월:이쓰미의 악귀병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●12월:잠둥이션의 천귀병(이)가 전멸했습니다. -●12월:보컬로이드정휘인(이)가 성도(으)로 진격합니다. -●12월:정휘인(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●12월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●12월:비월의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -◆1월:202년이 되었습니다. -●1월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●1월:야근탈출의 맹수병(와)과 하루카의 보병(이)가 대결합니다. -●1월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●1월:니쉬의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●1월:니쉬의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드ⓜ능환(이)가 사곡(으)로 진격합니다. -●1월:ⓜ능환(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●1월:카가미네렌의 석궁병(와)과 하연주의 궁병(이)가 대결합니다. -●1월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●1월:낭군의 마귀병(와)과 내나의 천귀병(이)가 대결합니다. -●1월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●1월:엄백호의 자객병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●1월:엄백호의 자객병(이)가 퇴각했습니다. -●1월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●1월:이쓰미의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●1월:이쓰미의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드정휘인(이)가 성도(으)로 진격합니다. -●1월:정휘인의 마귀병(와)과 카토의 기병(이)가 대결합니다. -●1월:정휘인의 마귀병(이)가 퇴각했습니다. -●1월:어엿븐소드락ⓖ의병장38(이)가 하내(으)로 진격합니다. -●1월:ⓖ의병장38의 궁병(와)과 최태원의 흑귀병(이)가 대결합니다. -●1월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●1월:전인호의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●1월:전인호의 악귀병(이)가 퇴각했습니다. -●1월:종횡무진카토(이)가 강주(으)로 진격합니다. -●1월:카토의 기병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●1월:카토의 기병(이)가 퇴각했습니다. -●1월:보컬로이드박희수(이)가 홍농(으)로 진격합니다. -●1월:박희수의 등갑병(와)과 소드락의 중장기병(이)가 대결합니다. -●1월:보컬로이드くま(이)가 홍농(으)로 진격합니다. -●1월:くま의 마귀병(와)과 쿠요의 중장기병(이)가 대결합니다. -●1월:누군가가 홍농(을)를 살피는 것 같습니다. -●1월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●1월:비월의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●1월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●1월:魯堂首의 등갑병(와)과 박일아의 기병(이)가 대결합니다. -●2월:랜임2분장(이)가 단식운동을 하다가 굶어 죽고말았습니다. -●2월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●2월:Anes의 중장기병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●2월:야근탈출의 맹수병(와)과 내나의 천귀병(이)가 대결합니다. -●2월:내나의 천귀병(이)가 전멸했습니다. -●2월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●2월:랜임1분장의 맹수병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●2월:장임의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●2월:평민킬러의 연노병(이)가 전멸했습니다. -●2월:장임의 등갑병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●2월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●2월:카가미네렌의 석궁병(와)과 소드락의 중장기병(이)가 대결합니다. -●2월:어엿븐소드락ⓖ의병장41(이)가 하내(으)로 진격합니다. -●2월:ⓖ의병장41의 궁병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●2월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●2월:HideD의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●2월:박일아의 기병(이)가 전멸했습니다. -●2월:HideD의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●2월:어엿븐소드락ⓖ의병장38(이)가 하내(으)로 진격합니다. -●2월:ⓖ의병장38의 궁병(와)과 KAITO의 등갑병(이)가 대결합니다. -●2월:어엿븐소드락ⓖ의병장39(이)가 낙양(으)로 진격합니다. -●2월:ⓖ의병장39의 남귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●2월:보컬로이드제갈여포(이)가 홍농(으)로 진격합니다. -●2월:제갈여포의 석궁병(와)과 하연주의 궁병(이)가 대결합니다. -●2월:하연주의 궁병(이)가 전멸했습니다. -●2월:제갈여포의 석궁병(와)과 재야의 귀병(이)가 대결합니다. -●2월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●2월:비밀의 악귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:강서유서의 연노병(이)가 전멸했습니다. -●2월:비밀의 악귀병(와)과 잠둥이션의 천귀병(이)가 대결합니다. -●2월:잠둥이션의 천귀병(이)가 전멸했습니다. -●2월:비밀(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드박희수(이)가 홍농(으)로 진격합니다. -●2월:박희수의 등갑병(와)과 소드락의 중장기병(이)가 대결합니다. -●2월:어엿븐소드락ⓖ의병장37(이)가 낙양(으)로 진격합니다. -●2월:ⓖ의병장37의 남귀병(와)과 러스티건의 석궁병(이)가 대결합니다. -●2월:보컬로이드くま(이)가 홍농(으)로 진격합니다. -●2월:くま의 마귀병(와)과 소드락의 중장기병(이)가 대결합니다. -●2월:소드락의 중장기병(이)가 전멸했습니다. -●2월:くま의 마귀병(와)과 재야의 귀병(이)가 대결합니다. -●2월:하내에서 금과 쌀을 도둑맞았습니다. -●2월:보컬로이드Navy마초(이)가 사곡(으)로 진격합니다. -●2월:Navy마초의 석궁병(와)과 ⓜ공손료의 귀병(이)가 대결합니다. -●2월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●2월:魯堂首의 등갑병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●2월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●2월:돌아온꼰대의 돌격기병(와)과 박일아의 기병(이)가 대결합니다. -●2월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●2월:읭읭의 중장기병(와)과 박일아의 기병(이)가 대결합니다. -●2월:박일아의 기병(이)가 전멸했습니다. -●2월:읭읭의 중장기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●2월:잠둥이션의 귀병(이)가 전멸했습니다. -●2월:읭읭(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:보컬로이드ⓜ능환(이)가 사곡(으)로 진격합니다. -●3월:ⓜ능환의 마귀병(와)과 ⓖ의병장40의 남귀병(이)가 대결합니다. -●3월:ⓜ능환의 마귀병(이)가 퇴각했습니다. -●3월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●3월:랜임1분장의 맹수병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●3월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●3월:카이사르의 강궁병(와)과 내나의 천귀병(이)가 대결합니다. -●3월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●3월:장임의 등갑병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:보컬로이드KAITO(이)가 홍농(으)로 진격합니다. -●3월:KAITO의 등갑병(와)과 ⓖ의병장41의 궁병(이)가 대결합니다. -●3월:ⓖ의병장41의 궁병(이)가 전멸했습니다. -●3월:KAITO의 등갑병(와)과 재야의 귀병(이)가 대결합니다. -●3월:보컬로이드바닥을탁치고(이)가 홍농(으)로 진격합니다. -●3월:바닥을탁치고의 마귀병(와)과 쿠요의 중장기병(이)가 대결합니다. -●3월:쿠요의 중장기병(이)가 전멸했습니다. -●3월:바닥을탁치고의 마귀병(와)과 재야의 귀병(이)가 대결합니다. -●3월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●3월:코토와르의 호표기병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:임사영의 천귀병(이)가 전멸했습니다. -●3월:코토와르의 호표기병(와)과 내나의 천귀병(이)가 대결합니다. -●3월:내나의 천귀병(이)가 전멸했습니다. -●3월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●3월:어엿븐소드락ⓖ의병장40(이)가 낙양(으)로 진격합니다. -●3월:ⓖ의병장40의 남귀병(와)과 러스티건의 석궁병(이)가 대결합니다. -●3월:ⓖ의병장40의 남귀병(이)가 퇴각했습니다. -●3월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●3월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●3월:HideD의 악귀병(이)가 퇴각했습니다. -●3월:어엿븐소드락ⓖ의병장39(이)가 낙양(으)로 진격합니다. -●3월:ⓖ의병장39의 남귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●3월:Navy마초의 석궁병(이)가 전멸했습니다. -●3월:ⓖ의병장39의 남귀병(와)과 러스티건의 석궁병(이)가 대결합니다. -●3월:보컬로이드제갈여포(이)가 홍농(으)로 진격합니다. -●3월:제갈여포의 석궁병(와)과 재야의 귀병(이)가 대결합니다. -●3월:재야의 귀병(이)가 전멸했습니다. -●3월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●3월:비밀의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:비밀의 악귀병(이)가 퇴각했습니다. -●3월:어엿븐소드락ⓖ의병장37(이)가 낙양(으)로 진격합니다. -●3월:ⓖ의병장37의 남귀병(와)과 러스티건의 석궁병(이)가 대결합니다. -●3월:ⓖ의병장37의 남귀병(이)가 퇴각했습니다. -●3월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●3월:북오더의 강궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:평민킬러의 연노병(이)가 전멸했습니다. -●3월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●3월:푸린푸린♥(이)가 삼략(계략)(을)를 습득했습니다! -●3월:하내에서 금과 쌀을 도둑맞았습니다. -●3월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●3월:돌아온꼰대의 돌격기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●3월:돌아온꼰대의 돌격기병(이)가 퇴각했습니다. -●3월:ㅁㄴㅇ(이)가 이튿날 침실에서 죽은채로발견되었습니다. -●3월:보컬로이드橙(이)가 성도(으)로 진격합니다. -●3월:橙의 충차(와)과 박일아의 기병(이)가 대결합니다. -●3월:어엿븐소드락ⓜ공손료(이)가 낙양(으)로 진격합니다. -●3월:ⓜ공손료의 귀병(와)과 러스티건의 석궁병(이)가 대결합니다. -●3월:ⓜ공손료의 귀병(이)가 퇴각했습니다. -●4월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●4월:아소의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●4월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●4월:북두칠성의 등갑병(와)과 대악마의 기병(이)가 대결합니다. -●4월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●4월:카이사르의 강궁병(와)과 대악마의 기병(이)가 대결합니다. -●4월:대악마의 기병(이)가 전멸했습니다. -●4월:카이사르의 강궁병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●4월:잠둥이션의 귀병(이)가 전멸했습니다. -●4월:카이사르의 강궁병(와)과 박일아의 기병(이)가 대결합니다. -●4월:박일아의 기병(이)가 전멸했습니다. -●4월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●4월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●4월:장임의 등갑병(이)가 퇴각했습니다. -●4월:보컬로이드KAITO(이)가 홍농(으)로 진격합니다. -●4월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●4월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●4월:국민기업(이)가 호표기병(으)로 성벽을 공격합니다. -●4월:보컬로이드코토와르(이)가 성도(으)로 진격합니다. -●4월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●4월:코토와르의 호표기병(이)가 퇴각했습니다. -●4월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●4월:무광의 악귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●4월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●4월:다이스의 석궁병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●4월:일본어번역기의 천귀병(이)가 전멸했습니다. -●4월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●4월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●4월:북오더의 강궁병(와)과 하루카의 보병(이)가 대결합니다. -●4월:북오더의 강궁병(이)가 퇴각했습니다. -●5월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●5월:아소의 중장기병(와)과 카토의 기병(이)가 대결합니다. -●5월:아소의 중장기병(이)가 퇴각했습니다. -●5월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●5월:북두칠성의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:북두칠성의 등갑병(이)가 퇴각했습니다. -●5월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●5월:니쉬의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●5월:보컬로이드KAITO(이)가 홍농(으)로 진격합니다. -●5월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●5월:KAITO의 등갑병(이)가 퇴각했습니다. -●5월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●5월:국민기업의 호표기병(와)과 카토의 기병(이)가 대결합니다. -●5월:국민기업의 호표기병(이)가 퇴각했습니다. -●5월:보컬로이드바닥을탁치고(이)가 홍농(으)로 진격합니다. -●5월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●5월:바닥을탁치고의 마귀병(이)가 퇴각했습니다. -●5월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●5월:무광의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●5월:무광의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●5월:엄백호의 자객병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●5월:잠둥이션의 귀병(이)가 전멸했습니다. -●5월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●5월:다이스의 석궁병(와)과 박일아의 기병(이)가 대결합니다. -●5월:다이스의 석궁병(이)가 퇴각했습니다. -●5월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●5월:이쓰미의 악귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●5월:이쓰미의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드정휘인(이)가 성도(으)로 진격합니다. -●5월:정휘인의 마귀병(와)과 카토의 기병(이)가 대결합니다. -●5월:정휘인의 마귀병(이)가 퇴각했습니다. -●5월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●5월:전인호의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●5월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●5월:비월의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●6월:Anes의 중장기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●6월:야근탈출의 맹수병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●6월:니쉬의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●6월:박일아의 기병(이)가 전멸했습니다. -●6월:니쉬의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:니쉬의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●6월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●6월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●6월:엄백호의 자객병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:평민킬러의 연노병(이)가 전멸했습니다. -●6월:엄백호의 자객병(와)과 하루카의 보병(이)가 대결합니다. -●6월:하루카의 보병(이)가 전멸했습니다. -●6월:엄백호의 자객병(와)과 카토의 기병(이)가 대결합니다. -●6월:카토의 기병(이)가 전멸했습니다. -●6월:엄백호의 자객병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:잠둥이션의 귀병(이)가 전멸했습니다. -●6월:엄백호(이)가 자객병(으)로 성벽을 공격합니다. -●6월:차오루(이)가 전재산을 잃고 화병으로 죽고말았습니다. -●6월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●6월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:전인호의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드박희수(이)가 홍농(으)로 진격합니다. -●6월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●6월:비월의 근위병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●6월:魯堂首의 등갑병(와)과 박일아의 기병(이)가 대결합니다. -●7월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●7월:Anes의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●7월:Anes의 중장기병(이)가 퇴각했습니다. -●7월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●7월:야근탈출의 맹수병(와)과 임사영의 천귀병(이)가 대결합니다. -●7월:야근탈출의 맹수병(이)가 퇴각했습니다. -●7월:보컬로이드정력왕(이)가 성도(으)로 진격합니다. -●7월:정력왕의 마귀병(와)과 내나의 천귀병(이)가 대결합니다. -●7월:정력왕의 마귀병(이)가 퇴각했습니다. -●7월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●7월:랜임1분장의 맹수병(와)과 대악마의 기병(이)가 대결합니다. -●7월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●7월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●7월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●7월:HideD의 악귀병(와)과 내나의 천귀병(이)가 대결합니다. -●7월:보컬로이드제갈여포(이)가 홍농(으)로 진격합니다. -●7월:제갈여포의 석궁병(와)과 ⓖ의병장41의 궁병(이)가 대결합니다. -●7월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●7월:비밀의 악귀병(와)과 대악마의 기병(이)가 대결합니다. -●7월:비밀의 악귀병(이)가 퇴각했습니다. -●7월:보컬로이드박희수(이)가 홍농(으)로 진격합니다. -●7월:박희수의 등갑병(와)과 ⓖ의병장38의 궁병(이)가 대결합니다. -●7월:하내에서 금과 쌀을 도둑맞았습니다. -●7월:보컬로이드Navy마초(이)가 사곡(으)로 진격합니다. -●7월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●7월:누군가가 성도(을)를 살피는 것 같습니다. -●7월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●7월:魯堂首의 등갑병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●7월:魯堂首의 등갑병(이)가 퇴각했습니다. -●7월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●7월:돌아온꼰대의 돌격기병(와)과 박일아의 기병(이)가 대결합니다. -●8월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●8월:랜임1분장의 맹수병(와)과 강서유서의 연노병(이)가 대결합니다. -●8월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●8월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●8월:카이사르의 강궁병(와)과 임사영의 천귀병(이)가 대결합니다. -●8월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●8월:장임의 등갑병(와)과 강서유서의 연노병(이)가 대결합니다. -●8월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●8월:카이스트의 악귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●8월:잠둥이션의 귀병(이)가 전멸했습니다. -●8월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●8월:카가미네렌의 석궁병(와)과 ⓖ의병장38의 궁병(이)가 대결합니다. -●8월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●8월:낭군의 마귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●8월:어엿븐소드락ⓖ의병장41(이)가 하내(으)로 진격합니다. -●8월:ⓖ의병장41의 궁병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●8월:ⓖ의병장41의 궁병(이)가 퇴각했습니다. -●8월:보컬로이드제갈여포(이)가 홍농(으)로 진격합니다. -●8월:제갈여포의 석궁병(와)과 ⓖ의병장38의 궁병(이)가 대결합니다. -●8월:ⓖ의병장38의 궁병(이)가 전멸했습니다. -●8월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●8월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●8월:북오더의 강궁병(와)과 하루카의 보병(이)가 대결합니다. -●8월:하내에서 금과 쌀을 도둑맞았습니다. -●8월:보컬로이드Navy마초(이)가 사곡(으)로 진격합니다. -●8월:Navy마초의 석궁병(와)과 ⓖ의병장39의 남귀병(이)가 대결합니다. -●8월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●8월:돌아온꼰대의 돌격기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●8월:돌아온꼰대의 돌격기병(이)가 퇴각했습니다. -●9월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●9월:아소의 중장기병(와)과 하루카의 보병(이)가 대결합니다. -●9월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●9월:카이사르의 강궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●9월:장임의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●9월:장임의 등갑병(이)가 퇴각했습니다. -●9월:보컬로이드KAITO(이)가 홍농(으)로 진격합니다. -●9월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●9월:국민기업의 호표기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●9월:보컬로이드바닥을탁치고(이)가 홍농(으)로 진격합니다. -●9월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●9월:카이스트의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●9월:카이스트의 악귀병(이)가 퇴각했습니다. -●9월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●9월:무광의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●9월:무광의 악귀병(이)가 퇴각했습니다. -●9월:어엿븐소드락ⓖ의병장40(이)가 낙양(으)로 진격합니다. -●9월:ⓖ의병장40의 남귀병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●9월:보컬로이드카가미네렌(이)가 홍농(으)로 진격합니다. -●9월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:카가미네렌(이)가 홍농 공략에 성공했습니다. -●9월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●9월:낭군의 마귀병(와)과 하루카의 보병(이)가 대결합니다. -●9월:낭군의 마귀병(이)가 퇴각했습니다. -●9월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●9월:북오더의 강궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●9월:북오더의 강궁병(이)가 퇴각했습니다. -●9월:보컬로이드Navy마초(이)가 사곡(으)로 진격합니다. -●9월:Navy마초의 석궁병(와)과 ⓖ의병장39의 남귀병(이)가 대결합니다. -●9월:ⓖ의병장39의 남귀병(이)가 전멸했습니다. -●9월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:Navy마초의 석궁병(이)가 퇴각했습니다. -●10월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●10월:아소의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●10월:아소의 중장기병(이)가 퇴각했습니다. -●10월:보컬로이드ⓜ능환(이)가 사곡(으)로 진격합니다. -●10월:ⓜ능환의 귀병(와)과 ⓜ공손료의 남귀병(이)가 대결합니다. -●10월:ⓜ능환의 귀병(이)가 퇴각했습니다. -●10월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●10월:KAITO의 등갑병(와)과 내나의 천귀병(이)가 대결합니다. -●10월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●10월:국민기업의 호표기병(와)과 박일아의 기병(이)가 대결합니다. -●10월:국민기업의 호표기병(이)가 퇴각했습니다. -●10월:보컬로이드카가미네렌(이)가 사곡(으)로 진격합니다. -●10월:카가미네렌의 석궁병(와)과 ⓜ공손료의 남귀병(이)가 대결합니다. -●10월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●10월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●10월:엄백호의 자객병(와)과 대악마의 기병(이)가 대결합니다. -●10월:엄백호의 자객병(이)가 퇴각했습니다. -●10월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●10월:전인호의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●10월:강하에서 구경(이)라는 호걸이 천하에 이름을 알립니다. -●10월:장안에서 금과 쌀을 도둑맞았습니다. -●10월:접속잘안함그만좀불러좀(이)가 성도(으)로 진격합니다. -●10월:그만좀불러좀의 신귀병(와)과 하루카의 보병(이)가 대결합니다. -●10월:하루카의 보병(이)가 전멸했습니다. -●10월:그만좀불러좀의 신귀병(와)과 내나의 천귀병(이)가 대결합니다. -●10월:보컬로이드くま(이)가 사곡(으)로 진격합니다. -●10월:くま의 마귀병(와)과 ⓖ의병장40의 남귀병(이)가 대결합니다. -●10월:ⓖ의병장40의 남귀병(이)가 전멸했습니다. -●10월:くま의 마귀병(와)과 ⓜ공손료의 남귀병(이)가 대결합니다. -●10월:ⓜ공손료의 남귀병(이)가 전멸했습니다. -●10월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●10월:읭읭의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●10월:대악마의 기병(이)가 전멸했습니다. -●10월:읭읭의 중장기병(와)과 내나의 천귀병(이)가 대결합니다. -●11월:보컬로이드Air(이)가 성도(으)로 진격합니다. -●11월:Air의 맹수병(와)과 박일아의 기병(이)가 대결합니다. -●11월:박일아의 기병(이)가 전멸했습니다. -●11월:Air(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●11월:야근탈출의 맹수병(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:보컬로이드이루나(이)가 사곡(으)로 진격합니다. -●11월:이루나(이)가 황귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함DVa(이)가 성도(으)로 진격합니다. -●11월:DVa의 충차(와)과 강서유서의 연노병(이)가 대결합니다. -●11월:강서유서의 연노병(이)가 전멸했습니다. -●11월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●11월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●11월:KAITO(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:보컬로이드박희수(이)가 사곡(으)로 진격합니다. -●11월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●11월:보컬로이드くま(이)가 사곡(으)로 진격합니다. -●11월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●11월:くま의 마귀병(이)가 퇴각했습니다. -●11월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●11월:비월의 근위병(와)과 평민킬러의 연노병(이)가 대결합니다. -●11월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●11월:魯堂首의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●11월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●11월:읭읭의 중장기병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●11월:읭읭의 중장기병(이)가 퇴각했습니다. -●12월:보컬로이드Air(이)가 성도(으)로 진격합니다. -●12월:Air의 맹수병(와)과 박일아의 기병(이)가 대결합니다. -●12월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●12월:야근탈출의 맹수병(와)과 임사영의 천귀병(이)가 대결합니다. -●12월:야근탈출의 맹수병(이)가 퇴각했습니다. -●12월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●12월:니쉬의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●12월:보컬로이드이루나(이)가 사곡(으)로 진격합니다. -●12월:이루나의 황귀병(와)과 쿠요의 중장기병(이)가 대결합니다. -●12월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●12월:랜임1분장의 맹수병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●12월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●12월:HideD의 악귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●12월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●12월:이쓰미의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●12월:평민킬러의 연노병(이)가 전멸했습니다. -●12월:이쓰미의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●12월:보컬로이드정휘인(이)가 사곡(으)로 진격합니다. -●12월:정휘인의 마귀병(와)과 쿠요의 중장기병(이)가 대결합니다. -●12월:쿠요의 중장기병(이)가 전멸했습니다. -●12월:정휘인(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:정휘인(이)가 사곡 공략에 성공했습니다. -●12월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●12월:비밀의 악귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●12월:일본어번역기의 천귀병(이)가 전멸했습니다. -●12월:비밀의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●12월:임사영의 천귀병(이)가 전멸했습니다. -●12월:비밀의 악귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●12월:보컬로이드비월(이)가 성도(으)로 진격합니다. -●12월:비월의 근위병(와)과 박일아의 기병(이)가 대결합니다. -●12월:보컬로이드돌아온꼰대(이)가 함곡(으)로 진격합니다. -●12월:돌아온꼰대의 돌격기병(와)과 쿠요의 중장기병(이)가 대결합니다. -◆1월:203년이 되었습니다. -●1월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●1월:Anes의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●1월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●1월:니쉬의 악귀병(와)과 내나의 천귀병(이)가 대결합니다. -●1월:니쉬의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●1월:랜임1분장의 맹수병(와)과 내나의 천귀병(이)가 대결합니다. -●1월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●1월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●1월:카이사르의 강궁병(와)과 내나의 천귀병(이)가 대결합니다. -●1월:내나의 천귀병(이)가 전멸했습니다. -●1월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●1월:장임의 등갑병(와)과 대악마의 기병(이)가 대결합니다. -●1월:접속잘안함진(이)가 성도(으)로 진격합니다. -●1월:진의 신귀병(와)과 박일아의 기병(이)가 대결합니다. -●1월:박일아의 기병(이)가 전멸했습니다. -●1월:진의 신귀병(와)과 대악마의 기병(이)가 대결합니다. -●1월:대악마의 기병(이)가 전멸했습니다. -●1월:진(이)가 신귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●1월:카이스트(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●1월:낭군(이)가 마귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●1월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●1월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:이쓰미의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드정휘인(이)가 함곡(으)로 진격합니다. -●1월:정휘인의 마귀병(와)과 재야의 귀병(이)가 대결합니다. -●1월:보컬로이드제갈여포(이)가 함곡(으)로 진격합니다. -●1월:제갈여포의 석궁병(와)과 쿠요의 중장기병(이)가 대결합니다. -●1월:쿠요의 중장기병(이)가 전멸했습니다. -●1월:제갈여포의 석궁병(와)과 재야의 귀병(이)가 대결합니다. -●1월:재야의 귀병(이)가 전멸했습니다. -●1월:제갈여포(이)가 석궁병(으)로 성벽을 공격합니다. -●1월:장안에서 금과 쌀을 도둑맞았습니다. -●1월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●1월:비밀의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●1월:비밀의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드박희수(이)가 함곡(으)로 진격합니다. -●1월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●1월:접속잘안함북오더(이)가 성도(으)로 진격합니다. -●1월:북오더의 강궁병(와)과 하루카의 보병(이)가 대결합니다. -●1월:북오더의 강궁병(이)가 퇴각했습니다. -●1월:보컬로이드Navy마초(이)가 함곡(으)로 진격합니다. -●1월:Navy마초의 석궁병(와)과 쿠요의 중장기병(이)가 대결합니다. -●1월:보컬로이드돌아온꼰대(이)가 함곡(으)로 진격합니다. -●1월:돌아온꼰대의 돌격기병(와)과 쿠요의 중장기병(이)가 대결합니다. -●1월:쿠요의 중장기병(이)가 전멸했습니다. -●1월:돌아온꼰대(이)가 돌격기병(으)로 성벽을 공격합니다. -●2월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●2월:아소의 중장기병(와)과 박일아의 기병(이)가 대결합니다. -●2월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●2월:Anes의 중장기병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:Anes의 중장기병(이)가 퇴각했습니다. -●2월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●2월:카이사르의 강궁병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:카이사르의 강궁병(이)가 퇴각했습니다. -●2월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●2월:장임의 등갑병(와)과 하루카의 보병(이)가 대결합니다. -●2월:장임의 등갑병(이)가 퇴각했습니다. -●2월:보컬로이드국민기업(이)가 성도(으)로 진격합니다. -●2월:국민기업의 호표기병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:국민기업의 호표기병(이)가 퇴각했습니다. -●2월:보컬로이드바닥을탁치고(이)가 함곡(으)로 진격합니다. -●2월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●2월:바닥을탁치고(이)가 함곡 공략에 성공했습니다. -●2월:접속잘안함진(이)가 성도(으)로 진격합니다. -●2월:진의 신귀병(와)과 하루카의 보병(이)가 대결합니다. -●2월:하루카의 보병(이)가 전멸했습니다. -●2월:진의 신귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:진의 신귀병(이)가 퇴각했습니다. -●2월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●2월:카이스트의 악귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:카이스트의 악귀병(이)가 퇴각했습니다. -●2월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●2월:무광의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●2월:박일아의 기병(이)가 전멸했습니다. -●2월:무광의 악귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●2월:강서유서의 연노병(이)가 전멸했습니다. -●2월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●2월:낭군(이)가 마귀병(으)로 성벽을 공격합니다. -●2월:ⓜ미조(이)가 접속잘안함임관했습니다. -●2월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●2월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●2월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●2월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:ⓖ의병장37(이)가 보컬로이드임관했습니다. -●3월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●3월:아소의 중장기병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:아소의 중장기병(이)가 퇴각했습니다. -●3월:보컬로이드정력왕(이)가 성도(으)로 진격합니다. -●3월:정력왕의 마귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●3월:KAITO의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●3월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●3월:바닥을탁치고의 마귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:접속잘안함무광(이)가 성도(으)로 진격합니다. -●3월:무광의 악귀병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●3월:무광의 악귀병(이)가 퇴각했습니다. -●3월:보컬로이드카가미네렌(이)가 성도(으)로 진격합니다. -●3월:카가미네렌의 석궁병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●3월:보컬로이드낭군(이)가 성도(으)로 진격합니다. -●3월:낭군의 마귀병(와)과 박일아의 기병(이)가 대결합니다. -●3월:낭군의 마귀병(이)가 퇴각했습니다. -●3월:보컬로이드엄백호(이)가 성도(으)로 진격합니다. -●3월:엄백호의 근위병(와)과 일본어번역기의 천귀병(이)가 대결합니다. -●3월:일본어번역기의 천귀병(이)가 전멸했습니다. -●3월:보컬로이드다이스(이)가 성도(으)로 진격합니다. -●3월:다이스의 석궁병(와)과 카토의 기병(이)가 대결합니다. -●3월:카토의 기병(이)가 전멸했습니다. -●3월:다이스의 석궁병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:다이스의 석궁병(이)가 퇴각했습니다. -●3월:접속잘안함전인호(이)가 성도(으)로 진격합니다. -●3월:전인호의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:전인호의 악귀병(이)가 퇴각했습니다. -●3월:ⓜ강찬(이)가 기대가 너무 컸다며 떠났습니다. -●3월:갸오오(이)가 유산 상속 문제로 다투다가 살해당했습니다. -●3월:접속잘안함선비(이)가 성도(으)로 진격합니다. -●3월:선비의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●3월:임사영의 천귀병(이)가 전멸했습니다. -●3월:선비의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●3월:평민킬러의 연노병(이)가 전멸했습니다. -●3월:구경(이)가 거리에서 갑자기 객사하고 말았습니다. -●3월:보컬로이드くま(이)가 성도(으)로 진격합니다. -●3월:くま의 마귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●3월:잠둥이션의 귀병(이)가 전멸했습니다. -●3월:くま의 마귀병(와)과 박일아의 기병(이)가 대결합니다. -●3월:박일아의 기병(이)가 전멸했습니다. -●3월:보컬로이드Navy마초(이)가 성도(으)로 진격합니다. -●3월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●3월:누군가가 성도(을)를 살피는 것 같습니다. -●3월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●3월:읭읭(이)가 중장기병(으)로 성벽을 공격합니다. -●3월:보컬로이드橙(이)가 성도(으)로 진격합니다. -●3월:橙의 충차(와)과 내나의 천귀병(이)가 대결합니다. -●4월:보컬로이드Air(이)가 성도(으)로 진격합니다. -●4월:Air의 맹수병(와)과 대악마의 기병(이)가 대결합니다. -●4월:Air의 맹수병(이)가 퇴각했습니다. -●4월:ⓜ동공(이)가 접속잘안함임관했습니다. -●4월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●4월:야근탈출의 맹수병(와)과 대악마의 기병(이)가 대결합니다. -●4월:보컬로이드이루나(이)가 성도(으)로 진격합니다. -●4월:이루나의 황귀병(와)과 대악마의 기병(이)가 대결합니다. -●4월:이루나의 황귀병(이)가 퇴각했습니다. -●4월:쿠요(이)가 접속잘안함(으)로 망명하였습니다. -●4월:보컬로이드KAITO(이)가 성도(으)로 진격합니다. -●4월:KAITO의 등갑병(와)과 내나의 천귀병(이)가 대결합니다. -●4월:KAITO의 등갑병(이)가 퇴각했습니다. -●4월:접속잘안함진리(이)가 성도(으)로 진격합니다. -●4월:진리의 중장기병(와)과 내나의 천귀병(이)가 대결합니다. -●4월:내나의 천귀병(이)가 전멸했습니다. -●4월:진리의 중장기병(와)과 대악마의 기병(이)가 대결합니다. -●4월:대악마의 기병(이)가 전멸했습니다. -●4월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:무릉에서 32(이)라는 호걸이 천하에 이름을 알립니다. -●4월:보컬로이드바닥을탁치고(이)가 성도(으)로 진격합니다. -●4월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●4월:바닥을탁치고의 마귀병(이)가 퇴각했습니다. -●4월:보컬로이드카가미네렌(이)가 성도(으)로 진격합니다. -●4월:카가미네렌(이)가 석궁병(으)로 성벽을 공격합니다. -●4월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●4월:ⓖ의병장36(이)가 접속잘안함임관했습니다. -●4월:접속잘안함선비(이)가 성도(으)로 진격합니다. -●4월:선비의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●4월:선비의 악귀병(이)가 퇴각했습니다. -●4월:보컬로이드제갈여포(이)가 성도(으)로 진격합니다. -●4월:제갈여포의 석궁병(와)과 하루카의 보병(이)가 대결합니다. -●4월:하연주(이)가 보컬로이드임관했습니다. -●4월:보컬로이드Navy마초(이)가 성도(으)로 진격합니다. -●4월:Navy마초의 석궁병(와)과 하루카의 보병(이)가 대결합니다. -●4월:Navy마초의 석궁병(이)가 퇴각했습니다. -●4월:접속잘안함ⓜ이지(이)가 성도(으)로 진격합니다. -●4월:ⓜ이지의 악귀병(와)과 하루카의 보병(이)가 대결합니다. -●4월:하루카의 보병(이)가 전멸했습니다. -●4월:ⓜ이지(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●4월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●4월:접속잘안함읭읭(이)가 성도(으)로 진격합니다. -●4월:읭읭(이)가 중장기병(으)로 성벽을 공격합니다. -●4월:보컬로이드橙(이)가 성도(으)로 진격합니다. -●4월:橙(이)가 충차(으)로 성벽을 공격합니다. -●5월:보컬로이드야근탈출(이)가 성도(으)로 진격합니다. -●5월:야근탈출(이)가 맹수병(으)로 성벽을 공격합니다. -●5월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●5월:랜임1분장(이)가 맹수병(으)로 성벽을 공격합니다. -●5월:누군가가 성도(을)를 살피는 것 같습니다. -●5월:접속잘안함진리(이)가 성도(으)로 진격합니다. -●5월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●5월:ⓖ의병장41(이)가 접속잘안함임관했습니다. -●5월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●5월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●5월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드정휘인(이)가 성도(으)로 진격합니다. -●5월:정휘인(이)가 마귀병(으)로 성벽을 공격합니다. -●5월:정휘인의 마귀병(이)가 퇴각했습니다. -●5월:재야(이)가 보컬로이드(으)로 망명하였습니다. -●5월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●5월:비밀(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함魯堂首(이)가 성도(으)로 진격합니다. -●5월:魯堂首의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●5월:魯堂首의 등갑병(이)가 퇴각했습니다. -●5월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●5월:돌아온꼰대의 돌격기병(와)과 내나의 귀병(이)가 대결합니다. -●5월:내나의 귀병(이)가 전멸했습니다. -●6월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●6월:북두칠성의 등갑병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:접속잘안함니쉬(이)가 성도(으)로 진격합니다. -●6월:니쉬의 악귀병(와)과 강서유서의 연노병(이)가 대결합니다. -●6월:강서유서의 연노병(이)가 전멸했습니다. -●6월:니쉬의 악귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:니쉬의 악귀병(이)가 퇴각했습니다. -●6월:ⓖ의병장42(이)가 접속잘안함임관했습니다. -●6월:보컬로이드랜임1분장(이)가 성도(으)로 진격합니다. -●6월:랜임1분장의 맹수병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●6월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●6월:카이사르의 강궁병(와)과 임사영의 천귀병(이)가 대결합니다. -●6월:접속잘안함장임(이)가 성도(으)로 진격합니다. -●6월:장임의 등갑병(와)과 카토의 기병(이)가 대결합니다. -●6월:접속잘안함DVa(이)가 성도(으)로 진격합니다. -●6월:DVa의 충차(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:접속잘안함카이스트(이)가 성도(으)로 진격합니다. -●6월:카이스트의 악귀병(와)과 박일아의 기병(이)가 대결합니다. -●6월:박일아의 기병(이)가 전멸했습니다. -●6월:카이스트의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:접속잘안함HideD(이)가 성도(으)로 진격합니다. -●6월:HideD의 악귀병(와)과 평민킬러의 연노병(이)가 대결합니다. -●6월:평민킬러의 연노병(이)가 패퇴했습니다. -●6월:HideD의 악귀병(와)과 임사영의 천귀병(이)가 대결합니다. -●6월:임사영의 천귀병(이)가 전멸했습니다. -●6월:HideD의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●6월:카토의 기병(이)가 전멸했습니다. -●6월:HideD의 악귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:HideD의 악귀병(이)가 퇴각했습니다. -●6월:접속잘안함이쓰미(이)가 성도(으)로 진격합니다. -●6월:이쓰미의 악귀병(와)과 잠둥이션의 귀병(이)가 대결합니다. -●6월:잠둥이션의 귀병(이)가 전멸했습니다. -●6월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:ⓖ의병장39(이)가 보컬로이드임관했습니다. -●6월:접속잘안함비밀(이)가 성도(으)로 진격합니다. -●6월:비밀의 악귀병(와)과 내나의 귀병(이)가 대결합니다. -●6월:보컬로이드박희수(이)가 성도(으)로 진격합니다. -●6월:박희수의 등갑병(와)과 내나의 귀병(이)가 대결합니다. -●6월:내나의 귀병(이)가 전멸했습니다. -●6월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:접속잘안함ⓜ이지(이)가 성도(으)로 진격합니다. -●6월:ⓜ이지(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:ⓜ이지의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드돌아온꼰대(이)가 성도(으)로 진격합니다. -●6월:돌아온꼰대(이)가 돌격기병(으)로 성벽을 공격합니다. -●6월:돌아온꼰대의 돌격기병(이)가 퇴각했습니다. -●7월:접속잘안함아소(이)가 성도(으)로 진격합니다. -●7월:아소의 중장기병(와)과 내나의 천귀병(이)가 대결합니다. -●7월:접속잘안함Anes(이)가 성도(으)로 진격합니다. -●7월:Anes의 중장기병(와)과 내나의 천귀병(이)가 대결합니다. -●7월:내나의 천귀병(이)가 전멸했습니다. -●7월:Anes(이)가 중장기병(으)로 성벽을 공격합니다. -●7월:접속잘안함북두칠성(이)가 성도(으)로 진격합니다. -●7월:북두칠성(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:보컬로이드ⓜ능환(이)가 성도(으)로 진격합니다. -●7월:ⓜ능환(이)가 남귀병(으)로 성벽을 공격합니다. -●7월:접속잘안함카이사르(이)가 성도(으)로 진격합니다. -●7월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●7월:카이사르(이)가 성도 공략에 성공했습니다. -●7월:ⓖ의병장38(이)가 접속잘안함임관했습니다. -●7월:카토(이)가 보컬로이드임관했습니다. -●7월:박일아(이)가 보컬로이드임관했습니다. -●7월:내나(이)가 접속잘안함(으)로 망명하였습니다. -●8월:졸본에서 아수라(이)라는 호걸이 천하에 이름을 알립니다. -●8월:ⓜ공손료(이)가 접속잘안함임관했습니다. -●9월:임사영(이)가 접속잘안함임관했습니다. -●9월:잠둥이션(이)가 접속잘안함(으)로 망명하였습니다. -●9월:ⓖ의병장40(이)가 보컬로이드임관했습니다. -●9월:더문더문(이)가 조황비전(+14)(을)를 습득했습니다! -●9월:평민킬러(이)가 보컬로이드(으)로 망명하였습니다. -●10월:강하에서 나나미(이)라는 호걸이 천하에 이름을 알립니다. -●12월:하변에서 규일(이)라는 호걸이 천하에 이름을 알립니다. -◆1월:204년이 되었습니다. -●1월:부관(이)가 독살을 준비하다 독에 걸려 죽고 말았습니다. -●1월:아수라(이)가 무리하게 단련을 하다가 죽고말았습니다. -●2월:아르카나하트(이)가 접속잘안함임관했습니다. -●3월:여자친구(이)가 바람난 배우자에게 독살당하고 말았습니다. -●3월:ⓖ의병장41(이)가 기대가 너무 컸다며 떠났습니다. -●4월:나나미(이)가 추녀를 보고 놀라서 죽고 말았습니다. -●5월:ⓖ의병장37(이)가 기대가 너무 컸다며 떠났습니다. -●6월:규일(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다. -●7월:ⓖ의병장39(이)가 처자식이 그립다며 떠났습니다. -●8월:ⓖ의병장42(이)가 의견차이를 좁히지 못하고 떠났습니다. -●9월:ⓖ의병장40(이)가 처자식이 그립다며 떠났습니다. -●9월:ⓖ의병장38(이)가 의견차이를 좁히지 못하고 떠났습니다. -●9월:ⓖ의병장36(이)가 의견차이를 좁히지 못하고 떠났습니다. -●9월:박일아(이)가 보컬로이드에서 하야했습니다. -●12월:청기사(이)가 도소연명(치료)(을)를 습득했습니다! -●12월:직장인페이트(이)가 접속잘안함임관했습니다. -◆1월:205년이 되었습니다. -●1월:일본어번역기(이)가 보컬로이드임관했습니다. -●1월:くま(이)가 오자병법(+14)(을)를 습득했습니다! -●2월:강서유서(이)가 접속잘안함(으)로 망명하였습니다. -●9월:보컬로이드ⓜ능환(이)가 오환(으)로 진격합니다. -●9월:ⓜ능환(이)가 남귀병(으)로 성벽을 공격합니다. -●9월:ⓜ능환(이)가 오환 공략에 성공했습니다. -◆1월:206년이 되었습니다. -●3월:이루나(이)가 대완마(+10)(을)를 습득했습니다! -●6월:누렁(이)가 수영을 하다 익사하고 말았습니다. -●12월:ⓜ동공(이)가 아무 이유 없이 떠났습니다. -◆1월:207년이 되었습니다. -●6월:에서 앵벌스(이)라는 호걸이 천하에 이름을 알립니다. -●6월:에서 삼국지13(이)라는 호걸이 천하에 이름을 알립니다. -●8월:악마사냥꾼(이)가 맹덕신서(+12)(을)를 습득했습니다! -●11월:삼국지13(이)가 유산 상속 문제로 다투다가 살해당했습니다. -●12월:앵벌스(이)가 유산 상속 문제로 다투다가 살해당했습니다. -◆1월:208년이 되었습니다. -●9월:홍농에서 똥겜블레스(이)라는 호걸이 천하에 이름을 알립니다. -◆1월:209년이 되었습니다. -●2월:똥겜블레스(이)가 사람들에게 집단으로 맞아서 죽고말았습니다. -●3월:리안(이)가 누군가의 사주로 자객에게 암살당했습니다. -●7월:이도에서 식품영양학(이)라는 호걸이 천하에 이름을 알립니다. -●8월:하변에서 구경(이)라는 호걸이 천하에 이름을 알립니다. -●8월:식품영양학(이)가 접속잘안함임관했습니다. -●9월:안정에서 다끝남(이)라는 호걸이 천하에 이름을 알립니다. -●11월:SARS(이)가 단식운동을 하다가 굶어 죽고말았습니다. -◆1월:210년이 되었습니다. -●1월:구경(이)가 농사중 호미에 머리를 맞아 죽고말았습니다. -●2월:오늘도삼모냐(이)가 황제를 모독하다가 처형당하고 말았습니다. -●2월:물파스(이)가 이튿날 침실에서 죽은채로발견되었습니다. -●3월:다끝남(이)가 안타깝게도 번개에 맞아 죽고 말았습니다. -●3월:하루카(이)가 요절하고 말았습니다. -●4월:무광(이)가 보컬로이드선전 포고 하였습니다. -●5월:대악마(이)가 안타깝게도 번개에 맞아 죽고 말았습니다. -●6월:안돼요안돼요(이)가 수영을 하다 익사하고 말았습니다. -●8월:ⓜ손습(이)가 푸대접에 실망하여 떠났습니다. -●10월:6974(이)가 단식운동을 하다가 굶어 죽고말았습니다. -●11월:누군가가 강주(을)를 살피는 것 같습니다. -◆1월:211년이 되었습니다. -●2월:푸린푸린♥(이)가 역병에 걸려 죽고 말았습니다. -●2월:누군가가 가맹(을)를 살피는 것 같습니다. -●3월:누군가가 함곡(을)를 살피는 것 같습니다. -●3월:누군가가 성도(을)를 살피는 것 같습니다. -●4월:에서 치우천(이)라는 호걸이 천하에 이름을 알립니다. -●5월:박일아(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다. -●6월:누군가가 허창(을)를 살피는 것 같습니다. -●6월:연이(이)가 농사중 호미에 머리를 맞아 죽고말았습니다. -●6월:샤그니(이)가 저세상이 궁금하다며 자살하고 말았습니다. -●7월:누군가가 남만(을)를 살피는 것 같습니다. -●7월:누군가가 여남(을)를 살피는 것 같습니다. -●7월:남영에서 kulee(이)라는 호걸이 천하에 이름을 알립니다. -●8월:복양에서 電気電子(이)라는 호걸이 천하에 이름을 알립니다. -●8월:電気電子(이)가 접속잘안함임관했습니다. -●9월:누군가가 파양(을)를 살피는 것 같습니다. -●10월:치우천(이)가 거리에서 갑자기 객사하고 말았습니다. -●10월:ⓜ이지(이)가 자기가 없어도 될것 같다며 떠났습니다. -●10월:엘마쨩상향좀(이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다. -●10월:kulee(이)가 접속잘안함임관했습니다. -●11월:영릉에서 소하(이)라는 호걸이 천하에 이름을 알립니다. -●11월:발암맨(이)가 저세상이 궁금하다며 자살하고 말았습니다. -●12월:소하(이)가 접속잘안함임관했습니다. -●12월:32(이)가 우울증에 걸려 자살하고 말았습니다. -●12월:ⓜ미조(이)가 푸대접에 실망하여 떠났습니다. -◆1월:212년이 되었습니다. -●1월:누군가가 강주(을)를 살피는 것 같습니다. -●2월:누군가가 상동(을)를 살피는 것 같습니다. -●2월:누군가가 허창(을)를 살피는 것 같습니다. -●2월:누군가가 함곡(을)를 살피는 것 같습니다. -●2월:누군가가 (을)를 살피는 것 같습니다. -●2월:영안에서 하지마루욧(이)라는 호걸이 천하에 이름을 알립니다. -●2월:누군가가 남만(을)를 살피는 것 같습니다. -●2월:누군가가 운남(을)를 살피는 것 같습니다. -●2월:하지마루욧(이)가 보컬로이드임관했습니다. -●3월:누군가가 가맹(을)를 살피는 것 같습니다. -●3월:누군가가 안정(을)를 살피는 것 같습니다. -●3월:누군가가 건녕(을)를 살피는 것 같습니다. -●3월:누군가가 강주(을)를 살피는 것 같습니다. -●3월:누군가가 남영(을)를 살피는 것 같습니다. -●3월:누군가가 고창(을)를 살피는 것 같습니다. -●3월:누군가가 합비(을)를 살피는 것 같습니다. -●3월:누군가가 주시(을)를 살피는 것 같습니다. -●4월:누군가가 여남(을)를 살피는 것 같습니다. -●4월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●4월:야근탈출의 맹수병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●4월:접속잘안함니쉬(이)가 함곡(으)로 진격합니다. -●4월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함카이사르(이)가 남만(으)로 진격합니다. -●4월:카이사르의 강궁병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●4월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●4월:장임의 등갑병(와)과 낭군의 천귀병(이)가 대결합니다. -●4월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●4월:KAITO의 등갑병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●4월:접속잘안함진리(이)가 남만(으)로 진격합니다. -●4월:진리의 중장기병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●4월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●4월:바닥을탁치고의 마귀병(와)과 쿠요의 중장기병(이)가 대결합니다. -●4월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●4월:코토와르의 호표기병(와)과 전인호의 악귀병(이)가 대결합니다. -●4월:접속잘안함무광(이)가 상동(으)로 진격합니다. -●4월:무광의 악귀병(와)과 엄백호의 근위병(이)가 대결합니다. -●4월:보컬로이드카가미네렌(이)가 남영(으)로 진격합니다. -●4월:카가미네렌의 석궁병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●4월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●4월:보컬로이드낭군(이)가 남영(으)로 진격합니다. -●4월:낭군의 천귀병(와)과 내나의 악귀병(이)가 대결합니다. -●4월:보컬로이드엄백호(이)가 계양(으)로 진격합니다. -●4월:엄백호의 근위병(와)과 Anes의 중장기병(이)가 대결합니다. -●4월:엄백호의 근위병(이)가 퇴각했습니다. -●4월:접속잘안함HideD(이)가 함곡(으)로 진격합니다. -●4월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:보컬로이드다이스(이)가 (으)로 진격합니다. -●4월:다이스의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●4월:보컬로이드카토(이)가 (으)로 진격합니다. -●4월:카토의 맹수병(와)과 비밀의 악귀병(이)가 대결합니다. -●4월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●4월:선비의 악귀병(와)과 くま의 마귀병(이)가 대결합니다. -●4월:보컬로이드ⓖ의병장47(이)가 계양(으)로 진격합니다. -●4월:ⓖ의병장47의 귀병(와)과 Anes의 중장기병(이)가 대결합니다. -●4월:ⓖ의병장47의 귀병(이)가 퇴각했습니다. -●4월:접속잘안함북오더(이)가 남만(으)로 진격합니다. -●4월:북오더의 강궁병(와)과 정휘인의 마귀병(이)가 대결합니다. -●4월:정휘인의 마귀병(이)가 전멸했습니다. -●4월:접속잘안함쿠요(이)가 고창(으)로 진격합니다. -●4월:쿠요의 중장기병(와)과 최태원의 흑귀병(이)가 대결합니다. -●4월:최태원의 흑귀병(이)가 전멸했습니다. -●4월:쿠요의 중장기병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●4월:쿠요의 중장기병(이)가 퇴각했습니다. -●4월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●4월:평민킬러의 석궁병(와)과 진의 악귀병(이)가 대결합니다. -●4월:진의 악귀병(이)가 전멸했습니다. -●4월:평민킬러의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●4월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●4월:Navy마초의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●4월:보컬로이드비월(이)가 (으)로 진격합니다. -●4월:비월의 근위병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●4월:이쓰미의 악귀병(이)가 전멸했습니다. -●4월:비월의 근위병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●4월:접속잘안함魯堂首(이)가 남만(으)로 진격합니다. -●4월:魯堂首의 등갑병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●4월:魯堂首의 등갑병(이)가 퇴각했습니다. -●4월:보컬로이드돌아온꼰대(이)가 영안(으)로 진격합니다. -●4월:돌아온꼰대(이)가 맹수병(으)로 성벽을 공격합니다. -●4월:접속잘안함내나(이)가 남만(으)로 진격합니다. -●4월:내나의 악귀병(와)과 재야의 마귀병(이)가 대결합니다. -●4월:내나의 악귀병(이)가 퇴각했습니다. -●5월:접속잘안함강서유서(이)가 남만(으)로 진격합니다. -●5월:강서유서의 강궁병(와)과 박희수의 등갑병(이)가 대결합니다. -●5월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●5월:야근탈출의 맹수병(와)과 ⓜ공손료의 신귀병(이)가 대결합니다. -●5월:ⓜ공손료의 신귀병(이)가 전멸했습니다. -●5월:희대의 호색한 플젠(이)가 사망했습니다. -●5월:접속잘안함니쉬(이)가 함곡(으)로 진격합니다. -●5월:니쉬의 악귀병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●5월:보컬로이드ⓖ의병장43(이)가 계양(으)로 진격합니다. -●5월:ⓖ의병장43의 철기병(와)과 진리의 중장기병(이)가 대결합니다. -●5월:진리의 중장기병(이)가 전멸했습니다. -●5월:ⓖ의병장43의 철기병(와)과 Anes의 중장기병(이)가 대결합니다. -●5월:접속잘안함카이사르(이)가 남만(으)로 진격합니다. -●5월:카이사르의 강궁병(와)과 くま의 마귀병(이)가 대결합니다. -●5월:くま의 마귀병(이)가 전멸했습니다. -●5월:카이사르의 강궁병(와)과 재야의 마귀병(이)가 대결합니다. -●5월:카이사르의 강궁병(이)가 퇴각했습니다. -●5월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●5월:장임의 등갑병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●5월:랜임1분장의 맹수병(이)가 전멸했습니다. -●5월:장임의 등갑병(와)과 낭군의 천귀병(이)가 대결합니다. -●5월:낭군의 천귀병(이)가 전멸했습니다. -●5월:장임의 등갑병(와)과 박희수의 등갑병(이)가 대결합니다. -●5월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●5월:KAITO의 등갑병(와)과 전인호의 악귀병(이)가 대결합니다. -●5월:전인호의 악귀병(이)가 전멸했습니다. -●5월:KAITO의 등갑병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●5월:KAITO의 등갑병(이)가 퇴각했습니다. -●5월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●5월:코토와르의 호표기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●5월:북두칠성의 등갑병(이)가 전멸했습니다. -●5월:코토와르의 호표기병(와)과 비밀의 악귀병(이)가 대결합니다. -●5월:비밀의 악귀병(이)가 전멸했습니다. -●5월:코토와르의 호표기병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●5월:잠둥이션의 악귀병(이)가 전멸했습니다. -●5월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●5월:접속잘안함HideD(이)가 함곡(으)로 진격합니다. -●5월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드다이스(이)가 (으)로 진격합니다. -●5월:다이스의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●5월:다이스의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드카토(이)가 (으)로 진격합니다. -●5월:카토의 맹수병(와)과 무광의 악귀병(이)가 대결합니다. -●5월:무광의 악귀병(이)가 전멸했습니다. -●5월:카토(이)가 맹수병(으)로 성벽을 공격합니다. -●5월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●5월:선비의 악귀병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●5월:선비의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드ⓖ의병장48(이)가 계양(으)로 진격합니다. -●5월:ⓖ의병장48의 남귀병(와)과 Anes의 중장기병(이)가 대결합니다. -●5월:Anes의 중장기병(이)가 전멸했습니다. -●5월:ⓖ의병장48(이)가 남귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드ⓖ의병장50(이)가 계양(으)로 진격합니다. -●5월:ⓖ의병장50(이)가 철기병(으)로 성벽을 공격합니다. -●5월:접속잘안함북오더(이)가 남만(으)로 진격합니다. -●5월:북오더의 강궁병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●5월:북오더의 강궁병(이)가 퇴각했습니다. -●5월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●5월:평민킬러(이)가 석궁병(으)로 성벽을 공격합니다. -●5월:평민킬러의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●5월:Navy마초(이)가 석궁병(으)로 성벽을 공격합니다. -●5월:Navy마초의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드비월(이)가 (으)로 진격합니다. -●5월:비월(이)가 근위병(으)로 성벽을 공격합니다. -●5월:보컬로이드ⓖ의병장51(이)가 계양(으)로 진격합니다. -●5월:ⓖ의병장51(이)가 남귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드돌아온꼰대(이)가 영안(으)로 진격합니다. -●5월:돌아온꼰대의 맹수병(와)과 강서유서의 강궁병(이)가 대결합니다. -●5월:강서유서의 강궁병(이)가 전멸했습니다. -●5월:돌아온꼰대(이)가 맹수병(으)로 성벽을 공격합니다. -●5월:접속잘안함읭읭(이)가 남만(으)로 진격합니다. -●5월:읭읭의 중장기병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●5월:읭읭의 중장기병(이)가 퇴각했습니다. -●5월:보컬로이드橙(이)가 영안(으)로 진격합니다. -●5월:橙(이)가 충차(으)로 성벽을 공격합니다. -●6월:접속잘안함니쉬(이)가 함곡(으)로 진격합니다. -●6월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:니쉬의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●6월:바닥을탁치고의 마귀병(와)과 아소의 중장기병(이)가 대결합니다. -●6월:보컬로이드ⓖ의병장49(이)가 계양(으)로 진격합니다. -●6월:ⓖ의병장49(이)가 천귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드ⓖ의병장48(이)가 계양(으)로 진격합니다. -●6월:ⓖ의병장48(이)가 남귀병(으)로 성벽을 공격합니다. -●6월:ⓖ의병장48의 남귀병(이)가 퇴각했습니다. -●6월:보컬로이드ⓖ의병장50(이)가 계양(으)로 진격합니다. -●6월:ⓖ의병장50(이)가 철기병(으)로 성벽을 공격합니다. -●6월:보컬로이드ⓖ의병장45(이)가 계양(으)로 진격합니다. -●6월:ⓖ의병장45(이)가 남귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드ⓖ의병장51(이)가 계양(으)로 진격합니다. -●6월:ⓖ의병장51(이)가 남귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드ⓖ의병장43(이)가 남영(으)로 진격합니다. -●7월:ⓖ의병장43(이)가 철기병(으)로 성벽을 공격합니다. -●7월:ⓖ의병장43의 철기병(이)가 퇴각했습니다. -●7월:누군가가 허창(을)를 살피는 것 같습니다. -●7월:보컬로이드ⓖ의병장49(이)가 계양(으)로 진격합니다. -●7월:ⓖ의병장49(이)가 천귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드ⓖ의병장50(이)가 계양(으)로 진격합니다. -●7월:ⓖ의병장50의 철기병(와)과 카이사르의 강궁병(이)가 대결합니다. -●7월:ⓖ의병장50의 철기병(이)가 퇴각했습니다. -●7월:보컬로이드ⓖ의병장45(이)가 계양(으)로 진격합니다. -●7월:ⓖ의병장45의 남귀병(와)과 카이사르의 강궁병(이)가 대결합니다. -●7월:ⓖ의병장45의 남귀병(이)가 퇴각했습니다. -●7월:보컬로이드ⓖ의병장51(이)가 계양(으)로 진격합니다. -●7월:ⓖ의병장51의 남귀병(와)과 카이사르의 강궁병(이)가 대결합니다. -●7월:ⓖ의병장51의 남귀병(이)가 퇴각했습니다. -●8월:보컬로이드정력왕(이)가 남영(으)로 진격합니다. -●8월:정력왕(이)가 마귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함감정(이)가 함곡(으)로 진격합니다. -●8월:감정의 충차(와)과 제갈여포의 석궁병(이)가 대결합니다. -●8월:누군가가 남만(을)를 살피는 것 같습니다. -●8월:보컬로이드카가미네렌(이)가 남영(으)로 진격합니다. -●8월:카가미네렌의 석궁병(와)과 장임의 등갑병(이)가 대결합니다. -●8월:보컬로이드ⓖ의병장49(이)가 계양(으)로 진격합니다. -●8월:ⓖ의병장49의 천귀병(와)과 진리의 중장기병(이)가 대결합니다. -●8월:ⓖ의병장49의 천귀병(이)가 퇴각했습니다. -●9월:접속잘안함강서유서(이)가 강주(으)로 진격합니다. -●9월:강서유서의 강궁병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●9월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●9월:야근탈출의 맹수병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●9월:보컬로이드정력왕(이)가 남영(으)로 진격합니다. -●9월:정력왕의 마귀병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●9월:정력왕의 마귀병(이)가 퇴각했습니다. -●9월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●9월:장임의 등갑병(와)과 낭군의 천귀병(이)가 대결합니다. -●9월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●9월:KAITO의 등갑병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●9월:접속잘안함진리(이)가 상동(으)로 진격합니다. -●9월:진리의 중장기병(와)과 엄백호의 근위병(이)가 대결합니다. -●9월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●9월:코토와르의 호표기병(와)과 쿠요의 중장기병(이)가 대결합니다. -●9월:보컬로이드카가미네렌(이)가 남영(으)로 진격합니다. -●9월:카가미네렌의 석궁병(와)과 내나의 악귀병(이)가 대결합니다. -●9월:카가미네렌의 석궁병(이)가 퇴각했습니다. -●9월:보컬로이드낭군(이)가 남영(으)로 진격합니다. -●9월:낭군의 천귀병(와)과 북오더의 강궁병(이)가 대결합니다. -●9월:낭군의 천귀병(이)가 퇴각했습니다. -●9월:보컬로이드엄백호(이)가 계양(으)로 진격합니다. -●9월:엄백호의 근위병(와)과 Anes의 중장기병(이)가 대결합니다. -●9월:엄백호의 근위병(이)가 퇴각했습니다. -●9월:접속잘안함HideD(이)가 함곡(으)로 진격합니다. -●9월:HideD의 악귀병(와)과 ⓜ능환의 백귀병(이)가 대결합니다. -●9월:보컬로이드다이스(이)가 (으)로 진격합니다. -●9월:다이스의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●9월:보컬로이드정휘인(이)가 남영(으)로 진격합니다. -●9월:정휘인의 마귀병(와)과 내나의 악귀병(이)가 대결합니다. -●9월:내나의 악귀병(이)가 전멸했습니다. -●9월:보컬로이드카토(이)가 (으)로 진격합니다. -●9월:카토의 맹수병(와)과 전인호의 악귀병(이)가 대결합니다. -●9월:접속잘안함북오더(이)가 남만(으)로 진격합니다. -●9월:북오더의 강궁병(와)과 くま의 마귀병(이)가 대결합니다. -●9월:북오더의 강궁병(이)가 퇴각했습니다. -●9월:보컬로이드くま(이)가 남영(으)로 진격합니다. -●9월:くま의 마귀병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●9월:くま의 마귀병(이)가 퇴각했습니다. -●9월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●9월:평민킬러의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●9월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●9월:Navy마초의 석궁병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●9월:접속잘안함魯堂首(이)가 남만(으)로 진격합니다. -●9월:魯堂首의 등갑병(와)과 카토의 맹수병(이)가 대결합니다. -●9월:魯堂首의 등갑병(이)가 퇴각했습니다. -●10월:접속잘안함강서유서(이)가 강주(으)로 진격합니다. -●10월:강서유서(이)가 강궁병(으)로 성벽을 공격합니다. -●10월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●10월:야근탈출의 맹수병(와)과 쿠요의 중장기병(이)가 대결합니다. -●10월:쿠요의 중장기병(이)가 전멸했습니다. -●10월:야근탈출의 맹수병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:접속잘안함니쉬(이)가 함곡(으)로 진격합니다. -●10월:니쉬의 악귀병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●10월:제갈여포의 석궁병(이)가 전멸했습니다. -●10월:보컬로이드ⓜ능환(이)가 장안(으)로 진격합니다. -●10월:ⓜ능환의 백귀병(와)과 카이스트의 중장기병(이)가 대결합니다. -●10월:접속잘안함카이사르(이)가 상동(으)로 진격합니다. -●10월:카이사르의 강궁병(와)과 ⓖ의병장47의 귀병(이)가 대결합니다. -●10월:ⓖ의병장47의 귀병(이)가 전멸했습니다. -●10월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●10월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●10월:장임의 등갑병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●10월:장임의 등갑병(이)가 퇴각했습니다. -●10월:접속잘안함진리(이)가 상동(으)로 진격합니다. -●10월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●10월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●10월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함HideD(이)가 함곡(으)로 진격합니다. -●10월:HideD의 악귀병(와)과 ⓜ능환의 백귀병(이)가 대결합니다. -●10월:ⓜ능환의 백귀병(이)가 전멸했습니다. -●10월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:HideD의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드다이스(이)가 (으)로 진격합니다. -●10월:다이스의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●10월:다이스의 석궁병(이)가 퇴각했습니다. -●10월:보컬로이드정휘인(이)가 남영(으)로 진격합니다. -●10월:정휘인의 마귀병(와)과 읭읭의 중장기병(이)가 대결합니다. -●10월:정휘인의 마귀병(이)가 퇴각했습니다. -●10월:보컬로이드카토(이)가 남영(으)로 진격합니다. -●10월:카토의 맹수병(와)과 읭읭의 중장기병(이)가 대결합니다. -●10월:읭읭의 중장기병(이)가 전멸했습니다. -●10월:카토(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●10월:평민킬러의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●10월:평민킬러의 석궁병(이)가 퇴각했습니다. -●10월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●10월:Navy마초의 석궁병(와)과 아소의 중장기병(이)가 대결합니다. -●10월:아소의 중장기병(이)가 전멸했습니다. -●10월:Navy마초의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:Navy마초의 석궁병(이)가 퇴각했습니다. -●10월:보컬로이드비월(이)가 (으)로 진격합니다. -●10월:비월의 근위병(와)과 무광의 악귀병(이)가 대결합니다. -●10월:무광의 악귀병(이)가 전멸했습니다. -●10월:비월의 근위병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:보컬로이드橙(이)가 영안(으)로 진격합니다. -●10월:橙의 충차(와)과 진의 악귀병(이)가 대결합니다. -●11월:접속잘안함강서유서(이)가 강주(으)로 진격합니다. -●11월:강서유서(이)가 강궁병(으)로 성벽을 공격합니다. -●11월:접속잘안함니쉬(이)가 함곡(으)로 진격합니다. -●11월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:니쉬(이)가 함곡 공략에 성공했습니다. -●11월:보컬로이드랜임1분장(이)가 남영(으)로 진격합니다. -●11월:랜임1분장의 맹수병(와)과 Anes의 중장기병(이)가 대결합니다. -●11월:접속잘안함카이사르(이)가 남만(으)로 진격합니다. -●11월:카이사르의 강궁병(와)과 이루나의 황귀병(이)가 대결합니다. -●11월:카이사르의 강궁병(이)가 퇴각했습니다. -●11월:누군가가 강주(을)를 살피는 것 같습니다. -●11월:접속잘안함진리(이)가 상동(으)로 진격합니다. -●11월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●11월:진리(이)가 상동 공략에 성공했습니다. -●11월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●11월:바닥을탁치고의 마귀병(와)과 진의 악귀병(이)가 대결합니다. -●11월:진의 악귀병(이)가 전멸했습니다. -●11월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●11월:코토와르의 호표기병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●11월:쥬비아의 악귀병(이)가 전멸했습니다. -●11월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:보컬로이드카토(이)가 남영(으)로 진격합니다. -●11월:카토의 맹수병(와)과 선비의 악귀병(이)가 대결합니다. -●11월:카토의 맹수병(이)가 퇴각했습니다. -●11월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●11월:선비의 악귀병(와)과 재야의 마귀병(이)가 대결합니다. -●11월:선비의 악귀병(이)가 퇴각했습니다. -●11월:보컬로이드비월(이)가 (으)로 진격합니다. -●11월:비월의 근위병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●11월:비월의 근위병(이)가 퇴각했습니다. -●12월:누군가가 홍농(을)를 살피는 것 같습니다. -●12월:보컬로이드이루나(이)가 남영(으)로 진격합니다. -●12월:이루나(이)가 황귀병(으)로 성벽을 공격합니다. -●12월:이루나의 황귀병(이)가 퇴각했습니다. -●12월:접속잘안함감정(이)가 홍농(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:감정의 충차(이)가 퇴각했습니다. -●12월:보컬로이드랜임1분장(이)가 남영(으)로 진격합니다. -●12월:랜임1분장(이)가 맹수병(으)로 성벽을 공격합니다. -●12월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●12월:접속잘안함DVa(이)가 남해(으)로 진격합니다. -●12월:DVa의 충차(와)과 하연주의 석궁병(이)가 대결합니다. -●12월:보컬로이드바닥을탁치고(이)가 상동(으)로 진격합니다. -●12월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:접속잘안함카이스트(이)가 안정(으)로 진격합니다. -●12월:카이스트(이)가 중장기병(으)로 성벽을 공격합니다. -●12월:보컬로이드박희수(이)가 남영(으)로 진격합니다. -●12월:박희수의 등갑병(와)과 Anes의 중장기병(이)가 대결합니다. -●12월:보컬로이드돌아온꼰대(이)가 상동(으)로 진격합니다. -●12월:돌아온꼰대의 맹수병(와)과 임사영의 악귀병(이)가 대결합니다. -◆1월:213년이 되었습니다. -●1월:보컬로이드ⓖ의병장43(이)가 남영(으)로 진격합니다. -●1월:ⓖ의병장43의 맹수병(와)과 북오더의 강궁병(이)가 대결합니다. -●1월:누군가가 남해(을)를 살피는 것 같습니다. -●1월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●1월:KAITO의 등갑병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:보컬로이드카가미네렌(이)가 상동(으)로 진격합니다. -●1월:카가미네렌의 석궁병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●1월:보컬로이드낭군(이)가 남영(으)로 진격합니다. -●1월:낭군의 천귀병(와)과 내나의 악귀병(이)가 대결합니다. -●1월:접속잘안함HideD(이)가 안정(으)로 진격합니다. -●1월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:보컬로이드ⓖ의병장48(이)가 상동(으)로 진격합니다. -●1월:ⓖ의병장48의 마귀병(와)과 임사영의 악귀병(이)가 대결합니다. -●1월:보컬로이드박희수(이)가 남영(으)로 진격합니다. -●1월:박희수의 등갑병(와)과 북오더의 강궁병(이)가 대결합니다. -●1월:박희수의 등갑병(이)가 퇴각했습니다. -●1월:접속잘안함북오더(이)가 남만(으)로 진격합니다. -●1월:북오더의 강궁병(와)과 정휘인의 마귀병(이)가 대결합니다. -●1월:북오더의 강궁병(이)가 퇴각했습니다. -●1월:보컬로이드くま(이)가 상동(으)로 진격합니다. -●1월:くま의 마귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●1월:잠둥이션의 악귀병(이)가 전멸했습니다. -●1월:くま의 마귀병(와)과 임사영의 악귀병(이)가 대결합니다. -●1월:임사영의 악귀병(이)가 전멸했습니다. -●1월:접속잘안함내나(이)가 남만(으)로 진격합니다. -●1월:내나의 악귀병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●1월:내나의 악귀병(이)가 퇴각했습니다. -●1월:접속잘안함ⓜ공손료(이)가 여남(으)로 진격합니다. -●1월:ⓜ공손료(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함아소(이)가 안정(으)로 진격합니다. -●2월:아소(이)가 중장기병(으)로 성벽을 공격합니다. -●2월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●2월:야근탈출의 맹수병(와)과 쿠요의 중장기병(이)가 대결합니다. -●2월:보컬로이드ⓖ의병장43(이)가 남영(으)로 진격합니다. -●2월:ⓖ의병장43의 맹수병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:ⓖ의병장43의 맹수병(이)가 퇴각했습니다. -●2월:보컬로이드카가미네렌(이)가 상동(으)로 진격합니다. -●2월:카가미네렌의 석궁병(와)과 진리의 중장기병(이)가 대결합니다. -●2월:보컬로이드낭군(이)가 남영(으)로 진격합니다. -●2월:낭군의 천귀병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:낭군의 천귀병(이)가 퇴각했습니다. -●2월:접속잘안함HideD(이)가 안정(으)로 진격합니다. -●2월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드다이스(이)가 (으)로 진격합니다. -●2월:다이스의 석궁병(와)과 전인호의 악귀병(이)가 대결합니다. -●2월:접속잘안함이쓰미(이)가 남해(으)로 진격합니다. -●2월:이쓰미의 악귀병(와)과 ⓖ의병장50의 백마병(이)가 대결합니다. -●2월:ⓖ의병장50의 백마병(이)가 전멸했습니다. -●2월:이쓰미의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●2월:이쓰미의 악귀병(이)가 퇴각했습니다. -●2월:보컬로이드정휘인(이)가 남영(으)로 진격합니다. -●2월:정휘인의 마귀병(와)과 카이사르의 강궁병(이)가 대결합니다. -●2월:정휘인의 마귀병(이)가 퇴각했습니다. -●2월:보컬로이드제갈여포(이)가 남영(으)로 진격합니다. -●2월:제갈여포의 석궁병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:제갈여포의 석궁병(이)가 퇴각했습니다. -●2월:보컬로이드くま(이)가 상동(으)로 진격합니다. -●2월:くま의 마귀병(와)과 진리의 중장기병(이)가 대결합니다. -●2월:くま의 마귀병(이)가 퇴각했습니다. -●2월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●2월:평민킬러의 석궁병(와)과 전인호의 악귀병(이)가 대결합니다. -●2월:전인호의 악귀병(이)가 전멸했습니다. -●2월:평민킬러의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●2월:누군가가 함곡(을)를 살피는 것 같습니다. -●3월:접속잘안함강서유서(이)가 남해(으)로 진격합니다. -●3월:강서유서의 강궁병(와)과 카토의 맹수병(이)가 대결합니다. -●3월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●3월:야근탈출의 맹수병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●3월:접속잘안함카이사르(이)가 남해(으)로 진격합니다. -●3월:카이사르의 강궁병(와)과 ⓖ의병장49의 천귀병(이)가 대결합니다. -●3월:카이사르의 강궁병(이)가 퇴각했습니다. -●3월:접속잘안함DVa(이)가 안정(으)로 진격합니다. -●3월:DVa의 충차(와)과 ⓖ의병장45의 흑귀병(이)가 대결합니다. -●3월:DVa의 충차(이)가 퇴각했습니다. -●3월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●3월:KAITO의 등갑병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●3월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●3월:코토와르의 호표기병(와)과 쿠요의 중장기병(이)가 대결합니다. -●3월:보컬로이드엄백호(이)가 상동(으)로 진격합니다. -●3월:엄백호의 맹수병(와)과 진리의 중장기병(이)가 대결합니다. -●3월:진리의 중장기병(이)가 전멸했습니다. -●3월:엄백호의 맹수병(와)과 강서유서의 강궁병(이)가 대결합니다. -●3월:보컬로이드ⓖ의병장49(이)가 상동(으)로 진격합니다. -●3월:ⓖ의병장49의 천귀병(와)과 강서유서의 강궁병(이)가 대결합니다. -●3월:ⓖ의병장49의 천귀병(이)가 퇴각했습니다. -●3월:보컬로이드다이스(이)가 (으)로 진격합니다. -●3월:다이스의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:다이스의 석궁병(이)가 퇴각했습니다. -●3월:주시에서 구경(이)라는 호걸이 천하에 이름을 알립니다. -●3월:보컬로이드카토(이)가 상동(으)로 진격합니다. -●3월:카토의 맹수병(와)과 강서유서의 강궁병(이)가 대결합니다. -●3월:강서유서의 강궁병(이)가 전멸했습니다. -●3월:카토(이)가 맹수병(으)로 성벽을 공격합니다. -●3월:카토(이)가 상동 공략에 성공했습니다. -●3월:접속잘안함비밀(이)가 남만(으)로 진격합니다. -●3월:비밀의 악귀병(와)과 이루나의 황귀병(이)가 대결합니다. -●3월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●3월:평민킬러의 석궁병(와)과 狂三의 악귀병(이)가 대결합니다. -●3월:狂三의 악귀병(이)가 전멸했습니다. -●3월:평민킬러의 석궁병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:누군가가 장안(을)를 살피는 것 같습니다. -●3월:보컬로이드ⓖ의병장45(이)가 장안(으)로 진격합니다. -●3월:ⓖ의병장45(이)가 흑귀병(으)로 성벽을 공격합니다. -●3월:ⓖ의병장45의 흑귀병(이)가 퇴각했습니다. -●3월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●3월:ⓖ의병장51의 흑귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●3월:북두칠성의 등갑병(이)가 전멸했습니다. -●3월:ⓖ의병장51의 흑귀병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:접속잘안함읭읭(이)가 남만(으)로 진격합니다. -●3월:읭읭의 중장기병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●3월:접속잘안함ⓜ공손료(이)가 허창(으)로 진격합니다. -●3월:ⓜ공손료의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●3월:ⓜ공손료의 악귀병(이)가 퇴각했습니다. -●4월:접속잘안함Anes(이)가 상동(으)로 진격합니다. -●4월:Anes의 중장기병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●4월:보컬로이드정력왕(이)가 남영(으)로 진격합니다. -●4월:정력왕의 마귀병(와)과 장임의 등갑병(이)가 대결합니다. -●4월:접속잘안함니쉬(이)가 상동(으)로 진격합니다. -●4월:니쉬의 악귀병(와)과 카토의 맹수병(이)가 대결합니다. -●4월:카토의 맹수병(이)가 전멸했습니다. -●4월:니쉬의 악귀병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●4월:돌아온꼰대의 맹수병(이)가 전멸했습니다. -●4월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함감정(이)가 파양(으)로 진격합니다. -●4월:감정(이)가 충차(으)로 성벽을 공격합니다. -●4월:감정(이)가 파양 공략에 성공했습니다. -●4월:보컬로이드랜임1분장(이)가 남영(으)로 진격합니다. -●4월:랜임1분장의 맹수병(와)과 선비의 악귀병(이)가 대결합니다. -●4월:랜임1분장의 맹수병(이)가 퇴각했습니다. -●4월:접속잘안함장임(이)가 남만(으)로 진격합니다. -●4월:장임의 등갑병(와)과 재야의 마귀병(이)가 대결합니다. -●4월:재야의 마귀병(이)가 전멸했습니다. -●4월:누군가가 여남(을)를 살피는 것 같습니다. -●4월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●4월:KAITO의 등갑병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●4월:KAITO의 등갑병(이)가 퇴각했습니다. -●4월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●4월:바닥을탁치고의 마귀병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●4월:이쓰미의 악귀병(이)가 전멸했습니다. -●4월:바닥을탁치고의 마귀병(와)과 진의 악귀병(이)가 대결합니다. -●4월:접속잘안함진(이)가 고창(으)로 진격합니다. -●4월:진의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●4월:진의 악귀병(이)가 퇴각했습니다. -●4월:접속잘안함카이스트(이)가 홍농(으)로 진격합니다. -●4월:카이스트의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●4월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●4월:코토와르의 호표기병(와)과 쿠요의 중장기병(이)가 대결합니다. -●4월:쿠요의 중장기병(이)가 전멸했습니다. -●4월:코토와르의 호표기병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●4월:아르카나하트의 악귀병(이)가 전멸했습니다. -●4월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●4월:선비의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●4월:하연주의 석궁병(이)가 전멸했습니다. -●4월:선비의 악귀병(와)과 정력왕의 마귀병(이)가 대결합니다. -●4월:정력왕의 마귀병(이)가 전멸했습니다. -●4월:선비(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함비밀(이)가 상동(으)로 진격합니다. -●4월:비밀(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:비밀(이)가 상동 공략에 성공했습니다. -●4월:누군가가 (을)를 살피는 것 같습니다. -●4월:보컬로이드비월(이)가 (으)로 진격합니다. -●4월:비월의 근위병(와)과 카이사르의 강궁병(이)가 대결합니다. -●4월:카이사르의 강궁병(이)가 전멸했습니다. -●4월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●4월:ⓖ의병장51(이)가 흑귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함니쉬(이)가 홍농(으)로 진격합니다. -●5월:니쉬의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●5월:니쉬의 악귀병(이)가 퇴각했습니다. -●5월:접속잘안함감정(이)가 (으)로 진격합니다. -●5월:감정(이)가 충차(으)로 성벽을 공격합니다. -●5월:감정(이)가 공략에 성공했습니다. -●5월:누군가가 남해(을)를 살피는 것 같습니다. -●5월:누군가가 홍농(을)를 살피는 것 같습니다. -●5월:보컬로이드바닥을탁치고(이)가 시상(으)로 진격합니다. -●5월:바닥을탁치고(이)가 마귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함카이스트(이)가 홍농(으)로 진격합니다. -●5월:카이스트의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●5월:Navy마초의 석궁병(이)가 전멸했습니다. -●5월:카이스트(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:카이스트의 악귀병(이)가 퇴각했습니다. -●5월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●5월:HideD의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●5월:코토와르의 호표기병(이)가 전멸했습니다. -●5월:HideD의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●5월:누군가가 탐라(을)를 살피는 것 같습니다. -●5월:접속잘안함선비(이)가 남만(으)로 진격합니다. -●5월:선비의 악귀병(와)과 낭군의 천귀병(이)가 대결합니다. -●5월:선비의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●5월:ⓖ의병장47(이)가 남귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함잠둥이션(이)가 남해(으)로 진격합니다. -●5월:잠둥이션의 악귀병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●5월:접속잘안함魯堂首(이)가 남만(으)로 진격합니다. -●5월:魯堂首의 등갑병(와)과 박희수의 등갑병(이)가 대결합니다. -●5월:접속잘안함내나(이)가 남만(으)로 진격합니다. -●5월:내나의 악귀병(와)과 낭군의 천귀병(이)가 대결합니다. -●5월:낭군의 천귀병(이)가 전멸했습니다. -●6월:접속잘안함임사영(이)가 남해(으)로 진격합니다. -●6월:임사영의 악귀병(와)과 카가미네렌의 석궁병(이)가 대결합니다. -●6월:카가미네렌의 석궁병(이)가 전멸했습니다. -●6월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:임사영(이)가 남해 공략에 성공했습니다. -●6월:접속잘안함강서유서(이)가 홍농(으)로 진격합니다. -●6월:강서유서(이)가 강궁병(으)로 성벽을 공격합니다. -●6월:접속잘안함Anes(이)가 탐라(으)로 진격합니다. -●6월:Anes(이)가 중장기병(으)로 성벽을 공격합니다. -●6월:누군가가 하내(을)를 살피는 것 같습니다. -●6월:보컬로이드ⓜ능환(이)가 호로(으)로 진격합니다. -●6월:ⓜ능환(이)가 남귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함장임(이)가 홍농(으)로 진격합니다. -●6월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:장임의 등갑병(이)가 퇴각했습니다. -●6월:누군가가 건업(을)를 살피는 것 같습니다. -●6월:누군가가 자동(을)를 살피는 것 같습니다. -●6월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●6월:HideD의 악귀병(와)과 야근탈출의 맹수병(이)가 대결합니다. -●6월:HideD의 악귀병(이)가 퇴각했습니다. -●6월:누군가가 허창(을)를 살피는 것 같습니다. -●6월:보컬로이드박희수(이)가 남영(으)로 진격합니다. -●6월:박희수의 등갑병(와)과 북오더의 강궁병(이)가 대결합니다. -●6월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●6월:ⓖ의병장47(이)가 남귀병(으)로 성벽을 공격합니다. -●6월:ⓖ의병장47의 남귀병(이)가 퇴각했습니다. -●6월:접속잘안함북오더(이)가 남만(으)로 진격합니다. -●6월:북오더의 강궁병(와)과 이루나의 황귀병(이)가 대결합니다. -●6월:북오더의 강궁병(이)가 퇴각했습니다. -●6월:보컬로이드くま(이)가 상동(으)로 진격합니다. -●6월:くま(이)가 마귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함잠둥이션(이)가 산월(으)로 진격합니다. -●6월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함魯堂首(이)가 교지(으)로 진격합니다. -●6월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●6월:접속잘안함내나(이)가 교지(으)로 진격합니다. -●6월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:내나(이)가 교지 공략에 성공했습니다. -●7월:접속잘안함강서유서(이)가 홍농(으)로 진격합니다. -●7월:강서유서의 강궁병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●7월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●7월:야근탈출의 맹수병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●7월:보컬로이드ⓜ능환(이)가 호로(으)로 진격합니다. -●7월:ⓜ능환(이)가 남귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드이루나(이)가 남영(으)로 진격합니다. -●7월:이루나(이)가 황귀병(으)로 성벽을 공격합니다. -●7월:접속잘안함감정(이)가 남만(으)로 진격합니다. -●7월:감정의 충차(와)과 하연주의 석궁병(이)가 대결합니다. -●7월:감정의 충차(이)가 퇴각했습니다. -●7월:누군가가 사비(을)를 살피는 것 같습니다. -●7월:보컬로이드다이스(이)가 (으)로 진격합니다. -●7월:다이스의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●7월:누군가가 여남(을)를 살피는 것 같습니다. -●7월:보컬로이드정휘인(이)가 남영(으)로 진격합니다. -●7월:정휘인의 마귀병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●7월:정휘인의 마귀병(이)가 퇴각했습니다. -●7월:보컬로이드박희수(이)가 남영(으)로 진격합니다. -●7월:박희수의 등갑병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●7월:쥬비아의 악귀병(이)가 전멸했습니다. -●7월:박희수(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:박희수의 등갑병(이)가 퇴각했습니다. -●7월:보컬로이드くま(이)가 (으)로 진격합니다. -●7월:くま의 마귀병(와)과 강서유서의 강궁병(이)가 대결합니다. -●7월:강서유서의 강궁병(이)가 전멸했습니다. -●7월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●7월:평민킬러의 석궁병(와)과 임사영의 악귀병(이)가 대결합니다. -●8월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●8월:임사영의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●8월:임사영의 악귀병(이)가 퇴각했습니다. -●8월:접속잘안함아소(이)가 가맹(으)로 진격합니다. -●8월:아소(이)가 중장기병(으)로 성벽을 공격합니다. -●8월:접속잘안함Anes(이)가 탐라(으)로 진격합니다. -●8월:Anes의 중장기병(와)과 카토의 맹수병(이)가 대결합니다. -●8월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●8월:야근탈출의 맹수병(와)과 HideD의 악귀병(이)가 대결합니다. -●8월:야근탈출의 맹수병(이)가 퇴각했습니다. -●8월:접속잘안함니쉬(이)가 탐라(으)로 진격합니다. -●8월:니쉬의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●8월:보컬로이드니콜(이)가 호로(으)로 진격합니다. -●8월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●8월:니콜(이)가 호로 공략에 성공했습니다. -●8월:접속잘안함카이사르(이)가 탐라(으)로 진격합니다. -●8월:카이사르의 강궁병(와)과 엄백호의 맹수병(이)가 대결합니다. -●8월:접속잘안함장임(이)가 가맹(으)로 진격합니다. -●8월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●8월:접속잘안함DVa(이)가 성도(으)로 진격합니다. -●8월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●8월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●8월:KAITO의 등갑병(와)과 HideD의 악귀병(이)가 대결합니다. -●8월:HideD의 악귀병(이)가 전멸했습니다. -●8월:접속잘안함진리(이)가 탐라(으)로 진격합니다. -●8월:진리의 중장기병(와)과 카토의 맹수병(이)가 대결합니다. -●8월:접속잘안함진(이)가 고창(으)로 진격합니다. -●8월:진(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함무광(이)가 탐라(으)로 진격합니다. -●8월:무광의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●8월:바닥을탁치고의 마귀병(이)가 전멸했습니다. -●8월:무광의 악귀병(와)과 카토의 맹수병(이)가 대결합니다. -●8월:카토의 맹수병(이)가 전멸했습니다. -●8월:보컬로이드엄백호(이)가 (으)로 진격합니다. -●8월:엄백호의 맹수병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●8월:엄백호의 맹수병(이)가 퇴각했습니다. -●8월:보컬로이드다이스(이)가 (으)로 진격합니다. -●8월:다이스의 석궁병(와)과 비밀의 악귀병(이)가 대결합니다. -●8월:접속잘안함이쓰미(이)가 탐라(으)로 진격합니다. -●8월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:이쓰미(이)가 탐라 공략에 성공했습니다. -●8월:구경(이)가 농약을 술인줄 알고 마셔 죽고말았습니다. -●8월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●8월:비밀의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●8월:비밀의 악귀병(이)가 퇴각했습니다. -●8월:보컬로이드ⓖ의병장50(이)가 탐라(으)로 진격합니다. -●8월:ⓖ의병장50의 기병(와)과 전인호의 악귀병(이)가 대결합니다. -●8월:접속잘안함북오더(이)가 (으)로 진격합니다. -●8월:북오더의 강궁병(와)과 Air의 맹수병(이)가 대결합니다. -●8월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●8월:평민킬러의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●8월:평민킬러의 석궁병(이)가 퇴각했습니다. -●8월:보컬로이드비월(이)가 (으)로 진격합니다. -●8월:비월의 근위병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●8월:접속잘안함魯堂首(이)가 건업(으)로 진격합니다. -●8월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●8월:접속잘안함내나(이)가 회계(으)로 진격합니다. -●8월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:내나(이)가 회계 공략에 성공했습니다. -●9월:접속잘안함Anes(이)가 사비(으)로 진격합니다. -●9월:Anes(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:Anes(이)가 사비 공략에 성공했습니다. -●9월:접속잘안함니쉬(이)가 이도(으)로 진격합니다. -●9월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드니콜(이)가 탐라(으)로 진격합니다. -●9월:니콜의 충차(와)과 김우민의 악귀병(이)가 대결합니다. -●9월:니콜의 충차(이)가 퇴각했습니다. -●9월:접속잘안함카이사르(이)가 위례(으)로 진격합니다. -●9월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●9월:접속잘안함장임(이)가 위례(으)로 진격합니다. -●9월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:접속잘안함DVa(이)가 남만(으)로 진격합니다. -●9월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●9월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●9월:KAITO의 등갑병(와)과 카이스트의 악귀병(이)가 대결합니다. -●9월:KAITO의 등갑병(이)가 퇴각했습니다. -●9월:접속잘안함진리(이)가 이도(으)로 진격합니다. -●9월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:진리의 중장기병(이)가 퇴각했습니다. -●9월:접속잘안함진(이)가 고창(으)로 진격합니다. -●9월:진의 악귀병(와)과 くま의 마귀병(이)가 대결합니다. -●9월:진의 악귀병(이)가 퇴각했습니다. -●9월:접속잘안함무광(이)가 이도(으)로 진격합니다. -●9월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함이쓰미(이)가 계림(으)로 진격합니다. -●9월:이쓰미의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●9월:접속잘안함전인호(이)가 계림(으)로 진격합니다. -●9월:전인호의 악귀병(와)과 ⓖ의병장48의 천귀병(이)가 대결합니다. -●9월:보컬로이드ⓖ의병장48(이)가 탐라(으)로 진격합니다. -●9월:ⓖ의병장48의 천귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●9월:ⓖ의병장48의 천귀병(이)가 퇴각했습니다. -●9월:보컬로이드ⓖ의병장50(이)가 사비(으)로 진격합니다. -●9월:ⓖ의병장50의 기병(와)과 장임의 등갑병(이)가 대결합니다. -●9월:ⓖ의병장50의 기병(이)가 퇴각했습니다. -●9월:접속잘안함북오더(이)가 (으)로 진격합니다. -●9월:북오더의 강궁병(와)과 정력왕의 마귀병(이)가 대결합니다. -●9월:정력왕의 마귀병(이)가 전멸했습니다. -●9월:보컬로이드くま(이)가 탐라(으)로 진격합니다. -●9월:くま의 마귀병(와)과 읭읭의 중장기병(이)가 대결합니다. -●9월:くま의 마귀병(이)가 퇴각했습니다. -●9월:접속잘안함쿠요(이)가 (으)로 진격합니다. -●9월:쿠요(이)가 중장기병(으)로 성벽을 공격합니다. -●9월:쿠요(이)가 공략에 성공했습니다. -●9월:보컬로이드ⓖ의병장45(이)가 장안(으)로 진격합니다. -●9월:ⓖ의병장45(이)가 남귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함잠둥이션(이)가 이도(으)로 진격합니다. -●9월:잠둥이션의 악귀병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●9월:보컬로이드비월(이)가 (으)로 진격합니다. -●9월:비월의 근위병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●9월:비월의 근위병(이)가 퇴각했습니다. -●9월:접속잘안함魯堂首(이)가 이도(으)로 진격합니다. -●9월:魯堂首의 등갑병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●9월:제갈여포의 석궁병(이)가 전멸했습니다. -●9월:魯堂首(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:접속잘안함읭읭(이)가 이도(으)로 진격합니다. -●9월:읭읭의 중장기병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●9월:읭읭의 중장기병(이)가 퇴각했습니다. -●9월:접속잘안함내나(이)가 이도(으)로 진격합니다. -●9월:내나의 악귀병(와)과 돌아온꼰대의 맹수병(이)가 대결합니다. -●9월:돌아온꼰대의 맹수병(이)가 전멸했습니다. -●9월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함아소(이)가 허창(으)로 진격합니다. -●10월:아소(이)가 중장기병(으)로 성벽을 공격합니다. -●10월:접속잘안함Anes(이)가 위례(으)로 진격합니다. -●10월:Anes의 중장기병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●10월:Anes의 중장기병(이)가 퇴각했습니다. -●10월:접속잘안함니쉬(이)가 이도(으)로 진격합니다. -●10월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:니쉬의 악귀병(이)가 퇴각했습니다. -●10월:접속잘안함감정(이)가 이도(으)로 진격합니다. -●10월:감정(이)가 충차(으)로 성벽을 공격합니다. -●10월:감정(이)가 이도 공략에 성공했습니다. -●10월:보컬로이드ⓖ의병장43(이)가 이도(으)로 진격합니다. -●10월:ⓖ의병장43(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:접속잘안함DVa(이)가 남만(으)로 진격합니다. -●10월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●10월:DVa(이)가 남만 공략에 성공했습니다. -●10월:보컬로이드카가미네렌(이)가 사비(으)로 진격합니다. -●10월:카가미네렌(이)가 궁기병(으)로 성벽을 공격합니다. -●10월:보컬로이드ⓖ의병장49(이)가 사비(으)로 진격합니다. -●10월:ⓖ의병장49(이)가 귀병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장49(이)가 사비 공략에 성공했습니다. -●10월:누군가가 계림(을)를 살피는 것 같습니다. -●10월:접속잘안함전인호(이)가 계림(으)로 진격합니다. -●10월:전인호의 악귀병(와)과 ⓖ의병장43의 맹수병(이)가 대결합니다. -●10월:전인호의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드ⓖ의병장45(이)가 장안(으)로 진격합니다. -●10월:ⓖ의병장45(이)가 남귀병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장45의 남귀병(이)가 퇴각했습니다. -●10월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●10월:ⓖ의병장51의 황귀병(와)과 아소의 중장기병(이)가 대결합니다. -●10월:아소의 중장기병(이)가 전멸했습니다. -●10월:ⓖ의병장51(이)가 황귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드橙(이)가 여강(으)로 진격합니다. -●10월:橙(이)가 충차(으)로 성벽을 공격합니다. -●10월:橙의 충차(이)가 퇴각했습니다. -●10월:에서 소현(이)라는 호걸이 천하에 이름을 알립니다. -●11월:접속잘안함강서유서(이)가 사비(으)로 진격합니다. -●11월:강서유서의 강궁병(와)과 정휘인의 마귀병(이)가 대결합니다. -●11월:이루나(이)가 위례(으)로 천도를 명령하였습니다. -●11월:접속잘안함감정(이)가 홍농(으)로 진격합니다. -●11월:감정(이)가 충차(으)로 성벽을 공격합니다. -●11월:감정(이)가 홍농 공략에 성공했습니다. -●11월:감정(이)가 역경(+9)(을)를 습득했습니다! -●11월:보컬로이드ⓖ의병장43(이)가 탐라(으)로 진격합니다. -●11월:ⓖ의병장43의 맹수병(와)과 선비의 악귀병(이)가 대결합니다. -●11월:ⓖ의병장43의 맹수병(이)가 퇴각했습니다. -●11월:접속잘안함DVa(이)가 운남(으)로 진격합니다. -●11월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●11월:DVa(이)가 운남 공략에 성공했습니다. -●11월:졸본에서 눈팅하러옴(이)라는 호걸이 천하에 이름을 알립니다. -●11월:보컬로이드낭군(이)가 이도(으)로 진격합니다. -●11월:낭군의 천귀병(와)과 무광의 악귀병(이)가 대결합니다. -●11월:보컬로이드ⓖ의병장49(이)가 탐라(으)로 진격합니다. -●11월:ⓖ의병장49의 귀병(와)과 그만좀불러좀의 악귀병(이)가 대결합니다. -●11월:보컬로이드Navy마초(이)가 (으)로 진격합니다. -●11월:Navy마초의 석궁병(와)과 쿠요의 중장기병(이)가 대결합니다. -●11월:쿠요의 중장기병(이)가 전멸했습니다. -●11월:Navy마초의 석궁병(와)과 狂三의 악귀병(이)가 대결합니다. -●11월:접속잘안함魯堂首(이)가 사비(으)로 진격합니다. -●11월:魯堂首의 등갑병(와)과 이루나의 황귀병(이)가 대결합니다. -●11월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●11월:ⓖ의병장51의 황귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●11월:눈팅하러옴(이)가 접속잘안함임관했습니다. -●12월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●12월:임사영의 악귀병(와)과 평민킬러의 석궁병(이)가 대결합니다. -●12월:접속잘안함강서유서(이)가 사비(으)로 진격합니다. -●12월:강서유서의 강궁병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●12월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●12월:야근탈출의 호표기병(와)과 비밀의 악귀병(이)가 대결합니다. -●12월:접속잘안함감정(이)가 하내(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:감정(이)가 하내 공략에 성공했습니다. -●12월:접속잘안함DVa(이)가 건녕(으)로 진격합니다. -●12월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●12월:DVa(이)가 건녕 공략에 성공했습니다. -●12월:보컬로이드낭군(이)가 이도(으)로 진격합니다. -●12월:낭군의 천귀병(와)과 카이스트의 악귀병(이)가 대결합니다. -●12월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●12월:엄백호의 근위병(와)과 무광의 악귀병(이)가 대결합니다. -●12월:무광의 악귀병(이)가 전멸했습니다. -●12월:엄백호의 근위병(와)과 카이스트의 악귀병(이)가 대결합니다. -●12월:보컬로이드ⓖ의병장49(이)가 탐라(으)로 진격합니다. -●12월:ⓖ의병장49의 귀병(와)과 카이사르의 강궁병(이)가 대결합니다. -●12월:ⓖ의병장49의 귀병(이)가 퇴각했습니다. -●12월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●12월:HideD의 악귀병(와)과 카토의 호표기병(이)가 대결합니다. -●12월:보컬로이드다이스(이)가 (으)로 진격합니다. -●12월:다이스의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●12월:누군가가 (을)를 살피는 것 같습니다. -●12월:보컬로이드카토(이)가 (으)로 진격합니다. -●12월:카토의 호표기병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●12월:카토의 호표기병(이)가 퇴각했습니다. -●12월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●12월:비밀의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●12월:비밀의 악귀병(이)가 퇴각했습니다. -●12월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●12월:평민킬러의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●12월:평민킬러의 석궁병(이)가 퇴각했습니다. -●12월:접속잘안함직장인페이트(이)가 가맹(으)로 진격합니다. -●12월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -◆1월:214년이 되었습니다. -●1월:접속잘안함강서유서(이)가 건업(으)로 진격합니다. -●1월:강서유서의 강궁병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●1월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●1월:야근탈출의 호표기병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●1월:야근탈출의 호표기병(이)가 퇴각했습니다. -●1월:보컬로이드ⓜ능환(이)가 (으)로 진격합니다. -●1월:ⓜ능환의 귀병(와)과 진리의 중장기병(이)가 대결합니다. -●1월:접속잘안함감정(이)가 호관(으)로 진격합니다. -●1월:감정(이)가 충차(으)로 성벽을 공격합니다. -●1월:감정(이)가 호관 공략에 성공했습니다. -●1월:접속잘안함카이사르(이)가 건업(으)로 진격합니다. -●1월:카이사르의 강궁병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●1월:Navy마초의 석궁병(이)가 전멸했습니다. -●1월:카이사르의 강궁병(와)과 ⓜ능환의 귀병(이)가 대결합니다. -●1월:ⓜ능환의 귀병(이)가 전멸했습니다. -●1월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●1월:접속잘안함DVa(이)가 귀양(으)로 진격합니다. -●1월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●1월:DVa(이)가 귀양 공략에 성공했습니다. -●1월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●1월:KAITO의 등갑병(와)과 HideD의 악귀병(이)가 대결합니다. -●1월:HideD의 악귀병(이)가 전멸했습니다. -●1월:KAITO의 등갑병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:북두칠성의 등갑병(이)가 전멸했습니다. -●1월:KAITO의 등갑병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●1월:접속잘안함진리(이)가 건업(으)로 진격합니다. -●1월:진리(이)가 중장기병(으)로 성벽을 공격합니다. -●1월:진리의 중장기병(이)가 퇴각했습니다. -●1월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●1월:코토와르의 호표기병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●1월:아르카나하트의 악귀병(이)가 전멸했습니다. -●1월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●1월:보컬로이드다이스(이)가 (으)로 진격합니다. -●1월:다이스(이)가 석궁병(으)로 성벽을 공격합니다. -●1월:다이스의 석궁병(이)가 퇴각했습니다. -●1월:희대의 호색한 그래도우리는(이)가 사망했습니다. -●1월:접속잘안함북오더(이)가 사비(으)로 진격합니다. -●1월:북오더의 강궁병(와)과 정휘인의 마귀병(이)가 대결합니다. -●1월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●1월:くま의 천귀병(와)과 니쉬의 악귀병(이)가 대결합니다. -●1월:접속잘안함잠둥이션(이)가 계림(으)로 진격합니다. -●1월:잠둥이션의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●1월:보컬로이드비월(이)가 (으)로 진격합니다. -●1월:비월의 근위병(와)과 전인호의 악귀병(이)가 대결합니다. -●1월:접속잘안함읭읭(이)가 계림(으)로 진격합니다. -●1월:읭읭의 맹수병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●1월:접속잘안함내나(이)가 사비(으)로 진격합니다. -●1월:내나의 악귀병(와)과 Air의 호표기병(이)가 대결합니다. -●1월:Air의 호표기병(이)가 전멸했습니다. -●1월:내나의 악귀병(와)과 이루나의 황귀병(이)가 대결합니다. -●1월:접속잘안함직장인페이트(이)가 가맹(으)로 진격합니다. -●1월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●1월:접속잘안함ⓜ공손료(이)가 계림(으)로 진격합니다. -●1월:ⓜ공손료의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●2월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●2월:아소의 중장기병(와)과 박희수의 등갑병(이)가 대결합니다. -●2월:접속잘안함Anes(이)가 건업(으)로 진격합니다. -●2월:Anes의 맹수병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●2월:접속잘안함니쉬(이)가 계림(으)로 진격합니다. -●2월:니쉬의 악귀병(와)과 박희수의 등갑병(이)가 대결합니다. -●2월:니쉬의 악귀병(이)가 퇴각했습니다. -●2월:접속잘안함감정(이)가 (으)로 진격합니다. -●2월:감정(이)가 충차(으)로 성벽을 공격합니다. -●2월:감정(이)가 공략에 성공했습니다. -●2월:접속잘안함쥬비아(이)가 건업(으)로 진격합니다. -●2월:쥬비아의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●2월:Navy마초의 석궁병(이)가 전멸했습니다. -●2월:쥬비아의 악귀병(와)과 KAITO의 등갑병(이)가 대결합니다. -●2월:KAITO의 등갑병(이)가 전멸했습니다. -●2월:접속잘안함카이사르(이)가 건업(으)로 진격합니다. -●2월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●2월:접속잘안함장임(이)가 계림(으)로 진격합니다. -●2월:장임의 등갑병(와)과 재야의 마귀병(이)가 대결합니다. -●2월:접속잘안함DVa(이)가 주시(으)로 진격합니다. -●2월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●2월:DVa(이)가 주시 공략에 성공했습니다. -●2월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●2월:코토와르의 호표기병(와)과 전인호의 악귀병(이)가 대결합니다. -●2월:전인호의 악귀병(이)가 전멸했습니다. -●2월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●2월:접속잘안함이쓰미(이)가 건업(으)로 진격합니다. -●2월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:보컬로이드정휘인(이)가 이도(으)로 진격합니다. -●2월:정휘인의 마귀병(와)과 아소의 중장기병(이)가 대결합니다. -●2월:정휘인의 마귀병(이)가 퇴각했습니다. -●2월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●2월:ⓖ의병장47(이)가 남귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함북오더(이)가 사비(으)로 진격합니다. -●2월:북오더의 강궁병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●2월:북오더의 강궁병(이)가 퇴각했습니다. -●2월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●2월:くま의 천귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●2월:くま의 천귀병(이)가 퇴각했습니다. -●2월:접속잘안함잠둥이션(이)가 계림(으)로 진격합니다. -●2월:잠둥이션의 악귀병(와)과 ⓖ의병장48의 흑귀병(이)가 대결합니다. -●2월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●2월:보컬로이드비월(이)가 (으)로 진격합니다. -●2월:비월(이)가 근위병(으)로 성벽을 공격합니다. -●2월:보컬로이드돌아온꼰대(이)가 탐라(으)로 진격합니다. -●2월:돌아온꼰대의 호표기병(와)과 선비의 악귀병(이)가 대결합니다. -●2월:돌아온꼰대의 호표기병(이)가 퇴각했습니다. -●2월:접속잘안함내나(이)가 사비(으)로 진격합니다. -●2월:내나의 악귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●2월:내나의 악귀병(이)가 퇴각했습니다. -●2월:접속잘안함ⓜ공손료(이)가 사비(으)로 진격합니다. -●2월:ⓜ공손료의 악귀병(와)과 정력왕의 마귀병(이)가 대결합니다. -●2월:ⓜ공손료의 악귀병(이)가 퇴각했습니다. -●3월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●3월:아소의 중장기병(와)과 ⓖ의병장50의 기병(이)가 대결합니다. -●3월:아소의 중장기병(이)가 퇴각했습니다. -●3월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●3월:Anes의 맹수병(와)과 박희수의 등갑병(이)가 대결합니다. -●3월:박희수의 등갑병(이)가 전멸했습니다. -●3월:보컬로이드정력왕(이)가 탐라(으)로 진격합니다. -●3월:정력왕의 마귀병(와)과 장임의 등갑병(이)가 대결합니다. -●3월:누군가가 위례(을)를 살피는 것 같습니다. -●3월:접속잘안함감정(이)가 복양(으)로 진격합니다. -●3월:감정(이)가 충차(으)로 성벽을 공격합니다. -●3월:감정(이)가 복양 공략에 성공했습니다. -●3월:접속잘안함쥬비아(이)가 건업(으)로 진격합니다. -●3월:쥬비아의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●3월:쥬비아의 악귀병(이)가 퇴각했습니다. -●3월:접속잘안함장임(이)가 계림(으)로 진격합니다. -●3월:장임의 등갑병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●3월:장임의 등갑병(이)가 퇴각했습니다. -●3월:접속잘안함DVa(이)가 강주(으)로 진격합니다. -●3월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●3월:DVa(이)가 강주 공략에 성공했습니다. -●3월:국민기업(이)가 웃다가 숨이 넘어가 죽고 말았습니다. -●3월:접속잘안함이쓰미(이)가 건업(으)로 진격합니다. -●3월:이쓰미의 악귀병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●3월:Navy마초의 석궁병(이)가 전멸했습니다. -●3월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●3월:보컬로이드ⓖ의병장48(이)가 이도(으)로 진격합니다. -●3월:ⓖ의병장48의 흑귀병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:ⓖ의병장48의 흑귀병(이)가 퇴각했습니다. -●3월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●3월:ⓖ의병장47(이)가 남귀병(으)로 성벽을 공격합니다. -●3월:ⓖ의병장47의 남귀병(이)가 퇴각했습니다. -●3월:보컬로이드ⓖ의병장50(이)가 이도(으)로 진격합니다. -●3월:ⓖ의병장50의 기병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:ⓖ의병장50의 기병(이)가 퇴각했습니다. -●3월:소현(이)가 안타깝게도 번개에 맞아 죽고 말았습니다. -●4월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●4월:임사영의 악귀병(와)과 카토의 호표기병(이)가 대결합니다. -●4월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●4월:Anes의 맹수병(와)과 평민킬러의 석궁병(이)가 대결합니다. -●4월:Anes의 맹수병(이)가 퇴각했습니다. -●4월:접속잘안함DVa(이)가 성도(으)로 진격합니다. -●4월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●4월:DVa(이)가 성도 공략에 성공했습니다. -●4월:보컬로이드낭군(이)가 이도(으)로 진격합니다. -●4월:낭군의 천귀병(와)과 무광의 악귀병(이)가 대결합니다. -●4월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●4월:엄백호의 근위병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●4월:보컬로이드카토(이)가 (으)로 진격합니다. -●4월:카토의 호표기병(와)과 HideD의 악귀병(이)가 대결합니다. -●4월:카토의 호표기병(이)가 퇴각했습니다. -●4월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●4월:비밀의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●4월:누군가가 홍농(을)를 살피는 것 같습니다. -●4월:보컬로이드평민킬러(이)가 탐라(으)로 진격합니다. -●4월:평민킬러의 석궁병(와)과 선비의 악귀병(이)가 대결합니다. -●4월:선비의 악귀병(이)가 전멸했습니다. -●4월:평민킬러의 석궁병(와)과 김우민의 악귀병(이)가 대결합니다. -●4월:접속잘안함魯堂首(이)가 계림(으)로 진격합니다. -●4월:魯堂首의 등갑병(와)과 하연주의 석궁병(이)가 대결합니다. -●4월:魯堂首의 등갑병(이)가 퇴각했습니다. -●5월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●5월:임사영의 악귀병(와)과 다이스의 석궁병(이)가 대결합니다. -●5월:임사영의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●5월:야근탈출의 호표기병(와)과 강서유서의 강궁병(이)가 대결합니다. -●5월:야근탈출의 호표기병(이)가 퇴각했습니다. -●5월:접속잘안함무광(이)가 (으)로 진격합니다. -●5월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:무광(이)가 공략에 성공했습니다. -●5월:보컬로이드낭군(이)가 이도(으)로 진격합니다. -●5월:낭군의 천귀병(와)과 카이스트의 악귀병(이)가 대결합니다. -●5월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●5월:엄백호의 근위병(와)과 카이스트의 악귀병(이)가 대결합니다. -●5월:카이스트의 악귀병(이)가 전멸했습니다. -●5월:엄백호(이)가 근위병(으)로 성벽을 공격합니다. -●5월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●5월:HideD의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●5월:HideD의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드다이스(이)가 (으)로 진격합니다. -●5월:다이스의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●5월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●5월:비밀의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●5월:비밀의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드평민킬러(이)가 탐라(으)로 진격합니다. -●5월:평민킬러의 석궁병(와)과 북오더의 강궁병(이)가 대결합니다. -●5월:평민킬러의 석궁병(이)가 퇴각했습니다. -●5월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●5월:ⓖ의병장51의 남귀병(와)과 강서유서의 강궁병(이)가 대결합니다. -●5월:접속잘안함직장인페이트(이)가 가맹(으)로 진격합니다. -●5월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●5월:직장인페이트(이)가 가맹 공략에 성공했습니다. -●6월:접속잘안함카이사르(이)가 건업(으)로 진격합니다. -●6월:카이사르의 강궁병(와)과 Navy마초의 석궁병(이)가 대결합니다. -●6월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●6월:코토와르의 호표기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●6월:북두칠성의 등갑병(이)가 전멸했습니다. -●6월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●6월:엄백호의 근위병(와)과 니쉬의 악귀병(이)가 대결합니다. -●6월:엄백호의 근위병(이)가 퇴각했습니다. -●6월:보컬로이드ⓖ의병장49(이)가 탐라(으)로 진격합니다. -●6월:ⓖ의병장49의 남귀병(와)과 장임의 등갑병(이)가 대결합니다. -●6월:보컬로이드다이스(이)가 (으)로 진격합니다. -●6월:다이스의 석궁병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●6월:다이스의 석궁병(이)가 퇴각했습니다. -●6월:보컬로이드정휘인(이)가 탐라(으)로 진격합니다. -●6월:정휘인의 천귀병(와)과 읭읭의 맹수병(이)가 대결합니다. -●6월:보컬로이드ⓖ의병장45(이)가 홍농(으)로 진격합니다. -●6월:ⓖ의병장45(이)가 마귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함잠둥이션(이)가 계림(으)로 진격합니다. -●6월:잠둥이션의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●6월:보컬로이드비월(이)가 (으)로 진격합니다. -●6월:비월의 근위병(와)과 전인호의 악귀병(이)가 대결합니다. -●6월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●6월:ⓖ의병장51의 남귀병(와)과 강서유서의 강궁병(이)가 대결합니다. -●6월:ⓖ의병장51의 남귀병(이)가 퇴각했습니다. -●6월:접속잘안함읭읭(이)가 계림(으)로 진격합니다. -●6월:읭읭의 맹수병(와)과 하연주의 석궁병(이)가 대결합니다. -●6월:읭읭의 맹수병(이)가 퇴각했습니다. -●6월:접속잘안함내나(이)가 사비(으)로 진격합니다. -●6월:내나의 악귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●6월:내나의 악귀병(이)가 퇴각했습니다. -●6월:접속잘안함직장인페이트(이)가 하변(으)로 진격합니다. -●6월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●6월:직장인페이트(이)가 하변 공략에 성공했습니다. -●7월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●7월:아소의 맹수병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●7월:접속잘안함강서유서(이)가 허창(으)로 진격합니다. -●7월:강서유서의 강궁병(와)과 비월의 근위병(이)가 대결합니다. -●7월:강서유서의 강궁병(이)가 퇴각했습니다. -●7월:접속잘안함니쉬(이)가 계림(으)로 진격합니다. -●7월:니쉬의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●7월:하연주의 석궁병(이)가 전멸했습니다. -●7월:니쉬의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●7월:접속잘안함쥬비아(이)가 건업(으)로 진격합니다. -●7월:쥬비아의 악귀병(와)과 ⓜ능환의 남귀병(이)가 대결합니다. -●7월:쥬비아의 악귀병(이)가 퇴각했습니다. -●7월:접속잘안함카이사르(이)가 건업(으)로 진격합니다. -●7월:카이사르의 강궁병(와)과 ⓜ능환의 남귀병(이)가 대결합니다. -●7월:ⓜ능환의 남귀병(이)가 전멸했습니다. -●7월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●7월:접속잘안함장임(이)가 계림(으)로 진격합니다. -●7월:장임의 등갑병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●7월:장임의 등갑병(이)가 퇴각했습니다. -●7월:접속잘안함진리(이)가 건업(으)로 진격합니다. -●7월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●7월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●7월:코토와르의 호표기병(와)과 전인호의 악귀병(이)가 대결합니다. -●7월:코토와르의 호표기병(이)가 퇴각했습니다. -●7월:보컬로이드ⓖ의병장49(이)가 탐라(으)로 진격합니다. -●7월:ⓖ의병장49의 남귀병(와)과 김우민의 악귀병(이)가 대결합니다. -●7월:ⓖ의병장49의 남귀병(이)가 퇴각했습니다. -●7월:접속잘안함이쓰미(이)가 건업(으)로 진격합니다. -●7월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:보컬로이드정휘인(이)가 탐라(으)로 진격합니다. -●7월:정휘인의 천귀병(와)과 김우민의 악귀병(이)가 대결합니다. -●7월:김우민의 악귀병(이)가 전멸했습니다. -●7월:정휘인(이)가 천귀병(으)로 성벽을 공격합니다. -●7월:정휘인의 천귀병(이)가 퇴각했습니다. -●7월:접속잘안함전인호(이)가 허창(으)로 진격합니다. -●7월:전인호의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●7월:비월의 근위병(이)가 전멸했습니다. -●7월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:전인호의 악귀병(이)가 퇴각했습니다. -●7월:보컬로이드ⓖ의병장45(이)가 홍농(으)로 진격합니다. -●7월:ⓖ의병장45(이)가 마귀병(으)로 성벽을 공격합니다. -●7월:ⓖ의병장45(이)가 홍농 공략에 성공했습니다. -●7월:접속잘안함잠둥이션(이)가 계림(으)로 진격합니다. -●7월:잠둥이션의 악귀병(와)과 바닥을탁치고의 마귀병(이)가 대결합니다. -●7월:바닥을탁치고의 마귀병(이)가 전멸했습니다. -●7월:잠둥이션의 악귀병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●7월:보컬로이드돌아온꼰대(이)가 탐라(으)로 진격합니다. -●7월:돌아온꼰대(이)가 호표기병(으)로 성벽을 공격합니다. -●7월:돌아온꼰대의 호표기병(이)가 퇴각했습니다. -●8월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●8월:아소의 맹수병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●8월:아소의 맹수병(이)가 퇴각했습니다. -●8월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●8월:Anes의 맹수병(와)과 제갈여포의 석궁병(이)가 대결합니다. -●8월:제갈여포의 석궁병(이)가 전멸했습니다. -●8월:Anes의 맹수병(와)과 재야의 마귀병(이)가 대결합니다. -●8월:재야의 마귀병(이)가 전멸했습니다. -●8월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●8월:보컬로이드정력왕(이)가 탐라(으)로 진격합니다. -●8월:정력왕(이)가 황귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함감정(이)가 정도(으)로 진격합니다. -●8월:감정(이)가 충차(으)로 성벽을 공격합니다. -●8월:감정(이)가 정도 공략에 성공했습니다. -●8월:접속잘안함카이사르(이)가 홍농(으)로 진격합니다. -●8월:카이사르의 강궁병(와)과 ⓖ의병장45의 마귀병(이)가 대결합니다. -●8월:ⓖ의병장45의 마귀병(이)가 전멸했습니다. -●8월:카이사르(이)가 강궁병(으)로 성벽을 공격합니다. -●8월:접속잘안함진리(이)가 건업(으)로 진격합니다. -●8월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●8월:진리(이)가 건업 공략에 성공했습니다. -●8월:접속잘안함선비(이)가 남피(으)로 진격합니다. -●8월:선비(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:선비(이)가 남피 공략에 성공했습니다. -●8월:접속잘안함쿠요(이)가 광릉(으)로 진격합니다. -●8월:쿠요(이)가 중장기병(으)로 성벽을 공격합니다. -●8월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●8월:狂三(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●9월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●9월:Anes의 맹수병(와)과 낭군의 황귀병(이)가 대결합니다. -●9월:Anes의 맹수병(이)가 퇴각했습니다. -●9월:접속잘안함니쉬(이)가 홍농(으)로 진격합니다. -●9월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:니쉬(이)가 홍농 공략에 성공했습니다. -●9월:보컬로이드ⓖ의병장43(이)가 (으)로 진격합니다. -●9월:ⓖ의병장43의 수렵기병(와)과 비밀의 악귀병(이)가 대결합니다. -●9월:ⓖ의병장43의 수렵기병(이)가 퇴각했습니다. -●9월:접속잘안함진리(이)가 광릉(으)로 진격합니다. -●9월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:진리(이)가 광릉 공략에 성공했습니다. -●9월:검임(이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다. -●9월:접속잘안함카이스트(이)가 계림(으)로 진격합니다. -●9월:카이스트의 악귀병(와)과 평민킬러의 석궁병(이)가 대결합니다. -●9월:보컬로이드카가미네렌(이)가 탐라(으)로 진격합니다. -●9월:카가미네렌의 궁기병(와)과 진의 악귀병(이)가 대결합니다. -●9월:보컬로이드낭군(이)가 탐라(으)로 진격합니다. -●9월:낭군의 황귀병(와)과 진의 악귀병(이)가 대결합니다. -●9월:진의 악귀병(이)가 전멸했습니다. -●9월:낭군(이)가 황귀병(으)로 성벽을 공격합니다. -●9월:낭군의 황귀병(이)가 퇴각했습니다. -●9월:보컬로이드카토(이)가 하내(으)로 진격합니다. -●9월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●9월:카토(이)가 하내 공략에 성공했습니다. -●9월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●9월:비밀의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●9월:비밀의 악귀병(이)가 퇴각했습니다. -●9월:보컬로이드ⓖ의병장48(이)가 정도(으)로 진격합니다. -●9월:ⓖ의병장48(이)가 남귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●9월:ⓖ의병장47(이)가 귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드ⓖ의병장50(이)가 이도(으)로 진격합니다. -●9월:ⓖ의병장50의 기병(와)과 북오더의 강궁병(이)가 대결합니다. -●9월:보컬로이드くま(이)가 탐라(으)로 진격합니다. -●9월:くま(이)가 황귀병(으)로 성벽을 공격합니다. -●9월:くま(이)가 탐라 공략에 성공했습니다. -●9월:접속잘안함魯堂首(이)가 계림(으)로 진격합니다. -●9월:魯堂首의 등갑병(와)과 하연주의 석궁병(이)가 대결합니다. -●9월:접속잘안함직장인페이트(이)가 가정(으)로 진격합니다. -●9월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●9월:직장인페이트(이)가 가정 공략에 성공했습니다. -●9월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●9월:狂三의 악귀병(와)과 다이스의 석궁병(이)가 대결합니다. -●9월:狂三의 악귀병(이)가 퇴각했습니다. -●10월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●10월:임사영의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●10월:임사영의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●10월:야근탈출의 호표기병(와)과 HideD의 악귀병(이)가 대결합니다. -●10월:야근탈출의 호표기병(이)가 퇴각했습니다. -●10월:접속잘안함진리(이)가 하비(으)로 진격합니다. -●10월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:접속잘안함카이스트(이)가 계림(으)로 진격합니다. -●10월:카이스트의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●10월:카이스트의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●10월:엄백호의 근위병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●10월:魯堂首의 등갑병(이)가 전멸했습니다. -●10월:엄백호(이)가 근위병(으)로 성벽을 공격합니다. -●10월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●10월:HideD의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●10월:보컬로이드다이스(이)가 (으)로 진격합니다. -●10월:다이스의 석궁병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:다이스의 석궁병(이)가 퇴각했습니다. -●10월:접속잘안함이쓰미(이)가 하비(으)로 진격합니다. -●10월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:이쓰미(이)가 하비 공략에 성공했습니다. -●10월:보컬로이드카토(이)가 호관(으)로 진격합니다. -●10월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●10월:보컬로이드ⓖ의병장48(이)가 정도(으)로 진격합니다. -●10월:ⓖ의병장48(이)가 남귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드ⓖ의병장47(이)가 여강(으)로 진격합니다. -●10월:ⓖ의병장47(이)가 귀병(으)로 성벽을 공격합니다. -●10월:ⓖ의병장47의 귀병(이)가 퇴각했습니다. -●10월:접속잘안함직장인페이트(이)가 유구(으)로 진격합니다. -●10월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●10월:직장인페이트(이)가 유구 공략에 성공했습니다. -●11월:접속잘안함강서유서(이)가 탐라(으)로 진격합니다. -●11월:강서유서의 강궁병(와)과 이루나의 황귀병(이)가 대결합니다. -●11월:보컬로이드니콜(이)가 호관(으)로 진격합니다. -●11월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●11월:누군가가 호로(을)를 살피는 것 같습니다. -●11월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●11월:엄백호의 근위병(와)과 무광의 악귀병(이)가 대결합니다. -●11월:엄백호의 근위병(이)가 퇴각했습니다. -●11월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●11월:HideD의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●11월:HideD의 악귀병(이)가 퇴각했습니다. -●11월:접속잘안함이쓰미(이)가 서주(으)로 진격합니다. -●11월:이쓰미의 악귀병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●11월:이쓰미의 악귀병(이)가 퇴각했습니다. -●11월:보컬로이드카토(이)가 (으)로 진격합니다. -●11월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:카토(이)가 공략에 성공했습니다. -●11월:보컬로이드ⓖ의병장48(이)가 정도(으)로 진격합니다. -●11월:ⓖ의병장48(이)가 남귀병(으)로 성벽을 공격합니다. -●11월:ⓖ의병장48의 남귀병(이)가 퇴각했습니다. -●11월:보컬로이드くま(이)가 이도(으)로 진격합니다. -●11월:くま의 황귀병(와)과 전인호의 악귀병(이)가 대결합니다. -●11월:접속잘안함잠둥이션(이)가 서주(으)로 진격합니다. -●11월:잠둥이션의 악귀병(와)과 랜임1분장의 맹수병(이)가 대결합니다. -●11월:랜임1분장의 맹수병(이)가 전멸했습니다. -●11월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:보컬로이드비월(이)가 (으)로 진격합니다. -●11월:비월의 근위병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●11월:접속잘안함직장인페이트(이)가 안정(으)로 진격합니다. -●11월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●11월:직장인페이트(이)가 안정 공략에 성공했습니다. -●12월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●12월:아소의 맹수병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●12월:접속잘안함강서유서(이)가 탐라(으)로 진격합니다. -●12월:강서유서의 강궁병(와)과 이루나의 황귀병(이)가 대결합니다. -●12월:이루나의 황귀병(이)가 전멸했습니다. -●12월:강서유서의 강궁병(와)과 くま의 황귀병(이)가 대결합니다. -●12월:くま의 황귀병(이)가 전멸했습니다. -●12월:접속잘안함니쉬(이)가 하내(으)로 진격합니다. -●12월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●12월:접속잘안함감정(이)가 사곡(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:보컬로이드니콜(이)가 호관(으)로 진격합니다. -●12월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●12월:니콜(이)가 호관 공략에 성공했습니다. -●12월:접속잘안함카이사르(이)가 하내(으)로 진격합니다. -●12월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:카이사르(이)가 하내 공략에 성공했습니다. -●12월:접속잘안함장임(이)가 탐라(으)로 진격합니다. -●12월:장임의 등갑병(와)과 정력왕의 황귀병(이)가 대결합니다. -●12월:정력왕의 황귀병(이)가 전멸했습니다. -●12월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●12월:접속잘안함DVa(이)가 여남(으)로 진격합니다. -●12월:DVa의 충차(와)과 ⓖ의병장51의 황귀병(이)가 대결합니다. -●12월:DVa의 충차(이)가 퇴각했습니다. -●12월:보컬로이드바닥을탁치고(이)가 하비(으)로 진격합니다. -●12월:바닥을탁치고의 백귀병(와)과 진리의 맹수병(이)가 대결합니다. -●12월:진리의 맹수병(이)가 전멸했습니다. -●12월:접속잘안함무광(이)가 계림(으)로 진격합니다. -●12월:무광의 악귀병(와)과 하연주의 석궁병(이)가 대결합니다. -●12월:하연주의 석궁병(이)가 전멸했습니다. -●12월:무광의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●12월:돌아온꼰대의 호표기병(이)가 전멸했습니다. -●12월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●12월:보컬로이드카토(이)가 여강(으)로 진격합니다. -●12월:카토의 호표기병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●12월:쥬비아의 악귀병(이)가 전멸했습니다. -●12월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●12월:카토(이)가 여강 공략에 성공했습니다. -●12월:접속잘안함잠둥이션(이)가 서주(으)로 진격합니다. -●12월:잠둥이션의 악귀병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●12월:보컬로이드비월(이)가 (으)로 진격합니다. -●12월:비월의 근위병(와)과 쿠요의 맹수병(이)가 대결합니다. -●12월:비월의 근위병(이)가 퇴각했습니다. -●12월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●12월:ⓖ의병장51의 황귀병(와)과 비밀의 악귀병(이)가 대결합니다. -●12월:접속잘안함내나(이)가 탐라(으)로 진격합니다. -●12월:내나의 악귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●12월:접속잘안함직장인페이트(이)가 천수(으)로 진격합니다. -●12월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●12월:직장인페이트(이)가 천수 공략에 성공했습니다. -●12월:고창에서 미이잉구경용(이)라는 호걸이 천하에 이름을 알립니다. -◆1월:215년이 되었습니다. -●1월:접속잘안함아소(이)가 계림(으)로 진격합니다. -●1월:아소(이)가 맹수병(으)로 성벽을 공격합니다. -●1월:접속잘안함Anes(이)가 합비(으)로 진격합니다. -●1월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●1월:접속잘안함니쉬(이)가 계림(으)로 진격합니다. -●1월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:접속잘안함감정(이)가 사곡(으)로 진격합니다. -●1월:감정(이)가 충차(으)로 성벽을 공격합니다. -●1월:감정(이)가 사곡 공략에 성공했습니다. -●1월:보컬로이드니콜(이)가 적벽(으)로 진격합니다. -●1월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●1월:니콜의 충차(이)가 퇴각했습니다. -●1월:접속잘안함카이사르(이)가 여강(으)로 진격합니다. -●1월:카이사르의 석궁병(와)과 카토의 호표기병(이)가 대결합니다. -●1월:카토의 호표기병(이)가 전멸했습니다. -●1월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●1월:접속잘안함무광(이)가 합비(으)로 진격합니다. -●1월:무광의 악귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●1월:무광의 악귀병(이)가 퇴각했습니다. -●1월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●1월:비밀의 악귀병(와)과 KAITO의 근위병(이)가 대결합니다. -●1월:비밀의 악귀병(이)가 퇴각했습니다. -●1월:복양에서 사망(이)라는 호걸이 천하에 이름을 알립니다. -●1월:접속잘안함북오더(이)가 계림(으)로 진격합니다. -●1월:북오더의 강궁병(와)과 くま의 황귀병(이)가 대결합니다. -●1월:くま의 황귀병(이)가 전멸했습니다. -●1월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●1월:보컬로이드ⓖ의병장51(이)가 (으)로 진격합니다. -●1월:ⓖ의병장51의 황귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●1월:ⓖ의병장51의 황귀병(이)가 퇴각했습니다. -●1월:접속잘안함읭읭(이)가 탐라(으)로 진격합니다. -●1월:읭읭의 맹수병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●1월:카가미네렌의 궁기병(이)가 전멸했습니다. -●1월:읭읭(이)가 맹수병(으)로 성벽을 공격합니다. -●1월:접속잘안함직장인페이트(이)가 산월(으)로 진격합니다. -●1월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●1월:직장인페이트(이)가 산월 공략에 성공했습니다. -●1월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●1월:狂三의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●1월:접속잘안함ⓜ공손료(이)가 여강(으)로 진격합니다. -●1월:ⓜ공손료의 귀병(와)과 낭군의 황귀병(이)가 대결합니다. -●1월:ⓜ공손료의 귀병(이)가 퇴각했습니다. -●2월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●2월:임사영의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●2월:코토와르의 호표기병(이)가 전멸했습니다. -●2월:접속잘안함Anes(이)가 합비(으)로 진격합니다. -●2월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●2월:Anes(이)가 합비 공략에 성공했습니다. -●2월:접속잘안함니쉬(이)가 탐라(으)로 진격합니다. -●2월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:니쉬의 악귀병(이)가 퇴각했습니다. -●2월:보컬로이드ⓜ능환(이)가 하내(으)로 진격합니다. -●2월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함감정(이)가 낙양(으)로 진격합니다. -●2월:감정의 충차(와)과 러스티건의 석궁병(이)가 대결합니다. -●2월:러스티건의 석궁병(이)가 전멸했습니다. -●2월:감정(이)가 충차(으)로 성벽을 공격합니다. -●2월:접속잘안함카이사르(이)가 여강(으)로 진격합니다. -●2월:카이사르의 석궁병(와)과 낭군의 황귀병(이)가 대결합니다. -●2월:낭군의 황귀병(이)가 전멸했습니다. -●2월:카이사르의 석궁병(와)과 KAITO의 근위병(이)가 대결합니다. -●2월:카이사르의 석궁병(이)가 퇴각했습니다. -●2월:접속잘안함장임(이)가 여강(으)로 진격합니다. -●2월:장임의 등갑병(와)과 KAITO의 근위병(이)가 대결합니다. -●2월:KAITO의 근위병(이)가 전멸했습니다. -●2월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●2월:장임(이)가 여강 공략에 성공했습니다. -●2월:누군가가 (을)를 살피는 것 같습니다. -●2월:접속잘안함카이스트(이)가 계림(으)로 진격합니다. -●2월:카이스트의 악귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●2월:서량에서 Levia(이)라는 호걸이 천하에 이름을 알립니다. -●2월:누군가가 (을)를 살피는 것 같습니다. -●2월:보컬로이드평민킬러(이)가 이도(으)로 진격합니다. -●2월:평민킬러의 궁기병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●2월:평민킬러의 궁기병(이)가 퇴각했습니다. -●2월:복양에서 푸키푸키(이)라는 호걸이 천하에 이름을 알립니다. -●2월:접속잘안함魯堂首(이)가 계림(으)로 진격합니다. -●2월:魯堂首의 등갑병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●2월:Navy마초의 궁기병(이)가 전멸했습니다. -●2월:접속잘안함내나(이)가 탐라(으)로 진격합니다. -●2월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:내나의 악귀병(이)가 퇴각했습니다. -●2월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●2월:狂三의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●2월:狂三의 악귀병(이)가 퇴각했습니다. -●3월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●3월:임사영의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●3월:임사영의 악귀병(이)가 퇴각했습니다. -●3월:접속잘안함Anes(이)가 서주(으)로 진격합니다. -●3월:Anes의 맹수병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●3월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●3월:야근탈출의 호표기병(와)과 HideD의 악귀병(이)가 대결합니다. -●3월:야근탈출의 호표기병(이)가 퇴각했습니다. -●3월:보컬로이드ⓜ능환(이)가 하내(으)로 진격합니다. -●3월:ⓜ능환(이)가 귀병(으)로 성벽을 공격합니다. -●3월:ⓜ능환(이)가 하내 공략에 성공했습니다. -●3월:보컬로이드ⓖ의병장43(이)가 (으)로 진격합니다. -●3월:ⓖ의병장43의 기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●3월:접속잘안함장임(이)가 서주(으)로 진격합니다. -●3월:장임의 등갑병(와)과 일본어번역기의 황귀병(이)가 대결합니다. -●3월:장임의 등갑병(이)가 퇴각했습니다. -●3월:접속잘안함카이스트(이)가 계림(으)로 진격합니다. -●3월:카이스트의 악귀병(와)과 정휘인의 마귀병(이)가 대결합니다. -●3월:카이스트의 악귀병(이)가 퇴각했습니다. -●3월:보컬로이드엄백호(이)가 이도(으)로 진격합니다. -●3월:엄백호의 근위병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●3월:魯堂首의 등갑병(이)가 전멸했습니다. -●3월:엄백호(이)가 근위병(으)로 성벽을 공격합니다. -●3월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●3월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●3월:HideD의 악귀병(이)가 퇴각했습니다. -●3월:접속잘안함이쓰미(이)가 서주(으)로 진격합니다. -●3월:이쓰미의 악귀병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●3월:보컬로이드정휘인(이)가 이도(으)로 진격합니다. -●3월:정휘인(이)가 마귀병(으)로 성벽을 공격합니다. -●3월:정휘인(이)가 이도 공략에 성공했습니다. -●3월:보컬로이드ⓖ의병장45(이)가 합비(으)로 진격합니다. -●3월:ⓖ의병장45(이)가 남귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함강서유서(이)가 탐라(으)로 진격합니다. -●4월:강서유서(이)가 강궁병(으)로 성벽을 공격합니다. -●4월:강서유서(이)가 탐라 공략에 성공했습니다. -●4월:접속잘안함Anes(이)가 서주(으)로 진격합니다. -●4월:Anes의 맹수병(와)과 일본어번역기의 황귀병(이)가 대결합니다. -●4월:일본어번역기의 황귀병(이)가 전멸했습니다. -●4월:Anes의 맹수병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●4월:바닥을탁치고의 백귀병(이)가 전멸했습니다. -●4월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●4월:보컬로이드ⓜ능환(이)가 홍농(으)로 진격합니다. -●4월:ⓜ능환의 귀병(와)과 선비의 악귀병(이)가 대결합니다. -●4월:ⓜ능환의 귀병(이)가 퇴각했습니다. -●4월:보컬로이드니콜(이)가 합비(으)로 진격합니다. -●4월:니콜(이)가 충차(으)로 성벽을 공격합니다. -●4월:니콜(이)가 합비 공략에 성공했습니다. -●4월:접속잘안함DVa(이)가 서주(으)로 진격합니다. -●4월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●4월:DVa(이)가 서주 공략에 성공했습니다. -●4월:누군가가 홍농(을)를 살피는 것 같습니다. -●4월:보컬로이드ⓖ의병장49(이)가 사곡(으)로 진격합니다. -●4월:ⓖ의병장49(이)가 황귀병(으)로 성벽을 공격합니다. -●4월:복양에서 부관님바라기(이)라는 호걸이 천하에 이름을 알립니다. -●4월:보컬로이드다이스(이)가 (으)로 진격합니다. -●4월:다이스의 궁기병(와)과 쿠요의 맹수병(이)가 대결합니다. -●4월:누군가가 (을)를 살피는 것 같습니다. -●4월:누군가가 건업(을)를 살피는 것 같습니다. -●4월:보컬로이드ⓖ의병장45(이)가 서주(으)로 진격합니다. -●4월:ⓖ의병장45의 남귀병(와)과 잠둥이션의 악귀병(이)가 대결합니다. -●4월:ⓖ의병장45의 남귀병(이)가 퇴각했습니다. -●4월:접속잘안함잠둥이션(이)가 (으)로 진격합니다. -●4월:잠둥이션(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:잠둥이션(이)가 공략에 성공했습니다. -●4월:보컬로이드비월(이)가 건업(으)로 진격합니다. -●4월:비월의 근위병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●4월:접속잘안함읭읭(이)가 (으)로 진격합니다. -●4월:읭읭의 맹수병(와)과 ⓖ의병장48의 황귀병(이)가 대결합니다. -●4월:복양에서 둠칫둠췻(이)라는 호걸이 천하에 이름을 알립니다. -●4월:보컬로이드橙(이)가 건업(으)로 진격합니다. -●4월:橙의 충차(와)과 쥬비아의 악귀병(이)가 대결합니다. -●4월:쥬비아의 악귀병(이)가 전멸했습니다. -●4월:橙(이)가 충차(으)로 성벽을 공격합니다. -●5월:접속잘안함강서유서(이)가 계림(으)로 진격합니다. -●5월:강서유서의 강궁병(와)과 제갈여포의 궁기병(이)가 대결합니다. -●5월:접속잘안함Anes(이)가 (으)로 진격합니다. -●5월:Anes의 맹수병(와)과 ⓖ의병장48의 황귀병(이)가 대결합니다. -●5월:ⓖ의병장48의 황귀병(이)가 전멸했습니다. -●5월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●5월:Anes의 맹수병(이)가 퇴각했습니다. -●5월:보컬로이드ⓖ의병장43(이)가 (으)로 진격합니다. -●5월:ⓖ의병장43의 기병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●5월:ⓖ의병장43의 기병(이)가 퇴각했습니다. -●5월:고창에서 ㅁㄴㅇ(이)라는 호걸이 천하에 이름을 알립니다. -●5월:보컬로이드니콜(이)가 서주(으)로 진격합니다. -●5월:니콜의 충차(와)과 이쓰미의 악귀병(이)가 대결합니다. -●5월:니콜의 충차(이)가 퇴각했습니다. -●5월:접속잘안함DVa(이)가 서량(으)로 진격합니다. -●5월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●5월:DVa(이)가 서량 공략에 성공했습니다. -●5월:접속잘안함무광(이)가 합비(으)로 진격합니다. -●5월:무광의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●5월:비월의 근위병(이)가 전멸했습니다. -●5월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:보컬로이드ⓖ의병장49(이)가 사곡(으)로 진격합니다. -●5월:ⓖ의병장49(이)가 황귀병(으)로 성벽을 공격합니다. -●5월:ⓖ의병장49의 황귀병(이)가 퇴각했습니다. -●5월:보컬로이드다이스(이)가 (으)로 진격합니다. -●5월:다이스의 궁기병(와)과 비밀의 악귀병(이)가 대결합니다. -●5월:다이스의 궁기병(이)가 퇴각했습니다. -●5월:접속잘안함이쓰미(이)가 (으)로 진격합니다. -●5월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●5월:이쓰미(이)가 공략에 성공했습니다. -●5월:누군가가 계림(을)를 살피는 것 같습니다. -●5월:누군가가 (을)를 살피는 것 같습니다. -●5월:보컬로이드제갈여포(이)가 탐라(으)로 진격합니다. -●5월:제갈여포의 궁기병(와)과 강서유서의 강궁병(이)가 대결합니다. -●5월:제갈여포의 궁기병(이)가 퇴각했습니다. -●5월:접속잘안함비밀(이)가 허창(으)로 진격합니다. -●5월:비밀의 악귀병(와)과 코토와르의 호표기병(이)가 대결합니다. -●5월:비밀의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드くま(이)가 탐라(으)로 진격합니다. -●5월:くま의 황귀병(와)과 강서유서의 강궁병(이)가 대결합니다. -●5월:강서유서의 강궁병(이)가 전멸했습니다. -●5월:くま(이)가 황귀병(으)로 성벽을 공격합니다. -●5월:접속잘안함잠둥이션(이)가 허창(으)로 진격합니다. -●5월:잠둥이션의 악귀병(와)과 KAITO의 근위병(이)가 대결합니다. -●5월:둠칫둠췻(이)가 보컬로이드임관했습니다. -●5월:접속잘안함직장인페이트(이)가 (으)로 진격합니다. -●5월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●5월:직장인페이트(이)가 공략에 성공했습니다. -●5월:보컬로이드橙(이)가 탐라(으)로 진격합니다. -●5월:橙(이)가 충차(으)로 성벽을 공격합니다. -●5월:橙(이)가 탐라 공략에 성공했습니다. -●6월:접속잘안함니쉬(이)가 합비(으)로 진격합니다. -●6월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함감정(이)가 진류(으)로 진격합니다. -●6월:감정(이)가 충차(으)로 성벽을 공격합니다. -●6월:감정(이)가 진류 공략에 성공했습니다. -●6월:접속잘안함카이사르(이)가 고창(으)로 진격합니다. -●6월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●6월:접속잘안함DVa(이)가 (으)로 진격합니다. -●6월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●6월:DVa(이)가 공략에 성공했습니다. -●6월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●6월:KAITO의 근위병(와)과 무광의 악귀병(이)가 대결합니다. -●6월:KAITO의 근위병(이)가 퇴각했습니다. -●6월:접속잘안함진리(이)가 복양(으)로 진격합니다. -●6월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●6월:진리(이)가 복양 공략에 성공했습니다. -●6월:미이잉구경용(이)가 우울증에 걸려 자살하고 말았습니다. -●6월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●6월:코토와르의 호표기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●6월:접속잘안함이쓰미(이)가 북해(으)로 진격합니다. -●6월:이쓰미의 악귀병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●6월:이쓰미의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●6월:정휘인의 마귀병(와)과 아소의 맹수병(이)가 대결합니다. -●6월:아소의 맹수병(이)가 전멸했습니다. -●6월:보컬로이드ⓖ의병장47(이)가 사곡(으)로 진격합니다. -●6월:ⓖ의병장47(이)가 황귀병(으)로 성벽을 공격합니다. -●6월:보컬로이드ⓖ의병장50(이)가 진류(으)로 진격합니다. -●6월:ⓖ의병장50(이)가 백마병(으)로 성벽을 공격합니다. -●6월:접속잘안함북오더(이)가 탐라(으)로 진격합니다. -●6월:북오더의 강궁병(와)과 낭군의 마귀병(이)가 대결합니다. -●6월:보컬로이드くま(이)가 (으)로 진격합니다. -●6월:くま의 황귀병(와)과 카이스트의 악귀병(이)가 대결합니다. -●6월:くま의 황귀병(이)가 퇴각했습니다. -●6월:보컬로이드평민킬러(이)가 (으)로 진격합니다. -●6월:평민킬러의 궁기병(와)과 전인호의 악귀병(이)가 대결합니다. -●6월:보컬로이드하연주(이)가 (으)로 진격합니다. -●6월:하연주의 궁기병(와)과 카이스트의 악귀병(이)가 대결합니다. -●6월:카이스트의 악귀병(이)가 전멸했습니다. -●6월:하연주(이)가 궁기병(으)로 성벽을 공격합니다. -●6월:사망(이)가 산책중 곰에게 할퀴어 죽고 말았습니다. -●6월:접속잘안함직장인페이트(이)가 여남(으)로 진격합니다. -●6월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●6월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●6월:狂三의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●7월:접속잘안함임사영(이)가 허창(으)로 진격합니다. -●7월:임사영의 악귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●7월:평민킬러의 궁기병(이)가 전멸했습니다. -●7월:임사영의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●7월:돌아온꼰대의 호표기병(이)가 전멸했습니다. -●7월:접속잘안함니쉬(이)가 합비(으)로 진격합니다. -●7월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:니쉬(이)가 합비 공략에 성공했습니다. -●7월:접속잘안함감정(이)가 관도(으)로 진격합니다. -●7월:감정(이)가 충차(으)로 성벽을 공격합니다. -●7월:감정(이)가 관도 공략에 성공했습니다. -●7월:접속잘안함카이사르(이)가 (으)로 진격합니다. -●7월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●7월:카이사르(이)가 공략에 성공했습니다. -●7월:접속잘안함장임(이)가 북해(으)로 진격합니다. -●7월:장임의 등갑병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●7월:바닥을탁치고의 백귀병(이)가 전멸했습니다. -●7월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●7월:접속잘안함DVa(이)가 적도(으)로 진격합니다. -●7월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●7월:DVa(이)가 적도 공략에 성공했습니다. -●7월:접속잘안함진리(이)가 이도(으)로 진격합니다. -●7월:진리의 맹수병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●7월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●7월:코토와르의 호표기병(와)과 임사영의 악귀병(이)가 대결합니다. -●7월:코토와르의 호표기병(이)가 퇴각했습니다. -●7월:접속잘안함무광(이)가 허창(으)로 진격합니다. -●7월:무광의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●7월:무광의 악귀병(이)가 퇴각했습니다. -●7월:보컬로이드카가미네렌(이)가 (으)로 진격합니다. -●7월:카가미네렌의 궁기병(와)과 진리의 맹수병(이)가 대결합니다. -●7월:진리의 맹수병(이)가 전멸했습니다. -●7월:카가미네렌(이)가 궁기병(으)로 성벽을 공격합니다. -●7월:카가미네렌(이)가 공략에 성공했습니다. -●7월:보컬로이드낭군(이)가 (으)로 진격합니다. -●7월:낭군의 마귀병(와)과 북오더의 강궁병(이)가 대결합니다. -●7월:낭군의 마귀병(이)가 퇴각했습니다. -●7월:보컬로이드카토(이)가 (으)로 진격합니다. -●7월:카토의 호표기병(와)과 북오더의 강궁병(이)가 대결합니다. -●7월:북오더의 강궁병(이)가 전멸했습니다. -●7월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●7월:보컬로이드ⓖ의병장47(이)가 사곡(으)로 진격합니다. -●7월:ⓖ의병장47(이)가 황귀병(으)로 성벽을 공격합니다. -●7월:ⓖ의병장47의 황귀병(이)가 퇴각했습니다. -●7월:보컬로이드ⓖ의병장50(이)가 관도(으)로 진격합니다. -●7월:ⓖ의병장50(이)가 백마병(으)로 성벽을 공격합니다. -●7월:접속잘안함魯堂首(이)가 허창(으)로 진격합니다. -●7월:魯堂首의 등갑병(와)과 카토의 호표기병(이)가 대결합니다. -●7월:魯堂首의 등갑병(이)가 퇴각했습니다. -●7월:접속잘안함내나(이)가 북해(으)로 진격합니다. -●7월:내나의 악귀병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●7월:접속잘안함직장인페이트(이)가 여남(으)로 진격합니다. -●7월:직장인페이트(이)가 충차(으)로 성벽을 공격합니다. -●7월:Levia(이)가 전재산을 잃고 화병으로 죽고말았습니다. -●7월:접속잘안함狂三(이)가 허창(으)로 진격합니다. -●7월:狂三의 악귀병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●7월:狂三의 악귀병(이)가 퇴각했습니다. -●8월:보컬로이드야근탈출(이)가 (으)로 진격합니다. -●8월:야근탈출의 호표기병(와)과 HideD의 악귀병(이)가 대결합니다. -●8월:야근탈출의 호표기병(이)가 퇴각했습니다. -●8월:접속잘안함니쉬(이)가 역경(으)로 진격합니다. -●8월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함감정(이)가 역경(으)로 진격합니다. -●8월:감정(이)가 충차(으)로 성벽을 공격합니다. -●8월:감정(이)가 역경 공략에 성공했습니다. -●8월:접속잘안함카이사르(이)가 계교(으)로 진격합니다. -●8월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●8월:카이사르(이)가 계교 공략에 성공했습니다. -●8월:접속잘안함장임(이)가 북해(으)로 진격합니다. -●8월:장임의 등갑병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●8월:바닥을탁치고의 백귀병(이)가 전멸했습니다. -●8월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●8월:장임(이)가 북해 공략에 성공했습니다. -●8월:접속잘안함DVa(이)가 북평(으)로 진격합니다. -●8월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●8월:DVa(이)가 북평 공략에 성공했습니다. -●8월:푸키푸키(이)가 바람난 배우자에게 독살당하고 말았습니다. -●8월:보컬로이드카가미네렌(이)가 (으)로 진격합니다. -●8월:카가미네렌(이)가 궁기병(으)로 성벽을 공격합니다. -●8월:카가미네렌의 궁기병(이)가 퇴각했습니다. -●8월:보컬로이드엄백호(이)가 (으)로 진격합니다. -●8월:엄백호의 근위병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●8월:이쓰미의 악귀병(이)가 전멸했습니다. -●8월:엄백호의 근위병(와)과 쿠요의 맹수병(이)가 대결합니다. -●8월:접속잘안함HideD(이)가 허창(으)로 진격합니다. -●8월:HideD의 악귀병(와)과 ⓖ의병장50의 백마병(이)가 대결합니다. -●8월:ⓖ의병장50의 백마병(이)가 전멸했습니다. -●8월:HideD(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:보컬로이드카토(이)가 북해(으)로 진격합니다. -●8월:카토의 호표기병(와)과 장임의 등갑병(이)가 대결합니다. -●8월:장임의 등갑병(이)가 전멸했습니다. -●8월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●8월:카토의 호표기병(이)가 퇴각했습니다. -●8월:보컬로이드하기싫은데(이)가 북평(으)로 진격합니다. -●8월:하기싫은데(이)가 벽력거(으)로 성벽을 공격합니다. -●8월:하기싫은데(이)가 북평 공략에 성공했습니다. -●8월:접속잘안함내나(이)가 동황(으)로 진격합니다. -●8월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함니쉬(이)가 탐라(으)로 진격합니다. -●9월:니쉬의 악귀병(와)과 엄백호의 근위병(이)가 대결합니다. -●9월:니쉬의 악귀병(이)가 퇴각했습니다. -●9월:접속잘안함감정(이)가 북평(으)로 진격합니다. -●9월:감정의 충차(와)과 이루나의 황귀병(이)가 대결합니다. -●9월:감정의 충차(이)가 퇴각했습니다. -●9월:접속잘안함카이사르(이)가 동황(으)로 진격합니다. -●9월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●9월:카이사르(이)가 동황 공략에 성공했습니다. -●9월:접속잘안함DVa(이)가 허창(으)로 진격합니다. -●9월:DVa의 충차(와)과 ⓖ의병장51의 백귀병(이)가 대결합니다. -●9월:보컬로이드엄백호(이)가 유구(으)로 진격합니다. -●9월:엄백호(이)가 근위병(으)로 성벽을 공격합니다. -●9월:엄백호의 근위병(이)가 퇴각했습니다. -●9월:보컬로이드제갈여포(이)가 역경(으)로 진격합니다. -●9월:제갈여포의 궁기병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●9월:접속잘안함잠둥이션(이)가 북평(으)로 진격합니다. -●9월:잠둥이션의 악귀병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●9월:보컬로이드비월(이)가 역경(으)로 진격합니다. -●9월:비월의 근위병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●10월:접속잘안함Anes(이)가 안평(으)로 진격합니다. -●10월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:Anes(이)가 안평 공략에 성공했습니다. -●10월:고창에서 1(이)라는 호걸이 천하에 이름을 알립니다. -●10월:접속잘안함DVa(이)가 (으)로 진격합니다. -●10월:DVa(이)가 충차(으)로 성벽을 공격합니다. -●10월:DVa(이)가 공략에 성공했습니다. -●10월:보컬로이드KAITO(이)가 (으)로 진격합니다. -●10월:KAITO(이)가 근위병(으)로 성벽을 공격합니다. -●10월:KAITO(이)가 공략에 성공했습니다. -●10월:부관님바라기(이)가 황제를 모독하다가 처형당하고 말았습니다. -●10월:ㅁㄴㅇ(이)가 산속에서 호랑이에게 물려 죽고 말았습니다. -●10월:보컬로이드제갈여포(이)가 역경(으)로 진격합니다. -●10월:제갈여포의 궁기병(와)과 무광의 악귀병(이)가 대결합니다. -●10월:제갈여포의 궁기병(이)가 퇴각했습니다. -●10월:접속잘안함북오더(이)가 탐라(으)로 진격합니다. -●10월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●10월:보컬로이드평민킬러(이)가 유구(으)로 진격합니다. -●10월:평민킬러(이)가 궁기병(으)로 성벽을 공격합니다. -●10월:보컬로이드하연주(이)가 유구(으)로 진격합니다. -●10월:하연주(이)가 궁기병(으)로 성벽을 공격합니다. -●10월:하연주(이)가 유구 공략에 성공했습니다. -●10월:접속잘안함잠둥이션(이)가 북평(으)로 진격합니다. -●10월:잠둥이션의 악귀병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●10월:잠둥이션의 악귀병(이)가 퇴각했습니다. -●10월:보컬로이드비월(이)가 역경(으)로 진격합니다. -●10월:비월의 근위병(와)과 쥬비아의 악귀병(이)가 대결합니다. -●10월:보컬로이드돌아온꼰대(이)가 역경(으)로 진격합니다. -●10월:돌아온꼰대의 호표기병(와)과 비밀의 악귀병(이)가 대결합니다. -●10월:돌아온꼰대의 호표기병(이)가 퇴각했습니다. -●10월:접속잘안함ⓜ공손료(이)가 탐라(으)로 진격합니다. -●10월:ⓜ공손료(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함강서유서(이)가 졸본(으)로 진격합니다. -●11월:강서유서(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:강서유서(이)가 졸본 공략에 성공했습니다. -●11월:접속잘안함Anes(이)가 백랑(으)로 진격합니다. -●11월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:Anes(이)가 백랑 공략에 성공했습니다. -●11월:접속잘안함북두칠성(이)가 북평(으)로 진격합니다. -●11월:북두칠성의 등갑병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●11월:Navy마초의 궁기병(이)가 전멸했습니다. -●11월:북두칠성의 등갑병(와)과 비월의 근위병(이)가 대결합니다. -●11월:비월의 근위병(이)가 전멸했습니다. -●11월:접속잘안함쥬비아(이)가 북평(으)로 진격합니다. -●11월:쥬비아(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:쥬비아의 악귀병(이)가 퇴각했습니다. -●11월:접속잘안함카이사르(이)가 평원(으)로 진격합니다. -●11월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:카이사르(이)가 평원 공략에 성공했습니다. -●11월:접속잘안함DVa(이)가 허창(으)로 진격합니다. -●11월:DVa의 충차(와)과 야근탈출의 호표기병(이)가 대결합니다. -●11월:DVa의 충차(이)가 퇴각했습니다. -●11월:보컬로이드KAITO(이)가 서주(으)로 진격합니다. -●11월:KAITO(이)가 근위병(으)로 성벽을 공격합니다. -●11월:보컬로이드코토와르(이)가 (으)로 진격합니다. -●11월:코토와르(이)가 호표기병(으)로 성벽을 공격합니다. -●11월:보컬로이드낭군(이)가 안평(으)로 진격합니다. -●11월:낭군의 황귀병(와)과 선비의 악귀병(이)가 대결합니다. -●11월:선비의 악귀병(이)가 전멸했습니다. -●11월:낭군(이)가 황귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함전인호(이)가 탐라(으)로 진격합니다. -●11월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:접속잘안함비밀(이)가 위례(으)로 진격합니다. -●11월:비밀의 악귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●11월:비밀의 악귀병(이)가 퇴각했습니다. -●11월:접속잘안함북오더(이)가 탐라(으)로 진격합니다. -●11월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●11월:북오더(이)가 탐라 공략에 성공했습니다. -●11월:보컬로이드くま(이)가 동황(으)로 진격합니다. -●11월:くま의 황귀병(와)과 장임의 등갑병(이)가 대결합니다. -●11월:보컬로이드평민킬러(이)가 안평(으)로 진격합니다. -●11월:평민킬러의 궁기병(와)과 전인호의 악귀병(이)가 대결합니다. -●11월:전인호의 악귀병(이)가 전멸했습니다. -●11월:평민킬러의 궁기병(와)과 무광의 악귀병(이)가 대결합니다. -●11월:보컬로이드ⓖ의병장45(이)가 동황(으)로 진격합니다. -●11월:ⓖ의병장45의 백귀병(와)과 읭읭의 맹수병(이)가 대결합니다. -●11월:접속잘안함魯堂首(이)가 (으)로 진격합니다. -●11월:魯堂首의 등갑병(와)과 KAITO의 근위병(이)가 대결합니다. -●11월:KAITO의 근위병(이)가 전멸했습니다. -●11월:접속잘안함읭읭(이)가 위례(으)로 진격합니다. -●11월:읭읭의 맹수병(와)과 카토의 호표기병(이)가 대결합니다. -●11월:읭읭의 맹수병(이)가 퇴각했습니다. -●12월:접속잘안함아소(이)가 허창(으)로 진격합니다. -●12월:아소의 맹수병(와)과 야근탈출의 호표기병(이)가 대결합니다. -●12월:야근탈출의 호표기병(이)가 전멸했습니다. -●12월:아소(이)가 맹수병(으)로 성벽을 공격합니다. -●12월:접속잘안함강서유서(이)가 평양(으)로 진격합니다. -●12월:강서유서(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:접속잘안함Anes(이)가 오환(으)로 진격합니다. -●12월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●12월:Anes(이)가 오환 공략에 성공했습니다. -●12월:보컬로이드ⓖ의병장43(이)가 동황(으)로 진격합니다. -●12월:ⓖ의병장43의 기병(와)과 내나의 악귀병(이)가 대결합니다. -●12월:ⓖ의병장43의 기병(이)가 퇴각했습니다. -●12월:접속잘안함카이사르(이)가 허창(으)로 진격합니다. -●12월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●12월:접속잘안함장임(이)가 위례(으)로 진격합니다. -●12월:장임의 등갑병(와)과 이루나의 황귀병(이)가 대결합니다. -●12월:장임의 등갑병(이)가 퇴각했습니다. -●12월:접속잘안함진리(이)가 평양(으)로 진격합니다. -●12월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●12월:진리(이)가 평양 공략에 성공했습니다. -●12월:접속잘안함무광(이)가 위례(으)로 진격합니다. -●12월:무광의 악귀병(와)과 바닥을탁치고의 백귀병(이)가 대결합니다. -●12월:무광의 악귀병(이)가 퇴각했습니다. -●12월:보컬로이드낭군(이)가 안평(으)로 진격합니다. -●12월:낭군(이)가 황귀병(으)로 성벽을 공격합니다. -●12월:낭군(이)가 안평 공략에 성공했습니다. -●12월:보컬로이드ⓖ의병장49(이)가 동황(으)로 진격합니다. -●12월:ⓖ의병장49의 남귀병(와)과 내나의 악귀병(이)가 대결합니다. -●12월:내나의 악귀병(이)가 전멸했습니다. -●12월:ⓖ의병장49(이)가 남귀병(으)로 성벽을 공격합니다. -●12월:ⓖ의병장49의 남귀병(이)가 퇴각했습니다. -●12월:접속잘안함이쓰미(이)가 유구(으)로 진격합니다. -●12월:이쓰미의 악귀병(와)과 정휘인의 흑귀병(이)가 대결합니다. -●12월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●12월:정휘인의 흑귀병(와)과 이쓰미의 악귀병(이)가 대결합니다. -●12월:이쓰미의 악귀병(이)가 전멸했습니다. -●12월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●12월:정휘인의 흑귀병(이)가 퇴각했습니다. -●12월:보컬로이드카토(이)가 동황(으)로 진격합니다. -●12월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●12월:보컬로이드ⓖ의병장48(이)가 평양(으)로 진격합니다. -●12월:ⓖ의병장48의 황귀병(와)과 진리의 맹수병(이)가 대결합니다. -●12월:ⓖ의병장48의 황귀병(이)가 퇴각했습니다. -●12월:접속잘안함북오더(이)가 사비(으)로 진격합니다. -●12월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●12월:보컬로이드ⓖ의병장45(이)가 평양(으)로 진격합니다. -●12월:ⓖ의병장45의 백귀병(와)과 진리의 맹수병(이)가 대결합니다. -●12월:ⓖ의병장45의 백귀병(이)가 퇴각했습니다. -●12월:접속잘안함직장인페이트(이)가 북평(으)로 진격합니다. -●12월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●12월:직장인페이트(이)가 북평 공략에 성공했습니다. -◆1월:216년이 되었습니다. -●1월:접속잘안함아소(이)가 위례(으)로 진격합니다. -●1월:아소의 맹수병(와)과 くま의 황귀병(이)가 대결합니다. -●1월:아소의 맹수병(이)가 퇴각했습니다. -●1월:접속잘안함강서유서(이)가 안평(으)로 진격합니다. -●1월:강서유서(이)가 석궁병(으)로 성벽을 공격합니다. -●1월:접속잘안함Anes(이)가 안평(으)로 진격합니다. -●1월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●1월:Anes(이)가 안평 공략에 성공했습니다. -●1월:접속잘안함니쉬(이)가 위례(으)로 진격합니다. -●1월:니쉬의 악귀병(와)과 엄백호의 청주병(이)가 대결합니다. -●1월:보컬로이드바닥을탁치고(이)가 동황(으)로 진격합니다. -●1월:바닥을탁치고의 백귀병(와)과 HideD의 악귀병(이)가 대결합니다. -●1월:보컬로이드엄백호(이)가 동황(으)로 진격합니다. -●1월:엄백호의 청주병(와)과 니쉬의 악귀병(이)가 대결합니다. -●1월:엄백호의 청주병(이)가 퇴각했습니다. -●1월:접속잘안함HideD(이)가 위례(으)로 진격합니다. -●1월:HideD의 악귀병(와)과 Air의 호표기병(이)가 대결합니다. -●1월:HideD의 악귀병(이)가 퇴각했습니다. -●1월:보컬로이드카토(이)가 동황(으)로 진격합니다. -●1월:카토의 호표기병(와)과 魯堂首의 등갑병(이)가 대결합니다. -●1월:魯堂首의 등갑병(이)가 전멸했습니다. -●1월:카토의 호표기병(와)과 니쉬의 악귀병(이)가 대결합니다. -●1월:니쉬의 악귀병(이)가 전멸했습니다. -●1월:카토(이)가 호표기병(으)로 성벽을 공격합니다. -●1월:접속잘안함북오더(이)가 사비(으)로 진격합니다. -●1월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●1월:접속잘안함직장인페이트(이)가 여남(으)로 진격합니다. -●1월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●1월:접속잘안함ⓜ공손료(이)가 수춘(으)로 진격합니다. -●1월:ⓜ공손료(이)가 악귀병(으)로 성벽을 공격합니다. -●1월:ⓜ공손료(이)가 수춘 공략에 성공했습니다. -●2월:여남에서 85(이)라는 호걸이 천하에 이름을 알립니다. -●2월:접속잘안함강서유서(이)가 위례(으)로 진격합니다. -●2월:강서유서의 석궁병(와)과 비월의 근위병(이)가 대결합니다. -●2월:강서유서의 석궁병(이)가 퇴각했습니다. -●2월:접속잘안함Anes(이)가 위례(으)로 진격합니다. -●2월:Anes의 맹수병(와)과 박희수의 근위병(이)가 대결합니다. -●2월:보컬로이드다이스(이)가 동황(으)로 진격합니다. -●2월:다이스의 궁기병(와)과 Anes의 맹수병(이)가 대결합니다. -●2월:Anes의 맹수병(이)가 전멸했습니다. -●2월:다이스(이)가 궁기병(으)로 성벽을 공격합니다. -●2월:보컬로이드ⓖ의병장47(이)가 평양(으)로 진격합니다. -●2월:ⓖ의병장47의 흑귀병(와)과 카이스트의 악귀병(이)가 대결합니다. -●2월:ⓖ의병장47의 흑귀병(이)가 퇴각했습니다. -●2월:접속잘안함북오더(이)가 사비(으)로 진격합니다. -●2월:북오더(이)가 강궁병(으)로 성벽을 공격합니다. -●2월:북오더의 강궁병(이)가 퇴각했습니다. -●2월:접속잘안함잠둥이션(이)가 위례(으)로 진격합니다. -●2월:잠둥이션의 마귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●2월:보컬로이드돌아온꼰대(이)가 동황(으)로 진격합니다. -●2월:돌아온꼰대의 호표기병(와)과 무광의 악귀병(이)가 대결합니다. -●2월:접속잘안함직장인페이트(이)가 허창(으)로 진격합니다. -●2월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●3월:접속잘안함DVa(이)가 허창(으)로 진격합니다. -●3월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●3월:DVa(이)가 허창 공략에 성공했습니다. -●3월:보컬로이드KAITO(이)가 동황(으)로 진격합니다. -●3월:KAITO의 근위병(와)과 카이사르의 석궁병(이)가 대결합니다. -●3월:보컬로이드코토와르(이)가 안평(으)로 진격합니다. -●3월:코토와르의 호표기병(와)과 내나의 악귀병(이)가 대결합니다. -●3월:보컬로이드다이스(이)가 동황(으)로 진격합니다. -●3월:다이스의 궁기병(와)과 무광의 악귀병(이)가 대결합니다. -●3월:무광의 악귀병(이)가 전멸했습니다. -●3월:다이스(이)가 궁기병(으)로 성벽을 공격합니다. -●3월:다이스(이)가 동황 공략에 성공했습니다. -●3월:여남에서 희지재(이)라는 호걸이 천하에 이름을 알립니다. -●3월:접속잘안함비밀(이)가 위례(으)로 진격합니다. -●3월:비밀의 마귀병(와)과 낭군의 황귀병(이)가 대결합니다. -●3월:보컬로이드ⓖ의병장50(이)가 안평(으)로 진격합니다. -●3월:ⓖ의병장50의 기병(와)과 장임의 등갑병(이)가 대결합니다. -●3월:보컬로이드くま(이)가 평양(으)로 진격합니다. -●3월:くま의 황귀병(와)과 진리의 맹수병(이)가 대결합니다. -●3월:くま의 황귀병(이)가 퇴각했습니다. -●3월:접속잘안함잠둥이션(이)가 위례(으)로 진격합니다. -●3월:잠둥이션의 마귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●3월:잠둥이션의 마귀병(이)가 퇴각했습니다. -●3월:접속잘안함읭읭(이)가 위례(으)로 진격합니다. -●3월:읭읭의 맹수병(와)과 낭군의 황귀병(이)가 대결합니다. -●3월:낭군의 황귀병(이)가 전멸했습니다. -●3월:읭읭의 맹수병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●3월:접속잘안함내나(이)가 위례(으)로 진격합니다. -●3월:내나의 악귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●3월:내나의 악귀병(이)가 퇴각했습니다. -●3월:1(이)가 이튿날 침실에서 죽은채로발견되었습니다. -●4월:접속잘안함쥬비아(이)가 위례(으)로 진격합니다. -●4월:쥬비아의 마귀병(와)과 이루나의 황귀병(이)가 대결합니다. -●4월:접속잘안함카이사르(이)가 위례(으)로 진격합니다. -●4월:카이사르의 석궁병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●4월:평민킬러의 궁기병(이)가 전멸했습니다. -●4월:카이사르의 석궁병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●4월:카가미네렌의 궁기병(이)가 전멸했습니다. -●4월:카이사르의 석궁병(와)과 KAITO의 근위병(이)가 대결합니다. -●4월:카이사르의 석궁병(이)가 퇴각했습니다. -●4월:접속잘안함장임(이)가 위례(으)로 진격합니다. -●4월:장임의 등갑병(와)과 카토의 호표기병(이)가 대결합니다. -●4월:카토의 호표기병(이)가 전멸했습니다. -●4월:장임의 등갑병(와)과 KAITO의 근위병(이)가 대결합니다. -●4월:장임의 등갑병(이)가 퇴각했습니다. -●4월:접속잘안함DVa(이)가 사수(으)로 진격합니다. -●4월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●4월:DVa(이)가 사수 공략에 성공했습니다. -●4월:접속잘안함진리(이)가 위례(으)로 진격합니다. -●4월:진리의 맹수병(와)과 KAITO의 근위병(이)가 대결합니다. -●4월:KAITO의 근위병(이)가 전멸했습니다. -●4월:진리의 맹수병(와)과 Air의 호표기병(이)가 대결합니다. -●4월:보컬로이드코토와르(이)가 안평(으)로 진격합니다. -●4월:코토와르의 호표기병(와)과 읭읭의 맹수병(이)가 대결합니다. -●4월:코토와르의 호표기병(이)가 퇴각했습니다. -●4월:접속잘안함이쓰미(이)가 위례(으)로 진격합니다. -●4월:이쓰미의 악귀병(와)과 바닥을탁치고의 귀병(이)가 대결합니다. -●4월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●4월:정휘인의 흑귀병(와)과 아르카나하트의 악귀병(이)가 대결합니다. -●4월:아르카나하트의 악귀병(이)가 전멸했습니다. -●4월:접속잘안함비밀(이)가 위례(으)로 진격합니다. -●4월:비밀의 마귀병(와)과 엄백호의 청주병(이)가 대결합니다. -●4월:비밀의 마귀병(이)가 퇴각했습니다. -●4월:보컬로이드ⓖ의병장50(이)가 안평(으)로 진격합니다. -●4월:ⓖ의병장50의 기병(와)과 읭읭의 맹수병(이)가 대결합니다. -●4월:읭읭의 맹수병(이)가 전멸했습니다. -●4월:ⓖ의병장50(이)가 기병(으)로 성벽을 공격합니다. -●4월:ⓖ의병장50의 기병(이)가 퇴각했습니다. -●4월:보컬로이드ⓖ의병장51(이)가 탐라(으)로 진격합니다. -●4월:ⓖ의병장51(이)가 귀병(으)로 성벽을 공격합니다. -●4월:접속잘안함ⓜ공손료(이)가 (으)로 진격합니다. -●4월:ⓜ공손료(이)가 악귀병(으)로 성벽을 공격합니다. -●4월:ⓜ공손료(이)가 공략에 성공했습니다. -●5월:접속잘안함아소(이)가 위례(으)로 진격합니다. -●5월:아소의 맹수병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●5월:접속잘안함쥬비아(이)가 위례(으)로 진격합니다. -●5월:쥬비아의 마귀병(와)과 엄백호의 청주병(이)가 대결합니다. -●5월:쥬비아의 마귀병(이)가 퇴각했습니다. -●5월:카이사르(이)가 청홍검(+15)(을)를 습득했습니다! -●5월:접속잘안함진리(이)가 위례(으)로 진격합니다. -●5월:진리의 맹수병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●5월:진리의 맹수병(이)가 퇴각했습니다. -●5월:접속잘안함카이스트(이)가 위례(으)로 진격합니다. -●5월:카이스트의 악귀병(와)과 비월의 근위병(이)가 대결합니다. -●5월:카이스트의 악귀병(이)가 퇴각했습니다. -●5월:접속잘안함이쓰미(이)가 위례(으)로 진격합니다. -●5월:이쓰미의 악귀병(와)과 ⓖ의병장49의 황귀병(이)가 대결합니다. -●5월:이쓰미의 악귀병(이)가 퇴각했습니다. -●5월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●5월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●5월:정휘인의 흑귀병(이)가 퇴각했습니다. -●5월:접속잘안함전인호(이)가 위례(으)로 진격합니다. -●5월:전인호의 악귀병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●5월:Navy마초의 궁기병(이)가 전멸했습니다. -●5월:전인호의 악귀병(와)과 ⓖ의병장49의 황귀병(이)가 대결합니다. -●5월:접속잘안함魯堂首(이)가 위례(으)로 진격합니다. -●5월:魯堂首의 등갑병(와)과 くま의 황귀병(이)가 대결합니다. -●5월:보컬로이드ⓖ의병장51(이)가 탐라(으)로 진격합니다. -●5월:ⓖ의병장51(이)가 귀병(으)로 성벽을 공격합니다. -●6월:접속잘안함아소(이)가 위례(으)로 진격합니다. -●6월:아소의 맹수병(와)과 엄백호의 청주병(이)가 대결합니다. -●6월:접속잘안함강서유서(이)가 위례(으)로 진격합니다. -●6월:강서유서의 석궁병(와)과 ⓖ의병장48의 황귀병(이)가 대결합니다. -●6월:접속잘안함니쉬(이)가 위례(으)로 진격합니다. -●6월:니쉬의 악귀병(와)과 ⓖ의병장45의 황귀병(이)가 대결합니다. -●6월:접속잘안함DVa(이)가 낙양(으)로 진격합니다. -●6월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●6월:보컬로이드ⓖ의병장49(이)가 안평(으)로 진격합니다. -●6월:ⓖ의병장49의 황귀병(와)과 HideD의 악귀병(이)가 대결합니다. -●6월:ⓖ의병장49의 황귀병(이)가 퇴각했습니다. -●6월:접속잘안함HideD(이)가 위례(으)로 진격합니다. -●6월:HideD의 악귀병(와)과 낭군의 흑귀병(이)가 대결합니다. -●6월:HideD의 악귀병(이)가 퇴각했습니다. -●6월:보컬로이드ⓖ의병장48(이)가 평양(으)로 진격합니다. -●6월:ⓖ의병장48의 황귀병(와)과 북두칠성의 등갑병(이)가 대결합니다. -●6월:ⓖ의병장48의 황귀병(이)가 퇴각했습니다. -●6월:접속잘안함북오더(이)가 위례(으)로 진격합니다. -●6월:북오더의 강궁병(와)과 낭군의 흑귀병(이)가 대결합니다. -●6월:낭군의 흑귀병(이)가 전멸했습니다. -●6월:접속잘안함魯堂首(이)가 위례(으)로 진격합니다. -●6월:魯堂首의 등갑병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●6월:접속잘안함직장인페이트(이)가 호로(으)로 진격합니다. -●6월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●7월:접속잘안함임사영(이)가 위례(으)로 진격합니다. -●7월:임사영의 악귀병(와)과 바닥을탁치고의 귀병(이)가 대결합니다. -●7월:접속잘안함강서유서(이)가 위례(으)로 진격합니다. -●7월:강서유서의 석궁병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●7월:접속잘안함Anes(이)가 위례(으)로 진격합니다. -●7월:Anes의 맹수병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●7월:접속잘안함니쉬(이)가 동황(으)로 진격합니다. -●7월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●7월:접속잘안함DVa(이)가 낙양(으)로 진격합니다. -●7월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●7월:DVa(이)가 낙양 공략에 성공했습니다. -●7월:접속잘안함무광(이)가 위례(으)로 진격합니다. -●7월:무광의 악귀병(와)과 바닥을탁치고의 귀병(이)가 대결합니다. -●7월:바닥을탁치고의 귀병(이)가 전멸했습니다. -●7월:접속잘안함북오더(이)가 위례(으)로 진격합니다. -●7월:북오더의 강궁병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●7월:북오더의 강궁병(이)가 퇴각했습니다. -●7월:85(이)가 사람들에게 집단으로 맞아서 죽고말았습니다. -●7월:보컬로이드평민킬러(이)가 안평(으)로 진격합니다. -●7월:평민킬러의 궁기병(와)과 카이사르의 석궁병(이)가 대결합니다. -●7월:평민킬러의 궁기병(이)가 퇴각했습니다. -●7월:접속잘안함잠둥이션(이)가 위례(으)로 진격합니다. -●7월:잠둥이션의 마귀병(와)과 카가미네렌의 궁기병(이)가 대결합니다. -●7월:카가미네렌의 궁기병(이)가 전멸했습니다. -●7월:보컬로이드ⓖ의병장51(이)가 탐라(으)로 진격합니다. -●7월:ⓖ의병장51(이)가 귀병(으)로 성벽을 공격합니다. -●7월:ⓖ의병장51의 귀병(이)가 퇴각했습니다. -●7월:접속잘안함직장인페이트(이)가 호로(으)로 진격합니다. -●7월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●8월:접속잘안함임사영(이)가 위례(으)로 진격합니다. -●8월:임사영의 악귀병(와)과 비월의 보병(이)가 대결합니다. -●8월:접속잘안함Anes(이)가 위례(으)로 진격합니다. -●8월:Anes의 맹수병(와)과 제갈여포의 궁기병(이)가 대결합니다. -●8월:접속잘안함감정(이)가 고창(으)로 진격합니다. -●8월:감정(이)가 충차(으)로 성벽을 공격합니다. -●8월:감정(이)가 고창 공략에 성공했습니다. -●8월:접속잘안함카이사르(이)가 동황(으)로 진격합니다. -●8월:카이사르의 석궁병(와)과 돌아온꼰대의 호표기병(이)가 대결합니다. -●8월:돌아온꼰대의 호표기병(이)가 전멸했습니다. -●8월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●8월:카이사르(이)가 동황 공략에 성공했습니다. -●8월:보컬로이드다이스(이)가 동황(으)로 진격합니다. -●8월:다이스의 궁기병(와)과 카이사르의 석궁병(이)가 대결합니다. -●8월:다이스의 궁기병(이)가 퇴각했습니다. -●8월:접속잘안함비밀(이)가 위례(으)로 진격합니다. -●8월:비밀의 마귀병(와)과 엄백호의 청주병(이)가 대결합니다. -●8월:접속잘안함잠둥이션(이)가 위례(으)로 진격합니다. -●8월:잠둥이션의 마귀병(와)과 ⓖ의병장47의 황귀병(이)가 대결합니다. -●8월:ⓖ의병장47의 황귀병(이)가 전멸했습니다. -●8월:잠둥이션의 마귀병(와)과 제갈여포의 궁기병(이)가 대결합니다. -●8월:보컬로이드비월(이)가 평양(으)로 진격합니다. -●8월:비월의 보병(와)과 진리의 맹수병(이)가 대결합니다. -●8월:비월의 보병(이)가 퇴각했습니다. -●8월:접속잘안함읭읭(이)가 위례(으)로 진격합니다. -●8월:읭읭의 맹수병(와)과 제갈여포의 궁기병(이)가 대결합니다. -●8월:제갈여포의 궁기병(이)가 전멸했습니다. -●8월:읭읭의 맹수병(와)과 Air의 호표기병(이)가 대결합니다. -●8월:접속잘안함내나(이)가 위례(으)로 진격합니다. -●8월:내나의 악귀병(와)과 엄백호의 청주병(이)가 대결합니다. -●8월:엄백호의 청주병(이)가 전멸했습니다. -●8월:내나의 악귀병(와)과 이루나의 황귀병(이)가 대결합니다. -●8월:이루나의 황귀병(이)가 전멸했습니다. -●8월:내나의 악귀병(와)과 박희수의 근위병(이)가 대결합니다. -●8월:박희수의 근위병(이)가 전멸했습니다. -●8월:내나의 악귀병(와)과 Air의 호표기병(이)가 대결합니다. -●8월:Air의 호표기병(이)가 전멸했습니다. -●8월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●8월:접속잘안함직장인페이트(이)가 호로(으)로 진격합니다. -●8월:직장인페이트(이)가 벽력거(으)로 성벽을 공격합니다. -●8월:직장인페이트(이)가 호로 공략에 성공했습니다. -●9월:접속잘안함Anes(이)가 위례(으)로 진격합니다. -●9월:Anes(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:Anes의 맹수병(이)가 퇴각했습니다. -●9월:접속잘안함감정(이)가 이도(으)로 진격합니다. -●9월:감정(이)가 충차(으)로 성벽을 공격합니다. -●9월:감정(이)가 이도 공략에 성공했습니다. -●9월:접속잘안함쥬비아(이)가 위례(으)로 진격합니다. -●9월:쥬비아의 마귀병(와)과 야근탈출의 백마병(이)가 대결합니다. -●9월:쥬비아의 마귀병(이)가 퇴각했습니다. -●9월:접속잘안함장임(이)가 위례(으)로 진격합니다. -●9월:장임의 등갑병(와)과 야근탈출의 백마병(이)가 대결합니다. -●9월:야근탈출의 백마병(이)가 전멸했습니다. -●9월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●9월:접속잘안함진리(이)가 위례(으)로 진격합니다. -●9월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●9월:접속잘안함카이스트(이)가 위례(으)로 진격합니다. -●9월:카이스트(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:접속잘안함이쓰미(이)가 위례(으)로 진격합니다. -●9월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●9월:정휘인의 흑귀병(와)과 니쉬의 악귀병(이)가 대결합니다. -●9월:접속잘안함전인호(이)가 위례(으)로 진격합니다. -●9월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●9월:희대의 호색한 희지재(이)가 사망했습니다. -●9월:접속잘안함선비(이)가 위례(으)로 진격합니다. -●9월:선비의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●9월:선비의 악귀병(이)가 퇴각했습니다. -●9월:접속잘안함비밀(이)가 위례(으)로 진격합니다. -●9월:비밀의 마귀병(와)과 카토의 기병(이)가 대결합니다. -●9월:비밀의 마귀병(이)가 퇴각했습니다. -●9월:접속잘안함읭읭(이)가 위례(으)로 진격합니다. -●9월:읭읭의 맹수병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●9월:읭읭의 맹수병(이)가 퇴각했습니다. -●9월:접속잘안함狂三(이)가 위례(으)로 진격합니다. -●9월:狂三의 악귀병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●10월:접속잘안함아소(이)가 위례(으)로 진격합니다. -●10월:아소의 맹수병(와)과 Navy마초의 궁기병(이)가 대결합니다. -●10월:Navy마초의 궁기병(이)가 전멸했습니다. -●10월:아소의 맹수병(와)과 카토의 기병(이)가 대결합니다. -●10월:카토의 기병(이)가 전멸했습니다. -●10월:아소(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:접속잘안함북두칠성(이)가 위례(으)로 진격합니다. -●10월:북두칠성(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:누군가가 계림(을)를 살피는 것 같습니다. -●10월:접속잘안함감정(이)가 계림(으)로 진격합니다. -●10월:감정(이)가 충차(으)로 성벽을 공격합니다. -●10월:접속잘안함카이사르(이)가 사비(으)로 진격합니다. -●10월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●10월:카이사르(이)가 사비 공략에 성공했습니다. -●10월:접속잘안함장임(이)가 위례(으)로 진격합니다. -●10월:장임의 등갑병(와)과 ⓜ능환의 마귀병(이)가 대결합니다. -●10월:ⓜ능환의 마귀병(이)가 전멸했습니다. -●10월:장임(이)가 등갑병(으)로 성벽을 공격합니다. -●10월:접속잘안함진리(이)가 위례(으)로 진격합니다. -●10월:진리(이)가 맹수병(으)로 성벽을 공격합니다. -●10월:접속잘안함카이스트(이)가 위례(으)로 진격합니다. -●10월:카이스트(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:접속잘안함이쓰미(이)가 위례(으)로 진격합니다. -●10월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:보컬로이드정휘인(이)가 (으)로 진격합니다. -●10월:정휘인(이)가 흑귀병(으)로 성벽을 공격합니다. -●10월:정휘인(이)가 공략에 성공했습니다. -●10월:접속잘안함전인호(이)가 위례(으)로 진격합니다. -●10월:전인호(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:잠둥이션(이)가 적로(+13)(을)를 습득했습니다! -●10월:접속잘안함魯堂首(이)가 위례(으)로 진격합니다. -●10월:魯堂首의 등갑병(와)과 くま의 흑귀병(이)가 대결합니다. -●10월:접속잘안함내나(이)가 위례(으)로 진격합니다. -●10월:내나의 악귀병(와)과 くま의 흑귀병(이)가 대결합니다. -●10월:くま의 흑귀병(이)가 전멸했습니다. -●10월:내나(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:하내에서 갓서유서(이)라는 호걸이 천하에 이름을 알립니다. -●10월:접속잘안함狂三(이)가 위례(으)로 진격합니다. -●10월:狂三(이)가 악귀병(으)로 성벽을 공격합니다. -●10월:狂三의 악귀병(이)가 퇴각했습니다. -●11월:접속잘안함아소(이)가 위례(으)로 진격합니다. -●11월:아소(이)가 맹수병(으)로 성벽을 공격합니다. -●11월:접속잘안함강서유서(이)가 위례(으)로 진격합니다. -●11월:강서유서(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:강서유서(이)가 위례 공략에 성공했습니다. -●11월:접속잘안함감정(이)가 (으)로 진격합니다. -●11월:감정(이)가 충차(으)로 성벽을 공격합니다. -●11월:감정(이)가 공략에 성공했습니다. -●11월:접속잘안함카이사르(이)가 계림(으)로 진격합니다. -●11월:카이사르(이)가 석궁병(으)로 성벽을 공격합니다. -●11월:접속잘안함DVa(이)가 호관(으)로 진격합니다. -●11월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●11월:접속잘안함이쓰미(이)가 계림(으)로 진격합니다. -●11월:이쓰미(이)가 악귀병(으)로 성벽을 공격합니다. -●11월:이쓰미의 악귀병(이)가 퇴각했습니다. -●12월:접속잘안함강서유서(이)가 계림(으)로 진격합니다. -●12월:강서유서의 석궁병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●12월:접속잘안함감정(이)가 유구(으)로 진격합니다. -●12월:감정(이)가 충차(으)로 성벽을 공격합니다. -●12월:감정(이)가 유구 공략에 성공했습니다. -●12월:접속잘안함카이사르(이)가 계림(으)로 진격합니다. -●12월:카이사르의 석궁병(와)과 카토의 기병(이)가 대결합니다. -●12월:카이사르의 석궁병(이)가 퇴각했습니다. -●12월:접속잘안함장임(이)가 계림(으)로 진격합니다. -●12월:장임의 등갑병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●12월:접속잘안함DVa(이)가 호관(으)로 진격합니다. -●12월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●12월:DVa(이)가 호관 공략에 성공했습니다. -●12월:접속잘안함무광(이)가 (으)로 진격합니다. -●12월:무광(이)가 악귀병(으)로 성벽을 공격합니다. -●12월:누군가가 이도(을)를 살피는 것 같습니다. -●12월:접속잘안함쿠요(이)가 계림(으)로 진격합니다. -●12월:쿠요의 맹수병(와)과 낭군의 흑귀병(이)가 대결합니다. -●12월:접속잘안함잠둥이션(이)가 (으)로 진격합니다. -●12월:잠둥이션(이)가 마귀병(으)로 성벽을 공격합니다. -●12월:잠둥이션(이)가 공략에 성공했습니다. -◆1월:217년이 되었습니다. -●1월:접속잘안함임사영(이)가 계림(으)로 진격합니다. -●1월:임사영의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●1월:카토의 기병(이)가 전멸했습니다. -●1월:접속잘안함강서유서(이)가 계림(으)로 진격합니다. -●1월:강서유서의 석궁병(와)과 제갈여포의 궁기병(이)가 대결합니다. -●1월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●1월:Anes의 맹수병(와)과 ⓖ의병장49의 흑귀병(이)가 대결합니다. -●1월:접속잘안함감정(이)가 여남(으)로 진격합니다. -●1월:감정(이)가 충차(으)로 성벽을 공격합니다. -●1월:감정(이)가 여남 공략에 성공했습니다. -●1월:ⓖ의병장43(이)가 처자식이 그립다며 떠났습니다. -●1월:접속잘안함DVa(이)가 진양(으)로 진격합니다. -●1월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●1월:DVa(이)가 진양 공략에 성공했습니다. -●1월:접속잘안함무광(이)가 계림(으)로 진격합니다. -●1월:무광의 악귀병(와)과 비월의 보병(이)가 대결합니다. -●1월:비월의 보병(이)가 전멸했습니다. -●1월:무광의 악귀병(와)과 낭군의 흑귀병(이)가 대결합니다. -●1월:ⓖ의병장48(이)가 자기가 없어도 될것 같다며 떠났습니다. -●1월:접속잘안함쿠요(이)가 계림(으)로 진격합니다. -●1월:쿠요의 맹수병(와)과 낭군의 귀병(이)가 대결합니다. -●1월:쿠요의 맹수병(이)가 퇴각했습니다. -●1월:ⓖ의병장45(이)가 자기 목적은 달성했다며 떠났습니다. -●1월:잠둥이션(이)가 국기를 변경하였습니다. -●1월:접속잘안함잠둥이션(이)가 계림(으)로 진격합니다. -●1월:잠둥이션의 마귀병(와)과 평민킬러의 궁기병(이)가 대결합니다. -●1월:평민킬러의 궁기병(이)가 전멸했습니다. -●1월:잠둥이션의 마귀병(와)과 낭군의 귀병(이)가 대결합니다. -●1월:낭군의 귀병(이)가 전멸했습니다. -●1월:잠둥이션의 마귀병(와)과 정휘인의 흑귀병(이)가 대결합니다. -●1월:정휘인의 흑귀병(이)가 전멸했습니다. -●1월:잠둥이션의 마귀병(와)과 ⓖ의병장49의 흑귀병(이)가 대결합니다. -●1월:ⓖ의병장49의 흑귀병(이)가 전멸했습니다. -●1월:접속잘안함읭읭(이)가 계림(으)로 진격합니다. -●1월:읭읭(이)가 맹수병(으)로 성벽을 공격합니다. -●2월:접속잘안함임사영(이)가 계림(으)로 진격합니다. -●2월:임사영(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함Anes(이)가 계림(으)로 진격합니다. -●2월:Anes의 맹수병(와)과 카토의 기병(이)가 대결합니다. -●2월:접속잘안함니쉬(이)가 계림(으)로 진격합니다. -●2월:니쉬의 악귀병(와)과 카토의 기병(이)가 대결합니다. -●2월:카토의 기병(이)가 전멸했습니다. -●2월:니쉬(이)가 악귀병(으)로 성벽을 공격합니다. -●2월:접속잘안함감정(이)가 계림(으)로 진격합니다. -●2월:감정(이)가 충차(으)로 성벽을 공격합니다. -●2월:감정(이)가 계림 공략에 성공했습니다. -●2월:낭군(이)가 접속잘안함(으)로 망명하였습니다. -●2월:접속잘안함DVa(이)가 하내(으)로 진격합니다. -●2월:DVa(이)가 벽력거(으)로 성벽을 공격합니다. -●2월:DVa(이)가 하내 공략에 성공했습니다. -●2월:청기사(이)가 접속잘안함(으)로 망명하였습니다. -●2월:카토(이)가 접속잘안함임관했습니다. -●2월:Air(이)가 접속잘안함(으)로 망명하였습니다. -●2월:접속잘안함비밀(이)가 흉노(으)로 진격합니다. -●2월:비밀(이)가 마귀병(으)로 성벽을 공격합니다. -●2월:비밀(이)가 흉노 공략에 성공했습니다. -●2월:ⓖ의병장47(이)가 접속잘안함임관했습니다. -●2월:ⓖ의병장47(이)가 자기 목적은 달성했다며 떠났습니다. -●2월:ⓖ의병장50(이)가 접속잘안함임관했습니다. -●2월:청기사(이)가 접속잘안함에서 하야했습니다. -●2월:ⓖ의병장51(이)가 푸대접에 실망하여 떠났습니다. -●3월:남해에서 예형(이)라는 호걸이 천하에 이름을 알립니다. -●3월:천괴금(이)가 접속잘안함(으)로 망명하였습니다. -●3월:엄백호(이)가 접속잘안함(으)로 망명하였습니다. -●3월:비월(이)가 접속잘안함(으)로 망명하였습니다. -●3월:사비에서 미이잉구경(이)라는 호걸이 천하에 이름을 알립니다. -●3월:상용에서 asdasd(이)라는 호걸이 천하에 이름을 알립니다. -●3월:에서 치우천(이)라는 호걸이 천하에 이름을 알립니다. -●3월:안평에서 히익(이)라는 호걸이 천하에 이름을 알립니다. diff --git a/che_close/logs/_auctionlog.txt b/che_close/logs/_auctionlog.txt deleted file mode 100644 index f86116f3..00000000 --- a/che_close/logs/_auctionlog.txt +++ /dev/null @@ -1,42 +0,0 @@ -◆182년 8월, 12번 판매 성사 : ⓝ상인(이)가 쌀 410(을)를 판매, 니쉬(이)가 금 380(으)로 구매 -◆182년 8월, 11번 구매 성사 : ⓝ상인(이)가 쌀 250(을)를 구매, 쥬비아(이)가 금 280(으)로 판매 -◆183년 4월, 13번 판매 성사 : ⓝ상인(이)가 쌀 240(을)를 판매, 감정(이)가 금 230(으)로 구매 -◆183년 7월, 14번 판매 성사 : ⓝ상인(이)가 쌀 210(을)를 판매, 제갈여포(이)가 금 170(으)로 구매 -◆183년 9월, 16번 판매 성사 : ⓝ상인(이)가 쌀 80(을)를 판매, 니쉬(이)가 금 70(으)로 구매 -◆183년 12월, 15번 구매 성사 : ⓝ상인(이)가 쌀 100(을)를 구매, 장임(이)가 금 100(으)로 판매 -◆184년 1월, 17번 구매 성사 : ⓝ상인(이)가 쌀 310(을)를 구매, 니쉬(이)가 금 360(으)로 판매 -◆184년 5월, 18번 판매 유찰 : ⓝ상인(이)가 쌀 310(을)를 판매, 진리(이)가 금 250(으)로 입찰, 그러나 입찰자 자금부족, 벌금 3 -◆184년 6월, 19번 판매 성사 : ⓝ상인(이)가 쌀 210(을)를 판매, 비월(이)가 금 160(으)로 구매 -◆185년 3월, 22번 판매 성사 : ⓝ상인(이)가 쌀 130(을)를 판매, 진리(이)가 금 110(으)로 구매 -◆185년 6월, 23번 판매 성사 : ⓝ상인(이)가 쌀 360(을)를 판매, 장임(이)가 금 310(으)로 구매 -◆186년 7월, 27번 판매 성사 : ⓝ상인(이)가 쌀 360(을)를 판매, 강서유서(이)가 금 300(으)로 구매 -◆188년 2월, 33번 판매 성사 : ⓝ상인(이)가 쌀 120(을)를 판매, 선비(이)가 금 130(으)로 구매 -◆188년 5월, 34번 판매 성사 : ⓝ상인(이)가 쌀 390(을)를 판매, 니쉬(이)가 금 340(으)로 구매 -◆188년 7월, 35번 판매 성사 : ⓝ상인(이)가 쌀 260(을)를 판매, 장임(이)가 금 230(으)로 구매 -◆189년 11월, 40번 판매 유찰 : ⓝ상인(이)가 쌀 160(을)를 판매, 장임(이)가 금 150(으)로 입찰, 그러나 입찰자 자금부족, 벌금 2 -◆190년 7월, 41번 판매 성사 : ⓝ상인(이)가 쌀 360(을)를 판매, 니쉬(이)가 금 290(으)로 구매 -◆191년 3월, 44번 구매 성사 : ⓝ상인(이)가 쌀 790(을)를 구매, 소드락(이)가 금 750(으)로 판매 -◆191년 6월, 45번 판매 성사 : ⓝ상인(이)가 쌀 780(을)를 판매, 장임(이)가 금 650(으)로 구매 -◆191년 12월, 48번 판매 성사 : ⓝ상인(이)가 쌀 1130(을)를 판매, 니쉬(이)가 금 910(으)로 구매 -◆192년 3월, 47번 판매 성사 : ⓝ상인(이)가 쌀 670(을)를 판매, 니쉬(이)가 금 540(으)로 구매 -◆192년 4월, 46번 판매 성사 : ⓝ상인(이)가 쌀 380(을)를 판매, 장임(이)가 금 340(으)로 구매 -◆193년 5월, 50번 구매 성사 : ⓝ상인(이)가 쌀 230(을)를 구매, 니쉬(이)가 금 210(으)로 판매 -◆197년 11월, 62번 판매 성사 : ⓝ상인(이)가 쌀 750(을)를 판매, 니쉬(이)가 금 700(으)로 구매 -◆198년 1월, 63번 구매 성사 : ⓝ상인(이)가 쌀 500(을)를 구매, 니쉬(이)가 금 570(으)로 판매 -◆198년 7월, 64번 구매 성사 : ⓝ상인(이)가 쌀 1090(을)를 구매, 니쉬(이)가 금 1190(으)로 판매 -◆199년 6월, 66번 판매 성사 : ⓝ상인(이)가 쌀 1410(을)를 판매, 감정(이)가 금 1280(으)로 구매 -◆199년 6월, 67번 구매 성사 : ⓝ상인(이)가 쌀 1450(을)를 구매, 니쉬(이)가 금 1680(으)로 판매 -◆199년 7월, 65번 구매 성사 : ⓝ상인(이)가 쌀 1380(을)를 구매, 니쉬(이)가 금 1570(으)로 판매 -◆199년 10월, 68번 판매 성사 : ⓝ상인(이)가 쌀 1110(을)를 판매, 니쉬(이)가 금 1070(으)로 구매 -◆200년 4월, 69번 구매 성사 : ⓝ상인(이)가 쌀 1370(을)를 구매, 니쉬(이)가 금 1640(으)로 판매 -◆201년 1월, 71번 판매 성사 : ⓝ상인(이)가 쌀 1170(을)를 판매, 니쉬(이)가 금 1100(으)로 구매 -◆201년 12월, 75번 판매 유찰 : 샤그니(이)가 쌀 2000(을)를 판매, KAITO(이)가 금 2200(으)로 입찰, 그러나 판매자 군량부족, 벌금 22 -◆202년 8월, 73번 판매 성사 : ⓝ상인(이)가 쌀 1560(을)를 판매, 카이사르(이)가 금 1350(으)로 구매 -◆203년 1월, 79번 판매 성사 : 샤그니(이)가 쌀 2000(을)를 판매, 강서유서(이)가 금 1100(으)로 구매 -◆203년 4월, 77번 판매 성사 : ⓝ상인(이)가 쌀 780(을)를 판매, 카토(이)가 금 780(으)로 구매 -◆203년 9월, 80번 판매 유찰 : ⓝ상인(이)가 쌀 1190(을)를 판매, 대악마(이)가 금 1180(으)로 입찰, 그러나 입찰자 자금부족, 벌금 12 -◆212년 7월, 118번 판매 성사 : ⓝ상인(이)가 쌀 1640(을)를 판매, 쥬비아(이)가 금 1310(으)로 구매 -◆214년 4월, 128번 판매 성사 : ⓝ상인(이)가 쌀 2340(을)를 판매, 쥬비아(이)가 금 1870(으)로 구매 -◆214년 8월, 129번 판매 성사 : ⓝ상인(이)가 쌀 1430(을)를 판매, 쥬비아(이)가 금 1180(으)로 구매 -◆216년 4월, 136번 판매 성사 : ⓝ상인(이)가 쌀 1260(을)를 판매, 카이사르(이)가 금 1010(으)로 구매 -◆216년 5월, 137번 판매 성사 : ⓝ상인(이)가 쌀 1870(을)를 판매, 쥬비아(이)가 금 1490(으)로 구매 diff --git a/che_close/logs/_gen_msg.txt b/che_close/logs/_gen_msg.txt deleted file mode 100644 index 3155cd12..00000000 --- a/che_close/logs/_gen_msg.txt +++ /dev/null @@ -1,1371 +0,0 @@ -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 안녕하세요~^^ -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 초반에 통솔 74나와서 좋아햇는데 실패해서 72. ㅋ -강서유서 > ㄷㄱㅎㅈㄷㅀ | 네 안녕하세요^^ -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 근데 누구시더라...? -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 오랜만에 체섭 들어와봐서 잊어버린. ㅋㅋ -강서유서 > ㄷㄱㅎㅈㄷㅀ | 아 혹시 이도형님이세요? -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 그냥 강서유서라고 하쇼. -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 그 진짜이름은 귀찮으니.. 건국하실거? -강서유서 > ㄷㄱㅎㅈㄷㅀ | 한동안 안 보이시길래 썼는데 요번기에 오실줄은 몰랐네요 죄송합니다. 건국은 안합니다 -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 히잉... 통솔 77....좋으시겟수... -ㄷㄱㅎㅈㄷㅀ > 강서유서 | ㅋㅋㅋㅋ. -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 같은데 가봅시다.ㅋㅋ -강서유서 > ㄷㄱㅎㅈㄷㅀ | 임관금지국이라 선약말고는 안 받는 국이에요 ㅠㅠ 다음기회에 같이해요 -ㄷㄱㅎㅈㄷㅀ > 강서유서 | 넹.. 이번에 선약 많이 문제가 됫던데. 지난기 때문에. - 박일아 > 부관 | 핥짝♥ - 부관 > 박일아 | 부관을 핥으시면 안됩니다. -ㄷㄱㅎㅈㄷㅀ > 박일아 | 국명이 접속잘 안함국입니다. -ㄷㄱㅎㅈㄷㅀ > 박일아 | 마이너섭 리셋을 바랫엇습니다만 솔직히... 마이너 전부 에러라네요... - 박일아 > 그만좀불러좀 | 그만좀불러좀님~ 1턴 선정해주시고 1~6 농업 7~12 상업 부탁드려요! - 박일아 > 낭군 | 낭군님 1턴 선정 부탁드려요~ - 박일아 > ㅇωㅇ | 이모티콘님~ 계시다면 뒤에 턴도 좀 넣어주실수 있을까요? ㅎㅎ - 박일아 > 검임 | 안녕하세요 검임님 ㅎㅎ 거병하시는줄 알았는데, 안하시는군여.. 혹시 선약 없으시다면 저희국에서 함께 해보실 생각은 없으신가요? -북두칠성 > 박일아 | [박일아:긔엽긔▶재야]<2016-01-14 22:15:07> 안녕하세요 ! 선약이 없으신 장수분들은 긔엽긔 국에서 모셔가고 싶습니다. 관심 있으신분은 임관을 꾸욱~ 눌러주세요 -북두칠성 > 박일아 | 선약 없어서 임관 꼭 눌렀어요 -북두칠성 > 박일아 | 꼭이 아니라 꾸욱~ 눌렀어요 - 박일아 > 북두칠성 | 감사합니다! ㅎㅎㅎ - 박일아 > 그만좀불러좀 | 그만좀불러좀님~한턴씩 넣지 마시구.. 턴 다 넣어주시면 안될까요 ㅎㅎㅎ; 올 휴식턴이셔서... - 박일아 > 하기싫은데 | 하기싫은데님~ 정장 1턴 반복 해주세요 ㅎㅎ - 검임 > 박일아 | 인원이 적으면 들어가겠습니다! 지난기수는 랜임했더니 최다인구수나라로 들어가버려서 재미없더라구요... - 박일아 > 검임 | 아마 큰 차이는 없을거같아요. 저번기는 너무 양학이었고... 근데 지금 10인이 차서, 혹시 가능하시다면 183년에 임관해주신다면 감사하겠습니다 ㅎㅎ - 박일아 > 잠둥이션 | 안녕하세요 잠둥이션님! 가능하시다면 183년에 임관해주실수 있을까요? ㅎㅎ 긔엽긔는 잠둥이션님을 환영합니다! - 박일아 > 잠둥이션 | 잠둥이션님을 위해 짤방하나를... 움짤입니다 ㅎㅎ http://i.imgur.com/fYSKwHa.webm - 박일아 > 6974 | 6974님 안녕하세요 ! 혹시 선약이 없으시다면.. 183년에 긔엽긔국에서 초대하고싶습니다 ! - 박일아 > 일본어번역기 | 일본어번역기님 안녕하세요 ! 혹시 선약이 없으시다면.. 183년에 긔엽긔국에서 초대하고싶습니다 ! - 박일아 > 희지재 | 희지재님 안녕하세요 ! 혹시 선약이 없으시다면.. 183년에 긔엽긔국에서 초대하고싶습니다 ! -일본어번역기 > 박일아 | 있다 선약 번역기! -잠둥이션 > 박일아 | 미리 등용장 좀 보내주세요. 183년에 타고 갈께요 - 박일아 > 잠둥이션 | 183년부터 등용장 발송이 되요~ 183년 1월에 등용장 보내드릴게요 ! -북두칠성 > 박일아 | [갸오오:사랑꾼들▶긔엽긔]<2016-01-15 14:49:58> 불가침건으로 연락드려요. 혹시 가능하시나요? -북두칠성 > 박일아 | [비월:블소▶긔엽긔]<2016-01-15 14:45:02> 옵션 빼고 하는건 어떤가욤 - 박일아 > 북두칠성 | 1월 남만출 2턴 남해출 3턴 대출 넣어주세요. - 박일아 > 북두칠성 | 이후 반징훈사 내정 넣어두시고, 다녀오세요 ㅎㅎ - 박일아 > 북두칠성 | 아니다, 1월 남만 2,3월 대 출 넣어주세요 -북두칠성 > 박일아 | 수정했어요 고마워용 ~ - 박일아 > 북두칠성 | 수정 !!! 1턴 남만, 2턴 남해, 3턴 산월출이구요 부대는 플젠님이 파실겁니다. 거기 가입해주세요! - 박일아 > 북두칠성 | 몇시까지 접속하시나요? 지금 아예 턴수정안되세요? 예턴 또바뀔듯 ㄷㄷ - 박일아 > 북두칠성 | 임관자가 계속 적국에 몰림에 따라 안전빵 예턴 준비했어요. 1턴 남만, 2턴 남해는 동일하구요, 3턴부터 반징훈사 해주세요. 부대는 탑승해주세용~ - 박일아 > 북두칠성 | 턴이 아니라 월... -북두칠성 > 박일아 | 83년 6월까지 최후예턴 수정함 나갈게요 - 박일아 > 그만좀불러좀 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > Air | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > Anes | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > ㅇωㅇ | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 낭군 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 북두칠성 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 플젠 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 하기싫은데 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 부관 | 땅따 및 초반쟁 국방이 업로드 되었습니다! 모두들 국방대로 부대 및 예턴 수행해주세요 !! - 박일아 > 낭군 | 182년 2월턴부터 내정턴은 기술연구로 부탁드립니다 ! - 박일아 > ㅇωㅇ | 182년 2월턴부터 내정턴은 기술연구로 부탁드립니다 ! - 박일아 > 그만좀불러좀 | 182년 2월턴부터 내정턴은 기술연구로 부탁드립니다 ! - 검임 > 박일아 | 사람많으면 뛰쳐나갈테니 그런줄 아세욧 - 박일아 > 검임 | ㅋㅋㅋ네 - 갸오오 > 魯堂首 | 보시면 2월 영안출 대신 덕양 출 부탁드려요! - 갸오오 > 읭읭 | 보시면 2월 영안출 대신 덕양 출 부탁드려요! - 희지재 > 박일아 | 14 183年 1月 13:05 【긔엽긔】(으)로 임관 금방 가여~ - 박일아 > 희지재 | 감사합니다 ! >< - 갸오오 > 魯堂首 | 국방 출병지 수정되었습니다 확인해주세요! - 갸오오 > 누렁 | 국방 출병지 수정되었습니다 확인해주세요! - 갸오오 > 야근탈출 | 국방 출병지 수정되었습니다 확인해주세요! - 갸오오 > 읭읭 | 국방 출병지 수정되었습니다 확인해주세요! -잠둥이션 > 박일아 | 여기서 징병하고 훈사까지 해놓을께요. 등용장 꼭 바로 보내주셧으면 좋겠습니다. 저 49분턴이에요 - 박일아 > 잠둥이션 | 00분 06초에 등용장 갑니다 ㅎㅎㅎ -잠둥이션 > 박일아 | 네 내일 1시에 봅시다. - 갸오오 > 읭읭 | 주민 다 찹니다! 삽턴 주의! - 갸오오 > 魯堂首 | 주민 다 찹니다! 삽턴 주의! - 갸오오 > 누렁 | 농업 다찼어욥 - 박희수 > 뒷집할머니 | 땅따하는데 쌀이없어서 조금 몰수했습니다 ㅠㅠ 죄송합니다 챙겨드릴수있도록 하겠습니다 - 박희수 > 북오더 | 계신가여.. - 박희수 > 감정 | 감정님 계신가요? ㅠㅠ 부탁 하나만 드릴께요 - 박희수 > 감정 | 혹시나 괜찮으시면 랜임 1분장님께 쌀 600만 증여좀 부탁드릴께요 ㅠㅠ 둔전 생기면 다시 챙겨드리겠습니다 - 갸오오 > Navy마초 | 마초님 안녕하세요! 혹시 선약이 없으시면 사랑꾼들은 어떠신가요@@ - 갸오오 > 미친과학 | 미과님 안녕하세요! 혹시 선약이 없으시면 사랑꾼들은 어떠신가요@@ - 갸오오 > 리안 | 리안님 안녕하세요! 혹시 선약이 없으시면 사랑꾼들은 어떠신가요@@ - 박희수 > 쿠요 | 쿠요형 나 후이임 할꺼없으면 와서 도와줘 - 박희수 > 미친과학 | 미과형 나 후이임 할꺼없으면 와서 도와줘 - 갸오오 > 청기사 | 집합턴 1턴 밀어주세요! - 최태원 > 리안 | 여 일러와라 - 박일아 > Navy마초 | 마초님 안녕하세요 ! 비록 초반쟁 잠깐뿐이었지만, 마초님을 초대하고싶습니다 ! 임관에서 긔엽긔를 찾아주세요 ! - 박일아 > 미친과학 | 미과님 안녕하세요 ! 비록 초반쟁 잠깐뿐이었지만, 미과님을 초대하고싶습니다 ! 임관에서 긔엽긔를 찾아주세요 ! - 박일아 > 잠둥이션 | 잠둥님 대 출병 넣어주세요 ! - 박일아 > Anes | Anes님, 2턴에 북두칠성님 남해 발령해두시고, 집합턴 안당겨지면 1턴 당겨서 북두칠성님 보내주실수 있을까요? - Anes > 박일아 | 네 3분까지 기다리고 안바뀌면 당길게요 - 장임 > SARS | 사스님 좀 도와주십쇼 - Anes > 박일아 | 턴 당겼습니다 - 갸오오 > 魯堂首 | 사령1턴 청기사 강주발령, 사령2턴 읭읭님 강주발령 부탁드려요!.. - 박일아 > Anes | 하기싫은데님은 집합+충차로 쓸 계획이라 이번 땅따에선 아마 집합으로 쓸거예요. 쌀포 지우셔도 됩니다 ㅎㅎ - Anes > 박일아 | 그럼 하기싫은데님대신 부관님에게 쌀포 넣어둘게요 - 박일아 > 푸린푸린♥ | 안녕하세요 푸린푸린님! 아직 임관지가 정해지지 않으셨다면.. 저희 긔엽긔에서 함께 해보시지 않을래요 ?! 푸린님을 기다립니다 ㅎㅎ - 박일아 > 그래도우리는 | 그래도우리는님! 혹시 아직 임관지가 정해지지 않으셨다면 저희 긔엽긔에서 초빙하고싶습니다. 혹, 관심 있으시다면 긔엽긔에 임관해주신다면 환영해드릴게요 !! - 박일아 > 류화영 | 류화영님! 혹시 아직 임관지가 정해지지 않으셨다면 저희 긔엽긔에서 초빙하고싶습니다. 혹, 관심 있으시다면 긔엽긔에 임관해주신다면 환영해드릴게요 !! - 박일아 > 피곤한조자룡 | 조자룡님! 혹시 아직 임관지가 정해지지 않으셨다면 저희 긔엽긔에서 초빙하고싶습니다. 혹, 관심 있으시다면 긔엽긔에 임관해주신다면 환영해드릴게요 !! - 박일아 > 쿠요 | 쿠요님 >< 혹시 선약이나 임관을 결심한 국가가 없으시다면 혹시 긔엽긔에 임관해주실수 있을까요? ㅎㅎ 쿠요님 긔요미 >< - 박일아 > 샤그니 | 샤그니님 ! 혹시, 아직 임관지 안정해지셨으면 저희국좀 도와주실수 있으세요? (당연히) 국방은 제가 다 만듭니다 (...) - 박일아 > Anes | Anes님 산월출 넣어주세요. 그리고 1턴에 하기싫은데 상동 발령요~ 1턴은 부관님이 가져가실겁니다 - Anes > 박일아 | 네 - 갸오오 > 야근탈출 | 사령1턴에 魯堂首님 쌀천 포상ㄷ ㅚ시나요! - 갸오오 > 청기사 | 1턴에 노당수님 쌀천 포상 부탁드려요 - 박일아 > Anes | 1턴 가져갈께요. 1턴에 플젠 산월 발령요 - Anes > 박일아 | 네 발령넣었어요 - 갸오오 > 읭읭 | 읭읭님 출병 그만해주세요!.. - 박일아 > Anes | 1턴 가져갈테니 SARS 금 2천 포상요~ - Anes > 박일아 | 네 넣었어요 -푸린푸린♥ > 박일아 | 흑 죄송해요 ㅜㅜ 이미 선약이 ㅜㅜ 다음에 함께해요~ - 장임 > SARS | ㅠㅠ..........가버리시다니 - 박일아 > Anes | 잠둥이션님이랑 자리 스핀했어요.ㅎㅎ - 박일아 > 그만좀불러좀 | 그만좀불러좀님~ 반징훈사 해두시고 남은턴 기연으로 해주세요~ - 갸오오 > 천괴금 | 선약이 없으시다면 사랑꾼들 국은 어떠신가요! - 박일아 > Anes | 검임님 상동 발령 부탁드려요 - 박일아 > 검임 | 검임님 계양이나 고창으로 출병지 수정해주세요 - 박일아 > 천괴금 | 안녕하세요 천괴금님! 혹시 선약이 없으시다면, 긔엽긔에서 천괴금님을 모시고 싶습니다 ! - Anes > 박일아 | 네 - 박일아 > Anes | Air 쌀 2천 포상 부탁드릴게욥 - 박일아 > 잠둥이션 | Anes 금 1천 포상 부탁드릴게욥 - 하루카 > 6974 | 초반쟁을 대비하기 위해 금쌀 좀 빌려가겠습니다 양해 부탁드립니다. - 하루카 > 물파스 | 초반쟁을 대비하기 위해 금쌀 좀 빌려가겠습니다 양해 부탁드립니다. - 하루카 > 발암맨 | 초반쟁을 대비하기 위해 금쌀 좀 빌려가겠습니다 양해 부탁드립니다. - 하루카 > 연이 | 초반쟁을 대비하기 위해 금쌀 좀 빌려가겠습니다 양해 부탁드립니다. - 하루카 > 푸린푸린♥ | 초반쟁을 대비하기 위해 금쌀 좀 빌려가겠습니다 양해 부탁드립니다. - 갸오오 > 야근탈출 | 덕양출 해주세요!.. - 박일아 > Anes | SARS, 그만좀불러좀 쌀 1천씩 포상 부탁드려요 - Anes > 박일아 | 네 포상넣었어요 - 박일아 > 북두칠성 | 2,3,4턴 계양출 해주세요 이후 반징훈사 ! - 박일아 > 북두칠성 | 턴 지났으니 1~3턴이 되겠군요 ㅎㅎ - 무광 > HideD | 8시21분에 장판 발령해드릴게요 - 무광 > HideD | 저도 장판으로 발령해주세요 - 무광 > 카이사르 | 히데디님 제가 이번턴에 장판발령할게요 - 박일아 > 잠둥이션 | 션님 재 반징 갑시다. 출하기 애매한 병력이네요 ㅎㅎ - 박일아 > 일기토지배자 | 안녕하세요! 일기토지배자님! 저희 긔엽긔에서 일기토지배자님을 초빙하고싶습니다. 원하신다면 무력계통 내정만 하실수 있게 해드리겠습니다 ! -잠둥이션 > 박일아 | 회계 막타 가능할거 같은데 재징가요? - 박일아 > 비밀 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 박일아 > 정력왕 | 안녕하세요! 정력왕님! 혹시 선약이 없으시다면 저희국으로 초대하고싶습니다. 지장이 많이 부족한 터라 정력왕님의 힘이 절실합니다.. 오신다면 정말 감사드릴게요! - 검임 > 박일아 | 깜빡 졸았더니(...) 고창갑니다 - 박일아 > 엄백호 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 박일아 > 엄백호 | 안녕하세요 엄백호님 ! 혹시 선약이 없으시다면, 엄덕왕의 옛 영광을 긔엽긔에서 부활시켜보시는건 어떨까요 ! 저희국으로 엄덕왕님을 초대하고싶습니다 ! - 박일아 > 비밀 | 안녕하세요! 비밀님! 혹시 선약이 없으시다면 저희국으로 초대하고싶습니다. 지장이 많이 부족한 터라 비밀님의 힘이 절실합니다.. 오신다면 정말 감사드릴게요! - 박일아 > 잠둥이션 | 네 Anes님이 회계는 정리 하실거예요. 이번에 반징해두면 2출 되시니까 그렇게 하는게 좋아요 ㅎㅎ -잠둥이션 > 박일아 | okok -잠둥이션 > 박일아 | 11시가 출병턴이니 그때 다시 올께요 ㅋ - 박일아 > 검임 | 검임님, 고창은 부관님이 바로 앞턴에서 먹습니다. 1턴에 계양출 해주시고 반징훈사 해주세요 ㅎㅎ - 박일아 > Anes | 2턴에 희지재 쌀 1만 몰수 부탁드려요~ 쌀연성 한번 합니다~ - 갸오오 > 일기토지배자 | 안녕하세요! 혹시 선약이 없으시다면 사랑꾼들은 어떠세요? - 갸오오 > 정력왕 | 안녕하세요! 혹시 선약이 없으시다면 사랑꾼들은 어떠세요? - SARS > 장임 | 죄송합니다~~ - 무광 > DVa | 강하는 나중에 먹어도되니 강릉부터 쳐주세요~ - 비월 > 다이스 | 다이스님 11월이나 12월턴에 저 정도로 발령부탁드리겠습니다. - 갸오오 > 일기토지배자 | 혹시 부대 생성 가능하시나요? - 검임 > 박일아 | ...정신을못썼더니 부탈도 못하고 고창으로 이동을.. 죄송합니다 ㅠ 내정이나할게요 -북두칠성 > SARS | 사스님 할룽~.~ 방가방가 - 박일아 > 검임 | 내정하실꺼면 부대 내리시고 올턴 선정 해주세요! - 박일아 > 낭군 | 낭군님 부대 탑승하시고 시상 때려주세요 - 무광 > 카이사르 | 양양발령드릴테니 금으로 쌀 사셔야 할 거 같아요. -카이사르 > 무광 | 1턴에 사령턴으로 양양 보내드릴테니 한턴아껴서 다른걸로 쓰세요 - 갸오오 > 김우민 | 김우민님 안녕하세요 혹시 선약이 없으시면 사랑꾼들 은 어떠신가요? -푸린푸린♥ > 하루카 | 오냐~* - Navy마초 > 박일아 | 다음기회에 뵙겠습니다. 후후... - Navy마초 > 갸오오 | 곧 찾아뵙죠 후후 - 박희수 > 橙 | 죄송해요 ㅠㅠ 흉노를 저쪽이 먼저쳐서.. 발령해드리면 먹어주는 꼴되서 일단 발령안했습니다 내정해주시고 쟁때 신나게 놀아영 - 북오더 > 최태원 | 저 금쌀1천씩 포상주세요 - 橙 > 박희수 | 알았습니더 - 橙 > 청기사 | http://store.steampowered.com/app/262150/ - 橙 > 청기사 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 橙 > 청기사 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 橙 > 청기사 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 橙 > 청기사 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 橙 > 청기사 | 개인메세지는 3초당 1건만 보낼 수 있습니다! -일기토지배자 > 갸오오 | 무력 올려야되용 - 검임 > 박일아 | 올턴 선정합니다...만 이동네 민심이 100이니 옮겨주세욧. 답변안해주셔도 됩니다 - 엄백호 > 박일아 | 저는 아이템 먹으려고 랜임만 한답니다.. - 김우민 > 갸오오 | 선약이 있어서.. 죄송합니다. - 박일아 > Anes | 사령 1턴 미루시고 하기싫은데님 왜 발령좀요~ -잠둥이션 > 박일아 | 사령턴 지침 주시면 행동하겠습니다~ - 박일아 > 잠둥이션 | 지금은 급한거 없습니다. 예턴 입력하시고 주무세요~^^ -잠둥이션 > 박일아 | 넵 기연넣고갑니다. 민심이 많이 부족한데 민심 잡는 사람 한명 구해서 돌려야할듯? -카이사르 > 니쉬 | 2턴에는 여강치는걸로 턴 변경해주세요~ 1시 12분에 적벽발령입니다 -카이사르 > DVa | 혹시 여강 공격될까요? 된다면 1시 12분에 적벽발령 보내겠습니다 - 니쉬 > 카이사르 | 완 한대 더 치면 되는 수준으로 될 줄 알았는데 아니네요. 2시에 신야로 발령 넣어주시면 감사하겠습니다아 -카이사르 > 니쉬 | 2시 12분 신야 발령 넣었어요 근데 2시 7분인가 여강치면 병력전멸당할텐데... 신야에서는 징병하는게 더 나을수도 있어요 - 니쉬 > 카이사르 | 여강 내구가 꽤 남았나보죠...? - 니쉬 > 카이사르 | 6200이면 성 못따겠는대요; -카이사르 > 니쉬 | 병력이 3-4천이상은 있어야 한방에 점령가능한수준? -카이사르 > 니쉬 | 님은 칼자국이 안없어지도록 하는게 목적이예요~ 일단 2시턴에 공격한번하고 신야로 가세요.. - 니쉬 > 카이사르 | 디바님 턴 전에 칼이 날아가나유 - 무광 > 카이사르 | 발령드릴게여 -카이사르 > 무광 | 네 -카이사르 > 니쉬 | 디바님 병력 1200 남았어요 그것도 정란으로... 장사한번 공격하면 병력 거의 없는데 여강은 못딸듯요 - 니쉬 > 카이사르 | 넵. 안그래도 방금 전 암행으로 병력 보니 그러네요. 말씀하신대로 여강 출병 넣었습니다~ -카이사르 > 무광 | 오전7시 이후로는 양양으로 발령주세요~ -카이사르 > 무광 | 아님 그떄상황보고 완 못땄으면 신야로 발령주셔도 됩니다 - 재야 > 직장인페이트 | 금쌀 평준화중입니다. 몰수 양해바랍니다. - 장임 > 을지바람 | 을지바람님! 186년 12월 개전이니 그 전에 징훈훈사사사 그 후로는 반징훈사수 4반복 부탁드려요 - 진리 > 내정달인 | 내정달인님 죄송하지만 땅따 쌀이 부족해서 쌀 2000만 들고가겠습니다. 감사합니다~ - 진리 > 천괴금 | 여남 상업 채우시고 기연부탁드립니다~ - 갸오오 > 김우민 | 네넹.. 어쩔수없죠.. 답장 감사합니다 - 박일아 > 비월 | 똑똑, 계신가요..? 혹시 접속잘안함국과 외교상황을 좀 물어봐도 될까요...? 불가침 중이신가요? - 박일아 > 잠둥이션 | 보시면 저 쌀 1천 포상좀 부탁드립니당 - 비월 > 박일아 | 네...좀 길게 되있습니다.... - 박일아 > 비월 | 네에...실례가 될수있는 질문에 답변 감사합니다 ㅠㅠ - 진리 > 니콜 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 다이스 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 비월 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 아소 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 이쓰미 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 전인호 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 진리 > 카이스트 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 진리 > 전인호 | 곧 5시가 됩니다. 이후 징병은 자제하시고 인재탐색 3턴후 내정해주세요~ - 박일아 > 갸오오 | 똑똑, 계신가요? 불가침기간 연장하고싶습니다. - 박일아 > 검임 | 선정 3턴만 하시고 성수 부탁드려요~! - 박일아 > Anes | 류화영님 교지로 발령좀 부탁드려요 ㅎㅎ - 갸오오 > 박일아 | 얼마나요? - 박일아 > 갸오오 | 현 시점부터 12년정도로 생각하고있어욥 - 박일아 > 샤그니 | 샤그니님, 혹시 선약 있으세요? 없으시다면 저희쪽으로 도움을...(3:1이라 많이 힘드네요 ㅠ.ㅠ) - 갸오오 > 박일아 | 현시점이라면 97년까지를 말씀하시는건가요? - 박일아 > 갸오오 | 네 97년까지욥 - 갸오오 > 박일아 | 흠 네 뭐... 혹시 10년은 무리인가요? - 박일아 > 갸오오 | 10년은 힘들거같은데 가능하면 12년으로 안될까요...? - 갸오오 > 박일아 | 머 그럼 어쩔수없죠 112년ㄱㄱ - 갸오오 > 박일아 | 아니 12년 - 갸오오 > 박일아 | 지금 수뇌분들은 잠수시고.. 제 사령턴 5턴까지 되있어서 그쪽에서 보내주실 수 있으세요? - 박일아 > 갸오오 | 18시 47분턴에 가는데 괜찮으신가요? - 갸오오 > 박일아 | 네 괜찮습니다 - 박일아 > 소드락 | 저.. 안녕하세요__) 혹시 외교상 문제가 없다면.. 원조를 얻을수 있을까 해서 찾아왔습니다.. -카이사르 > 니쉬 | 저녁 8-9시턴에 적벽으로 보내주세요~ 강하 마저 먹고 민심올리고있을게요 - 니쉬 > 카이사르 | 옙. 7시 신야 8시 적벽 넣어드렸습니다 - 북오더 > 최태원 | 금2천 포상주세요 - 갸오오 > 魯堂首 | 노당수님 사령 9시턴 갸오오 귀양발령 / 10시턴 갸오오 덕양발령 부탁드려요 - 갸오오 > 청기사 | 청기사님 사령 10시턴 읭읭 귀양발령 / 11시턴 읭읭 덕양발령 부탁드려요 - 비월 > 더문더문 | 헐 더문형이십니깡? - 갸오오 > 魯堂首 | 사령턴 밀어주세욥!... - 박일아 > 狂三 | 쿠루미님! 혹시 갈곳이 없으시다면.. 저희 긔엽긔로 와주실수있을까요 ? 1:3쟁중이라 한명 한명의 임관이 너무 소중합니다 ㅠㅠ - 최태원 > 북오더 | 넣었습니다 - 갸오오 > 魯堂首 | 청기사님이랑 일기토지배자님은 내정만 하신다고 하셨어요 ㅋㅋ.. 청기사님은 땅따때 한번만 해주기로 하신거고.. 남은 한분인 우리는 님에게 부탁해볼게욥! - 갸오오 > 그래도우리는 | 혹시 이번 쟁때만 집합장 해주실 수 있으시나요 ..? - 갸오오 > 일기토지배자 | 지금 계세요? -일기토지배자 > 갸오오 | 넴 - 갸오오 > 일기토지배자 | 수뇌드릴테니 자동에 수몰써주세요! -일기토지배자 > 갸오오 | ㅇㅇ - 갸오오 > 일기토지배자 | 한시 턴에 수몰되게 밀어주세요!.. - 갸오오 > 박희수 | 1시에 자동 수몰 일점사해요 버텨주세요!.. 이것이 유일한 희망!.. -카이사르 > 무광 | ㄷㄱㅎ 님 적벽에서 징병삽턴나지싶은데 징병지로 보내주세요~ - 북오더 > 감정 | 감정님 계시면 반징훈사 저 출병 넣어주세요. - 감정 > 갸오오 | 묻고싶은게잇는데 자동 성벽이 현재 얼마정도 되나요... 지금 저희 서량 성벽 55남아서 거의 망한상태입니다... 빨리좀 와주세요 ㅠㅠ - 갸오오 > 감정 | 44754 (-5136) 【자동】성벽//하하핳ㅎ 1시턴에 수몰 일점사들어가욧.. - 소드락 > 박일아 | 죄송하지만 이쪽은 사람도 적어 내정도 제대로 되지 않아 어려울거 같습니다.ㅠㅠ - 박희수 > 갸오오 | ㅠㅠㅠ - 박일아 > 샤그니 | 임관 감사합니다 ㅠㅠ 기연해주시면 감사할께요! - 박일아 > 장임 | 똑똑, 계신가요? - 박일아 > 잠둥이션 | 의병장 17,18,20,21,22 쌀 1천 포상 부탁드려요 - 박일아 > 류화영 | 류화영님! 전쟁자금관련해서 미리 몰수 진행해두겠습니다. 감사히 쓰도록 할께요 ! 내정 감사합니다 ! ^^ - 박일아 > 장임 | 안계신거같으니, 미리 갠메로 말씀드리겠습니다. 현재 저희국은 막겜국을 먼저 밀어낼수밖에 없는 상황입니다. - 박일아 > 장임 | 그렇게 되면.. 저희국도, 막겜국도 큰 피해를 입을듯 하여, 종전 및 이전에 말씀하셨던 길게 불가침을 제안해봅니다.. - 장임 > 박일아 | 이미 주변국 외교는 마친 상태기 때문에 거절하겠습니다. 죄송합니다. - くま > 고긔가먹고싶 | 무지장님 쟁이 시작되니 역시 쌀을 슬쩍 해야 할 것 같습니다... 고긔가먹고싶님의 쌀은 동물들의 양식으로 잘 사용될 것입니다! - くま > 고긔가먹고싶 | 고긔님 갠메 후 쌀 몰수 넣었습니다 ㅇ.ㅇ 재분배를... - 무광 > DVa | 이릉이랑 영안 먹어주세요~ - 북오더 > 랜임1분장 | 반징훈사 3반복이라도 넣어주세요.. - 진리 > 전인호 | 정착금지! - 진리 > 전인호 | 치안우선! - 류화영 > 박일아 | 임관하기 전에 들고있던 쌀이고.. 임관해서는 받은 쌀도 거의 없고.. 임관해달라고 하셔서 임관한건데.. 이렇게 다 몰수를.. 하시면 좀 슬프긴 슬프네요 ㅠ - 박일아 > 류화영 | 죄송합니다. 쟁 끝나면 다시 포상 드리겠습니다ㅜㅜ -카이사르 > 쿠요 | 제가 드릴게요! - 박일아 > 북오더 | 북오더님이 필요해양 ㅠㅠ 도와주세영 ! 부관님이 북오더님을 애타게 찾고계십니다. 우려와는 다르게 저의 발외교로 인해 많이 어려운 상황이 왔습니다ㅠㅠ 북오더님 도와주세영ㅠㅠ - 박일아 > 박희수 | 안녕하세요 박희수님! ㅇㅋㄹ님이신가요?ㅋㅋ; 혹시 선약이 없으시다면... 저희국에 와주실수 있을까요? 비슷한 닉네임끼리 도와주세요(...) - 박일아 > 쿠요 | 안녕하세요 쿠요님! 혹시 선약이 없으시다면.. 저희 긔엽긔에 와주실수 있을까요? 발외교로 인해 많이 힘든상황이라 쿠요님이 필요합니다.. 쿠요님이라면 긔엽긔죠 >_< - 박일아 > 랜임1분장 | 안녕하세요 랜임1분장님! 혹시 선약이 없으시다면.. 저희 긔엽긔에 와주실수 있을까요? 발외교로 인해 많이 힘든상황이라 랜임1분장님의 힘이 필요합니다.. - 비월 > 南ことり | 南ことり님! 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 박일아 > 뒷집할머니 | 할머니이이이유ㅠㅠ 몬난 손녀(?!)를 도와주세야아앙ㅠㅠ - 비월 > 橙 | 橙 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 박일아 > 리안 | 리안님, 이번엔 빼박입니다. 도와주세여! ㅋㅋㅋㅋ 내정만 해주셔도 됩니다 ㅋㅋ - 박일아 > 최태원 | 안녕하세요 최태원님! 혹시 선약이 없으시다면.. 저희 긔엽긔에 와주실수 있을까요? 발외교로 인해 많이 힘든상황이라 최태원님의 힘이 필요합니다.. - 박일아 > 임사영 | 안녕하세요 임사영님, 지장이 많이 부족하여 전쟁에 어려움을 겪고 있습니다. 후한 대접을 해드릴테니, 긔엽긔에 와주실수 있을까요? 저희를 도와주세요 ㅠ.ㅠ - 비월 > 감정 | 감정님 어디서 많이 뵈었고 여러깃수를 같이 했지만 한나라의 군주로서 겐메를 보내는건 첨인듯 하네요 ^^;; 혹시 선약이 없다면 초보군주와 함께 하시는건 어떠신지요? - 박일아 > 쿠요 | 등용장도 드리겠습니다 >< - 박일아 > 네시 | 안녕하세요 네시님, 지장이 많이 부족하여 전쟁에 어려움을 겪고 있습니다. 후한 대접을 해드릴테니, 긔엽긔에 와주실수 있을까요? 저희를 도와주세요 ㅠ.ㅠ - 비월 > 네시 | 네시형 일리나예영~ 선약이 없다면 나와 같이!! 초보군주와 같이!!!함께.....합시다...!!!! - 박희수 > 박일아 | 아키라아닙니다 ㅋㅋㅋㅋㅋㅋㅋㅋ 꺄르르르륵 코스프레 성공했따 - 박일아 > 南ことり | 안녕하세요 코토리님, 지장이 많이 부족하여 전쟁에 어려움을 겪고 있습니다. 후한 대접을 해드릴테니, 긔엽긔에 와주실수 있을까요? 저희를 도와주세요 ㅠ.ㅠ - 비월 > 뒷집할머니 | 뒷집할머니님 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 박일아 > 미친과학 | 안녕하세요 미과님! 지장이 많이 부족하여 전쟁에 어려움을 겪고 있습니다. 후한 대접을 해드릴테니, 긔엽긔에 와주실수 있을까요? 저희를 도와주세요 ㅠ.ㅠ - 박일아 > 감정 | 안녕하세요 감정님! 혹시 선약이 없으시다면.. 저희 긔엽긔에 와주실수 있을까요? 발외교로 인해 많이 힘든상황이라 감정님의 힘이 필요합니다.. - 비월 > 랜임1분장 | 랜임1분장님 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 닉과 같이 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 박일아 > 감정 | 아마도 다굴쟁에서 뚫어내는 형태라 충차의 출병이 많을듯합니다. 저희를 도와주세요 ! - 비월 > 리안 | 리안님, 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 박일아 > 橙 | 안녕하세요 첸님(첸이라고 읽는거 맞나요?)! 혹시 선약이 없으시다면.. 저희 긔엽긔에 와주실수 있을까요? 발외교로 인해 많이 힘든상황이라 첸님의 힘이 필요합니다.. - 박일아 > 橙 | 아마도 다굴쟁에서 뚫어내는 형태라 충차의 출병이 많을듯합니다. 저희를 도와주세요 ! - 비월 > 미친과학 | 미과님! 오랜만입니다 ㅎㅎ 기억하실지 모르겠지만 저 일리나입니다 요번에 아주 오랜만에 두번째 건국을 했는데 초보군주와 같이 이번깃수를 해나가시는건 어떠신지요? - 비월 > 박희수 | 박희수님 종횡무진과의 전쟁에서 수고하셧습니다. 초보군주를 도와 이번깃수를 같이 해나갈 생각은 없으신지요? - 비월 > 북오더 | 북오더님 종횡무진과의 전쟁에서 고생 많으셧습니다. 기억하실지는 모르겠지만 저 일리나입니다. 초보군주와 같이 이번깃수 같이하는건 어떠신지요? - 비월 > 임사영 | 사영형! 일리나입니다! 종횡무진과의 전쟁에서 고생했습니다! 이번에 건국했는데 초보라 너무 힘든데 선약이 없다면 도와주십시오. - 비월 > 최태원 | 최태원님 종횡무진과의 전쟁에서 수고하셧습니다. 혹시 선약이 없다면 랜임도 좋지만 저희국에 와서 초보군주와 같이 이번깃수를 이어나가는건 어떠신가요? - 비월 > 쿠요 | 쿠요님 종횡무진과의 전쟁에서 고생 많으셧습니다. 55기때 랜임으로 관자를 들고 오셧는데 이번깃수도 같이 했으면 좋겠네요. -카이사르 > 쿠요 | 1시 12분에 갑니다~ 훌륭하신 휏신님을 모십니다! ㅎㅎ - 박일아 > 쿠요 | 47분턴에 날아가긴 할건데.. 혹시 그 전 턴이신가요? ㅠㅠ -랜임1분장 > 비월 | 국채 - 쿠요 > 박일아 | 44 ㅠㅠ - 비월 > 랜임1분장 | 국채는 #일리나이지만 저 혼자입니다...ㅠㅠ - 희지재 > 박희수 | kbo 최고 좌완을 영입하고싶습니다! 당신의 바키투심은 저희에게 큰 도움이 될겁니다! -잠둥이션 > 쿠요 | 안녕하십니까. 서촉에서 학문을 닦고 있는 너구리 신선이니다. 귀국은 쿠요님을 진심으로 영입하고 싶나이다. - 박일아 > 잠둥이션 | 션님 1턴 요양하시고, 사령턴 박일아, SARS, Anes 쌀 1천씩 포상해주세요 ㅎㅎ - 박일아 > 잠둥이션 | 사스 쌀은 들어가있네요 사스빼고 주세요 ㅎㅎ - 박일아 > Anes | 보시면 감정님 쌀을 먼저 주실수있나요? -잠둥이션 > 박일아 | 2시턴 이전에 꼭 넣겠습니다. 지금 뭐 하고 있어서. 걱정 마세용 - KAITO > 미친과학 | 넥센????? - Anes > 박일아 | 보는게 늦었네요 죄송 - SARS > 잠둥이션 | 사스 금 2천 주셔야해요 1턴에 - 읭읭 > 하루카 | ●임관 금지중입니다. 등용 수락 불가. - 진리 > 천괴금 | 기술연구부탁드립니다~ - 비월 > 갸오오 | 갸오오님 고생하셧습니다 남은 깃수는 초보군주를 도와주시는건 어떠신지요?? - 비월 > Navy마초 | 마초님 안녕하세요? 오랫동안 뵜었는데 겐메 드리는건 첨인거 같네요 ㅎㅎ 저 일리나인데 기억하실지는 모르겟습니다. 혹시 선약이 없다면 저희국에 와서 도와주셨으면 합니다. - 갸오오 > 비월 | 갠메 보내 주셨는데 죄송해요, 장임님께서 먼저 선수를 치셔서.. 에엥 근데 초보라뇻 고대휏ㅅ.... - 비월 > 갸오오 | 저 군주는 거의 첨입니다만 ㅎㅎ;;;;;;; 선약이었다면 어쩔수 없죠 ㅎㅎ - 청기사 > 갸오오 | 어케 안거야... 것보다 누구임ㅋㅋㅋ - 갸오오 > 장임 | 30분뒤 도착예정 - 비월 > 진리 | 저 잠시 눈좀 붙임... 막겜국 망하면 전화주세요 010 5031 3966 - 누렁 > 박일아 | 왠 임금? -그만좀불러좀 > 검임 | 접속하시면 병력뽑고 수비해주시거나 출병해주세요~ - 박일아 > 누렁 | 임금 아닌데욧! 저희 긔엽긔입니다 ㅋ - 박일아 > 갸오오 | 경찰서씬 찍고싶지 않으면 빨리 긔엽긔로 임관해주세요 >_< - 박일아 > 야근탈출 | 안녕하세요, 야근탈출님! 전쟁 고생 많으셨습니다. 혹시 선약이 없으시다면, 긔엽긔국에서 야근탈출님을 모시고 싶습니다! 1:3쟁을 수행중인지라 한분 한분의 임관이 너무나 소중합니다 - 박일아 > 야근탈출 | 절 믿고 임관해주신다면..즐겁게 쟁 하실 수 있는 환경을 만들 수 있도록 노력하겠습니다 ! - 박일아 > 읭읭 | 읭읭님! 안녕하세양! 전쟁 고생하셨어양! 혹시 선약이 없으시다면, 읭읭님을 우리국으로 모시고싶어양. 1:3쟁을 수행중인데 읭읭님의 죽창이 필요합니당! - 박일아 > Navy마초 | 안녕하세요! 두번째 갠메네욥. 전쟁 고생 많으셨습니다! 이번엔 혹시 긔엽긔를 선택해주시지 않겠어욥?+_+ 지루하지 않게 연쟁할계획입니다! - 박일아 > 청기사 | 안녕하세요 청기사님! 전쟁 고생 많으셨습니다. 혹시 선약이 없으시다면, 긔엽긔국에서 청기사님을 모시고 싶습니다! 1:3쟁을 수행중인지라 한분 한분의 임관이 너무나 소중합니다. - 박일아 > 청기사 | 절 믿고 임관해주신다면..즐겁게 쟁 하실 수 있는 환경을 만들 수 있도록 노력하겠습니다 ! - 갸오오 > 박일아 | 예..? 늦었... - 박일아 > 그래도우리는 | 안녕하세요 그래도우리는님! 전쟁 고생 많으셨습니다. 혹시 선약이 없으시다면, 긔엽긔국에서 그래도우리는님을 모시고 싶습니다! - 박일아 > 그래도우리는 | 1:3쟁을 수행중인지라 한분 한분의 임관이 너무나 소중합니다. 절 믿고 임관해주신다면..즐겁게 쟁 하실 수 있는 환경을 만들 수 있도록 노력하겠습니다 ! - 박일아 > 갸오오 | 으익...그럼 다음기회에... - 갸오오 > 박일아 | 30분턴이라 어쩔수가.. - 갸오오 > 박일아 | 죄송합니다! - 박일아 > 갸오오 | 외근다녀와서 늦었어욥 ㅎㅎ 다음에 또 찾아뵐게욥..그땐 받아주셔욥 >< - 박일아 > 비월 | 똑똑 계십니까 ? 불가침을 4~6년정도 연장하고싶은데욧...!! - 갸오오 > 청기사 | 잠입을 충실하게 하기 위해 깃수 끝나갈 쯤 해서 공개 하겠습니다. - 누렁 > 박일아 | 그러넹 ㅋㅋㅋㅋ 등용장하나만 날려줘용 같은 핑크색이라 몰랐어요 - 박일아 > 잠둥이션 | 션님 사령 1턴미루시고 1턴에 박일아 쌀 9천 '몰수'욧! - 청기사 > 갸오오 | -ㅅ-;;; - 청기사 > 박일아 | 죄송합니다. 랜임을 해서여... - 비월 > 박일아 | 이왕 쓰시는거 더쓰시죠?ㅋㅋㅋ - 박일아 > 비월 | 어느정도 생각하고계세요? - 비월 > 박일아 | 생각해보니 4~6년이 젤 낫겠네요...5년 어떠세요? - 박일아 > 비월 | 넵 저희도 딱 적당합니다ㅎㅎ 저희 쟁중이라서.. 혹시 보내주실수있나욥? - 비월 > 박일아 | 네 저희가 보낼수 있는데 이거 몇년으로 보내야 하죠? 5년으로 보내면 안되는거죠? - 박일아 > 비월 | 11년으로 보내주시면되욧! 옵션은 쓰여진 옵션대로 써주시면됩니닷ㅎㅎ 아참 이건 별개..인데 혹시 원조가 가능할지 여쭙고 싶습니닷! - 비월 > 박일아 | 원조는.... 저희도 금/쌀이 너무 딸려서 힘들거 같네요 죄송합니다ㅠㅠ - 비월 > 박일아 | 5시 11분에 갑니닷! - 비월 > 박일아 | 5시래...7시.... 정정하겠습니다..... - 박일아 > 누렁 | 누렁님~ 장사출 해주세요 ㅋ - KAITO > Navy마초 | 저희 나라는 220년 넘게 오래 기수를 가는 것이 목표입니다 ㅠㅠ 원사이드가 싫은 분들 오세요~ - KAITO > 네시 | 저희 나라는 220년 넘게 오래 기수를 가는 것이 목표입니다 ㅠㅠ 원사이드가 싫은 분들 오세요~ - KAITO > 뒷집할머니 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > 리안 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > 야근탈출 | 저희 나라는 220년 넘게 오래 기수를 가는 것이 목표입니다 ㅠㅠ 원사이드가 싫은 분들 오세요~ - KAITO > 최태원 | 저희 나라는 220년 넘게 오래 기수를 가는 것이 목표입니다 ㅠㅠ 원사이드가 싫은 분들 오세요~ - KAITO > 피곤한조자룡 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 장임 > 갸오오 | 요번턴 금3천 포상점 - 박일아 > Anes | Anes님 1턴 미루시고 1턴에 의병장21 영릉발령주세요~ -더문더문 > 비월 | 그런 착한사람 모릅니다(?) - 박일아 > Anes | 해당 오더는 다른수뇌에게 맡겼어요! - 비월 > 더문더문 | 형 나 일리나임 ㅋㅋ - 하루카 > 읭읭 | 앗..미안해요..랜덤임관 하는 분들이 무능한 군주 밑으로 와서 고생하지 말라고 걸어둔 임금인데..읭읭님 턴을 낭비시켜버렸네요..부족한 국가로 와주려고 해주셔서 감사하고 죄송합니다 - 박일아 > 장임 | 장임님, 쟁 고생 많으셨습니다.. 마지막삼모전으로 생각하시는거 같은데 참 아쉽습니다.. 설령 저희국으로 임관하지 않으시더라도, 재밌는 삼모전 하셨으면 좋겠습니다. - 박일아 > 장임 | 그래도 전 장임님이랑 같이 하고싶네요 ㅎㅎ 혹시라도 같이하실 생각이 있으시다면..긔엽긔로 임관해주신다면 정말 감사하겠습니다 ! - 박일아 > 박희수 | 으앙 아키라님이 아니라니, 누구신가여! ㅋㅋㅋ 개인적으로 SK 팬입니다만.. 요즘들어 자꾸 FA를 빼앗겨서 아쉽습니다 ㅠㅠ(사실 이게 다 김성근 감독님때문이긴 한거같습니다 ㅎㅎ) - 박일아 > 박희수 | 혹여라도 같은국가에서 플레이 하지 않더라도, SK팬이신거같은데(맞나요?) 즐거운삼모전 하셨으면 좋겠습니다! (꼭 같은 국가에서 하고싶어요...) - 박일아 > 을지바람 | 안녕하세요! 쟁 수고 많으셨습니다 ㅎㅎ 이제 곧바로 연쟁과 다굴쟁에 돌입하는 긔엽긔에서 내정&전쟁을 함께 하시지 않으실래요?ㅎㅎ 긔엽긔는 언제나 을지바람님을 환영합니다 ! - 박일아 > 갸오오 | 에에엣...부관님이 로비님을 보고싶어하세욧!! 아재라고 안놀릴테니.. 같이 삼모전해욧 +__+// - 박일아 > 진 | 진님! 쟁 수고 많으셨습니다. 이제 곧바로 연쟁과 다굴쟁에 돌입하는 긔엽긔에서 내정&전쟁을 함께 하시지 않으실래요?ㅎㅎ 긔엽긔는 언제나 진님을 환영합니다 ! - 비월 > 橙 | 橙님 고생하셧습니다 남은깃수 저희국과 함께 라면 어떠신지요? - 박일아 > 橙 | 첸님 안녕하세욧! (이렇게 읽는거 맞죠...?) 긔엽긔에선.. 첸님을 모시고싶습니다. 아마 다굴쟁이지만 공격을 중점적으로 할 계획이기때문에 충차출병의 기회가 많을거라고 생각합니다 - 박일아 > 최태원 | 안녕하세요 아키라님! 혹시 선약이 없으시다면 저희국좀 도와주세요! +_+ 닉네임도 비슷한 사람끼리 돕고 삽시다 +__+// 랜임템도 한혈마로 받으셨고, 함께해요 우리 +_+ - 비월 > 갸오오 | 갸오오님 고생하셧습니다! 이번에야말로 데리고 가고 싶습니다!! - 비월 > 박희수 | 박희수님 긔엽긔국과의 쟁 고생많으셧습니다 남은깃수는 초보인 저와 같이 하는건 어떠신지요? - 비월 > 장임 | 막겜국 군주님 고생하셧어요! 이번엔 제가 건국을 한번 해봣는데 와서 도와주실수 있습니까? - 비월 > 최태원 | 한혈마를 드신 최태원님 고생 많으셧습니다! 유닉을 들고 유닉국! 블소국으로 오셔서 초보군주를 도와주시는건 어떠신지요? -카이사르 > 선비 | 선비님 1분후에 강릉발령이니까 (강릉으로 부대도 빠집니다.) 영릉출 취소하고 장사출 해주세요 - 갸오오 > 비월 | http://puu.sh/mAbNL/01cd49f3b8.png // 1분 차이 죄송합니다 (..) 다음엔 1 순위로!... - 비월 > 갸오오 | 럴수가.... - Navy마초 > KAITO | 곧 찾아뵙죠 후후 - Navy마초 > 박일아 | 두번이나 갠메 주셨는데 아쉽네요. 다음번에 기회가 된다면 꼭 찾아가겠습니다.(__) - 박일아 > Navy마초 | 넵! 다음기회에도 다시 도전해보겠습니다 ㅎㅎㅎ - Navy마초 > 비월 | 안녕하세요 비월님. 갠메 감사합니다만, 다음기회에 뵙겠습니다. 아마 가까운 미래일지도. 후후... - 비월 > Navy마초 | 네 알겠습니다 아쉽네요 ㅎ - Navy마초 > 박일아 | 다음은 삼고초려네요. 본닉이세요? 제가 보고 찾아갈게요ㅋㅋ 전 '좋지, 좋아~'를 남발하는 떠돌이같은 존재라 - 박일아 > Navy마초 | 음 본닉은 irc닉 혜리 쓰고있는데, 삼모전은 박일아로 몇깃수째 하고있으니 이 또한 본닉이 맞습니다 ㅎㅎ 사실 복귀한지 15깃수 쯤 되는 뉴비예욧! - Navy마초 > 박일아 | 전 아얄엔 복귀조차 않은걸요 ㅎㅎ. 저도 공백기가 상당해 늅늅입니다. 앞으로 잘 부탁드릴게요 ^^ -카이사르 > 니쉬 | 1턴에 바로 모병하세요... 니쉬님 기연안헤도 1등급 되겠네요 - 니쉬 > 장임 | 장임님 오실 생각 있으신가요오?! - 쿠요 > 橙 | 여기요 여기 ! - 감정 > 橙 | 여기로오세요! - 니쉬 > 장임 | 오시면 등갑등갑을 이끌고 다시 긔엽긔국 분들과 엔조이 하실 수 있어요! - 장임 > 니쉬 | ㅇㅇ곧감 -카이사르 > 니쉬 | 1등급됐어요~ - 니쉬 > 카이사르 | 시간 맞춰 챙겨주시다니 센스쟁이~ -카이사르 > 선비 | 1등급 되었으니 신귀병 뽑으시면 됩니다. -카이사르 > HideD | 1등급 되었으니 신귀병 뽑으시면 됩니다. - 니쉬 > 장임 | 우와아~ 굳. 환영합니다 - 박일아 > 橙 | 많이 힘든상황입니다 ㅠ.ㅠ 도와주세요 - 박일아 > 잠둥이션 | 일단 재모병은 잠시 빼주세욥 강릉만 딸껍니다 - 박일아 > 검임 | 전쟁자금으로 금 몰수좀 해갈께요! 감사히 쓰도록 하겠습니다 >< - 박일아 > 잠둥이션 | 검임님 금 1천 몰수 넣어주세욧 - 검임 > 박일아 | 예압 ㅠ - 검임 > 그만좀불러좀 | 군주님과 계약맺었던게 있어서 전쟁없이 성벽만수리합니닷 -카이사르 > 니쉬 | 국가채널에 글 적은거 봐주세요~ - KAITO > Navy마초 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > くま | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 고긔가먹고싶 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 러스티건 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 미친과학 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 바닥을탁치고 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > 바쁘다바빠 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 엄백호 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 운록이 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 정휘인 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 제갈여포 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 코토와르 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - KAITO > 바닥을탁치고 | 부대 탑승해주시고 내일 오전 8시까지 풀병력 준비해주세요!! - 북오더 > 비월 | Aㅏ... 부관님을 담보로 선약이 ㅠㅠ - 박일아 > 갸오오 | 사령 하나 부탁드려도 될까요? - 갸오오 > 박일아 | 늦었당.. - 갸오오 > 박일아 | 다시 수업들으러 이만.. - 박일아 > 잠둥이션 | 저 금쌀 2천씩 포상좀 부탁드려요 -카이사르 > 장임 | 남해 먹혔으니 등갑 징병하면 삽턴납니다. - 비월 > 내정달인 | 내정달인님 슬슬 쟁준비를 해야할거 같아서 금쌀 몰수 조금씩만 하겠습니다~ 양해 부탁드려요~ - 비월 > 천괴금 | 천괴금님 슬슬 쟁준비를 해야할거 같아서 쌀 몰수 조금만 하겠습니다~ 양해부타드립니다~ -내정달인 > 비월 | 언제든지 가져 가세요.~~ -내정달인 > 비월 | 언제든지 가져 가세요.~~ -카이사르 > KAITO | 없습니다. - KAITO > 카이사르 | 감사합니다 ㅎㅎ - 천괴금 > 비월 | 쌀 안쓰니까 전부 가져가셔도 되요 금 500정도만 남겨두면 될듯요 - 북오더 > 박일아 | 기왕 포상주는거 3,4천 팍팍 주시죠. 어차피 새벽1,2시까진 접속 보장임. - SARS > 박희수 | 그래도우리는, 샤그니 쌀 1만 몰수해주세요~ - 박일아 > 橙 | 수비 꺼주세욧! - 박일아 > 잠둥이션 | 저 금 1천 부탁드려요 -더문더문 > 비월 | ㅋㅋㅋ 요즘머함 - 비월 > 더문더문 | 나야뭐 학교 휴학하고 복학해서 8월달 까지 학교 ㅋㅋㅋㅋㅋㅋㅋ - 비월 > 진리 | 낙양 먹으면 낙양에서 성/수 올리는게 더 좋지 않나요? - 진리 > 비월 | 올리면 좋기야 하지만 주민도 10만일텐데 - 진리 > 비월 | 쌓으면 그냥 고기방패 - 진리 > 비월 | 뭐 어차피 무장이제 할것도 없으니 채워도 되긴할듯 - 박일아 > 잠둥이션 | 최태원 쌀 1천 몰수욧 - 박일아 > 검임 | 똑똑, 잘생긴 검임님! 혹시 부대한개만 파주실수 있을까요? 후방징병부대로 사용하고싶어요 >< - 비월 > 랜임1분장 | 부대타주세요 치안강화 옮깁니다~~~ 무장분들이 너무 많아서 한명씩 보내기 어렵습니다. - 비월 > 읭읭 | 부대타주세요 치안강화 옮깁니다~~~ 무장분들이 너무 많아서 한명씩 보내기 어렵습니다. - 비월 > 일기토지배자 | 부대타주세요 치안강화 옮깁니다~~~ 무장분들이 너무 많아서 한명씩 보내기 어렵습니다. - 비월 > 다이스 | 부대타주세요 치안강화 옮깁니다~~~ 무장분들이 너무 많아서 한명씩 보내기 어렵습니다. - 비월 > 진리 | 진리님 치안보다 성/수가더 낫지 않을까요? - Navy마초 > 바닥을탁치고 | 저 발령 빼주시면 감사요! 이번타임에 계양장사만 정리하고 부대탈게요. - Navy마초 > 바닥을탁치고 | 교지가 더 중하면 답신주세요. 턴 수정할게요. - Navy마초 > 바닥을탁치고 | 는 올턴집합부대가 아니었군요 죄송 헤헤 -바닥을탁치고 > Navy마초 | 9시 턴에 발령 넣어드렸습니다 ㅎㅎ 교지 15000남아서 모훈사 한번더 필요할거에요 - Navy마초 > 바닥을탁치고 | 넵 감사합니다 - 니쉬 > ㄷㄱㅎㅈㄷㅀ | 삭턴 진행 중이시고, 국고가 부족하여 부득이하게 금쌀 좀 몰수 좀 하겠습니다. -바닥을탁치고 > Navy마초 | 아 착오로 9시 후방 10시 남해로 바꿨습니다 ㅎㅎ - Navy마초 > 바닥을탁치고 | 어어, 계속 계양장사에 있을거라 후방 발령은 괜찮을듯 합니다 ㅎㅎ - 북오더 > 박희수 | 수비켜시고 반징훈사 하세요.. - 검임 > 박일아 | 늦게봤네요. 14시 16분 이후부터 집합걸어둘테니 적당한곳으로 발령 부탁드립니당 -카이사르 > DVa | 적벽 먹어두세요~ - 박일아 > 최태원 | 삭턴이 길어지고 계십니다.. 일단 쌀이 너무 급하여 전액 몰수해두겠습니다. 돌아오시면 성수하시면서 포상요청하시면 바로 드리겠습니닷! - 소드락 > 하루카 | 이제 살려주면 안되나요? 낙양 털고 싶은데 헤헤 - 하루카 > 소드락 | 으음; 그렇지만 저희랑 종전하면 블소 밀리면 가둬지게 되실텐데요.. - 하루카 > 소드락 | 가둬지지 않게 배려해드린다고 해도 낙양-호로정도를 제외하면 양보하기가 좀 힘들어서요.. - 소드락 > 하루카 | 괜찮아요 블소 망하면 방랑 탈게요 미련은 없습니다 - 하루카 > 소드락 | 으음..국가 안에서 상의 해보고 답변드리겠습니다..제가 좀 결정권이 없어서.. - 하루카 > 소드락 | 12시 4분쯤 종전서신 보내드리겠습니다. 저희는 장안, 남피, 북평 먹고 블소 쟁 준비하겠습니다. 낙양에 많은 탈취를 부탁드려요! - 하루카 > 소드락 | 더해서 32분쯤 불가침 서신도 보내겠습니다. - 진리 > 니콜 | 포-상-돌-려-주-십-셔 - Navy마초 > KAITO | 네 혹시 급히 필요하실때 hongdado 톡 주시면 감사용 -카이사르 > HideD | 전선이 왔다갔다하고 있습니다.. 예턴출병을 할 시 접률이 낮으면 삽턴날 수 있으니 가급적 무장은 성수또는 정장, 지장은 농상 예턴해주시기 바랍니다. -카이사르 > 선비 | 전선이 왔다갔다하고 있습니다.. 예턴출병을 할 시 접률이 낮으면 삽턴날 수 있으니 가급적 무장은 성수또는 정장, 지장은 농상 예턴해주시기 바랍니다. -카이사르 > DVa | 전선이 왔다갔다하고 있습니다.. 예턴출병을 할 시 접률이 낮으면 삽턴날 수 있으니 가급적 무장은 성수또는 정장, 지장은 농상 예턴해주시기 바랍니다. - 진리 > 일기토지배자 | 탈취원하면 말하셈 북평하면 될듯 - 박일아 > 정력왕 | 훈사하세욥~ - 장임 > DVa | 접하시면 적벽 ㄱㄱ -카이사르 > 니쉬 | 국채봐주세요~ - 니쉬 > 카이사르 | 예써. - 박일아 > 비월 | 저.. 다시 한번 여쭤보려고 갠메 해봅니다.. 혹시 원조 가능할까욥... - 박일아 > 하루카 | 저.. 혹시 원조 가능할까욥... - 북오더 > 비월 | 비월님 원조건으로 아얄에서 만날 수 있을까요? - 북오더 > 진리 | 진리님 외교건으로 컨택할 수 있을까요? - 진리 > 북오더 | 넹 - 진리 > 북오더 | 근데 아얄이 안되여 - 하루카 > 박일아 | 에..잠시만요 다른 분들 이야기 좀 들어보고.. - 북오더 > 진리 | 원조 가능하면 받고싶은데.. 그대신 그쪽 요청사항을 들어야해서요.. -잠둥이션 > 박일아 | 모병해도됨? - 쥬비아 > 소드락 | 안녕하세요.. 현재 우리 나라의 외교가 저와맞지않아 부득이하게비재야망명을 가게되었습니다. 가서 절대 이국에 불이득되는 정보는 누설치아니할테니 그부분은 염려안하셔도되요. 죄송합니다 - 진리 > 북오더 | 킁 좀 일찍오지 돚거랑 귀모가 열심히 털어서 국고를 비웠음.. - 박일아 > 쥬비아 | 쥬비아님, 혹시 저희국에도 기회가 있을까요? - 박일아 > 잠둥이션 | 안됩니다. -잠둥이션 > 박일아 | 넵 병력이 너무 적어서 교지 성벽맞길레 여쭤봤어요. 병력갖춰지면 교지 수비 갈께요 - 쥬비아 > 박일아 | 블소에서 컨택이먼져와서ㅜㅜ 2대1전쟁이시지만 유리하다고보구ㅜㅜ담기회에ㅜㅜ 건승하셔용! - 박일아 > 쥬비아 | 전혀 유리하지 않아요..곧 망할거같은데..알겠습니다 ㅠㅠ - 쥬비아 > 박일아 | 정정하겠습니다.. 일분장이다보니.. 유리하진않네요.... 화이팅..... - 박일아 > 무광 | 똑똑, 계십니까 ? 전쟁 관련해서 잠시 드릴말씀이 있어서 갠메 해봅니다. - 박일아 > KAITO | 똑똑, 계십니까 ? 전쟁 관련해서 잠시 드릴말씀이 있어서 갠메 해봅니다. - 청기사 > 쥬비아 | 쥬비아 멜군인데, 전메 말 가려서 하셈 지금 눈에 뵈이는거 없는 애들한테 그런 말 툭 던지면 불 더 잘 타게 지피는 수준임 - 쥬비아 > 청기사 | 나도 위성국이라보고 비재야망명가는입장인데 재밌다는 전메로빡도면 사람인성아닌거아닌가 삼모원투데이도아니고 -바닥을탁치고 > くま | 쿠마님 시상 쳐보시는게 좋을거같아요 ㅎㅎ - 무광 > 박일아 | 무슨 일이시졉? - 박일아 > 무광 | 으음 IRC에서 혹시 대화 가능할까요? - 청기사 > 쥬비아 | 지금 뭔 상황인지는 처음부터 못봐서 그런데, 아얄 접속되면 설명 가능함? - 청기사 > 쥬비아 | 그 나라 위성국임?? - KAITO > 박일아 | 옙 말씀하세요 - 박일아 > KAITO | 혹시 IRC에서 대화 가능할까요? - 쥬비아 > 청기사 | 나도 3시에 일어나서ㅌㅌ 롤중이라 아얄은안되고 종횡이랑싸우고있었는데 우리군주가 종횡에 종전요청했는데 첨에 안된댓다가 선포받고 종전받아들인듯함 - 청기사 > 쥬비아 | ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 뭐하는거냐 대체 - 쥬비아 > 청기사 | 여기까진 별문제없는데 그뒤에 오간국메에서 탈취비없으면 원조주겠다이런거봐서 위성국이라판단후 망명대기중 - 무광 > 박일아 | 어디채널로가면 되나요? - 하루카 > 박일아 | 으음..원조 얼마정도 필요하신가요? - 청기사 > 쥬비아 | ???????//// 미친 - 쥬비아 > 청기사 | 사실 서로 살려고 하다보니 이런일이일어난거같음 - 박일아 > 무광 | #임시외교채널 로 와주세욥 - 박일아 > KAITO | #임시외교채널 로 와주세욥 - 청기사 > 쥬비아 | --... 게임 참 잘 굴러간다 -제갈여포 > 정휘인 | 혹시 계시면 어번턴 저 남해 발령좀 부탁드려요 - 쥬비아 > 청기사 | 일분장이라 뭐 방관자모드지만 전쟁후 종전 계략금지원은 누가봐도 이상하기에ㅋㅋㅋㅋ - 청기사 > 쥬비아 | ㅋㅋㅋ 몰것다 나도 어차피 1분장이라 로마토탈워나 하러가야겠다 - 박일아 > 하루카 | ..저희야 당연히 많을수록 좋죠...ㅋㅋㅋ - 하루카 > 박일아 | 으응..그..저희가 외교제한이라는게 걸려있다고 당장은 안되는데, 20턴 정도 있어야할것같아요.. - 박일아 > 하루카 | 혹시 금액은 어디까지 가능하세요? - 박일아 > 류화영 | 류화영님! 혹시.. 성수나 농상으로 턴 전환 가능할까요..? 성수가 좀더 좋아요 +_+ - 박일아 > 그래도우리는 | 그래도우리는님! 혹시.. 성수나 농상으로 턴 전환 가능할까요..? 성수가 좀더 좋아요 +_+ - 무광 > DVa | 계양 비었어요 첩보해서 보이니깐 확인한번하시고 고고 - 하루카 > 박일아 | 으음..저희도 곧 쟁이라 정확한 금액은 잘 모르겠어요..한 2/2정도까진 괜찮다고 하시는데.. - 쥬비아 > 청기사 | 님 등용장좀 보내주세요 님이랑 갠메하느라 진리님꺼날아감;; - 박일아 > 하루카 | 원하시는 조건을 + 해서 조금 더 얻을수는 없을까요 ... ? - 하루카 > 박일아 | 으음..저희가 긔엽긔에 받을 수 있는게 마땅히 없는것같아서.. - 박일아 > 하루카 | 혹시 4/4로 가능하다면.. 승전시, 영안,이릉,강릉,상용,완을 추가로 드리고, 패전시 저와 귀모충차장(SARS) + 데려갈 장수들을 조금 더 동원해서 임관토록 하겠습니다. - 하루카 > 박일아 | 좋은 장수분들이지만 부덕한 군주 밑에서 고통받으실까봐 안될거같아요.. 그렇지만 마음은 정말 감사합니다! 금액은 최대한 맞춰서 보낼 수 있도록 노력해볼께요.. - 박일아 > 하루카 | 감사합니다 ㅠㅠ... - 하루카 > 박일아 | 몇몇 분들이 천통해도 될 분이라고 돈 보내라고 막 협박을..; 20턴 후에 최대한 요구사항에 맞게 보내겠습니다만..조금 부족해도 이해해주세요~ - 박일아 > 하루카 | 말씀 감사합니다.. 정말 열심히 싸워보겠습니다... -카이사르 > 장임 | 저 훈사중인데 무릉발령보다는 쌀부터 주시는게 좋지않을까요? - 정휘인 > Navy마초 | 마초님 이거 보시면 바닥님 후방발령턴 넣어주세요~ 포상턴 제가 넣었어요! - 소드락 > 쥬비아 | 아뇨 괜찮요. 사실 저도 망하면 블소 갈까 했는데 살려줘서... 못한 탈취나 하렵니다 ㅋ - 쥬비아 > 소드락 | 저도 무장이였으면 탈취나갈겼을텐데 ㅜㅜ 즐거운탈취되시길ㅜㅜ - 니쉬 > 장임 | 부대.. - 비월 > 魯堂首 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 狂三 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 읭읭 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 랜임1분장 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 전인호 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 다이스 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ - 비월 > 쥬비아 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 깡귀병 버리시고 상위병종을 뽑아주세요~ - 비월 > 카이스트 | 기술 3등급 찍었습니다~ 상위병종 징병이 가능합니다~ 보시고 상위병종을 뽑아주세요~ 예턴 맞춰주시고 징병턴 넣어주세요~ - 비월 > 쥬비아 | 소집해제 할필요 없이 그냥 징병하면 됩니다~~~~ - 장임 > 카이사르 | 스핀발령으로 남만보냈으니 교지출 ㄱㄱㄱ // 그리고 저 1시턴에 남만발령해주세요 - 북오더 > 니쉬 | 보컬국이랑 선포한거 땅따인가요? 쟁인가요? - 니쉬 > 북오더 | 제가 외교를 보질 못한지라 뭐라 드릴 말씀이 ; - ; - 북오더 > 니쉬 | 그럼 땅따라 생각하고 그쪽 임관 안해야겠네요..ㅇㅅㅇ;; - 니쉬 > 북오더 | 아뇨아뇨 오늘은 제가 접 자체를 모바로만 해서 무슨 외교가 있는지를 모른다는 말이었어요. - 북오더 > 니쉬 | 알겠습니당 -바닥을탁치고 > KAITO | 군주님 irc는 안하세요? - KAITO > 바닥을탁치고 | 하는데 요즘 아얄 잘 안되지 않나요? -바닥을탁치고 > KAITO | 계속 열어 놓으시는거면 아이디 알려주세요 급할때 연락드리겠슴다 ㅋㅋ - KAITO > 바닥을탁치고 | hanirc Nana^ 입니다~ -바닥을탁치고 > KAITO | 넵 저는 코삭입니다 자주있진않아요ㅜ - SARS > 하루카 | 임금 계속 유지하실건가요...? - 정휘인 > くま | 전방발령턴좀 부탁드릴게요!!!!!! - 정휘인 > 코토와르 | 꼰대님 쌀포상좀요!!!!!! - 정휘인 > 코토와르 | 쿠마님 전방발령도 부탁드리겠습니다ㅠㅠ - 비월 > 쥬비아 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 비월 > 魯堂首 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 비월 > 카이스트 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 비월 > 다이스 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 비월 > 랜임1분장 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 비월 > 전인호 | 12시턴에 부대 해체되고 12시59분부터 새로운 부대운용하게 됩니다. 번거로우시겠지만 12시전에 부대 갈아타 주세요~ - 하루카 > 평민킬러 | 킬러님 1턴 업출병요 아얄좀 와주세요 - 하루카 > SARS | ㅠㅠ 원조 5턴 후에 보내드릴께요 힘내세요.. - 니콜 > 南ことり | 저 쌀 증여좀 부탁드릴게요 잔뜩보내주세욧 - 니콜 > 狂三 | 쌀좀 가져갈게요 ㅠ -南ことり > 니콜 | 일단 쌀 10000 보냈어요. 59분에 갑니다. - 니콜 > 南ことり | 사랑해욧 - SARS > 하루카 | 아뇨 원조는 이제 와도 힘들거같아요 ㅎㅎ. 그 자원 그냥 아끼시고, 혹시 제가 임관할 수는 없나요 ㅜㅜ - 하루카 > SARS | 으음; 일단 임관 희망자가 있으면 열어드리긴 하는 편입니다. 나중에 오실 때 턴시간 알려주세요! -南ことり > 니콜 | 남자의 사랑은 정중히 거절합니다. - 니콜 > 南ことり | 보내주신쌀은 우리여신 카요찡에게 감사합니다 - SARS > 하루카 | 넵~ -南ことり > 니콜 | 햇반 던져드릴깝쇼~?ㅋㅋㅋ - 무광 > DVa | 땅교환때 여강드셔주세요~ - 비월 > 갸오오 | 이번엔 제가 젤 먼저!!!!!! 부탁드립니닷!! - KAITO > Air | 전쟁 수고하셨습니다 연쟁할테니 오세요~ - KAITO > Anes | 전쟁 수고하셨습니다 연쟁할테니 오세요~ - KAITO > SARS | 전쟁 수고하셨습니다 연쟁할테니 오세요~ - KAITO > ㅇωㅇ | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 橙 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 감정 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 갸오오 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 검임 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 국민기업 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 그래도우리는 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 그만좀불러좀 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 낭군 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 누렁 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 류화영 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 박일아 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 박희수 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 부관 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 북두칠성 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 북오더 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 비밀 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 샤그니 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 야근탈출 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 여자친구 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 잠둥이션 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 정력왕 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 최태원 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 쿠요 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 플젠 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 하기싫은데 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - KAITO > 희지재 | 전쟁 수고하셨습니다 계속 전쟁이 예정되어있으니 오세요~ - 장임 > 카이사르 | 저 양양발령좀 - 박희수 > KAITO | 어디랑 쟁해여?? - 갸오오 > KAITO | 블소국에서 먼저 연락이 와서.. 갠매 감사하지만 죄송합니다 - 갸오오 > 비월 | 금방가요~ - KAITO > 박희수 | 종횡국이용 - 비월 > 갸오오 | 좋아 삼고초려 끝에 제갈량을 영입...했다.... - 카토 > 잠둥이션 | 저희가 남는 턴이 없어서 등용장은 안되고 임금은 풀어드릴 수 있는데 턴 불러주시면 열어드릴게요. 모병쟁합니다. -잠둥이션 > 카토 | ??? 왜 임관금지 걸어놓으셨어요 ? - SARS > 잠둥이션 | 여기오셈 균주한테 임금 풀어달라하고 -잠둥이션 > 카토 | 49분 임관 넣었어요~ 들어가면 금포 쌀 포 부탁 ㅠㅠ -잠둥이션 > SARS | okok 이 - 카토 > 잠둥이션 | 숙딸국이라 걸어놨어요 실접장만 받을라구요ㅋ 실접이 좀 중요해서 아얄도 와주시면 정말 감사드릴거에요! -잠둥이션 > 카토 | 헐.. 저 아얄은 안하는 유저인데.... 안 받아주시나요... - 카토 > 잠둥이션 | 아뇨 안하시면 어쩔 수 없죠. 접속만 자주해주시면 되요! ㅎㅎ -잠둥이션 > 카토 | 감사합니당 49분 턴 임관이에요~ - 카토 > 잠둥이션 | 넹 오시면 포상 빠르게 드릴게요 ㅎㅎ - 최태원 > KAITO | 23분전 등용장 가능한가요? - KAITO > 최태원 | 출근중이어서 못봤어요 죄송함다 ㅠ -북두칠성 > 하루카 | 임관할게요 금쌀요 반징훈사내 반복할게요 - 하루카 > 북두칠성 | 죄송해요 지금 임관희망자가 생각보다 많았기에 금쌀이 없네요..; 임관을 거절하게 되서 죄송하고..다른 국가에 가시더라도 즐거운 기수가 되시길 기도할께요.. -카이사르 > 니쉬 | 니쉬님 저 오늘저녁 9시나 10시턴에 남만으로 발령주세요~ 보컬국이 땅따할때 수비하면서 병력소진시키려구요~ -카이사르 > 북두칠성 | 1시 12분에 망명장 날라가니까... 편하게 겜하실 생각 있으시면 오세요! - 플젠 > 북두칠성 | 등용장드림 -북두칠성 > 플젠 | 금쌀도 주시미 - 하루카 > 평민킬러 | 1턴 잠둥이션 진양발령요 -평민킬러 > 하루카 | 네 - 니쉬 > 카이사르 | 9시 발령 넣어드렸습니다~ -북두칠성 > 무광 | 여기 임관 해달레서 왔더니 대우가 안좋으미 금700원 들고 있으미 쌀 0이미 무광 왕께선 나에게 전쟁자금 줄수 있나미 - 비월 > 청기사 | 청기사님 오시면 북두칠성님 금/쌀 증여좀 부탁드리구요 그 담턴부터 호관, 남피 첩보좀 부탁 드리겠습니다. - 비월 > 청기사 | 그리고 195년 까진 기술 안 뚫리니까 농/상 또는 성/수 올려주시면 감사하겠습니다. 성/수 올리실꺼면 전방 발령해 드릴테니 말씀해 주세요 - 하루카 > 평민킬러 | 잠둥이션 카토 일본어번역기 쌀2천 포상 순서대로 부탁합니다. -북두칠성 > 무광 | 포상준다네요 ㅎㅎ - 비월 > 진리 | http://www.62che.com/bbs/bbs/board.php?bo_table=0free&wr_id=35023&sca=&sfl=wr_subject&stx=irc&sop=a - 비월 > 진리 | 댓글 보세요 - 니콜 > 청기사 | 북두칠성님 쌀포상좀 부탁드려요오 - 비월 > 읭읭 | 읭읭님 남피출이 아니라 호관출 부탁드립니다. - 하루카 > 평민킬러 | 훈사 다하시고 1출 업입니다 - 검임 > 무광 | 불러주신건 감사하나 요슴 삼모할 시간이 안나서 멸망하기전에도 집합장만 했습니다. 별도의 부름이없으면 성벽쌓다가 늙어죽으렵니다 - 무광 > 북두칠성 | 여긴 이제 캄옥국 스멜이라 하하;; - 니콜 > 청기사 | 내정의달인님 금 6천 몰수해주세요 제가 포상넣을게요 - 니콜 > 청기사 | 저 1턴에 업발령부탁드림 - 니콜 > 플젠 | 내쌀 3천 몰수 - 니콜 > 진리 | 플젠님 턴안바뀌고 제북오더님쌀포 제대로안들어가면 제쌀 몰수좀 6천 - 니콜 > 청기사 | 오시면 쌀3천 포상 북오더 부탁드림 - 니콜 > 이쓰미 | 오시면 쌀3천 포상 Anes 부탁드림 - 니콜 > 南ことり | 포상턴좀 넣어주실수 있나요 -南ことり > 니콜 | 가능함요 - 니콜 > 북오더 | anes님 쌀 3천 포상 부탁드림 - 니콜 > 청기사 | 북오더님포상 쌀3천 부탁드릴게여 넣어주세요 - 니콜 > 南ことり | 갸오오님 금 3천 포상부탁드려요 - 니콜 > 南ことり | 아니다 니콜 금 1만 몰수 -南ことり > 니콜 | 금 몰수 넣었슈~ 13분 뒤에 발동 됩니당~ - 북오더 > 니콜 | 진리님이 이미 넣으셨던데.. - 니콜 > 북오더 | 진리님이 와서 수정해야져 - 니콜 > 북오더 | 아니면 평원발령 부탁드림 보낼만한분이 누군지모르겠어여 ㅠ - 북오더 > 니콜 | 니콜님 사령1턴 플젠 북해발령으로 변경해주세요. - 북오더 > 니콜 | 니콜님 1턴에 북오더 북해발령으로 변경해주세요. 혜리님 저격할께요 - 니콜 > 南ことり | 저 진류 가능? - 니콜 > 南ことり | 발령 - 북오더 > 니콜 | 니콜님 평원 병력없애고, 첩보해놓고, 발령해놓을테니 상황봐서 출병하세요. -南ことり > 니콜 | 지금 봤는데 해드려요? -南ことり > 니콜 | 일단 발려 넣어놨어요. 5시턴 실행전에 한번 더 확인할테니 변경 사항 있음 말씀해주세요. - 카토 > 평민킬러 | 턴전에 보시면 강서유서님 진양 발령이요 - 하루카 > 평민킬러 | 차오루 성도발령 부탁합니다! -평민킬러 > 하루카 | 네 - 하루카 > 평민킬러 | 출병 평원 부탁합니다 - 하루카 > 평민킬러 | 【안돼요안돼요】에게 쌀 10000을 포상 도 가져가주세요 - 다이스 > 랜임1분장 | 넹 방금 접함 - 다이스 > 랜임1분장 | ? -잠둥이션 > 하루카 | 갠메 보내요? -바닥을탁치고 > 橙 | 橙님 막타는 엄백호님 드리는게.. 삽턴안나고 좋지않을까요?ㅜ -바닥을탁치고 > 橙 | 발령은 드렸는데.. 못치실듯합니다ㅜ - 무광 > 진 | 병력해산용으로 쌀몰수포상한번했숩니다 - 하루카 > SARS | 북해보냄 동황부터 올라가주셈 -카이사르 > 무광 | 저 1-2시쯤 완으로 일단 발령을 ... -카이사르 > 무광 | 저 1-2시쯤 완으로 일단 발령을 ... - 무광 > 카이사르 | 사기부터 하세욤 -카이사르 > 무광 | 소드락국 아니면 종횡무진이나 블소국인데 불가침기간동안 털수있나요? ㅋㅋㅋ 우리 소드락국이란 접경생기면 바로 선포하실건가요? - 무광 > 카이사르 | 소드락국은 바로 선포해야죠 ㅋㅋ - 무광 > KAITO | 불가침은 어떻게 할까요? - 소드락 > 하루카 | 호로 막아주실수 있나요? 완 털고 싶은뎈ㅋㅋ - 소드락 > 하루카 | 음.... 접속에서 호로를 치는군요? 일단 막는건 포기하고....... 흠 알아서 해보겠습니다 - 하루카 > 소드락 | 음 노력해보겠습니다. - 하루카 > 소드락 | 다만 저희도 방락각이라 으음~ - 박일아 > 잠둥이션 | 턴전에 보시면 수춘 칩시다 - KAITO > 무광 | 지금부터 15년 정도 할까요? - KAITO > 무광 | 아 그리고 돌아오는 8월에 종횡에 선포할 예정입니다.. - 무광 > KAITO | 네 저흰 198년 8월에 불가침끝나고 200년 8월에 참전가능합니다. - 무광 > 니쉬 | 발명이시니 지금부타 기연부탁드려요 4등급까진 올려보죠 - SARS > 소드락 | 귀모장인데 등용장좀 보내주세요~ - 무광 > Anes | 안녕하세요 anes님 저희도 월요일 아침8시부터 종횡무진국과 개전할 예정입니다. 도와주세요! 비록 저희국에 기병병종은 없지만ㅜㅜ - 무광 > 狂三 | 쿠루미님 수고하셨습니다 ㅜㅜ 다음 종횡무진과의 전쟁은 저희와 함께 하시는게 어떻습니까 - 무광 > 南ことり | 미나미코토리님 수고하셨숩니다! 다음 종횡전은 저희와 함께 해주세요!!! - 무광 > ㅇωㅇ | ㅇωㅇ님 다음 전쟁은 저희랑 함께 해요!!! 월요일아침에 종횡과 개전할예정입니당 - 무광 > 魯堂首 | 당수님 저희도 월요일 오전에 종횡에 개전할 예정인데 도와주세요!! - 무광 > 갸오오 | 갸오오님 수고하셨습니다 월요일부터 있을 종횡전을 도와주시지 않겠습니까 - 무광 > 낭군 | 안녕하세요 낭군님~ 다음 전쟁은 저희랑 같이 하시지 않겠습니까? 월요일 오전에 종횡무진국과 개전할 예정입니다 - 무광 > 누렁 | 안녕하세요 누렁님 수고하셨숩니다. 다음 종횡무진과의 전쟁. 월요일부터 예정입니다만 도와주세요! 동물파워! - 무광 > 다이스 | 안녕하세요 다이스님. 강궁병이 곧 나오는 저희국과 월요일부터의 종횡무진전을 함께해요!!!! - 무광 > 니콜 | 안녕하세요 니콜님! 다음 전쟁에서 저희국에서 충차장 해주시면 감솨하겠숩니다 도와주세요!@!@ - 무광 > 북두칠성 | 안녕하세요 북두칠성님. 일전의 갠메도 받았지만, 월요일 오전에 종횡과 개전 할 예정입니다. 지금 열심히 주민복지를 위해 불꽃내정중입니다. - 무광 > 북오더 | 수고하셨습니다 북오더님. 저희는 월요일 오전에 종횡무진국과 개전예정이며 돚거국과 접경발생시 바로 선포할 예정입니다. 저희를 도와주세요!!!! - 무광 > 비밀 | 수고하셨숩니다 비밀님. 다음 전쟁은 양양산 강궁병으로 하시는 게 어떻겠숩니까. 월요일 오전에 종횡국과 개전예정입니다 - 무광 > 비월 | 비월님 수고 많으셨습니다. 저희국은 월요일 오전에 종횡국과 개전을 예정하고있으며, 소드락국과 접경시 당장 선포하여 돚거질을 응징할 예정입니다. 저희 국에 힘을 빌려주세요!!!! - 무광 > 아소 | 수고하셨습니다 아소님!! 저희 국은 월요일 오전부터 종횡국과 개전예정입니다!!! 저희국에서 아소빔을 발사해주세요 ㅌㅌ... - 무광 > 청기사 | 수고하셨습니다 청기사님. 월요일 개전을 앞둔 저희국 기술이 많이 딸리고 있숩니다. 아직 미개한 저희 국 기술을 발전시켜주소서 ㅠㅜㅠ - 무광 > 이쓰미 | 안녕하세요 이쓰미님 !! 수고하셧숩니다 ㅜㅜ 저희국도 월요일 오전부터 종횡국과 전쟁예정입니다! 여기 오셔서 함께 전쟁해요!!~ - 무광 > 그래도우리는 | 안녕하세요 그래도우리는님. 종횡무진국과의 전쟁 수고하셨습니다. 이후엔 저희와 함게 하시는게 어떻실런지요? - 무광 > 샤그니 | 도와주십시오 재야키ㅇ.. 아니 샤그니님 디아3 시즌5쩔좀.. 은아니고 국방제작자가 업스니다 텍스트 5줄 국방국을 구원해주소서 - 무광 > 전인호 | 안녕하세요 전인호님 종횡국과의 전쟁 수고하셧습니다. 월요일 오전에 종횡국과 개전하는 저희국에게 힘을 빌려주십사하고 갠메드립니다. - 무광 > 진리 | 진리님 종횡무진국과의 전쟁 고생많으셨습니다. 저희국은 조금 늦지만 월요일 오전 8시에 종횡무진국과 개전할 예정이며, 돚거국과는 노타협으로 접경시 바로 선포해 응징할 생각입니다. - 무광 > 진리 | 저희국에 오셔서 함께 해주시면 감사하겠습니다 !!! - 무광 > 카이스트 | 카이스트님 종횡국과의 전쟁 수고하셨습니다. 저희국은 월요일 오전에 종횡국과 개전할 예정에 있습니다. 저희와 함께 해주시지 않겠습니까?물론 돚거국도 신속 소탕예정입니다 - 무광 > 쥬비아 | 종횡국과의 전쟁 대단히 수고많으셨습니다 쥬비아님. 저희국은 오전 8시부터 종횡국과 개전예정입니다. 돚거국은 접경발생시 즉시선포 예정입니다. 저희를 도와주세요!!!! - 무광 > 희지재 | 블소국과의 전쟁 수고하셨숩니다 희지재님. 이후부턴 저희와 함께 하시는게 어떠십니까? 주민복지를 최우선으로 노력하고있습니다 - 무광 > 플젠 | 안녕하세요 플젠님. 월요일 오전부터 종횡무진국과 개전을 예정하고 있습니다. 저희국에 힘을 보태주세요!! - 무광 > 읭읭 | 읭읭님 저희를 도와주세요!!! 월욜 아침에 종횡국과 개전예정입니다 - 소드락 > SARS | 여기 외교에 구체적으로 모르시는거 같은데... 블소 멸망후 방랑으로 되어 있습니다. 오셔도 곧 아이템 사서 튈겁니다 - 비밀 > 무광 | 전 궁병이 아니라 귀병입니다 -카이사르 > 장임 | 새로오신분들 포상좀 주세요... 저랑 장임님이 1분밖에 차이안나니까.. 제가 엠장이나 집합장들 금쌀 몰수하면 거기 맞춰서 포상주세요~ - KAITO > ㅇωㅇ | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 南ことり | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 갸오오 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 그래도우리는 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 내정달인 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 누렁 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 다이스 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 랜임1분장 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 랜임2분장 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 부관 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 북두칠성 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 북오더 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 비월 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 샤그니 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 아소 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 읭읭 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 이쓰미 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 일기토지배자 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 정력왕 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 쥬비아 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 천괴금 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 청기사 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 카이스트 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 태극권 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 플젠 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ - KAITO > 희지재 | 곧 전쟁이 예정되어있습니다 보컬로이드국으로 놀러오세요~ -카이사르 > 이쓰미 | 아직 쟁 아닌데... 모병하시게요? 당장은 포상 줄 수 있는 텀이 없어요.. 몰수를 하고 포상을 해야하는 형편이라.. -카이사르 > 장임 | 완 치안 4천까지는 올려놓고 성수하는게 낫지않을까요... - SARS > 소드락 | 아놔, 나 귀모도적하고싶다고요 ㅁㄴㅇㄹ - 이쓰미 > 카이사르 | 나뻐 ㅠㅠ 자고 일어나서 임관하자마자의 턴을 보고 타박하다니 ㅠㅠㅠㅠㅠㅠ -카이사르 > 이쓰미 | ㅠㅠ -카이사르 > 니쉬 | 니쉬님.. 4시턴부터 몰수하시구요 제가 이어서 바로 포상돌릴테니까.. 넘 많이 몰수하지마세요 제 생각엔 금,쌀 3천씩... 그러다가 돚거국에 털릴수가있음;;; - 니쉬 > 카이사르 | 아무도 완에 없을떄 털리던 당시와는 달리 지금은 통솔높은 장수, 태수 까지 임명 돼있고 치안도 올라가서 못털꺼에요. - 니쉬 > 카이사르 | 3칸에 저번 상태에서도 계략 그리 들어가는거 자체도 매우 용한거구요. -카이사르 > 니쉬 | 통솔높은 장수가 해당성에 있고, 태수까지 있으면 그것도 털리고 안털리는거에 확률적으로 영향을 미치는건가요? -카이사르 > 니쉬 | 그럼 몰수만 부지런히 해주세요 제가 니쉬님 사령 봐가면서 포상 돌릴게요.. - 니쉬 > 카이사르 | 네. 계략에 영향 미치는게 치안, 통솔력 있는 장수, 태수, 군사, 시중의 유무, 거리, 계략 사용자 지력과 보정이기 때문에 ㅇㅇ - 니쉬 > 카이사르 | 네. 그렇게 할게요. -카이사르 > 니쉬 | ㅇ일단 금 포상부터 급하니까... 엠장 금10000몰수해도 4800밖에 몰수가 안되니 HideD님 삭턴중이니 금1만 몰수부터 먼저 하세요~... 포상자금 부족함; - 니쉬 > 카이사르 | 스핀 포상 하시게요...? - 니쉬 > HideD | 히데님 지금 삭턴 진행 중이시고, 국고가 부족하여 부득이하게 금, 쌀 몰수 좀 하겠습니다. 쟁전에 다시 오시면 포상 드릴테니 이해해주시길 바래요. 죄송합니다 - 니쉬 > 카이사르 | 부탁하신대로 몰수 넣고 갠메 드렸습니다. -카이사르 > 니쉬 | 아녀... 스핀포상까지 할 필요는 없을거같아요.. 히데님 금1만부터 몰수하면 얼추 맞아요~ - 니쉬 > DVa | 디바님 조만간 소지하신 금 중 일부만 국고로 가져가도 되겠습니까~? -카이사르 > 니쉬 | 여유되시면 제 턴 하나 더 가져가세요.. 여자친구 양양 발령.. 이거요~ 저녁쯤? - 청기사 > 니콜 | 니콜아재 아얄좀 - 니콜 > 청기사 | 들어가있 - 무광 > 비밀 | 밤새고 돌리느라 잘못봤나봅니다 죄송합니다 ㅜㅜ - DVa > 니쉬 | 넹 원하시는대로 -카이사르 > 무광 | 무광님은 쌀좀 챙겨주세요~~ - 무광 > 카이사르 | 7시에 쌀들어오면 뿌리겟습다 그전에 제 소환수들 쌀몰수할게요 - 무광 > 장임 | anes님 금포상좀 해주세요 -카이사르 > 아소 | 치안강화 1-2턴만 넣어주세요. 신야에 치안 풀로 채우게요... - 니쉬 > DVa | 허락해 주셔서 감사합니다~! -카이사르 > 진리 | 더문더문님은 집합장이라 금,쌀 포상 안드려도 됩니다.! - 쿠요 > 니쉬 | 템사러 갔다 하옵니다... - 니쉬 > 쿠요 | 저런 고생이 많으십니다. - 니쉬 > 쿠요 | 어... 거상도 아니고 타국 장수 이신대 템 구매가 되시나요? - 감정 > 狂三 | 견문말고다른내정턴넣어주세요! - 쿠요 > 니쉬 | 아이템 구매는 땅과 관계없이 됩니다. 그 이외에 군량 매매라던지 잡다한것만 나라를 타구요 - 니쉬 > 쿠요 | 그렇군요 'ㅁ' 답변 감사합니다아 - 쿠요 > 니쉬 | 후후.. 거기에서 첩보도 되니까, 앞으로 와드장하나 구해서 적진으로 이동후 3곳 첩보돌리면 4곳이 계속 불들어오는거니 그런것도 좋구요.. - 니쉬 > 쿠요 | 아니 구지 그렇게 속살을 보려 들지 않으셔두 됩니다~ - 쿠요 > 니쉬 | 후후... 알겠습니다 - 니쉬 > 카이스트 | 종횡 임관이 없었던게 임금이었다네요 'ㅁ' -카이사르 > 하연주 | 양양 치안 6천넘었습니다 - 소드락 > KAITO | knock knock knock knock! Do U want to build an alliance? - 소드락 > KAITO | Okay bye.... - KAITO > 소드락 | T.T - 니쉬 > 북두칠성 | 척사 ː 지역병종, 특수병종과 전투시 공격 데미지 +10%, 방어 데미지 -10% 입니다 - 니쉬 > 무광 | 국방 수정하셔야 하는 시기가 왔습니다. - 니쉬 > 카이스트 | 이제보니 닉네임이 비슷해서 갠메가 잘못 갔었네요; 죄송함다 - 니쉬 > 카이사르 | 종횡 임관이 없었던게 임금이었다네요 'ㅁ' - 카토 > 임사영 | 진양 먹혀서 하내 따이기 전에 부대 뺄거라 관도 출하시면 삽나요! -하기싫은데 > Navy마초 | 마초님 포상 1천씩만줄여주세요 -카이사르 > 니쉬 | 니쉬님 저 양양으로 발령주세요.. 환약좀 사려구요~ -카이사르 > 니쉬 | 집합으로 양양갔네요.. 발령안주셔도 돼요.. 근데 우리 부대 집합위치 저거 맞나요? 국방이랑 내무부에 글올린거랑 달라서 제가 일치시켜놨는데; -카이사르 > 니쉬 | 내무부에는 악마사냥꾼 : 상용, 그만불러좀 : 완 이랬거든요.. 국방에는 반대로 되어있죠;;; 제가 이거 내무부 국방하고 일치시킨다고 바꿨는데. 부대탄사람들이 악마사냥꾼에 많다능 -카이사르 > 무광 | 우리 부대 집합위치 저거 맞나요? 국방이랑 내무부에 글올린거랑 달라서 제가 일단 일치시켜놨는데; - 니쉬 > 카이사르 | 아 그런가요? 제가 실수 했나보네요; - 무광 > 카이사르 | 음 바뀐거같지만 국방따라가죠! 만들어 주셨으니깐 - 니쉬 > 카이사르 | 지금와서 또 바꾸면 혼란이 커지지 않을까 싶은대 -카이사르 > 니쉬 | 네 저도 일단 국방따라가는걸로 알고있을게요~ -하기싫은데 > 낭군 | 호관부터시작하는 미지배도시는 충차들이정리합니다. 하내출해주세요. -하기싫은데 > 청기사 | 계신가요? - 청기사 > 하기싫은데 | 출근해야해서 자려고 하는데 무슨일이신가여 -하기싫은데 > 러스티건 | 러스티건님 죄송합니다. 급해서 몰수해가겠습니다. 죄송합니다. -하기싫은데 > 청기사 | 죄송하지만 금좀 더써도 괜찮겠습니까? 쪼달리네요... - 청기사 > 하기싫은데 | 그러세여 한 천만 남기시면되여 -하기싫은데 > 청기사 | 감사합니다. -하기싫은데 > Navy마초 | 마초님접중이시면 금4ㅊ닌 다이스포상부탁드려요 -바닥을탁치고 > 랜임1분장 | 턴을 넣어주세요...ㅜㅜ -바닥을탁치고 > 정휘인 | 휘인님 주무시나욥? -카이사르 > 아소 | 호로 점령했으니 한중으로 발령냅니다 - くま > 내정달인 | 다른 수뇌님들이 미리 갠메 보내셨을지도 모르겠습니다만 ㅠㅠ 제 기억에 없어서 다시 보냅니다~ 무지장님 쌀에 손 좀 대겠습니다 . 감사합니다! - くま > 일기토지배자 | 다른 수뇌님들이 미리 갠메 보내셨을지도 모르겠습니다만 ㅠㅠ 제 기억에 없어서 다시 보냅니다~ 무지장님 쌀에 손 좀 대겠습니다 . 감사합니다! - くま > 천괴금 | 다른 수뇌님들이 미리 갠메 보내셨을지도 모르겠습니다만 ㅠㅠ 제 기억에 없어서 다시 보냅니다~ 무지장님 쌀에 손 좀 대겠습니다 . 감사합니다! -바닥을탁치고 > 엄백호 | 엄백호님 매번 열심히하시네요! 혹시 잠은 잘 주무셨나요? 히히 -카이사르 > 무광 | 더문더문님 양평으로 뺴주세요,.. 제가 장임님보다 앞선턴이라 장임님 덕양에서 빼줘야할듯... - くま > Navy마초 | 오시면 쌀 포상 대신 몰수로 바꿀게요 ㅠㅠ 몹쓸 탈취. 사령턴 지우고 Air 쌀 4천, 일기토지배자 쌀 3천, 천괴금 쌀 3천 몰수 부탁드립니다~ -카이사르 > 니쉬 | 3시 사령턴 남으면 저 덕양으로 발령주셔요~ -바닥을탁치고 > 제갈여포 | 제갈여포님 괜찮으시면 성도 1출더 하시고 모훈사부탁드려요! -카이사르 > 니쉬 | 저 쌀 7-8천정도 주세요..국고가 비어서 제가 집합장들 쌀 몰수할테니 8시턴에 주시면 감사~ -카이사르 > 검임 | 장안에서 성벽보수 대신에 치안강화 좀 해주시면 감사하겠습니다. -카이사르 > 장임 | 장임님 성도 말고 자동 고고.. 보컬국보다 점유율 앞서야함. -카이사르 > 무광 | 저 쌀좀요 굽신굽신.. - 무광 > 카이사르 | 윽 늦게봤어요 -카이사르 > 무광 | 니쉬님이 주신대요~ 8시턴에 다른분 쌀 포나 돌리세요..국고 찼는거 다 써야해요.. - 검임 > 카이사르 | 치안으로 교체후 진행합니다 - 니콜 > 플젠 | 근데님누구 -카이사르 > DVa | 이번턴 성도 성벽일거같습니다.. -카이사르 > 그만좀불러좀 | 이제 집합 몇 턴만 입력하시고 3-4턴 후부터는 기술연구로 입력해주시면 감사하겠습니다. - 엄백호 > 바닥을탁치고 | 예. 이번기수 특기랑 아이템도 잘 받아서 재밌게 하고 있습니다 -카가미네렌 > 청기사 | 쌀이 너무없어서 몰수좀 할게요 ㅠㅠ - 청기사 > 카가미네렌 | 네 그러세여 ㅇㅇ... 첩보할 일이 당분간 없을거같으니 전부 몰수해가서도 됩니다. - Navy마초 > KAITO | 저 낙양에 있다가 눈치보고 부대탈게요. - KAITO > Navy마초 | 옙 -바닥을탁치고 > Navy마초 | 마초님 괜찮으시면 출한번만 부탁드려요 ㅎㅎ - Navy마초 > 바닥을탁치고 | 넹 -바닥을탁치고 > 청기사 | 청기사님 갠메를 해드렸는지 몰라 보내드립니다. 원활한 전쟁을위해 쌀을 좀 가져가야될거같습니다.. 죄송합니다ㅜㅜㅜ -카이사르 > 니쉬 | 금좀 주세요~ ㅎㅎ -카이사르 > 무광 | 집합장들한테 연락하셔가지고 다시 집합살리세요... 덕양에 인구가 줄어들어서 집합 후방으로 하나 돌려야됩니다. 장안에도 하나 있으면 좋구요.. - KAITO > 쿠요 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 소드락 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 하연주 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 재야 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 오늘도삼모냐 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > 오늘도삼모냐 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 아르카나하트 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! - KAITO > 직장인페이트 | 남은 기간 보컬로이드국과 함께 해요~ 재미있게 해드릴께요! -바닥을탁치고 > Navy마초 | 마초님 죄송한데 낭군님 금포상 4천으로 바꿔주실수있으세요? -카이사르 > 니쉬 | 저포함해서 쌀 부족한 쟁장들한테 쌀포좀 해주세요~ - Navy마초 > 바닥을탁치고 | 엌.... -바닥을탁치고 > Navy마초 | 아 괜찮아요 ㅎㅎ -카이사르 > 이쓰미 | 엠장이랑 집합장부터 몰수하고 그후에 삭턴장몰수하세요 내정장은아직... -카이사르 > 쿠요 | 쿠요님. 사령턴 한칸씩 당겨주세요... 악마좀..님은 제가 무릉으로 발령함.. - 쿠요 > 카이사르 | 넹 ! -바닥을탁치고 > 강서유서 | 강서유서님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 그래도우리는 | 그래도우리는님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 내나 | 내나님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 누렁 | 누렁님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! - 니쉬 > 박일아 | 박일아님~ 어디 가시기로 마음 잡으신 곳이 있으신가유? -바닥을탁치고 > 대악마 | 대악마님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 물파스 | 물파스님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 박일아 | 박일아님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 발암맨 | 발암맨님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 샤그니 | 샤그니님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 소드락 | 소드락님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 아르카나하트 | 아르카나하드님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 안돼요안돼요 | 안돼요안돼요님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 엘마쨩상향좀 | 엘마쨩상향좀님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 연이 | 연이님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 오늘도삼모냐 | 오늘도삼모냐님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 일본어번역기 | 일본어번역기님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 임사영 | 임사영님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! - 니쉬 > 카토 | 카토님 저희국 오실 생각 없으실까유~~? 고숙의 손길이 필요합니다. -바닥을탁치고 > 잠둥이션 | 잠둥이션님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! ps 사진 너무 귀여워요!히히 -바닥을탁치고 > 직장인페이트 | 직장인페이트님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 카토 | 카토님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 페르시아 | 페르시아님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -카이사르 > 악마사냥꾼 | 악마님 이제 집합입력하지마시고 올 턴 농업 또는 상업 입력 부탁드립니다.. -바닥을탁치고 > 평민킬러 | 평민킬러님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 푸린푸린♥ | 푸린푸린님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 플젠 | 플젠님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -바닥을탁치고 > 하루카 | 하루카님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -카이사르 > 더문더문 | 더문더문님. 쟁 끝났으니 집합턴 취소하고 농상업 턴 입력해주시기 바랍니당... - 니쉬 > SARS | 사스님 망명장 받으시기로 하신곳 있으신가요? 없으시면 때릴곳 많은 저희국 오셔서 벽좀 허물어 주실 수 없으신지? -바닥을탁치고 > SARS | SARS님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -카이사르 > 니쉬 | 저 남영으로 보내주세요~ -바닥을탁치고 > 南ことり | 남코토시님! 정말고생하셨습니다. 이제 마지막 전쟁인데 저희와 함께하시지 않으시겠습니까? 원하시면 등용장도 드리겠습니다. 꼭 연락주십쇼! -평민킬러 > 바닥을탁치고 | 가면 흑색마 타고 놀수있나요 ~.~? -바닥을탁치고 > 평민킬러 | 당연히 드려야지요! 히히 - 니쉬 > 카이사르 | 접수했습니다~ -평민킬러 > 바닥을탁치고 | 등용장 주시면 날아가겠습니다~ -바닥을탁치고 > 평민킬러 | 넷 감사합니다! - 니쉬 > 강서유서 | 갓서유서님 망명 가실곳이 정해져 있으시지 않으시면 저희국에 오셔서 도움좀 주실 수 없을까요~ - 박일아 > 바닥을탁치고 | 걍 임관갑니다. 등용장은 턴아까워용~ -바닥을탁치고 > 박일아 | 감사합니다!ㅎㅎ - 니쉬 > 잠둥이션 | 서촉의 명장 너구리님 털가진 동료들 보러 오지 않으시겠습니까? -카이사르 > Anes | 박일아님 이미 저쪽으로 갔네요 - Anes > 카이사르 | 네 확인했어요 - 니쉬 > 잠둥이션 | 일단 등용장 드리오니 맘 내키면 수락해주세유 -제갈여포 > 아수라 | 아수라님 퉤섭 오픈할꺼임 ~~ -카이사르 > 평민킬러 | 평민킬러님.! 마지막 천통쟁을 우리 접속국에서 함께하시지 않으실렵니까..? -카이사르 > 무광 | 무광님. 부대 탈퇴안한 장수들이 많아서 개별발령이 힘들겠네요.. 집합장들 연락해서 농상턴 입력하라고 할 수 있나요? - 무광 > 카이사르 | 더문님은 공부중이라 힘들거 옥수수는 말해둘게염 - 무광 > 카이사르 | 옥수수보곤 그냥 다 킥하라고 할게요 -카이사르 > 강서유서 | 강서유서님.! 마지막 천통쟁을 우리 접속국에서 함께하시지 않으실렵니까..? -바닥을탁치고 > 평민킬러 | 아.. 등용장 넣어주신다던분이 순간 금이 모자라셨었네요..ㅜㅜ 기다리게해서 죄송합니다 18분에 날아갑니다! - 무광 > KAITO | 나나님 천통쟁 조금 앞당기는게 어떠신가요 지금대로면 일요일 새벽4시개전인데 토욜오전이나 금요일 밤 정도로 - KAITO > 무광 | 제가 일요일 새벽까지 중요한 일이 있어서 조금 늦추는 편이 더 좋습니다. - KAITO > 무광 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 무광 > KAITO | 윽 그럼 그대로 해야겠네요. 더 늦추면 깃수가 너무 늘어지니.. - KAITO > 무광 | 넵 저희 장수들은 아무때나 해도 된단 입장이긴 한데 조금 더 의논해볼께요 -카이사르 > 무광 | 읭읭님이랑 아소님 남영으로 보내주세요 -카이사르 > 이쓰미 | 읭읭님 남영으로 발령좀 주세요~ -카이사르 > 쿠요 | 혹 무광님이나 이쓰미님이 읭읭님 남영으로 발령 입력안했으면 쿠요님이 사령턴 한 턴 밀고 읭읭님 남영으로 발령부탁드립니다. -카이사르 > 쿠요 | 읭읭님 발령 빼고(이쓰미님이 발령턴입력함) 카이스트님 완으로 발령부탁합니다. -카이사르 > 쿠요 | 이쓰미님이 읭읭님 발령 뻈으니 그대로 사령턴 놔두시면 됩니다. -카이사르 > 이쓰미 | 이쓰미님... 카이스트님 (무릉에 있던데..) 완으로 발령주세요~ -카이사르 > 이쓰미 | 여강이 좋을란가요? 한번 보시고 태수자리 주시면서 전방 성에 발령주세요.. - 쿠요 > 카이사르 | 헉 ! 넵 ! - 이쓰미 > 카이사르 | 앙대요! 실질적군주 나무늘보한테 시키셈요! - 청기사 > 니콜 | 니콜 아재 님 거상인데 발령이 아예 안되는 듯 지금 내가 확인해보니까 95퍼에서 쌀팜하시든데 - 니콜 > 청기사 | 저는 아재가아니고 차칸어린이라 10시가넘으면 잔다구요 신경써주셔서♡ - KAITO > 무광 | 아무래도 당기기는 힘들것같아요 일요일 4시는 좀 너무하고 10시정도로 어떨까요? -카이사르 > Anes | 완 성벽보수 거의 다 차가는데... 일단 몇 턴 정도 치안강화로 전환해주세요... 다른성에 발령받으면 그때부터 다시 성수로 전환해주세요~ - Anes > 카이사르 | 주기적으로 확인해서 성벽다차면 전환할게요 -카이사르 > 니쉬 | 자금상황도 봐야하므로 내일 저녁에 봤음합니다.. 무엇보다 제가 오늘 아얄에 못들어가서..쿨럭.. - 니쉬 > 카이사르 | 옙 ~ - 니쉬 > 카이사르 | 어서오세유~~ - 니쉬 > 카이사르 | 방사요; - Anes > 강서유서 | 해산용으로 잠시 쌀몰수좀 할게요 - 청기사 > 니콜 | 아재가 거짓말치시네; -카이사르 > 무광 | 우리 쟁장들한테 아이템(6말 등) 사는거에 대해 어떻게 생각하세요? 무광님,니쉬님,일부수뇌분들이랑 내일저녁에 아얄에서 의논하려고해요... - 무광 > 카이사르 | 6말은 너무비싸고 4말이나 5말이 어떨까요 -카이사르 > 무광 | 내일까지 자금상황 함 보려구요... 내일 밤에 아얄에 들어오세요~ -잠둥이션 > 무광 | ㅋㅋㅋㅋㅋ 장난인데.....너무 진지하게 받아들이지 말아주세욬ㅋㅋㅋㅋㅋㅋ 죄송...ㅋㅋㅋㅋㅋㅋ - 무광 > 잠둥이션 | 마침 카이사르님과 말구입 논의를 하고 있었습니다 ㅋㅋ 아마 낼 밤에 몇말살지 결정할게욥 - 니쉬 > 잠둥이션 | 템 구입 등과 관련해서 아마 내일 저녁에 수뇌진 분들 국채에 모여서 논의가 있을꺼에요. 템 구입 자체는 아마 하는 쪽으로 결론 나지 않을까 싶네요. 여유 되시면 내일 국채 오세유 -악마사냥꾼 > 무광 | 천통쟁때 장안 자동만 막으면서 남만 먼저 따야 상대방 삽턴 유도할듯 -오늘도삼모냐 > 바닥을탁치고 | 넵 -잠둥이션 > 니쉬 | ㅋㅋㅋ 전 아알은 안해서 +2말이여도 괜찮습니다~ 수뇌부 회의 기다리겠습니다~~ -잠둥이션 > 무광 | ㅋㅋㅋ 전 장난으로 말한거에욬ㅋㅋㅋㅋ +2말이여도 괜찮습니다~ 수뇌부 회의 기다리겠습니다~~ -카이사르 > Anes | 저 아직 계양으로 안보내셔도됩니다.. 남영 성수 풀로채우고 치안조금 더올려놓고 발령요청하겠습니다. - Anes > 카이사르 | 남영성벽을 여럿이 쌓고있어서 아침되면 삽날까해서 그냥 발령해두려고했는뎅 -카이사르 > Anes | 그럼 새벽에 저 말고 읭읭님이나 노당수님 보내세요~ - Anes > 카이사르 | 네 - 니쉬 > 류화영 | 류화영님 죄송하지만 쌀 좀 몰수하여 쟁장분들에게 배분좀 할게요. - 니콜 > 청기사 | 유즈키유카리 국방요청 - 청기사 > 니콜 | 사진 가쟈오셈 -바닥을탁치고 > 오늘도삼모냐 | 등용 드릴까요? - 무광 > KAITO | 저희 국 장수분들은 그대로 하자는 의견이 많네요... 윽... - 무광 > 카이사르 | 몇시쯤에 아얄에서 뵐까염 오늘 집 갈 시간이 애매해면 랩에 남아서 들어오던가 하게요 -카이사르 > 무광 | 9시는 되어야할듯해요.. - 무광 > 카이사르 | 넹 알겠습니다 -카이사르 > 무광 | 계획에 없던 회식이잡힌관계로 ㅜㅜ - KAITO > 무광 | 넵 그럼 4시턴에 선포하세요 -카이사르 > 니쉬 | 전 9시 이후에 접속한다고 무광님이 알고있어요.. 현재상황으로볼때 9시반은되어야 접속할듯 -카이사르 > 무광 | 더문더문님 삭턴 40턴 남았는데 조치취해주세요~ -카이사르 > 무광 | 그리고 이제 4말도 슬슬 사야하는데 아이템구매관련 집합부대하나있어야할거같네요. 더문더문님 턴 입력하실때 집합으로 해도될듯합니다. 농상업도 많이찼으니깐요.. - 플젠 > 니콜 | 쿠레나이 - 무광 > 김우민 | 요즘 롤을 못들어가고 있는데, 보면 토욜오후부터 부대 집합점 해주삼 - 무광 > 카이사르 | 악마사냥꾼한테 말할게요 더문님은 공부중이라 ㅇ ㅇ -카이사르 > 니쉬 | 무광님하고 상의해서 불가침끝나면 바로 선포할수있도록 사령예턴해주세요~ 그리고 잠둥이션님의견... 증축? 여기에대해서는 어떻게생각하시는지? - 니쉬 > 카이사르 | 증축하면 템 못사요. 선포는 상황 보겠습니다. - 니쉬 > 무광 | 군주님 쌀 판매 시작해주세요. - 니쉬 > 무광 | 포상 할 닉 말씀하시면 포상이나 몰수 넣겠습니다. - 니쉬 > 무광 | 그리고 선포 직접 하실꺼면 말씀주세요. 사령턴 뺄게요 - 무광 > 니쉬 | 제가 쌀팔게요 스핀해서 저한테 몰빵넣어주세양. 선포는 누가해도 상관없숩니당 - 니쉬 > 카이사르 | 쌀 매각 무광님이 직집하신다고 하니 포상좀 부탁드려요. - 무광 > 그만좀불러좀 | 토요일 저녁 6시즈음부터 집합 해주시면 감사하겠습니다! - 니쉬 > 진리 | 진리님 악마사냥꾼 금 몰수 2~12턴 입력좀 부탁드려요 - 니쉬 > 잠둥이션 | 잠둥이션님 무광님 금 몰수 2턴부터 12까지 입력좀 부탁드립니다. - 니쉬 > 카이사르 | 좀전 부탁드린건 직접 처리 했습니다. 템 구매자 혹은 예정자 포상으로 부탁 다시 드릴게요. - 진리 > 니쉬 | 100씩..?? - 니쉬 > 장임 | 악마사냥꾼 쌀 포상 1 ~ 12턴 입력좀 해주셰요 - 니쉬 > 진리 | 만씩이요. 장비 풀기 위해서 금으로 바꿀겁니다. - 진리 > 니쉬 | 거지신데..!? - 니쉬 > 진리 | 포상 들가고 바로 쌀 파실꺼에요 그러니 걱정마시길 - 무광 > 감정 | 토요일 오전 12시까지 돈 넣어드릴테니 식품영약학 부대타시고 +6말과 환약, 무력지력 균형용템을 구매하세요! 글고 동생분 집합 잘 부탁드립니다흑 - 니쉬 > Anes | Anes님 금 2만 미만인 쟁장분들 금 2만 되게 끔 포상 좀 넣어주시면 감사하겠습니다~ - 니콜 > 청기사 | http://info.shimamura.co.jp/digital/img/upload/shimastaff2/2015/vocaloid4_yukari_02.jpg - 니콜 > 청기사 | http://vocaloid-wallpaper-matome.com/wp-content/uploads/2014/06/yukari-beautiful-illustration-01.jp - 니콜 > 청기사 | 선링크 후감사 - 니콜 > 청기사 | http://blog-imgs-66-origin.fc2.com/r/s/v/rsvmille/20140305220924b72.jpg -카이사르 > 전인호 | 얼룩말부대타고 아이템 구입하세요.. 식품영양학부대는 영안에서 집합하니 아이템구입못합니다.. -카이사르 > Anes | 저도 금1만 포상부탁해요~ -카이사르 > 진리 | 진리님. 식품영양학부대타고 영안가서 성수좀 해주세요~ - 니쉬 > 선비 | 4말 구매입니다. 국방 봐주세유. - 니쉬 > 카이사르 | 추가적으로 템 구매 하셔야 하는 명장 분들 중 선비님은 6말 구매하셨으니 갠메 드릴때 건너 뛰시면 될 듯 합니다. - 니쉬 > Anes | Anes님 히데님 금포상 1만으로 늘려서 해주시면 감사하겠습니다~ -카이사르 > 니쉬 | 4템은 언제구매하면 될까요? 오늘 저녁까지는 구입해야하지싶은데 - 니쉬 > 카이사르 | 지금부터 쭉 돌려야 할거같네요. - 니쉬 > 무광 | 템 사서 끼셔야죠. -카이사르 > 이쓰미 | 4시턴에 장안으로 보내주세요.. 집합으로 양양갔다오려구요 -카이사르 > 이쓰미 | 강주는 아까 제가해봤으니 함곡, 남만, 허창, 고창에 하고나서 회의실에 성 정보 올려주세요.. -카이사르 > 니쉬 | 수비만하실분이 북두칠성, 잠둥이션인가요.. 둘 다 완에서 수비하면 되겠네요.. -카이사르 > 니쉬 | 그리고 4템 누가 사는가요,? 확정짓죠.. -카이사르 > 이쓰미 | 아까첩보관련은 국채에 올린다는게 모르고 갠메로 보냈네요 ㅈㅅ - 니쉬 > 카이사르 | 수비 전인호님까지 세분입니다. - 니쉬 > 카이사르 | 명장: 장임, 魯堂首, 북두칠성, 강서유서, 카이사르, 북오더, Anes, 아소, 내나, 잠둥이션, 임사영, 니쉬, 무광 - 니쉬 > 카이사르 | 실접: 진리, 이쓰미, 비밀 충차: 감정 - 니쉬 > 카이사르 | 이 정도 분들 챙겨주시면 될 듯 합니다. - 니쉬 > 카이사르 | 수비만 하신다는 전인호님도 추가로 지급 해도 될거같고요. -카이사르 > 니쉬 | 현재 자금상황과 아이템 구매한현황 파악해보니 포상지급예정은 아래와같습니다.. 장임5천 강서유서1만5천 카이사르1만 북오더1만 Anes1만5천 아소1만 잠둥이1만5천 임사영5천 -카이사르 > 니쉬 | 니쉬 1만5천 진리5천 이쓰미1만5천 비밀5천 감정1만 전인호 1만 ... 이상입니다. 여기서 현재 사령예턴은 포함안된겁니다... 나눠서포상주면될듯 -카이사르 > 그만좀불러좀 | 징병후에 7시턴부터는 집합들어가야합니다.. 다른장수들 징병턴이기때문이죠.. - 니쉬 > 카이사르 | 예. 알겠습니다 - 니쉬 > 감정 | 감정님 지력 1템 사서 무지 스텟 균형 맞춰주세요 - KAITO > Air | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > Navy마초 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > Navy마초 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > くま | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 橙 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 고긔가먹고싶 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 국민기업 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 낭군 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 내정달인 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 니콜 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 다이스 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 돌아온꼰대 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 랜임1분장 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 러스티건 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! - KAITO > 메구리네루카 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 미친과학 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 바닥을탁치고 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 박희수 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 비월 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 야근탈출 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 엄백호 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - KAITO > 이루나 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 일기토지배자 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 일본어번역기 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 재야 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 정력왕 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 정휘인 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 제갈여포 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 천괴금 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 청기사 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 최태원 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 카가미네렌 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 카토 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 코토와르 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 평민킬러 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 하기싫은데 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - KAITO > 하연주 | 전쟁 직전입니다 모두 전쟁 준비! 예턴 1시간 내 올라옵니다! 용병 고용했습니다! - 니쉬 > 내나 | 수비 설정 바꿔주세요. - 니쉬 > 쿠요 | 수비 설정 바꿔주세요. - 니쉬 > 카이사르 | 저기 전략 의병 썼습니다. -카이사르 > 니쉬 | 그럼 우리도 의병쓸까요? 그거말고는 수몰이나 백동밖에.. - 니쉬 > 카이사르 | 기회 봐서 필즉써야죠. - 니쉬 > 카이사르 | 의병 써봐야 숙련 비루해서 드륵드륵 갈릴꺼에요. 거기에 모훈사 하는것도 아니고하니 - 니쉬 > Anes | 1시턴에 電気電子님 영안으로 발령 좀 부탁드립니다. - 니쉬 > 잠둥이션 | 1시턴에 그만좀불러님 남영으로 발령 좀 부탁드립니다. -악마사냥꾼 > 무광 | 전략은? - 무광 > 악마사냥꾼 | 나중에 필즉이나 쓸까함 저긴 의병장불렀네 -악마사냥꾼 > 무광 | 개전필즉이 가장 좋지않나 ㅋㅋ 근데 이미 예턴이 그게아니라 - 무광 > 악마사냥꾼 | 저기가 머쓸지몰라서 ㅇㅇ -바닥을탁치고 > 정력왕 | 어서오세요!ㅜ -바닥을탁치고 > 정력왕 | 모훈사출출 5반복 부탁드려요! - 정력왕 > 바닥을탁치고 | 오케이! -카이사르 > 쿠요 | 쿠요님 더문더문부대 지금 시상에 없고 완에 있어요.. 시상으로는 거의 안오고 완에 집중적으로 와서 부대 옮경ㅆ어요. -카이사르 > 감정 | 일단 병력 풀로채워주세요.. 접경지가많은데 장수는 적어서 성벽보이는데 많아요 - 니쉬 > 카이사르 | 접률 보고 오후에 필즉 써볼까요? - 니쉬 > 카이사르 | 미리 공지 해놓으면 어느정도 효과는 볼 듯 한대 -카이사르 > 니쉬 | 공지를하려면 미리하면 다들 볼거같긴한데... 어디를 집중공랻하실건가요? 남만? - 니쉬 > 카이사르 | 예턴장 남만, 완에서 출병 하고 실접장 여강에서 파양 오 탐라 사비 이도 위례 뚫어볼까요? -카이사르 > 니쉬 | 예턴장은 남만만 뚫고 완은 수비만하죠.. 우리장수가적어 완이랑 남만 둘 다 출병무리.. 실접장은 파양, 오로가도 될듯하요 혹 그 전에 상동뚫으면 남해산월로가도되고 필즉은저녁,,밤 - 니쉬 > 카이사르 | 옙. 그럼 그렇게 하시죠 -카이사르 > 진리 | 남영지키러 Anes님이랑 저랑 왔으니 꼭 상동 먹어주세요.. - 진리 > 카이사르 | 과-연 -카이사르 > 진리 | 진님 영안에 두는게 좋겠네요.. 시상발령은 취소해주셔요 -카이사르 > 이쓰미 | 임사영님완으로발령 - 니쉬 > 카이사르 | 필즉 예고는 빠르면 빠를수록 좋을 듯 한대 국방에 몇시턴으로 남겨놓을까요. -카이사르 > 니쉬 | 이건 수뇌들 접률도 좋아야하니까 갠메로물어보세요 저는 저녁8-9시로 맞추는게 좋은거같은데.. - 니쉬 > 카이사르 | 일일이 물어선 어차피 답 안나올테니 8시로 못 박죠. 그래야 출병하고 다음 모병 때 상대 반응도 어느 정도 보기 쉬운 시간이 될 듯 하네요 - 니쉬 > 이쓰미 | 잠둥이션님 스핀으로 카이스트-> 완 발령 넣어주세요 - 니쉬 > Anes | 임사영 완 발령 부탁드립니다. - 니쉬 > 이쓰미 | 발령하시고 양파 꺼버리시면 됩니다. ㅇ - 니쉬 > Anes | 상동 부대타고 남해 출병 시도해보시는건 어떠실지 -카이사르 > 니쉬 | 네 국채에 공지해주세요.. - Anes > 니쉬 | 에고 늦었네요 - 니쉬 > Anes | 괜찮습니다. Anes님. 필사즉생 입력 좀 부탁드립니다. 4,5,6월 턴에 입력해주시면 되고요. Anes님은 징병 6월에 미리 하시면 됩니다. - 니쉬 > Anes | 전달 잘못드려 죄송합니다. 필즉 입력은 제가 할게요. -바닥을탁치고 > Navy마초 | 마초님.. 안계셔서 부대 없으신분위주로 발령보내드리고있습니다..ㅜ 홍농에 가시게되니 방어에 힘써주시면 감사하겠습니다... - Navy마초 > 바닥을탁치고 | 넹 -카이사르 > DVa | 공격하고싶으신쪽 있으면 11분까지 저란테 갠메보내주세요 - 니쉬 > Anes | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > DVa | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > HideD | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > kulee | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > ㄷㄱㅎㅈㄷㅀ | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 狂三 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 電気電子 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 魯堂首 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 감정 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 강서유서 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 검임 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 그만좀불러좀 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 김우민 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 내나 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 더문더문 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 류화영 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 무광 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 북두칠성 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 북오더 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 비밀 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 선비 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 소하 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 식품영양학 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 아르카나하트 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 아소 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 악마사냥꾼 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 읭읭 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 이쓰미 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 임사영 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 잠둥이션 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 장임 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 전인호 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 쥬비아 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 직장인페이트 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 진 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 진리 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 카이사르 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 카이스트 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > 쿠요 | 개인메세지는 3초당 1건만 보낼 수 있습니다! - 니쉬 > DVa | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > HideD | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > kulee | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > ㄷㄱㅎㅈㄷㅀ | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 狂三 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 魯堂首 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 감정 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 강서유서 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 검임 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 내나 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 무광 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 북두칠성 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 북오더 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 비밀 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 선비 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 소하 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 아르카나하트 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 아소 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 읭읭 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 이쓰미 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 임사영 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 잠둥이션 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 장임 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 전인호 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 쥬비아 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 직장인페이트 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 진 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 진리 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 카이사르 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 카이스트 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > 쿠요 | 213年 8月 필사즉생 입니다. 국방을 참고하시어 턴 입력에 착오 없으시길 바랍니다. - 니쉬 > Anes | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > DVa | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > HideD | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > kulee | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > ㄷㄱㅎㅈㄷㅀ | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 狂三 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 魯堂首 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 감정 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 강서유서 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 검임 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 내나 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 무광 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 북두칠성 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 북오더 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 비밀 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 선비 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 소하 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 식품영양학 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 아르카나하트 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 아소 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 읭읭 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 이쓰미 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 임사영 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 잠둥이션 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 장임 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 전인호 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 쥬비아 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 직장인페이트 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 진 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 진리 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 카이사르 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 카이스트 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 쿠요 | 필즉 출병지 남만->남해로 수정됐습니다. - 니쉬 > 잠둥이션 | 잠둥님 아소님 상동으로 긴급발령좀 해주세요 -카이사르 > 니쉬 | 혹시 필즉전에 남해따면 어떻게되는거죠? ㅋㅋ -카이사르 > 무광 | 2시21분턴에 저 남영으로 보낼수있음 발령주시구요 아님 마세요~ -카이사르 > 이쓰미 | 2시25분까지 겐메확인했으면 저 2시턴에 발령주시구요 아님 안주셔도됩니다. - 니쉬 > 카이사르 | 따면 뭐... 남해에 뚜벅뚜벅 걸어들 가시게 돼겠죠 orz - 이쓰미 > 카이사르 | 그래서 어디발령해란말..? -카이사르 > 이쓰미 | 아.. 장소를 말안했네요.. 남영요 - Navy마초 > 낭군 | 낭군님 모훈훈 되있으세요 모훈사 ㄱㄱ -카이사르 > 진리 | 제가 출병하는 로그보고 남해출병여부 결정해주세요.. - 니쉬 > Anes | Anes님 저 계양 발령좀 해주세요 - 니쉬 > 잠둥이션 | 비밀님 출병 하셨는대도 상동 안넘어가면 상황보고 잠둥님이 출하셔서 마무리 해주세요 -잠둥이션 > 니쉬 | 저 아직 훈사 완료가 안되었는데 걍 출병할까요? - 니쉬 > 잠둥이션 | 비밀님이 성벽 치는거 확인하시면 훈사 무관하게 출병하세요 ㅇㅇ -카이사르 > 감정 | 감정님의 공성충차 활약여부에따라 우리국의 운명이 달려있습니다. - 니쉬 > 잠둥이션 | 계양부대 상동으로 옮겨주세요 -카이사르 > 니쉬 | 아직까진 오에 아무도없는데 감정님 함곡발령말고 그대로 놓아두시면 어쩌면 오도 함락가능할듯요... - 니쉬 > 카이사르 | 감정님과는 irc에서 말씀 드리고 받고 하고있습니다. 사령만 미리 넣어둔 상태고요 - 니쉬 > 카이사르 | 제 턴 직전까지 오가 비어있으면 사령 캔슬 해드린다고 말씀 드렸어요. -카이사르 > 니쉬 | 제가 아얄에 못들어가는상태니까ㅜㅜ 하기야 들어간다고해도 3명도안되겠지만... - 니쉬 > 카이사르 | 히데님 디바님 감정님 저 무광님 이쓰미님 계십니다. - 니쉬 > 카이사르 | irc는 모바일로도 접속이 되는대 힘드신가요 - 니쉬 > 잠둥이션 | 턴 사기진작으로 바꿔두세요. -카이사르 > 니쉬 | 일단 설치도 안했구요.. 데이터가 무제한이아니라서 ㅎㅎㅎㅎ 내일 저녁엔 들어갑니다 - 니쉬 > 카이사르 | 넵 알겠습니다. irc 네트워크 소모량은 매우 적으니 나중에 기회 되시면 한번 써보세요~ -카이사르 > 니쉬 | 저 이번5시턴 첩보한번돌릴수있는데 발령어디든지주시면 건업이나 남해 이런데 할게요... - 니쉬 > 카이사르 | 상동 발령 넣었습니다. -카이사르 > 니쉬 | 수뇌스핀은 1월,7월에 초기화되는건가요? 6시턴에보고 광록훈자리로갈게요.. 우장군은 스핀하게되면 그사람줄게요 - 니쉬 > 카이사르 | 네 1, 7월 입니다. - 니쉬 > 카이사르 | 임사영님 자리는 필즉 끝난 후 저로 교체 해주시면 될거같습니다. - 니쉬 > 카이사르 | 이쓰미님 짜르셨네 =_=a -카이사르 > 니쉬 | 접률이 니쉬님이 훨씬 좋으니까 혹 5-6시턴에 발령이 필요할 수 있자나요.. 이쓰미님이야 8시 이후에 다시 사령주면되니깐요.. - 니쉬 > 카이사르 | 넵. / =_= - 니쉬 > 잠둥이션 | Anes님 오로 발령해주세요 - 니쉬 > Anes | 오 발령 부탁드렸으니 탐라 치셔도 될 거 같으시면 부대 내려서 탐라 쳐주세요 - 니쉬 > 감정 | 탐라 출병이요 - 니쉬 > 잠둥이션 | 잠둥님 함곡에 있는 부대 자동으로 발령 좀 부탁드립니다 - 니쉬 > 감정 | 남만 출병 부탁드립니다. - 니쉬 > DVa | 魯堂首님 첫턴에 Dva님 덕양으로 발령해주세요. - 니쉬 > 잠둥이션 | 내나님 오로 발령해주세요 -카이사르 > 魯堂首 | Dva님은 제가발령주니 내나님 오로 좀 발령주세요 -카이사르 > 魯堂首 | Kulee 탐라로 발령부탁합니다~ - 니쉬 > 魯堂首 | 魯堂首님 김우민 탐라로 발령 좀 부탁드립니다. -카이사르 > 니쉬 | 벌써 저 사비로 발령예턴했네요 ㄷ ㄷ -카이사르 > 장임 | 아네스님이 사비먹을거니까 사비로 발령줄게요 같이 위례치죠 - 니쉬 > 카이사르 | 사비 넘어갈껀 뻔히 보이고 카이사르님이 오실껀 알았으니까유~ b - 니쉬 > 魯堂首 | 魯堂首 이도로 출병 부탁드립니다. - 니쉬 > 전인호 | 접속해서 보시면 출병지 이도로 해주시면 감사하겠습니다 - 니쉬 > Anes | 그만좀불러 부대 대로 이동시켜주세요. - Anes > 니쉬 | 네넹 - 니쉬 > Anes | 아 죄송해요 대로 발령은 빼주셔도 됩니다 - 니쉬 > 카이사르 | 사비에 수비 병력좀 발령해주세요. 부대 발령이 늦어서 - 니쉬 > 魯堂首 | 魯堂首님 잠시 출병 하지 말고 내정 한두턴만 입력해주세요 - 니쉬 > 魯堂首 | 魯堂首 악마사냥꾼 이도로 발령좀 부탁드립니다. -눈팅하러옴 > Anes | ㅁㄱ 이다 ㅁㄱㅁㄱ -카이사르 > 니쉬 | 흠..시상으로 발령주시면 제가 산월, 고창 마무리할까요? - 니쉬 > 카이사르 | 발령드림 -눈팅하러옴 > 청기사 | ㅁㄱㅁㄱ? - 니쉬 > 카이사르 | 발령 캔슬 할까요? -카이사르 > 니쉬 | 발령주세요 - 니쉬 > 카이사르 | 홍농 재연결 시도해보시는건? -카이사르 > 니쉬 | 넵 - 니쉬 > 카이사르 | 함곡 발령 넣었습니다. - 니쉬 > Anes | 함곡 발령 주세요. 모출이라도 해야겠네요 - 니쉬 > 이쓰미 | 발령 빼주세요. - 니쉬 > 직장인페이트 | 유구 출 부탁 드립니다. -카이사르 > Anes | Anes님 포상턴(북오더,전인호) 2개 제가 가져갑니다.. - 카토 > Navy마초 | 마초님 오시면 일본어님 금몰수 빼주세요 - 니쉬 > 카이사르 | 하내 출 저도 할게유 - 니쉬 > 카이사르 | 출병지 수정 원하시면 갠매 주세요 -카이사르 > 니쉬 | 니쉬님이 하내 한방에 딸수있나요? 한방에따게되면 저는 서주나 고창 산월같은데 정리하는게 낫고... - 니쉬 > 카이사르 | 힘들껄요? 귀병이라 복불복이 심해요 -카이사르 > 니쉬 | 그럼 저는 그대로 하내출병할게요.. 업이랑 복양에갖힌 부대부터 구조하죠 - 청기사 > 눈팅하러옴 | ㅇㅇ - 카토 > 바닥을탁치고 | 턴전에 보시면 저 쌀 1만 포상도 넣어주시고 요양 1턴하세요 - 카토 > Navy마초 | 마초님 턴전에 보시면 군주님 진양 발령이요 - 카토 > 엄백호 | 보시면 미과님 금쌀 1만씩 몰수해주세요 -카이사르 > 니쉬 | 여강에 니콜 충차 왔는데 파양쳐서 끊겠죠? 니콜 턴 시각이 언제였더라;;; - 니쉬 > Anes | 저 적벽 발령좀 주세요 - 니쉬 > 카이사르 | 발령드렸으니 보세요 - 니쉬 > 카이사르 | anes로 스핀해서 저 파양 보내주세요. - 니쉬 > 카이사르 | 쥬비아님 발령 제가함 - 니쉬 > 무광 | 페이트님 남해 발령이요 - 니쉬 > 직장인페이트 | 산월 따주세요 -눈팅하러옴 > 청기사 | 담기 건국하느실거? - 청기사 > 눈팅하러옴 | ㄴㄴ 망겜 이 - 청기사 > 눈팅하러옴 | 건국 안할 예정 ㅇㅇ... 멀티놈 천통 이후 정 다 떨어짐 ㅋㅋ.. -눈팅하러옴 > 청기사 | 누가 멀티천통함? - 청기사 > 눈팅하러옴 | 파도 -눈팅하러옴 > 청기사 | 망겜이네 쿠마도 천통하는 망겜 - 청기사 > 눈팅하러옴 | 쿠마 - 파도 천통하더니 사람 걍 다 빠짐ㅋㅋ -잠둥이션 > 카이사르 | 카이사르를 내 마음 속으로 발령 좀 - 카토 > 바닥을탁치고 | 메구리부대 빠졌으니 그 턴 대신 제 금포상 부탁해용 -카이사르 > 잠둥이션 | -_-a -잠둥이션 > 카이사르 | 사랑해요. - 무광 > 이쓰미 | 쥬비아님을 건업으로 발령해주세요. 더문님은 이미 제가버냄 - 무광 > 잠둥이션 | 초한번 때려보세용.. 패는 나중에 먹어도되니깡 -잠둥이션 > 무광 | 어찌 군주께서는 저를 서열 8위에서 일반장수로 파직하였나이까. - 무광 > 잠둥이션 | 턴 입력 가능하시옵니까 지금? 너굴경 부탁이있소 - 카토 > Navy마초 | 마초님 턴전에 보시면 메구리부대 합비 보내주세요 - 카토 > Navy마초 | 다이스 제갈여포님도 금 7천씩 넣어주세요 - 카토 > 橙 | 발령가니 출병 건업으로 가주세여 - 무광 > 잠둥이션 | 수뇌 드릴테니 감정님 서주로 보내주세요 - 무광 > 잠둥이션 | 으앙 나가셨엉.. - 무광 > Anes | 감정님을 서주로 보내주세요! - 무광 > 아르카나하트 | 여남이나 허창 출병해주세요! - 니쉬 > Anes | 무광님 말고 김우민 부대 건업으로 보내세요 - 무광 > 이쓰미 | 이번턴 전에 혹시 오시면 비밀님 초 발령좀해주세요 - 무광 > 내나 | 페하 고자부대로 부대 갈아타시옵소서 - 무광 > 내나 | 그리고 허창돌격 - 무광 > 비밀 | 식품영약학부대타셔야 허창출병됩니다 - 무광 > 이쓰미 | 비밀님 접속하셔서 부대 옮겨탔어용 kulee를 정도로 보내주세염 - 무광 > 진리 | kulee정도로 보내주세요! - 무광 > 魯堂首 | kulee 를 정도로보내주세요 - 무광 > 직장인페이트 | 저까지만 먹고 완부대나 초부대 타시고 여남 수춘 합비 정리해주세영! - 무광 > 북두칠성 | 이제 완에서 출병하셔도 되옵니다 적의 공세가 약해졌슴다 - 니쉬 > Anes | anes님 저 건업 발령좀 해주세요. - 무광 > 魯堂首 | 강서유서님 부대타서 발령 괜찮으니, kulee를 복양으로 보내주세요 - 무광 > 카이사르 | 오시면 갠메주세여 7월이후에 다시 수뇌자리드릴게유 -카이사르 > 무광 | 네 있습니다.. 근데 저 왜로가요? - 무광 > 카이사르 | 음 네 고창은 급하지 않으니깐요 - 무광 > 카이사르 | 아니다 그냥 왜버리고 복양 kulee부대타시고 위에 계교 때려주세여 - 무광 > 카이사르 | 왜 민심이 낮아서 어차피 버려야할거같아여 - 무광 > 진리 | 그냥 카이사르님 발령 빼주세여 왜는 민심이 낮아서 어차피 얼마 못 갈거 같아요. -카이사르 > 무광 | 업이 성벽은 더 낮을텐데 걍 계교로갈까요? - 무광 > 카이사르 | 아 감정님이 2턴뒤네요 바로 업치시는줄 그럼 바로 업 가주세영 - 무광 > 魯堂首 | 7월에 남피 발령 안먹히니깐 악마사냥꾼 진류로 발령해주세염 - 니쉬 > 잠둥이션 | anes님 금포 좀 부탁드려요 - 무광 > 카이사르 | 디바님을 업으로 보내주세요 - 무광 > 魯堂首 | 오부대타시고 탐라한번 때려주세영 - 魯堂首 > 무광 | 한방에 전멸이라...ㅠ - 무광 > 魯堂首 | 헉 ㅋㅋ - 니쉬 > 진리 | 1턴 쿠요님 오로 발령 부탁드려요 - 니쉬 > 魯堂首 | 식품영양학 북평 발령해주세요 - 니쉬 > 魯堂首 | 아 역경으로 해주세유 - 카토 > 엄백호 | 엄백호님 1턴 저 쌀 1만 포상 2턴부터 니콜 금1만 몰수 청기사 금1만 쌀2만 몰수 부탁해용 -카이사르 > 잠둥이션 | 잠둥이션님.. 쿠요님 정도로 발령주세요. 수비시키게요 -카이사르 > 잠둥이션 | 초에 있는 노당수님 정도로 빼주세요.. (쿠요님 말고) - 무광 > 직장인페이트 | 악마사냥꾼부대타고 탈출하세요 -카이사르 > 魯堂首 | 직장인페이트님 완으로 빼주세요.. 그리고 노당수님 타고있는 부대 완으로 가니 탈출해주세요. - 무광 > 잠둥이션 | kulee부대 리필됬어요 내리세요 ㅋㅋ -카이사르 > 魯堂首 | 아녀 이미 늦었어요..직장인페이트님은 부대타고 완으로 갈겁니다. 다른사령턴 실행해주시면 됩니다. -잠둥이션 > 무광 | 리필이요?? - 무광 > 잠둥이션 | 집합 끊겼었거든요. 다시 채워져서 복양에서 소환중.. -잠둥이션 > 무광 | ㅇㅎㅇㅎ 재징한다음에 안평으루 갈께용 ㅎㅁㅎ -카이사르 > 잠둥이션 | 전기전자(고자부대) 보내세요~ - 니쉬 > 직장인페이트 | 페이트님 북평 출병 넣어주시면 감사하겠습니다. - 니쉬 > 잠둥이션 | 국메 봐주세욯 - 니쉬 > 직장인페이트 | 이번턴에 진류로 발령 되실껍니다. - Anes > 무광 | 무광님 페이트님 출병지보니 진류보단 완으로 발령을 - Anes > DVa | 여남하고 초는 페이트님이 치니까 다른곳 출병넣어쥬세요 - Anes > DVa | 아니다 잘못봤네요 죄송합니다. - 니쉬 > 카이사르 | 요양하세요 -카이사르 > 니쉬 | 요양완료 - 니쉬 > 카이사르 | 승상의 건강 소중히 지키세유. - 니쉬 > 감정 | 계림에 첩보 넣어드리니 상황보시고 출병지 정하세요 - 니쉬 > 감정 | 계림 수비없음 거기 치시고 있으면 왜 ㄱ -카이사르 > 니쉬 | ㅎㅎㅎ ㅡㅡ;;; - 니쉬 > 직장인페이트 | 대로 출병 바로 해주세요 - 니쉬 > 장임 | 계신가유~~~ - Anes > 감정 | 완 발령넣어둘테니 여남출점 부탁드려요 diff --git a/che_close/logs/_history.txt b/che_close/logs/_history.txt deleted file mode 100644 index 1f1b6e4f..00000000 --- a/che_close/logs/_history.txt +++ /dev/null @@ -1,1093 +0,0 @@ -●179년 8월:【거병】비월(이)가 세력을 결성하였습니다. -●179년 9월:【거병】부관(이)가 세력을 결성하였습니다. -●179년 9월:【거병】KAITO(이)가 세력을 결성하였습니다. -●179년 9월:【거병】무광(이)가 세력을 결성하였습니다. -●179년 9월:【거병】최태원(이)가 세력을 결성하였습니다. -●179년 9월:【랜덤임관상품】재야ㅇωㅇ(이)가 오석산(치료)(을)를 습득했습니다! -●179년 9월:【랜덤임관상품】재야정휘인(이)가 논어(+7)(을)를 습득했습니다! -●179년 9월:【거병】하루카(이)가 세력을 결성하였습니다. -●179년 9월:【거병】갸오오(이)가 세력을 결성하였습니다. -●179년 9월:【랜덤임관상품】재야ㄷㄱㅎㅈㄷㅀ(이)가 적란마(+14)(을)를 습득했습니다! -●179년 9월:【랜덤임관상품】재야북오더(이)가 의적주(사기)(을)를 습득했습니다! -●179년 9월:【건국】명 가 블소(이)가 새로이 등장하였습니다. -●179년 9월:【랜덤임관상품】재야魯堂首(이)가 철편(+7)(을)를 습득했습니다! -●179년 10월:【랜덤임관상품】재야임사영(이)가 백마(+7)(을)를 습득했습니다! -●179년 10월:【건국상품】긔엽긔부관(이)가 기주마(+7)(을)를 습득했습니다! -●179년 10월:【건국】명 가 긔엽긔(이)가 새로이 등장하였습니다. -●179년 10월:【랜덤임관상품】재야DVa(이)가 양주마(+8)(을)를 습득했습니다! -●179년 10월:【건국】명 가 보컬로이드(이)가 새로이 등장하였습니다. -●179년 10월:【랜덤임관상품】재야진리(이)가 구국론(+10)(을)를 습득했습니다! -●179년 10월:【건국】종 횡 가 우승후보넥센(이)가 새로이 등장하였습니다. -●179년 10월:【랜덤임관상품】재야다이스(이)가 무후행군(치료)(을)를 습득했습니다! -●179년 10월:【건국】유 가 사랑꾼들(이)가 새로이 등장하였습니다. -●179년 10월:【거병】소드락(이)가 세력을 결성하였습니다. -●179년 10월:【랜덤임관상품】재야하연주(이)가 의천검(+15)(을)를 습득했습니다! -●179년 10월:【랜덤임관상품】재야직장인페이트(이)가 철질여골(+8)(을)를 습득했습니다! -◆179년 11월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●179년 11월:【거병】일기토지배자(이)가 세력을 결성하였습니다. -●179년 11월:【랜덤임관상품】재야니콜(이)가 철척사모(+12)(을)를 습득했습니다! -●179년 11월:【선양】부관(이)가 긔엽긔의 군주 자리를 박일아에게 선양했습니다. -●179년 11월:【건국】유 가 접속잘안함(이)가 새로이 등장하였습니다. -●179년 11월:【건국】종 횡 가 종횡무진(이)가 새로이 등장하였습니다. -●179년 11월:【건국상품】어엿븐소드락소드락(이)가 기주마(+7)(을)를 습득했습니다! -●179년 11월:【건국】도 적 어엿븐소드락(이)가 새로이 등장하였습니다. -●179년 12월:【랜덤임관상품】재야니쉬(이)가 대부(+10)(을)를 습득했습니다! -●179년 12월:【랜덤임관상품】재야선비(이)가 칠엽청점(치료)(을)를 습득했습니다! -●179년 12월:【국기변경】우승후보넥센(이)가 국기를 변경하였습니다. -●180년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★180년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●180년 1월:【랜덤임관상품】재야고긔가먹고싶(이)가 언월도(+14)(을)를 습득했습니다! -◆180년 2월: 전력전 대회에서 대악마(이)가 우승, 일기토지배자(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆180년 2월: 전력전 대회의 우승자에게는 400, 준우승자에겐 240의 상금과 약간의 명성이 주어집니다! -◆180년 4월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●180년 4월:【거병】SARS(이)가 세력을 결성하였습니다. -●180년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -◆180년 7월: 설전 대회에서 선비(이)가 우승, 쥬비아(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆180년 7월: 설전 대회의 우승자에게는 400, 준우승자에겐 240의 상금과 약간의 명성이 주어집니다! -◆180년 8월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●180년 8월:【거병】장임(이)가 세력을 결성하였습니다. -●180년 9월:【랜덤임관상품】재야내정달인(이)가 전론(+8)(을)를 습득했습니다! -●180년 10월:【건국】오 두 미 도 30하고망함(이)가 새로이 등장하였습니다. -◆180년 11월: 일기토 대회에서 일기토지배자(이)가 우승, KAITO(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆180년 11월: 일기토 대회의 우승자에게는 400, 준우승자에겐 240의 상금과 약간의 명성이 주어집니다! -●180년 12월:【아이템】보컬로이드바닥을탁치고(이)가 위료자(+7)(을)를 습득했습니다! -●180년 12월:【랜덤임관상품】재야Navy마초(이)가 춘추전(+11)(을)를 습득했습니다! -●181년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★181년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●181년 1월:【선포】30하고망함(이)가 긔엽긔에 선전 포고 하였습니다. -●181년 1월:【건국】명 가 막겜(이)가 새로이 등장하였습니다. -●181년 2월:【랜덤임관상품】재야정력왕(이)가 삼첨도(+10)(을)를 습득했습니다! -◆181년 3월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●181년 6월:【아이템】사랑꾼들누렁(이)가 사륜거(+12)(을)를 습득했습니다! -●181년 6월:【건국상품】무력단련소일기토지배자(이)가 태평요술(회피)(을)를 습득했습니다! -●181년 6월:【건국】도 적 무력단련소(이)가 새로이 등장하였습니다. -◆181년 6월: 전력전 대회에서 갸오오(이)가 우승, 정휘인(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆181년 6월: 전력전 대회의 우승자에게는 440, 준우승자에겐 264의 상금과 약간의 명성이 주어집니다! -●181년 6월:【거병】류화영(이)가 세력을 결성하였습니다. -●181년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -◆181년 7월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●181년 7월:【선포】블소(이)가 무력단련소에 선전 포고 하였습니다. -◆181년 10월: 전력전 대회에서 KAITO(이)가 우승, 코토와르(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆181년 10월: 전력전 대회의 우승자에게는 440, 준우승자에겐 264의 상금과 약간의 명성이 주어집니다! -◆181년 12월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●182년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★182년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -◆182년 3월: 전력전 대회에서 북두칠성(이)가 우승, 일기토지배자(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆182년 3월: 전력전 대회의 우승자에게는 480, 준우승자에겐 288의 상금과 약간의 명성이 주어집니다! -●182년 6월:【랜덤임관상품】재야랜임1분장(이)가 사기(+8)(을)를 습득했습니다! -●182년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●182년 8월:【멸망】류화영은(는) 멸망했습니다. -◆182년 9월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -◆182년 12월: 전력전 대회에서 리안(이)가 우승, 평민킬러(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆182년 12월: 전력전 대회의 우승자에게는 480, 준우승자에겐 288의 상금과 약간의 명성이 주어집니다! -●183년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★183년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●183년 1월:【재난】강릉 하비 강주 건녕 오환 장판 에 역병이 발생하여 도시가 황폐해지고 있습니다. -●183년 1월:【개전】긔엽긔(와)과 30하고망함(이)가 전쟁을 시작합니다. -●183년 1월:【지배】종횡무진(이)가 가정(을)를 지배했습니다. -●183년 1월:【지배】긔엽긔(이)가 남만(을)를 지배했습니다. -●183년 1월:【지배】블소(이)가 정도(을)를 지배했습니다. -●183년 1월:【아이템】재야일본어번역기(이)가 장자(+9)(을)를 습득했습니다! -●183년 1월:【분쟁】종횡무진(이)가 공략에 가담하여 분쟁이 발생하고 있습니다. -●183년 1월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●183년 1월:【분쟁협상】우승후보넥센(이)가 영토분쟁에서 우위를 점하여 (을)를 양도받았습니다. -●183년 1월:【지배】우승후보넥센(이)가 (을)를 지배했습니다. -●183년 1월:【지배】긔엽긔(이)가 남해(을)를 지배했습니다. -●183년 1월:【멸망】30하고망함(이)가 멸망하였습니다. -●183년 2월:【작위】긔엽긔의 군주가 독립하여 군벌로 나섰습니다. -●183년 2월:【작위】우승후보넥센의 군주가 독립하여 군벌로 나섰습니다. -◆183년 2월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●183년 2월:【지배】우승후보넥센(이)가 천수(을)를 지배했습니다. -●183년 2월:【선포】종횡무진(이)가 우승후보넥센에 선전 포고 하였습니다. -●183년 2월:【지배】종횡무진(이)가 안정(을)를 지배했습니다. -●183년 2월:【지배】사랑꾼들(이)가 강주(을)를 지배했습니다. -●183년 2월:【지배】어엿븐소드락(이)가 하내(을)를 지배했습니다. -●183년 2월:【지배】우승후보넥센(이)가 적도(을)를 지배했습니다. -●183년 2월:【지배】종횡무진(이)가 가맹(을)를 지배했습니다. -●183년 3월:【작위】종횡무진의 군주가 독립하여 군벌로 나섰습니다. -●183년 3월:【작위】사랑꾼들의 군주가 독립하여 군벌로 나섰습니다. -●183년 3월:【작위】어엿븐소드락의 군주가 독립하여 군벌로 나섰습니다. -●183년 3월:【지배】접속잘안함(이)가 상용(을)를 지배했습니다. -●183년 3월:【지배】긔엽긔(이)가 (을)를 지배했습니다. -●183년 3월:【지배】블소(이)가 (을)를 지배했습니다. -●183년 3월:【국기변경】어엿븐소드락(이)가 국기를 변경하였습니다. -●183년 3월:【지배】어엿븐소드락(이)가 사곡(을)를 지배했습니다. -●183년 3월:【지배】종횡무진(이)가 자동(을)를 지배했습니다. -●183년 3월:【지배】긔엽긔(이)가 상동(을)를 지배했습니다. -●183년 4월:【재난】주시 이도 역경 유구 에 태풍으로 인해 피해가 속출하고 있습니다. -●183년 4월:【작위】블소의 군주가 독립하여 군벌로 나섰습니다. -●183년 4월:【작위】긔엽긔의 군주가 주자사에 임명되었습니다. -●183년 4월:【작위】접속잘안함의 군주가 독립하여 군벌로 나섰습니다. -●183년 4월:【지배】종횡무진(이)가 양평(을)를 지배했습니다. -●183년 4월:【지배】긔엽긔(이)가 산월(을)를 지배했습니다. -●183년 4월:【지배】긔엽긔(이)가 유구(을)를 지배했습니다. -●183년 4월:【지배】막겜(이)가 영릉(을)를 지배했습니다. -●183년 5월:【작위】막겜의 군주가 독립하여 군벌로 나섰습니다. -●183년 5월:【지배】종횡무진(이)가 한중(을)를 지배했습니다. -●183년 5월:【지배】종횡무진(이)가 기산(을)를 지배했습니다. -◆183년 5월: 전력전 대회에서 미친과학(이)가 우승, 박일아(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆183년 5월: 전력전 대회의 우승자에게는 520, 준우승자에겐 312의 상금과 약간의 명성이 주어집니다! -●183년 6월:【지배】보컬로이드(이)가 탐라(을)를 지배했습니다. -●183년 6월:【랜덤임관상품】재야천괴금(이)가 서량마(+11)(을)를 습득했습니다! -●183년 6월:【지배】보컬로이드(이)가 이도(을)를 지배했습니다. -●183년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●183년 7월:【재난】북평 회계 이릉 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●183년 7월:【개전】블소(와)과 무력단련소(이)가 전쟁을 시작합니다. -●183년 7월:【작위】보컬로이드의 군주가 독립하여 군벌로 나섰습니다. -◆183년 7월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●183년 7월:【지배】접속잘안함(이)가 양양(을)를 지배했습니다. -●183년 7월:【분쟁】보컬로이드(이)가 공략에 가담하여 분쟁이 발생하고 있습니다. -●183년 7월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●183년 7월:【분쟁협상】긔엽긔(이)가 영토분쟁에서 우위를 점하여 (을)를 양도받았습니다. -●183년 7월:【지배】어엿븐소드락(이)가 함곡(을)를 지배했습니다. -●183년 7월:【선포】긔엽긔(이)가 보컬로이드에 선전 포고 하였습니다. -●183년 8월:【지배】사랑꾼들(이)가 덕양(을)를 지배했습니다. -●183년 8월:【지배】접속잘안함(이)가 장판(을)를 지배했습니다. -●183년 8월:【지배】블소(이)가 여남(을)를 지배했습니다. -●183년 8월:【멸망】무력단련소(이)가 멸망하였습니다. -●183년 8월:【선포】사랑꾼들(이)가 종횡무진에 선전 포고 하였습니다. -●183년 9월:【지배】긔엽긔(이)가 회계(을)를 지배했습니다. -●183년 9월:【지배】접속잘안함(이)가 적벽(을)를 지배했습니다. -●183년 9월:【지배】긔엽긔(이)가 고창(을)를 지배했습니다. -●183년 9월:【지배】종횡무진(이)가 면죽(을)를 지배했습니다. -●183년 10월:【재난】장사 대 동황 적도 장판 에 혹한으로 도시가 황폐해지고 있습니다. -●183년 10월:【작위】긔엽긔의 군주가 주목에 임명되었습니다. -●183년 10월:【지배】블소(이)가 수춘(을)를 지배했습니다. -◆183년 10월: 전력전 대회에서 감정(이)가 우승, 정휘인(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆183년 10월: 전력전 대회의 우승자에게는 520, 준우승자에겐 312의 상금과 약간의 명성이 주어집니다! -●183년 11월:【분쟁】긔엽긔(이)가 공략에 가담하여 분쟁이 발생하고 있습니다. -●183년 11월:【지배】긔엽긔(이)가 계양(을)를 지배했습니다. -●183년 11월:【지배】접속잘안함(이)가 강릉(을)를 지배했습니다. -●183년 11월:【지배】블소(이)가 합비(을)를 지배했습니다. -●183년 11월:【지배】어엿븐소드락(이)가 호관(을)를 지배했습니다. -●183년 11월:【지배】사랑꾼들(이)가 주시(을)를 지배했습니다. -●183년 12월:【지배】긔엽긔(이)가 시상(을)를 지배했습니다. -●184년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★184년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●184년 1월:【재난】회계 왜 호관 함곡 사수 광릉 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●184년 1월:【작위】긔엽긔의 군주가 공에 임명되었습니다. -●184년 2월:【지배】어엿븐소드락(이)가 진양(을)를 지배했습니다. -●184년 2월:【분쟁】막겜(이)가 장사 공략에 가담하여 분쟁이 발생하고 있습니다. -●184년 2월:【지배】접속잘안함(이)가 무릉(을)를 지배했습니다. -●184년 2월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●184년 2월:【선포】접속잘안함(이)가 긔엽긔에 선전 포고 하였습니다. -●184년 3월:【작위】접속잘안함의 군주가 주자사에 임명되었습니다. -◆184년 3월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●184년 3월:【아이템】접속잘안함김우민(이)가 대완마(+10)(을)를 습득했습니다! -●184년 3월:【지배】접속잘안함(이)가 여강(을)를 지배했습니다. -●184년 3월:【지배】접속잘안함(이)가 장사(을)를 지배했습니다. -●184년 3월:【분쟁협상】막겜(이)가 영토분쟁에서 우위를 점하여 장사(을)를 양도받았습니다. -●184년 4월:【재난】건업 장사 계양 강하 산월 가맹 에 지진으로 피해가 속출하고 있습니다. -●184년 4월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●184년 4월:【지배】블소(이)가 허창(을)를 지배했습니다. -●184년 4월:【지배】보컬로이드(이)가 위례(을)를 지배했습니다. -●184년 5월:【작위】블소의 군주가 주자사에 임명되었습니다. -●184년 5월:【지배】블소(이)가 관도(을)를 지배했습니다. -◆184년 6월: 설전 대회에서 희지재(이)가 우승, 정휘인(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆184년 6월: 설전 대회의 우승자에게는 560, 준우승자에겐 336의 상금과 약간의 명성이 주어집니다! -●184년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●184년 7월:【재난】남피 한중 계교 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -●184년 7월:【지배】어엿븐소드락(이)가 흉노(을)를 지배했습니다. -◆184년 9월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●184년 9월:【지배】블소(이)가 사수(을)를 지배했습니다. -●184년 9월:【지배】블소(이)가 복양(을)를 지배했습니다. -●184년 10월:【재난】귀양 강 남만 동황 에 황건적이 출현해 도시를 습격하고 있습니다. -●184년 10월:【지배】막겜(이)가 건녕(을)를 지배했습니다. -●184년 10월:【지배】블소(이)가 계교(을)를 지배했습니다. -●184년 11월:【지배】블소(이)가 호로(을)를 지배했습니다. -●184년 12월:【아이템】어엿븐소드락쥬비아(이)가 동추(+7)(을)를 습득했습니다! -◆184년 12월: 일기토 대회에서 일기토지배자(이)가 우승, 류화영(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆184년 12월: 일기토 대회의 우승자에게는 560, 준우승자에겐 336의 상금과 약간의 명성이 주어집니다! -●185년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★185년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●185년 1월:【재난】양양 남해 북해 홍농 고창 대 에 지진으로 피해가 속출하고 있습니다. -●185년 1월:【선포】막겜(이)가 긔엽긔에 선전 포고 하였습니다. -●185년 2월:【개전】우승후보넥센(와)과 종횡무진(이)가 전쟁을 시작합니다. -●185년 2월:【아이템】우승후보넥센감정(이)가 노자(+15)(을)를 습득했습니다! -●185년 2월:【지배】블소(이)가 북해(을)를 지배했습니다. -●185년 2월:【아이템】종횡무진카토(이)가 철쇄(+7)(을)를 습득했습니다! -●185년 3월:【지배】블소(이)가 동황(을)를 지배했습니다. -●185년 3월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●185년 4월:【재난】산월 호로 에 홍수로 인해 피해가 급증하고 있습니다. -●185년 4월:【작위】종횡무진의 군주가 주자사에 임명되었습니다. -●185년 4월:【지배】종횡무진(이)가 천수(을)를 지배했습니다. -●185년 5월:【지배】막겜(이)가 운남(을)를 지배했습니다. -●185년 5월:【지배】블소(이)가 진류(을)를 지배했습니다. -●185년 6월:【작위】블소의 군주가 주목에 임명되었습니다. -●185년 6월:【작위】막겜의 군주가 주자사에 임명되었습니다. -●185년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●185년 7월:【재난】장사 시상 하변 남영 정도 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●185년 7월:【개전】긔엽긔(와)과 보컬로이드(이)가 전쟁을 시작합니다. -●185년 7월:【지배】블소(이)가 평원(을)를 지배했습니다. -●185년 7월:【아이템】사랑꾼들갸오오(이)가 오자병법(+14)(을)를 습득했습니다! -●185년 7월:【지배】블소(이)가 안평(을)를 지배했습니다. -●185년 7월:【아이템】블소비월(이)가 사마법(+7)(을)를 습득했습니다! -●185년 8월:【개전】종횡무진(와)과 사랑꾼들(이)가 전쟁을 시작합니다. -◆185년 9월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●185년 10월:【재난】덕양 강주 하변 졸본 남만 가맹 백랑 에 황건적이 출현해 도시를 습격하고 있습니다. -●185년 10월:【지배】접속잘안함(이)가 강하(을)를 지배했습니다. -●185년 10월:【지배】블소(이)가 서주(을)를 지배했습니다. -●185년 11월:【작위】블소의 군주가 공에 임명되었습니다. -●185년 11월:【작위】접속잘안함의 군주가 주목에 임명되었습니다. -●185년 11월:【지배】보컬로이드(이)가 회계(을)를 지배했습니다. -●185년 11월:【지배】보컬로이드(이)가 파양(을)를 지배했습니다. -●185년 12월:【작위】보컬로이드의 군주가 주자사에 임명되었습니다. -◆185년 12월: 통솔전 대회에서 대악마(이)가 우승, 진리(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆185년 12월: 통솔전 대회의 우승자에게는 600, 준우승자에겐 360의 상금과 약간의 명성이 주어집니다! -●185년 12월:【지배】블소(이)가 졸본(을)를 지배했습니다. -●185년 12월:【지배】보컬로이드(이)가 산월(을)를 지배했습니다. -●185년 12월:【지배】종횡무진(이)가 서량(을)를 지배했습니다. -●185년 12월:【긴급천도】우승후보넥센(이)가 수도가 함락되어 으로 긴급천도하였습니다. -●186년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★186년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●186년 1월:【재난】완 장사 진양 북해 동황 에 지진으로 피해가 속출하고 있습니다. -●186년 1월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●186년 2월:【개전】긔엽긔(와)과 접속잘안함(이)가 전쟁을 시작합니다. -●186년 2월:【지배】접속잘안함(이)가 시상(을)를 지배했습니다. -●186년 2월:【지배】어엿븐소드락(이)가 (을)를 지배했습니다. -●186년 3월:【작위】어엿븐소드락의 군주가 주자사에 임명되었습니다. -●186년 3월:【지배】접속잘안함(이)가 고창(을)를 지배했습니다. -●186년 3월:【지배】종횡무진(이)가 적도(을)를 지배했습니다. -●186년 4월:【호황】강하 관도 에 호황으로 도시가 번창하고 있습니다. -●186년 4월:【지배】종횡무진(이)가 덕양(을)를 지배했습니다. -●186년 4월:【지배】어엿븐소드락(이)가 역경(을)를 지배했습니다. -●186년 4월:【고립】유구(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●186년 5월:【작위】종횡무진의 군주가 주목에 임명되었습니다. -●186년 5월:【지배】블소(이)가 백랑(을)를 지배했습니다. -●186년 6월:【휴전】긔엽긔(와)과 보컬로이드(이)가 휴전합니다. -●186년 6월:【지배】접속잘안함(이)가 이릉(을)를 지배했습니다. -●186년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●186년 7월:【재난】허창 서주 오환 유구 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -●186년 7월:【지배】접속잘안함(이)가 영안(을)를 지배했습니다. -●186년 7월:【지배】보컬로이드(이)가 건업(을)를 지배했습니다. -●186년 8월:【작위】보컬로이드의 군주가 주목에 임명되었습니다. -●186년 8월:【작위】접속잘안함의 군주가 공에 임명되었습니다. -●186년 8월:【지배】접속잘안함(이)가 상동(을)를 지배했습니다. -●186년 8월:【선포】보컬로이드(이)가 긔엽긔에 선전 포고 하였습니다. -●186년 8월:【지배】보컬로이드(이)가 광릉(을)를 지배했습니다. -●186년 9월:【지배】종횡무진(이)가 강주(을)를 지배했습니다. -●186년 10월:【재난】낙양 이도 강 가정 면죽 에 지진으로 피해가 속출하고 있습니다. -◆186년 10월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●186년 10월:【지배】접속잘안함(이)가 계양(을)를 지배했습니다. -●186년 11월:【고립】(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●186년 12월:【지배】보컬로이드(이)가 유구(을)를 지배했습니다. -●186년 12월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●186년 12월:【멸망】우승후보넥센(이)가 멸망하였습니다. -●187년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★187년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●187년 1월:【재난】영안 이릉 에 지진으로 피해가 속출하고 있습니다. -●187년 1월:【개전】긔엽긔(와)과 막겜(이)가 전쟁을 시작합니다. -◆187년 1월: 통솔전 대회에서 DVa(이)가 우승, 하기싫은데(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆187년 1월: 통솔전 대회의 우승자에게는 640, 준우승자에겐 384의 상금과 약간의 명성이 주어집니다! -●187년 1월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●187년 2월:【지배】긔엽긔(이)가 남영(을)를 지배했습니다. -●187년 2월:【긴급천도】막겜(이)가 수도가 함락되어 영릉으로 긴급천도하였습니다. -●187년 2월:【지배】긔엽긔(이)가 운남(을)를 지배했습니다. -●187년 3월:【지배】접속잘안함(이)가 남해(을)를 지배했습니다. -●187년 3월:【지배】종횡무진(이)가 주시(을)를 지배했습니다. -●187년 3월:【지배】종횡무진(이)가 귀양(을)를 지배했습니다. -●187년 3월:【멸망】사랑꾼들(이)가 멸망하였습니다. -●187년 3월:【지배】보컬로이드(이)가 평양(을)를 지배했습니다. -●187년 3월:【지배】긔엽긔(이)가 건녕(을)를 지배했습니다. -●187년 3월:【랜덤임관상품】재야南ことり(이)가 과실주(훈련)(을)를 습득했습니다! -●187년 4월:【호황】계림 에 호황으로 도시가 번창하고 있습니다. -●187년 4월:【작위】종횡무진의 군주가 공에 임명되었습니다. -●187년 4월:【지배】보컬로이드(이)가 사비(을)를 지배했습니다. -●187년 5월:【작위】보컬로이드의 군주가 공에 임명되었습니다. -●187년 6월:【지배】종횡무진(이)가 성도(을)를 지배했습니다. -●187년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●187년 7월:【재난】건녕 영릉 이도 산월 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●187년 7월:【지배】긔엽긔(이)가 영릉(을)를 지배했습니다. -●187년 7월:【긴급천도】막겜(이)가 수도가 함락되어 장사으로 긴급천도하였습니다. -●187년 8월:【원조】보컬로이드에서 막겜(으)로 물자를 지원합니다. -●187년 8월:【선포】접속잘안함(이)가 보컬로이드에 선전 포고 하였습니다. -●187년 8월:【랜덤임관상품】재야최태원(이)가 한혈마(+15)(을)를 습득했습니다! -●187년 9월:【지배】긔엽긔(이)가 장사(을)를 지배했습니다. -●187년 9월:【멸망】막겜(이)가 멸망하였습니다. -●187년 9월:【지배】긔엽긔(이)가 계양(을)를 지배했습니다. -●187년 9월:【지배】긔엽긔(이)가 무릉(을)를 지배했습니다. -●187년 10월:【재난】여남 북해 무릉 남만 에 지진으로 피해가 속출하고 있습니다. -●187년 10월:【지배】긔엽긔(이)가 강릉(을)를 지배했습니다. -◆187년 11월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●187년 11월:【랜덤임관상품】재야진(이)가 둔갑천서(회피)(을)를 습득했습니다! -●187년 12월:【랜덤임관상품】재야야근탈출(이)가 철질여골(+8)(을)를 습득했습니다! -●187년 12월:【지배】보컬로이드(이)가 하비(을)를 지배했습니다. -●187년 12월:【지배】긔엽긔(이)가 이릉(을)를 지배했습니다. -●188년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★188년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●188년 1월:【재난】허창 가맹 가정 적벽 에 역병이 발생하여 도시가 황폐해지고 있습니다. -●188년 1월:【아이템】종횡무진6974(이)가 철벽서(훈련)(을)를 습득했습니다! -●188년 1월:【고립】영안(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●188년 2월:【지배】긔엽긔(이)가 영안(을)를 지배했습니다. -◆188년 2월: 설전 대회에서 김우민(이)가 우승, 연이(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆188년 2월: 설전 대회의 우승자에게는 720, 준우승자에겐 432의 상금과 약간의 명성이 주어집니다! -●188년 2월:【아이템】종횡무진하루카(이)가 역경(+9)(을)를 습득했습니다! -●188년 3월:【지배】긔엽긔(이)가 장판(을)를 지배했습니다. -●188년 4월:【재난】하내 오 강 에 태풍으로 인해 피해가 속출하고 있습니다. -◆188년 4월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●188년 4월:【선포】종횡무진(이)가 어엿븐소드락에 선전 포고 하였습니다. -●188년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●188년 7월:【풍작】수춘 진양 주시 양평 유구 에 풍작으로 도시가 번창하고 있습니다. -◆188년 7월: 전력전 대회에서 정휘인(이)가 우승, 평민킬러(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆188년 7월: 전력전 대회의 우승자에게는 720, 준우승자에겐 432의 상금과 약간의 명성이 주어집니다! -●188년 8월:【개전】긔엽긔(와)과 보컬로이드(이)가 전쟁을 시작합니다. -◆188년 8월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●188년 9월:【고립】강하(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●188년 10월:【재난】장안 남피 시상 상동 저 함곡 양평 에 황건적이 출현해 도시를 습격하고 있습니다. -●188년 10월:【지배】긔엽긔(이)가 강하(을)를 지배했습니다. -●188년 10월:【지배】긔엽긔(이)가 적벽(을)를 지배했습니다. -●188년 10월:【고립】상동(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●188년 10월:【고립】여강(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●188년 11월:【지배】보컬로이드(이)가 여강(을)를 지배했습니다. -◆188년 11월: 전력전 대회에서 북오더(이)가 우승, 니콜(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆188년 11월: 전력전 대회의 우승자에게는 720, 준우승자에겐 432의 상금과 약간의 명성이 주어집니다! -●188년 11월:【아이템】긔엽긔낭군(이)가 고정도(+11)(을)를 습득했습니다! -●188년 11월:【지배】긔엽긔(이)가 남해(을)를 지배했습니다. -◆188년 12월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●188년 12월:【고립】시상(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●189년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★189년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●189년 1월:【재난】상용 천수 상동 여강 고창 강 에 황건적이 출현해 도시를 습격하고 있습니다. -●189년 1월:【지배】보컬로이드(이)가 남해(을)를 지배했습니다. -●189년 1월:【지배】어엿븐소드락(이)가 남피(을)를 지배했습니다. -●189년 1월:【고립】고창(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●189년 3월:【지배】보컬로이드(이)가 상동(을)를 지배했습니다. -◆189년 3월: 전력전 대회에서 카이스트(이)가 우승, 박일아(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆189년 3월: 전력전 대회의 우승자에게는 760, 준우승자에겐 456의 상금과 약간의 명성이 주어집니다! -●189년 4월:【재난】낙양 진류 회계 함곡 적도 에 지진으로 피해가 속출하고 있습니다. -●189년 4월:【지배】보컬로이드(이)가 고창(을)를 지배했습니다. -●189년 5월:【작위】보컬로이드의 군주가 왕에 등극하였습니다. -◆189년 5월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●189년 5월:【지배】보컬로이드(이)가 시상(을)를 지배했습니다. -●189년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●189년 7월:【재난】복양 서량 상용 계양 자동 오환 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●189년 8월:【개전】보컬로이드(와)과 접속잘안함(이)가 전쟁을 시작합니다. -◆189년 8월: 전력전 대회에서 러스티건(이)가 우승, 엄백호(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆189년 8월: 전력전 대회의 우승자에게는 760, 준우승자에겐 456의 상금과 약간의 명성이 주어집니다! -◆189년 9월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●189년 10월:【재난】남피 남해 사곡 에 지진으로 피해가 속출하고 있습니다. -●189년 10월:【지배】블소(이)가 낙양(을)를 지배했습니다. -●189년 10월:【아이템】블소전인호(이)가 보령압주(사기)(을)를 습득했습니다! -◆189년 12월: 전력전 대회에서 감정(이)가 우승, 낭군(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆189년 12월: 전력전 대회의 우승자에게는 760, 준우승자에겐 456의 상금과 약간의 명성이 주어집니다! -●189년 12월:【천재】안정에 천재가 등장했습니다. -●190년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★190년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●190년 1월:【재난】회계 흉노 광릉 에 역병이 발생하여 도시가 황폐해지고 있습니다. -◆190년 1월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●190년 2월:【휴전】보컬로이드(와)과 접속잘안함(이)가 휴전합니다. -●190년 2월:【지배】긔엽긔(이)가 시상(을)를 지배했습니다. -●190년 2월:【지배】접속잘안함(이)가 장판(을)를 지배했습니다. -●190년 2월:【지배】보컬로이드(이)가 계양(을)를 지배했습니다. -●190년 4월:【재난】하내 오 평원 상동 고창 에 홍수로 인해 피해가 급증하고 있습니다. -●190년 4월:【개전】종횡무진(와)과 어엿븐소드락(이)가 전쟁을 시작합니다. -●190년 4월:【지배】종횡무진(이)가 흉노(을)를 지배했습니다. -●190년 4월:【지배】접속잘안함(이)가 강릉(을)를 지배했습니다. -◆190년 4월: 통솔전 대회에서 제갈여포(이)가 우승, 장임(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆190년 4월: 통솔전 대회의 우승자에게는 800, 준우승자에겐 480의 상금과 약간의 명성이 주어집니다! -●190년 4월:【지배】종횡무진(이)가 하내(을)를 지배했습니다. -◆190년 6월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●190년 6월:【지배】접속잘안함(이)가 이릉(을)를 지배했습니다. -●190년 6월:【지배】보컬로이드(이)가 시상(을)를 지배했습니다. -●190년 6월:【지배】종횡무진(이)가 호관(을)를 지배했습니다. -●190년 6월:【고립】영안(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●190년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●190년 7월:【재난】천수 이도 사곡 에 지진으로 피해가 속출하고 있습니다. -●190년 7월:【분쟁】종횡무진(이)가 공략에 가담하여 분쟁이 발생하고 있습니다. -●190년 7월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●190년 7월:【분쟁협상】블소(이)가 영토분쟁에서 우위를 점하여 (을)를 양도받았습니다. -●190년 7월:【지배】접속잘안함(이)가 영안(을)를 지배했습니다. -●190년 7월:【지배】보컬로이드(이)가 장사(을)를 지배했습니다. -●190년 7월:【선포】블소(이)가 종횡무진에 선전 포고 하였습니다. -●190년 7월:【지배】종횡무진(이)가 진양(을)를 지배했습니다. -●190년 7월:【고립】남피(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●190년 8월:【작위】종횡무진의 군주가 왕에 등극하였습니다. -●190년 8월:【지배】접속잘안함(이)가 무릉(을)를 지배했습니다. -●190년 8월:【지배】접속잘안함(이)가 강하(을)를 지배했습니다. -●190년 8월:【고립】역경(이)가 보급이 끊겨 미지배 도시가 되었습니다. -◆190년 9월: 통솔전 대회에서 Anes(이)가 우승, 카토(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆190년 9월: 통솔전 대회의 우승자에게는 800, 준우승자에겐 480의 상금과 약간의 명성이 주어집니다! -●190년 9월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●190년 9월:【고립】적벽(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●190년 10월:【재난】업 사비 남영 상동 대 역경 관도 면죽 백랑 에 황건적이 출현해 도시를 습격하고 있습니다. -◆190년 10월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●190년 10월:【지배】긔엽긔(이)가 계양(을)를 지배했습니다. -●190년 10월:【지배】종횡무진(이)가 역경(을)를 지배했습니다. -●190년 11월:【지배】긔엽긔(이)가 장사(을)를 지배했습니다. -●190년 11월:【지배】긔엽긔(이)가 상동(을)를 지배했습니다. -●190년 11월:【지배】긔엽긔(이)가 무릉(을)를 지배했습니다. -●190년 11월:【지배】종횡무진(이)가 남피(을)를 지배했습니다. -●190년 12월:【지배】긔엽긔(이)가 시상(을)를 지배했습니다. -●190년 12월:【종전】어엿븐소드락(이)가 종횡무진(와)과 종전 합의 하였습니다. -●190년 12월:【지배】종횡무진(이)가 북평(을)를 지배했습니다. -●191년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★191년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●191년 1월:【재난】사비 가정 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●191년 1월:【지배】긔엽긔(이)가 적벽(을)를 지배했습니다. -●191년 1월:【분쟁】어엿븐소드락(이)가 장안 공략에 가담하여 분쟁이 발생하고 있습니다. -◆191년 1월: 전력전 대회에서 진리(이)가 우승, 니쉬(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆191년 1월: 전력전 대회의 우승자에게는 800, 준우승자에겐 480의 상금과 약간의 명성이 주어집니다! -●191년 1월:【아이템】보컬로이드엄백호(이)가 초선화(사기)(을)를 습득했습니다! -●191년 1월:【지배】종횡무진(이)가 장안(을)를 지배했습니다. -◆191년 2월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●191년 2월:【지배】블소(이)가 오환(을)를 지배했습니다. -●191년 2월:【지배】접속잘안함(이)가 장사(을)를 지배했습니다. -●191년 3월:【지배】접속잘안함(이)가 적벽(을)를 지배했습니다. -●191년 4월:【재난】복양 사비 합비 에 태풍으로 인해 피해가 속출하고 있습니다. -●191년 4월:【지배】접속잘안함(이)가 무릉(을)를 지배했습니다. -●191년 4월:【지배】접속잘안함(이)가 시상(을)를 지배했습니다. -◆191년 5월: 설전 대회에서 이쓰미(이)가 우승, 선비(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆191년 5월: 설전 대회의 우승자에게는 840, 준우승자에겐 504의 상금과 약간의 명성이 주어집니다! -◆191년 6월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●191년 6월:【지배】접속잘안함(이)가 계양(을)를 지배했습니다. -●191년 6월:【지배】보컬로이드(이)가 상동(을)를 지배했습니다. -●191년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●191년 7월:【재난】장안 장사 계 사비 주시 동황 에 지진으로 피해가 속출하고 있습니다. -●191년 8월:【아이템】보컬로이드메구리네루카(이)가 이강주(훈련)(을)를 습득했습니다! -●191년 9월:【지배】접속잘안함(이)가 영릉(을)를 지배했습니다. -◆191년 9월: 통솔전 대회에서 Anes(이)가 우승, DVa(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆191년 9월: 통솔전 대회의 우승자에게는 840, 준우승자에겐 504의 상금과 약간의 명성이 주어집니다! -●191년 10월:【재난】서주 남해 계양 사비 신야 가정 에 지진으로 피해가 속출하고 있습니다. -●191년 10월:【지배】접속잘안함(이)가 남영(을)를 지배했습니다. -●191년 10월:【지배】접속잘안함(이)가 건녕(을)를 지배했습니다. -◆191년 11월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●191년 11월:【선포】보컬로이드(이)가 접속잘안함에 선전 포고 하였습니다. -●191년 11월:【지배】접속잘안함(이)가 운남(을)를 지배했습니다. -●191년 12월:【지배】접속잘안함(이)가 남만(을)를 지배했습니다. -●192년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★192년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●192년 1월:【재난】남피 영안 운남 고창 광릉 에 지진으로 피해가 속출하고 있습니다. -●192년 1월:【작위】접속잘안함의 군주가 왕에 등극하였습니다. -◆192년 2월: 일기토 대회에서 Air(이)가 우승, 읭읭(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆192년 2월: 일기토 대회의 우승자에게는 880, 준우승자에겐 528의 상금과 약간의 명성이 주어집니다! -●192년 2월:【아이템】긔엽긔류화영(이)가 칠성검(+12)(을)를 습득했습니다! -◆192년 3월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●192년 4월:【재난】사비 계림 왜 기산 에 홍수로 인해 피해가 급증하고 있습니다. -●192년 6월:【아이템】긔엽긔북두칠성(이)가 과하마(+9)(을)를 습득했습니다! -◆192년 6월: 통솔전 대회에서 갸오오(이)가 우승, DVa(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆192년 6월: 통솔전 대회의 우승자에게는 880, 준우승자에겐 528의 상금과 약간의 명성이 주어집니다! -●192년 6월:【아이템】긔엽긔하기싫은데(이)가 두강주(사기)(을)를 습득했습니다! -●192년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●192년 7월:【재난】무릉 사수 관도 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -●192년 7월:【개전】블소(와)과 종횡무진(이)가 전쟁을 시작합니다. -◆192년 7월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●192년 7월:【지배】종횡무진(이)가 평원(을)를 지배했습니다. -●192년 8월:【작위】종횡무진의 군주가 황제(을)를 자칭하였습니다. -●192년 8월:【지배】종횡무진(이)가 북해(을)를 지배했습니다. -●192년 9월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●192년 10월:【재난】하내 여강 오환 호관 가맹 에 지진으로 피해가 속출하고 있습니다. -●192년 10월:【분쟁】접속잘안함(이)가 교지 공략에 가담하여 분쟁이 발생하고 있습니다. -●192년 10월:【지배】접속잘안함(이)가 교지(을)를 지배했습니다. -●192년 10월:【멸망】긔엽긔(이)가 멸망하였습니다. -●192년 10월:【분쟁협상】보컬로이드(이)가 영토분쟁에서 우위를 점하여 교지(을)를 양도받았습니다. -◆192년 10월: 전력전 대회에서 부관(이)가 우승, 橙(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆192년 10월: 전력전 대회의 우승자에게는 880, 준우승자에겐 528의 상금과 약간의 명성이 주어집니다! -◆192년 11월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●192년 12월:【랜덤임관상품】재야감정(이)가 육도(계략)(을)를 습득했습니다! -●193년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★193년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●193년 1월:【재난】완 하비 서량 남해 북해 양평 역경 백랑 에 역병이 발생하여 도시가 황폐해지고 있습니다. -●193년 1월:【지배】블소(이)가 평원(을)를 지배했습니다. -●193년 2월:【지배】블소(이)가 북해(을)를 지배했습니다. -◆193년 2월: 통솔전 대회에서 대악마(이)가 우승, 강서유서(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆193년 2월: 통솔전 대회의 우승자에게는 920, 준우승자에겐 552의 상금과 약간의 명성이 주어집니다! -●193년 2월:【랜덤임관상품】재야橙(이)가 과하마(+9)(을)를 습득했습니다! -◆193년 3월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●193년 3월:【지배】블소(이)가 (을)를 지배했습니다. -●193년 3월:【지배】종횡무진(이)가 평원(을)를 지배했습니다. -●193년 4월:【재난】하내 계림 에 태풍으로 인해 피해가 속출하고 있습니다. -●193년 5월:【지배】종횡무진(이)가 백랑(을)를 지배했습니다. -●193년 6월:【지배】종횡무진(이)가 오환(을)를 지배했습니다. -◆193년 6월: 통솔전 대회에서 북오더(이)가 우승, 플젠(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆193년 6월: 통솔전 대회의 우승자에게는 920, 준우승자에겐 552의 상금과 약간의 명성이 주어집니다! -●193년 6월:【지배】블소(이)가 평원(을)를 지배했습니다. -●193년 6월:【아이템】종횡무진내나(이)가 한서(+7)(을)를 습득했습니다! -●193년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●193년 7월:【재난】안정 왜 함곡 에 지진으로 피해가 속출하고 있습니다. -◆193년 7월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●193년 8월:【지배】종횡무진(이)가 평원(을)를 지배했습니다. -●193년 8월:【지배】종횡무진(이)가 계교(을)를 지배했습니다. -●193년 9월:【지배】종횡무진(이)가 복양(을)를 지배했습니다. -●193년 10월:【재난】낙양 홍농 졸본 합비 이릉 파양 에 혹한으로 도시가 황폐해지고 있습니다. -◆193년 10월: 전력전 대회에서 발암맨(이)가 우승, 누렁(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆193년 10월: 전력전 대회의 우승자에게는 920, 준우승자에겐 552의 상금과 약간의 명성이 주어집니다! -●193년 10월:【패퇴】블소(이)가 병량 부족으로 진류(을)를 뺏기고 말았습니다. -●193년 10월:【지배】종횡무진(이)가 진류(을)를 지배했습니다. -●193년 11월:【개전】보컬로이드(와)과 접속잘안함(이)가 전쟁을 시작합니다. -●193년 11월:【지배】접속잘안함(이)가 여강(을)를 지배했습니다. -●193년 11월:【지배】보컬로이드(이)가 남만(을)를 지배했습니다. -●193년 12월:【지배】보컬로이드(이)가 운남(을)를 지배했습니다. -●194년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★194년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●194년 1월:【재난】계 상용 대 관도 적벽 에 역병이 발생하여 도시가 황폐해지고 있습니다. -●194년 2월:【지배】종횡무진(이)가 허창(을)를 지배했습니다. -●194년 2월:【지배】보컬로이드(이)가 건녕(을)를 지배했습니다. -●194년 2월:【고립】낙양(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●194년 3월:【지배】종횡무진(이)가 북해(을)를 지배했습니다. -●194년 4월:【호황】허창 위례 강하 함곡 에 호황으로 도시가 번창하고 있습니다. -◆194년 4월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●194년 4월:【천재】무릉에 천재가 등장했습니다. -●194년 4월:【고립】(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●194년 5월:【패퇴】블소(이)가 병량 부족으로 정도(을)를 뺏기고 말았습니다. -●194년 5월:【지배】종횡무진(이)가 정도(을)를 지배했습니다. -●194년 6월:【지배】종횡무진(이)가 동황(을)를 지배했습니다. -●194년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●194년 7월:【재난】오환 면죽 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●194년 7월:【지배】종횡무진(이)가 안평(을)를 지배했습니다. -◆194년 7월: 전력전 대회에서 임사영(이)가 우승, 狂三(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆194년 7월: 전력전 대회의 우승자에게는 960, 준우승자에겐 576의 상금과 약간의 명성이 주어집니다! -●194년 8월:【지배】종횡무진(이)가 졸본(을)를 지배했습니다. -●194년 8월:【고립】관도(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●194년 9월:【지배】종횡무진(이)가 관도(을)를 지배했습니다. -●194년 9월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●194년 9월:【긴급천도】블소(이)가 수도가 함락되어 수춘으로 긴급천도하였습니다. -●194년 10월:【재난】완 서주 유구 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -◆194년 10월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●194년 10월:【지배】종횡무진(이)가 (을)를 지배했습니다. -●194년 10월:【고립】사수(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●194년 12월:【휴전】보컬로이드(와)과 접속잘안함(이)가 휴전합니다. -●194년 12월:【지배】종횡무진(이)가 서주(을)를 지배했습니다. -●194년 12월:【고립】호로(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●195년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★195년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●195년 1월:【재난】위례 건녕 평양 운남 흉노 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -◆195년 1월: 일기토 대회에서 KAITO(이)가 우승, 魯堂首(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆195년 1월: 일기토 대회의 우승자에게는 960, 준우승자에겐 576의 상금과 약간의 명성이 주어집니다! -●195년 1월:【분쟁】종횡무진(이)가 호로 공략에 가담하여 분쟁이 발생하고 있습니다. -●195년 1월:【지배】종횡무진(이)가 호로(을)를 지배했습니다. -◆195년 2월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●195년 4월:【재난】강주 오 졸본 에 홍수로 인해 피해가 급증하고 있습니다. -●195년 4월:【분쟁】어엿븐소드락(이)가 낙양 공략에 가담하여 분쟁이 발생하고 있습니다. -●195년 4월:【지배】어엿븐소드락(이)가 낙양(을)를 지배했습니다. -●195년 4월:【분쟁협상】종횡무진(이)가 영토분쟁에서 우위를 점하여 낙양(을)를 양도받았습니다. -●195년 5월:【지배】종횡무진(이)가 (을)를 지배했습니다. -◆195년 5월: 일기토 대회에서 랜임1분장(이)가 우승, 하연주(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆195년 5월: 일기토 대회의 우승자에게는 1000, 준우승자에겐 600의 상금과 약간의 명성이 주어집니다! -◆195년 6월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●195년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●195년 7월:【재난】복양 하비 서량 이도 적도 에 지진으로 피해가 속출하고 있습니다. -●195년 7월:【지배】종횡무진(이)가 사수(을)를 지배했습니다. -●195년 8월:【지배】종횡무진(이)가 여남(을)를 지배했습니다. -●195년 9월:【선포】보컬로이드(이)가 종횡무진에 선전 포고 하였습니다. -◆195년 9월: 설전 대회에서 샌프란시스코(이)가 우승, 내정달인(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆195년 9월: 설전 대회의 우승자에게는 1000, 준우승자에겐 600의 상금과 약간의 명성이 주어집니다! -●195년 10월:【재난】성도 천수 운남 강 이릉 장판 에 혹한으로 도시가 황폐해지고 있습니다. -●196년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★196년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●196년 1월:【재난】건업 북평 영안 면죽 에 황건적이 출현해 도시를 습격하고 있습니다. -●196년 1월:【천도】종횡무진(이)가 가맹(으)로 천도하였습니다. -●196년 4월:【재난】완 초 패 주시 대 호로 면죽 에 지진으로 피해가 속출하고 있습니다. -◆196년 4월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●196년 5월:【지배】종횡무진(이)가 수춘(을)를 지배했습니다. -●196년 5월:【긴급천도】블소(이)가 수도가 함락되어 합비으로 긴급천도하였습니다. -●196년 6월:【천도】종횡무진(이)가 자동(으)로 천도하였습니다. -●196년 6월:【지배】종횡무진(이)가 합비(을)를 지배했습니다. -●196년 6월:【멸망】블소(이)가 멸망하였습니다. -●196년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●196년 7월:【재난】남해 평원 북해 탐라 에 지진으로 피해가 속출하고 있습니다. -●196년 7월:【아이템】보컬로이드코토와르(이)가 맥궁(+7)(을)를 습득했습니다! -◆196년 7월: 일기토 대회에서 읭읭(이)가 우승, 魯堂首(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆196년 7월: 일기토 대회의 우승자에게는 1040, 준우승자에겐 624의 상금과 약간의 명성이 주어집니다! -◆196년 9월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●196년 9월:【천도】종횡무진(이)가 면죽(으)로 천도하였습니다. -●196년 10월:【재난】홍농 교지 기산 에 황건적이 출현해 도시를 습격하고 있습니다. -◆196년 12월: 일기토 대회에서 KAITO(이)가 우승, 하연주(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆196년 12월: 일기토 대회의 우승자에게는 1040, 준우승자에겐 624의 상금과 약간의 명성이 주어집니다! -●196년 12월:【천도】종횡무진(이)가 성도(으)로 천도하였습니다. -●197년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★197년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●197년 1월:【재난】수춘 장사 남해 에 지진으로 피해가 속출하고 있습니다. -◆197년 1월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●197년 4월:【재난】완 강릉 하비 한중 오 강하 백랑 에 지진으로 피해가 속출하고 있습니다. -◆197년 4월: 전력전 대회에서 카이사르(이)가 우승, 니콜(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆197년 4월: 전력전 대회의 우승자에게는 1080, 준우승자에겐 648의 상금과 약간의 명성이 주어집니다! -◆197년 5월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●197년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●197년 7월:【재난】허창 덕양 건녕 상동 면죽 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -◆197년 8월: 전력전 대회에서 제갈여포(이)가 우승, 대악마(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆197년 8월: 전력전 대회의 우승자에게는 1080, 준우승자에겐 648의 상금과 약간의 명성이 주어집니다! -●197년 9월:【개전】보컬로이드(와)과 종횡무진(이)가 전쟁을 시작합니다. -●197년 9월:【지배】보컬로이드(이)가 서주(을)를 지배했습니다. -●197년 9월:【지배】보컬로이드(이)가 동황(을)를 지배했습니다. -●197년 9월:【지배】보컬로이드(이)가 안평(을)를 지배했습니다. -●197년 10월:【재난】평양 운남 남영 교지 여강 흉노 합비 에 황건적이 출현해 도시를 습격하고 있습니다. -●197년 10월:【작위】보컬로이드의 군주가 황제(을)를 자칭하였습니다. -●197년 10월:【지배】보컬로이드(이)가 북해(을)를 지배했습니다. -●197년 10월:【지배】보컬로이드(이)가 백랑(을)를 지배했습니다. -●197년 11월:【지배】보컬로이드(이)가 졸본(을)를 지배했습니다. -●197년 12월:【지배】보컬로이드(이)가 평원(을)를 지배했습니다. -●197년 12월:【지배】보컬로이드(이)가 북평(을)를 지배했습니다. -●198년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★198년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●198년 1월:【재난】시상 강하 안평 에 지진으로 피해가 속출하고 있습니다. -◆198년 3월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●198년 3월:【지배】보컬로이드(이)가 귀양(을)를 지배했습니다. -●198년 3월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●198년 3월:【지배】보컬로이드(이)가 합비(을)를 지배했습니다. -●198년 3월:【지배】보컬로이드(이)가 남피(을)를 지배했습니다. -●198년 4월:【재난】업 수춘 주시 운남 졸본 이릉 에 홍수로 인해 피해가 급증하고 있습니다. -●198년 4월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●198년 5월:【고립】오환(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●198년 6월:【지배】종횡무진(이)가 귀양(을)를 지배했습니다. -◆198년 6월: 전력전 대회에서 하연주(이)가 우승, 카토(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆198년 6월: 전력전 대회의 우승자에게는 1120, 준우승자에겐 672의 상금과 약간의 명성이 주어집니다! -●198년 6월:【지배】보컬로이드(이)가 계교(을)를 지배했습니다. -●198년 6월:【지배】보컬로이드(이)가 관도(을)를 지배했습니다. -●198년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●198년 7월:【재난】건업 강릉 대 안평 적도 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●198년 7월:【지배】보컬로이드(이)가 주시(을)를 지배했습니다. -●198년 8월:【천도】접속잘안함(이)가 양양(으)로 천도하였습니다. -●198년 8월:【선포】접속잘안함(이)가 종횡무진에 선전 포고 하였습니다. -●198년 9월:【국기변경】종횡무진(이)가 국기를 변경하였습니다. -●198년 9월:【지배】보컬로이드(이)가 수춘(을)를 지배했습니다. -●198년 10월:【재난】에 황건적이 출현해 도시를 습격하고 있습니다. -●198년 10월:【지배】보컬로이드(이)가 복양(을)를 지배했습니다. -●198년 10월:【아이템】접속잘안함이쓰미(이)가 사모(+13)(을)를 습득했습니다! -●198년 10월:【아이템】종횡무진평민킬러(이)가 방천화극(+14)(을)를 습득했습니다! -●198년 10월:【지배】보컬로이드(이)가 역경(을)를 지배했습니다. -◆198년 11월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●198년 12월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●198년 12월:【원조】어엿븐소드락에서 보컬로이드(으)로 물자를 지원합니다. -●199년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★199년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●199년 1월:【재난】상용 건녕 천수 이릉 백랑 에 역병이 발생하여 도시가 황폐해지고 있습니다. -●199년 1월:【지배】종횡무진(이)가 주시(을)를 지배했습니다. -●199년 1월:【지배】보컬로이드(이)가 여남(을)를 지배했습니다. -●199년 2월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -◆199년 2월: 전력전 대회에서 강서유서(이)가 우승, 제갈여포(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆199년 2월: 전력전 대회의 우승자에게는 1160, 준우승자에겐 696의 상금과 약간의 명성이 주어집니다! -●199년 3월:【지배】보컬로이드(이)가 귀양(을)를 지배했습니다. -●199년 3월:【지배】보컬로이드(이)가 진류(을)를 지배했습니다. -●199년 4월:【재난】건업 남피 수춘 평양 상동 동황 에 지진으로 피해가 속출하고 있습니다. -◆199년 5월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●199년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●199년 7월:【풍작】계양 신야 동황 에 풍작으로 도시가 번창하고 있습니다. -●199년 7월:【지배】보컬로이드(이)가 진양(을)를 지배했습니다. -●199년 7월:【지배】보컬로이드(이)가 정도(을)를 지배했습니다. -●199년 8월:【지배】보컬로이드(이)가 허창(을)를 지배했습니다. -◆199년 8월: 통솔전 대회에서 카토(이)가 우승, 대악마(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆199년 8월: 통솔전 대회의 우승자에게는 1160, 준우승자에겐 696의 상금과 약간의 명성이 주어집니다! -●199년 8월:【지배】종횡무진(이)가 귀양(을)를 지배했습니다. -◆199년 9월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●199년 10월:【재난】낙양 평원 적도 에 황건적이 출현해 도시를 습격하고 있습니다. -●199년 10월:【아이템】접속잘안함HideD(이)가 노자(+15)(을)를 습득했습니다! -●199년 10월:【지배】보컬로이드(이)가 호관(을)를 지배했습니다. -●199년 11월:【지배】보컬로이드(이)가 귀양(을)를 지배했습니다. -●199년 11월:【지배】보컬로이드(이)가 낙양(을)를 지배했습니다. -◆199년 12월: 통솔전 대회에서 DVa(이)가 우승, 북오더(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆199년 12월: 통솔전 대회의 우승자에게는 1160, 준우승자에겐 696의 상금과 약간의 명성이 주어집니다! -●200년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★200년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●200년 1월:【재난】강릉 계 백랑 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -◆200년 1월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●200년 1월:【선포】보컬로이드(이)가 어엿븐소드락에 선전 포고 하였습니다. -●200년 1월:【지배】보컬로이드(이)가 사수(을)를 지배했습니다. -●200년 2월:【아이템】어엿븐소드락아르카나하트(이)가 춘화첩(사기)(을)를 습득했습니다! -●200년 2월:【고립】호로(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●200년 4월:【호황】강릉 주시 동황 에 호황으로 도시가 번창하고 있습니다. -●200년 4월:【지배】보컬로이드(이)가 하내(을)를 지배했습니다. -◆200년 4월: 전력전 대회에서 강서유서(이)가 우승, 하루카(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆200년 4월: 전력전 대회의 우승자에게는 1200, 준우승자에겐 720의 상금과 약간의 명성이 주어집니다! -●200년 4월:【지배】보컬로이드(이)가 주시(을)를 지배했습니다. -●200년 4월:【아이템】보컬로이드돌아온꼰대(이)가 오석산(치료)(을)를 습득했습니다! -●200년 6월:【지배】보컬로이드(이)가 흉노(을)를 지배했습니다. -●200년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●200년 7월:【재난】북해 교지 영릉 안평 역경 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -◆200년 7월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●200년 8월:【개전】접속잘안함(와)과 종횡무진(이)가 전쟁을 시작합니다. -●200년 8월:【지배】접속잘안함(이)가 한중(을)를 지배했습니다. -●200년 8월:【지배】보컬로이드(이)가 적도(을)를 지배했습니다. -●200년 9월:【지배】접속잘안함(이)가 호로(을)를 지배했습니다. -●200년 9월:【지배】접속잘안함(이)가 덕양(을)를 지배했습니다. -●200년 9월:【분쟁】접속잘안함(이)가 강주 공략에 가담하여 분쟁이 발생하고 있습니다. -●200년 9월:【지배】보컬로이드(이)가 천수(을)를 지배했습니다. -●200년 10월:【재난】여남 계림 영안 에 혹한으로 도시가 황폐해지고 있습니다. -●200년 10월:【지배】접속잘안함(이)가 기산(을)를 지배했습니다. -◆200년 10월: 통솔전 대회에서 Anes(이)가 우승, DVa(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆200년 10월: 통솔전 대회의 우승자에게는 1200, 준우승자에겐 720의 상금과 약간의 명성이 주어집니다! -●200년 10월:【지배】보컬로이드(이)가 안정(을)를 지배했습니다. -●200년 11월:【지배】접속잘안함(이)가 장안(을)를 지배했습니다. -●200년 11월:【지배】보컬로이드(이)가 강주(을)를 지배했습니다. -●200년 12월:【지배】접속잘안함(이)가 양평(을)를 지배했습니다. -●200년 12월:【지배】보컬로이드(이)가 가정(을)를 지배했습니다. -●200년 12월:【지배】종횡무진(이)가 덕양(을)를 지배했습니다. -●200년 12월:【선포】어엿븐소드락(이)가 접속잘안함에 선전 포고 하였습니다. -●201년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★201년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●201년 1월:【재난】장판 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●201년 2월:【지배】접속잘안함(이)가 덕양(을)를 지배했습니다. -●201년 2월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●201년 3월:【지배】보컬로이드(이)가 서량(을)를 지배했습니다. -●201년 3월:【지배】보컬로이드(이)가 하변(을)를 지배했습니다. -●201년 4월:【재난】수춘 여강 계교 면죽 유구 에 홍수로 인해 피해가 급증하고 있습니다. -●201년 4월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●201년 4월:【아이템】보컬로이드카가미네렌(이)가 적토마(+15)(을)를 습득했습니다! -●201년 4월:【분쟁】접속잘안함(이)가 성도 공략에 가담하여 분쟁이 발생하고 있습니다. -●201년 6월:【지배】보컬로이드(이)가 가맹(을)를 지배했습니다. -●201년 6월:【분쟁】보컬로이드(이)가 자동 공략에 가담하여 분쟁이 발생하고 있습니다. -●201년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●201년 7월:【풍작】귀양 에 풍작으로 도시가 번창하고 있습니다. -●201년 7월:【지배】접속잘안함(이)가 자동(을)를 지배했습니다. -◆201년 9월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●201년 9월:【지배】접속잘안함(이)가 면죽(을)를 지배했습니다. -●201년 10월:【재난】시상 복양 패 운남 여강 이도 저 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -◆201년 12월: 설전 대회에서 狂三(이)가 우승, 비밀(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆201년 12월: 설전 대회의 우승자에게는 1240, 준우승자에겐 744의 상금과 약간의 명성이 주어집니다! -●202년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★202년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●202년 1월:【재난】평원 자동 운남 에 황건적이 출현해 도시를 습격하고 있습니다. -●202년 1월:【개전】보컬로이드(와)과 어엿븐소드락(이)가 전쟁을 시작합니다. -◆202년 3월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●202년 3월:【아이템】종횡무진푸린푸린♥(이)가 삼략(계략)(을)를 습득했습니다! -●202년 4월:【재난】계양 남만 에 홍수로 인해 피해가 급증하고 있습니다. -◆202년 6월: 통솔전 대회에서 하기싫은데(이)가 우승, Anes(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆202년 6월: 통솔전 대회의 우승자에게는 1280, 준우승자에겐 768의 상금과 약간의 명성이 주어집니다! -●202년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●202년 7월:【재난】강주 남영 역경 계교 관도 백랑 적벽 에 지진으로 피해가 속출하고 있습니다. -◆202년 7월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●202년 9월:【지배】보컬로이드(이)가 홍농(을)를 지배했습니다. -●202년 9월:【긴급천도】어엿븐소드락(이)가 수도가 함락되어 사곡으로 긴급천도하였습니다. -●202년 10월:【재난】진류 신야 호로 백랑 탐라 에 지진으로 피해가 속출하고 있습니다. -◆202년 10월: 설전 대회에서 선비(이)가 우승, 무광(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆202년 10월: 설전 대회의 우승자에게는 1280, 준우승자에겐 768의 상금과 약간의 명성이 주어집니다! -◆202년 11월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●202년 11월:【원조】어엿븐소드락에서 종횡무진(으)로 물자를 지원합니다. -●202년 12월:【개전】접속잘안함(와)과 어엿븐소드락(이)가 전쟁을 시작합니다. -●202년 12월:【지배】보컬로이드(이)가 사곡(을)를 지배했습니다. -●202년 12월:【긴급천도】어엿븐소드락(이)가 수도가 함락되어 함곡으로 긴급천도하였습니다. -●203년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★203년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●203년 1월:【재난】사수 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●203년 2월:【지배】보컬로이드(이)가 함곡(을)를 지배했습니다. -●203년 2월:【멸망】어엿븐소드락(이)가 멸망하였습니다. -◆203년 2월: 일기토 대회에서 하연주(이)가 우승, 다이스(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆203년 2월: 일기토 대회의 우승자에게는 1320, 준우승자에겐 792의 상금과 약간의 명성이 주어집니다! -●203년 4월:【재난】장사 서량 영안 광릉 에 홍수로 인해 피해가 급증하고 있습니다. -◆203년 4월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●203년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●203년 7월:【재난】업 남해 오 주시 남영 영릉 함곡 사수 에 지진으로 피해가 속출하고 있습니다. -●203년 7월:【지배】접속잘안함(이)가 성도(을)를 지배했습니다. -●203년 7월:【멸망】종횡무진(이)가 멸망하였습니다. -●203년 7월:【분쟁협상】보컬로이드(이)가 영토분쟁에서 우위를 점하여 성도(을)를 양도받았습니다. -◆203년 7월: 전력전 대회에서 진리(이)가 우승, 狂三(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆203년 7월: 전력전 대회의 우승자에게는 1320, 준우승자에겐 792의 상금과 약간의 명성이 주어집니다! -◆203년 9월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●203년 9월:【아이템】접속잘안함더문더문(이)가 조황비전(+14)(을)를 습득했습니다! -●203년 10월:【재난】시상 사비 사곡 이릉 탐라 에 황건적이 출현해 도시를 습격하고 있습니다. -◆203년 12월: 일기토 대회에서 소드락(이)가 우승, 야근탈출(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆203년 12월: 일기토 대회의 우승자에게는 1320, 준우승자에겐 792의 상금과 약간의 명성이 주어집니다! -●204년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★204년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●204년 1월:【재난】남피 하변 사수 가맹 관도 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -◆204년 1월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●204년 4월:【호황】시상 에 호황으로 도시가 번창하고 있습니다. -◆204년 4월: 전력전 대회에서 내정달인(이)가 우승, 엄백호(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆204년 4월: 전력전 대회의 우승자에게는 1360, 준우승자에겐 816의 상금과 약간의 명성이 주어집니다! -●204년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -◆204년 8월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●204년 10월:【재난】진류 계양 졸본 양평 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -◆204년 11월: 전력전 대회에서 정휘인(이)가 우승, 최태원(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆204년 11월: 전력전 대회의 우승자에게는 1360, 준우승자에겐 816의 상금과 약간의 명성이 주어집니다! -●204년 12월:【아이템】보컬로이드청기사(이)가 도소연명(치료)(을)를 습득했습니다! -●205년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★205년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●205년 1월:【재난】낙양 하내 무릉 함곡 이릉 에 지진으로 피해가 속출하고 있습니다. -◆205년 1월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●205년 1월:【아이템】보컬로이드くま(이)가 오자병법(+14)(을)를 습득했습니다! -●205년 4월:【호황】건녕 광릉 에 호황으로 도시가 번창하고 있습니다. -◆205년 4월: 통솔전 대회에서 전인호(이)가 우승, 대악마(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆205년 4월: 통솔전 대회의 우승자에게는 1400, 준우승자에겐 840의 상금과 약간의 명성이 주어집니다! -◆205년 5월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●205년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●205년 7월:【풍작】함곡 에 풍작으로 도시가 번창하고 있습니다. -◆205년 8월: 전력전 대회에서 橙(이)가 우승, 러스티건(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆205년 8월: 전력전 대회의 우승자에게는 1400, 준우승자에겐 840의 상금과 약간의 명성이 주어집니다! -●205년 9월:【지배】보컬로이드(이)가 오환(을)를 지배했습니다. -●205년 10월:【재난】남피 진양 초 호로 에 황건적이 출현해 도시를 습격하고 있습니다. -●206년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★206년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●206년 1월:【재난】장사 남해 운남 강하 고창 관도 정도 파양 에 황건적이 출현해 도시를 습격하고 있습니다. -●206년 3월:【아이템】보컬로이드이루나(이)가 대완마(+10)(을)를 습득했습니다! -●206년 4월:【재난】진류 호관 사곡 에 태풍으로 인해 피해가 속출하고 있습니다. -◆206년 4월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●206년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●206년 7월:【재난】에 지진으로 피해가 속출하고 있습니다. -◆206년 7월: 설전 대회에서 이쓰미(이)가 우승, 선비(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆206년 7월: 설전 대회의 우승자에게는 1440, 준우승자에겐 864의 상금과 약간의 명성이 주어집니다! -◆206년 9월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●206년 10월:【재난】가맹 에 혹한으로 도시가 황폐해지고 있습니다. -◆206년 12월: 일기토 대회에서 Air(이)가 우승, 소드락(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆206년 12월: 일기토 대회의 우승자에게는 1440, 준우승자에겐 864의 상금과 약간의 명성이 주어집니다! -●207년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★207년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●207년 1월:【재난】영릉 함곡 탐라 에 황건적이 출현해 도시를 습격하고 있습니다. -◆207년 1월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●207년 4월:【재난】영안 주시 사수 파양 에 홍수로 인해 피해가 급증하고 있습니다. -◆207년 4월: 설전 대회에서 선비(이)가 우승, 일본어번역기(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆207년 4월: 설전 대회의 우승자에게는 1480, 준우승자에겐 888의 상금과 약간의 명성이 주어집니다! -●207년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●207년 7월:【풍작】서주 진류 여남 에 풍작으로 도시가 번창하고 있습니다. -◆207년 8월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●207년 8월:【아이템】접속잘안함악마사냥꾼(이)가 맹덕신서(+12)(을)를 습득했습니다! -●207년 10월:【재난】운남 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -◆207년 11월: 전력전 대회에서 임사영(이)가 우승, 박희수(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆207년 11월: 전력전 대회의 우승자에게는 1480, 준우승자에겐 888의 상금과 약간의 명성이 주어집니다! -◆207년 12월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●208년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★208년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●208년 1월:【재난】하내 주시 흉노 동황 에 지진으로 피해가 속출하고 있습니다. -◆208년 3월: 전력전 대회에서 평민킬러(이)가 우승, 읭읭(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆208년 3월: 전력전 대회의 우승자에게는 1520, 준우승자에겐 912의 상금과 약간의 명성이 주어집니다! -●208년 4월:【재난】서주 북해 패 귀양 에 홍수로 인해 피해가 급증하고 있습니다. -◆208년 4월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●208년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●208년 7월:【재난】허창 여남 유구 에 지진으로 피해가 속출하고 있습니다. -◆208년 7월: 일기토 대회에서 하연주(이)가 우승, 魯堂首(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆208년 7월: 일기토 대회의 우승자에게는 1520, 준우승자에겐 912의 상금과 약간의 명성이 주어집니다! -◆208년 9월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●208년 10월:【재난】계교 기산 장판 에 혹한으로 도시가 황폐해지고 있습니다. -◆208년 12월: 전력전 대회에서 정휘인(이)가 우승, 니쉬(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆208년 12월: 전력전 대회의 우승자에게는 1520, 준우승자에겐 912의 상금과 약간의 명성이 주어집니다! -●209년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★209년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●209년 1월:【재난】사비 회계 대 흉노 에 지진으로 피해가 속출하고 있습니다. -◆209년 1월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●209년 4월:【재난】강릉 진류 하비 졸본 에 지진으로 피해가 속출하고 있습니다. -◆209년 4월: 일기토 대회에서 일기토지배자(이)가 우승, 카이사르(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆209년 4월: 일기토 대회의 우승자에게는 1560, 준우승자에겐 936의 상금과 약간의 명성이 주어집니다! -●209년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●209년 7월:【재난】북평 강하 동황 탐라 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -◆209년 7월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●209년 10월:【재난】수춘 진류 덕양 북해 안정 왜 가정 유구 에 지진으로 피해가 속출하고 있습니다. -◆209년 10월: 전력전 대회에서 선비(이)가 우승, 강서유서(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆209년 10월: 전력전 대회의 우승자에게는 1560, 준우승자에겐 936의 상금과 약간의 명성이 주어집니다! -●210년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★210년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●210년 1월:【재난】낙양 오환 이릉 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●210년 4월:【재난】낙양 하변 계교 에 홍수로 인해 피해가 급증하고 있습니다. -●210년 4월:【선포】접속잘안함(이)가 보컬로이드에 선전 포고 하였습니다. -●210년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●210년 7월:【재난】허창 남피 호로 백랑 에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다. -●210년 10월:【재난】장안 복양 귀양 합비 장판 에 지진으로 피해가 속출하고 있습니다. -●211년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★211년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●211년 1월:【재난】장사 왜 호관 호로 유구 에 지진으로 피해가 속출하고 있습니다. -●211년 4월:【재난】저 사수 양평 광릉 에 태풍으로 인해 피해가 속출하고 있습니다. -◆211년 6월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●211년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●211년 7월:【재난】계 귀양 합비 백랑 에 지진으로 피해가 속출하고 있습니다. -◆211년 9월: 전력전 대회에서 강서유서(이)가 우승, 발암맨(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆211년 9월: 전력전 대회의 우승자에게는 1640, 준우승자에겐 984의 상금과 약간의 명성이 주어집니다! -●211년 10월:【재난】복양 패 광릉 에 황건적이 출현해 도시를 습격하고 있습니다. -◆211년 10월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●212년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★212년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●212년 1월:【재난】서량 건녕 여강 대 에 역병이 발생하여 도시가 황폐해지고 있습니다. -◆212년 1월: 설전 대회에서 고긔가먹고싶(이)가 우승, 그만좀불러좀(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆212년 1월: 설전 대회의 우승자에게는 1640, 준우승자에겐 984의 상금과 약간의 명성이 주어집니다! -◆212년 3월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●212년 4월:【재난】허창 합비 에 태풍으로 인해 피해가 속출하고 있습니다. -●212년 4월:【개전】보컬로이드(와)과 접속잘안함(이)가 전쟁을 시작합니다. -◆212년 6월: 전력전 대회에서 비밀(이)가 우승, 니콜(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆212년 6월: 전력전 대회의 우승자에게는 1680, 준우승자에겐 1008의 상금과 약간의 명성이 주어집니다! -●212년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●212년 7월:【재난】하비 안정 운남 강하 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -◆212년 9월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●212년 10월:【재난】낙양 오 안정 여강 호로 합비 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -●212년 11월:【지배】접속잘안함(이)가 함곡(을)를 지배했습니다. -●212년 11월:【지배】접속잘안함(이)가 상동(을)를 지배했습니다. -◆212년 12월: 통솔전 대회에서 橙(이)가 우승, 카토(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆212년 12월: 통솔전 대회의 우승자에게는 1680, 준우승자에겐 1008의 상금과 약간의 명성이 주어집니다! -●213년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★213년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●213년 1월:【재난】덕양 호로 역경 에 지진으로 피해가 속출하고 있습니다. -●213년 3월:【지배】보컬로이드(이)가 상동(을)를 지배했습니다. -●213년 4월:【재난】양양 운남 교지 강 동황 이릉 파양 에 태풍으로 인해 피해가 속출하고 있습니다. -●213년 4월:【지배】접속잘안함(이)가 파양(을)를 지배했습니다. -●213년 4월:【지배】접속잘안함(이)가 상동(을)를 지배했습니다. -●213년 5월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -◆213년 6월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●213년 6월:【지배】접속잘안함(이)가 남해(을)를 지배했습니다. -●213년 6월:【지배】접속잘안함(이)가 교지(을)를 지배했습니다. -●213년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●213년 7월:【재난】하내 강주 회계 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -●213년 7월:【작위】접속잘안함의 군주가 황제(을)를 자칭하였습니다. -●213년 7월:【고립】남만(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●213년 8월:【지배】보컬로이드(이)가 호로(을)를 지배했습니다. -●213년 8월:【지배】접속잘안함(이)가 탐라(을)를 지배했습니다. -●213년 8월:【지배】접속잘안함(이)가 회계(을)를 지배했습니다. -●213년 9월:【지배】접속잘안함(이)가 사비(을)를 지배했습니다. -◆213년 9월: 일기토 대회에서 일기토지배자(이)가 우승, Air(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆213년 9월: 일기토 대회의 우승자에게는 1720, 준우승자에겐 1032의 상금과 약간의 명성이 주어집니다! -●213년 9월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●213년 10월:【재난】복양 여남 패 고창 저 에 혹한으로 도시가 황폐해지고 있습니다. -●213년 10월:【지배】접속잘안함(이)가 이도(을)를 지배했습니다. -●213년 10월:【지배】접속잘안함(이)가 남만(을)를 지배했습니다. -●213년 10월:【지배】보컬로이드(이)가 사비(을)를 지배했습니다. -●213년 11월:【천도】보컬로이드(이)가 위례(으)로 천도하였습니다. -●213년 11월:【지배】접속잘안함(이)가 홍농(을)를 지배했습니다. -●213년 11월:【아이템】접속잘안함감정(이)가 역경(+9)(을)를 습득했습니다! -●213년 11월:【지배】접속잘안함(이)가 운남(을)를 지배했습니다. -◆213년 12월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●213년 12월:【지배】접속잘안함(이)가 하내(을)를 지배했습니다. -●213년 12월:【지배】접속잘안함(이)가 건녕(을)를 지배했습니다. -●214년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★214년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●214년 1월:【재난】여남 덕양 건녕 안정 강 호로 기산 유구 에 황건적이 출현해 도시를 습격하고 있습니다. -●214년 1월:【지배】접속잘안함(이)가 호관(을)를 지배했습니다. -●214년 1월:【지배】접속잘안함(이)가 귀양(을)를 지배했습니다. -●214년 2월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●214년 2월:【지배】접속잘안함(이)가 주시(을)를 지배했습니다. -●214년 3월:【지배】접속잘안함(이)가 복양(을)를 지배했습니다. -●214년 3월:【지배】접속잘안함(이)가 강주(을)를 지배했습니다. -◆214년 3월: 전력전 대회에서 평민킬러(이)가 우승, 쥬비아(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆214년 3월: 전력전 대회의 우승자에게는 1760, 준우승자에겐 1056의 상금과 약간의 명성이 주어집니다! -●214년 4월:【재난】계 복양 진류 하내 북해 운남 에 지진으로 피해가 속출하고 있습니다. -◆214년 4월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다! -●214년 4월:【지배】접속잘안함(이)가 성도(을)를 지배했습니다. -●214년 4월:【고립】유구(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 5월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●214년 5월:【지배】접속잘안함(이)가 가맹(을)를 지배했습니다. -●214년 5월:【고립】안정(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 5월:【고립】고창(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 6월:【지배】접속잘안함(이)가 하변(을)를 지배했습니다. -●214년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●214년 7월:【풍작】북평 안평 계교 에 풍작으로 도시가 번창하고 있습니다. -◆214년 7월: 일기토 대회에서 일기토지배자(이)가 우승, Air(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆214년 7월: 일기토 대회의 우승자에게는 1760, 준우승자에겐 1056의 상금과 약간의 명성이 주어집니다! -●214년 7월:【지배】보컬로이드(이)가 홍농(을)를 지배했습니다. -◆214년 8월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●214년 8월:【지배】접속잘안함(이)가 정도(을)를 지배했습니다. -●214년 8월:【지배】접속잘안함(이)가 건업(을)를 지배했습니다. -●214년 8월:【지배】접속잘안함(이)가 남피(을)를 지배했습니다. -●214년 8월:【고립】(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 8월:【고립】(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 8월:【고립】산월(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 9월:【지배】접속잘안함(이)가 홍농(을)를 지배했습니다. -●214년 9월:【지배】접속잘안함(이)가 광릉(을)를 지배했습니다. -●214년 9월:【지배】보컬로이드(이)가 하내(을)를 지배했습니다. -●214년 9월:【지배】보컬로이드(이)가 탐라(을)를 지배했습니다. -●214년 9월:【지배】접속잘안함(이)가 가정(을)를 지배했습니다. -●214년 10월:【재난】강주 건녕 에 황건적이 출현해 도시를 습격하고 있습니다. -●214년 10월:【지배】접속잘안함(이)가 하비(을)를 지배했습니다. -●214년 10월:【지배】접속잘안함(이)가 유구(을)를 지배했습니다. -◆214년 11월: 전력전 대회에서 くま(이)가 우승, 임사영(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆214년 11월: 전력전 대회의 우승자에게는 1760, 준우승자에겐 1056의 상금과 약간의 명성이 주어집니다! -●214년 11월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●214년 11월:【지배】접속잘안함(이)가 안정(을)를 지배했습니다. -◆214년 12월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●214년 12월:【지배】보컬로이드(이)가 호관(을)를 지배했습니다. -●214년 12월:【지배】접속잘안함(이)가 하내(을)를 지배했습니다. -●214년 12월:【지배】보컬로이드(이)가 여강(을)를 지배했습니다. -●214년 12월:【지배】접속잘안함(이)가 천수(을)를 지배했습니다. -●214년 12월:【고립】복양(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●214년 12월:【고립】서량(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●215년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★215년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●215년 1월:【재난】양양 회계 광릉 에 지진으로 피해가 속출하고 있습니다. -●215년 1월:【지배】접속잘안함(이)가 사곡(을)를 지배했습니다. -●215년 1월:【지배】접속잘안함(이)가 산월(을)를 지배했습니다. -●215년 2월:【지배】접속잘안함(이)가 합비(을)를 지배했습니다. -●215년 2월:【지배】접속잘안함(이)가 여강(을)를 지배했습니다. -●215년 2월:【고립】흉노(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●215년 2월:【고립】적도(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●215년 3월:【지배】보컬로이드(이)가 하내(을)를 지배했습니다. -◆215년 3월: 전력전 대회에서 魯堂首(이)가 우승, 엄백호(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆215년 3월: 전력전 대회의 우승자에게는 1800, 준우승자에겐 1080의 상금과 약간의 명성이 주어집니다! -●215년 3월:【지배】보컬로이드(이)가 이도(을)를 지배했습니다. -●215년 4월:【호황】가정 에 호황으로 도시가 번창하고 있습니다. -●215년 4월:【지배】접속잘안함(이)가 탐라(을)를 지배했습니다. -●215년 4월:【지배】보컬로이드(이)가 합비(을)를 지배했습니다. -●215년 4월:【지배】접속잘안함(이)가 서주(을)를 지배했습니다. -●215년 4월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -◆215년 5월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다! -●215년 5월:【지배】접속잘안함(이)가 서량(을)를 지배했습니다. -●215년 5월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●215년 5월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●215년 5월:【지배】보컬로이드(이)가 탐라(을)를 지배했습니다. -●215년 6월:【지배】접속잘안함(이)가 진류(을)를 지배했습니다. -●215년 6월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●215년 6월:【지배】접속잘안함(이)가 복양(을)를 지배했습니다. -●215년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●215년 7월:【재난】안정 교지 함곡 에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다. -●215년 7월:【지배】접속잘안함(이)가 합비(을)를 지배했습니다. -●215년 7월:【지배】접속잘안함(이)가 관도(을)를 지배했습니다. -●215년 7월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●215년 7월:【지배】접속잘안함(이)가 적도(을)를 지배했습니다. -●215년 7월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●215년 8월:【지배】접속잘안함(이)가 역경(을)를 지배했습니다. -●215년 8월:【지배】접속잘안함(이)가 계교(을)를 지배했습니다. -●215년 8월:【지배】접속잘안함(이)가 북해(을)를 지배했습니다. -●215년 8월:【지배】접속잘안함(이)가 북평(을)를 지배했습니다. -◆215년 8월: 통솔전 대회에서 DVa(이)가 우승, 박희수(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆215년 8월: 통솔전 대회의 우승자에게는 1800, 준우승자에겐 1080의 상금과 약간의 명성이 주어집니다! -●215년 8월:【지배】보컬로이드(이)가 북평(을)를 지배했습니다. -●215년 9월:【지배】접속잘안함(이)가 동황(을)를 지배했습니다. -●215년 10월:【재난】진류 건녕 무릉 남만 에 황건적이 출현해 도시를 습격하고 있습니다. -●215년 10월:【지배】접속잘안함(이)가 안평(을)를 지배했습니다. -●215년 10월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●215년 10월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●215년 10월:【지배】보컬로이드(이)가 유구(을)를 지배했습니다. -●215년 10월:【고립】여남(이)가 보급이 끊겨 미지배 도시가 되었습니다. -◆215년 11월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●215년 11월:【지배】접속잘안함(이)가 졸본(을)를 지배했습니다. -●215년 11월:【지배】접속잘안함(이)가 백랑(을)를 지배했습니다. -●215년 11월:【지배】접속잘안함(이)가 평원(을)를 지배했습니다. -●215년 11월:【지배】접속잘안함(이)가 탐라(을)를 지배했습니다. -●215년 12월:【지배】접속잘안함(이)가 오환(을)를 지배했습니다. -●215년 12월:【지배】접속잘안함(이)가 평양(을)를 지배했습니다. -●215년 12월:【지배】보컬로이드(이)가 안평(을)를 지배했습니다. -●215년 12월:【지배】접속잘안함(이)가 북평(을)를 지배했습니다. -●215년 12월:【고립】허창(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●216년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★216년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●216년 1월:【재난】장안 남영 교지 역경 에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다. -●216년 1월:【지배】접속잘안함(이)가 안평(을)를 지배했습니다. -●216년 1월:【지배】접속잘안함(이)가 수춘(을)를 지배했습니다. -●216년 1월:【고립】하내(이)가 보급이 끊겨 미지배 도시가 되었습니다. -◆216년 2월: 전력전 대회에서 쥬비아(이)가 우승, 엄백호(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆216년 2월: 전력전 대회의 우승자에게는 1840, 준우승자에겐 1104의 상금과 약간의 명성이 주어집니다! -●216년 2월:【고립】호관(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●216년 2월:【고립】호로(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●216년 3월:【지배】접속잘안함(이)가 허창(을)를 지배했습니다. -●216년 3월:【지배】보컬로이드(이)가 동황(을)를 지배했습니다. -●216년 4월:【재난】오 영릉 산월 에 태풍으로 인해 피해가 속출하고 있습니다. -●216년 4월:【지배】접속잘안함(이)가 사수(을)를 지배했습니다. -●216년 4월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -◆216년 5월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다! -●216년 5월:【아이템】접속잘안함카이사르(이)가 청홍검(+15)(을)를 습득했습니다! -●216년 6월:【고립】낙양(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●216년 7월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다. -●216년 7월:【풍작】하내 이릉 에 풍작으로 도시가 번창하고 있습니다. -●216년 7월:【지배】접속잘안함(이)가 낙양(을)를 지배했습니다. -●216년 7월:【고립】진양(이)가 보급이 끊겨 미지배 도시가 되었습니다. -●216년 8월:【지배】접속잘안함(이)가 고창(을)를 지배했습니다. -●216년 8월:【지배】접속잘안함(이)가 동황(을)를 지배했습니다. -◆216년 8월: 전력전 대회에서 강서유서(이)가 우승, 돌아온꼰대(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆216년 8월: 전력전 대회의 우승자에게는 1840, 준우승자에겐 1104의 상금과 약간의 명성이 주어집니다! -●216년 8월:【지배】접속잘안함(이)가 호로(을)를 지배했습니다. -◆216년 9월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다! -●216년 9월:【지배】접속잘안함(이)가 이도(을)를 지배했습니다. -●216년 10월:【재난】패 하변 영안 사수 에 눈이 많이 쌓여 도시가 황폐해지고 있습니다. -●216년 10월:【지배】접속잘안함(이)가 사비(을)를 지배했습니다. -●216년 10월:【지배】보컬로이드(이)가 (을)를 지배했습니다. -●216년 10월:【아이템】접속잘안함잠둥이션(이)가 적로(+13)(을)를 습득했습니다! -●216년 11월:【지배】접속잘안함(이)가 위례(을)를 지배했습니다. -●216년 11월:【긴급천도】보컬로이드(이)가 수도가 함락되어 계림으로 긴급천도하였습니다. -●216년 11월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●216년 12월:【지배】접속잘안함(이)가 유구(을)를 지배했습니다. -●216년 12월:【지배】접속잘안함(이)가 호관(을)를 지배했습니다. -◆216년 12월: 설전 대회에서 김우민(이)가 우승, 고긔가먹고싶(이)가 준우승을 차지하여 천하에 이름을 떨칩니다! -◆216년 12월: 설전 대회의 우승자에게는 1840, 준우승자에겐 1104의 상금과 약간의 명성이 주어집니다! -●216년 12월:【지배】접속잘안함(이)가 (을)를 지배했습니다. -●217년 1월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다. -★217년 1월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~ -●217년 1월:【재난】무릉 강 광릉 에 황건적이 출현해 도시를 습격하고 있습니다. -●217년 1월:【지배】접속잘안함(이)가 여남(을)를 지배했습니다. -●217년 1월:【지배】접속잘안함(이)가 진양(을)를 지배했습니다. -●217년 1월:【국기변경】접속잘안함(이)가 국기를 변경하였습니다. -●217년 2월:【지배】접속잘안함(이)가 계림(을)를 지배했습니다. -●217년 2월:【멸망】보컬로이드(이)가 멸망하였습니다. -●217년 2월:【지배】접속잘안함(이)가 하내(을)를 지배했습니다. -●217년 2월:【지배】접속잘안함(이)가 흉노(을)를 지배했습니다. -●217년 3월:【통일】접속잘안함(이)가 전토를 통일하였습니다. diff --git a/che_close/logs/_nation_msg0.txt b/che_close/logs/_nation_msg0.txt deleted file mode 100644 index 8c75c51d..00000000 --- a/che_close/logs/_nation_msg0.txt +++ /dev/null @@ -1,29 +0,0 @@ -2| 갸오오: | 재야 |2016-01-14 20:42:19|갸오오|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2| 카토: | 재야 |2016-01-14 20:44:52|갸오오!|FFFFFF|FFFFFF|default.jpg|0 -2|ㄷㄱㅎㅈㄷㅀ:| 재야 |2016-01-14 21:02:07|다음부턴이르맷기면 예전에 쓰던 고XXX 쓸까.. 문제는 이름이 기억이 안나는...|FFFFFF|FFFFFF|default.jpg|0 -3|박일아:긔엽긔▶| 재야 |2016-01-14 22:15:07|안녕하세요 ! 선약이 없으신 장수분들은 긔엽긔 국에서 모셔가고 싶습니다. 관심 있으신분은 임관을 꾸욱~ 눌러주세요 'ㅡ'/|FFC0CB|FFFFFF|pic_3305.jpg?=20151216|1 -2|바쁘다바빠:| 재야 |2016-01-15 20:04:33|?|FFFFFF|FFFFFF|default.jpg|0 -3|박일아:긔엽긔▶| 재야 |2016-01-16 20:41:56|안녕하세요 ! 재야장수분들 ! 선약이 없다면, 긔엽긔에 임관해보시는건 어떨까요 ! 열심히 운영하고있습니다 !|FFC0CB|FFFFFF|pic_3305.jpg?=20151216|1 -3|박일아:긔엽긔▶| 재야 |2016-01-18 12:36:56|우승후보넥센 장수 여러분 고생 많으셨습니다 ! 긔엽긔는 지금 1:3쟁을 수행중입니다. 긔엽긔에 오셔서 숙딸도 재미도 모두 만족할수 있게 해드리겠습니다 !|FFC0CB|FFFFFF|pic_3305.jpg?=20151216|1 -3|박일아:긔엽긔▶| 재야 |2016-01-18 12:37:16|긔엽긔를 찾아주세요 >_<|FFC0CB|FFFFFF|pic_3305.jpg?=20151216|1 -3|니쉬:접속잘안함▶| 재야 |2016-01-18 12:57:32|저희국에 임관하셔서 한 손 거들어 주실 분 좀 없으실까요오~|FFFFFF|FFFFFF|pic_3992.jpg?=20160101|1 -3|KAITO:보컬로이드▶| 재야 |2016-01-18 13:55:29|제가 바로 유명한 넥센팬입니다 작년에 준플옵 직관도 갔지요 하하 올해 넥센 우승을 원하신다면 여기로 오세요!|AFEEEE|FFFFFF|pic_293.jpg?=20130820|0 -2| 갸오오: | 재야 |2016-01-18 15:31:48|사랑꾼들 여러분 못난 군주 밑에서 고생 많으셨어요|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2| 갸오오: | 재야 |2016-01-18 15:32:19|특히 멜군, 노당수님!|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2| 갸오오: | 재야 |2016-01-18 15:34:31|다른 분들도 고마웠어요!|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2|南ことり:| 재야 |2016-01-18 15:45:24|결과는 59분에~그러고보면 59분 턴이면 집합장 같은거 하기도 좋은 턴 아닌가..?|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -2| 갸오오: | 재야 |2016-01-18 15:46:07|방사닷|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2|南ことり:| 재야 |2016-01-18 15:47:29|확은한 방사..``;;|FFFFFF|FFFFFF|pic_3947.jpg?=20151116|1 -3|진리:블소▶| 재야 |2016-01-18 15:55:24|심심하면 놀러오세요~ 군주까기 좋은동네입니다|FF0000|FFFFFF|pic_3989.jpg?=20160101|1 -3|박일아:긔엽긔▶| 재야 |2016-01-18 21:10:47|막겜국 여러분 고생 많으셨습니다 ! 비록 쟁 상대였지만, 덕분에 재미있게 쟁 했습니다. 혹 선약이 없다면, 이제 막겜국 장수분들은 긔엽긔에서 뵙고싶습니다 +__+ 임관해주세요 !|FFC0CB|FFFFFF|pic_3305.jpg?=20151216|1 -2| 갸오오: | 재야 |2016-01-18 21:14:10|장임님 ㅠㅠ..|FFFFFF|FFFFFF|pic_3128.jpg?=20160114|1 -2| 橙: | 재야 |2016-01-18 21:58:32|체에에에에에에에에에엔 분양 받을분------ 퉷!!!! 이 시점으로 빨리 갠메 보내 국에게 갑니다아아아아ㅏㅏㅏㅏ|FFFFFF|FFFFFF|pic_3446.jpg?=20160114|1 -2|돌아온꼰대:| 재야 |2016-01-20 00:42:38|이거 전에 완전 없애셨다가 다시 만드셨네!!!|FFFFFF|FFFFFF|default.jpg|0 -3|비월:블소▶| 재야 |2016-01-21 10:18:39|긔엽긔분들 고생많으셧습니다.~ 거의 2:1상황까지온 블소국에 도움을 주지 않으시게|FF0000|FFFFFF|pic_233.jpg?=20140830|1 -3|비월:블소▶| 재야 |2016-01-21 10:18:46|도움을 주기 않으시겟습니까??|FF0000|FFFFFF|pic_233.jpg?=20140830|1 -3|무광:접속잘안함▶| 재야 |2016-01-21 10:18:46|긔엽긔님들 수고하셨어요~|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -2| 검임: | 재야 |2016-01-21 14:32:52|으잉 나라가 망해쓰야|FFFFFF|FFFFFF|pic_3890.jpg?=20160114|1 -3|무광:접속잘안함▶| 재야 |2016-01-22 12:57:42|재야의 선생님들을 기다리고 있습니다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -3|무광:접속잘안함▶| 재야 |2016-01-23 06:39:18|블소국 여러분 수고하셨습니다. 당장은 아니지만 저희 국도 월요일 아침8시부터 종횡무진국과 전쟁할 예정입니당. 도와주세요~|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -3|무광:접속잘안함▶| 재야 |2016-01-23 07:04:33|이른 새벽이라 저 혼자 모든 분에게 등용장은 못 보내지만 많은 분들의 참여를 기다리고 있겟습니다|FFFFFF|FFFFFF|pic_3016.jpg?=20150609|1 -2| 니콜: | 재야 |2016-01-23 10:24:19|랜임|FFFFFF|FFFFFF|pic_3744.jpg?=20151022|1 diff --git a/che_close/logs/_traffic.txt b/che_close/logs/_traffic.txt deleted file mode 100644 index 6ef02980..00000000 --- a/che_close/logs/_traffic.txt +++ /dev/null @@ -1,451 +0,0 @@ - 2016-01-14 21:00:13|179| 8| 396| 18| 재야(49) - 2016-01-14 22:00:06|179| 9| 2161| 14| 박일아(353) - 2016-01-14 23:00:02|179|10| 2167| 16| 갸오오(417) - 2016-01-15 00:00:02|179|11| 1515| 11| 진리(207) - 2016-01-15 01:00:09|179|12| 994| 6| 박일아(148) - 2016-01-15 02:00:01|180| 1| 441| 4| 하루카(68) - 2016-01-15 03:01:01|180| 2| 421| 2| 정휘인(54) - 2016-01-15 04:01:01|180| 3| 268| 2|일기토지배자(63) - 2016-01-15 05:00:01|180| 4| 165| 0| 재야(19) - 2016-01-15 06:00:01|180| 5| 141| 2| 희지재(7) - 2016-01-15 07:00:02|180| 6| 153| 0| 대악마(14) - 2016-01-15 08:00:01|180| 7| 210| 2| 대악마(14) - 2016-01-15 09:00:01|180| 8| 416| 4| 플젠(56) - 2016-01-15 10:00:01|180| 9| 441| 4| 박일아(39) - 2016-01-15 11:00:01|180|10| 406| 5| 갸오오(53) - 2016-01-15 12:00:01|180|11| 433| 4| 박일아(50) - 2016-01-15 13:00:46|180|12| 461| 6| 하루카(58) - 2016-01-15 14:00:20|181| 1| 775| 9| 카토(152) - 2016-01-15 15:00:01|181| 2| 602| 7| 북두칠성(67) - 2016-01-15 16:00:22|181| 3| 548| 5| 박일아(62) - 2016-01-15 17:00:01|181| 4| 524| 4| 박일아(52) - 2016-01-15 18:00:01|181| 5| 509| 8| 박일아(46) - 2016-01-15 19:00:01|181| 6| 600| 9| 갸오오(77) - 2016-01-15 20:00:01|181| 7| 983| 9| 박일아(178) - 2016-01-15 21:00:01|181| 8| 666| 8| 박일아(80) - 2016-01-15 22:00:01|181| 9| 491| 8| 박일아(78) - 2016-01-15 23:00:02|181|10| 460| 5| 하루카(40) - 2016-01-16 00:00:01|181|11| 821| 7| 카토(119) - 2016-01-16 01:01:02|181|12| 456| 9| 하루카(41) - 2016-01-16 02:00:01|182| 1| 440| 2| 하루카(56) - 2016-01-16 03:00:12|182| 2| 405| 6| 魯堂首(33) - 2016-01-16 04:00:01|182| 3| 356| 0| 장임(57) - 2016-01-16 05:00:01|182| 4| 366| 2| 정휘인(216) - 2016-01-16 06:00:04|182| 5| 181| 3| 니쉬(14) - 2016-01-16 07:00:01|182| 6| 236| 0| 재야(41) - 2016-01-16 08:00:02|182| 7| 201| 1| 랜임1분장(27) - 2016-01-16 09:00:01|182| 8| 247| 3| 카토(39) - 2016-01-16 10:00:01|182| 9| 354| 3| 하루카(106) - 2016-01-16 11:00:02|182|10| 326| 0| 하루카(63) - 2016-01-16 12:00:06|182|11| 361| 7| 하루카(47) - 2016-01-16 13:00:01|182|12| 652| 13| 하루카(114) - 2016-01-16 14:00:09|183| 1| 2910| 14| 하루카(612) - 2016-01-16 15:00:07|183| 2| 2126| 15| 하루카(274) - 2016-01-16 16:00:01|183| 3| 2110| 12| 박일아(312) - 2016-01-16 17:00:01|183| 4| 1570| 18| 갸오오(169) - 2016-01-16 18:00:01|183| 5| 1635| 11| 박일아(247) - 2016-01-16 19:00:01|183| 6| 1298| 10| 하루카(326) - 2016-01-16 20:00:11|183| 7| 1561| 12| 박일아(179) - 2016-01-16 21:00:01|183| 8| 1522| 7| 박일아(211) - 2016-01-16 22:00:09|183| 9| 1361| 15| 하루카(166) - 2016-01-16 23:00:09|183|10| 1688| 12| 북오더(207) - 2016-01-17 00:00:00|183|11| 1792| 21| 플젠(178) - 2016-01-17 01:00:01|183|12| 1374| 11| 박일아(225) - 2016-01-17 02:00:01|184| 1| 1225| 7| 진리(183) - 2016-01-17 03:00:01|184| 2| 1113| 9| 무광(128) - 2016-01-17 04:00:01|184| 3| 616| 5| 비월(116) - 2016-01-17 05:00:02|184| 4| 424| 0| 하루카(114) - 2016-01-17 06:00:01|184| 5| 378| 2| 하루카(93) - 2016-01-17 07:00:01|184| 6| 403| 2| 재야(106) - 2016-01-17 08:00:02|184| 7| 236| 0| 재야(37) - 2016-01-17 09:00:01|184| 8| 423| 5| 재야(62) - 2016-01-17 10:00:12|184| 9| 528| 4| Anes(58) - 2016-01-17 11:00:01|184|10| 589| 2| 진리(121) - 2016-01-17 12:00:00|184|11| 868| 9| 진리(143) - 2016-01-17 13:00:01|184|12| 1088| 10| 진리(179) - 2016-01-17 14:00:12|185| 1| 1235| 9| 하루카(166) - 2016-01-17 15:00:00|185| 2| 1953| 10| 카토(257) - 2016-01-17 16:00:04|185| 3| 2228| 13| 하루카(371) - 2016-01-17 17:00:01|185| 4| 1355| 8| 하루카(173) - 2016-01-17 18:00:02|185| 5| 1023| 11| 하루카(163) - 2016-01-17 19:00:11|185| 6| 1370| 14| 하루카(179) - 2016-01-17 20:00:08|185| 7| 1326| 14| 하루카(132) - 2016-01-17 21:00:21|185| 8| 1340| 13| 하루카(137) - 2016-01-17 22:00:00|185| 9| 1651| 10| 하루카(206) - 2016-01-17 23:00:01|185|10| 1931| 12| 북오더(212) - 2016-01-18 00:00:02|185|11| 2001| 16| 하루카(234) - 2016-01-18 01:00:02|185|12| 1924| 13| 북오더(261) - 2016-01-18 02:00:01|186| 1| 2061| 15| 하루카(283) - 2016-01-18 03:00:01|186| 2| 1703| 11| 카토(224) - 2016-01-18 04:00:12|186| 3| 1496| 7| 하루카(343) - 2016-01-18 05:00:01|186| 4| 913| 6| 하루카(238) - 2016-01-18 06:00:02|186| 5| 687| 3| 하루카(146) - 2016-01-18 07:00:02|186| 6| 571| 4| 정휘인(112) - 2016-01-18 08:00:35|186| 7| 700| 9| 정휘인(112) - 2016-01-18 09:00:01|186| 8| 1033| 8| 감정(126) - 2016-01-18 10:00:06|186| 9| 963| 6| 대악마(111) - 2016-01-18 11:00:00|186|10| 1353| 12| 카토(177) - 2016-01-18 12:00:01|186|11| 1112| 8| 정휘인(138) - 2016-01-18 13:00:01|186|12| 1772| 12| 카토(179) - 2016-01-18 14:00:10|187| 1| 1438| 15| 카토(157) - 2016-01-18 15:00:02|187| 2| 1527| 9| 카토(162) - 2016-01-18 16:00:13|187| 3| 2028| 14| 북두칠성(256) - 2016-01-18 17:00:02|187| 4| 1737| 15| 카토(171) - 2016-01-18 18:00:01|187| 5| 1721| 15| 장임(302) - 2016-01-18 19:00:01|187| 6| 1229| 10| 카토(167) - 2016-01-18 20:00:25|187| 7| 2143| 19| SARS(261) - 2016-01-18 21:00:16|187| 8| 1596| 16| 박일아(164) - 2016-01-18 22:00:01|187| 9| 1624| 14| 박일아(303) - 2016-01-18 23:00:02|187|10| 2508| 21| 북오더(222) - 2016-01-19 00:00:01|187|11| 2033| 19| 박일아(159) - 2016-01-19 01:00:00|187|12| 1381| 10| 북오더(198) - 2016-01-19 02:00:32|188| 1| 891| 9| 장임(123) - 2016-01-19 03:00:01|188| 2| 1617| 9| 북오더(354) - 2016-01-19 04:00:01|188| 3| 877| 2| SARS(168) - 2016-01-19 05:00:01|188| 4| 451| 1| 장임(104) - 2016-01-19 06:00:01|188| 5| 269| 1| 장임(35) - 2016-01-19 07:00:01|188| 6| 371| 2| 장임(136) - 2016-01-19 08:00:02|188| 7| 426| 3| 박일아(95) - 2016-01-19 09:00:08|188| 8| 477| 8| 박일아(73) - 2016-01-19 10:00:00|188| 9| 888| 5| 박일아(123) - 2016-01-19 11:00:26|188|10| 747| 10| 카이사르(66) - 2016-01-19 12:00:24|188|11| 920| 10| 박일아(141) - 2016-01-19 13:00:01|188|12| 1210| 12| 하루카(219) - 2016-01-19 14:00:07|189| 1| 1942| 23| 정휘인(285) - 2016-01-19 15:00:26|189| 2| 1833| 13|바닥을탁치고(139) - 2016-01-19 16:00:01|189| 3| 1269| 11| 정휘인(136) - 2016-01-19 17:00:02|189| 4| 1351| 10| 북오더(154) - 2016-01-19 18:00:01|189| 5| 899| 9| 하루카(84) - 2016-01-19 19:00:52|189| 6| 1253| 7|바닥을탁치고(230) - 2016-01-19 20:00:12|189| 7| 1156| 16| 하루카(157) - 2016-01-19 21:00:45|189| 8| 1079| 9| 박일아(140) - 2016-01-19 22:00:09|189| 9| 1756| 16| 박일아(277) - 2016-01-19 23:00:06|189|10| 1858| 15| 진리(244) - 2016-01-20 00:00:08|189|11| 1403| 11| 니쉬(103) - 2016-01-20 01:00:14|189|12| 1665| 11| Navy마초(219) - 2016-01-20 02:00:01|190| 1| 1660| 11| 북오더(178) - 2016-01-20 03:00:20|190| 2| 1906| 11| 북오더(460) - 2016-01-20 04:00:15|190| 3| 1481| 6| 북오더(205) - 2016-01-20 05:00:08|190| 4| 1575| 8| 하루카(319) - 2016-01-20 06:00:31|190| 5| 877| 4| 하루카(270) - 2016-01-20 07:00:08|190| 6| 852| 4| 하루카(285) - 2016-01-20 08:00:01|190| 7| 1211| 10| 하루카(341) - 2016-01-20 09:00:01|190| 8| 928| 8| 하루카(205) - 2016-01-20 10:00:30|190| 9| 1269| 12| 카토(122) - 2016-01-20 11:00:01|190|10| 1517| 8| SARS(221) - 2016-01-20 12:00:06|190|11| 2050| 18| SARS(234) - 2016-01-20 13:00:11|190|12| 2168| 11| SARS(295) - 2016-01-20 14:00:01|191| 1| 2293| 15| 박일아(368) - 2016-01-20 15:00:13|191| 2| 1700| 9| 박일아(175) - 2016-01-20 16:00:01|191| 3| 1594| 17| 진리(220) - 2016-01-20 17:00:01|191| 4| 2867| 8| SARS(466) - 2016-01-20 18:00:14|191| 5| 1938| 17| 장임(182) - 2016-01-20 19:00:07|191| 6| 1882| 14| 하루카(261) - 2016-01-20 20:00:01|191| 7| 1660| 13| 정휘인(229) - 2016-01-20 21:00:11|191| 8| 1294| 11|바닥을탁치고(130) - 2016-01-20 22:00:07|191| 9| 1657| 13| 니쉬(214) - 2016-01-20 23:00:02|191|10| 1823| 12| 장임(224) - 2016-01-21 00:00:02|191|11| 1369| 14| 무광(310) - 2016-01-21 01:00:09|191|12| 1570| 11| 장임(221) - 2016-01-21 02:00:02|192| 1| 1385| 10| 북오더(201) - 2016-01-21 03:00:18|192| 2| 758| 4| 정휘인(169) - 2016-01-21 04:00:01|192| 3| 663| 4| 정휘인(180) - 2016-01-21 05:00:01|192| 4| 405| 3| 정휘인(172) - 2016-01-21 06:00:13|192| 5| 407| 5| 정휘인(59) - 2016-01-21 07:00:02|192| 6| 447| 5| 진리(96) - 2016-01-21 08:00:01|192| 7| 1978| 10| 하루카(492) - 2016-01-21 09:00:08|192| 8| 1742| 9| 하루카(333) - 2016-01-21 10:00:11|192| 9| 1999| 10| 하루카(483) - 2016-01-21 11:00:43|192|10| 1993| 11| 하루카(261) - 2016-01-21 12:00:25|192|11| 2049| 14| 하루카(238) - 2016-01-21 13:00:04|192|12| 2038| 18| 하루카(296) - 2016-01-21 14:00:01|193| 1| 2518| 14| 하루카(471) - 2016-01-21 15:00:02|193| 2| 1596| 11| 카토(235) - 2016-01-21 16:00:02|193| 3| 1520| 12| 하루카(323) - 2016-01-21 17:00:11|193| 4| 2022| 11| 하루카(283) - 2016-01-21 18:00:00|193| 5| 1377| 14| 카토(230) - 2016-01-21 19:00:01|193| 6| 1497| 13| 카토(325) - 2016-01-21 20:00:22|193| 7| 1686| 10| 하루카(292) - 2016-01-21 21:00:01|193| 8| 1423| 15| 카토(193) - 2016-01-21 22:00:02|193| 9| 1562| 10| 하루카(267) - 2016-01-21 23:00:07|193|10| 2037| 10| 하루카(384) - 2016-01-22 00:00:17|193|11| 2234| 12| 하루카(493) - 2016-01-22 01:00:12|193|12| 1778| 14| 하루카(426) - 2016-01-22 02:00:16|194| 1| 1848| 10| 하루카(400) - 2016-01-22 03:00:25|194| 2| 1458| 9| 하루카(351) - 2016-01-22 04:00:16|194| 3| 1812| 11| 평민킬러(295) - 2016-01-22 05:00:01|194| 4| 1271| 5| 평민킬러(325) - 2016-01-22 06:00:02|194| 5| 801| 1| 하루카(237) - 2016-01-22 07:00:02|194| 6| 419| 1| 하루카(127) - 2016-01-22 08:00:01|194| 7| 362| 3| 대악마(45) - 2016-01-22 09:00:01|194| 8| 482| 4| 대악마(57) - 2016-01-22 10:00:01|194| 9| 823| 8| 소드락(174) - 2016-01-22 11:00:01|194|10| 984| 11| 카토(136) - 2016-01-22 12:00:01|194|11| 775| 7| 카토(78) - 2016-01-22 13:00:08|194|12| 1085| 12| 평민킬러(129) - 2016-01-22 14:00:34|195| 1| 994| 10| 하루카(123) - 2016-01-22 15:00:13|195| 2| 779| 5| 카토(140) - 2016-01-22 16:00:01|195| 3| 793| 4| 무광(141) - 2016-01-22 17:00:01|195| 4| 589| 7| 무광(91) - 2016-01-22 18:00:12|195| 5| 1022| 13| 정휘인(121) - 2016-01-22 19:00:02|195| 6| 563| 3| 무광(48) - 2016-01-22 20:00:10|195| 7| 652| 8| 무광(89) - 2016-01-22 21:00:01|195| 8| 608| 4| 감정(69) - 2016-01-22 22:00:05|195| 9| 643| 8| 비월(63) - 2016-01-22 23:00:05|195|10| 548| 5| 쿠요(43) - 2016-01-23 00:00:17|195|11| 689| 11| 쿠요(127) - 2016-01-23 01:00:02|195|12| 713| 7| 소드락(67) - 2016-01-23 02:00:01|196| 1| 716| 6| 평민킬러(92) - 2016-01-23 03:00:52|196| 2| 472| 5| 하루카(53) - 2016-01-23 04:00:01|196| 3| 500| 2| 평민킬러(165) - 2016-01-23 05:00:16|196| 4| 257| 3| 평민킬러(37) - 2016-01-23 06:00:02|196| 5| 552| 3| 강서유서(280) - 2016-01-23 07:00:02|196| 6| 285| 2| 무광(47) - 2016-01-23 08:00:01|196| 7| 273| 1| 무광(70) - 2016-01-23 09:00:01|196| 8| 358| 0| 진리(59) - 2016-01-23 10:00:01|196| 9| 446| 5| 카토(67) - 2016-01-23 11:00:01|196|10| 780| 9| 카이사르(176) - 2016-01-23 12:01:01|196|11| 437| 2| 니쉬(45) - 2016-01-23 13:00:01|196|12| 599| 9| 카토(78) - 2016-01-23 14:00:01|197| 1| 867| 5| 카이사르(229) - 2016-01-23 15:00:02|197| 2| 613| 9| 카이사르(99) - 2016-01-23 16:00:01|197| 3| 434| 2|바닥을탁치고(56) - 2016-01-23 17:00:02|197| 4| 569| 4| 무광(123) - 2016-01-23 18:00:23|197| 5| 698| 2| 무광(192) - 2016-01-23 19:00:16|197| 6| 718| 8| 카토(83) - 2016-01-23 20:00:02|197| 7| 864| 9| 카이사르(115) - 2016-01-23 21:00:01|197| 8| 741| 7| 카이사르(135) - 2016-01-23 22:00:11|197| 9| 2047| 14| 카토(445) - 2016-01-23 23:00:09|197|10| 1661| 18| くま(222) - 2016-01-24 00:00:02|197|11| 1073| 13| くま(128) - 2016-01-24 01:00:00|197|12| 711| 8| 엄백호(95) - 2016-01-24 02:00:01|198| 1| 702| 7|카가미네렌(119) - 2016-01-24 03:00:08|198| 2| 825| 7| 카토(106) - 2016-01-24 04:00:01|198| 3| 596| 4| 카토(60) - 2016-01-24 05:00:26|198| 4| 1064| 7| 정휘인(432) - 2016-01-24 06:00:01|198| 5| 536| 4| 정휘인(188) - 2016-01-24 07:00:01|198| 6| 341| 0| 하기싫은데(81) - 2016-01-24 08:00:01|198| 7| 463| 5| 정휘인(190) - 2016-01-24 09:00:01|198| 8| 369| 1| Navy마초(76) - 2016-01-24 10:00:27|198| 9| 807| 6| 카토(143) - 2016-01-24 11:00:01|198|10| 453| 3| Anes(49) - 2016-01-24 12:00:12|198|11| 527| 6| 카토(70) - 2016-01-24 13:00:10|198|12| 908| 12| くま(148) - 2016-01-24 14:00:01|199| 1| 1408| 7| 이루나(231) - 2016-01-24 15:00:01|199| 2| 1083| 8| 이루나(82) - 2016-01-24 16:00:01|199| 3| 982| 10| 니쉬(117) - 2016-01-24 17:00:02|199| 4| 938| 10|하기싫은데(112) - 2016-01-24 18:00:01|199| 5| 917| 9|바닥을탁치고(116) - 2016-01-24 19:00:01|199| 6| 1067| 7|바닥을탁치고(130) - 2016-01-24 20:00:01|199| 7| 799| 7|하기싫은데(107) - 2016-01-24 21:00:01|199| 8| 1357| 7| 카이사르(167) - 2016-01-24 22:00:01|199| 9| 1168| 7| 카이사르(166) - 2016-01-24 23:00:00|199|10| 1569| 14|바닥을탁치고(179) - 2016-01-25 00:00:01|199|11| 1373| 14| 카토(145) - 2016-01-25 01:00:01|199|12| 1145| 9| KAITO(159) - 2016-01-25 02:00:02|200| 1| 1186| 5|바닥을탁치고(193) - 2016-01-25 03:00:02|200| 2| 807| 4|바닥을탁치고(150) - 2016-01-25 04:00:02|200| 3| 658| 4|바닥을탁치고(243) - 2016-01-25 05:00:01|200| 4| 597| 1| 정휘인(165) - 2016-01-25 06:00:01|200| 5| 312| 0| 정휘인(51) - 2016-01-25 07:00:02|200| 6| 280| 1| 정휘인(42) - 2016-01-25 08:00:01|200| 7| 378| 3| 정휘인(70) - 2016-01-25 09:00:23|200| 8| 811| 10| Anes(107) - 2016-01-25 10:00:02|200| 9| 1148| 12| KAITO(117) - 2016-01-25 11:00:01|200|10| 1171| 13|카가미네렌(106) - 2016-01-25 12:00:06|200|11| 1031| 8| Anes(128) - 2016-01-25 13:00:01|200|12| 1612| 12| 카토(228) - 2016-01-25 14:00:01|201| 1| 1130| 6| 카토(129) - 2016-01-25 15:00:00|201| 2| 1112| 8| 카이사르(121) - 2016-01-25 16:00:01|201| 3| 992| 9|돌아온꼰대(133) - 2016-01-25 17:00:12|201| 4| 1170| 12|바닥을탁치고(205) - 2016-01-25 18:00:01|201| 5| 1116| 7|바닥을탁치고(152) - 2016-01-25 19:00:08|201| 6| 953| 11|바닥을탁치고(108) - 2016-01-25 20:00:16|201| 7| 1115| 11| 카이사르(217) - 2016-01-25 21:00:01|201| 8| 939| 10| 카가미네렌(88) - 2016-01-25 22:01:01|201| 9| 1165| 10| 카이사르(105) - 2016-01-25 23:00:01|201|10| 1094| 14| 카이사르(225) - 2016-01-26 00:00:02|201|11| 1489| 19| 카이사르(160) - 2016-01-26 01:00:01|201|12| 1036| 10| 평민킬러(129) - 2016-01-26 02:00:33|202| 1| 1105| 8|카가미네렌(131) - 2016-01-26 03:00:41|202| 2| 756| 11|바닥을탁치고(131) - 2016-01-26 04:00:19|202| 3| 876| 6| Navy마초(163) - 2016-01-26 05:00:02|202| 4| 455| 1|바닥을탁치고(129) - 2016-01-26 06:00:01|202| 5| 300| 0| 하기싫은데(67) - 2016-01-26 07:00:01|202| 6| 275| 3| くま(74) - 2016-01-26 08:00:01|202| 7| 417| 4| 카이사르(59) - 2016-01-26 09:00:01|202| 8| 674| 6| 카토(111) - 2016-01-26 10:00:07|202| 9| 752| 9|카가미네렌(106) - 2016-01-26 11:00:01|202|10| 833| 8| KAITO(115) - 2016-01-26 12:00:01|202|11| 816| 10| 하루카(103) - 2016-01-26 13:00:04|202|12| 1271| 9| 카이사르(168) - 2016-01-26 14:00:01|203| 1| 3279| 13| 갸오오(2328) - 2016-01-26 15:00:01|203| 2| 1112| 6| 카토(130) - 2016-01-26 16:00:02|203| 3| 1202| 10| 카토(165) - 2016-01-26 17:00:12|203| 4| 1156| 14|카가미네렌(141) - 2016-01-26 18:00:01|203| 5| 1105| 9| 평민킬러(128) - 2016-01-26 19:00:00|203| 6| 1286| 11| 카이사르(206) - 2016-01-26 20:00:01|203| 7| 1831| 14| 카이사르(375) - 2016-01-26 21:00:22|203| 8| 856| 9| 카이사르(129) - 2016-01-26 22:00:07|203| 9| 998| 10| 카이사르(244) - 2016-01-26 23:00:01|203|10| 550| 8| 카이사르(151) - 2016-01-27 00:00:02|203|11| 727| 7| 카이사르(174) - 2016-01-27 01:00:01|203|12| 673| 6| 카이사르(109) - 2016-01-27 02:00:01|204| 1| 524| 2| Anes(207) - 2016-01-27 03:00:01|204| 2| 168| 0| 코토와르(17) - 2016-01-27 04:00:02|204| 3| 199| 1| 무광(42) - 2016-01-27 05:00:01|204| 4| 130| 0| 북오더(6) - 2016-01-27 06:00:01|204| 5| 141| 1| 정휘인(8) - 2016-01-27 07:00:02|204| 6| 173| 1| KAITO(41) - 2016-01-27 08:00:01|204| 7| 200| 3|바닥을탁치고(20) - 2016-01-27 09:00:01|204| 8| 487| 4| 카이사르(157) - 2016-01-27 10:00:01|204| 9| 510| 3| 카가미네렌(82) - 2016-01-27 11:00:01|204|10| 376| 3| Anes(46) - 2016-01-27 12:00:14|204|11| 385| 5| 카이사르(44) - 2016-01-27 13:00:21|204|12| 1224| 6| 카이사르(319) - 2016-01-27 14:00:01|205| 1| 596| 4| Anes(140) - 2016-01-27 15:00:01|205| 2| 369| 4| 카가미네렌(73) - 2016-01-27 16:00:01|205| 3| 336| 2| 카이사르(48) - 2016-01-27 17:00:01|205| 4| 360| 2| Anes(55) - 2016-01-27 18:00:28|205| 5| 320| 4| 돌아온꼰대(33) - 2016-01-27 19:00:01|205| 6| 395| 4| Anes(34) - 2016-01-27 20:00:13|205| 7| 349| 6| Anes(43) - 2016-01-27 21:00:01|205| 8| 694| 1| 니쉬(130) - 2016-01-27 22:00:03|205| 9| 338| 6| 카이사르(47) - 2016-01-27 23:00:01|205|10| 318| 4| Anes(73) - 2016-01-28 00:00:01|205|11| 474| 3| KAITO(73) - 2016-01-28 01:00:01|205|12| 817| 4| Anes(277) - 2016-01-28 02:00:01|206| 1| 342| 1| 정휘인(123) - 2016-01-28 03:00:01|206| 2| 180| 2| 정휘인(25) - 2016-01-28 04:00:01|206| 3| 159| 1| 평민킬러(15) - 2016-01-28 05:00:02|206| 4| 151| 1| 무광(19) - 2016-01-28 06:00:01|206| 5| 137| 0| 하루카(4) - 2016-01-28 07:00:01|206| 6| 146| 1| 카이사르(13) - 2016-01-28 08:00:01|206| 7| 136| 0| 니쉬(11) - 2016-01-28 09:00:02|206| 8| 400| 2| 니쉬(109) - 2016-01-28 10:00:01|206| 9| 291| 2| 이루나(30) - 2016-01-28 11:00:01|206|10| 397| 5| Anes(66) - 2016-01-28 12:00:01|206|11| 277| 5| 카가미네렌(42) - 2016-01-28 13:00:01|206|12| 509| 5| 카이사르(219) - 2016-01-28 14:00:01|207| 1| 345| 1| Anes(85) - 2016-01-28 15:00:36|207| 2| 217| 4|고긔가먹고싶(12) - 2016-01-28 16:00:01|207| 3| 314| 1| 이쓰미(84) - 2016-01-28 17:00:07|207| 4| 269| 3| 카가미네렌(53) - 2016-01-28 18:00:01|207| 5| 400| 3| 무광(54) - 2016-01-28 19:00:01|207| 6| 323| 4| 무광(28) - 2016-01-28 20:00:13|207| 7| 338| 2| 잠둥이션(30) - 2016-01-28 21:00:01|207| 8| 432| 5| Anes(136) - 2016-01-28 22:00:31|207| 9| 360| 4| 카이사르(62) - 2016-01-28 23:00:02|207|10| 386| 6| 카이사르(99) - 2016-01-29 00:00:01|207|11| 424| 4| 니쉬(76) - 2016-01-29 01:00:01|207|12| 321| 3| Anes(75) - 2016-01-29 02:00:01|208| 1| 273| 1| Anes(48) - 2016-01-29 03:00:01|208| 2| 202| 1| 카가미네렌(16) - 2016-01-29 04:00:02|208| 3| 144| 1| 강서유서(10) - 2016-01-29 05:00:02|208| 4| 125| 0| 랜임1분장(5) - 2016-01-29 06:00:02|208| 5| 123| 0| 하기싫은데(3) - 2016-01-29 07:00:02|208| 6| 155| 0|그만좀불러좀(33) - 2016-01-29 08:00:01|208| 7| 162| 1| 니쉬(23) - 2016-01-29 09:00:02|208| 8| 208| 0| 내정달인(32) - 2016-01-29 10:00:01|208| 9| 298| 3| 진리(37) - 2016-01-29 11:00:01|208|10| 239| 1| 이루나(47) - 2016-01-29 12:00:01|208|11| 480| 6| Anes(139) - 2016-01-29 13:00:02|208|12| 398| 0| 카이사르(193) - 2016-01-29 14:00:02|209| 1| 315| 2| 진리(26) - 2016-01-29 15:00:02|209| 2| 319| 4| Anes(57) - 2016-01-29 16:00:02|209| 3| 333| 1| 무광(68) - 2016-01-29 17:00:01|209| 4| 315| 1| 카이사르(45) - 2016-01-29 18:00:01|209| 5| 426| 3| 정휘인(94) - 2016-01-29 19:00:01|209| 6| 270| 4| 니콜(17) - 2016-01-29 20:00:02|209| 7| 437| 3| くま(78) - 2016-01-29 21:00:01|209| 8| 688| 3| 무광(157) - 2016-01-29 22:00:33|209| 9| 575| 4| Anes(121) - 2016-01-29 23:00:01|209|10| 411| 3| Anes(62) - 2016-01-30 00:00:02|209|11| 490| 6| 이쓰미(99) - 2016-01-30 01:00:01|209|12| 509| 5| Anes(79) - 2016-01-30 02:00:01|210| 1| 313| 2| 장임(37) - 2016-01-30 03:00:01|210| 2| 254| 1| 내나(54) - 2016-01-30 04:00:01|210| 3| 384| 2| Anes(167) - 2016-01-30 05:00:01|210| 4| 179| 0| くま(27) - 2016-01-30 06:00:01|210| 5| 122| 1| 평민킬러(2) - 2016-01-30 07:00:01|210| 6| 139| 0| Navy마초(14) - 2016-01-30 08:00:02|210| 7| 231| 2| 카이사르(80) - 2016-01-30 09:00:01|210| 8| 235| 2| 카이사르(43) - 2016-01-30 10:00:01|210| 9| 353| 2| 카이사르(124) - 2016-01-30 11:00:01|210|10| 276| 3| 카이사르(62) - 2016-01-30 12:00:00|210|11| 309| 4| Anes(94) - 2016-01-30 13:00:33|210|12| 870| 3| 니쉬(285) - 2016-01-30 14:00:37|211| 1| 474| 4| 평민킬러(51) - 2016-01-30 15:00:12|211| 2| 455| 7| 니쉬(101) - 2016-01-30 16:00:01|211| 3| 534| 5| 카이사르(139) - 2016-01-30 17:00:01|211| 4| 434| 3| 카이사르(51) - 2016-01-30 18:00:11|211| 5| 441| 4| 니쉬(57) - 2016-01-30 19:00:01|211| 6| 511| 6| Anes(47) - 2016-01-30 20:00:01|211| 7| 656| 3| 카이사르(95) - 2016-01-30 21:00:02|211| 8| 541| 3| 카이사르(90) - 2016-01-30 22:00:11|211| 9| 743| 9| 청기사(118) - 2016-01-30 23:00:02|211|10| 579| 2|카가미네렌(104) - 2016-01-31 00:01:02|211|11| 861| 6| 무광(125) - 2016-01-31 01:00:01|211|12| 541| 6| Anes(105) - 2016-01-31 02:00:00|212| 1| 526| 8| Anes(57) - 2016-01-31 03:00:45|212| 2| 1032| 7| Anes(283) - 2016-01-31 04:00:00|212| 3| 791| 5| Anes(209) - 2016-01-31 05:00:10|212| 4| 1578| 6| 무광(308) - 2016-01-31 06:00:21|212| 5| 730| 3| 카이사르(132) - 2016-01-31 07:00:01|212| 6| 326| 3| 쥬비아(55) - 2016-01-31 08:00:13|212| 7| 393| 4| 진리(61) - 2016-01-31 09:00:01|212| 8| 468| 2| 카이사르(120) - 2016-01-31 10:00:01|212| 9| 700| 2| 니쉬(152) - 2016-01-31 11:00:19|212|10| 676| 6| 카이사르(94) - 2016-01-31 12:00:01|212|11| 1135| 9| 니쉬(304) - 2016-01-31 13:00:27|212|12| 1459| 10|바닥을탁치고(155) - 2016-01-31 14:00:19|213| 1| 1262| 9| 니쉬(363) - 2016-01-31 15:00:13|213| 2| 922| 9| 이쓰미(109) - 2016-01-31 16:00:10|213| 3| 1441| 14| 니쉬(164) - 2016-01-31 17:00:01|213| 4| 1733| 10| 니쉬(390) - 2016-01-31 18:00:01|213| 5| 1601| 12| 니쉬(354) - 2016-01-31 19:00:02|213| 6| 1778| 12| 니쉬(280) - 2016-01-31 20:00:01|213| 7| 1783| 10| 니쉬(340) - 2016-01-31 21:00:01|213| 8| 2033| 13| 니쉬(345) - 2016-01-31 22:00:28|213| 9| 2079| 14| 니쉬(403) - 2016-01-31 23:00:03|213|10| 1529| 17| 니쉬(298) - 2016-02-01 00:00:32|213|11| 1114| 14| 니쉬(140) - 2016-02-01 01:00:01|213|12| 1435| 10| 무광(246) - 2016-02-01 02:01:01|214| 1| 947| 6| Anes(164) - 2016-02-01 03:00:11|214| 2| 711| 3| Anes(247) - 2016-02-01 04:00:01|214| 3| 383| 1| Anes(76) - 2016-02-01 05:00:01|214| 4| 312| 3| くま(95) - 2016-02-01 06:00:02|214| 5| 275| 1| 쥬비아(40) - 2016-02-01 07:00:01|214| 6| 337| 1| 카이사르(168) - 2016-02-01 08:00:01|214| 7| 386| 4| 카이사르(78) - 2016-02-01 09:00:01|214| 8| 1273| 5| 니쉬(244) - 2016-02-01 10:00:01|214| 9| 821| 3| Anes(216) - 2016-02-01 11:00:02|214|10| 1164| 9| Anes(234) - 2016-02-01 12:00:02|214|11| 1322| 9| 카토(240) - 2016-02-01 13:00:01|214|12| 1661| 7| 카이사르(444) - 2016-02-01 14:00:02|215| 1| 1202| 12| Anes(139) - 2016-02-01 15:00:18|215| 2| 1017| 9| Anes(85) - 2016-02-01 16:00:02|215| 3| 1291| 8| 카이사르(314) - 2016-02-01 17:00:22|215| 4| 2453| 17| 무광(541) - 2016-02-01 18:00:01|215| 5| 2049| 7| 무광(289) - 2016-02-01 19:00:06|215| 6| 1743| 13| 무광(331) - 2016-02-01 20:00:02|215| 7| 2231| 11| 무광(433) - 2016-02-01 21:00:01|215| 8| 2216| 11| 카이사르(444) - 2016-02-01 22:00:01|215| 9| 1660| 8| 카이사르(366) - 2016-02-01 23:00:01|215|10| 1942| 13| 카이사르(474) - 2016-02-02 00:00:01|215|11| 1542| 12| 카이사르(378) - 2016-02-02 01:00:00|215|12| 1927| 17| Anes(288) - 2016-02-02 02:00:02|216| 1| 1541| 3| 카이사르(349) - 2016-02-02 03:00:01|216| 2| 821| 6| Anes(243) - 2016-02-02 04:00:01|216| 3| 523| 3| 무광(115) - 2016-02-02 05:00:02|216| 4| 347| 1| 쥬비아(71) - 2016-02-02 06:00:02|216| 5| 400| 1| 카이사르(182) - 2016-02-02 07:00:01|216| 6| 322| 1| 쥬비아(48) - 2016-02-02 08:00:01|216| 7| 329| 4| 니쉬(75) - 2016-02-02 09:00:01|216| 8| 584| 5| 카이사르(152) - 2016-02-02 10:00:01|216| 9| 478| 5| 니쉬(143) - 2016-02-02 11:00:01|216|10| 527| 5| 잠둥이션(68) - 2016-02-02 12:00:01|216|11| 1014| 7| 카이사르(206) - 2016-02-02 13:00:01|216|12| 1165| 5| 카이사르(288) - 2016-02-02 14:00:01|217| 1| 668| 5| Anes(84) - 2016-02-02 15:00:01|217| 2| 989| 9| 카토(157) diff --git a/che_close/logs/_tricklog.txt b/che_close/logs/_tricklog.txt deleted file mode 100644 index c83933ed..00000000 --- a/che_close/logs/_tricklog.txt +++ /dev/null @@ -1,16 +0,0 @@ -●183년 5월:【전략】종횡무진(이)가 우승후보넥센피장파장(을)를 발동하였습니다. -●183년 10월:【전략】막겜(이)가 의병모집(을)를 발동하였습니다. -●183년 12월:【전략】블소(이)가 의병모집(을)를 발동하였습니다. -●184년 6월:【전략】긔엽긔(이)가 의병모집(을)를 발동하였습니다. -●186년 1월:【전략】사랑꾼들(이)가 자동수몰(을)를 발동하였습니다. -●187년 12월:【전략】접속잘안함(이)가 양양백성동원(을)를 발동하였습니다. -●189년 5월:【전략】어엿븐소드락(이)가 의병모집(을)를 발동하였습니다. -●190년 4월:【전략】종횡무진(이)가 성도백성동원(을)를 발동하였습니다. -●191년 11월:【전략】보컬로이드(이)가 건업백성동원(을)를 발동하였습니다. -●192년 9월:【전략】블소(이)가 백성동원(을)를 발동하였습니다. -●193년 11월:【전략】접속잘안함(이)가 시상백성동원(을)를 발동하였습니다. -●194년 3월:【전략】종횡무진(이)가 수몰(을)를 발동하였습니다. -●198년 11월:【전략】어엿븐소드락(이)가 의병모집(을)를 발동하였습니다. -●199년 3월:【전략】보컬로이드(이)가 종횡무진피장파장(을)를 발동하였습니다. -●211년 9월:【전략】보컬로이드(이)가 의병모집(을)를 발동하였습니다. -●213년 8월:【전략】접속잘안함(이)가 필사즉생(을)를 발동하였습니다. diff --git a/che_close/logs/batlog3.txt b/che_close/logs/batlog3.txt deleted file mode 100644 index 67fc505d..00000000 --- a/che_close/logs/batlog3.txt +++ /dev/null @@ -1,540 +0,0 @@ -위보를 성공했다! -● 1 : 【갸오오】 7438 (-362) VS 16743 (-887) 【강주】 -● 2 : 【갸오오】 7073 (-365) VS 16081 (-662) 【강주】 -● 3 : 【갸오오】 6655 (-418) VS 15416 (-665) 【강주】 -위보를 성공했다! -● 4 : 【갸오오】 6217 (-438) VS 14545 (-871) 【강주】 -● 5 : 【갸오오】 5779 (-438) VS 13842 (-703) 【강주】 -● 6 : 【갸오오】 5353 (-426) VS 13175 (-667) 【강주】 -급습을 성공했다! -● 7 : 【갸오오】 4979 (-374) VS 12449 (-726) 【강주】 -◆성 <1>귀병【갸오오】 4979 (-2821) VS 12449 (-5181) 【강주】<1>성벽 -● 1 : 【갸오오】 4604 (-375) VS 1031 (-689) 【강주】 -● 2 : 【갸오오】 4202 (-402) VS 278 (-753) 【강주】 -● 3 : 【갸오오】 4058 (-144) VS 0 (-278) 【강주】 -◆성 <1>귀병【갸오오】 4058 (-921) VS 0 (-1720) 【강주】<1>성벽 -위보를 실패했다! -● 1 : 【갸오오】 3536 (-522) VS 18133 (-437) 【덕양】 -● 2 : 【갸오오】 3130 (-406) VS 17520 (-613) 【덕양】 -● 3 : 【갸오오】 2728 (-402) VS 16859 (-661) 【덕양】 -급습을 성공했다! -● 4 : 【갸오오】 2322 (-406) VS 16125 (-734) 【덕양】 -급습을 성공했다! -● 5 : 【갸오오】 1940 (-382) VS 15333 (-792) 【덕양】 -● 6 : 【갸오오】 1563 (-377) VS 14670 (-663) 【덕양】 -● 7 : 【갸오오】 1141 (-422) VS 14011 (-659) 【덕양】 -◆성 <1>귀병【갸오오】 1141 (-2917) VS 14011 (-4559) 【덕양】<1>성벽 -필살공격! -● 1 : 【갸오오】 2650 (-391) VS 7615 (-745) 【덕양】 -혼란을 실패했다! -● 2 : 【갸오오】 1960 (-690) VS 7335 (-280) 【덕양】 -● 3 : 【갸오오】 1589 (-371) VS 6886 (-449) 【덕양】 -● 4 : 【갸오오】 1140 (-449) VS 6507 (-379) 【덕양】 -● 5 : 【갸오오】 739 (-401) VS 6081 (-426) 【덕양】 -● 6 : 【갸오오】 293 (-446) VS 5650 (-431) 【덕양】 -● 7 : 【갸오오】 0 (-293) VS 5375 (-275) 【덕양】 -◆성 <1>귀병【갸오오】 0 (-3041) VS 5375 (-2985) 【덕양】<1>성벽 -● 1 : 【갸오오】 7587 (-413) VS 58817 (-583) 【자동】 -위보를 실패했다! -● 2 : 【갸오오】 7042 (-545) VS 58349 (-468) 【자동】 -혼란을 실패했다! -● 3 : 【갸오오】 6352 (-690) VS 57919 (-430) 【자동】 -위보를 성공했다! -● 4 : 【갸오오】 5965 (-387) VS 57105 (-814) 【자동】 -필살공격! -● 5 : 【갸오오】 5528 (-437) VS 55982 (-1123) 【자동】 -급습을 성공했다! -● 6 : 【갸오오】 5100 (-428) VS 55177 (-805) 【자동】 -● 7 : 【갸오오】 4680 (-420) VS 54548 (-629) 【자동】 -◆성 <1>귀병【갸오오】 4680 (-3320) VS 54548 (-4852) 【자동】<1>성벽 -반목을 성공했다! -● 1 : 【갸오오】 3915 (-765) VS 387 (-814) 【평민킬러】 -● 2 : 【갸오오】 3490 (-425) VS 0 (-387) 【평민킬러】 -공 <1>귀병【갸오오】 3490 (-1190) VS 0 (-1201) 【평민킬러】<1>연노 -● 3 : 【갸오오】 3108 (-382) VS 51716 (-824) 【자동】 -● 4 : 【갸오오】 2742 (-366) VS 50986 (-730) 【자동】 -● 5 : 【갸오오】 2324 (-418) VS 50291 (-695) 【자동】 -혼란을 실패했다! -● 6 : 【갸오오】 1642 (-682) VS 49779 (-512) 【자동】 -● 7 : 【갸오오】 1239 (-403) VS 48951 (-828) 【자동】 -◆성 <1>귀병【갸오오】 1239 (-2251) VS 48951 (-3589) 【자동】<1>성벽 -매복을 성공했다! -● 1 : 【갸오오】 7516 (-623) VS 4784 (-645) 【카토】 -● 2 : 【갸오오】 6825 (-691) VS 4328 (-456) 【카토】 -화계를 실패했다! -● 3 : 【갸오오】 5871 (-954) VS 4003 (-325) 【카토】 -● 4 : 【갸오오】 5224 (-647) VS 3511 (-492) 【카토】 -● 5 : 【갸오오】 4606 (-618) VS 2986 (-525) 【카토】 -화계를 실패했다! -●상대의 필살공격! -● 6 : 【갸오오】 3417 (-1189) VS 2597 (-389) 【카토】 -● 7 : 【갸오오】 2811 (-606) VS 2104 (-493) 【카토】 -공 <1>귀병【갸오오】 2811 (-5328) VS 2104 (-3325) 【카토】<1>중장 -●상대가 회피했다! -● 1 : 【갸오오】 2067 (-744) VS 7246 (-58) 【강서유서】 -● 2 : 【갸오오】 1388 (-679) VS 6652 (-594) 【강서유서】 -필살공격! -● 3 : 【갸오오】 636 (-752) VS 5941 (-711) 【강서유서】 -위보를 성공했다! -● 4 : 【갸오오】 0 (-636) VS 5373 (-568) 【강서유서】 -공 <1>귀병【갸오오】 0 (-2811) VS 5373 (-1931) 【강서유서】<1>연노 -●상대의 필살공격! -● 1 : 【갸오오】 7227 (-873) VS 6404 (-496) 【일본어번역기】 -● 2 : 【갸오오】 6739 (-488) VS 5827 (-577) 【일본어번역기】 -● 3 : 【갸오오】 6234 (-505) VS 5305 (-522) 【일본어번역기】 -필살공격! -● 4 : 【갸오오】 5757 (-477) VS 4525 (-780) 【일본어번역기】 -위보를 실패했다! -화계에 당했다! -필살공격! -● 5 : 【갸오오】 4759 (-998) VS 3687 (-838) 【일본어번역기】 -매복에 당했다! -● 6 : 【갸오오】 4111 (-648) VS 3150 (-537) 【일본어번역기】 -● 7 : 【갸오오】 3570 (-541) VS 2605 (-545) 【일본어번역기】 -공 <1>귀병【갸오오】 3570 (-4530) VS 2605 (-4295) 【일본어번역기】<1>귀병 -● 1 : 【갸오오】 2996 (-574) VS 4560 (-521) 【평민킬러】 -화계를 성공했다! -● 2 : 【갸오오】 2298 (-698) VS 3654 (-906) 【평민킬러】 -● 3 : 【갸오오】 1635 (-663) VS 3177 (-477) 【평민킬러】 -● 4 : 【갸오오】 923 (-712) VS 2635 (-542) 【평민킬러】 -위보를 실패했다! -●상대의 필살공격! -● 5 : 【갸오오】 0 (-923) VS 2272 (-363) 【평민킬러】 -수 <1>귀병【갸오오】 0 (-3570) VS 2272 (-2809) 【평민킬러】<1>연노 -● 1 : 【갸오오】 7195 (-905) VS 7961 (-339) 【대악마】 -반목을 성공했다! -필살공격! -● 2 : 【갸오오】 6410 (-785) VS 7023 (-938) 【대악마】 -● 3 : 【갸오오】 5637 (-773) VS 6706 (-317) 【대악마】 -● 4 : 【갸오오】 4748 (-889) VS 6384 (-322) 【대악마】 -반목을 성공했다! -● 5 : 【갸오오】 3939 (-809) VS 5904 (-480) 【대악마】 -화계를 실패했다! -● 6 : 【갸오오】 2847 (-1092) VS 5688 (-216) 【대악마】 -필살공격! -● 7 : 【갸오오】 1991 (-856) VS 5197 (-491) 【대악마】 -수 <1>귀병【갸오오】 1991 (-6109) VS 5197 (-3103) 【대악마】<1>중장 -매복을 성공했다! -● 8 : 【갸오오】 1186 (-805) VS 5105 (-547) 【강서유서】 -수 <1>귀병【갸오오】 1186 (-805) VS 5105 (-547) 【강서유서】<1>연노 -● 1 : 【갸오오】 599 (-587) VS 2225 (-380) 【일본어번역기】 -반목에 당했다! -반목을 성공했다! -● 2 : 【갸오오】 0 (-599) VS 1889 (-336) 【일본어번역기】 -수 <1>귀병【갸오오】 0 (-1186) VS 1889 (-716) 【일본어번역기】<1>귀병 -●상대가 회피했다! -● 1 : 【갸오오】 3358 (-642) VS 4548 (-48) 【평민킬러】 -반목을 성공했다! -필살공격! -● 2 : 【갸오오】 2731 (-627) VS 3008 (-1540) 【평민킬러】 -혼란을 실패했다! -필살공격! -● 3 : 【갸오오】 1913 (-818) VS 2350 (-658) 【평민킬러】 -●상대의 필살공격! -● 4 : 【갸오오】 847 (-1066) VS 1797 (-553) 【평민킬러】 -화계를 성공했다! -회피했다! -● 5 : 【갸오오】 787 (-60) VS 767 (-1030) 【평민킬러】 -반목을 성공했다! -●상대가 회피했다! -● 6 : 【갸오오】 234 (-553) VS 688 (-79) 【평민킬러】 -● 7 : 【갸오오】 0 (-234) VS 486 (-202) 【평민킬러】 -수 <1>귀병【갸오오】 0 (-4000) VS 486 (-4110) 【평민킬러】<1>연노 -● 1 : 【갸오오】 3502 (-498) VS 7333 (-267) 【북두칠성】 -혼란을 성공했다! -●상대의 필살공격! -● 2 : 【갸오오】 2489 (-1013) VS 6727 (-606) 【북두칠성】 -회피했다! -● 3 : 【갸오오】 2435 (-54) VS 6448 (-279) 【북두칠성】 -● 4 : 【갸오오】 1905 (-530) VS 6125 (-323) 【북두칠성】 -위보를 실패했다! -● 5 : 【갸오오】 1332 (-573) VS 5845 (-280) 【북두칠성】 -● 6 : 【갸오오】 825 (-507) VS 5537 (-308) 【북두칠성】 -● 7 : 【갸오오】 258 (-567) VS 5226 (-311) 【북두칠성】 -수 <1>귀병【갸오오】 258 (-3742) VS 5226 (-2374) 【북두칠성】<1>등갑 -위보를 간파했다! -● 1 : 【갸오오】 7390 (-568) VS 1845 (-424) 【그만좀불러좀】 -●상대의 필살공격! -● 2 : 【갸오오】 6162 (-1228) VS 1491 (-354) 【그만좀불러좀】 -● 3 : 【갸오오】 5495 (-667) VS 1146 (-345) 【그만좀불러좀】 -혼란을 실패했다! -●상대가 회피했다! -● 4 : 【갸오오】 4344 (-1151) VS 1121 (-25) 【그만좀불러좀】 -반목을 간파했다! -반목을 성공했다! -● 5 : 【갸오오】 3798 (-546) VS 410 (-711) 【그만좀불러좀】 -혼란을 간파했다! -필살공격! -● 6 : 【갸오오】 3609 (-189) VS 0 (-410) 【그만좀불러좀】 -수 <1>귀병【갸오오】 3609 (-4349) VS 0 (-2269) 【그만좀불러좀】<1>귀병 -화계에 당했다! -● 1 : 【갸오오】 2343 (-1266) VS 6912 (-388) 【잠둥이션】 -매복을 간파했다! -매복을 실패했다! -●상대의 필살공격! -필살공격! -● 2 : 【갸오오】 1034 (-1309) VS 6217 (-695) 【잠둥이션】 -반목에 당했다! -● 3 : 【갸오오】 0 (-1034) VS 5834 (-383) 【잠둥이션】 -수 <1>귀병【갸오오】 0 (-3609) VS 5834 (-1466) 【잠둥이션】<1>귀병 -매복을 성공했다! -● 1 : 【갸오오】 7208 (-492) VS 6468 (-732) 【선비】 -필살공격! -● 2 : 【갸오오】 6670 (-538) VS 5791 (-677) 【선비】 -매복을 간파했다! -● 3 : 【갸오오】 6240 (-430) VS 5125 (-666) 【선비】 -반목을 성공했다! -회피했다! -● 4 : 【갸오오】 6188 (-52) VS 4206 (-919) 【선비】 -혼란을 간파했다! -위보를 실패했다! -● 5 : 【갸오오】 5834 (-354) VS 3547 (-659) 【선비】 -혼란에 당했다! -매복을 성공했다! -● 6 : 【갸오오】 4904 (-930) VS 2799 (-748) 【선비】 -반목을 간파했다! -● 7 : 【갸오오】 4559 (-345) VS 2065 (-734) 【선비】 -수 <1>신귀【갸오오】 4559 (-3141) VS 2065 (-5135) 【선비】<1>신귀 -매복을 성공했다! -회피했다! -● 1 : 【갸오오】 4503 (-56) VS 7719 (-481) 【장임】 -필살공격! -● 2 : 【갸오오】 3847 (-656) VS 6976 (-743) 【장임】 -회피했다! -● 3 : 【갸오오】 3784 (-63) VS 6606 (-370) 【장임】 -필살공격! -● 4 : 【갸오오】 3185 (-599) VS 5945 (-661) 【장임】 -위보를 성공했다! -● 5 : 【갸오오】 2515 (-670) VS 5495 (-450) 【장임】 -● 6 : 【갸오오】 1946 (-569) VS 5058 (-437) 【장임】 -혼란을 성공했다! -● 7 : 【갸오오】 1356 (-590) VS 4163 (-895) 【장임】 -공 <1>신귀【갸오오】 1356 (-3203) VS 4163 (-4037) 【장임】<1>등갑 -● 1 : 【갸오오】 876 (-480) VS 7333 (-540) 【무광】 -화계를 실패했다! -혼란에 당했다! -● 2 : 【갸오오】 0 (-876) VS 7016 (-317) 【무광】 -공 <1>신귀【갸오오】 0 (-1356) VS 7016 (-857) 【무광】<1>신귀 -회피했다! -● 1 : 【갸오오】 3755 (-45) VS 4203 (-463) 【Navy마초】 -매복을 성공했다! -회피했다! -● 2 : 【갸오오】 3704 (-51) VS 3581 (-622) 【Navy마초】 -●상대가 회피했다! -● 3 : 【갸오오】 3171 (-533) VS 3531 (-50) 【Navy마초】 -● 4 : 【갸오오】 2630 (-541) VS 3066 (-465) 【Navy마초】 -혼란을 실패했다! -● 5 : 【갸오오】 1945 (-685) VS 2769 (-297) 【Navy마초】 -화계를 실패했다! -●상대의 필살공격! -● 6 : 【갸오오】 809 (-1136) VS 2441 (-328) 【Navy마초】 -위보를 성공했다! -●상대의 필살공격! -● 7 : 【갸오오】 0 (-809) VS 1830 (-611) 【Navy마초】 -수 <1>신귀【갸오오】 0 (-3800) VS 1830 (-2836) 【Navy마초】<1>청주 -● 1 : 【갸오오】 2981 (-819) VS 5238 (-480) 【제갈여포】 -혼란을 실패했다! -● 2 : 【갸오오】 1948 (-1033) VS 4923 (-315) 【제갈여포】 -●상대가 회피했다! -● 3 : 【갸오오】 1215 (-733) VS 4877 (-46) 【제갈여포】 -혼란을 성공했다! -●상대가 회피했다! -● 4 : 【갸오오】 416 (-799) VS 4792 (-85) 【제갈여포】 -●상대가 회피했다! -회피했다! -● 5 : 【갸오오】 337 (-79) VS 4748 (-44) 【제갈여포】 -● 6 : 【갸오오】 0 (-337) VS 4553 (-195) 【제갈여포】 -수 <1>신귀【갸오오】 0 (-3800) VS 4553 (-1165) 【제갈여포】<1>궁기 -● 1 : 【갸오오】 6709 (-891) VS 7750 (-350) 【코토와르】 -●상대의 필살공격! -회피했다! -● 2 : 【갸오오】 6557 (-152) VS 7360 (-390) 【코토와르】 -●상대의 필살공격! -● 3 : 【갸오오】 5260 (-1297) VS 7011 (-349) 【코토와르】 -● 4 : 【갸오오】 4361 (-899) VS 6591 (-420) 【코토와르】 -매복을 성공했다! -회피했다! -● 5 : 【갸오오】 4278 (-83) VS 6066 (-525) 【코토와르】 -● 6 : 【갸오오】 3425 (-853) VS 5685 (-381) 【코토와르】 -● 7 : 【갸오오】 2549 (-876) VS 5267 (-418) 【코토와르】 -수 <1>신귀【갸오오】 2549 (-5051) VS 5267 (-2833) 【코토와르】<1>기병 -● 7 : 【갸오오】 1867 (-682) VS 1179 (-342) 【코토와르】 -수 <1>신귀【갸오오】 1867 (-682) VS 1179 (-342) 【코토와르】<1>기병 -혼란을 간파했다! -매복을 성공했다! -●상대의 필살공격! -● 5 : 【갸오오】 1425 (-442) VS 0 (-895) 【바닥을탁치고】 -수 <1>신귀【갸오오】 1425 (-442) VS 0 (-895) 【바닥을탁치고】<1>신귀 -위보를 실패했다! -필살공격! -● 1 : 【갸오오】 780 (-645) VS 6923 (-677) 【엄백호】 -필살공격! -● 2 : 【갸오오】 287 (-493) VS 6043 (-880) 【엄백호】 -반목을 성공했다! -●상대의 필살공격! -● 3 : 【갸오오】 0 (-287) VS 5873 (-170) 【엄백호】 -수 <1>신귀【갸오오】 0 (-1425) VS 5873 (-1727) 【엄백호】<1>등갑 -● 1 : 【갸오오】 6790 (-810) VS 4263 (-393) 【제갈여포】 -혼란을 성공했다! -●상대가 회피했다! -● 2 : 【갸오오】 6014 (-776) VS 4195 (-68) 【제갈여포】 -● 3 : 【갸오오】 5182 (-832) VS 3826 (-369) 【제갈여포】 -● 4 : 【갸오오】 4376 (-806) VS 3421 (-405) 【제갈여포】 -필살공격! -● 5 : 【갸오오】 3444 (-932) VS 2849 (-572) 【제갈여포】 -회피했다! -● 6 : 【갸오오】 3356 (-88) VS 2493 (-356) 【제갈여포】 -반목을 성공했다! -● 7 : 【갸오오】 2432 (-924) VS 1908 (-585) 【제갈여포】 -반목을 실패했다! -회피했다! -● 8 : 【갸오오】 2329 (-103) VS 1580 (-328) 【제갈여포】 -수 <1>신귀【갸오오】 2329 (-5271) VS 1580 (-3076) 【제갈여포】<1>궁기 -●상대가 회피했다! -● 1 : 【갸오오】 5550 (-579) VS 8433 (-47) 【제갈여포】 -화계를 성공했다! -● 2 : 【갸오오】 4918 (-632) VS 7570 (-863) 【제갈여포】 -위보를 실패했다! -●상대가 회피했다! -● 3 : 【갸오오】 4232 (-686) VS 7533 (-37) 【제갈여포】 -●상대가 회피했다! -● 4 : 【갸오오】 3647 (-585) VS 7487 (-46) 【제갈여포】 -● 5 : 【갸오오】 3058 (-589) VS 6997 (-490) 【제갈여포】 -반목을 성공했다! -필살공격! -● 6 : 【갸오오】 2403 (-655) VS 5581 (-1416) 【제갈여포】 -반목을 실패했다! -● 7 : 【갸오오】 1587 (-816) VS 5241 (-340) 【제갈여포】 -●상대가 회피했다! -회피했다! -● 8 : 【갸오오】 1518 (-69) VS 5192 (-49) 【제갈여포】 -수 <1>신귀【갸오오】 1518 (-4611) VS 5192 (-3288) 【제갈여포】<1>궁기 -● 1 : 【갸오오】 7256 (-562) VS 6987 (-513) 【돌아온꼰대】 -매복을 실패했다! -필살공격! -● 2 : 【갸오오】 6523 (-733) VS 6296 (-691) 【돌아온꼰대】 -화계를 성공했다! -● 3 : 【갸오오】 5930 (-593) VS 5455 (-841) 【돌아온꼰대】 -●상대의 필살공격! -● 4 : 【갸오오】 5032 (-898) VS 4963 (-492) 【돌아온꼰대】 -● 5 : 【갸오오】 4425 (-607) VS 4507 (-456) 【돌아온꼰대】 -●상대의 필살공격! -● 6 : 【갸오오】 3523 (-902) VS 4004 (-503) 【돌아온꼰대】 -매복을 실패했다! -●상대의 필살공격! -● 7 : 【갸오오】 2588 (-935) VS 3557 (-447) 【돌아온꼰대】 -회피했다! -● 8 : 【갸오오】 2526 (-62) VS 3073 (-484) 【돌아온꼰대】 -수 <1>신귀【갸오오】 2526 (-5292) VS 3073 (-4427) 【돌아온꼰대】<1>수렵 -반목에 당했다! -필살공격! -● 1 : 【갸오오】 1288 (-1238) VS 947 (-818) 【정휘인】 -● 2 : 【갸오오】 504 (-784) VS 521 (-426) 【정휘인】 -회피했다! -● 3 : 【갸오오】 421 (-83) VS 101 (-420) 【정휘인】 -매복에 당했다! -회피했다! -● 4 : 【갸오오】 391 (-30) VS 0 (-101) 【정휘인】 -수 <1>신귀【갸오오】 391 (-2135) VS 0 (-1765) 【정휘인】<1>신귀 -회피했다! -● 1 : 【갸오오】 4123 (-68) VS 2246 (-559) 【제갈여포】 -반목을 성공했다! -● 2 : 【갸오오】 3446 (-677) VS 1397 (-849) 【제갈여포】 -매복을 성공했다! -●상대의 필살공격! -● 3 : 【갸오오】 2127 (-1319) VS 661 (-736) 【제갈여포】 -위보를 성공했다! -●상대가 회피했다! -● 4 : 【갸오오】 1369 (-758) VS 593 (-68) 【제갈여포】 -화계를 성공했다! -● 5 : 【갸오오】 850 (-519) VS 0 (-593) 【제갈여포】 -수 <1>신귀【갸오오】 850 (-3341) VS 0 (-2805) 【제갈여포】<1>궁기 -매복을 성공했다! -● 1 : 【갸오오】 4024 (-726) VS 2080 (-768) 【러스티건】 -위보를 성공했다! -●상대가 회피했다! -● 2 : 【갸오오】 3219 (-805) VS 2012 (-68) 【러스티건】 -화계를 성공했다! -●상대가 회피했다! -● 3 : 【갸오오】 2414 (-805) VS 1916 (-96) 【러스티건】 -● 4 : 【갸오오】 1610 (-804) VS 1286 (-630) 【러스티건】 -화계를 실패했다! -●상대의 필살공격! -필살공격! -● 5 : 【갸오오】 0 (-1610) VS 738 (-548) 【러스티건】 -수 <1>신귀【갸오오】 0 (-4750) VS 738 (-2110) 【러스티건】<1>궁기 -화계를 성공했다! -● 1 : 【갸오오】 3038 (-862) VS 888 (-914) 【제갈여포】 -필살공격! -●상대가 회피했다! -● 2 : 【갸오오】 2193 (-845) VS 786 (-102) 【제갈여포】 -회피했다! -● 3 : 【갸오오】 2114 (-79) VS 283 (-503) 【제갈여포】 -●상대가 회피했다! -● 4 : 【갸오오】 1261 (-853) VS 228 (-55) 【제갈여포】 -화계를 성공했다! -●상대의 필살공격! -회피했다! -● 5 : 【갸오오】 1233 (-28) VS 0 (-228) 【제갈여포】 -수 <1>신귀【갸오오】 1233 (-2667) VS 0 (-1802) 【제갈여포】<1>궁기 -위보를 성공했다! -●상대의 필살공격! -● 1 : 【갸오오】 6389 (-1411) VS 6998 (-502) 【돌아온꼰대】 -위보를 실패했다! -● 2 : 【갸오오】 5531 (-858) VS 6585 (-413) 【돌아온꼰대】 -필살공격! -● 3 : 【갸오오】 4802 (-729) VS 5793 (-792) 【돌아온꼰대】 -화계를 성공했다! -●상대의 필살공격! -● 4 : 【갸오오】 3464 (-1338) VS 5015 (-778) 【돌아온꼰대】 -화계를 성공했다! -● 5 : 【갸오오】 2794 (-670) VS 4315 (-700) 【돌아온꼰대】 -혼란을 실패했다! -● 6 : 【갸오오】 1693 (-1101) VS 4019 (-296) 【돌아온꼰대】 -위보를 성공했다! -●상대의 필살공격! -● 7 : 【갸오오】 226 (-1467) VS 3531 (-488) 【돌아온꼰대】 -화계를 실패했다! -●상대의 필살공격! -● 8 : 【갸오오】 0 (-226) VS 3486 (-45) 【돌아온꼰대】 -수 <1>귀병【갸오오】 0 (-7800) VS 3486 (-4014) 【돌아온꼰대】<1>수렵 -필살공격! -● 1 : 【갸오오】 3161 (-739) VS 4738 (-837) 【제갈여포】 -필살공격! -●상대가 회피했다! -● 2 : 【갸오오】 2288 (-873) VS 4670 (-68) 【제갈여포】 -화계를 성공했다! -● 3 : 【갸오오】 1407 (-881) VS 3670 (-1000) 【제갈여포】 -●상대가 회피했다! -회피했다! -● 4 : 【갸오오】 1329 (-78) VS 3615 (-55) 【제갈여포】 -● 5 : 【갸오오】 521 (-808) VS 3036 (-579) 【제갈여포】 -반목을 성공했다! -●상대가 회피했다! -● 6 : 【갸오오】 0 (-521) VS 2987 (-49) 【제갈여포】 -수 <1>귀병【갸오오】 0 (-3900) VS 2987 (-2588) 【제갈여포】<1>궁기 -화계를 실패했다! -매복을 간파했다! -●상대의 필살공격! -● 1 : 【갸오오】 2827 (-1073) VS 6583 (-417) 【잠둥이션】 -화계를 실패했다! -● 2 : 【갸오오】 1990 (-837) VS 6246 (-337) 【잠둥이션】 -● 3 : 【갸오오】 1398 (-592) VS 5805 (-441) 【잠둥이션】 -화계를 성공했다! -● 4 : 【갸오오】 802 (-596) VS 4988 (-817) 【잠둥이션】 -반목을 성공했다! -위보에 당했다! -● 5 : 【갸오오】 54 (-748) VS 4268 (-720) 【잠둥이션】 -회피했다! -● 6 : 【갸오오】 0 (-54) VS 3803 (-465) 【잠둥이션】 -공 <1>마귀【갸오오】 0 (-3900) VS 3803 (-3197) 【잠둥이션】<1>악귀 -반목을 성공했다! -● 1 : 【갸오오】 3157 (-743) VS 3590 (-803) 【카토】 -반목을 성공했다! -● 2 : 【갸오오】 2523 (-634) VS 2790 (-800) 【카토】 -●상대의 필살공격! -● 3 : 【갸오오】 1034 (-1489) VS 2287 (-503) 【카토】 -● 4 : 【갸오오】 258 (-776) VS 1779 (-508) 【카토】 -● 5 : 【갸오오】 0 (-258) VS 1582 (-197) 【카토】 -공 <1>백귀【갸오오】 0 (-3900) VS 1582 (-2811) 【카토】<1>중장 -● 1 : 【갸오오】 7271 (-529) VS 6219 (-481) 【일본어번역기】 -혼란을 성공했다! -회피했다! -● 2 : 【갸오오】 7218 (-53) VS 5276 (-943) 【일본어번역기】 -반목을 간파했다! -● 3 : 【갸오오】 6782 (-436) VS 4683 (-593) 【일본어번역기】 -화계를 실패했다! -반목에 당했다! -●상대의 필살공격! -● 4 : 【갸오오】 4744 (-2038) VS 4381 (-302) 【일본어번역기】 -반목을 성공했다! -● 5 : 【갸오오】 4144 (-600) VS 3550 (-831) 【일본어번역기】 -● 6 : 【갸오오】 3511 (-633) VS 3029 (-521) 【일본어번역기】 -혼란을 성공했다! -위보를 간파했다! -● 7 : 【갸오오】 2942 (-569) VS 1936 (-1093) 【일본어번역기】 -공 <1>마귀【갸오오】 2942 (-4858) VS 1936 (-4764) 【일본어번역기】<1>악귀 -회피했다! -● 1 : 【갸오오】 2872 (-70) VS 8723 (-362) 【하루카】 -● 2 : 【갸오오】 2136 (-736) VS 8314 (-409) 【하루카】 -●상대의 필살공격! -● 3 : 【갸오오】 937 (-1199) VS 7887 (-427) 【하루카】 -● 4 : 【갸오오】 228 (-709) VS 7453 (-434) 【하루카】 -화계를 실패했다! -● 5 : 【갸오오】 0 (-228) VS 7395 (-58) 【하루카】 -수 <1>마귀【갸오오】 0 (-2942) VS 7395 (-1690) 【하루카】<1>등갑 -회피했다! -● 1 : 【갸오오】 3821 (-79) VS 8175 (-591) 【강서유서】 -위보를 성공했다! -회피했다! -● 2 : 【갸오오】 3746 (-75) VS 7543 (-632) 【강서유서】 -●상대의 필살공격! -필살공격! -● 3 : 【갸오오】 2384 (-1362) VS 6693 (-850) 【강서유서】 -위보를 성공했다! -● 4 : 【갸오오】 1692 (-692) VS 6005 (-688) 【강서유서】 -● 5 : 【갸오오】 971 (-721) VS 5427 (-578) 【강서유서】 -● 6 : 【갸오오】 268 (-703) VS 4772 (-655) 【강서유서】 -●상대의 필살공격! -● 7 : 【갸오오】 0 (-268) VS 4626 (-146) 【강서유서】 -수 <1>마귀【갸오오】 0 (-3900) VS 4626 (-4140) 【강서유서】<1>연노 -매복을 성공했다! -● 1 : 【갸오오】 6896 (-904) VS 944 (-412) 【박일아】 -●상대의 필살공격! -● 2 : 【갸오오】 5708 (-1188) VS 640 (-304) 【박일아】 -● 3 : 【갸오오】 4741 (-967) VS 347 (-293) 【박일아】 -● 4 : 【갸오오】 3792 (-949) VS 51 (-296) 【박일아】 -매복을 성공했다! -● 5 : 【갸오오】 3657 (-135) VS 0 (-51) 【박일아】 -수 <1>귀병【갸오오】 3657 (-4143) VS 0 (-1356) 【박일아】<1>철기 -● 1 : 【갸오오】 2477 (-1180) VS 7271 (-333) 【카토】 -매복을 성공했다! -● 2 : 【갸오오】 1368 (-1109) VS 6801 (-470) 【카토】 -● 3 : 【갸오오】 124 (-1244) VS 6458 (-343) 【카토】 -● 4 : 【갸오오】 0 (-124) VS 6422 (-36) 【카토】 -수 <1>귀병【갸오오】 0 (-3657) VS 6422 (-1182) 【카토】<1>호표 -● 1 : 【갸오오】 6915 (-885) VS 7589 (-311) 【내나】 -● 2 : 【갸오오】 6134 (-781) VS 7312 (-277) 【내나】 -● 3 : 【갸오오】 5293 (-841) VS 7019 (-293) 【내나】 -매복에 당했다! -● 4 : 【갸오오】 4043 (-1250) VS 6739 (-280) 【내나】 -매복을 간파했다! -●상대의 필살공격! -● 5 : 【갸오오】 2956 (-1087) VS 6372 (-367) 【내나】 -매복을 성공했다! -● 6 : 【갸오오】 2057 (-899) VS 5897 (-475) 【내나】 -화계를 실패했다! -● 7 : 【갸오오】 722 (-1335) VS 5673 (-224) 【내나】 -수 <1>귀병【갸오오】 722 (-7078) VS 5673 (-2227) 【내나】<1>악귀 -혼란을 성공했다! -●상대의 필살공격! -● 3 : 【갸오오】 0 (-722) VS 2606 (-519) 【잠둥이션】 -수 <1>귀병【갸오오】 0 (-722) VS 2606 (-519) 【잠둥이션】<1>악귀 -반목에 당했다! -반목을 성공했다! -● 1 : 【갸오오】 3034 (-866) VS 8044 (-755) 【임사영】 -● 2 : 【갸오오】 2414 (-620) VS 7560 (-484) 【임사영】 -화계에 당했다! -● 3 : 【갸오오】 1412 (-1002) VS 7058 (-502) 【임사영】 -반목에 당했다! -화계를 실패했다! -● 4 : 【갸오오】 26 (-1386) VS 6729 (-329) 【임사영】 -화계에 당했다! -● 5 : 【갸오오】 0 (-26) VS 6720 (-9) 【임사영】 -수 <1>귀병【갸오오】 0 (-3900) VS 6720 (-2079) 【임사영】<1>악귀 -반목을 성공했다! -●상대가 회피했다! -● 1 : 【갸오오】 3159 (-741) VS 3260 (-86) 【박일아】 -● 2 : 【갸오오】 2373 (-786) VS 2731 (-529) 【박일아】 -● 3 : 【갸오오】 1572 (-801) VS 2222 (-509) 【박일아】 -● 4 : 【갸오오】 838 (-734) VS 1645 (-577) 【박일아】 -● 5 : 【갸오오】 0 (-838) VS 1104 (-541) 【박일아】 -수 <1>귀병【갸오오】 0 (-3900) VS 1104 (-2242) 【박일아】<1>호표 -● 5 : 【갸오오】 2721 (-1179) VS 959 (-508) 【대악마】 -● 6 : 【갸오오】 1582 (-1139) VS 436 (-523) 【대악마】 -● 7 : 【갸오오】 669 (-913) VS 0 (-436) 【대악마】 -수 <1>귀병【갸오오】 669 (-3231) VS 0 (-1467) 【대악마】<1>호표 -● 1 : 【갸오오】 57 (-612) VS 5402 (-488) 【임사영】 -혼란을 성공했다! -● 2 : 【갸오오】 0 (-57) VS 5291 (-111) 【임사영】 -수 <1>귀병【갸오오】 0 (-669) VS 5291 (-599) 【임사영】<1>악귀 diff --git a/che_close/logs/batres209.txt b/che_close/logs/batres209.txt deleted file mode 100644 index e4ccb23b..00000000 --- a/che_close/logs/batres209.txt +++ /dev/null @@ -1,18 +0,0 @@ -◆212년 5월: 성 <1>남귀【ⓖ의병장51】 3904 (-3996) VS 68913 (-5987) 【계양】<1>성벽 -◆212년 6월: 성 <1>남귀【ⓖ의병장51】 912 (-2992) VS 46773 (-4437) 【계양】<1>성벽 -◆212년 7월: 공 <1>남귀【ⓖ의병장51】 0 (-912) VS 4785 (-99) 【카이사르】<1>강궁 -◆213년 3월: 공 <1>흑귀【ⓖ의병장51】 5486 (-2414) VS 0 (-1802) 【북두칠성】<1>등갑 -◆213년 3월: 공 <1>흑귀【ⓖ의병장51】 4131 (-1355) VS 411 (-2781) 【무광】<1>악귀 -◆213년 4월: 성 <1>흑귀【ⓖ의병장51】 193 (-3938) VS 75523 (-5647) 【완】<1>성벽 -◆213년 10월: 공 <1>황귀【ⓖ의병장51】 6617 (-1283) VS 0 (-2043) 【아소】<1>중장 -◆213년 10월: 성 <1>황귀【ⓖ의병장51】 4704 (-1913) VS 77634 (-4326) 【완】<1>성벽 -◆213년 11월: 공 <1>황귀【ⓖ의병장51】 467 (-4237) VS 5819 (-2977) 【북두칠성】<1>등갑 -◆214년 5월: 공 <1>남귀【ⓖ의병장51】 3938 (-3962) VS 4677 (-2864) 【강서유서】<1>강궁 -◆214년 6월: 공 <1>남귀【ⓖ의병장51】 0 (-3938) VS 2619 (-2058) 【강서유서】<1>강궁 -◆214년 12월: 수 <1>황귀【ⓖ의병장51】 6674 (-1226) VS 0 (-849) 【DVa】<1>충차 -◆214년 12월: 공 <1>황귀【ⓖ의병장51】 919 (-5755) VS 3075 (-4625) 【비밀】<1>악귀 -◆215년 1월: 공 <1>황귀【ⓖ의병장51】 0 (-919) VS 7504 (-508) 【북두칠성】<1>등갑 -◆215년 9월: 수 <1>백귀【ⓖ의병장51】 596 (-6534) VS 2984 (-4658) 【DVa】<1>충차 -◆216년 4월: 성 <1>귀병【ⓖ의병장51】 4712 (-3288) VS 16481 (-5009) 【탐라】<1>성벽 -◆216년 5월: 성 <1>귀병【ⓖ의병장51】 1223 (-3489) VS 10498 (-5982) 【탐라】<1>성벽 -◆216년 7월: 성 <1>귀병【ⓖ의병장51】 0 (-1223) VS 9374 (-1116) 【탐라】<1>성벽 diff --git a/che_close/logs/fight0.txt b/che_close/logs/fight0.txt deleted file mode 100644 index 142ac54f..00000000 --- a/che_close/logs/fight0.txt +++ /dev/null @@ -1,4 +0,0 @@ -진리 (130) vs (790) くま -● 01合 : 066 (-064) vs (-010) 780 -● 02合 : 000 (-066) vs (-008) 772 -くま 승리! diff --git a/che_close/logs/gen4.txt b/che_close/logs/gen4.txt deleted file mode 100644 index 7fe5c899..00000000 --- a/che_close/logs/gen4.txt +++ /dev/null @@ -1,1452 +0,0 @@ -●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^ -●처음 하시는 경우에는 도움말을 참고하시고, -●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~ -●부디 즐거운 삼모전 되시길 바랍니다 ^^ -●통솔 0 무력 0 지력 0 의 보너스를 받으셨습니다. -●연령은 21세로 시작합니다. -●9월:하루카에 임관했습니다. <1>21:30 -Lv 6로 레벨업! -●방랑군 세력이 하변(으)로 강행했습니다. -●10월:조달을 실패하여 금을 50 조달했습니다. <1>22:30 -●11월:선정을 성공하여 민심이 16 상승했습니다. <1>23:30 -29품관(으)로 승급하여 봉록이 600(으)로 상승했습니다! -Lv 7로 레벨업! -하루카에 의해 하변(으)로 발령됐습니다. <1>00:29 -●12월:치안을 성공하여 125 강화했습니다. <1>00:30 -Lv 8로 레벨업! -●봉급으로 금 55을 받았습니다. -하루카에 의해 하변(으)로 발령됐습니다. <1>01:29 -●1월:치안을 성공하여 212 강화했습니다. <1>01:30 -28품관(으)로 승급하여 봉록이 800(으)로 상승했습니다! -Lv 9로 레벨업! -전력전 대회의 16강 진출로 20의 상금, 약간의 명성 획득! -하루카에 의해 하변(으)로 발령됐습니다. <1>02:29 -●2월:치안을 실패하여 13 강화했습니다. <1>02:30 -Lv 10로 레벨업! -하루카에 의해 하변(으)로 발령됐습니다. <1>03:29 -●3월:치안을 성공하여 197 강화했습니다. <1>03:30 -하루카에 의해 하변(으)로 발령됐습니다. <1>04:29 -●4월:치안을 성공하여 187 강화했습니다. <1>04:30 -27품관(으)로 승급하여 봉록이 1000(으)로 상승했습니다! -Lv 11로 레벨업! -하루카에 의해 하변(으)로 발령됐습니다. <1>05:29 -●5월:치안을 72 강화했습니다. <1>05:30 -하루카에 의해 하변(으)로 발령됐습니다. <1>06:29 -●6월:치안을 실패하여 25 강화했습니다. <1>06:30 -●봉급으로 쌀 180을 받았습니다. -하루카에 의해 하변(으)로 발령됐습니다. <1>07:29 -●7월:치안을 66 강화했습니다. <1>07:30 -하루카에 의해 하변(으)로 발령됐습니다. <1>08:29 -●8월:치안을 57 강화했습니다. <1>08:30 -하루카에 의해 하변(으)로 발령됐습니다. <1>09:29 -●9월:치안을 79 강화했습니다. <1>09:30 -●10월:치안을 성공하여 132 강화했습니다. <1>10:30 -Lv 12로 레벨업! -●11월:치안을 69 강화했습니다. <1>11:30 -●12월:치안을 78 강화했습니다. <1>12:30 -●봉급으로 금 200을 받았습니다. -●1월:치안을 실패하여 24 강화했습니다. <1>13:30 -●2월:치안을 실패하여 13 강화했습니다. <1>14:30 -●금 600을 포상으로 받았습니다. -●3월:치안을 82 강화했습니다. <1>15:30 -26품관(으)로 승급하여 봉록이 1200(으)로 상승했습니다! -●4월:치안을 성공하여 170 강화했습니다. <1>16:30 -Lv 13로 레벨업! -●5월:치안을 실패하여 14 강화했습니다. <1>17:30 -●6월:치안을 실패하여 14 강화했습니다. <1>18:30 -●봉급으로 쌀 240을 받았습니다. -●7월:치안을 73 강화했습니다. <1>19:30 -●8월:치안을 실패하여 18 강화했습니다. <1>20:30 -●9월:치안을 80 강화했습니다. <1>21:30 -●10월:치안을 60 강화했습니다. <1>22:30 -●11월:수비 강화를 하여 64 상승했습니다. <1>23:30 -Lv 14로 레벨업! -●12월:수비 강화를 성공하여 190 상승했습니다. <1>00:30 -●봉급으로 금 240을 받았습니다. -●1월:수비 강화를 하여 68 상승했습니다. <1>01:30 -●2월:수비 강화를 하여 75 상승했습니다. <1>02:30 -●3월:수비 강화를 실패하여 24 상승했습니다. <1>03:30 -●4월:수비 강화를 하여 90 상승했습니다. <1>04:30 -25품관(으)로 승급하여 봉록이 1400(으)로 상승했습니다! -Lv 15로 레벨업! -●5월:수비 강화를 하여 63 상승했습니다. <1>05:30 -무력이 1 올랐습니다! -●6월:수비 강화를 하여 77 상승했습니다. <1>06:30 -●봉급으로 쌀 280을 받았습니다. -●7월:기병을(를) 7400명 징병했습니다. <1>07:30 -●8월:민심이 7 상승했습니다. <1>08:30 -●9월:훈련치가 30 상승했습니다. <1>09:30 -Lv 16로 레벨업! -●10월:훈련치가 30 상승했습니다. <1>10:30 -●금 1000을 포상으로 받았습니다. -●11월:사기치가 30 상승했습니다. <1>11:30 -●쌀 1000을 포상으로 받았습니다. -●12월:사기치가 30 상승했습니다. <1>12:30 -●봉급으로 금 420을 받았습니다. -화이트캣의 부대원들은 가정(으)로 집합되었습니다. -●1월:안정(으)로 진격합니다. <1>13:30 -●기병(으)로 성벽을 공격합니다. -◆성 <1>기병【카토】 4588 (-2812) VS 13655 (-4985) 【안정】<1>성벽 -Lv 17로 레벨업! -●2월:선정을 실패하여 민심이 3 상승했습니다. <1>14:30 -화이트캣의 부대원들은 가맹(으)로 집합되었습니다. -●3월:자동(으)로 진격합니다. <1>15:30 -●기병(으)로 성벽을 공격합니다. -◆성 <1>기병【카토】 2184 (-2404) VS 2491 (-5149) 【자동】<1>성벽 -화이트캣의 부대원들은 양평(으)로 집합되었습니다. -●4월:한중(으)로 진격합니다. <1>16:30 -●기병(으)로 성벽을 공격합니다. -◆성 <1>기병【카토】 0 (-2184) VS 19204 (-3346) 【한중】<1>성벽 -●퇴각했습니다. -전력전 대회의 16강 진출로 26의 상금, 약간의 명성 획득! -하루카(이)가 우승후보넥센피장파장(을)를 발동하였습니다. -●5월:민심이 7 상승했습니다. <1>17:30 -●6월:선정을 실패하여 민심이 3 상승했습니다. <1>18:30 -●봉급으로 쌀 280을 받았습니다. -●7월:민심이 7 상승했습니다. <1>19:30 -●8월:선정을 실패하여 민심이 3 상승했습니다. <1>20:30 -●금 2000을 포상으로 받았습니다. -24품관(으)로 승급하여 봉록이 1600(으)로 상승했습니다! -Lv 18로 레벨업! -●쌀 3000을 포상으로 받았습니다. -●9월:선정을 실패하여 민심이 3 상승했습니다. <1>21:30 -●10월:선정을 성공하여 민심이 18 상승했습니다. <1>22:30 -하루카에 의해 안정(으)로 발령됐습니다. <1>23:29 -●11월:선정을 실패하여 민심이 3 상승했습니다. <1>23:30 -●12월:민심이 7 상승했습니다. <1>00:30 -●봉급으로 금 480을 받았습니다. -●특기 【통찰】(을)를 익혔습니다! -●1월:민심이 8 상승했습니다. <1>01:30 -●2월:민심이 7 상승했습니다. <1>02:30 -●쌀 1000을 포상으로 받았습니다. -●3월:민심이 9 상승했습니다. <1>03:30 -●4월:민심이 7 상승했습니다. <1>04:30 -Lv 19로 레벨업! -하루카에 의해 가맹(으)로 발령됐습니다. <1>05:29 -●5월:선정을 실패하여 민심이 3 상승했습니다. <1>05:30 -●6월:민심이 8 상승했습니다. <1>06:30 -●봉급으로 쌀 320을 받았습니다. -화이트캣의 부대원들은 안정(으)로 집합되었습니다. -●7월:중장기병을(를) 7400명 징병했습니다. <1>07:30 -●8월:선정을 실패하여 민심이 1 상승했습니다. <1>08:30 -●9월:훈련치가 30 상승했습니다. <1>09:30 -●10월:훈련치가 30 상승했습니다. <1>10:30 -●11월:사기치가 30 상승했습니다. <1>11:30 -Lv 20로 레벨업! -화이트캣의 부대원들은 가정(으)로 집합되었습니다. -●12월:사기치가 30 상승했습니다. <1>12:30 -●봉급으로 금 480을 받았습니다. -●1월:에 파괴가 실패했습니다. <1>13:30 -●2월:(으)로 진격합니다. <1>14:30 -●중장기병(으)로 쿠요의 기병(을)를 공격합니다. -공 <1>중장【카토】 4653 (-2747) VS 2179 (-4598) 【쿠요】<1>기병 -철쇄(+7)(을)를 습득했습니다! -강서유서에 의해 안정(으)로 발령됐습니다. <1>15:02 -●3월:천수(으)로 진격합니다. <1>15:30 -●중장기병(으)로 감정의 정란(을)를 공격합니다. -공 <1>중장【카토】 1759 (-2894) VS 0 (-3300) 【감정】<1>정란 -감정의 정란(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 961 (-798) VS 8523 (-1677) 【천수】<1>성벽 -●4월:중장기병을(를) 6400명 추가모병했습니다. <1>16:30 -23품관(으)로 승급하여 봉록이 1800(으)로 상승했습니다! -화이트캣의 부대원들은 천수(으)로 집합되었습니다. -●금 2000을 포상으로 받았습니다. -●5월:훈련치가 30 상승했습니다. <1>17:30 -통솔이 1 올랐습니다! -Lv 21로 레벨업! -●6월:사기치가 31 상승했습니다. <1>18:30 -●봉급으로 쌀 360을 받았습니다. -●7월:서량(으)로 진격합니다. <1>19:30 -●중장기병(으)로 최태원의 귀병(을)를 공격합니다. -공 <1>중장【카토】 4960 (-2401) VS 1228 (-4472) 【최태원】<1>귀병 -●8월:서량(으)로 진격합니다. <1>20:30 -●중장기병(으)로 최태원의 귀병(을)를 공격합니다. -공 <1>중장【카토】 4562 (-398) VS 0 (-1228) 【최태원】<1>귀병 -최태원의 귀병(이)가 전멸했습니다. -●중장기병(으)로 박희수의 보병(을)를 공격합니다. -공 <1>중장【카토】 4421 (-141) VS 0 (-331) 【박희수】<1>보병 -박희수의 보병(이)가 전멸했습니다. -●중장기병(으)로 쿠요의 기병(을)를 공격합니다. -공 <1>중장【카토】 3956 (-465) VS 0 (-681) 【쿠요】<1>기병 -쿠요의 기병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 2786 (-1170) VS 23313 (-3137) 【서량】<1>성벽 -●쌀 2000을 포상으로 받았습니다. -●9월:서량(으)로 진격합니다. <1>21:30 -●중장기병(으)로 감정의 정란(을)를 공격합니다. -공 <1>중장【카토】 1331 (-1455) VS 0 (-3300) 【감정】<1>정란 -감정의 정란(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 0 (-1331) VS 14095 (-4085) 【서량】<1>성벽 -●퇴각했습니다. -Lv 22로 레벨업! -●쌀 1000을 포상으로 받았습니다. -●10월:중장기병을(를) 7500명 모병했습니다. <1>22:30 -●금 2000을 포상으로 받았습니다. -●11월:훈련치가 30 상승했습니다. <1>23:30 -●12월:서량(으)로 진격합니다. <1>00:30 -●중장기병(으)로 쿠요의 기병(을)를 공격합니다. -공 <1>중장【카토】 6074 (-1426) VS 0 (-1523) 【쿠요】<1>기병 -쿠요의 기병(이)가 전멸했습니다. -●중장기병(으)로 ⓜ공손료의 귀병(을)를 공격합니다. -공 <1>중장【카토】 5668 (-406) VS 0 (-994) 【ⓜ공손료】<1>귀병 -ⓜ공손료의 귀병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 5429 (-239) VS 0 (-550) 【서량】<1>성벽 -서량 공략에 성공했습니다. -●봉급으로 금 360을 받았습니다. -자동수몰이 발동되었습니다. -6974에 의해 자동(으)로 발령됐습니다. <1>01:15 -●1월:사기치가 41 상승했습니다. <1>01:30 -●중장기병(으)로 갸오오의 귀병(을)를 수비합니다. -수 <1>중장【카토】 2104 (-3325) VS 2811 (-5328) 【갸오오】<1>귀병 -●중장기병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>중장【카토】 0 (-2104) VS 4863 (-2337) 【魯堂首】<1>등갑 -●전멸했습니다. -Lv 23로 레벨업! -●2월:중장기병을(를) 7500명 모병했습니다. <1>02:30 -●중장기병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>중장【카토】 2934 (-4566) VS 1177 (-3122) 【魯堂首】<1>등갑 -●금 2000을 포상으로 받았습니다. -●3월:덕양(으)로 진격합니다. <1>03:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 0 (-2934) VS 840 (-3790) 【덕양】<1>성벽 -●퇴각했습니다. -●쌀 2000을 포상으로 받았습니다. -●4월:중장기병을(를) 7500명 모병했습니다. <1>04:30 -하루카에 의해 서량(으)로 발령됐습니다. <1>05:29 -●5월:훈련치가 30 상승했습니다. <1>05:30 -●중장기병(으)로 북오더의 궁병(을)를 수비합니다. -수 <1>중장【카토】 5443 (-2057) VS 0 (-1049) 【북오더】<1>궁병 -북오더의 궁병(이)가 퇴각했습니다. -●중장기병(으)로 쿠요의 기병(을)를 수비합니다. -수 <1>중장【카토】 4744 (-699) VS 0 (-1303) 【쿠요】<1>기병 -쿠요의 기병(이)가 퇴각했습니다. -●금 3000을 포상으로 받았습니다. -●6월:사기치가 47 상승했습니다. <1>06:30 -Lv 24로 레벨업! -●봉급으로 쌀 360을 받았습니다. -●7월:(으)로 진격합니다. <1>07:30 -●중장기병(으)로 최태원의 귀병(을)를 공격합니다. -공 <1>중장【카토】 1761 (-2983) VS 0 (-3449) 【최태원】<1>귀병 -최태원의 귀병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 1417 (-344) VS 7922 (-808) 【강】<1>성벽 -●8월:(으)로 진격합니다. <1>08:30 -●중장기병(으)로 박희수의 보병(을)를 공격합니다. -공 <1>중장【카토】 122 (-1295) VS 0 (-1839) 【박희수】<1>보병 -박희수의 보병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 0 (-122) VS 7530 (-390) 【강】<1>성벽 -●퇴각했습니다. -●쌀 2000을 포상으로 받았습니다. -●9월:중장기병을(를) 7500명 모병했습니다. <1>09:30 -22품관(으)로 승급하여 봉록이 2000(으)로 상승했습니다! -●10월:강서유서(을)를 서량(으)로 발령했습니다. <1>10:30 -●10월:훈련치가 32 상승했습니다. <1>10:30 -●금 2000을 포상으로 받았습니다. -●11월:일본어번역기에게 금 2000을 수여했습니다. <1>11:30 -●11월:사기치가 32 상승했습니다. <1>11:30 -●12월:평민킬러에게 금 1000을 수여했습니다. <1>12:30 -●12월:(으)로 진격합니다. <1>12:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 7397 (-103) VS 0 (-410) 【강】<1>성벽 - 공략에 성공했습니다. -●봉급으로 금 400을 받았습니다. -통솔전 대회의 16강 진출로 32의 상금, 약간의 명성 획득! -화이트캣의 부대원들은 강주(으)로 집합되었습니다. -●1월:대악마에게 금 3000을 수여했습니다. <1>13:30 -●1월:귀양(으)로 진격합니다. <1>13:30 -●중장기병(으)로 누렁의 귀병(을)를 공격합니다. -공 <1>중장【카토】 5433 (-1964) VS 0 (-3219) 【누렁】<1>귀병 -누렁의 귀병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 4688 (-745) VS 16912 (-1878) 【귀양】<1>성벽 -무력이 1 올랐습니다! -Lv 25로 레벨업! -●2월:임사영(을)를 하변(으)로 발령했습니다. <1>14:30 -●2월:귀양(으)로 진격합니다. <1>14:30 -●중장기병(으)로 읭읭의 기병(을)를 공격합니다. -공 <1>중장【카토】 2365 (-2323) VS 0 (-3500) 【읭읭】<1>기병 -읭읭의 기병(이)가 전멸했습니다. -●중장기병(으)로 魯堂首의 등갑병(을)를 공격합니다. -공 <1>중장【카토】 2041 (-324) VS 1460 (-878) 【魯堂首】<1>등갑 -●쌀 1000을 포상으로 받았습니다. -●3월:연이에게서 쌀 1109을 몰수했습니다. <1>15:30 -●3월:귀양(으)로 진격합니다. <1>15:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 396 (-1645) VS 0 (-5520) 【귀양】<1>성벽 -귀양 공략에 성공했습니다. -●4월:대악마(을)를 강주(으)로 발령했습니다. <1>16:30 -●4월:중장기병을(를) 7600명 추가모병했습니다. <1>16:30 -강서유서에 의해 덕양(으)로 발령됐습니다. <1>17:02 -●5월:하루카에게 쌀 1000을 수여했습니다. <1>17:30 -●5월:성도(으)로 진격합니다. <1>17:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 4897 (-3099) VS 19623 (-4497) 【성도】<1>성벽 -●6월:일본어번역기에게 쌀 1000을 수여했습니다. <1>18:30 -●6월:성도(으)로 진격합니다. <1>18:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 3872 (-1025) VS 0 (-2370) 【성도】<1>성벽 -성도 공략에 성공했습니다. -내나에 의해 안정(으)로 발령됐습니다. <1>18:53 -●봉급으로 쌀 400을 받았습니다. -●금 1000을 포상으로 받았습니다. -●7월:평민킬러(을)를 덕양(으)로 발령했습니다. <1>19:30 -●7월:장안(으)로 진격합니다. <1>19:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 54 (-3818) VS 32877 (-4523) 【장안】<1>성벽 -Lv 26로 레벨업! -●8월:내나(을)를 서량(으)로 발령했습니다. <1>20:30 -●8월:민심이 10 상승했습니다. <1>20:30 -●9월:일본어번역기(을)를 자동(으)로 발령했습니다. <1>21:30 -●9월:민심이 8 상승했습니다. <1>21:30 -●쌀 3000을 포상으로 받았습니다. -하루카에 의해 주시(으)로 발령됐습니다. <1>22:29 -●10월:내나에게 쌀 1000을 수여했습니다. <1>22:30 -●10월:선정을 성공하여 민심이 21 상승했습니다. <1>22:30 -●11월:평민킬러(을)를 한중(으)로 발령했습니다. <1>23:30 -●11월:선정을 실패하여 민심이 2 상승했습니다. <1>23:30 -하루카에 의해 자동(으)로 발령됐습니다. <1>00:29 -●12월:샌프란시스코에게 금 400을 수여했습니다. <1>00:30 -●12월:민심이 7 상승했습니다. <1>00:30 -●봉급으로 금 400을 받았습니다. -하루카에 의해 한중(으)로 발령됐습니다. <1>01:29 -●1월:물파스에게 금 2000을 수여했습니다. <1>01:30 -●1월:장려를 성공하여 주민이 2250명 증가했습니다. <1>01:30 -●금 2000을 포상으로 받았습니다. -●2월:장려를 성공하여 주민이 2290명 증가했습니다. <1>02:30 -●쌀 2000을 포상으로 받았습니다. -21품관(으)로 승급하여 봉록이 2200(으)로 상승했습니다! -Lv 27로 레벨업! -●3월:주민이 690명 증가했습니다. <1>03:30 -●4월:장려를 성공하여 주민이 2250명 증가했습니다. <1>04:30 -●5월:주민이 950명 증가했습니다. <1>05:30 -●6월:장려를 성공하여 주민이 2240명 증가했습니다. <1>06:30 -●봉급으로 쌀 440을 받았습니다. -●7월:주민이 890명 증가했습니다. <1>07:30 -●8월:주민이 760명 증가했습니다. <1>08:30 -Lv 28로 레벨업! -●9월:장려를 성공하여 주민이 1840명 증가했습니다. <1>09:30 -●10월:주민이 960명 증가했습니다. <1>10:30 -●11월:장려를 성공하여 주민이 2240명 증가했습니다. <1>11:30 -●12월:주민이 850명 증가했습니다. <1>12:30 -●봉급으로 금 440을 받았습니다. -●1월:장려를 실패하여 주민이 190명 증가했습니다. <1>13:30 -통솔이 1 올랐습니다! -●2월:장려를 성공하여 주민이 2480명 증가했습니다. <1>14:30 -집밥의 부대원들은 덕양(으)로 집합되었습니다. -전력전 대회의 16강 진출로 38의 상금, 약간의 명성 획득! -●쌀 2000을 포상으로 받았습니다. -●3월:중장기병을(를) 7500명 추가징병했습니다. <1>15:30 -Lv 29로 레벨업! -●4월:주민이 890명 증가했습니다. <1>16:30 -집밥의 부대원들은 하변(으)로 집합되었습니다. -●5월:환약(치료)(을)를 구입했습니다. <1>17:30 -평민킬러에 의해 안정(으)로 발령됐습니다. <1>17:45 -●금 3000을 포상으로 받았습니다. -●6월:훈련치가 30 상승했습니다. <1>18:30 -●봉급으로 쌀 550을 받았습니다. -●7월:훈련치가 30 상승했습니다. <1>19:30 -●쌀 5000을 포상으로 받았습니다. -20품관(으)로 승급하여 봉록이 2400(으)로 상승했습니다! -전력전 대회의 16강 진출로 38의 상금, 약간의 명성 획득! -●8월:사기치가 30 상승했습니다. <1>20:30 -집밥의 부대원들은 하변(으)로 집합되었습니다. -●9월:사기치가 30 상승했습니다. <1>21:30 -집밥의 부대원들은 적도(으)로 집합되었습니다. -●10월:사기치가 30 상승했습니다. <1>22:30 -Lv 30로 레벨업! -●11월:하내에 파괴가 실패했습니다. <1>23:30 -●12월:하내에 파괴가 실패했습니다. <1>00:30 -●봉급으로 금 600을 받았습니다. -●1월:홍농에 파괴가 실패했습니다. <1>01:30 -●2월:홍농에 파괴가 실패했습니다. <1>02:30 -●금 5000을 포상으로 받았습니다. -●3월:홍농에 파괴가 성공했습니다. <1>03:30 -화이트캣의 부대원들은 흉노(으)로 집합되었습니다. -하루카(이)가 성도백성동원(을)를 발동하였습니다. -●4월:하내(으)로 진격합니다. <1>04:30 -●중장기병(으)로 쥬비아의 귀병(을)를 공격합니다. -공 <1>중장【카토】 6395 (-1159) VS 0 (-2309) 【쥬비아】<1>귀병 -쥬비아의 귀병(이)가 전멸했습니다. -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 5414 (-981) VS 343 (-2907) 【하내】<1>성벽 -집밥의 부대원들은 하내(으)로 집합되었습니다. -●5월:호관(으)로 진격합니다. <1>05:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 3119 (-2295) VS 29782 (-6508) 【호관】<1>성벽 -Lv 31로 레벨업! -●6월:호관(으)로 진격합니다. <1>06:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 665 (-2454) VS 1178 (-6782) 【호관】<1>성벽 -●봉급으로 쌀 720을 받았습니다. -●7월:돌격기병을(를) 7600명 모병했습니다. <1>07:30 -●8월:훈련치가 32 상승했습니다. <1>08:30 -통솔전 대회의 준우승으로 480의 상금, 약간의 명성 획득! -하루카에 의해 진양(으)로 발령됐습니다. <1>09:29 -●9월:(으)로 진격합니다. <1>09:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 7548 (-52) VS 0 (-180) 【계】<1>성벽 - 공략에 성공했습니다. -Lv 32로 레벨업! -●10월:역경(으)로 진격합니다. <1>10:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 4766 (-2782) VS 2909 (-6611) 【역경】<1>성벽 -●쌀 2000을 포상으로 받았습니다. -집밥의 부대원들은 하내(으)로 집합되었습니다. -●11월:대악마에게 금 3000을 수여했습니다. <1>11:30 -●11월:사기치가 52 상승했습니다. <1>11:30 -집밥의 부대원들은 역경(으)로 집합되었습니다. -●12월:내나(을)를 성도(으)로 발령했습니다. <1>12:30 -●12월:북평(으)로 진격합니다. <1>12:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 3683 (-1083) VS 0 (-4850) 【북평】<1>성벽 -북평 공략에 성공했습니다. -●봉급으로 금 720을 받았습니다. -페르시아에 의해 기산(으)로 발령됐습니다. <1>13:26 -●1월:하루카(을)를 북평(으)로 발령했습니다. <1>13:30 -●1월:장안(으)로 진격합니다. <1>13:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 2043 (-1640) VS 0 (-4720) 【장안】<1>성벽 -장안 공략에 성공했습니다. -●2월:6974(을)를 서량(으)로 발령했습니다. <1>14:30 -●2월:민심이 9 상승했습니다. <1>14:30 -●쌀 2000을 포상으로 받았습니다. -●3월:대악마(을)를 진양(으)로 발령했습니다. <1>15:30 -●3월:민심이 9 상승했습니다. <1>15:30 -●4월:6974(을)를 서량(으)로 발령했습니다. <1>16:30 -●4월:선정을 실패하여 민심이 3 상승했습니다. <1>16:30 -●5월:평민킬러에게 쌀 2000을 수여했습니다. <1>17:30 -●5월:민심이 9 상승했습니다. <1>17:30 -Lv 33로 레벨업! -●6월:샌프란시스코(을)를 남피(으)로 발령했습니다. <1>18:30 -●6월:민심이 7 상승했습니다. <1>18:30 -●봉급으로 쌀 480을 받았습니다. -●7월:서주의 소문만 들을 수 있었습니다. <1>19:30 -【서주】주민:485300, 민심:100, 장수:0, 병력:0 -●8월:민심이 10 상승했습니다. <1>20:30 -●9월:민심이 10 상승했습니다. <1>21:30 -19품관(으)로 승급하여 봉록이 2600(으)로 상승했습니다! -●10월:민심이 7 상승했습니다. <1>22:30 -평민킬러에 의해 남피(으)로 발령됐습니다. <1>22:45 -●쌀 1000을 포상으로 받았습니다. -●11월:수비 강화를 하여 82 상승했습니다. <1>23:30 -하루카에 의해 남피(으)로 발령됐습니다. <1>00:29 -●12월:수비 강화를 성공하여 195 상승했습니다. <1>00:30 -●봉급으로 금 520을 받았습니다. -●1월:수비 강화를 하여 63 상승했습니다. <1>01:30 -●2월:수비 강화를 하여 80 상승했습니다. <1>02:30 -대천사하루카의 부대원들은 진양(으)로 집합되었습니다. -●3월:돌격기병을(를) 6200명 추가모병했습니다. <1>03:30 -●4월:장려를 성공하여 주민이 2570명 증가했습니다. <1>04:30 -Lv 34로 레벨업! -●5월:훈련치가 30 상승했습니다. <1>05:30 -대천사하루카의 부대원들은 남피(으)로 집합되었습니다. -●6월:사기치가 30 상승했습니다. <1>06:30 -●봉급으로 쌀 520을 받았습니다. -하루카에 의해 평원(으)로 발령됐습니다. <1>07:29 -●7월:계교(으)로 진격합니다. <1>07:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 5407 (-2836) VS 19824 (-8406) 【계교】<1>성벽 -대악마에 의해 호관(으)로 발령됐습니다. <1>07:58 -●돌격기병(으)로 아소의 호표기병(을)를 수비합니다. -수 <1>돌격【카토】 4291 (-1116) VS 0 (-1557) 【아소】<1>호표 -아소의 호표기병(이)가 퇴각했습니다. -무력이 1 올랐습니다! -●돌격기병(으)로 랜임1분장의 호표기병(을)를 수비합니다. -수 <1>돌격【카토】 2608 (-1683) VS 0 (-2249) 【랜임1분장】<1>호표 -랜임1분장의 호표기병(이)가 퇴각했습니다. -●돌격기병(으)로 니콜의 충차(을)를 수비합니다. -수 <1>돌격【카토】 0 (-2608) VS 3494 (-3743) 【니콜】<1>충차 -●전멸했습니다. -●금 3000을 포상으로 받았습니다. -●8월:강서유서에게 쌀 4000을 수여했습니다. <1>08:30 -●8월:돌격기병을(를) 8300명 모병했습니다. <1>08:30 -●돌격기병(으)로 비월의 근위병(을)를 수비합니다. -수 <1>돌격【카토】 3789 (-4511) VS 0 (-4759) 【비월】<1>근위 -비월의 근위병(이)가 퇴각했습니다. -●돌격기병(으)로 魯堂首의 근위병(을)를 수비합니다. -수 <1>돌격【카토】 0 (-3789) VS 1008 (-3285) 【魯堂首】<1>근위 -●전멸했습니다. -Lv 35로 레벨업! -하루카에 의해 진양(으)로 발령됐습니다. <1>09:29 -●9월:하루카에게 금 5000을 수여했습니다. <1>09:30 -●9월:중장기병을(를) 8300명 모병했습니다. <1>09:30 -●쌀 5000을 포상으로 받았습니다. -화이트캣의 부대원들은 호관(으)로 집합되었습니다. -●10월:평민킬러에게 금 5000을 수여했습니다. <1>10:30 -●10월:훈련치가 30 상승했습니다. <1>10:30 -●금 6000을 포상으로 받았습니다. -●11월:SARS에게 쌀 8000을 수여했습니다. <1>11:30 -●11월:사기치가 30 상승했습니다. <1>11:30 -●중장기병(으)로 아소의 호표기병(을)를 수비합니다. -수 <1>중장【카토】 5527 (-2773) VS 3721 (-4279) 【아소】<1>호표 -●12월:박일아(을)를 평원(으)로 발령했습니다. <1>12:30 -●12월:선정을 실패하여 민심이 3 상승했습니다. <1>12:30 -●중장기병(으)로 魯堂首의 근위병(을)를 수비합니다. -수 <1>중장【카토】 2852 (-2675) VS 3266 (-3860) 【魯堂首】<1>근위 -●봉급으로 금 520을 받았습니다. -●중장기병(으)로 아소의 호표기병(을)를 수비합니다. -수 <1>중장【카토】 174 (-2678) VS 0 (-3721) 【아소】<1>호표 -아소의 호표기병(이)가 퇴각했습니다. -하루카에 의해 진양(으)로 발령됐습니다. <1>13:29 -●1월:내나(을)를 진양(으)로 발령했습니다. <1>13:30 -●1월:중장기병을(를) 8100명 추가모병했습니다. <1>13:30 -통솔이 1 올랐습니다! -통솔전 대회의 8강 진출로 138의 상금, 약간의 명성 획득! -화이트캣의 부대원들은 호관(으)로 집합되었습니다. -●중장기병(으)로 이쓰미의 마귀병(을)를 수비합니다. -수 <1>중장【카토】 5394 (-2880) VS 0 (-2183) 【이쓰미】<1>마귀 -이쓰미의 마귀병(이)가 퇴각했습니다. -●2월:하루카(을)를 호관(으)로 발령했습니다. <1>14:30 -●2월:훈련치가 47 상승했습니다. <1>14:30 -Lv 36로 레벨업! -●금 4000을 포상으로 받았습니다. -●3월:강서유서에게 쌀 4000을 수여했습니다. <1>15:30 -●3월:사기치가 47 상승했습니다. <1>15:30 -페르시아에 의해 평원(으)로 발령됐습니다. <1>16:26 -●4월:박일아에게 쌀 3000을 수여했습니다. <1>16:30 -●4월:계교(으)로 진격합니다. <1>16:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 2947 (-2447) VS 137 (-6883) 【계교】<1>성벽 -●쌀 2000을 포상으로 받았습니다. -대악마에 의해 호관(으)로 발령됐습니다. <1>16:58 -●중장기병(으)로 전인호의 마귀병(을)를 수비합니다. -수 <1>중장【카토】 1538 (-1409) VS 0 (-2300) 【전인호】<1>마귀 -전인호의 마귀병(이)가 퇴각했습니다. -●5월:중장기병을(를) 6900명 추가모병했습니다. <1>17:30 -●중장기병(으)로 읭읭의 호표기병(을)를 수비합니다. -수 <1>중장【카토】 4393 (-4045) VS 3085 (-3915) 【읭읭】<1>호표 -18품관(으)로 승급하여 봉록이 2800(으)로 상승했습니다! -통솔전 대회의 4강 진출로 276의 상금, 약간의 명성 획득! -●6월:박일아(을)를 호관(으)로 발령했습니다. <1>18:30 -●6월:훈련치가 57 상승했습니다. <1>18:30 -●봉급으로 쌀 560을 받았습니다. -●7월:하루카에게 금 3000을 수여했습니다. <1>19:30 -●7월:사기치가 57 상승했습니다. <1>19:30 -●중장기병(으)로 갸오오의 백귀병(을)를 수비합니다. -수 <1>중장【카토】 1582 (-2811) VS 0 (-3900) 【갸오오】<1>백귀 -갸오오의 백귀병(이)가 퇴각했습니다. -Lv 37로 레벨업! -●중장기병(으)로 Anes의 호표기병(을)를 수비합니다. -수 <1>중장【카토】 0 (-1582) VS 1946 (-2054) 【Anes】<1>호표 -●전멸했습니다. -하루카에 의해 진양(으)로 발령됐습니다. <1>20:29 -●8월:강서유서에게 금 3000을 수여했습니다. <1>20:30 -●8월:돌격기병을(를) 8400명 모병했습니다. <1>20:30 -화이트캣의 부대원들은 호관(으)로 집합되었습니다. -●9월:훈련치가 28 상승했습니다. <1>21:30 -전력전 대회의 16강 진출로 46의 상금, 약간의 명성 획득! -●10월:푸린푸린♥에게서 쌀 3507을 몰수했습니다. <1>22:30 -●10월:사기치가 30 상승했습니다. <1>22:30 -●돌격기병(으)로 읭읭의 호표기병(을)를 수비합니다. -수 <1>돌격【카토】 4373 (-4027) VS 3117 (-3883) 【읭읭】<1>호표 -대악마에 의해 진류(으)로 발령됐습니다. <1>22:58 -●쌀 2000을 포상으로 받았습니다. -●금 4000을 포상으로 받았습니다. -●11월:하루카(을)를 평원(으)로 발령했습니다. <1>23:30 -●11월:북해의 소문만 들을 수 있었습니다. <1>23:30 -【북해】주민:252676, 민심:75, 장수:2, 병력:8669 -●12월:물파스에게 금 2000을 수여했습니다. <1>00:30 -●12월:허창(으)로 진격합니다. <1>00:30 -●돌격기병(으)로 성벽을 공격합니다. -◆성 <1>돌격【카토】 340 (-4033) VS 13717 (-6443) 【허창】<1>성벽 -●봉급으로 금 700을 받았습니다. -하루카에 의해 호관(으)로 발령됐습니다. <1>01:29 -●1월:물파스에게 쌀 1000을 수여했습니다. <1>01:30 -●1월:중장기병을(를) 8400명 모병했습니다. <1>01:30 -●중장기병(으)로 Anes의 호표기병(을)를 수비합니다. -수 <1>중장【카토】 3722 (-4678) VS 0 (-2432) 【Anes】<1>호표 -Anes의 호표기병(이)가 퇴각했습니다. -●중장기병(으)로 진리의 백마병(을)를 수비합니다. -수 <1>중장【카토】 0 (-3722) VS 5059 (-2541) 【진리】<1>백마 -●전멸했습니다. -●2월:하루카(을)를 진류(으)로 발령했습니다. <1>02:30 -●2월:호표기병을(를) 8400명 모병했습니다. <1>02:30 -●금 3000을 포상으로 받았습니다. -Lv 38로 레벨업! -●3월:훈련치가 30 상승했습니다. <1>03:30 -대악마(이)가 수몰(을)를 발동하였습니다. -●4월:박일아(을)를 남피(으)로 발령했습니다. <1>04:30 -●4월:사기치가 30 상승했습니다. <1>04:30 -대악마에 의해 진류(으)로 발령됐습니다. <1>04:58 -●5월:정도(으)로 진격합니다. <1>05:30 -정도 공략에 성공했습니다. -●금 4000을 포상으로 받았습니다. -●6월:안돼요안돼요(을)를 정도(으)로 발령했습니다. <1>06:30 -●6월:(으)로 진격합니다. <1>06:30 -●호표기병(으)로 狂三의 마귀병(을)를 공격합니다. -공 <1>호표【카토】 5856 (-2544) VS 210 (-6469) 【狂三】<1>마귀 -●봉급으로 쌀 700을 받았습니다. -●7월:(으)로 진격합니다. <1>07:30 -●호표기병(으)로 다이스의 궁기병(을)를 공격합니다. -공 <1>호표【카토】 1034 (-4822) VS 1872 (-5128) 【다이스】<1>궁기 -●8월:호표기병을(를) 7400명 추가모병했습니다. <1>08:30 -●9월:평민킬러에게 쌀 3000을 수여했습니다. <1>09:30 -●9월:훈련치가 30 상승했습니다. <1>09:30 -●10월:대악마에게 쌀 3000을 수여했습니다. <1>10:30 -●10월:(으)로 진격합니다. <1>10:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 7604 (-830) VS 0 (-3090) 【패】<1>성벽 - 공략에 성공했습니다. -●쌀 3000을 포상으로 받았습니다. -●11월:사기치가 33 상승했습니다. <1>11:30 -Lv 39로 레벨업! -화이트캣의 부대원들은 (으)로 집합되었습니다. -●12월:수춘(으)로 진격합니다. <1>12:30 -●호표기병(으)로 갸오오의 귀병(을)를 공격합니다. -공 <1>호표【카토】 6422 (-1182) VS 0 (-3657) 【갸오오】<1>귀병 -갸오오의 귀병(이)가 전멸했습니다. -●호표기병(으)로 비월의 청주병(을)를 공격합니다. -공 <1>호표【카토】 5815 (-607) VS 1585 (-2088) 【비월】<1>청주 -●봉급으로 금 700을 받았습니다. -일기토 대회의 8강 진출로 144의 상금, 약간의 명성 획득! -하루카에 의해 허창(으)로 발령됐습니다. <1>13:29 -●1월:평민킬러(을)를 허창(으)로 발령했습니다. <1>13:30 -●1월:호로(으)로 진격합니다. <1>13:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 3733 (-2082) VS 4640 (-8170) 【호로】<1>성벽 -화이트캣의 부대원들은 (으)로 집합되었습니다. -●2월:수춘(으)로 진격합니다. <1>14:30 -●호표기병(으)로 낭군의 귀병(을)를 공격합니다. -공 <1>호표【카토】 0 (-3733) VS 810 (-6498) 【낭군】<1>귀병 -●퇴각했습니다. -●3월:SARS(을)를 호관(으)로 발령했습니다. <1>15:30 -●3월:호표기병을(를) 8400명 모병했습니다. <1>15:30 -●4월:훈련치가 30 상승했습니다. <1>16:30 -●금 5000을 포상으로 받았습니다. -●5월:사기치가 30 상승했습니다. <1>17:30 -●쌀 3900을 포상으로 받았습니다. -●6월:수춘(으)로 진격합니다. <1>18:30 -●호표기병(으)로 랜임1분장의 기병(을)를 공격합니다. -공 <1>호표【카토】 5524 (-2876) VS 209 (-6391) 【랜임1분장】<1>기병 -Lv 40로 레벨업! -●이번 수입은 쌀 61525입니다. -●봉급으로 쌀 700을 받았습니다. -●7월:수춘(으)로 진격합니다. <1>19:30 -●호표기병(으)로 카이스트의 귀병(을)를 공격합니다. -공 <1>호표【카토】 2095 (-3429) VS 1425 (-6052) 【카이스트】<1>귀병 -17품관(으)로 승급하여 봉록이 3000(으)로 상승했습니다! -●8월:수춘(으)로 진격합니다. <1>20:30 -●호표기병(으)로 아소의 기병(을)를 공격합니다. -공 <1>호표【카토】 943 (-1152) VS 0 (-2894) 【아소】<1>기병 -아소의 기병(이)가 전멸했습니다. -●호표기병(으)로 비밀의 귀병(을)를 공격합니다. -공 <1>호표【카토】 762 (-181) VS 0 (-349) 【비밀】<1>귀병 -비밀의 귀병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 11 (-751) VS 7569 (-2621) 【수춘】<1>성벽 -●9월:호표기병을(를) 8400명 추가모병했습니다. <1>21:30 -●10월:훈련치가 30 상승했습니다. <1>22:30 -●11월:하루카에게 금 5000을 수여했습니다. <1>23:30 -●11월:사기치가 30 상승했습니다. <1>23:30 -●금 5000을 포상으로 받았습니다. -●12월:6974에게 금 1000을 수여했습니다. <1>00:30 -●12월:수춘(으)로 진격합니다. <1>00:30 -●호표기병(으)로 전인호의 귀병(을)를 공격합니다. -공 <1>호표【카토】 4604 (-3807) VS 1508 (-6192) 【전인호】<1>귀병 -●이번 수입은 금 52325입니다. -●봉급으로 금 750을 받았습니다. -●쌀 5000을 포상으로 받았습니다. -●1월:수춘(으)로 진격합니다. <1>01:30 -●호표기병(으)로 이쓰미의 귀병(을)를 공격합니다. -공 <1>호표【카토】 2709 (-1895) VS 0 (-6756) 【이쓰미】<1>귀병 -이쓰미의 귀병(이)가 전멸했습니다. -●호표기병(으)로 낭군의 귀병(을)를 공격합니다. -공 <1>호표【카토】 2667 (-42) VS 599 (-959) 【낭군】<1>귀병 -Lv 41로 레벨업! -●2월:수춘(으)로 진격합니다. <1>02:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 0 (-2667) VS 9564 (-8306) 【수춘】<1>성벽 -●퇴각했습니다. -●3월:호표기병을(를) 7700명 모병했습니다. <1>03:30 -●4월:훈련치가 30 상승했습니다. <1>04:30 -화이트캣의 부대원들은 수춘(으)로 집합되었습니다. -●5월:박일아(을)를 수춘(으)로 발령했습니다. <1>05:30 -●5월:사기치가 33 상승했습니다. <1>05:30 -●6월:엘마쨩상향좀(을)를 (으)로 발령했습니다. <1>06:30 -●6월:합비(으)로 진격합니다. <1>06:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 6954 (-746) VS 0 (-3720) 【합비】<1>성벽 -합비 공략에 성공했습니다. -●봉급으로 쌀 900을 받았습니다. -화이트캣의 부대원들은 수춘(으)로 집합되었습니다. -●7월:엘마쨩상향좀에게 쌀 1000을 수여했습니다. <1>07:30 -●7월:본국입니다. 합비(으)로 출병 실패. <1>07:30 -●7월:합비(으)로 이동했습니다. <1>07:30 -화이트캣의 부대원들은 수춘(으)로 집합되었습니다. -●8월:호표기병을(를) 1400명 추가모병했습니다. <1>08:30 -●9월:SARS에게 쌀 4000을 수여했습니다. <1>09:30 -●9월:주민이 1090명 증가했습니다. <1>09:30 -●10월:대악마에게 쌀 5000을 수여했습니다. <1>10:30 -●10월:수비 강화를 하여 95 상승했습니다. <1>10:30 -무력이 1 올랐습니다! -●11월:페르시아(을)를 강주(으)로 발령했습니다. <1>11:30 -●11월:수비 강화를 하여 89 상승했습니다. <1>11:30 -일기토 대회의 16강 진출로 52의 상금, 약간의 명성 획득! -●12월:안돼요안돼요(을)를 자동(으)로 발령했습니다. <1>12:30 -●12월:수비 강화를 하여 109 상승했습니다. <1>12:30 -Lv 42로 레벨업! -●이번 수입은 금 56333입니다. -●봉급으로 금 600을 받았습니다. -화이트캣의 부대원들은 강주(으)로 집합되었습니다. -●1월:내나에게 금 6000을 수여했습니다. <1>13:30 -●1월:수비 강화를 하여 86 상승했습니다. <1>13:30 -●쌀 5000을 포상으로 받았습니다. -●2월:평민킬러에게 금 6000을 수여했습니다. <1>14:30 -●2월:수비 강화를 실패하여 24 상승했습니다. <1>14:30 -●금 4000을 포상으로 받았습니다. -●3월:SARS에게 금 3000을 수여했습니다. <1>15:30 -●3월:수비 강화를 하여 88 상승했습니다. <1>15:30 -●4월:박일아에게 금 5000을 수여했습니다. <1>16:30 -●4월:수비 강화를 실패하여 20 상승했습니다. <1>16:30 -●5월:대악마에게 금 5000을 수여했습니다. <1>17:30 -●5월:수비 강화를 하여 81 상승했습니다. <1>17:30 -●6월:하루카에게 금 2000을 수여했습니다. <1>18:30 -●6월:훈련치가 30 상승했습니다. <1>18:30 -●이번 수입은 쌀 60136입니다. -●봉급으로 쌀 600을 받았습니다. -화이트캣의 부대원들은 주시(으)로 집합되었습니다. -●7월:안돼요안돼요(을)를 귀양(으)로 발령했습니다. <1>19:30 -●7월:사기치가 30 상승했습니다. <1>19:30 -통솔이 1 올랐습니다! -●8월:내나에게 쌀 3000을 수여했습니다. <1>20:30 -●8월:수비 강화를 실패하여 21 상승했습니다. <1>20:30 -●9월:일본어번역기(을)를 주시(으)로 발령했습니다. <1>21:30 -●9월:건업의 소문만 들을 수 있었습니다. <1>21:30 -【건업】주민:638600, 민심:89, 장수:3, 병력:12958 -●10월:운남(으)로 진격합니다. <1>22:30 -●호표기병(으)로 비월의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 5730 (-2624) VS 2082 (-5718) 【비월】<1>등갑 -●쌀 4000을 포상으로 받았습니다. -●11월:운남(으)로 진격합니다. <1>23:30 -●호표기병(으)로 비월의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 5561 (-169) VS 0 (-896) 【비월】<1>등갑 -비월의 등갑병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 3518 (-2043) VS 35610 (-6710) 【운남】<1>성벽 -●12월:안돼요안돼요(을)를 (으)로 발령했습니다. <1>00:30 -●12월:운남(으)로 진격합니다. <1>00:30 -●호표기병(으)로 야근탈출의 맹수병(을)를 공격합니다. -공 <1>호표【카토】 0 (-3518) VS 3786 (-3514) 【야근탈출】<1>맹수 -●퇴각했습니다. -●이번 수입은 금 53803입니다. -●봉급으로 금 600을 받았습니다. -●1월:박일아에게 쌀 4000을 수여했습니다. <1>01:30 -●1월:호표기병을(를) 8500명 모병했습니다. <1>01:30 -●2월:박일아(을)를 (으)로 발령했습니다. <1>02:30 -●2월:훈련치가 30 상승했습니다. <1>02:30 -Lv 43로 레벨업! -●3월:평민킬러에게 쌀 5000을 수여했습니다. <1>03:30 -●3월:사기치가 30 상승했습니다. <1>03:30 -●4월:대악마에게 쌀 5000을 수여했습니다. <1>04:30 -●4월:귀양(으)로 진격합니다. <1>04:30 -●호표기병(으)로 카가미네렌의 석궁병(을)를 공격합니다. -공 <1>호표【카토】 5249 (-3251) VS 1802 (-6061) 【카가미네렌】<1>석궁 -화이트캣의 부대원들은 강주(으)로 집합되었습니다. -●5월:하루카에게 쌀 3000을 수여했습니다. <1>05:30 -●5월:귀양(으)로 진격합니다. <1>05:30 -●호표기병(으)로 카가미네렌의 석궁병(을)를 공격합니다. -공 <1>호표【카토】 3537 (-1712) VS 0 (-1802) 【카가미네렌】<1>석궁 -카가미네렌의 석궁병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 2442 (-1095) VS 6414 (-3586) 【귀양】<1>성벽 -●금 5000을 포상으로 받았습니다. -16품관(으)로 승급하여 봉록이 3200(으)로 상승했습니다! -전력전 대회의 준우승으로 672의 상금, 약간의 명성 획득! -●6월:임사영에게 쌀 3000을 수여했습니다. <1>06:30 -●6월:호표기병을(를) 6100명 추가모병했습니다. <1>06:30 -●봉급으로 쌀 640을 받았습니다. -●7월:강서유서에게 쌀 3000을 수여했습니다. <1>07:30 -●7월:훈련치가 30 상승했습니다. <1>07:30 -●쌀 4000을 포상으로 받았습니다. -●8월:사기치가 30 상승했습니다. <1>08:30 -Lv 44로 레벨업! -하루카(이)가 국기를 변경합니다. -●9월:박일아(을)를 허창(으)로 발령했습니다. <1>09:30 -●9월:주시(으)로 진격합니다. <1>09:30 -●호표기병(으)로 야근탈출의 맹수병(을)를 공격합니다. -공 <1>호표【카토】 4530 (-4012) VS 3017 (-5035) 【야근탈출】<1>맹수 -●10월:6974(을)를 하내(으)로 발령했습니다. <1>10:30 -●10월:주시(으)로 진격합니다. <1>10:30 -●호표기병(으)로 KAITO의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 919 (-3611) VS 292 (-5306) 【KAITO】<1>등갑 -●11월:내나에게 금 3000을 수여했습니다. <1>11:30 -●11월:호표기병을(를) 7600명 추가모병했습니다. <1>11:30 -●12월:잠둥이션에게 금 2000을 수여했습니다. <1>12:30 -●12월:훈련치가 30 상승했습니다. <1>12:30 -●이번 수입은 금 54430입니다. -●봉급으로 금 640을 받았습니다. -●특기 【필살】(을)를 익혔습니다! -화이트캣의 부대원들은 주시(으)로 집합되었습니다. -●1월:6974(을)를 덕양(으)로 발령했습니다. <1>13:30 -●1월:사기치가 30 상승했습니다. <1>13:30 -●금 5000을 포상으로 받았습니다. -●2월:대악마에게 쌀 5000을 수여했습니다. <1>14:30 -●2월:운남(으)로 진격합니다. <1>14:30 -●호표기병(으)로 엄백호의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 7753 (-766) VS 0 (-2006) 【엄백호】<1>등갑 -엄백호의 등갑병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 5924 (-1829) VS 21605 (-6545) 【운남】<1>성벽 -●아국에 피장파장이 발동되었습니다. -●3월:운남(으)로 진격합니다. <1>15:30 -●호표기병(으)로 야근탈출의 맹수병(을)를 공격합니다. -공 <1>호표【카토】 2062 (-3862) VS 0 (-4100) 【야근탈출】<1>맹수 -●전투중 부상당했다! -야근탈출의 맹수병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 1295 (-767) VS 12094 (-1906) 【운남】<1>성벽 -●쌀 5000을 포상으로 받았습니다. -환약을 사용하여 치료합니다! -●4월:호표기병을(를) 7200명 추가모병했습니다. <1>16:30 -●5월:훈련치가 30 상승했습니다. <1>17:30 -6974에 의해 허창(으)로 발령됐습니다. <1>18:15 -●호표기병(으)로 정휘인의 마귀병(을)를 수비합니다. -수 <1>호표【카토】 3905 (-4590) VS 0 (-5087) 【정휘인】<1>마귀 -정휘인의 마귀병(이)가 퇴각했습니다. -●6월:사기치가 65 상승했습니다. <1>18:30 -●호표기병(으)로 제갈여포의 석궁병(을)를 수비합니다. -수 <1>호표【카토】 0 (-3905) VS 288 (-3223) 【제갈여포】<1>석궁 -●전멸했습니다. -Lv 45로 레벨업! -●이번 수입은 쌀 49178입니다. -●봉급으로 쌀 640을 받았습니다. -●7월:수비 강화를 성공하여 209 상승했습니다. <1>19:30 -대천사하루카의 부대원들은 하내(으)로 집합되었습니다. -통솔전 대회의 우승으로 1160의 상금, 약간의 명성 획득! -●8월:평민킬러에게 쌀 5000을 수여했습니다. <1>20:30 -●8월:돌격기병을(를) 8500명 모병했습니다. <1>20:30 -Lv 46로 레벨업! -●9월:물파스(을)를 하내(으)로 발령했습니다. <1>21:30 -●9월:훈련치가 30 상승했습니다. <1>21:30 -●10월:강서유서에게 금 5000을 수여했습니다. <1>22:30 -●10월:사기치가 30 상승했습니다. <1>22:30 -●돌격기병(으)로 돌아온꼰대의 수렵기병(을)를 수비합니다. -수 <1>돌격【카토】 4841 (-3659) VS 200 (-7600) 【돌아온꼰대】<1>수렵 -●11월:진양(으)로 진격합니다. <1>23:30 -●돌격기병(으)로 Air의 맹수병(을)를 공격합니다. -공 <1>돌격【카토】 422 (-4419) VS 0 (-7056) 【Air】<1>맹수 -Air의 맹수병(이)가 전멸했습니다. -●금 3000을 포상으로 받았습니다. -●돌격기병(으)로 ⓜ능환의 귀병(을)를 수비합니다. -수 <1>돌격【카토】 0 (-422) VS 2376 (-1678) 【ⓜ능환】<1>귀병 -●전멸했습니다. -화이트캣의 부대원들은 주시(으)로 집합되었습니다. -●12월:잠둥이션에게 금 5000을 수여했습니다. <1>00:30 -●12월:돌격기병을(를) 8500명 모병했습니다. <1>00:30 -●봉급으로 금 640을 받았습니다. -화이트캣의 부대원들은 강주(으)로 집합되었습니다. -●1월:강서유서에게 금 4000을 수여했습니다. <1>01:30 -●1월:훈련치가 30 상승했습니다. <1>01:30 -대천사하루카의 부대원들은 하내(으)로 집합되었습니다. -●2월:대악마(을)를 강주(으)로 발령했습니다. <1>02:30 -●2월:사기치가 30 상승했습니다. <1>02:30 -●돌격기병(으)로 박희수의 등갑병(을)를 수비합니다. -수 <1>돌격【카토】 6690 (-1810) VS 0 (-4133) 【박희수】<1>등갑 -박희수의 등갑병(이)가 퇴각했습니다. -●돌격기병(으)로 くま의 마귀병(을)를 수비합니다. -수 <1>돌격【카토】 5278 (-1412) VS 0 (-1387) 【くま】<1>마귀 -くま의 마귀병(이)가 퇴각했습니다. -●돌격기병(으)로 낭군의 마귀병(을)를 수비합니다. -수 <1>돌격【카토】 2629 (-2649) VS 0 (-2660) 【낭군】<1>마귀 -낭군의 마귀병(이)가 퇴각했습니다. -●돌격기병(으)로 정휘인의 마귀병(을)를 수비합니다. -수 <1>돌격【카토】 1365 (-1264) VS 0 (-3523) 【정휘인】<1>마귀 -정휘인의 마귀병(이)가 퇴각했습니다. -●3월:강서유서(을)를 강주(으)로 발령했습니다. <1>03:30 -●3월:인접도시가 아닙니다. 귀양(으)로 출병 실패. <1>03:30 -●돌격기병(으)로 KAITO의 등갑병(을)를 수비합니다. -수 <1>돌격【카토】 0 (-1365) VS 4775 (-3525) 【KAITO】<1>등갑 -●전투중 부상당했다! -●전멸했습니다. -●4월:아국이 아닙니다. 포상 실패. <1>04:30 -●4월:인접도시가 아닙니다. 귀양(으)로 출병 실패. <1>04:30 -●5월:아국이 아닙니다. 포상 실패. <1>05:30 -●5월:아국이 아닙니다. 모병 실패. <1>05:30 -●금 4000을 포상으로 받았습니다. -●6월:아국이 아닙니다. 포상 실패. <1>06:30 -●6월:아국이 아닙니다. 훈련 실패. <1>06:30 -대천사하루카의 부대원들은 한중(으)로 집합되었습니다. -●봉급으로 쌀 640을 받았습니다. -●7월:병사가 없습니다. 사기진작 실패. <1>07:30 -●쌀 6000을 포상으로 받았습니다. -●8월:인접도시가 아닙니다. 귀양(으)로 출병 실패. <1>08:30 -화이트캣의 부대원들은 강주(으)로 집합되었습니다. -●9월:페르시아(을)를 자동(으)로 발령했습니다. <1>09:30 -●9월:중장기병을(를) 8500명 모병했습니다. <1>09:30 -Lv 47로 레벨업! -화이트캣의 부대원들은 자동(으)로 집합되었습니다. -●10월:평민킬러에게 금 5000을 수여했습니다. <1>10:30 -●10월:훈련치가 30 상승했습니다. <1>10:30 -●11월:평민킬러에게 쌀 5000을 수여했습니다. <1>11:30 -●11월:사기치가 30 상승했습니다. <1>11:30 -●중장기병(으)로 카이사르의 강궁병(을)를 수비합니다. -수 <1>중장【카토】 4804 (-3696) VS 0 (-2135) 【카이사르】<1>강궁 -카이사르의 강궁병(이)가 퇴각했습니다. -무력이 1 올랐습니다! -●12월:덕양(으)로 진격합니다. <1>12:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 2323 (-2481) VS 0 (-10000) 【덕양】<1>성벽 -덕양 공략에 성공했습니다. -●봉급으로 금 640을 받았습니다. -●금 5000을 포상으로 받았습니다. -화이트캣의 부대원들은 자동(으)로 집합되었습니다. -●1월:대악마에게 쌀 5000을 수여했습니다. <1>13:30 -●1월:양평(으)로 진격합니다. <1>13:30 -●중장기병(으)로 성벽을 공격합니다. -◆성 <1>중장【카토】 0 (-2323) VS 42507 (-5983) 【양평】<1>성벽 -●퇴각했습니다. -15품관(으)로 승급하여 봉록이 3400(으)로 상승했습니다! -●2월:박일아(을)를 하변(으)로 발령했습니다. <1>14:30 -●2월:중장기병을(를) 8500명 모병했습니다. <1>14:30 -●3월:임사영에게 쌀 3000을 수여했습니다. <1>15:30 -●3월:훈련치가 30 상승했습니다. <1>15:30 -●4월:잠둥이션에게 쌀 3000을 수여했습니다. <1>16:30 -●4월:사기치가 30 상승했습니다. <1>16:30 -●중장기병(으)로 읭읭의 중장기병(을)를 수비합니다. -수 <1>중장【카토】 5315 (-3185) VS 627 (-6473) 【읭읭】<1>중장 -●중장기병(으)로 북두칠성의 등갑병(을)를 수비합니다. -수 <1>중장【카토】 1910 (-3405) VS 1841 (-4141) 【북두칠성】<1>등갑 -●중장기병(으)로 카이사르의 강궁병(을)를 수비합니다. -수 <1>중장【카토】 0 (-1910) VS 4572 (-1218) 【카이사르】<1>강궁 -●전멸했습니다. -●5월:기병을(를) 8500명 모병했습니다. <1>17:30 -Lv 48로 레벨업! -화이트캣의 부대원들은 성도(으)로 집합되었습니다. -●6월:훈련치가 30 상승했습니다. <1>18:30 -●봉급으로 쌀 680을 받았습니다. -●7월:푸린푸린♥(을)를 성도(으)로 발령했습니다. <1>19:30 -●7월:사기치가 30 상승했습니다. <1>19:30 -●기병(으)로 장임의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 4326 (-4174) VS 25 (-5476) 【장임】<1>등갑 -●기병(으)로 전인호의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 3714 (-612) VS 1295 (-882) 【전인호】<1>악귀 -●전투중 부상당했다! -●금 5000을 포상으로 받았습니다. -●8월:물파스(을)를 성도(으)로 발령했습니다. <1>20:30 -●8월:강주(으)로 진격합니다. <1>20:30 -●기병(으)로 카가미네렌의 석궁병(을)를 공격합니다. -공 <1>기병【카토】 0 (-3714) VS 6786 (-2503) 【카가미네렌】<1>석궁 -●퇴각했습니다. -●9월:건강 회복을 위해 요양합니다. <1>21:30 -●10월:기병을(를) 8500명 모병했습니다. <1>22:30 -●11월:훈련치가 30 상승했습니다. <1>23:30 -통솔이 1 올랐습니다! -●12월:사기치가 30 상승했습니다. <1>00:30 -●봉급으로 금 680을 받았습니다. -●기병(으)로 니쉬의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 5051 (-3449) VS 0 (-2125) 【니쉬】<1>악귀 -니쉬의 악귀병(이)가 퇴각했습니다. -●기병(으)로 정휘인의 마귀병(을)를 수비합니다. -수 <1>기병【카토】 626 (-4425) VS 0 (-4156) 【정휘인】<1>마귀 -정휘인의 마귀병(이)가 퇴각했습니다. -●1월:강주(으)로 진격합니다. <1>01:30 -●기병(으)로 랜임1분장의 맹수병(을)를 공격합니다. -공 <1>기병【카토】 0 (-626) VS 6604 (-676) 【랜임1분장】<1>맹수 -●전투중 부상당했다! -●퇴각했습니다. -●2월:기병을(를) 8600명 모병했습니다. <1>02:30 -●쌀 4000을 포상으로 받았습니다. -●3월:훈련치가 30 상승했습니다. <1>03:30 -●금 5000을 포상으로 받았습니다. -Lv 49로 레벨업! -●4월:사기치가 30 상승했습니다. <1>04:30 -●기병(으)로 아소의 중장기병(을)를 수비합니다. -수 <1>기병【카토】 7416 (-1184) VS 0 (-1986) 【아소】<1>중장 -●전투중 부상당했다! -아소의 중장기병(이)가 퇴각했습니다. -●기병(으)로 국민기업의 호표기병(을)를 수비합니다. -수 <1>기병【카토】 7410 (-6) VS 0 (-21) 【국민기업】<1>호표 -국민기업의 호표기병(이)가 퇴각했습니다. -●기병(으)로 무광의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 5966 (-1444) VS 0 (-2894) 【무광】<1>악귀 -무광의 악귀병(이)가 퇴각했습니다. -●기병(으)로 정휘인의 마귀병(을)를 수비합니다. -수 <1>기병【카토】 161 (-5805) VS 0 (-7400) 【정휘인】<1>마귀 -정휘인의 마귀병(이)가 퇴각했습니다. -●5월:현재 전쟁 금지입니다. 강주(으)로 출병 실패. <1>05:30 -통솔전 대회의 4강 진출로 384의 상금, 약간의 명성 획득! -●기병(으)로 엄백호의 자객병(을)를 수비합니다. -수 <1>기병【카토】 0 (-161) VS 2900 (-346) 【엄백호】<1>자객 -●전멸했습니다. -●6월:기병을(를) 8600명 모병했습니다. <1>06:30 -●봉급으로 쌀 123을 받았습니다. -●7월:훈련치가 30 상승했습니다. <1>07:30 -●8월:사기치가 30 상승했습니다. <1>08:30 -●기병(으)로 장임의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 5523 (-3077) VS 0 (-4963) 【장임】<1>등갑 -장임의 등갑병(이)가 퇴각했습니다. -●기병(으)로 무광의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 2008 (-3515) VS 0 (-4600) 【무광】<1>악귀 -무광의 악귀병(이)가 퇴각했습니다. -●9월:기병을(를) 6600명 추가모병했습니다. <1>09:30 -●10월:훈련치가 30 상승했습니다. <1>10:30 -Lv 50로 레벨업! -●11월:사기치가 30 상승했습니다. <1>11:30 -●기병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 4630 (-3978) VS 418 (-6782) 【魯堂首】<1>등갑 -●기병(으)로 이쓰미의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 1452 (-3178) VS 1283 (-3101) 【이쓰미】<1>악귀 -●12월:하루카에게 금 3000을 수여했습니다. <1>12:30 -●12월:기병을(를) 7100명 추가모병했습니다. <1>12:30 -●금 3000을 포상으로 받았습니다. -●봉급으로 금 680을 받았습니다. -●1월:하루카에게서 금 4000을 몰수했습니다. <1>13:30 -●1월:훈련치가 30 상승했습니다. <1>13:30 -일기토 대회의 8강 진출로 198의 상금, 약간의 명성 획득! -●2월:사기치가 30 상승했습니다. <1>14:30 -●기병(으)로 KAITO의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 4311 (-4241) VS 2055 (-6585) 【KAITO】<1>등갑 -●기병(으)로 다이스의 석궁병(을)를 수비합니다. -수 <1>기병【카토】 0 (-4311) VS 209 (-3912) 【다이스】<1>석궁 -●전멸했습니다. -●3월:기병을(를) 8600명 모병했습니다. <1>15:30 -◆77번 거래 성사로 금 780(을)를 지불, 쌀 780(을)를 구입! -●4월:일본어번역기에게서 쌀 1467을 몰수했습니다. <1>16:30 -●4월:훈련치가 30 상승했습니다. <1>16:30 -●5월:일본어번역기에게서 금 1483을 몰수했습니다. <1>17:30 -●5월:사기치가 30 상승했습니다. <1>17:30 -●기병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 5537 (-3063) VS 0 (-5306) 【魯堂首】<1>등갑 -魯堂首의 등갑병(이)가 퇴각했습니다. -Lv 51로 레벨업! -●기병(으)로 장임의 등갑병(을)를 수비합니다. -수 <1>기병【카토】 1287 (-4250) VS 2973 (-5827) 【장임】<1>등갑 -●기병(으)로 HideD의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 0 (-1287) VS 121 (-865) 【HideD】<1>악귀 -●전멸했습니다. -●6월:발암맨에게서 금 800을 몰수했습니다. <1>18:30 -●6월:군량 3000을 사서 자금 2909을 썼습니다. <1>18:30 -●금 3000을 포상으로 받았습니다. -●봉급으로 쌀 42을 받았습니다. -종횡무진(이)가 멸망했습니다. -●도주하며 금1496 쌀1533을 분실했습니다. -●7월:보컬로이드에 임관했습니다. <1>19:30 -19품관(으)로 강등되어 봉록이 2600(으)로 하락했습니다! -Lv 48로 레벨다운! -●8월:주민이 820명 증가했습니다. <1>20:30 -●9월:주민이 840명 증가했습니다. <1>21:30 -●10월:장려를 실패하여 주민이 190명 증가했습니다. <1>22:30 -●11월:장려를 실패하여 주민이 370명 증가했습니다. <1>23:30 -일기토 대회의 8강 진출로 198의 상금, 약간의 명성 획득! -●12월:장려를 성공하여 주민이 2160명 증가했습니다. <1>00:30 -●봉급으로 금 520을 받았습니다. -●1월:장려를 실패하여 주민이 340명 증가했습니다. <1>01:30 -Lv 49로 레벨업! -●2월:주민이 710명 증가했습니다. <1>02:30 -●3월:주민이 740명 증가했습니다. <1>03:30 -전력전 대회의 16강 진출로 68의 상금, 약간의 명성 획득! -●4월:장려를 실패하여 주민이 180명 증가했습니다. <1>04:30 -●5월:장려를 실패하여 주민이 300명 증가했습니다. <1>05:30 -●쌀 3000을 포상으로 받았습니다. -●6월:장려를 성공하여 주민이 2090명 증가했습니다. <1>06:30 -●봉급으로 쌀 520을 받았습니다. -●7월:주민이 840명 증가했습니다. <1>07:30 -●8월:장려를 성공하여 주민이 2510명 증가했습니다. <1>08:30 -●9월:주민이 1020명 증가했습니다. <1>09:30 -통솔이 1 올랐습니다! -●10월:장려를 성공하여 주민이 2090명 증가했습니다. <1>10:30 -●11월:장려를 실패하여 주민이 330명 증가했습니다. <1>11:30 -●12월:수비 강화를 성공하여 233 상승했습니다. <1>12:30 -18품관(으)로 승급하여 봉록이 2800(으)로 상승했습니다! -●봉급으로 금 1680을 받았습니다. -바닥을탁치고에 의해 남만(으)로 발령됐습니다. <1>13:18 -●1월:수비 강화를 하여 66 상승했습니다. <1>13:30 -●2월:수비 강화를 실패하여 13 상승했습니다. <1>14:30 -●3월:수비 강화를 실패하여 23 상승했습니다. <1>15:30 -●4월:수비 강화를 성공하여 198 상승했습니다. <1>16:30 -Lv 50로 레벨업! -●5월:수비 강화를 성공하여 186 상승했습니다. <1>17:30 -●6월:수비 강화를 하여 70 상승했습니다. <1>18:30 -●봉급으로 쌀 1960을 받았습니다. -●7월:수비 강화를 실패하여 19 상승했습니다. <1>19:30 -●8월:수비 강화를 성공하여 160 상승했습니다. <1>20:30 -●9월:수비 강화를 하여 75 상승했습니다. <1>21:30 -●금 5000을 포상으로 받았습니다. -●10월:수비 강화를 하여 66 상승했습니다. <1>22:30 -●11월:수비 강화를 실패하여 28 상승했습니다. <1>23:30 -●12월:수비 강화를 성공하여 261 상승했습니다. <1>00:30 -●봉급으로 금 1960을 받았습니다. -●1월:수비 강화를 실패하여 19 상승했습니다. <1>01:30 -●2월:수비 강화를 하여 87 상승했습니다. <1>02:30 -●3월:수비 강화를 하여 86 상승했습니다. <1>03:30 -무력이 1 올랐습니다! -●4월:수비 강화를 실패하여 24 상승했습니다. <1>04:30 -●5월:수비 강화를 하여 73 상승했습니다. <1>05:30 -●6월:수비 강화를 성공하여 185 상승했습니다. <1>06:30 -●봉급으로 쌀 1960을 받았습니다. -●7월:수비 강화를 성공하여 176 상승했습니다. <1>07:30 -くま에 의해 여남(으)로 발령됐습니다. <1>07:42 -Lv 51로 레벨업! -●8월:수비 강화를 하여 70 상승했습니다. <1>08:30 -●9월:수비 강화를 하여 70 상승했습니다. <1>09:30 -●10월:수비 강화를 하여 96 상승했습니다. <1>10:30 -●11월:수비 강화를 실패하여 32 상승했습니다. <1>11:30 -●12월:수비 강화를 하여 67 상승했습니다. <1>12:30 -●봉급으로 금 2800을 받았습니다. -●1월:수비 강화를 하여 86 상승했습니다. <1>13:30 -●2월:수비 강화를 하여 92 상승했습니다. <1>14:30 -●3월:수비 강화를 실패하여 31 상승했습니다. <1>15:30 -17품관(으)로 승급하여 봉록이 3000(으)로 상승했습니다! -●4월:수비 강화를 하여 72 상승했습니다. <1>16:30 -●5월:수비 강화를 하여 79 상승했습니다. <1>17:30 -●6월:수비 강화를 하여 97 상승했습니다. <1>18:30 -●봉급으로 쌀 3600을 받았습니다. -●7월:수비 강화를 하여 71 상승했습니다. <1>19:30 -●8월:수비 강화를 성공하여 191 상승했습니다. <1>20:30 -●9월:수비 강화를 하여 79 상승했습니다. <1>21:30 -●10월:수비 강화를 성공하여 241 상승했습니다. <1>22:30 -●11월:수비 강화를 하여 77 상승했습니다. <1>23:30 -●12월:수비 강화를 실패하여 30 상승했습니다. <1>00:30 -●봉급으로 금 3600을 받았습니다. -●1월:수비 강화를 하여 87 상승했습니다. <1>01:30 -●2월:수비 강화를 하여 69 상승했습니다. <1>02:30 -Lv 52로 레벨업! -●3월:수비 강화를 실패하여 36 상승했습니다. <1>03:30 -●4월:수비 강화를 하여 66 상승했습니다. <1>04:30 -●5월:수비 강화를 하여 70 상승했습니다. <1>05:30 -●6월:수비 강화를 하여 67 상승했습니다. <1>06:30 -●봉급으로 쌀 3600을 받았습니다. -일기토 대회의 16강 진출로 76의 상금, 약간의 명성 획득! -●7월:수비 강화를 하여 64 상승했습니다. <1>07:30 -●8월:수비 강화를 하여 72 상승했습니다. <1>08:30 -●9월:수비 강화를 하여 82 상승했습니다. <1>09:30 -무력이 1 올랐습니다! -●10월:민심이 10 상승했습니다. <1>10:30 -●11월:선정을 실패하여 민심이 2 상승했습니다. <1>11:30 -전력전 대회의 16강 진출로 76의 상금, 약간의 명성 획득! -●12월:수비 강화를 실패하여 16 상승했습니다. <1>12:30 -●봉급으로 금 3600을 받았습니다. -●1월:수비 강화를 하여 73 상승했습니다. <1>13:30 -●2월:수비 강화를 하여 73 상승했습니다. <1>14:30 -●3월:수비 강화를 하여 81 상승했습니다. <1>15:30 -일기토 대회의 4강 진출로 468의 상금, 약간의 명성 획득! -●4월:수비 강화를 하여 81 상승했습니다. <1>16:30 -●5월:수비 강화를 하여 90 상승했습니다. <1>17:30 -●6월:수비 강화를 하여 95 상승했습니다. <1>18:30 -●봉급으로 쌀 3600을 받았습니다. -●7월:수비 강화를 성공하여 234 상승했습니다. <1>19:30 -●8월:수비 강화를 하여 79 상승했습니다. <1>20:30 -Lv 53로 레벨업! -●9월:수비 강화를 하여 76 상승했습니다. <1>21:30 -●10월:수비 강화를 하여 99 상승했습니다. <1>22:30 -●11월:수비 강화를 하여 76 상승했습니다. <1>23:30 -16품관(으)로 승급하여 봉록이 3200(으)로 상승했습니다! -●12월:수비 강화를 성공하여 223 상승했습니다. <1>00:30 -●봉급으로 금 1280을 받았습니다. -●1월:수비 강화를 성공하여 215 상승했습니다. <1>01:30 -●2월:수비 강화를 하여 98 상승했습니다. <1>02:30 -●3월:수비 강화를 하여 83 상승했습니다. <1>03:30 -●4월:수비 강화를 성공하여 210 상승했습니다. <1>04:30 -●5월:수비 강화를 실패하여 15 상승했습니다. <1>05:30 -●6월:수비 강화를 실패하여 19 상승했습니다. <1>06:30 -●봉급으로 쌀 1280을 받았습니다. -●7월:수비 강화를 하여 83 상승했습니다. <1>07:30 -●8월:수비 강화를 하여 82 상승했습니다. <1>08:30 -●9월:수비 강화를 실패하여 29 상승했습니다. <1>09:30 -●10월:수비 강화를 하여 69 상승했습니다. <1>10:30 -●11월:수비 강화를 실패하여 34 상승했습니다. <1>11:30 -●금 10000을 포상으로 받았습니다. -카가미네렌에 의해 위례(으)로 발령됐습니다. <1>12:22 -●12월:수비 강화를 성공하여 214 상승했습니다. <1>12:30 -●봉급으로 금 1280을 받았습니다. -●금 10000을 포상으로 받았습니다. -●1월:흑색마(+6)(을)를 구입했습니다. <1>13:30 -Lv 54로 레벨업! -●금 10000을 포상으로 받았습니다. -●2월:수비 강화를 성공하여 183 상승했습니다. <1>14:30 -●3월:수비 강화를 하여 90 상승했습니다. <1>15:30 -●4월:수비 강화를 하여 67 상승했습니다. <1>16:30 -●5월:환약(치료)(을)를 구입했습니다. <1>17:30 -●6월:수비 강화를 실패하여 14 상승했습니다. <1>18:30 -●봉급으로 쌀 1280을 받았습니다. -●7월:수비 강화를 하여 89 상승했습니다. <1>19:30 -무력이 1 올랐습니다! -●8월:수비 강화를 하여 82 상승했습니다. <1>20:30 -KAITO(이)가 의병모집(을)를 발동하였습니다. -전력전 대회의 16강 진출로 82의 상금, 약간의 명성 획득! -●9월:맹수병을(를) 8600명 징병했습니다. <1>21:30 -●10월:수비 강화를 하여 85 상승했습니다. <1>22:30 -●11월:ⓖ의병장48에게 쌀 10000을 수여했습니다. <1>23:30 -●11월:훈련치가 32 상승했습니다. <1>23:30 -●12월:ⓖ의병장48에게 금 10000을 수여했습니다. <1>00:30 -●12월:훈련치가 32 상승했습니다. <1>00:30 -●이번 수입은 금 108922입니다. -●봉급으로 금 1280을 받았습니다. -●1월:사기치가 32 상승했습니다. <1>01:30 -바닥을탁치고에 의해 허창(으)로 발령됐습니다. <1>02:18 -●2월:바닥을탁치고(을)를 고창(으)로 발령했습니다. <1>02:30 -●2월:사기치가 32 상승했습니다. <1>02:30 -●쌀 10000을 포상으로 받았습니다. -카가미네렌에 의해 허창(으)로 발령됐습니다. <1>03:22 -●3월:낭군에게 금 10000을 수여했습니다. <1>03:30 -●3월:이미 사기는 하늘을 찌를듯 합니다. <1>03:30 -●4월:(으)로 진격합니다. <1>04:30 -●맹수병(으)로 비밀의 악귀병(을)를 공격합니다. -공 <1>맹수【카토】 4460 (-4140) VS 1595 (-6105) 【비밀】<1>악귀 -●5월:(으)로 진격합니다. <1>05:30 -●맹수병(으)로 무광의 악귀병(을)를 공격합니다. -공 <1>맹수【카토】 3910 (-550) VS 0 (-958) 【무광】<1>악귀 -무광의 악귀병(이)가 전멸했습니다. -●맹수병(으)로 성벽을 공격합니다. -◆성 <1>맹수【카토】 1957 (-1953) VS 92438 (-5172) 【완】<1>성벽 -●6월:맹수병을(를) 7300명 추가모병했습니다. <1>06:30 -Lv 55로 레벨업! -●이번 수입은 쌀 144988입니다. -●봉급으로 쌀 1280을 받았습니다. -●7월:훈련치가 30 상승했습니다. <1>07:30 -●8월:사기치가 30 상승했습니다. <1>08:30 -●9월:니콜(을)를 진류(으)로 발령했습니다. <1>09:30 -●9월:(으)로 진격합니다. <1>09:30 -●맹수병(으)로 전인호의 악귀병(을)를 공격합니다. -공 <1>맹수【카토】 6090 (-3167) VS 2424 (-6176) 【전인호】<1>악귀 -노답겜;;의 부대원들은 남만(으)로 집합되었습니다. -●맹수병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>맹수【카토】 4817 (-1273) VS 0 (-2378) 【魯堂首】<1>등갑 -魯堂首의 등갑병(이)가 퇴각했습니다. -15품관(으)로 승급하여 봉록이 3400(으)로 상승했습니다! -●10월:橙(을)를 강주(으)로 발령했습니다. <1>10:30 -●10월:남영(으)로 진격합니다. <1>10:30 -●맹수병(으)로 읭읭의 중장기병(을)를 공격합니다. -공 <1>맹수【카토】 2475 (-2342) VS 0 (-4681) 【읭읭】<1>중장 -읭읭의 중장기병(이)가 전멸했습니다. -●맹수병(으)로 성벽을 공격합니다. -◆성 <1>맹수【카토】 2060 (-415) VS 45414 (-1286) 【남영】<1>성벽 -●11월:남영(으)로 진격합니다. <1>11:30 -●맹수병(으)로 선비의 악귀병(을)를 공격합니다. -공 <1>맹수【카토】 0 (-2060) VS 1958 (-5542) 【선비】<1>악귀 -●퇴각했습니다. -통솔전 대회의 준우승으로 1008의 상금, 약간의 명성 획득! -카가미네렌에 의해 남해(으)로 발령됐습니다. <1>12:22 -●12월:맹수병을(를) 8600명 모병했습니다. <1>12:30 -●봉급으로 금 1360을 받았습니다. -●1월:훈련치가 30 상승했습니다. <1>13:30 -●2월:사기치가 30 상승했습니다. <1>14:30 -Lv 56로 레벨업! -●맹수병(으)로 강서유서의 강궁병(을)를 수비합니다. -수 <1>맹수【카토】 3041 (-5559) VS 4602 (-4062) 【강서유서】<1>강궁 -●3월:상동(으)로 진격합니다. <1>15:30 -●맹수병(으)로 강서유서의 강궁병(을)를 공격합니다. -공 <1>맹수【카토】 2996 (-45) VS 0 (-49) 【강서유서】<1>강궁 -강서유서의 강궁병(이)가 전멸했습니다. -●맹수병(으)로 성벽을 공격합니다. -◆성 <1>맹수【카토】 2026 (-970) VS 0 (-3860) 【상동】<1>성벽 -상동 공략에 성공했습니다. -●맹수병(으)로 니쉬의 악귀병(을)를 수비합니다. -수 <1>맹수【카토】 0 (-2026) VS 6293 (-2281) 【니쉬】<1>악귀 -●전멸했습니다. -●4월:맹수병을(를) 8600명 모병했습니다. <1>16:30 -●5월:아국이 아닙니다. 훈련 실패. <1>17:30 -くま에 의해 탐라(으)로 발령됐습니다. <1>17:42 -부릉부릉의 부대원들은 허창(으)로 집합되었습니다. -니콜에 의해 탐라(으)로 발령됐습니다. <1>18:11 -●6월:훈련치가 30 상승했습니다. <1>18:30 -●봉급으로 쌀 1360을 받았습니다. -●7월:사기치가 30 상승했습니다. <1>19:30 -●맹수병(으)로 Anes의 중장기병(을)를 수비합니다. -수 <1>맹수【카토】 5196 (-3404) VS 3546 (-5817) 【Anes】<1>중장 -●맹수병(으)로 진리의 중장기병(을)를 수비합니다. -수 <1>맹수【카토】 2174 (-3022) VS 1436 (-7264) 【진리】<1>중장 -●맹수병(으)로 무광의 악귀병(을)를 수비합니다. -수 <1>맹수【카토】 0 (-2174) VS 4199 (-1938) 【무광】<1>악귀 -●전멸했습니다. -●8월:병사가 없습니다. (으)로 출병 실패. <1>20:30 -부릉부릉의 부대원들은 허창(으)로 집합되었습니다. -●금 10000을 포상으로 받았습니다. -일기토 대회의 16강 진출로 86의 상금, 약간의 명성 획득! -●9월:최태원(을)를 계림(으)로 발령했습니다. <1>21:30 -●9월:호표기병을(를) 9300명 모병했습니다. <1>21:30 -●10월:바닥을탁치고에게 금 10000을 수여했습니다. <1>22:30 -●10월:훈련치가 30 상승했습니다. <1>22:30 -●11월:Navy마초(을)를 건업(으)로 발령했습니다. <1>23:30 -●11월:사기치가 30 상승했습니다. <1>23:30 -●호표기병(으)로 HideD의 악귀병(을)를 수비합니다. -수 <1>호표【카토】 3540 (-5760) VS 1558 (-6342) 【HideD】<1>악귀 -●12월:정력왕에게 금 7000을 수여했습니다. <1>00:30 -●12월:(으)로 진격합니다. <1>00:30 -●호표기병(으)로 아르카나하트의 악귀병(을)를 공격합니다. -공 <1>호표【카토】 0 (-3540) VS 2099 (-4416) 【아르카나하트】<1>악귀 -●퇴각했습니다. -●쌀 8000을 포상으로 받았습니다. -Lv 57로 레벨업! -●이번 수입은 금 54611입니다. -●봉급으로 금 1360을 받았습니다. -●1월:KAITO(을)를 건업(으)로 발령했습니다. <1>01:30 -●1월:호표기병을(를) 9300명 모병했습니다. <1>01:30 -●2월:박희수에게 금 7000을 수여했습니다. <1>02:30 -●2월:훈련치가 30 상승했습니다. <1>02:30 -●3월:하연주에게 금 7000을 수여했습니다. <1>03:30 -●3월:사기치가 30 상승했습니다. <1>03:30 -●금 10000을 포상으로 받았습니다. -●호표기병(으)로 임사영의 악귀병(을)를 수비합니다. -수 <1>호표【카토】 3714 (-5586) VS 1481 (-6785) 【임사영】<1>악귀 -●4월:엄백호에게 금 7000을 수여했습니다. <1>04:30 -●4월:(으)로 진격합니다. <1>04:30 -●호표기병(으)로 HideD의 악귀병(을)를 공격합니다. -공 <1>호표【카토】 0 (-3714) VS 4439 (-3461) 【HideD】<1>악귀 -●퇴각했습니다. -●5월:병사가 없습니다. (으)로 출병 실패. <1>05:30 -●6월:호표기병을(를) 9300명 모병했습니다. <1>06:30 -●이번 수입은 쌀 69027입니다. -●봉급으로 쌀 1360을 받았습니다. -●7월:훈련치가 30 상승했습니다. <1>07:30 -●8월:ⓖ의병장48(을)를 (으)로 발령했습니다. <1>08:30 -●8월:사기치가 30 상승했습니다. <1>08:30 -부릉부릉의 부대원들은 진양(으)로 집합되었습니다. -●9월:Navy마초에게 금 10000을 수여했습니다. <1>09:30 -●9월:하내(으)로 진격합니다. <1>09:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 8044 (-1256) VS 0 (-6480) 【하내】<1>성벽 -하내 공략에 성공했습니다. -부릉부릉의 부대원들은 진양(으)로 집합되었습니다. -●10월:야근탈출에게 금 10000을 수여했습니다. <1>10:30 -●10월:호관(으)로 진격합니다. <1>10:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 5601 (-2443) VS 25677 (-8943) 【호관】<1>성벽 -사토미기사단의 부대원들은 탐라(으)로 집합되었습니다. -KAITO에 의해 관도(으)로 발령됐습니다. <1>11:15 -●11월:정력왕(을)를 (으)로 발령했습니다. <1>11:30 -●11월:(으)로 진격합니다. <1>11:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 4426 (-1175) VS 0 (-6560) 【업】<1>성벽 - 공략에 성공했습니다. -くま에 의해 합비(으)로 발령됐습니다. <1>11:42 -Lv 58로 레벨업! -●12월:고긔가먹고싶에게서 금 10000을 몰수했습니다. <1>12:30 -●12월:여강(으)로 진격합니다. <1>12:30 -●호표기병(으)로 쥬비아의 악귀병(을)를 공격합니다. -공 <1>호표【카토】 1338 (-3088) VS 0 (-6745) 【쥬비아】<1>악귀 -쥬비아의 악귀병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 1039 (-299) VS 0 (-1190) 【여강】<1>성벽 -여강 공략에 성공했습니다. -●이번 수입은 금 44094입니다. -●봉급으로 금 1360을 받았습니다. -●호표기병(으)로 카이사르의 석궁병(을)를 수비합니다. -수 <1>호표【카토】 0 (-1039) VS 7401 (-1206) 【카이사르】<1>석궁 -●전멸했습니다. -●1월:하기싫은데에게 금 10000을 수여했습니다. <1>13:30 -●1월:호표기병을(를) 9300명 모병했습니다. <1>13:30 -●쌀 10000을 포상으로 받았습니다. -●2월:의 소문만 들을 수 있었습니다. <1>14:30 -【완】주민:335955, 민심:65, 장수:9, 병력:41300 -사토미기사단의 부대원들은 탐라(으)로 집합되었습니다. -●금 10000을 포상으로 받았습니다. -●3월:최태원(을)를 이도(으)로 발령했습니다. <1>15:30 -●3월:훈련치가 30 상승했습니다. <1>15:30 -통솔이 1 올랐습니다! -●4월:건업의 어느정도 정보를 얻었습니다. <1>16:30 -【첩보】농업:5500, 상업:1167, 치안:2432, 수비:1000, 성벽:1000 -【건업】주민:640124, 민심:98, 장수:1, 병력:7100 -●5월:의 소문만 들을 수 있었습니다. <1>17:30 -【완】주민:310208, 민심:61, 장수:8, 병력:38145 -●6월:사기치가 28 상승했습니다. <1>18:30 -14품관(으)로 승급하여 봉록이 3600(으)로 상승했습니다! -●봉급으로 쌀 720을 받았습니다. -●7월:(으)로 진격합니다. <1>19:30 -●호표기병(으)로 북오더의 강궁병(을)를 공격합니다. -공 <1>호표【카토】 7898 (-1402) VS 0 (-1396) 【북오더】<1>강궁 -북오더의 강궁병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 6224 (-1674) VS 12988 (-8202) 【오】<1>성벽 -원생애껴요의 부대원들은 허창(으)로 집합되었습니다. -●호표기병(으)로 魯堂首의 등갑병(을)를 수비합니다. -수 <1>호표【카토】 2885 (-3339) VS 0 (-8000) 【魯堂首】<1>등갑 -魯堂首의 등갑병(이)가 퇴각했습니다. -엄백호에 의해 동황(으)로 발령됐습니다. <1>20:23 -●8월:하기싫은데(을)를 백랑(으)로 발령했습니다. <1>20:30 -●8월:북해(으)로 진격합니다. <1>20:30 -●호표기병(으)로 장임의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 13 (-2872) VS 0 (-5573) 【장임】<1>등갑 -장임의 등갑병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 0 (-13) VS 9947 (-53) 【북해】<1>성벽 -●퇴각했습니다. -근위대의 부대원들은 북평(으)로 집합되었습니다. -●9월:호표기병을(를) 9400명 모병했습니다. <1>21:30 -●금 10000을 포상으로 받았습니다. -●10월:청기사(을)를 위례(으)로 발령했습니다. <1>22:30 -●10월:훈련치가 30 상승했습니다. <1>22:30 -근위대의 부대원들은 위례(으)로 집합되었습니다. -●11월:하기싫은데(을)를 위례(으)로 발령했습니다. <1>23:30 -●11월:사기치가 30 상승했습니다. <1>23:30 -●호표기병(으)로 읭읭의 맹수병(을)를 수비합니다. -수 <1>호표【카토】 7048 (-2352) VS 0 (-4077) 【읭읭】<1>맹수 -읭읭의 맹수병(이)가 퇴각했습니다. -Lv 59로 레벨업! -●12월:평민킬러에게 금 7000을 수여했습니다. <1>00:30 -●12월:동황(으)로 진격합니다. <1>00:30 -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 4506 (-2542) VS 5340 (-12910) 【동황】<1>성벽 -무력이 1 올랐습니다! -●쌀 10000을 포상으로 받았습니다. -●이번 수입은 금 24180입니다. -●봉급으로 금 720을 받았습니다. -●1월:제갈여포에게 금 8000을 수여했습니다. <1>01:30 -●1월:동황(으)로 진격합니다. <1>01:30 -●호표기병(으)로 魯堂首의 등갑병(을)를 공격합니다. -공 <1>호표【카토】 3353 (-1153) VS 0 (-4043) 【魯堂首】<1>등갑 -魯堂首의 등갑병(이)가 전멸했습니다. -●호표기병(으)로 니쉬의 악귀병(을)를 공격합니다. -공 <1>호표【카토】 2110 (-1243) VS 0 (-1310) 【니쉬】<1>악귀 -니쉬의 악귀병(이)가 전멸했습니다. -●호표기병(으)로 성벽을 공격합니다. -◆성 <1>호표【카토】 1734 (-376) VS 3801 (-1539) 【동황】<1>성벽 -●2월:카가미네렌에게 금 7000을 수여했습니다. <1>02:30 -●2월:현재 모병 할 수 없는 병종입니다. 모병 실패. <1>02:30 -●3월:정휘인에게 금 7000을 수여했습니다. <1>03:30 -●3월:병사들은 이미 정예병사들입니다. <1>03:30 -●호표기병(으)로 장임의 등갑병(을)를 수비합니다. -수 <1>호표【카토】 0 (-1734) VS 153 (-4332) 【장임】<1>등갑 -●전멸했습니다. -●4월:병사가 없습니다. 사기진작 실패. <1>04:30 -●5월:병사가 없습니다. 동황(으)로 출병 실패. <1>05:30 -●6월:병사가 없습니다. 동황(으)로 출병 실패. <1>06:30 -●이번 수입은 쌀 27369입니다. -●봉급으로 쌀 720을 받았습니다. -●7월:기병을(를) 9400명 모병했습니다. <1>07:30 -전력전 대회의 4강 진출로 552의 상금, 약간의 명성 획득! -●8월:KAITO에게 금 10000을 수여했습니다. <1>08:30 -●8월:훈련치가 30 상승했습니다. <1>08:30 -●9월:낭군에게 금 5000을 수여했습니다. <1>09:30 -●9월:사기치가 30 상승했습니다. <1>09:30 -●기병(으)로 선비의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 2339 (-7061) VS 0 (-7600) 【선비】<1>악귀 -선비의 악귀병(이)가 퇴각했습니다. -●기병(으)로 비밀의 마귀병(을)를 수비합니다. -수 <1>기병【카토】 427 (-1912) VS 0 (-2632) 【비밀】<1>마귀 -비밀의 마귀병(이)가 퇴각했습니다. -●기병(으)로 아소의 맹수병(을)를 수비합니다. -수 <1>기병【카토】 0 (-427) VS 5865 (-626) 【아소】<1>맹수 -●전멸했습니다. -●10월:다이스에게 금 8000을 수여했습니다. <1>10:30 -●10월:기병을(를) 9400명 모병했습니다. <1>10:30 -Lv 60로 레벨업! -●수도가 함락되어 계림으로 긴급천도합니다. -●11월:코토와르에게 금 8000을 수여했습니다. <1>11:30 -●11월:사기치가 30 상승했습니다. <1>11:30 -●기병(으)로 카이사르의 석궁병(을)를 수비합니다. -수 <1>기병【카토】 4976 (-4424) VS 0 (-1473) 【카이사르】<1>석궁 -카이사르의 석궁병(이)가 퇴각했습니다. -●12월:기병을(를) 4400명 추가모병했습니다. <1>12:30 -●이번 수입은 금 14885입니다. -●봉급으로 금 1288을 받았습니다. -●기병(으)로 임사영의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 0 (-9376) VS 3814 (-4444) 【임사영】<1>악귀 -●전멸했습니다. -●1월:기병을(를) 9400명 모병했습니다. <1>13:30 -●기병(으)로 Anes의 맹수병(을)를 수비합니다. -수 <1>기병【카토】 3607 (-5793) VS 2300 (-3075) 【Anes】<1>맹수 -●기병(으)로 니쉬의 악귀병(을)를 수비합니다. -수 <1>기병【카토】 0 (-3607) VS 7374 (-1445) 【니쉬】<1>악귀 -●전멸했습니다. -보컬로이드(이)가 멸망했습니다. -●도주하며 금3422 쌀3924을 분실했습니다. -●2월:접속잘안함에 임관했습니다. <1>14:30 -잠둥이션에 의해 하변(으)로 발령됐습니다. <1>14:49 -19품관(으)로 강등되어 봉록이 2600(으)로 하락했습니다! -Lv 57로 레벨다운! -●217년 3월: 접속잘안함(이)가 전토를 통일하였습니다. diff --git a/che_close/templates/.htaccess b/che_close/templates/.htaccess deleted file mode 100644 index 698196ae..00000000 --- a/che_close/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/i_entrance/adminInc.php b/i_entrance/adminInc.php index 9fb243e1..deaac9b4 100644 --- a/i_entrance/adminInc.php +++ b/i_entrance/adminInc.php @@ -31,36 +31,39 @@ Entrance_AdminUpdate();
diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index 1fac1098..f7b16859 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -27,24 +27,45 @@ $member = $DB->Get($rs); function doServerModeSet($server, $select, &$reason){ global $_serverDirs; + $reason = ''; $serverDir = $_serverDirs[$server]; + $serverPath = ROOT.W.$serverDir; + $realServerPath = realpath(dirname(__FILE__)).W.$serverPath; - if($select == 0) { - rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir, realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'); - rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_rest', realpath(dirname(__FILE__)).W.ROOT.W.$serverDir); + if($select == 0) { //폐쇄 + $templates = new Plates('templates'); + + + //TODO: .htaccess가 서버 오픈에도 사용될 수 있으니 별도의 방법이 필요함 + $allow_ip = util::get_client_ip(false); + if(util::starts_with($allow_ip, '192.168.') || + util::starts_with($allow_ip, '10.')) + { + //172.16~172.31은 코딩하기 귀찮으니까 안할거다 + $allow_ip = util::get_client_ip(true); + } + + $xforward_allow_ip = escapeIPv4($allow_ip); + + $htaccess = $templates->render('block_htaccess', + ['allow_ip' => $allow_ip, 'xforward_allow_ip' => $xforward_allow_ip]); + file_put_contents($realServerPath.'/.htaccess', $htaccess); + $response['result'] = 'SUCCESS'; - } elseif($select == 1) { - if(file_exists(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP)){ - @unlink(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir.'_close'.W.D_SETTING.W.SET.PHP); + } elseif($select == 1) {//리셋 + if(file_exists($realServerPath.W.D_SETTING.W.SET.PHP)){ + @unlink($realServerPath.W.D_SETTING.W.SET.PHP); } - $response['installURL'] = ROOT.W."{$serverDir}_close/install.php"; + $response['installURL'] = $serverPath.W."install.php"; $response['result'] = 'SUCCESS'; - } elseif($select == 2) { - rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir, realpath(dirname(__FILE__)).W.ROOT.W.$serverDir."_rest"); - rename(realpath(dirname(__FILE__)).W.ROOT.W.$serverDir."_close", realpath(dirname(__FILE__)).W.ROOT.W.$serverDir); + } elseif($select == 2) {//오픈 + if(file_exists($realServerPath.'.htaccess')){ + @unlink($realServerPath.'.htaccess'); + } $response['result'] = 'SUCCESS'; } + return true; } function doAdminPost($member, $action, $notice, $server, $select){ @@ -63,7 +84,7 @@ function doAdminPost($member, $action, $notice, $server, $select){ if($action == 1) { $reason = ''; - if(doServerModeSet($server, $select)){ + if(doServerModeSet($server, $select, $reason)){ $response['result'] = 'SUCCESS'; } else{ diff --git a/i_entrance/template/.htaccess b/i_entrance/templates/.htaccess similarity index 100% rename from i_entrance/template/.htaccess rename to i_entrance/templates/.htaccess diff --git a/i_entrance/template/block_htaccess.php b/i_entrance/templates/block_htaccess.php similarity index 100% rename from i_entrance/template/block_htaccess.php rename to i_entrance/templates/block_htaccess.php From c73a3bcf95412997dc0a0bfc671f731c743bb651 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 15 Jan 2018 01:27:05 +0900 Subject: [PATCH 022/622] =?UTF-8?q?che=5Fclose=20=EA=B3=84=EC=97=B4=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 ++-- che/.htaccess | 4 ++++ deploy_che.sh | 4 ++-- deploy_devel_kwe.sh | 2 +- deploy_devel_pwe.sh | 2 +- deploy_devel_twe.sh | 2 +- i_entrance/adminAction.js | 2 +- i_entrance/adminPost.php | 13 ++----------- process_all.sh | 10 +++++----- 9 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 che/.htaccess diff --git a/.vscode/settings.json b/.vscode/settings.json index f157954f..803da7d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,11 +7,11 @@ "**/.DS_Store": true, "**/logs/*.txt": true, "**/session/sess*":true, - //"**/che_close": true, + "**/che": true, }, "search.exclude": { - "**/che_close": true, + "**/che": true, "e_lib/*":true, }, diff --git a/che/.htaccess b/che/.htaccess new file mode 100644 index 00000000..d4841646 --- /dev/null +++ b/che/.htaccess @@ -0,0 +1,4 @@ +Deny from all +SetEnvIf X-Forwarded-For ^192\.168\.0\.1 env_allow_1 +Allow from env=env_allow_1 +Allow from 192.168.0.1 diff --git a/deploy_che.sh b/deploy_che.sh index eab97319..a1cce4b3 100644 --- a/deploy_che.sh +++ b/deploy_che.sh @@ -1,8 +1,8 @@ #!/bin/bash SAM=che -SRC=~/svn/trunk/sam/che_close/ -TAR=~/www/sam/${SAM}_close/ +SRC=~/svn/trunk/sam/che/ +TAR=~/www/sam/${SAM}/ ALT=~/www/sam/${SAM}/ if [ -e $TAR ] diff --git a/deploy_devel_kwe.sh b/deploy_devel_kwe.sh index e9c6999c..03038129 100644 --- a/deploy_devel_kwe.sh +++ b/deploy_devel_kwe.sh @@ -2,7 +2,7 @@ SAM=kwe SRC=~/svn/branches/che_devel/ -TAR=~/www/sam/${SAM}_close/ +TAR=~/www/sam/${SAM}/ ALT=~/www/sam/${SAM}/ if [ -e $TAR ] diff --git a/deploy_devel_pwe.sh b/deploy_devel_pwe.sh index ccb4ac1b..2b814410 100644 --- a/deploy_devel_pwe.sh +++ b/deploy_devel_pwe.sh @@ -2,7 +2,7 @@ SAM=pwe SRC=~/svn/branches/che_devel/ -TAR=~/www/sam/${SAM}_close/ +TAR=~/www/sam/${SAM}/ ALT=~/www/sam/${SAM}/ if [ -e $TAR ] diff --git a/deploy_devel_twe.sh b/deploy_devel_twe.sh index 5166aa08..45394929 100644 --- a/deploy_devel_twe.sh +++ b/deploy_devel_twe.sh @@ -2,7 +2,7 @@ SAM=twe SRC=~/svn/branches/che_devel/ -TAR=~/www/sam/${SAM}_close/ +TAR=~/www/sam/${SAM}/ ALT=~/www/sam/${SAM}/ if [ -e $TAR ] diff --git a/i_entrance/adminAction.js b/i_entrance/adminAction.js index 254de0f3..75db42f8 100644 --- a/i_entrance/adminAction.js +++ b/i_entrance/adminAction.js @@ -80,7 +80,7 @@ function Entrance_AdminNPCCreate(serverDir) { } function Entrance_AdminClosedLogin(serverDir) { - ReplaceFrame(serverDir+'_close'+W+'npc_login'+PHP); + ReplaceFrame(serverDir+W+'npc_login'+PHP); } function Entrance_AdminOpen119(serverDir) { diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index f7b16859..f88a1e04 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -25,9 +25,8 @@ $select = util::array_get($_POST['select'], ''); $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); -function doServerModeSet($server, $select, &$reason){ +function doServerModeSet($server, $select, &$response){ global $_serverDirs; - $reason = ''; $serverDir = $_serverDirs[$server]; $serverPath = ROOT.W.$serverDir; $realServerPath = realpath(dirname(__FILE__)).W.$serverPath; @@ -50,20 +49,16 @@ function doServerModeSet($server, $select, &$reason){ $htaccess = $templates->render('block_htaccess', ['allow_ip' => $allow_ip, 'xforward_allow_ip' => $xforward_allow_ip]); file_put_contents($realServerPath.'/.htaccess', $htaccess); - - $response['result'] = 'SUCCESS'; } elseif($select == 1) {//리셋 if(file_exists($realServerPath.W.D_SETTING.W.SET.PHP)){ @unlink($realServerPath.W.D_SETTING.W.SET.PHP); } $response['installURL'] = $serverPath.W."install.php"; - $response['result'] = 'SUCCESS'; } elseif($select == 2) {//오픈 if(file_exists($realServerPath.'.htaccess')){ @unlink($realServerPath.'.htaccess'); } - $response['result'] = 'SUCCESS'; } return true; } @@ -83,13 +78,9 @@ function doAdminPost($member, $action, $notice, $server, $select){ } if($action == 1) { - $reason = ''; - if(doServerModeSet($server, $select, $reason)){ + if(doServerModeSet($server, $select, $response)){ $response['result'] = 'SUCCESS'; } - else{ - $response['msg'] = $reason; - } return $response; } diff --git a/process_all.sh b/process_all.sh index 4893190e..3ed57ee9 100644 --- a/process_all.sh +++ b/process_all.sh @@ -12,7 +12,7 @@ HOUR=`expr ${HOUR} + 0` -TAR=/home/jwh1807/www/sam/che_close/ +TAR=/home/jwh1807/www/sam/che/ if [ -e $TAR ] then TIME=`date -d "0 hours" "+%H:%M:%S.%N"` @@ -27,7 +27,7 @@ fi if [ $HOUR -ge 9 -a $HOUR -lt 21 ] then - TAR=/home/jwh1807/www/sam/kwe_close/ + TAR=/home/jwh1807/www/sam/kwe/ if [ -e $TAR ] then TIME=`date -d "0 hours" "+%H:%M:%S.%N"` @@ -38,7 +38,7 @@ then echo [$TIME] kwe finish. fi - TAR=/home/jwh1807/www/sam/pwe_close/ + TAR=/home/jwh1807/www/sam/pwe/ if [ -e $TAR ] then TIME=`date -d "0 hours" "+%H:%M:%S.%N"` @@ -49,7 +49,7 @@ then echo [$TIME] pwe finish. fi - TAR=/home/jwh1807/www/sam/twe_close/ + TAR=/home/jwh1807/www/sam/twe/ if [ -e $TAR ] then TIME=`date -d "0 hours" "+%H:%M:%S.%N"` @@ -60,7 +60,7 @@ then echo [$TIME] twe finish. fi - TAR=/home/jwh1807/www/sam/hwe_close/ + TAR=/home/jwh1807/www/sam/hwe/ if [ -e $TAR ] then TIME=`date -d "0 hours" "+%H:%M:%S.%N"` From 28eaf7b0d77754366c6b96eeea4587a5770182e9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 16 Jan 2018 03:56:50 +0900 Subject: [PATCH 023/622] =?UTF-8?q?string=20=EB=82=B4=EC=9D=98=20$=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=EB=93=A4=20=EC=9D=BC=EA=B4=84=20=EB=B3=80?= =?UTF-8?q?=ED=99=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy_devel_hwe.sh | 2 +- i_entrance/enterPost.php | 2 +- i_entrance/manage/Get.php | 2 +- twe/_119.php | 10 +- twe/_119_b.php | 4 +- twe/_admin1.php | 22 +- twe/_admin1_submit.php | 20 +- twe/_admin2.php | 18 +- twe/_admin2_submit.php | 100 +- twe/_admin3.php | 10 +- twe/_admin3_submit.php | 34 +- twe/_admin4.php | 42 +- twe/_admin4_submit.php | 16 +- twe/_admin5.php | 86 +- twe/_admin5_submit.php | 8 +- twe/_admin6.php | 20 +- twe/_admin7.php | 22 +- twe/_admin8.php | 46 +- twe/_simul.php | 306 +-- twe/a_bestGeneral.php | 46 +- twe/a_emperior.php | 84 +- twe/a_emperior2.php | 84 +- twe/a_genList.php | 64 +- twe/a_hallOfFame.php | 12 +- twe/a_history.php | 12 +- twe/a_kingdomList.php | 140 +- twe/a_npcList.php | 28 +- twe/a_status.php | 12 +- twe/a_traffic.php | 44 +- twe/a_vote.php | 54 +- twe/b_auction.php | 68 +- twe/b_battleCenter.php | 40 +- twe/b_betting.php | 68 +- twe/b_chiefboard.php | 12 +- twe/b_chiefcenter.php | 40 +- twe/b_currentCity.php | 164 +- twe/b_dipcenter.php | 106 +- twe/b_diplomacy.php | 34 +- twe/b_genList.php | 86 +- twe/b_myBossInfo.php | 188 +- twe/b_myCityInfo.php | 82 +- twe/b_myGenInfo.php | 90 +- twe/b_myKingdomInfo.php | 54 +- twe/b_myPage.php | 70 +- twe/b_nationboard.php | 10 +- twe/b_nationrule.php | 10 +- twe/b_tournament.php | 94 +- twe/b_troop.php | 42 +- twe/c_auction.php | 50 +- twe/c_betting.php | 8 +- twe/c_chiefboard.php | 14 +- twe/c_dipcenter.php | 24 +- twe/c_double.php | 36 +- twe/c_msgsubmit.php | 62 +- twe/c_myBossInfo.php | 114 +- twe/c_nationboard.php | 14 +- twe/c_nationrule.php | 4 +- twe/c_tournament.php | 112 +- twe/c_troop.php | 24 +- twe/c_vacation.php | 4 +- twe/c_vote.php | 42 +- twe/commandlist.php | 12 +- twe/d_ally.php | 64 +- twe/d_cancel.php | 52 +- twe/d_cease.php | 56 +- twe/d_merge.php | 68 +- twe/d_scout.php | 88 +- twe/d_surrender.php | 66 +- twe/event_1.php | 64 +- twe/event_2.php | 66 +- twe/event_3.php | 14 +- twe/event_4.php | 12 +- twe/func.php | 1923 ++++++++--------- twe/func_auction.php | 190 +- twe/func_history.php | 10 +- twe/func_npc.php | 426 ++-- twe/func_process.php | 4092 ++++++++++++++++++------------------- twe/func_string.php | 2 + twe/func_tournament.php | 248 +-- twe/join.php | 20 +- twe/join_post.php | 56 +- twe/join_token.php | 6 +- twe/login_process.php | 25 +- twe/logout_process.php | 14 +- twe/main.php | 74 +- twe/map.php | 68 +- twe/msglist.php | 6 +- twe/npc_login_process.php | 22 +- twe/preprocessing.php | 4 +- twe/process_war.php | 948 ++++----- twe/processing.php | 522 ++--- twe/scenario_1.php | 6 +- twe/scenario_10.php | 6 +- twe/scenario_11.php | 6 +- twe/scenario_12.php | 6 +- twe/scenario_2.php | 6 +- twe/scenario_20.php | 4 +- twe/scenario_21.php | 4 +- twe/scenario_22.php | 184 +- twe/scenario_23.php | 4 +- twe/scenario_24.php | 218 +- twe/scenario_25.php | 4 +- twe/scenario_26.php | 4 +- twe/scenario_27.php | 4 +- twe/scenario_28.php | 4 +- twe/scenario_3.php | 6 +- twe/scenario_4.php | 6 +- twe/scenario_5.php | 6 +- twe/scenario_6.php | 6 +- twe/scenario_7.php | 6 +- twe/scenario_8.php | 6 +- twe/scenario_9.php | 6 +- twe/select_npc.php | 20 +- twe/select_npc_post.php | 30 +- twe/selection.php | 6 +- twe/stylesheet.php | 52 +- twe/turn.php | 12 +- twe/turn_pop_core.php | 4 +- twe/turn_push_core.php | 4 +- 119 files changed, 6485 insertions(+), 6479 deletions(-) diff --git a/deploy_devel_hwe.sh b/deploy_devel_hwe.sh index c481d6b2..8d2f15d2 100644 --- a/deploy_devel_hwe.sh +++ b/deploy_devel_hwe.sh @@ -2,7 +2,7 @@ SAM=hwe SRC=~/svn/branches/che_devel/ -TAR=~/www/sam/${SAM}_close/ +TAR=~/www/sam/${SAM}/ ALT=~/www/sam/${SAM}/ if [ -e $TAR ] diff --git a/i_entrance/enterPost.php b/i_entrance/enterPost.php index 10e785b4..8545be83 100644 --- a/i_entrance/enterPost.php +++ b/i_entrance/enterPost.php @@ -1,7 +1,7 @@ Select('DATE, AMOUNT, CUMUL', 'DONATION', "ID='{$member[ID]}'"); +$rs = $DB->Select('DATE, AMOUNT, CUMUL', 'DONATION', "ID='{$member['ID']}'"); $count = $DB->Count($rs); if($count > 0) { $response['donation'] = ' diff --git a/twe/_119.php b/twe/_119.php index 18c6cc66..53026166 100644 --- a/twe/_119.php +++ b/twe/_119.php @@ -4,11 +4,11 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -44,10 +44,10 @@ $plock = MYDB_fetch_array($result);
- 시간조정 : 최종갱신 :
- 시간조정 : 토너먼트 :
+ 시간조정 : 최종갱신 :
+ 시간조정 : 토너먼트 :
봉급지급 :
- 락 풀 기 : 현재 : 0?"동결중":"가동중";?>
+ 락 풀 기 : 현재 : 0?"동결중":"가동중";?>
diff --git a/twe/_119_b.php b/twe/_119_b.php index 9f3d1eb9..78cf0c09 100644 --- a/twe/_119_b.php +++ b/twe/_119_b.php @@ -4,11 +4,11 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } diff --git a/twe/_admin1.php b/twe/_admin1.php index ae57c86f..65a7eeeb 100644 --- a/twe/_admin1.php +++ b/twe/_admin1.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -43,7 +43,7 @@ $admin = getAdmin($connect);
- + @@ -53,27 +53,27 @@ $admin = getAdmin($connect); - + - + - + - + - + - + - + - + diff --git a/twe/_admin1_submit.php b/twe/_admin1_submit.php index 1e0f67c0..7fbc8430 100644 --- a/twe/_admin1_submit.php +++ b/twe/_admin1_submit.php @@ -7,11 +7,11 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } @@ -26,7 +26,7 @@ switch($btn) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case "로그쓰기": - $lognum = $admin[historyindex] + 1; + $lognum = $admin['historyindex'] + 1; if($lognum >= 29) { $lognum = 0; } $history[0] = "{$log}"; pushHistory($connect, $history); @@ -69,20 +69,20 @@ switch($btn) { case "60분턴": $turnterm = 1; $unit = 3600; break; case "120분턴": $turnterm = 0; $unit = 7200; break; } - $turn = ($admin[year] - $admin[startyear]) * 12 + $admin[month] - 1; - $starttime = date("Y-m-d H:i:s", strtotime($admin[turntime]) - $turn * $unit); + $turn = ($admin['year'] - $admin['startyear']) * 12 + $admin['month'] - 1; + $starttime = date("Y-m-d H:i:s", strtotime($admin['turntime']) - $turn * $unit); $starttime = cutTurn($starttime, $turnterm); $query = "update game set turnterm='$turnterm',starttime='$starttime' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 턴시간이 길어지는 경우 랜덤턴 배정 - if($turnterm < $admin[turnterm]) { + 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]'"; + $query = "update general set turntime='$turntime' where no='$gen['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 턴시간이 너무 멀리 떨어진 선수 제대로 보정 @@ -92,10 +92,10 @@ switch($btn) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $gen = MYDB_fetch_array($result); - $num = floor((strtotime($gen[turntime]) - strtotime($admin[turntime])) / $unit); + $num = floor((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]'"; + $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),""); } } diff --git a/twe/_admin2.php b/twe/_admin2.php index 5cc7ca07..ee4966e7 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -51,7 +51,7 @@ $admin = MYDB_fetch_array($result); @@ -72,14 +72,14 @@ $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); $style = "style=;"; - if($general[block] > 0) { $style .= "background-color:red;"; } - if($general[npc] >= 2) { $style .= "color:cyan;"; } - elseif($general[npc] == 1) { $style .= "color:skyblue;"; } - if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } - if($general[userlevel] > 2) { $style .= "color:blue;"; } + if($general['block'] > 0) { $style .= "background-color:red;"; } + if($general['npc'] >= 2) { $style .= "color:cyan;"; } + elseif($general['npc'] == 1) { $style .= "color:skyblue;"; } + if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; } + if($general['userlevel'] > 2) { $style .= "color:blue;"; } echo " - "; + "; } echo " diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 37c04f3f..b29bfcb5 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } @@ -40,7 +40,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -58,7 +58,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -76,7 +76,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -110,9 +110,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = $btn." 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -120,13 +120,13 @@ switch($btn) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel]); + $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel']); - $query = "update general set specage2=age,special2='$special2' where no='$general[no]'"; + $query = "update general set specage2=age,special2='$special2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special2)."】(을)를 습득"); pushGenLog($general, $log); } break; @@ -137,9 +137,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = $btn." 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -154,9 +154,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = $btn." 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -171,9 +171,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = "보병숙련도+10000 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -188,9 +188,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = "궁병숙련도+10000 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -205,9 +205,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = "기병숙련도+10000 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -222,9 +222,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = "귀병숙련도+10000 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -239,9 +239,9 @@ switch($btn) { $you = MYDB_fetch_array($result); $msg = "차병숙련도+10000 지급!"; // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -280,9 +280,9 @@ switch($btn) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; @@ -295,9 +295,9 @@ switch($btn) { if($weap == 0) { $msg = "무기 회수!"; } else { $msg = getWeapName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -318,9 +318,9 @@ switch($btn) { if($weap == 0) { $msg = "서적 회수!"; } else { $msg = getBookName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -341,9 +341,9 @@ switch($btn) { if($weap == 0) { $msg = "말 회수!"; } else { $msg = getHorseName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -364,9 +364,9 @@ switch($btn) { if($weap == 0) { $msg = "특수도구 회수!"; } else { $msg = getItemName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -408,8 +408,8 @@ switch($btn) { $admin = MYDB_fetch_array($result); for($i=0; $i < sizeof($genlist); $i++) { - $turntime = getRandTurn($admin[turnterm]); - $cutTurn = cutTurn($turntime, $admin[turnterm]); + $turntime = getRandTurn($admin['turnterm']); + $cutTurn = cutTurn($turntime, $admin['turnterm']); $query = "update general set turntime='$cutTurn' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -420,7 +420,7 @@ switch($btn) { $admin = MYDB_fetch_array($result); for($i=0; $i < sizeof($genlist); $i++) { - $turntime = getRandTurn($admin[turnterm]); + $turntime = getRandTurn($admin['turnterm']); $query = "update general set turntime='$turntime' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/_admin3.php b/twe/_admin3.php index 6849cfee..c95e8e52 100644 --- a/twe/_admin3.php +++ b/twe/_admin3.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -55,12 +55,12 @@ $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if($general[power] >= $general[intel]) { + if($general['power'] >= $general['intel']) { echo " - "; + "; } else { echo " - "; + "; } } diff --git a/twe/_admin3_submit.php b/twe/_admin3_submit.php index 10a09171..17c2d848 100644 --- a/twe/_admin3_submit.php +++ b/twe/_admin3_submit.php @@ -7,11 +7,11 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 4) { +if($me['userlevel'] < 4) { echo ""; } @@ -25,9 +25,9 @@ switch($btn) { if($weap == 0) { $msg = "무기 회수!"; } else { $msg = getWeapName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -48,9 +48,9 @@ switch($btn) { if($weap == 0) { $msg = "서적 회수!"; } else { $msg = getBookName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -71,9 +71,9 @@ switch($btn) { if($weap == 0) { $msg = "말 회수!"; } else { $msg = getHorseName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -94,9 +94,9 @@ switch($btn) { if($weap == 0) { $msg = "특수도구 회수!"; } else { $msg = getItemName($weap)." 지급!"; } // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -121,9 +121,9 @@ switch($btn) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin4.php b/twe/_admin4.php index 20a2588b..dc76d56c 100644 --- a/twe/_admin4.php +++ b/twe/_admin4.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -59,14 +59,14 @@ $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); $style = "style=;"; - if($general[block] > 0) { $style .= "background-color:red;"; } - if($general[npc] >= 2) { $style .= "color:cyan;"; } - elseif($general[npc] == 1) { $style .= "color:skyblue;"; } - if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } - if($general[userlevel] > 2) { $style .= "color:blue;"; } + if($general['block'] > 0) { $style .= "background-color:red;"; } + if($general['npc'] >= 2) { $style .= "color:cyan;"; } + elseif($general['npc'] == 1) { $style .= "color:skyblue;"; } + if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; } + if($general['userlevel'] > 2) { $style .= "color:blue;"; } echo " - "; + "; } echo " @@ -114,12 +114,12 @@ for($i=0; $i < $ipCount; $i++) { $genCount = MYDB_num_rows($genResult); for($k=0; $k < $genCount; $k++) { $gen = MYDB_fetch_array($genResult); - if($gen[block] > 0) $genName .= "{$gen[name]}
"; - else $genName .= $gen[name]."
"; - $genDate .= $gen[lastconnect]."
"; - $genIP .= $gen[ip]."
"; - $genID .= $gen[user_id]."
"; - $conMsg .= $gen[conmsg]."
"; + if($gen['block'] > 0) $genName .= "{$gen['name']}
"; + else $genName .= $gen['name']."
"; + $genDate .= $gen['lastconnect']."
"; + $genIP .= $gen['ip']."
"; + $genID .= $gen['user_id']."
"; + $conMsg .= $gen['conmsg']."
"; } $genName .= "
"; $genDate .= "
"; @@ -157,17 +157,17 @@ $conMsg = ""; for($i=0; $i < $ipCount; $i++) { $ip = MYDB_fetch_array($result); - $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='$ip[password]' and npc<2"; + $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='$ip['password']' and npc<2"; $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 .= "{$gen[name]}
"; - else $genName .= $gen[name]."
"; - $genDate .= $gen[lastconnect]."
"; - $genIP .= substr($gen[password],0,10)." ...
"; - $genID .= $gen[user_id]."
"; - $conMsg .= $gen[conmsg]."
"; + if($gen['block'] > 0) $genName .= "{$gen['name']}
"; + else $genName .= $gen['name']."
"; + $genDate .= $gen['lastconnect']."
"; + $genIP .= substr($gen['password'],0,10)." ...
"; + $genID .= $gen['user_id']."
"; + $conMsg .= $gen['conmsg']."
"; } $genName .= "
"; $genDate .= "
"; diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index b9cd07b5..3f0a0f45 100644 --- a/twe/_admin4_submit.php +++ b/twe/_admin4_submit.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } @@ -28,7 +28,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -46,7 +46,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -64,7 +64,7 @@ switch($btn) { $query = "select user_id from general where no='$genlist[$i]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; + $uid[$i] = $gen['user_id']; } $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); @@ -94,9 +94,9 @@ switch($btn) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin5.php b/twe/_admin5.php index d1e021ab..cb467a61 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -94,7 +94,7 @@ for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); echo " - "; + "; } ?> @@ -195,7 +195,7 @@ for($i=0; $i < $nationCount; $i++) { ROUND(AVG(intel), 1) as avgi, ROUND(AVG(explevel), 1) as avge, SUM(crew) as crew - from general where nation='$nation[nation]'"; + from general where nation='$nation['nation']'"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($genResult); @@ -207,43 +207,43 @@ for($i=0; $i < $nationCount; $i++) { 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]'"; + from city where nation='$nation['nation']'"; $cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityResult); echo "
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + "; } @@ -251,7 +251,7 @@ for($i=0; $i < $nationCount; $i++) { ?>
운영자메세지'>
중원정세추가
시작시간변경'> 현재도시훈사
최대 장수>> 최대 국가>>
기준 장수수>> 현재 수입률%%
시작 년도'> 최근 갱신 시간  
턴시간
제한등급 - style=color:white;background-color:black;font-size:13;> + style=color:white;background-color:black;font-size:13;>
$nation[name] {$nation[connect]}  {$nation[con]}  {$nation[power]}  {$nation[chemi]}  {$gen[cnt]}  {$city[cnt]}  {$nation[tech]}  {$nation[tricklimit]}  {$nation[gold]}  {$nation[rice]}  {$gen[avgg]}  {$gen[avgr]}  {$gen[avgl]}  {$gen[avgp]}  {$gen[avgi]}  {$gen[avge]} $nation['name'] {$nation['connect']}  {$nation['con']}  {$nation['power']}  {$nation['chemi']}  {$gen['cnt']}  {$city['cnt']}  {$nation['tech']}  {$nation['tricklimit']}  {$nation['gold']}  {$nation['rice']}  {$gen['avgg']}  {$gen['avgr']}  {$gen['avgl']}  {$gen['avgp']}  {$gen['avgi']}  {$gen['avge']}   {$nation[dex0]}   {$nation[dex10]}   {$nation[dex20]}   {$nation[dex30]}   {$nation[dex40]}  {$gen[crew]}/{$gen[leader]}00  {$city[pop]}/{$city[pop2]}  {$city[rate]}%  {$city[agri]}%  {$city[comm]}%  {$city[secu]}%  {$city[wall]}%  {$city[def]}% $nation[name] {$gen['crew']}/{$gen['leader']}00  {$city['pop']}/{$city[pop2]}  {$city['rate']}%  {$city['agri']}%  {$city['comm']}%  {$city['secu']}%  {$city['wall']}%  {$city['def']}% $nation['name']
- +
@@ -282,20 +282,20 @@ for($i=0; $i < $count; $i++) { echo " - - - - + + + + "; switch($type2) { default: - case 0: echo ""; break; - case 1: echo ""; break; - case 2: echo ""; break; - case 3: echo ""; break; - case 4: echo ""; break; - case 5: echo ""; break; - case 6: echo ""; break; + case 0: echo ""; break; + case 1: echo ""; break; + case 2: echo ""; break; + case 3: echo ""; break; + case 4: echo ""; break; + case 5: echo ""; break; + case 6: echo ""; break; } echo " diff --git a/twe/_admin5_submit.php b/twe/_admin5_submit.php index 129ad500..3ef4b803 100644 --- a/twe/_admin5_submit.php +++ b/twe/_admin5_submit.php @@ -5,21 +5,21 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo ""; } switch($btn) { case "국가변경": if($nation == 0) { - $query = "update general set nation=0,level=0 where user_id='$_SESSION[p_id]'"; + $query = "update general set nation=0,level=0 where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set nation='{$nation}',level=1 where user_id='$_SESSION[p_id]'"; + $query = "update general set nation='{$nation}',level=1 where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin6.php b/twe/_admin6.php index 8b003b99..b5b9885d 100644 --- a/twe/_admin6.php +++ b/twe/_admin6.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -80,14 +80,14 @@ for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($genresult); echo " - - - - - - - - + + + + + + + + "; } diff --git a/twe/_admin7.php b/twe/_admin7.php index c2013275..1028d082 100644 --- a/twe/_admin7.php +++ b/twe/_admin7.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -72,14 +72,14 @@ for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); // 선택 없으면 맨 처음 장수 if($gen == 0) { - $gen = $general[no]; + $gen = $general['no']; } - if($gen == $general[no]) { + if($gen == $general['no']) { echo " - "; + "; } else { echo " - "; + "; } } ?> @@ -95,7 +95,7 @@ for($i=0; $i < $gencount; $i++) { @@ -106,10 +106,10 @@ for($i=0; $i < $gencount; $i++) { @@ -118,10 +118,10 @@ for($i=0; $i < $gencount; $i++) {
{$stat[year]}{$stat[month]}{$stat[nation_count]}{$stat[gen_count]}{$stat['year']}{$stat['month']}{$stat['nation_count']}{$stat['gen_count']}{$stat[power_hist]}{$stat[nation_name]}{$stat[nation_hist]}{$stat[personal_hist]}{$stat[special_hist]}{$stat[crewtype]}{$stat[etc]}{$stat['power_hist']}{$stat['nation_name']}{$stat['nation_hist']}{$stat['personal_hist']}{$stat['special_hist']}{$stat['crewtype']}{$stat['etc']}
$gen[name]$gen[connect]$gen[startage]$gen[age]".round($gen[refcnt]/2, 1)."".round($gen[ref]/2,1)."$gen[logcnt]".round($gen[log]/2,1)."$gen['name']$gen['connect']$gen['startage']$gen['age']".round($gen['refcnt']/2, 1)."".round($gen['ref']/2,1)."$gen['logcnt']".round($gen['log']/2,1)."
- +  
- + - +
- + - +
diff --git a/twe/_admin8.php b/twe/_admin8.php index 3bc04662..2fb87418 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -72,8 +72,8 @@ $nationcount = MYDB_num_rows($result); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $nationName[$nation[nation]] = $nation[name]; - $nationColor[$nation[nation]] = $nation[color]; + $nationName[$nation['nation']] = $nation['name']; + $nationColor[$nation['nation']] = $nation['color']; } switch($type) { @@ -84,18 +84,18 @@ $dipcount = MYDB_num_rows($result); for($i=0; $i < $dipcount; $i++) { $dip = MYDB_fetch_array($result); - $me = $dip[me]; - $you = $dip[you]; + $me = $dip['me']; + $you = $dip['you']; $query = "select reserved,showing from diplomacy where you='$me' and me='$you'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip2 = MYDB_fetch_array($result2); - if($dip[state] == 2 && $dip[fixed] == "" && $dip[reserved] == "" && $dip2[reserved] == "") { + if($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") { continue; } - switch($dip[state]) { + switch($dip['state']) { case 0: $state = "교 전"; break; case 1: $state = "선포중"; break; case 2: $state = "통 상"; break; @@ -108,31 +108,31 @@ for($i=0; $i < $dipcount; $i++) { $date = date('Y-m-d H:i:s'); $note = ""; - if($dip[fixed] != "") { - if($dip[state] == 7) { - $note .= $dip[fixed]; + if($dip['fixed'] != "") { + if($dip['state'] == 7) { + $note .= $dip['fixed']; } else { - $note .= "{$dip[fixed]}"; + $note .= "{$dip['fixed']}"; } - if($dip[reserved] != "" || $dip2[reserved] != "") { + if($dip['reserved'] != "" || $dip2['reserved'] != "") { $note .= "
"; } } - if($dip[reserved] != "") { - if($dip[showing] >= $date) { - $note .= "아국측 제의: {$dip[reserved]}"; + if($dip['reserved'] != "") { + if($dip['showing'] >= $date) { + $note .= "아국측 제의: {$dip['reserved']}"; } else { - $note .= "아국측 제의: {$dip[reserved]}"; + $note .= "아국측 제의: {$dip['reserved']}"; } - if($dip2[reserved] != "") { + if($dip2['reserved'] != "") { $note .= "
"; } } - if($dip2[reserved] != "") { - if($dip2[showing] >= $date) { - $note .= "상대측 제의: {$dip2[reserved]}"; + if($dip2['reserved'] != "") { + if($dip2['showing'] >= $date) { + $note .= "상대측 제의: {$dip2['reserved']}"; } else { - $note .= "상대측 제의: {$dip2[reserved]}"; + $note .= "상대측 제의: {$dip2['reserved']}"; } } if($note == "") { $note = " "; } @@ -142,7 +142,7 @@ for($i=0; $i < $dipcount; $i++) { $nationName[$me] $nationName[$you] $state - $dip[term] 개월 + $dip['term'] 개월 {$note} "; } diff --git a/twe/_simul.php b/twe/_simul.php index 5f3b4120..a69a15d0 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "시뮬", 2); -$query = "select no,tournament,userlevel,con,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select no,tournament,userlevel,con,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -14,10 +14,10 @@ $query = "select * from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $game = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $game[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $game['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($me[userlevel] < 3) { +if($me['userlevel'] < 3) { echo "특별회원이 아닙니다."; exit(); } @@ -38,38 +38,38 @@ if($isgen == "장수평균" || $isgen == "성벽평균") { if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평균" || $isgen == "성벽평균") { $msg2 = ""; for($i=0; $i < $simulCount; $i++) { - $general[leader] = $leader1; - $general[power] = $power1; - $general[intel] = $intel1; - $general[crewtype] = $type1; - $general[crew] = $crew1; - $general[train] = $train1; - $general[atmos] = $atmos1; - $general[level] = $level1; - $general[explevel] = $explevel1; + $general['leader'] = $leader1; + $general['power'] = $power1; + $general['intel'] = $intel1; + $general['crewtype'] = $type1; + $general['crew'] = $crew1; + $general['train'] = $train1; + $general['atmos'] = $atmos1; + $general['level'] = $level1; + $general['explevel'] = $explevel1; $general[dex0] = $dex10; $general[dex10] = $dex110; $general[dex20] = $dex120; $general[dex30] = $dex130; $general[dex40] = $dex140; - $oppose[leader] = $leader2; - $oppose[power] = $power2; - $oppose[intel] = $intel2; - $oppose[crewtype] = $type2; - $oppose[crew] = $crew2; - $oppose[train] = $train2; - $oppose[atmos] = $atmos2; - $oppose[level] = $level2; - $oppose[explevel] = $explevel2; + $oppose['leader'] = $leader2; + $oppose['power'] = $power2; + $oppose['intel'] = $intel2; + $oppose['crewtype'] = $type2; + $oppose['crew'] = $crew2; + $oppose['train'] = $train2; + $oppose['atmos'] = $atmos2; + $oppose['level'] = $level2; + $oppose['explevel'] = $explevel2; $oppose[dex0] = $dex20; $oppose[dex10] = $dex210; $oppose[dex20] = $dex220; $oppose[dex30] = $dex230; $oppose[dex40] = $dex240; - $city[def] = $def; - $city[wall] = $wall; + $city['def'] = $def; + $city['wall'] = $wall; if($isgen == "장수공격" || $isgen == "장수평균") { $opposecount = 1; @@ -77,11 +77,11 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $opposecount = 0; } - $warphase = getRate($game, $general[crewtype], "spd"); //병종간 페이즈 수 얻기 + $warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기 // 우선 스케일링 - $city[def] *= 10; - $city[wall] *= 10; + $city['def'] *= 10; + $city['wall'] *= 10; $msg = ""; $msg .= "●1월:공격장수가 공격합니다.
"; @@ -93,7 +93,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 while($phase < $warphase) { // 장수가 없어서 도시 공격 if($opposecount == 0) { - $msg .= "●".getTypename($general[crewtype])."(으)로 성을 공격합니다.
"; + $msg .= "●".getTypename($general['crewtype'])."(으)로 성을 공격합니다.
"; $mykillnum = 0; $mydeathnum = 0; while($phase < $warphase) { @@ -110,35 +110,35 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $myweight = $cityAtt - $myDef; //훈련 사기따라 - $myCrew = getCrew($myCrew, $atmos3, $general[train]); - $cityCrew = getCrew($cityCrew, $general[atmos], $train3); + $myCrew = getCrew($myCrew, $atmos3, $general['train']); + $cityCrew = getCrew($cityCrew, $general['atmos'], $train3); //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexAtt = getGenDex($general, $general['crewtype']); $genDexDef = getGenDex($general, 40); $cityCrew *= getDexLog($genDexAtt, ($train3-60)*7200); $myCrew *= getDexLog(($atmos3-60)*7200, $genDexDef); $avoid = 1; // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = $general[intel] + getBookEff($general[book]); - if($general[crewtype] == 30) { + if(floor($general['crewtype']/10) == 3) { // 귀병 + $int = $general['intel'] + getBookEff($general['book']); + if($general['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { + } elseif($general['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { + } elseif($general['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { + } elseif($general['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { + } elseif($general['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { + } elseif($general['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { + } elseif($general['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { + } elseif($general['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { + } elseif($general['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } $ratio = rand() % 1000; // 0~999 @@ -181,23 +181,23 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } } } - } elseif($general[crewtype] == 40) { // 정란 + } elseif($general['crewtype'] == 40) { // 정란 $cityCrew = $cityCrew * 1.5; - } elseif($general[crewtype] == 41) { // 충차 + } elseif($general['crewtype'] == 41) { // 충차 $cityCrew = $cityCrew * 2.0; - } elseif($general[crewtype] == 42) { // 벽력거 + } elseif($general['crewtype'] == 42) { // 벽력거 $cityCrew = $cityCrew * 1.5; } //군주, 참모, 장군 공격 보정 5% - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $cityCrew = $cityCrew * 1.05; } //레벨 보정 - $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; + $cityCrew = $cityCrew * (100 + $general['explevel']/6)/100; //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + $ratio = CriticalRatio2($general['leader'], $general['power'], $general['intel']); if($ratio >= $rd && $avoid == 1) { $msg .= "필살공격!
"; $cityCrew = CriticalScore2($cityCrew); @@ -205,7 +205,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 if($ratio < $ratio2 && $avoid == 1) { $msg .= "회피했다!
"; $myCrew /= 10; // 10%만 소모 @@ -216,45 +216,45 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $cityCrew *= (rand() % 21 + 90)/100; // 90~110% $myCrew *= (rand() % 21 + 90)/100; // 90~110% - $general[crew] -= round($myCrew); - $city[def] -= round($cityCrew); - $city[wall] -= round($cityCrew); + $general['crew'] -= round($myCrew); + $city['def'] -= round($cityCrew); + $city['wall'] -= round($cityCrew); $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; - $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; + $tempGeneralCrew = $general['crew']; $tempCityDef = $city['def']; - if($city[wall] <= 0) { $city[wall] = 0; } + if($city['wall'] <= 0) { $city['wall'] = 0; } - if($city[def] < 0) { + if($city['def'] < 0) { $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $cityCrew += $tempCityDef; - $city[def] = 0; + $city['def'] = 0; } - if($general[crew] < 0) { + if($general['crew'] < 0) { $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); $cityCrew += $offset; - $city[def] -= $offset; + $city['def'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } $exp += $cityCrew; $opexp += $myCrew; - $general[crew] = round($general[crew]); + $general['crew'] = round($general['crew']); $cityCrew = round($cityCrew); $myCrew = round($myCrew); $myAtt = round($myAtt, 2); $myDef = round($myDef, 2); $cityAtt = round($cityAtt, 2); $cityDef = round($cityDef, 2); - $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【성벽】
"; + $msg .= "● $phase : 【공격장수】 $general['crew'] (-$myCrew) VS $city['def'] (-$cityCrew) 【성벽】
"; $mykillnum += $cityCrew; $mydeathnum += $myCrew; - if($city[def] <= 0) { break; } - if($general[crew] <= 0) { break; } + if($city['def'] <= 0) { break; } + if($general['crew'] <= 0) { break; } } // 도시쌀 소모 계산 @@ -262,28 +262,28 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $rice = round($opexp * 4 * getCrewtypeRice($game, 0, 0) * ($train3/100 - 0.2)); //원래대로 스케일링 - $city[def] = round($city[def] / 10); - $city[wall] = round($city[wall] / 10); + $city['def'] = round($city['def'] / 10); + $city['wall'] = round($city['wall'] / 10); //내정 감소 $dec = round($cityCrew / 10); - $city[agri] -= $dec; - $city[comm] -= $dec; - $city[secu] -= $dec; - if($city[agri] < 0) { $city[agri] = 0; } - if($city[comm] < 0) { $city[comm] = 0; } - if($city[secu] < 0) { $city[secu] = 0; } + $city['agri'] -= $dec; + $city['comm'] -= $dec; + $city['secu'] -= $dec; + if($city['agri'] < 0) { $city['agri'] = 0; } + if($city['comm'] < 0) { $city['comm'] = 0; } + if($city['secu'] < 0) { $city['secu'] = 0; } $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; $msg .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; // $msg2 .= "★병사수 변화 : -$mydeathnum vs -$mykillnum   "; // $msg2 .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; - if($city[def] == 0 || $general[crew] == 0) { + if($city['def'] == 0 || $general['crew'] == 0) { break; } // 장수 대결 } else { - $msg .= "●".getTypename($general[crewtype])."(으)로 수비장수의 ".getTypename($oppose[crewtype])."(을)를 공격합니다.
"; + $msg .= "●".getTypename($general['crewtype'])."(으)로 수비장수의 ".getTypename($oppose['crewtype'])."(을)를 공격합니다.
"; $mykillnum = 0; $mydeathnum = 0; while($phase < $warphase) { @@ -297,38 +297,38 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $myCrew = $_armperphase + $opAtt - $myDef; $opCrew = $_armperphase + $myAtt - $opDef; //훈련 사기따라 - $myCrew = getCrew($myCrew, $oppose[atmos], $general[train]); - $opCrew = getCrew($opCrew, $general[atmos], $oppose[train]); + $myCrew = getCrew($myCrew, $oppose['atmos'], $general['train']); + $opCrew = getCrew($opCrew, $general['atmos'], $oppose['train']); //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, $oppose[crewtype]); - $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); - $oppDexDef = getGenDex($oppose, $general[crewtype]); + $genDexAtt = getGenDex($general, $general['crewtype']); + $genDexDef = getGenDex($general, $oppose['crewtype']); + $oppDexAtt = getGenDex($oppose, $oppose['crewtype']); + $oppDexDef = getGenDex($oppose, $general['crewtype']); $opCrew *= getDexLog($genDexAtt, $oppDexDef); $myCrew *= getDexLog($oppDexAtt, $genDexDef); $myAvoid = 1; $opAvoid = 1; // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = $general[intel] + getBookEff($general[book]); - if($general[crewtype] == 30) { + if(floor($general['crewtype']/10) == 3) { // 귀병 + $int = $general['intel'] + getBookEff($general['book']); + if($general['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { + } elseif($general['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { + } elseif($general['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { + } elseif($general['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { + } elseif($general['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { + } elseif($general['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { + } elseif($general['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { + } elseif($general['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { + } elseif($general['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } $ratio = rand() % 1000; // 0~999 @@ -392,25 +392,25 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } // 상대 장수 병종간 특성 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $int = $oppose[intel] + getBookEff($oppose[book]); - if($oppose[crewtype] == 30) { + if(floor($oppose['crewtype']/10) == 3) { // 귀병 + $int = $oppose['intel'] + getBookEff($oppose['book']); + if($oppose['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($oppose[crewtype] == 31) { + } elseif($oppose['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 32) { + } elseif($oppose['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 33) { + } elseif($oppose['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 34) { + } elseif($oppose['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 35) { + } elseif($oppose['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 36) { + } elseif($oppose['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 37) { + } elseif($oppose['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 38) { + } elseif($oppose['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } $ratio = rand() % 1000; // 0~999 @@ -473,10 +473,10 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } } - if($oppose[crewtype] == 43) { // 목우 + if($oppose['crewtype'] == 43) { // 목우 $r = 0; - $r += $oppose[atmos]; - $r += $oppose[train]; + $r += $oppose['atmos']; + $r += $oppose['train']; $ratio = rand() % 400; // 최대 50% 저지 if($ratio < $r && $opAvoid == 1) { $msg .= "저지당했다!
"; @@ -487,73 +487,73 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 // my 입장 상성 // 보병계열 > 궁병계열 - if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { + if(floor($general['crewtype']/10) == 0 && floor($oppose['crewtype']/10) == 1) { $myCrew *= 0.8; $opCrew *= 1.2; } // 궁병계열 > 기병계열 - if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { + if(floor($general['crewtype']/10) == 1 && floor($oppose['crewtype']/10) == 2) { $myCrew *= 0.8; $opCrew *= 1.2; } // 기병계열 > 보병계열 - if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { + if(floor($general['crewtype']/10) == 2 && floor($oppose['crewtype']/10) == 0) { $myCrew *= 0.8; $opCrew *= 1.2; } // 차병계열 - if(floor($general[crewtype]/10) == 4) { + if(floor($general['crewtype']/10) == 4) { $myCrew *= 1.2; $opCrew *= 0.8; } // op 입장 상성 // 보병계열 > 궁병계열 - if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { + if(floor($oppose['crewtype']/10) == 0 && floor($general['crewtype']/10) == 1) { $opCrew *= 0.8; $myCrew *= 1.2; } // 궁병계열 > 기병계열 - if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { + if(floor($oppose['crewtype']/10) == 1 && floor($general['crewtype']/10) == 2) { $opCrew *= 0.8; $myCrew *= 1.2; } // 기병계열 > 보병계열 - if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { + if(floor($oppose['crewtype']/10) == 2 && floor($general['crewtype']/10) == 0) { $opCrew *= 0.8; $myCrew *= 1.2; } // 차병계열 - if(floor($oppose[crewtype]/10) == 4) { + if(floor($oppose['crewtype']/10) == 4) { $opCrew *= 1.2; $myCrew *= 0.8; } //군주, 참모, 장군 공격 보정 5% - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $opCrew = $opCrew * 1.05; } //상대장수 관직 보정 //군주, 참모, 모사 방어 보정 5% - if($oppose[level] == 12 || $oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { + if($oppose['level'] == 12 || $oppose['level'] == 11 || $oppose['level'] == 9 || $oppose['level'] == 7 || $oppose['level'] == 5) { $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 + } elseif($oppose['level'] == 4 && $oppose['no'] == $city[gen1]) { // 태수 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 + } elseif($oppose['level'] == 3 && $oppose['no'] == $city[gen2]) { // 군사 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 + } elseif($oppose['level'] == 2 && $oppose['no'] == $city[gen3]) { // 시중 보정 $opCrew = $opCrew * 0.95; } //레벨 보정 - $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); - $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); - $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); - $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); + $myCrew = $myCrew * ((100 - $general['explevel']/3)/100); + $opCrew = $opCrew / ((100 - $general['explevel']/3)/100); + $myCrew = $myCrew / ((100 - $oppose['explevel']/3)/100); + $opCrew = $opCrew * ((100 - $oppose['explevel']/3)/100); //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); + $ratio = CriticalRatio2($general['leader'], $general['power'], $general['intel']); if($ratio >= $rd && $myAvoid == 1) { $msg .= "필살공격!
"; $opCrew = CriticalScore2($opCrew); @@ -561,7 +561,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader], $oppose[power], $oppose[intel]); + $ratio = CriticalRatio2($oppose['leader'], $oppose['power'], $oppose['intel']); if($ratio >= $rd && $opAvoid == 1) { $msg .= "●상대의 필살공격!
"; $myCrew = CriticalScore2($myCrew); @@ -569,7 +569,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 if($ratio < $ratio2 && $myAvoid == 1) { $msg .= "회피했다!
"; $myCrew /= 10; // 10%만 소모 @@ -577,7 +577,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율 if($ratio < $ratio2 && $opAvoid == 1) { $msg .= "●상대가 회피했다!
"; $opCrew /= 10; // 10%만 소모 @@ -588,60 +588,60 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $opCrew *= (rand() % 21 + 90)/100; // 90~110% $myCrew *= (rand() % 21 + 90)/100; // 90~110% - $general[crew] -= round($myCrew); - $oppose[crew] -= round($opCrew); + $general['crew'] -= round($myCrew); + $oppose['crew'] -= round($opCrew); $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; - $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; - if($general[crew] <= 0 && $oppose[crew] <= 0) { + $tempGeneralCrew = $general['crew']; $tempOpposeCrew = $oppose['crew']; + if($general['crew'] <= 0 && $oppose['crew'] <= 0) { $r1 = $tempGeneralCrew / $tempMyCrew; $r2 = $tempOpposeCrew / $tempOpCrew; if($r1 > $r2) { $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; + $oppose['crew'] = 0; } else { $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); $opCrew += $offset; - $oppose[crew] -= $offset; + $oppose['crew'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } - } elseif($general[crew] * $oppose[crew] <= 0) { - if($oppose[crew] < 0) { + } elseif($general['crew'] * $oppose['crew'] <= 0) { + if($oppose['crew'] < 0) { $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; + $oppose['crew'] = 0; } - if($general[crew] < 0) { + if($general['crew'] < 0) { $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); $opCrew += $offset; - $oppose[crew] -= $offset; + $oppose['crew'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } } $exp += $opCrew; $opexp += $myCrew; - $general[crew] = round($general[crew]); - $oppose[crew] = round($oppose[crew]); + $general['crew'] = round($general['crew']); + $oppose['crew'] = round($oppose['crew']); $myCrew = round($myCrew); $opCrew = round($opCrew); $myAtt = round($myAtt, 2); $myDef = round($myDef, 2); $opAtt = round($opAtt, 2); $opDef = round($opDef, 2); - $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【수비장수】
"; + $msg .= "● $phase : 【공격장수】 $general['crew'] (-$myCrew) VS $oppose['crew'] (-$opCrew) 【수비장수】
"; $mykillnum += $opCrew; $mydeathnum += $myCrew; - if($oppose[crew] <= 0) { break; } - if($general[crew] <= 0) { break; } + if($oppose['crew'] <= 0) { break; } + if($general['crew'] <= 0) { break; } } $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; @@ -651,9 +651,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 // 공헌, 명성 상승 $exp = round($exp / 50); - $ricing = ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $tech1)); - $msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; -// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; + $ricing = ($exp * 5 * getCrewtypeRice($game, $general['crewtype'], $tech1)); + $msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricing
"; +// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricing
"; $msg = ConvertLog($msg, 1); @@ -675,11 +675,11 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $msg2 .= "{$simulCount}회 평균
"; $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; $msg2 .= "★【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2
"; - $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; + $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricingSum
"; } elseif($isgen == "장수평균") { $msg2 .= "{$simulCount}회 평균
"; $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; - $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; + $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general['crewtype'], $tech1)." = $ricingSum
"; } $msg2 = ConvertLog($msg2, 1); @@ -706,8 +706,8 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $def = 7000; $wall = 7000; - $train3 = $game[city_rate]; - $atmos3 = $game[city_rate]; + $train3 = $game['city_rate']; + $atmos3 = $game['city_rate']; } switch($level1) { diff --git a/twe/a_bestGeneral.php b/twe/a_bestGeneral.php index 718d1b91..10cd6224 100644 --- a/twe/a_bestGeneral.php +++ b/twe/a_bestGeneral.php @@ -10,12 +10,12 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } ?> @@ -49,8 +49,8 @@ $nationcount = MYDB_num_rows($nationresult); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $nationName[$nation[nation]] = $nation[name]; - $nationColor[$nation[nation]] = $nation[color]; + $nationName[$nation['nation']] = $nation['name']; + $nationColor[$nation['nation']] = $nation['color']; } $type = array( @@ -110,17 +110,17 @@ for($i=0; $i < 21; $i++) { for($k=0; $k < 10; $k++) { $gen = MYDB_fetch_array($result); if($i != 2) { - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $data[$k] = $gen[data]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; + $name[$k] = $gen['name']; + $nation[$k] = $nationName[$gen['nation']]; + $data[$k] = $gen['data']; + $color[$k] = $nationColor[$gen['nation']]; + $pic[$k] = $gen['picture']; } else { $name[$k] = "???"; $nation[$k] = "???"; - $data[$k] = $gen[data]; + $data[$k] = $gen['data']; $color[$k] = $_basecolor4; - $gen[imgsvr] = 0; + $gen['imgsvr'] = 0; $pic[$k] = "9999.jpg"; } if($color[$k] == "") $color[$k] = $_basecolor4; @@ -128,7 +128,7 @@ for($i=0; $i < 21; $i++) { if($pic[$k] == "") { echo " "; } else { - $imageTemp = GetImageURL($gen[imgsvr]); + $imageTemp = GetImageURL($gen['imgsvr']); echo ""; } } @@ -197,16 +197,16 @@ for($i=0; $i < 4; $i++) { $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; + $name[$k] = $gen['name']; + $nation[$k] = $nationName[$gen['nation']]; + $color[$k] = $nationColor[$gen['nation']]; + $pic[$k] = $gen['picture']; if($color[$k] == "") $color[$k] = $_basecolor4; if($nation[$k] == "") $nation[$k] = " "; if($pic[$k] == "") { echo " "; } else { - $imageTemp = GetImageURL($gen[imgsvr]); + $imageTemp = GetImageURL($gen['imgsvr']); echo ""; } } @@ -238,16 +238,16 @@ for($i=0; $i < 4; $i++) { $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; + $name[$k] = $gen['name']; + $nation[$k] = $nationName[$gen['nation']]; + $color[$k] = $nationColor[$gen['nation']]; + $pic[$k] = $gen['picture']; if($color[$k] == "") $color[$k] = $_basecolor4; if($nation[$k] == "") $nation[$k] = " "; if($pic[$k] == "") { echo " "; } else { - $imageTemp = GetImageURL($gen[imgsvr]); + $imageTemp = GetImageURL($gen['imgsvr']); echo ""; } } diff --git a/twe/a_emperior.php b/twe/a_emperior.php index 6159ac2e..fb37e672 100644 --- a/twe/a_emperior.php +++ b/twe/a_emperior.php @@ -36,35 +36,35 @@ if($select == 0) { - - + - + - + - + - + - + - + - +
- $emperior[phase] + $emperior['phase'] - +
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) + + $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月)
국 력$emperior[power]$emperior['power'] 장 수$emperior[gennum]$emperior['gennum'] 속 령$emperior[citynum]$emperior['citynum'] 성 향$emperior[type]$emperior['type']
황 제$emperior[l12name]$emperior['l12name'] 승 상$emperior[l11name]$emperior['l11name'] 위 장 군$emperior[l10name]$emperior['l10name'] 사 공$emperior[l9name]$emperior['l9name']
"; @@ -74,115 +74,115 @@ if($select == 0) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $emperior = MYDB_fetch_array($result); -//background={$image}/{$emperior[l12pic]} +//background={$image}/{$emperior['l12pic']} echo " - + - + - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
- $emperior[phase] + $emperior['phase']
국 가 수
(최종 / 최대)
$emperior[nation_count]$emperior['nation_count'] 장 수 수
(최종 / 최대)
$emperior[gen_count]$emperior['gen_count']
등 장 국 가$emperior[nation_name]$emperior['nation_name']
국가별 성향$emperior[nation_hist]$emperior['nation_hist']
장 수 성 격$emperior[personal_hist]$emperior['personal_hist']
장 수 특 기$emperior[special_hist]$emperior['special_hist']
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) + + $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月)
국 력$emperior[power]$emperior['power'] 성 향$emperior[type]$emperior['type']
장 수$emperior[gennum]$emperior['gennum'] 속 령$emperior[citynum]$emperior['citynum']
총 인 구$emperior[pop]$emperior['pop'] 인 구 율$emperior[poprate]$emperior['poprate']
국 고$emperior[gold]$emperior['gold'] 병 량$emperior[rice]$emperior['rice']
황 제  $emperior[l12name]$emperior['l12name'] 승 상  $emperior[l11name]$emperior['l11name']
위 장 군  $emperior[l10name]$emperior['l10name'] 사 공  $emperior[l9name]$emperior['l9name']
표 기 장 군  $emperior[l8name]$emperior['l8name'] 태 위  $emperior[l7name]$emperior['l7name']
거 기 장 군  $emperior[l6name]$emperior['l6name'] 사 도  $emperior[l5name]$emperior['l5name']
오 호 장 군$emperior[tiger]$emperior['tiger']
건 안 칠 자$emperior[eagle]$emperior['eagle']
장 수 들
(공헌도 순서)
$emperior[gen]$emperior['gen']
역 사 기 록".ConvertLog($emperior[history], 1)."".ConvertLog($emperior['history'], 1)."
"; diff --git a/twe/a_emperior2.php b/twe/a_emperior2.php index c3d9e8c5..08ca3b38 100644 --- a/twe/a_emperior2.php +++ b/twe/a_emperior2.php @@ -36,35 +36,35 @@ if($select == 0) { - - + - + - + - + - + - + - + - +
- $emperior[phase] + $emperior['phase'] - +
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) + + $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月)
국 력$emperior[power]$emperior['power'] 장 수$emperior[gennum]$emperior['gennum'] 속 령$emperior[citynum]$emperior['citynum'] 성 향$emperior[type]$emperior['type']
황 제$emperior[l12name]$emperior['l12name'] 승 상$emperior[l11name]$emperior['l11name'] 위 장 군$emperior[l10name]$emperior['l10name'] 사 공$emperior[l9name]$emperior['l9name']
"; @@ -74,116 +74,116 @@ if($select == 0) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $emperior = MYDB_fetch_array($result); -//background={$image}/{$emperior[l12pic]} +//background={$image}/{$emperior['l12pic']} echo "
- + - + - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
- $emperior[phase] + $emperior['phase']
국 가 수
(최종 / 최대)
$emperior[nation_count]$emperior['nation_count'] 장 수 수
(최종 / 최대)
$emperior[gen_count]$emperior['gen_count']
등 장 국 가$emperior[nation_name]$emperior['nation_name']
국가별 성향$emperior[nation_hist]$emperior['nation_hist']
장 수 성 격$emperior[personal_hist]$emperior['personal_hist']
장 수 특 기$emperior[special_hist]$emperior['special_hist']
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) + + $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月)
국 력$emperior[power]$emperior['power'] 성 향$emperior[type]$emperior['type']
장 수$emperior[gennum]$emperior['gennum'] 속 령$emperior[citynum]$emperior['citynum']
총 인 구$emperior[pop]$emperior['pop'] 인 구 율$emperior[poprate]$emperior['poprate']
국 고$emperior[gold]$emperior['gold'] 병 량$emperior[rice]$emperior['rice']
황 제  $emperior[l12name]$emperior['l12name'] 승 상  $emperior[l11name]$emperior['l11name']
위 장 군  $emperior[l10name]$emperior['l10name'] 사 공  $emperior[l9name]$emperior['l9name']
표 기 장 군  $emperior[l8name]$emperior['l8name'] 태 위  $emperior[l7name]$emperior['l7name']
거 기 장 군  $emperior[l6name]$emperior['l6name'] 사 도  $emperior[l5name]$emperior['l5name']
오 호 장 군$emperior[tiger]$emperior['tiger']
건 안 칠 자$emperior[eagle]$emperior['eagle']
장 수 들
(공헌도 순서)
$emperior[gen]$emperior['gen']
역 사 기 록".ConvertLog($emperior[history], 1)."".ConvertLog($emperior['history'], 1)."
"; diff --git a/twe/a_genList.php b/twe/a_genList.php index 21c54ed7..8eb94ecc 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -10,12 +10,12 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } if($type == 0) { $type = 9; @@ -65,8 +65,8 @@ $count = MYDB_num_rows($result); $nationname[0] = "-"; for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $nationname[$nation[nation]] = $nation[name]; - $nationlevel[$nation[nation]] = $nation[level]; + $nationname[$nation['nation']] = $nation['name']; + $nationlevel[$nation['nation']] = $nation['level']; } switch($type) { @@ -111,12 +111,12 @@ echo" "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $nation = $nationname[$general[nation]]; + $nation = $nationname[$general['nation']]; - if($general[level] == 12) { - $lbonus = $nationlevel[$general[nation]] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nationlevel[$general[nation]]; + if($general['level'] == 12) { + $lbonus = $nationlevel[$general['nation']] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nationlevel[$general['nation']]; } else { $lbonus = 0; } @@ -126,43 +126,43 @@ for($j=0; $j < $gencount; $j++) { $lbonus = ""; } - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); + if($general['injury'] > 0) { + $leader = floor($general['leader'] * (100 - $general['injury'])/100); + $power = floor($general['power'] * (100 - $general['injury'])/100); + $intel = floor($general['intel'] * (100 - $general['injury'])/100); $leader = "{$leader}{$lbonus}"; $power = "{$power}"; $intel = "{$intel}"; } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; + $leader = "{$general['leader']}{$lbonus}"; + $power = "{$general['power']}"; + $intel = "{$general['intel']}"; } - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } + if($general['npc'] >= 2) { $name = "$general['name']"; } + elseif($general['npc'] == 1) { $name = "$general['name']"; } + else { $name = "$general['name']"; } - $general[connect] = round($general[connect] / 10, 0) * 10; + $general['connect'] = round($general['connect'] / 10, 0) * 10; - $imageTemp = GetImageURL($general[imgsvr]); + $imageTemp = GetImageURL($general['imgsvr']); echo " - + $name - $general[age]세 - ".getGenChar($general[personal])." - ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." - Lv ".getExpLevel($general[experience])." + $general['age']세 + ".getGenChar($general['personal'])." + ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])." + Lv ".getExpLevel($general['experience'])." {$nation} - ".getHonor($general[experience])." - ".getDed($general[dedication])." - "; echo getLevel($general[level]); echo " + ".getHonor($general['experience'])." + ".getDed($general['dedication'])." + "; echo getLevel($general['level']); echo " $leader $power $intel - $general[killturn] - $general[connect]"; echo "
【".getConnect($general[connect])."】 + $general['killturn'] + $general['connect']"; echo "
【".getConnect($general['connect'])."】 "; } echo " diff --git a/twe/a_hallOfFame.php b/twe/a_hallOfFame.php index 3eecaadd..af1b6d89 100644 --- a/twe/a_hallOfFame.php +++ b/twe/a_hallOfFame.php @@ -53,18 +53,18 @@ for($i=0; $i < 21; $i++) { for($k=0; $k < 10; $k++) { $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $gen[nation]; - $data[$k] = $gen[data]; - $color[$k] = $gen[color]; - $pic[$k] = $gen[picture]; + $name[$k] = $gen['name']; + $nation[$k] = $gen['nation']; + $data[$k] = $gen['data']; + $color[$k] = $gen['color']; + $pic[$k] = $gen['picture']; if($color[$k] == "") $color[$k] = $_basecolor4; if($nation[$k] == "") $nation[$k] = " "; /* if($pic[$k] == "") { echo " "; } else { - $imageTemp = GetImageURL($gen[imgsvr]); + $imageTemp = GetImageURL($gen['imgsvr']); echo ""; } */ diff --git a/twe/a_history.php b/twe/a_history.php index 83cfe509..d3fb554b 100644 --- a/twe/a_history.php +++ b/twe/a_history.php @@ -12,22 +12,22 @@ $query = "select startyear,year,month,conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } $query = "select year,month from history order by no limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $history = MYDB_fetch_array($result); -$s = ($history[year]*12) + $history[month]; +$s = ($history['year']*12) + $history['month']; $query = "select year,month from history order by no desc limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $history = MYDB_fetch_array($result); -$e = ($history[year]*12) + $history[month]; +$e = ($history['year']*12) + $history['month']; if(!$yearmonth) { $year = $admin['year']; @@ -54,7 +54,7 @@ if($month <= 0) { $month += 12; } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index 108b78cf..d6d10bbb 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -10,12 +10,12 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } ?> @@ -38,140 +38,140 @@ $count = MYDB_num_rows($result); for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); //국가정보 - $query = "select city,name from city where nation='$nation[nation]'"; // 도시 이름 목록 + $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); - $query = "select npc,name,city from general where nation='$nation[nation]' and level='12'"; + $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); - $query = "select npc,name from general where nation='$nation[nation]' and level='11'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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"; // 장수 목록 + $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 = "$level12[name]"; } - elseif($level12[npc] == 1) { $l12 = "$level12[name]"; } - else { $l12 = $level12[name]; } + if($level12['name'] == "") { $l12 = "-"; } + elseif($level12['npc'] >= 2) { $l12 = "$level12['name']"; } + elseif($level12['npc'] == 1) { $l12 = "$level12['name']"; } + else { $l12 = $level12['name']; } - if($level11[name] == "") { $l11 = "-"; } - elseif($level11[npc] >= 2) { $l11 = "$level11[name]"; } - elseif($level11[npc] == 1) { $l11 = "$level11[name]"; } - else { $l11 = $level11[name]; } + if($level11['name'] == "") { $l11 = "-"; } + elseif($level11['npc'] >= 2) { $l11 = "$level11['name']"; } + elseif($level11['npc'] == 1) { $l11 = "$level11['name']"; } + else { $l11 = $level11['name']; } - if($level10[name] == "") { $l10 = "-"; } - elseif($level10[npc] >= 2) { $l10 = "$level10[name]"; } - elseif($level10[npc] == 1) { $l10 = "$level10[name]"; } - else { $l10 = $level10[name]; } + if($level10['name'] == "") { $l10 = "-"; } + elseif($level10['npc'] >= 2) { $l10 = "$level10['name']"; } + elseif($level10['npc'] == 1) { $l10 = "$level10['name']"; } + else { $l10 = $level10['name']; } - if($level9[name] == "") { $l9 = "-"; } - elseif($level9[npc] >= 2) { $l9 = "$level9[name]"; } - elseif($level9[npc] == 1) { $l9 = "$level9[name]"; } - else { $l9 = $level9[name]; } + if($level9['name'] == "") { $l9 = "-"; } + elseif($level9['npc'] >= 2) { $l9 = "$level9['name']"; } + elseif($level9['npc'] == 1) { $l9 = "$level9['name']"; } + else { $l9 = $level9['name']; } - if($level8[name] == "") { $l8 = "-"; } - elseif($level8[npc] >= 2) { $l8 = "$level8[name]"; } - elseif($level8[npc] == 1) { $l8 = "$level8[name]"; } - else { $l8 = $level8[name]; } + if($level8['name'] == "") { $l8 = "-"; } + elseif($level8['npc'] >= 2) { $l8 = "$level8['name']"; } + elseif($level8['npc'] == 1) { $l8 = "$level8['name']"; } + else { $l8 = $level8['name']; } - if($level7[name] == "") { $l7 = "-"; } - elseif($level7[npc] >= 2) { $l7 = "$level7[name]"; } - elseif($level7[npc] == 1) { $l7 = "$level7[name]"; } - else { $l7 = $level7[name]; } + if($level7['name'] == "") { $l7 = "-"; } + elseif($level7['npc'] >= 2) { $l7 = "$level7['name']"; } + elseif($level7['npc'] == 1) { $l7 = "$level7['name']"; } + else { $l7 = $level7['name']; } - if($level6[name] == "") { $l6 = "-"; } - elseif($level6[npc] >= 2) { $l6 = "$level6[name]"; } - elseif($level6[npc] == 1) { $l6 = "$level6[name]"; } - else { $l6 = $level6[name]; } + if($level6['name'] == "") { $l6 = "-"; } + elseif($level6['npc'] >= 2) { $l6 = "$level6['name']"; } + elseif($level6['npc'] == 1) { $l6 = "$level6['name']"; } + else { $l6 = $level6['name']; } - if($level5[name] == "") { $l5 = "-"; } - elseif($level5[npc] >= 2) { $l5 = "$level5[name]"; } - elseif($level5[npc] == 1) { $l5 = "$level5[name]"; } - else { $l5 = $level5[name]; } + if($level5['name'] == "") { $l5 = "-"; } + elseif($level5['npc'] >= 2) { $l5 = "$level5['name']"; } + elseif($level5['npc'] == 1) { $l5 = "$level5['name']"; } + else { $l5 = $level5['name']; } echo " - + - + - + - + - + - + - + - + - + - + - + - + @@ -180,9 +180,9 @@ for($i=1; $i <= $count; $i++) { @@ -216,7 +216,7 @@ echo " @@ -225,9 +225,9 @@ echo" diff --git a/twe/a_npcList.php b/twe/a_npcList.php index 2a94a39d..a308d02e 100644 --- a/twe/a_npcList.php +++ b/twe/a_npcList.php @@ -44,7 +44,7 @@ $count = MYDB_num_rows($result); $nationname[0] = "-"; for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $nationname[$nation[nation]] = $nation[name]; + $nationname[$nation['nation']] = $nation['name']; } switch($type) { @@ -78,26 +78,26 @@ echo" "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $nation = $nationname[$general[nation]]; + $nation = $nationname[$general['nation']]; - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } + if($general['npc'] >= 2) { $name = "$general['name']"; } + elseif($general['npc'] == 1) { $name = "$general['name']"; } + else { $name = "$general['name']"; } echo " - + - - - - - - - - + + + + + + + + "; } echo " diff --git a/twe/a_status.php b/twe/a_status.php index c9dafa4c..04a372c3 100644 --- a/twe/a_status.php +++ b/twe/a_status.php @@ -11,12 +11,12 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } ?> @@ -34,16 +34,16 @@ if($con >= 2) { printLimitMsg($me[turntime]); exit(); }
【 {$nation[name]} 】【 {$nation['name']} 】
성 향".getNationType($nation[type])."".getNationType($nation['type'])." 작 위".getNationLevel($nation[level])."".getNationLevel($nation['level'])." 국 력{$nation[power]}{$nation['power']} 장수 / 속령 {$gencount} / {$citycount}
".getLevel(12, $nation[level])."".getLevel(12, $nation['level'])." $l12".getLevel(11, $nation[level])."".getLevel(11, $nation['level'])." $l11".getLevel(10, $nation[level])."".getLevel(10, $nation['level'])." $l10".getLevel( 9, $nation[level])."".getLevel( 9, $nation['level'])." $l9
".getLevel( 8, $nation[level])."".getLevel( 8, $nation['level'])." $l8".getLevel( 7, $nation[level])."".getLevel( 7, $nation['level'])." $l7".getLevel( 6, $nation[level])."".getLevel( 6, $nation['level'])." $l6".getLevel( 5, $nation[level])."".getLevel( 5, $nation['level'])." $l5
"; - if($nation[level] > 0) { + if($nation['level'] > 0) { echo "속령 일람 : "; for($j=0; $j < $citycount; $j++) { $city = MYDB_fetch_array($cityresult); - if($city[city] == $nation[capital]) { - echo "[{$city[name]}], "; + if($city['city'] == $nation['capital']) { + echo "[{$city['name']}], "; } else { - echo "$city[name], "; + echo "$city['name'], "; } } } else { - $query = "select name from city where city='$level12[city]'"; // 군주 위치 도시 이름 + $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 "현재 위치 : $city[name]"; + echo "현재 위치 : $city['name']"; } echo" 장수 일람 : "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "$general[name], "; } - elseif($general[npc] == 1) { echo "$general[name], "; } - else { echo "$general[name], "; } + if($general['npc'] >= 2) { echo "$general['name'], "; } + elseif($general['npc'] == 1) { echo "$general['name'], "; } + else { echo "$general['name'], "; } } echo" 속령 일람 : "; for($j=0; $j < $citycount; $j++) { $city = MYDB_fetch_array($cityresult); - echo "$city[name], "; + echo "$city['name'], "; } echo" 장수 일람 : "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "$general[name], "; } - elseif($general[npc] == 1) { echo "$general[name], "; } - else { echo "$general[name], "; } + if($general['npc'] >= 2) { echo "$general['name'], "; } + elseif($general['npc'] == 1) { echo "$general['name'], "; } + else { echo "$general['name'], "; } } echo"
{$name} {$general[name2]}Lv {$general[explevel]}Lv {$general['explevel']} {$nation}".getGenChar($general[personal])."".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])."$general[sum]$general[leader]$general[power]$general[intel]{$general[experience]}{$general[dedication]}".getGenChar($general['personal'])."".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])."$general['sum']$general['leader']$general['power']$general['intel']{$general['experience']}{$general['dedication']}
- + -
- +
diff --git a/twe/a_traffic.php b/twe/a_traffic.php index ac80e299..efa0a8ef 100644 --- a/twe/a_traffic.php +++ b/twe/a_traffic.php @@ -26,10 +26,10 @@ for($i=0; $i < 11; $i++) { $refresh[$i] = trim($parse[3]); $online[$i] = trim($parse[4]); } -if($game[maxrefresh] == 0) { $game[maxrefresh] = 1; } -if($game[maxrefresh] < $game[refresh]) { $game[maxrefresh] = $game[refresh]; } -if($game[maxonline] == 0) { $game[maxonline] = 1; } -if($game[maxonline] < $curonline) { $game[maxonline] = $curonline; } +if($game['maxrefresh'] == 0) { $game['maxrefresh'] = 1; } +if($game['maxrefresh'] < $game['refresh']) { $game['maxrefresh'] = $game['refresh']; } +if($game['maxonline'] == 0) { $game['maxonline'] = 1; } +if($game['maxonline'] < $curonline) { $game['maxonline'] = $curonline; } ?> @@ -49,7 +49,7 @@ if($game[maxonline] < $curonline) { $game[maxonline] = $curonline; } 접 속 량 = 100) { $w -= 0.1; } if($refresh[$i] < 10 && $w < 3) { $w = 3; } elseif($refresh[$i] < 100 && $w < 6) { $w = 6; } @@ -73,23 +73,23 @@ for($i=0; $i < 11; $i++) { "; } -$w = round($game[refresh] / $game[maxrefresh] * 100, 1); +$w = round($game['refresh'] / $game['maxrefresh'] * 100, 1); if($w >= 100) { $w -= 0.1; } -if($game[refresh] < 10 && $w < 3) { $w = 3; } -elseif($game[refresh] < 100 && $w < 6) { $w = 6; } -elseif($game[refresh] < 1000 && $w < 9) { $w = 9; } +if($game['refresh'] < 10 && $w < 3) { $w = 3; } +elseif($game['refresh'] < 100 && $w < 6) { $w = 6; } +elseif($game['refresh'] < 1000 && $w < 9) { $w = 9; } $w2 = round(100 - $w, 1); $color = getColor($w); $dt = date('H:i'); echo " - {$game[year]}년 {$game[month]}월 + {$game['year']}년 {$game['month']}월 {$dt} - +
{$game[refresh]} {$game['refresh']}   
@@ -97,7 +97,7 @@ echo " - 최고기록: {$game[maxrefresh]} + 최고기록: {$game['maxrefresh']} "; ?> @@ -108,7 +108,7 @@ echo " 접 속 자 = 100) { $w -= 0.1; } if($online[$i] < 10 && $w < 3) { $w = 3; } elseif($online[$i] < 100 && $w < 6) { $w = 6; } @@ -132,7 +132,7 @@ for($i=0; $i < 11; $i++) { "; } -$w = round($curonline / $game[maxonline] * 100, 1); +$w = round($curonline / $game['maxonline'] * 100, 1); if($w >= 100) { $w -= 0.1; } if($curonline < 10 && $w < 3) { $w = 3; } elseif($curonline < 100 && $w < 6) { $w = 6; } @@ -142,7 +142,7 @@ $color = getColor($w); $dt = date('H:i'); echo " - {$game[year]}년 {$game[month]}월 + {$game['year']}년 {$game['month']}월 {$dt} @@ -156,7 +156,7 @@ echo " - 최고기록: {$game[maxonline]} + 최고기록: {$game['maxonline']} "; ?> @@ -170,8 +170,8 @@ echo " $query = "select sum(refresh) as refresh,sum(connect) as connect from general"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $user = MYDB_fetch_array($result); -$user[connect] = round($user[connect], 1); -$maxrefresh = $user[refresh]; +$user['connect'] = round($user['connect'], 1); +$maxrefresh = $user['refresh']; $w = round($maxrefresh / $maxrefresh * 100, 1); $w2 = round(100 - $w, 1); @@ -184,7 +184,7 @@ echo " 접속자 총합 - {$user[connect]}({$maxrefresh}) + {$user['connect']}({$maxrefresh}) @@ -202,13 +202,13 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $user = MYDB_fetch_array($result); - $w = round($user[refresh] / $maxrefresh * 100, 1); + $w = round($user['refresh'] / $maxrefresh * 100, 1); $w2 = round(100 - $w, 1); $color = getColor($w); echo " - - + + - - - - + + + + "; @@ -146,10 +146,10 @@ for($k=0; $k < 2; $k++) { "; - 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($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 " - - + + - "; + "; //아국장수이거나 보는 사람이 운영자일때 보여줌 - if(($general[nation] != 0 && $general[nation] == $myNation[nation]) || $me[userlevel] >= 5) { - switch($general[mode]) { + if(($general['nation'] != 0 && $general['nation'] == $myNation['nation']) || $me['userlevel'] >= 5) { + switch($general['mode']) { case 0: $mode = "×"; break; case 1: $mode = "○"; break; case 2: $mode = "◎"; break; @@ -296,11 +296,11 @@ for($j=0; $j < $gencount; $j++) { echo " - - - - "; - if($general[npc] >= 2) { + + + + "; + if($general['npc'] >= 2) { echo " - + - - + - - - + + + @@ -90,18 +90,18 @@ for($i=0; $i < $nationcount; $i++) { continue; } - $query = "select state,term,fixed,reserved,showing from diplomacy where me='$me[nation]' and you='$nation[nation]'"; + $query = "select state,term,fixed,reserved,showing from diplomacy where me='$me['nation']' and you='$nation['nation']'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result2); - $query = "select reserved,showing from diplomacy where you='$me[nation]' and me='$nation[nation]'"; + $query = "select reserved,showing from diplomacy where you='$me['nation']' and me='$nation['nation']'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip2 = MYDB_fetch_array($result2); //속령수 - $query = "select city from city where nation='$nation[nation]'"; + $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]) { + switch($dip['state']) { case 0: $state = "교 전"; break; case 1: $state = "선포중"; break; case 2: $state = "통 상"; break; @@ -112,7 +112,7 @@ for($i=0; $i < $nationcount; $i++) { case 7: $state = "불가침"; break; } - $term = $admin[year] * 12 + $admin[month] + $dip[term]; + $term = $admin['year'] * 12 + $admin['month'] + $dip['term']; $year = floor($term / 12); $month = $term % 12; @@ -123,41 +123,41 @@ for($i=0; $i < $nationcount; $i++) { $date = date('Y-m-d H:i:s'); $note = ""; - if($dip[fixed] != "") { - if($dip[state] == 7) { - $note .= $dip[fixed]; + if($dip['fixed'] != "") { + if($dip['state'] == 7) { + $note .= $dip['fixed']; } else { - $note .= "{$dip[fixed]}"; + $note .= "{$dip['fixed']}"; } - if($dip[reserved] != "" || $dip2[reserved] != "") { + if($dip['reserved'] != "" || $dip2['reserved'] != "") { $note .= "
"; } } - if($dip[showing] >= $date) { - if($dip[reserved] != "") { - $note .= "아국측 제의: ".$dip[reserved]; - if($dip2[reserved] != "") { + if($dip['showing'] >= $date) { + if($dip['reserved'] != "") { + $note .= "아국측 제의: ".$dip['reserved']; + if($dip2['reserved'] != "") { $note .= "
"; } } } - if($dip2[showing] >= $date) { - if($dip2[reserved] != "") { - $note .= "상대측 제의: ".$dip2[reserved]; + if($dip2['showing'] >= $date) { + if($dip2['reserved'] != "") { + $note .= "상대측 제의: ".$dip2['reserved']; } } if($note == "") { $note = " "; } echo " - - - + + + "; - if($dip[term] != 0) { + if($dip['term'] != 0) { echo" - + "; } else { echo" @@ -172,7 +172,7 @@ echo "
{$user[name]}{$user[connect]}({$user[refresh]}){$user['name']}{$user['connect']}({$user['refresh']}) diff --git a/twe/a_vote.php b/twe/a_vote.php index 9af23490..06d5f565 100644 --- a/twe/a_vote.php +++ b/twe/a_vote.php @@ -4,7 +4,7 @@ include "func.php"; $connect = dbConn(); increaseRefresh($connect, "설문조사", 1); -$query = "select no,userlevel,vote from general where user_id='$_SESSION[p_id]'"; +$query = "select no,userlevel,vote from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -12,7 +12,7 @@ $query = "select develcost,voteopen,vote,votecomment from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$vote = explode("|", $admin[vote]); +$vote = explode("|", $admin['vote']); if($vote[0] == "") { $vote[0] = "-"; } @@ -40,10 +40,10 @@ function captureKey(e) {
- + = 5) { +if($me['userlevel'] >= 5) { echo " @@ -78,11 +78,11 @@ for($i=1; $i < $voteTypeCount; $i++) { "; -if($me[vote] == 0 && $me[no] > 0) { +if($me['vote'] == 0 && $me['no'] > 0) { echo " @@ -118,7 +118,7 @@ echo " "; -if($me[userlevel] >= 5) { +if($me['userlevel'] >= 5) { echo " @@ -128,8 +128,8 @@ if($me[userlevel] >= 5) { "; } -if($admin[votecomment] != "") { - $comment = explode("|", $admin[votecomment]); +if($admin['votecomment'] != "") { + $comment = explode("|", $admin['votecomment']); $commentCount = count($comment); } else { $commentCount = 0; @@ -154,7 +154,7 @@ for($i=0; $i < $commentCount; $i++) { "; } -if($me[no] > 0) { +if($me['no'] > 0) { echo " @@ -170,7 +170,7 @@ if($me[no] > 0) { "; -if($admin[voteopen] >= 1 || $me[userlevel] >= 5) { +if($admin['voteopen'] >= 1 || $me['userlevel'] >= 5) { echo " @@ -199,14 +199,14 @@ if($admin[voteopen] >= 1 || $me[userlevel] >= 5) { for($i=0; $i < $count; $i++) { $vote = MYDB_fetch_array($result); - $totalVote[$vote[vote]]++; - if($vote[vote] > 0) { $nationVoteCount[$vote[nation]]++; } - $nationVote[$vote[nation]][$vote[vote]]++; + $totalVote[$vote['vote']]++; + if($vote['vote'] > 0) { $nationVoteCount[$vote['nation']]++; } + $nationVote[$vote['nation']][$vote['vote']]++; } for($i=0; $i < $voteTypeCount; $i++) { $per = @round($totalVote[$i] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } +// if($per < 5) { $vote['cnt'] = " "; } echo " "; @@ -220,7 +220,7 @@ if($admin[voteopen] >= 1 || $me[userlevel] >= 5) { "; } -if($admin[voteopen] >= 2 || $me[userlevel] >= 5) { +if($admin['voteopen'] >= 2 || $me['userlevel'] >= 5) { $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); @@ -239,7 +239,7 @@ if($admin[voteopen] >= 2 || $me[userlevel] >= 5) { for($i=0; $i < $voteTypeCount; $i++) { $per = @round($nationVote[0][$i] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } +// if($per < 5) { $vote['cnt'] = " "; } echo " "; @@ -258,27 +258,27 @@ if($admin[voteopen] >= 2 || $me[userlevel] >= 5) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationResult); - $query = "select no from general where nation='{$nation[nation]}' and npc<2"; + $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); - if(!$nationVoteCount[$nation[nation]]) { $nationVoteCount[$nation[nation]] = 0; } - $percentage = @round($nationVoteCount[$nation[nation]] / $memCount * 100, 1); + if(!$nationVoteCount[$nation['nation']]) { $nationVoteCount[$nation['nation']] = 0; } + $percentage = @round($nationVoteCount[$nation['nation']] / $memCount * 100, 1); echo " - - + +
설 문 조 사 (금과 추첨으로 유니크템 증정!)
설 문 조 사 (금과 추첨으로 유니크템 증정!)
{$i}. "; - if($me[vote] == 0 && $me[no] > 0) { + if($me['vote'] == 0 && $me['no'] > 0) { echo " "; - } elseif($admin[voteopen] >= 1 || $me[userlevel] >= 5) { + } elseif($admin['voteopen'] >= 1 || $me['userlevel'] >= 5) { $query = "select no from general where vote='{$i}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $vCount = MYDB_num_rows($result); @@ -103,7 +103,7 @@ for($i=1; $i < $voteTypeCount; $i++) { echo "
투표
-
전 체 통 계 = 5) { +if($me['userlevel'] >= 5) { echo " @@ -179,7 +179,7 @@ if($me[userlevel] >= 5) { echo "
전 체{$totalVote[$i]}{$nationVote[0][$i]}
{$nation[name]}{$nationVoteCount[$nation[nation]]} / {$memCount} ({$percentage} %){$nation['name']}{$nationVoteCount[$nation['nation']]} / {$memCount} ({$percentage} %) "; for($k=0; $k < $voteTypeCount; $k++) { - $per = @round($nationVote[$nation[nation]][$k] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } + $per = @round($nationVote[$nation['nation']][$k] / $memCount * 100, 1); +// if($per < 5) { $vote['cnt'] = " "; } echo " - + "; } diff --git a/twe/b_auction.php b/twe/b_auction.php index 57ef9961..6d40d218 100644 --- a/twe/b_auction.php +++ b/twe/b_auction.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "거래장", 2); -$query = "select no,special,skin,userlevel,con,turntime from general where user_id='$_SESSION[p_id]'"; +$query = "select no,special,skin,userlevel,con,turntime from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -14,26 +14,26 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -$query = "select no from auction where no1='$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]'"; +$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($me[userlevel] >= 5 || ($me[special] != 30 && $btCount < 1) || ($me[special] == 30 && $btCount < 3)) { +if($me['userlevel'] >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) { $btn = "submit"; } else { $btn = "hidden"; } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -77,28 +77,28 @@ $count = MYDB_num_rows($result); $chk = 0; for($i=0; $i < $count; $i++) { $auction = MYDB_fetch_array($result); - $itemname = GetStuffName($auction[stuff]); + $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 = ""; $alert2 = ""; } - elseif($auction[no2] > 0 && $auction[topv] <= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + if($auction[no1] == $me['no']) { $radio = " disabled"; } + elseif($auction[no2] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($auction[no2] > 0 && $auction['topv'] <= $auction['value']) { $radio = " disabled"; $alert = ""; $alert2 = ""; } elseif($chk == 0) { $radio = " checked"; $chk = 1; } - $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; + $pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001; $pv = substr($pv, 0, 4); - if($auction[stuff] != 0) { $pv = '-'; } + if($auction['stuff'] != 0) { $pv = '-'; } echo " - - + + - - - - + + + + - + "; } @@ -161,28 +161,28 @@ $count = MYDB_num_rows($result); $chk = 0; for($i=0; $i < $count; $i++) { $auction = MYDB_fetch_array($result); - $itemname = GetStuffName($auction[stuff]); + $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 = ""; $alert2 = ""; } - elseif($auction[no2] > 0 && $auction[topv] >= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + if($auction[no1] == $me['no']) { $radio = " disabled"; } + elseif($auction[no2] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } + elseif($auction[no2] > 0 && $auction['topv'] >= $auction['value']) { $radio = " disabled"; $alert = ""; $alert2 = ""; } elseif($chk == 0) { $radio = " checked"; $chk = 1; } - $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; + $pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001; $pv = substr($pv, 0, 4); - if($auction[stuff] != 0) { $pv = '-'; } + if($auction['stuff'] != 0) { $pv = '-'; } echo " - - + + - - - - + + + + - + "; } @@ -224,7 +224,7 @@ for($i=0; $i < $count; $i++) {
{$nationVote[$nation[nation]][$k]}{$nationVote[$nation['nation']][$k]}
{$auction[no]}{$auction['no']} {$auction[name1]} {$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$auction['amount']}금 {$auction['cost']}{$alert}금 {$auction['value']}{$alert2}{$alert}금 {$auction['topv']}{$alert2} {$alert}{$pv}{$alert2} {$alert}{$auction[name2]}{$alert2}{$auction[expire]}{$auction['expire']}
{$auction[no]}{$auction['no']} {$auction[name1]} {$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$auction['amount']}금 {$auction['cost']}{$alert}금 {$auction['value']}{$alert2}{$alert}금 {$auction['topv']}{$alert2} {$alert}{$pv}{$alert2} {$alert}{$auction[name2]}{$alert2}{$auction[expire]}{$auction['expire']}
@@ -126,10 +126,10 @@ for($i=0; $i < $gencount; $i++) {
최 근 기 록
- +
도 움 말
diff --git a/twe/b_battleCenter.php b/twe/b_battleCenter.php index f61d9645..4ad44de1 100644 --- a/twe/b_battleCenter.php +++ b/twe/b_battleCenter.php @@ -16,26 +16,26 @@ $query = "select nation from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; $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]'"; +$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[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } //재야인 경우 -$meLevel = $me[level]; -if($meLevel == 0 || ($meLevel == 1 && $me[belong] < $nation[secretlimit])) { +$meLevel = $me['level']; +if($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) { echo "수뇌부가 아니거나 사관년도가 부족합니다."; exit(); } //잘못된 접근 -if($general[nation] != $me[nation]) { +if($general['nation'] != $me['nation']) { $gen = 0; } @@ -48,7 +48,7 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -79,10 +79,10 @@ if($me[skin] < 1) {
- + - +
- + - +
diff --git a/twe/b_betting.php b/twe/b_betting.php index 0e4963d9..04ea3512 100644 --- a/twe/b_betting.php +++ b/twe/b_betting.php @@ -7,7 +7,7 @@ $connect = dbConn(); increaseRefresh($connect, "베팅장", 1); checkTurn($connect); -$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION[p_id]'"; +$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -15,17 +15,17 @@ $query = "select conlimit,tournament,phase,tnmt_type,develcost,bet0,bet1,bet2,be $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -switch($admin[tnmt_type]) { +switch($admin['tnmt_type']) { case 0: $tnmt_type = "전력전"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break; case 1: $tnmt_type = "통솔전"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break; case 2: $tnmt_type = "일기토"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break; case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break; } -$str1 = getTournament($admin[tournament]); +$str1 = getTournament($admin['tournament']); $str2 = getTournamentTime($connect); $str3 = getTournamentTerm($connect); @@ -55,7 +55,7 @@ select { font-family:'굴림'; line-height:100%; } - +
()
16강 상황
(전체 금액 : / 내 투자 금액 : )
16강 상황
(전체 금액 : / 내 투자 금액 : )
@@ -65,10 +65,10 @@ $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); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - echo ""; + if($general['name'] == "") { $general['name'] = "-"; } + if($general['npc'] >= 2) { $general['name'] = "".$general['name'].""; } + elseif($general['npc'] == 1) { $general['name'] = "".$general['name'].""; } + echo ""; } echo " @@ -80,12 +80,12 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" for($i=0; $i < 1; $i++) { $cent[$i] = ""; } for($i=0; $i < 2; $i++) { $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + if($general['name'] == "") { $general['name'] = "-"; } + if($general['npc'] >= 2) { $general['name'] = "".$general['name'].""; } + elseif($general['npc'] == 1) { $general['name'] = "".$general['name'].""; } + if($general['win'] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } else { $line[$i] = ""; } - $gen[$i] = $general[name]; + $gen[$i] = $general['name']; } for($i=0; $i < 1; $i++) { $cent[$i] = $cent[$i]."┻".""; @@ -110,12 +110,12 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" for($i=0; $i < 2; $i++) { $cent[$i] = ""; } for($i=0; $i < 4; $i++) { $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + if($general['name'] == "") { $general['name'] = "-"; } + if($general['npc'] >= 2) { $general['name'] = "".$general['name'].""; } + elseif($general['npc'] == 1) { $general['name'] = "".$general['name'].""; } + if($general['win'] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } else { $line[$i] = ""; } - $gen[$i] = $general[name]; + $gen[$i] = $general['name']; } for($i=0; $i < 2; $i++) { $cent[$i] = $cent[$i]."┻".""; @@ -140,12 +140,12 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" for($i=0; $i < 4; $i++) { $cent[$i] = ""; } for($i=0; $i < 8; $i++) { $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + if($general['name'] == "") { $general['name'] = "-"; } + if($general['npc'] >= 2) { $general['name'] = "".$general['name'].""; } + elseif($general['npc'] == 1) { $general['name'] = "".$general['name'].""; } + if($general['win'] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } else { $line[$i] = ""; } - $gen[$i] = $general[name]; + $gen[$i] = $general['name']; } for($i=0; $i < 4; $i++) { $cent[$i] = $cent[$i]."┻".""; @@ -170,12 +170,12 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" for($i=0; $i < 8; $i++) { $cent[$i] = ""; } for($i=0; $i < 16; $i++) { $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } + if($general['name'] == "") { $general['name'] = "-"; } + if($general['npc'] >= 2) { $general['name'] = "".$general['name'].""; } + elseif($general['npc'] == 1) { $general['name'] = "".$general['name'].""; } + if($general['win'] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } else { $line[$i] = ""; } - $gen[$i] = $general[name]; + $gen[$i] = $general['name']; } for($i=0; $i < 8; $i++) { $cent[$i] = $cent[$i]."┻".""; @@ -191,7 +191,7 @@ for($i=0; $i < 16; $i++) { echo ""; } -$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='$_SESSION[p_id]'"; +$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); for($i=0; $i < 16; $i++) { @@ -199,7 +199,7 @@ for($i=0; $i < 16; $i++) { } for($i=0; $i < 16; $i++) { - $bet[$i] = @round($admin[bet] / $admin["bet{$i}"], 2); + $bet[$i] = @round($admin['bet'] / $admin["bet{$i}"], 2); if($bet[$i] == 0) { $bet[$i] = "∞"; } } @@ -245,7 +245,7 @@ echo " "; -if($admin[tournament] == 6) { +if($admin['tournament'] == 6) { echo " "; @@ -311,7 +311,7 @@ for($i=0; $i < 4; $i++) { $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); + printRow($k, $general['npc'], $general['name'], $general[$type4[$i]], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gl'], $general['prize'], 0); } echo "
{$general[name]}{$general['name']}{$gen[$i]}
diff --git a/twe/b_chiefboard.php b/twe/b_chiefboard.php index 9e783b9d..77ff26a8 100644 --- a/twe/b_chiefboard.php +++ b/twe/b_chiefboard.php @@ -6,16 +6,16 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "기밀실", 1); -$query = "select skin,no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[level] < 5) { +if($me['level'] < 5) { echo "수뇌부가 아닙니다."; exit(); } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -45,16 +45,16 @@ if($me[skin] < 1) {

= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { +if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) { echo "수뇌부가 아니거나 사관년도가 부족합니다."; exit(); } -if($me[level] >= 5) { $btn = "submit"; $btn2 = "button"; } +if($me['level'] >= 5) { $btn = "submit"; $btn2 = "button"; } else { $btn = "hidden"; $btn2 = "hidden"; } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -51,15 +51,15 @@ $query = " 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]'"; + 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]); +$lv = getNationChiefLevel($nation['level']); for($i=12; $i >= $lv; $i--) { $turn[$i] = getCoreTurn($connect, $nation, $i); - $query = "select name,turntime,npc from general where level={$i} and nation='$me[nation]'"; + $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); } @@ -87,8 +87,8 @@ function turn(type) {
수뇌부 일정
= $lv; $i--) { $totaldate[$i] = $gen[$i][turntime]; @@ -110,10 +110,10 @@ for($k=0; $k < 2; $k++) { echo "
.".getLevel($l4, $nation[level])." : {$gen[$l4][name]}".getLevel($l3, $nation[level])." : {$gen[$l3][name]}".getLevel($l2, $nation[level])." : {$gen[$l2][name]}".getLevel($l1, $nation[level])." : {$gen[$l1][name]}".getLevel($l4, $nation['level'])." : {$gen[$l4][name]}".getLevel($l3, $nation['level'])." : {$gen[$l3][name]}".getLevel($l2, $nation['level'])." : {$gen[$l2][name]}".getLevel($l1, $nation['level'])." : {$gen[$l1][name]} .
$j
"; diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index 40ab67c5..a764c958 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -6,15 +6,15 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "현재도시", 1); -$query = "select skin,no,nation,userlevel,level,city from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,userlevel,level,city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select nation,level,spy from nation where nation='$me[nation]'"; +$query = "select nation,level,spy from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -39,62 +39,62 @@ if($me[skin] < 1) { 도시선택 : - + - + - + - + - + - + - + - + - + - + - + - + - +
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name]【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 $city['name']
주민$city[pop]/$city[pop2]$city['pop']/$city[pop2] 농업$city[agri]/$city[agri2]$city['agri']/$city[agri2] 상업$city[comm]/$city[comm2]$city['comm']/$city[comm2] 치안$city[secu]/$city[secu2]$city['secu']/$city[secu2] 수비$city[def]/$city[def2]$city['def']/$city[def2] 성벽$city[wall]/$city[wall2]$city['wall']/$city[wall2]
민심$city[rate]$city['rate'] 시세{$city[trade]}%{$city['trade']}% 인구".round($city[pop]/$city[pop2]*100, 2)." %".round($city['pop']/$city[pop2]*100, 2)." % 태수";echo $gen1[name]==''?"-":"$gen1[name]";echo "";echo $gen1['name']==''?"-":"$gen1['name']";echo " 군사";echo $gen2[name]==''?"-":"$gen2[name]";echo "";echo $gen2['name']==''?"-":"$gen2['name']";echo " 시중";echo $gen3[name]==''?"-":"$gen3[name]";echo "";echo $gen3['name']==''?"-":"$gen3['name']";echo "
장수 "; - $query = "select name from general where city='$city[city]' and nation='$city[nation]'"; // 장수 목록 + $query = "select name from general where city='$city['city']' and nation='$city['nation']'"; // 장수 목록 $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); if($gencount == 0) echo "-"; for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($genresult); - echo "$general[name], "; + echo "$general['name'], "; } echo "
"; -$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 from general where city='$city[city]' order by dedication desc"; // 장수 목록 +$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 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); @@ -222,8 +222,8 @@ $nationcount = MYDB_num_rows($nationresult); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $nationname[$nation[nation]] = $nation[name]; - $nationlevel[$nation[nation]] = $nation[level]; + $nationname[$nation['nation']] = $nation['name']; + $nationlevel[$nation['nation']] = $nation['level']; } if($gencount != 0) { @@ -249,10 +249,10 @@ if($gencount != 0) { for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if($general[level] == 12) { - $lbonus = $nationlevel[$general[nation]] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nationlevel[$general[nation]]; + if($general['level'] == 12) { + $lbonus = $nationlevel[$general['nation']] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nationlevel[$general['nation']]; } else { $lbonus = 0; } @@ -262,33 +262,33 @@ for($j=0; $j < $gencount; $j++) { $lbonus = ""; } - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); + if($general['injury'] > 0) { + $leader = floor($general['leader'] * (100 - $general['injury'])/100); + $power = floor($general['power'] * (100 - $general['injury'])/100); + $intel = floor($general['intel'] * (100 - $general['injury'])/100); $leader = "{$leader}{$lbonus}"; $power = "{$power}"; $intel = "{$intel}"; } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; + $leader = "{$general['leader']}{$lbonus}"; + $power = "{$general['power']}"; + $intel = "{$general['intel']}"; } - if($general[npc] >= 2) { $general[name] = "{$general[name]}"; } - elseif($general[npc] == 1) { $general[name] = "{$general[name]}"; } - $imageTemp = GetImageURL($general[imgsvr]); + if($general['npc'] >= 2) { $general['name'] = "{$general['name']}"; } + elseif($general['npc'] == 1) { $general['name'] = "{$general['name']}"; } + $imageTemp = GetImageURL($general['imgsvr']); echo "
$general[name]$general['name'] $leader $power $intel".getLevel($general[level])."".getLevel($general['level'])."$mode".getTypename($general[crewtype])."$general[crew]$general[train]$general[atmos]".getTypename($general['crewtype'])."$general['crew']$general['train']$general['atmos']NPC 장수"; } else { @@ -317,19 +317,19 @@ for($j=0; $j < $gencount; $j++) { echo " "; } - } elseif($general[nation] != 0) { + } elseif($general['nation'] != 0) { echo " ? ?$general[crew]$general['crew'] ? ?【{$nationname[$general[nation]]}】 장수"; + 【{$nationname[$general['nation']]}】 장수"; } else { echo " ? ?$general[crew]$general['crew'] ? ?   재 야"; diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 4b08eeb7..c32cd080 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -10,26 +10,26 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; $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]'"; +$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[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { +if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) { echo "수뇌부가 아니거나 사관년도가 부족합니다."; exit(); } -if($me[level] >= 5) { $btn = "submit"; $read = ""; } +if($me['level'] >= 5) { $btn = "submit"; $read = ""; } else { $btn = "hidden"; $read = "readonly"; } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -70,16 +70,16 @@ for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); // 아국표시 - if($nation[nation] == $me[nation]) { + if($nation['nation'] == $me['nation']) { //속령수 - $query = "select city from city where nation='$nation[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 "
$nation[name]$nation[power]$nation[gennum]$nation['name']$nation['power']$nation['gennum'] $citycount - -
$nation[name]$nation[power]$nation[gennum]$nation['name']$nation['power']$nation['gennum'] $citycount $state$dip[term] 개월$dip['term'] 개월 {$year}年 {$month}月
"; -$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me[nation]'"; +$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -180,18 +180,18 @@ $query = "select gold_rate,rice_rate from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); // 금 수지 -$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); +$deadIncome = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin['gold_rate']); -$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); +$goldincomeList = getGoldIncome($connect, $nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']); $goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; -$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); -$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); +$goldoutcome = getGoldOutcome($connect, $nation['nation'], $nation['bill']); +$riceincomeList = getRiceIncome($connect, $nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']); $riceincome = $riceincomeList[0] + $riceincomeList[1]; -$riceoutcome = getRiceOutcome($connect, $nation[nation], $nation[bill]); +$riceoutcome = getRiceOutcome($connect, $nation['nation'], $nation['bill']); -$budgetgold = $nation[gold] + $goldincome - $goldoutcome + $deadIncome; -$budgetrice = $nation[rice] + $riceincome - $riceoutcome; +$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome; +$budgetrice = $nation['rice'] + $riceincome - $riceoutcome; $budgetgolddiff = $goldincome - $goldoutcome + $deadIncome; $budgetricediff = $riceincome - $riceoutcome; if($budgetgolddiff > 0) { $budgetgolddiff = "+{$budgetgolddiff}"; } @@ -204,8 +204,8 @@ else { $budgetricediff = "$budgetricediff"; } 국 가 방 침 & 임관 권유 메세지 - 국가 방침 maxlength=500 style=color:white;background-color:black;width:830; name=msg value=''> name=btn value=국가방침> - 임관 권유 maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value=''> name=btn value=임관권유> + 국가 방침 maxlength=500 style=color:white;background-color:black;width:830; name=msg value=''> name=btn value=국가방침> + 임관 권유 maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value=''> name=btn value=임관권유> 900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다. 예 산 & 정 책 @@ -220,9 +220,9 @@ echo " 현 재    - $nation[gold] + $nation['gold'] 현 재    - $nation[rice] + $nation['rice'] 단기수입    @@ -251,21 +251,21 @@ echo " ?> 세율 (5 ~ 30%)    - name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율> + name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율> 봉급 지급율 (20 ~ 200%)    - name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급율> + name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급율> 기밀 권한 (1 ~ 99년)    - name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한> + name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한> 임관&전쟁 변경 가능 - 회 + 0) { - if($nation[scout] == 0) { +if($nation['myset'] > 0) { + if($nation['scout'] == 0) { echo " "; } else { @@ -273,7 +273,7 @@ if($nation[myset] > 0) { "; } - if($nation[war] == 0) { + if($nation['war'] == 0) { echo " "; } else { diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 6d134326..c9725a09 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -10,7 +10,7 @@ $query = "select turnterm from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,nation,skin,map,userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,skin,map,userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -22,21 +22,21 @@ $nationStr = ""; for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation[nation]'"; + $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[count($nationnum)] = $nation[nation]; - $nationname[$nation[nation]] = $nation[name]; - $nationcolor[$nation[nation]] = $nation[color]; + $nationnum[count($nationnum)] = $nation['nation']; + $nationname[$nation['nation']] = $nation['name']; + $nationcolor[$nation['nation']] = $nation['color']; - $nationStr .= " $nation[name]
"; - $powerStr .= "국력 $nation[power]
"; - $genStr .= "장수 $nation[gennum]
"; + $nationStr .= " $nation['name']
"; + $powerStr .= "국력 $nation['power']
"; + $genStr .= "장수 $nation['gennum']
"; $cityStr .= "속령 $citycount
"; } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -79,7 +79,7 @@ for($i=0; $i < $nationcount; $i++) { $nationcount2 = MYDB_num_rows($dipresult); for($k=0; $k < $nationcount2; $k++) { $dip = MYDB_fetch_array($dipresult); - $state[$dip[you]] = $dip[state]; + $state[$dip['you']] = $dip['state']; } echo " @@ -93,7 +93,7 @@ for($i=0; $i < $nationcount; $i++) { case 0: $str = ""; break; case 1: $str = ""; break; case 2: - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "ㆍ"; } + if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $me['userlevel'] >= 4) { $str = "ㆍ"; } else { $str = "?"; } // $str = "ㆍ"; break; @@ -102,14 +102,14 @@ for($i=0; $i < $nationcount; $i++) { case 5: $str = ""; break; case 6: $str = ""; break; case 7: - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "@"; } + if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation'] || $me['userlevel'] >= 4) { $str = "@"; } else { $str = "?"; } // $str = "@"; break; } } - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation]) { $backcolor = "style=background-color:$_basecolor3;"; } + if($nationnum[$i] == $me['nation'] || $nationnum[$k] == $me['nation']) { $backcolor = "style=background-color:$_basecolor3;"; } else { $backcolor = ""; } echo " @@ -137,8 +137,8 @@ if($citycount != 0) { for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($result); - if($city[conflict] != "") { - $nation = explode("|", $city[conflict]); + if($city['conflict'] != "") { + $nation = explode("|", $city['conflict']); $killnum = explode("|", $city[conflict2]); $seq = mySort($killnum); // 큰 순서대로 순서를 구한다. @@ -149,7 +149,7 @@ for($i=0; $i < $citycount; $i++) { } echo " - $city[name] + $city['name'] "; for($k=0; $k < count($nation); $k++) { $per = 100*$killnum[$seq[$k]] / $sum; @@ -201,7 +201,7 @@ echo " - $nationStr diff --git a/twe/b_genList.php b/twe/b_genList.php index afe6f440..aca8e6ce 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -10,18 +10,18 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select level,secretlimit from nation where nation='$me[nation]'"; +$query = "select level,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[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { +if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) { echo "수뇌부가 아니거나 사관년도가 부족합니다."; exit(); } @@ -31,7 +31,7 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -63,26 +63,26 @@ if($me[skin] < 1) { "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $city = $cityname[$general[city]]; - $troop = $troopName[$general[troop]] == "" ? "-" : $troopName[$general[troop]]; + $city = $cityname[$general['city']]; + $troop = $troopName[$general['troop']] == "" ? "-" : $troopName[$general['troop']]; - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } @@ -123,24 +123,24 @@ for($j=0; $j < $gencount; $j++) { $lbonus = ""; } - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); + if($general['injury'] > 0) { + $leader = floor($general['leader'] * (100 - $general['injury'])/100); + $power = floor($general['power'] * (100 - $general['injury'])/100); + $intel = floor($general['intel'] * (100 - $general['injury'])/100); $leader = "{$leader}{$lbonus}"; $power = "{$power}"; $intel = "{$intel}"; } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; + $leader = "{$general['leader']}{$lbonus}"; + $power = "{$general['power']}"; + $intel = "{$general['intel']}"; } - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } + if($general['npc'] >= 2) { $name = "$general['name']"; } + elseif($general['npc'] == 1) { $name = "$general['name']"; } + else { $name = "$general['name']"; } - switch($general[mode]) { + switch($general['mode']) { case 0: $mode = "×"; break; case 1: $mode = "○"; break; case 2: $mode = "◎"; break; @@ -148,18 +148,18 @@ for($j=0; $j < $gencount; $j++) { echo " - $name
Lv ".getExpLevel($general[experience])." + $name
Lv ".getExpLevel($general['experience'])." {$leader}∥{$power}∥{$intel} $troop - $general[gold] - $general[rice] + $general['gold'] + $general['rice'] $city $mode - ".getTypename($general[crewtype])." - $general[crew] - $general[train] - $general[atmos]"; - if($general[npc] >= 2) { + ".getTypename($general['crewtype'])." + $general['crew'] + $general['train'] + $general['atmos']"; + if($general['npc'] >= 2) { echo " NPC 장수"; @@ -179,8 +179,8 @@ for($j=0; $j < $gencount; $j++) { echo " - $general[killturn] - ".substr($general[turntime],14,5)." + $general['killturn'] + ".substr($general['turntime'],14,5)." "; } echo " diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index acd0eea9..6598c6b3 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -8,17 +8,17 @@ increaseRefresh($connect, "인사부", 1); //훼섭 추방을 위해 갱신 checkTurn($connect); -$query = "select skin,no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$meLevel = $me[level]; +$meLevel = $me['level']; if($meLevel == 0) { echo "재야입니다."; exit(); } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -46,32 +46,32 @@ function out() { = 5) { $btn = "submit"; } else { $btn = "hidden"; } -$query = "select name,level,picture,imgsvr,belong from general where nation='$nation[nation]' and level>={$lv} order by level desc"; +$query = "select name,level,picture,imgsvr,belong from general where nation='$nation['nation']' and level>={$lv} order by level desc"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($i=12; $i >= $lv; $i--) { $levels = MYDB_fetch_array($genresult); - $level[$levels[level]] = $levels; + $level[$levels['level']] = $levels; } -$query = "select name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 +$query = "select name,picture,killnum from general where nation='$nation['nation']' order by killnum desc limit 5"; // 오호장군 $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 +$query = "select name,picture,firenum from general where nation='$nation['nation']' order by firenum desc limit 7"; // 건안칠자 $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo " - "; @@ -81,10 +81,10 @@ for($i=12; $i >= $lv; $i-=2) { $imageTemp2 = GetImageURL($level[$i2][imgsvr]); echo " - + - + @@ -101,8 +101,8 @@ $tigernum = MYDB_num_rows($tigerresult); for($i=0; $i < $tigernum; $i++) { $tiger = MYDB_fetch_array($tigerresult); - if($tiger[killnum] > 0) { - echo "{$tiger[name]}【{$tiger[killnum]}】, "; + if($tiger['killnum'] > 0) { + echo "{$tiger['name']}【{$tiger['killnum']}】, "; } } @@ -118,8 +118,8 @@ $eaglenum = MYDB_num_rows($eagleresult); for($i=0; $i < $eaglenum; $i++) { $eagle = MYDB_fetch_array($eagleresult); - if($eagle[firenum] > 0) { - echo "{$eagle[name]}【{$eagle[firenum]}】, "; + if($eagle['firenum'] > 0) { + echo "{$eagle['name']}【{$eagle['firenum']}】, "; } } @@ -140,14 +140,14 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) { echo " "; } -$query = "select name,city from general where nation='$me[nation]' and level=12"; +$query = "select name,city from general where nation='$me['nation']' and level=12"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); echo " @@ -167,29 +167,29 @@ echo " - - - + + + @@ -209,17 +209,17 @@ echo " "; -$querys[10] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[9] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[8] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[7] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[6] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[5] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[10] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[9] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[8] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[7] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[6] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[5] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; for($i=10; $i >= $lv; $i--) { if($i % 2 == 0) { echo ""; } echo " - + "; if($i % 2 == 1) { echo ""; } @@ -273,7 +273,7 @@ if($meLevel >= 5) { "; - $query = "select city,name,region from city where nation='$nation[nation]' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 + $query = "select city,name,region from city where nation='$nation['nation']' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -335,15 +335,15 @@ if($meLevel >= 5) { for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($result); - if($region != $city[region]) { + if($region != $city['region']) { if($region != 0) { echo ""; } - echo ""; - $region = $city[region]; + echo ""; + $region = $city['region']; } - echo ""; + echo ""; } echo ""; @@ -353,17 +353,17 @@ if($meLevel >= 5) { "; - $query = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; + $query = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - if($general[level] == 3) { - echo ""; - } elseif($general[level] > 1) { - echo ""; + if($general['level'] == 3) { + echo ""; + } elseif($general['level'] > 1) { + echo ""; } else { - echo ""; + echo ""; } } @@ -381,7 +381,7 @@ if($meLevel >= 5) { - "; - $region = $city[region]; + "; + $region = $city['region']; } - $gen1[name] = $gen1[name]==""?"-":$gen1[name]." ({$gen1[belong]}년) 【{$cityNames[$gen1[city]]}】"; - $gen2[name] = $gen2[name]==""?"-":$gen2[name]." ({$gen2[belong]}년) 【{$cityNames[$gen2[city]]}】"; - $gen3[name] = $gen3[name]==""?"-":$gen3[name]." ({$gen3[belong]}년) 【{$cityNames[$gen3[city]]}】"; - if($city[gen1set] == 1) { $gen1[name] = "".$gen1[name].""; } - if($city[gen2set] == 1) { $gen2[name] = "".$gen2[name].""; } - if($city[gen3set] == 1) { $gen3[name] = "".$gen3[name].""; } + $gen1['name'] = $gen1['name']==""?"-":$gen1['name']." ({$gen1['belong']}년) 【{$cityNames[$gen1['city']]}】"; + $gen2['name'] = $gen2['name']==""?"-":$gen2['name']." ({$gen2['belong']}년) 【{$cityNames[$gen2['city']]}】"; + $gen3['name'] = $gen3['name']==""?"-":$gen3['name']." ({$gen3['belong']}년) 【{$cityNames[$gen3['city']]}】"; + if($city['gen1set'] == 1) { $gen1['name'] = "".$gen1['name'].""; } + if($city['gen2set'] == 1) { $gen2['name'] = "".$gen2['name'].""; } + if($city['gen3set'] == 1) { $gen3['name'] = "".$gen3['name'].""; } echo " - - - - - + + + + + "; } diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 618d7898..eb484a2e 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -6,11 +6,11 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "세력도시", 1); -$query = "select no,nation,level,skin from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,level,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[level] == 0) { +if($me['level'] == 0) { echo "재야입니다."; exit(); } @@ -20,7 +20,7 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -56,34 +56,34 @@ if($me[skin] < 1) {
- 【 $nation[name] 】 + + 【 $nation['name'] 】
".getLevel($i1, $nation[level])."".getLevel($i1, $nation['level'])."   ";echo $level[$i1][name]==''?"-":$level[$i1][name]; echo " ({$level[$i1][belong]}년)".getLevel($i2, $nation[level])."".getLevel($i2, $nation['level'])."   ";echo $level[$i2][name]==''?"-":$level[$i2][name]; echo " ({$level[$i2][belong]}년)
수 뇌 부 임 명
".getLevel(12, $nation[level])."{$general[name]} 【{$cityNames[$general[city]]}】".getLevel(11, $nation[level])."".getLevel(12, $nation['level'])."{$general['name']} 【{$cityNames[$general['city']]}】".getLevel(11, $nation['level'])." "; -if($meLevel >= 5 && $nation[l11set] == 0) { +if($meLevel >= 5 && $nation['l11set'] == 0) { echo " "; } else { - $query = "select name,city from general where nation='$me[nation]' and level='11'"; + $query = "select name,city from general where nation='$me['nation']' and level='11'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - echo "{$general[name]} 【{$cityNames[$general[city]]}】"; + echo "{$general['name']} 【{$cityNames[$general['city']]}】"; } echo "
".getLevel($i, $nation[level])."".getLevel($i, $nation['level'])." "; @@ -235,12 +235,12 @@ for($i=10; $i >= $lv; $i--) { for($k=0; $k < $gencount; $k++) { $general = MYDB_fetch_array($result); - if($general[level] == $i) { - echo ""; - } elseif($general[level] > 1) { - echo ""; + if($general['level'] == $i) { + echo ""; + } elseif($general['level'] > 1) { + echo ""; } else { - echo ""; + echo ""; } } @@ -249,10 +249,10 @@ for($i=10; $i >= $lv; $i--) { "; } else { - $query = "select name,city from general where nation='$me[nation]' and level={$i}"; + $query = "select name,city from general where nation='$me['nation']' and level={$i}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - echo "{$general[name]} 【{$cityNames[$general[city]]}】"; + echo "{$general['name']} 【{$cityNames[$general['city']]}】"; } echo "
【 ".getRegion($city[region])." 】
【 ".getRegion($city['region'])." 】
【{$citylevel[$city[level]]}】$city[name]  $gen1[name]$gen2[name]$gen3[name]【{$citylevel[$city['level']]}】$city['name']  $gen1['name']$gen2['name']$gen3['name']
[{$city[name]}]
"; } + if($city['city'] == $nation['capital']) { $city['name'] = "[{$city['name']}]"; } $query = "select name from general where no='$city[gen1]'"; // 태수 $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen1 = MYDB_fetch_array($genresult); @@ -96,63 +96,63 @@ for($j=0; $j < $citycount; $j++) { $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen3 = MYDB_fetch_array($genresult); - if($type == 10 && $city[region] != $region) { + if($type == 10 && $city['region'] != $region) { echo "
"; - $region = $city[region]; - } elseif($type == 11 && $city[level] != $level) { + $region = $city['region']; + } elseif($type == 11 && $city['level'] != $level) { echo "
"; - $level = $city[level]; + $level = $city['level']; } - if($city[trade] == 0) { - $city[trade] = "- "; + if($city['trade'] == 0) { + $city['trade'] = "- "; } echo " - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index a0912ef1..2c4790ff 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -6,11 +6,11 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "세력장수", 1); -$query = "select skin,no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select skin,no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[level] == 0) { +if($me['level'] == 0) { echo "재야입니다."; exit(); } @@ -21,7 +21,7 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -60,26 +60,26 @@ if($me[skin] < 1) {
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 {$city[name]}【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 {$city['name']}
주민$city[pop]/$city[pop2]$city['pop']/$city[pop2] 농업$city[agri]/$city[agri2]$city['agri']/$city[agri2] 상업$city[comm]/$city[comm2]$city['comm']/$city[comm2] 치안$city[secu]/$city[secu2]$city['secu']/$city[secu2] 수비$city[def]/$city[def2]$city['def']/$city[def2] 성벽$city[wall]/$city[wall2]$city['wall']/$city[wall2]
민심$city[rate]$city['rate'] 시세{$city[trade]}%{$city['trade']}% 인구".round($city[pop]/$city[pop2]*100, 2)." %".round($city['pop']/$city[pop2]*100, 2)." % 태수";echo $gen1[name]==''?"-":"$gen1[name]";echo "";echo $gen1['name']==''?"-":"$gen1['name']";echo " 군사";echo $gen2[name]==''?"-":"$gen2[name]";echo "";echo $gen2['name']==''?"-":"$gen2['name']";echo " 시중";echo $gen3[name]==''?"-":"$gen3[name]";echo "";echo $gen3['name']==''?"-":"$gen3['name']";echo "
장수 "; - $query = "select npc,name from general where city='$city[city]' and nation='$me[nation]'"; // 장수 목록 + $query = "select npc,name from general where city='$city['city']' and nation='$me['nation']'"; // 장수 목록 $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); if($gencount == 0) echo "-"; for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "{$general[name]}, "; } - elseif($general[npc] == 1) { echo "{$general[name]}, "; } - else { echo "$general[name], "; } + if($general['npc'] >= 2) { echo "{$general['name']}, "; } + elseif($general['npc'] == 1) { echo "{$general['name']}, "; } + else { echo "$general['name'], "; } } echo "
= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } @@ -119,41 +119,41 @@ for($j=0; $j < $gencount; $j++) { $lbonus = ""; } - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); + if($general['injury'] > 0) { + $leader = floor($general['leader'] * (100 - $general['injury'])/100); + $power = floor($general['power'] * (100 - $general['injury'])/100); + $intel = floor($general['intel'] * (100 - $general['injury'])/100); $leader = "{$leader}{$lbonus}"; $power = "{$power}"; $intel = "{$intel}"; } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; + $leader = "{$general['leader']}{$lbonus}"; + $power = "{$general['power']}"; + $intel = "{$general['intel']}"; } - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } + if($general['npc'] >= 2) { $name = "$general['name']"; } + elseif($general['npc'] == 1) { $name = "$general['name']"; } + else { $name = "$general['name']"; } - $imageTemp = GetImageURL($general[imgsvr]); + $imageTemp = GetImageURL($general['imgsvr']); echo " - 0?" background={$imageTemp}/{$general[picture]}":""; echo " height=64> + 0?" background={$imageTemp}/{$general['picture']}":""; echo " height=64> $name - "; echo getLevel($general[level], $nation[level]); echo " - ".getDed($general[dedication])." - ".getHonor($general[experience])." - ".getBill($general[dedication])." + "; echo getLevel($general['level'], $nation['level']); echo " + ".getDed($general['dedication'])." + ".getHonor($general['experience'])." + ".getBill($general['dedication'])." $leader $power $intel - $general[gold] - $general[rice] - ".getGenChar($general[personal])." - ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." - $general[belong] - $general[connect]"; echo "
(".getConnect($general[connect]).") + $general['gold'] + $general['rice'] + ".getGenChar($general['personal'])." + ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])." + $general['belong'] + $general['connect']"; echo "
(".getConnect($general['connect']).") "; } echo " diff --git a/twe/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php index 50e11922..4741c552 100644 --- a/twe/b_myKingdomInfo.php +++ b/twe/b_myKingdomInfo.php @@ -6,11 +6,11 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "세력정보", 1); -$query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[level] == 0) { +if($me['level'] == 0) { echo "재야입니다."; exit(); } @@ -30,27 +30,27 @@ if($me[level] == 0) {
[{$city[name]}]
"; } - else { $cityname[$j] = $city[name]; } - $totalpop += $city[pop]; + if($city['city'] == $nation['capital']) { $cityname[$j] = "[{$city['name']}]"; } + else { $cityname[$j] = $city['name']; } + $totalpop += $city['pop']; $maxpop += $city[pop2]; } -$query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general where nation='$nation[nation]'"; +$query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -58,18 +58,18 @@ $query = "select gold_rate,rice_rate from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); // 금 수지 -$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); +$deadIncome = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin['gold_rate']); -$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); +$goldincomeList = getGoldIncome($connect, $nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']); $goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; -$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); -$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); +$goldoutcome = getGoldOutcome($connect, $nation['nation'], $nation['bill']); +$riceincomeList = getRiceIncome($connect, $nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']); $riceincome = $riceincomeList[0] + $riceincomeList[1]; -$riceoutcome = getRiceOutcome($connect, $nation[nation], $nation[bill]); +$riceoutcome = getRiceOutcome($connect, $nation['nation'], $nation['bill']); -$budgetgold = $nation[gold] + $goldincome - $goldoutcome + $deadIncome; -$budgetrice = $nation[rice] + $riceincome - $riceoutcome; +$budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome; +$budgetrice = $nation['rice'] + $riceincome - $riceoutcome; $budgetgolddiff = $goldincome - $goldoutcome + $deadIncome; $budgetricediff = $riceincome - $riceoutcome; if($budgetgolddiff > 0) { $budgetgolddiff = "+{$budgetgolddiff}"; } @@ -80,23 +80,23 @@ else { $budgetricediff = "$budgetricediff"; } echo " - + - + - + - + - + - + @@ -105,7 +105,7 @@ echo " - + @@ -115,7 +115,7 @@ echo " - + @@ -123,9 +123,9 @@ echo " - + - + @@ -138,7 +138,7 @@ echo" - +
【 ";echo $me[nation]==0?"공 백 지":"$nation[name]";echo " 】【 ";echo $me['nation']==0?"공 백 지":"$nation['name']";echo " 】
총주민 {$totalpop}/{$maxpop} 총병사{$general[totcrew]}/{$general[maxcrew]}{$general['totcrew']}/{$general['maxcrew']} 국 력$nation[power]$nation['power']
국 고"; echo $nation[gold]==0?"-":"$nation[gold]"; echo ""; echo $nation['gold']==0?"-":"$nation['gold']"; echo " 병 량"; echo $nation[rice]==0?"-":"$nation[rice]"; echo ""; echo $nation['rice']==0?"-":"$nation['rice']"; echo " 세 율"; echo $me[nation]==0?"해당 없음":"$nation[rate] %"; echo ""; echo $me['nation']==0?"해당 없음":"$nation['rate'] %"; echo "
세곡/둔전 +$riceincomeList[0] / +$riceincomeList[1] 지급율"; echo $me[nation]==0?"해당 없음":"$nation[bill] %"; echo ""; echo $me['nation']==0?"해당 없음":"$nation['bill'] %"; echo "
수입/지출속 령 $citycount 장 수$nation[gennum]$nation['gennum']
국고 예산병량 예산 {$budgetrice} ({$budgetricediff}) 기술력$nation[tech]$nation['tech'] 작 위".getNationLevel($nation[level])."".getNationLevel($nation['level'])."
속령일람 :
국가열전".ConvertLog($nation[history], $me[skin])."".ConvertLog($nation['history'], $me['skin'])."

"; diff --git a/twe/b_myPage.php b/twe/b_myPage.php index 494d8519..3cc43ab3 100644 --- a/twe/b_myPage.php +++ b/twe/b_myPage.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "내정보", 1); -$query = "select myset from general where user_id='$_SESSION[p_id]'"; +$query = "select myset from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -23,15 +23,15 @@ if($btn == "설정저장" && $me['myset'] > 0) { $submit = 'hidden'; } - $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where user_id='$_SESSION[p_id]'"; + $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -$query = "select no,skin,map,mode,tnmt,myset from general where user_id='$_SESSION[p_id]'"; +$query = "select no,skin,map,mode,tnmt,myset from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -40,7 +40,7 @@ if($me[skin] < 1) { 내정보 - type=text/css> + type=text/css> "; exit(); } -$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION[p_id]'"; +$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -26,8 +26,8 @@ for($i=0; $i < 16; $i++) { $gold = ${"gold{$i}"}; $mebet = $me["bet{$i}"]; if($gold >= 10 && $gold <= 1000) { - if($gold + 500 <= $me[gold] && $gold + $mebet <= 1000 && $gold + $me[bet] <= 1000) { - $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='$_SESSION[p_id]'"; + if($gold + 500 <= $me['gold'] && $gold + $mebet <= 1000 && $gold + $me['bet'] <= 1000) { + $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update game set bet{$i}=bet{$i}+'$gold' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/c_chiefboard.php b/twe/c_chiefboard.php index 00e01c6b..8c0e2e9a 100644 --- a/twe/c_chiefboard.php +++ b/twe/c_chiefboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -19,25 +19,25 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { $msg = trim($msg); $reply = trim($reply); - $nation = getNation($connect, $me[nation]); + $nation = getNation($connect, $me['nation']); //새글 추가시 if($num == -1 && $title != "" && $msg != "") { - $num = $nation[coreindex] + 1; + $num = $nation['coreindex'] + 1; if($num >= 20) { $num = 0; } $msg = $title."|".$msg; $msg = addslashes(SQ2DQ($msg)); $date = date('Y-m-d H:i:s'); - $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='$me[no]',coreboard{$num}_when='$date' where nation='$me[nation]'"; + $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='$me['no']',coreboard{$num}_when='$date' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set coreindex='$num' where nation='$me[nation]'"; + $query = "update nation set coreindex='$num' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //$num에 댓글시 } elseif($num >= 0 && $reply != "") { - $newmsg = $nation["coreboard{$num}"]."|".$me[no]."|".$reply; + $newmsg = $nation["coreboard{$num}"]."|".$me['no']."|".$reply; $newmsg = addslashes(SQ2DQ($newmsg)); - $query = "update nation set coreboard{$num}='$newmsg' where nation='$me[nation]'"; + $query = "update nation set coreboard{$num}='$newmsg' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_dipcenter.php b/twe/c_dipcenter.php index 4cf79a5c..d7c505f8 100644 --- a/twe/c_dipcenter.php +++ b/twe/c_dipcenter.php @@ -7,52 +7,52 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$btn = $_POST[btn]; +$btn = $_POST['btn']; //내가 수뇌부이어야함 -if($me[level] < 5) { +if($me['level'] < 5) { echo ""; exit(); } if($btn == "국가방침") { $msg = BadTag2Code(addslashes(SQ2DQ($msg))); - $query = "update nation set msg='$msg' where nation='$me[nation]'"; + $query = "update nation set msg='$msg' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관권유") { $scoutmsg = BadTag2Code(addslashes(SQ2DQ($scoutmsg))); - $query = "update nation set scoutmsg='$scoutmsg' where nation='$me[nation]'"; + $query = "update nation set scoutmsg='$scoutmsg' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "세율") { if($rate < 5) { $rate = 5; } if($rate > 30) { $rate = 30; } - $query = "update nation set rate='$rate' where nation='$me[nation]'"; + $query = "update nation set rate='$rate' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "지급율") { if($bill < 20) { $bill = 20; } if($bill > 200) { $bill = 200; } - $query = "update nation set bill='$bill' where nation='$me[nation]'"; + $query = "update nation set bill='$bill' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "기밀권한") { if($secretlimit < 1) { $secretlimit = 1; } if($secretlimit > 99) { $secretlimit = 99; } - $query = "update nation set secretlimit='$secretlimit' where nation='$me[nation]'"; + $query = "update nation set secretlimit='$secretlimit' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 금지") { - $query = "update nation set myset=myset-1,scout='1' where nation='$me[nation]' and myset>0"; + $query = "update nation set myset=myset-1,scout='1' where nation='$me['nation']' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 허가") { - $query = "update nation set myset=myset-1,scout='0' where nation='$me[nation]' and myset>0"; + $query = "update nation set myset=myset-1,scout='0' where nation='$me['nation']' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 금지") { - $query = "update nation set myset=myset-1,war='1' where nation='$me[nation]' and myset>0"; + $query = "update nation set myset=myset-1,war='1' where nation='$me['nation']' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 허가") { - $query = "update nation set myset=myset-1,war='0' where nation='$me[nation]' and myset>0"; + $query = "update nation set myset=myset-1,war='0' where nation='$me['nation']' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/c_double.php b/twe/c_double.php index 8a000e70..50c9206c 100644 --- a/twe/c_double.php +++ b/twe/c_double.php @@ -30,7 +30,7 @@ if($command == 46) { if($name == "") { $name = "무명"; } $name = _String::SubStrForWidth($name, 0, 12); - $query = "update general set makenation='{$name}' where user_id='$_SESSION[p_id]'"; + $query = "update general set makenation='{$name}' where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); @@ -38,16 +38,16 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; //통합제의 } elseif($command == 53) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - if($me[level] >= 5) { + if($me['level'] >= 5) { $nationname = addslashes(SQ2DQ($nationname)); $nationname = str_replace("|", "", $nationname); $nationname = str_replace(" ", "", $nationname); @@ -55,40 +55,40 @@ if($command == 46) { if($nationname == "") { $nationname = "무명"; } $nationname = _String::SubStrForWidth($nationname, 0, 12); - $query = "update general set makenation='{$nationname}' where level>=5 and nation='$me[nation]'"; + $query = "update general set makenation='{$nationname}' where level>=5 and nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); $str = "type=type"; for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me[nation]'"; + $query = "update nation set {$str} where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; //불가침 } elseif($command == 61) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - if($me[level] >= 5) { + if($me['level'] >= 5) { $note = addslashes(SQ2DQ($note)); $note = str_replace("|", "", $note); $note = str_replace(" ", "", $note); $note = str_replace(" ", "뷁", $note); $note = _String::SubStrForWidth($note, 0, 90); - $query = "update diplomacy set reserved='{$note}' where me='$me[nation]' and you='$double'"; + $query = "update diplomacy set reserved='{$note}' where me='$me['nation']' and you='$double'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); $str = "type=type"; for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me[nation]'"; + $query = "update nation set {$str} where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; @@ -97,19 +97,19 @@ if($command == 46) { //백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 //국기변경 } elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) { - $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - if(($command == 23 || $command == 24 || $command == 27) && $me[no] == $third) { + if(($command == 23 || $command == 24 || $command == 27) && $me['no'] == $third) { // 자기자신에게 악용 금지 - } elseif($me[level] >= 5) { + } elseif($me['level'] >= 5) { $count = sizeof($turn); $str = "type=type"; for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; + $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me[nation]'"; + $query = "update nation set {$str} where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; @@ -119,7 +119,7 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; } diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index 2cfcd684..549641d2 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -17,11 +17,11 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); if($con >= 2) { echo ""; exit(); } $msg = str_replace("|", "", $msg); @@ -33,22 +33,22 @@ $date = date('Y-m-d H:i:s'); // 전체 메세지 if($genlist == 9999 && str_replace(" ", "", $msg) != "") { - if($me[nation] == 0) { - $nation[name] = '재야'; - $nation[color] = 'FFFFFF'; + if($me['nation'] == 0) { + $nation['name'] = '재야'; + $nation['color'] = 'FFFFFF'; } else { - $query = "select nation,name,color from nation where nation='$me[nation]'"; + $query = "select nation,name,color from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } - PushMsg(1, 0, $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $nation[name], $nation[color], $msg); + PushMsg(1, 0, $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $nation['name'], $nation['color'], $msg); // 국가 메세지 } elseif($genlist >= 9000 && $msg != "") { - if($me[nation] == 0) { - $nation[name] = '재야'; - $nation[color] = 'FFFFFF'; + if($me['nation'] == 0) { + $nation['name'] = '재야'; + $nation['color'] = 'FFFFFF'; } else { - $query = "select nation,name,color from nation where nation='$me[nation]'"; + $query = "select nation,name,color from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } @@ -58,16 +58,16 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dest = MYDB_fetch_array($result); - if($nation[nation] == $dest[nation]) { - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $dest[name], $dest[color], $msg); + if($nation['nation'] == $dest['nation']) { + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $dest['name'], $dest['color'], $msg); } else { //타국에 보내는 경우 - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); // 수뇌이면 발송, 아니면 자국으로 돌림 - if($me[level] >= 5) { - PushMsg(3, $dest[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); + if($me['level'] >= 5) { + PushMsg(3, $dest['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); } else { - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], "반송"); + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], "반송"); } } // 개인 메세지 @@ -76,40 +76,40 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); //발신, 수신인 코딩 - $who = $me[no] * 10000 + $genlist; + $who = $me['no'] * 10000 + $genlist; $msg = addslashes(SQ2DQ($msg)); - $query = "select msg{$me[msgindex]}_when as priv_when from general where no='$me[no]'"; + $query = "select msg{$me['msgindex']}_when as priv_when from general where no='$me['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $prev_msg = MYDB_fetch_array($result); - $diff_second = strtotime($date) - strtotime($prev_msg[priv_when]); + $diff_second = strtotime($date) - strtotime($prev_msg['priv_when']); if($diff_second < 3) { - $who = 1 * 10000 + $me[no]; // 운영자가 본인에게 + $who = 1 * 10000 + $me['no']; // 운영자가 본인에게 $msg = "개인메세지는 3초당 1건만 보낼 수 있습니다!"; //자신에게 표시 - $me[msgindex]++; - if($me[msgindex] >= 10) { $me[msgindex] = 0; } - $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='10',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date',newmsg=1 where no='$me[no]'"; + $me['msgindex']++; + if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } + $query = "update general set msgindex='$me['msgindex']',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='10',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date',newmsg=1 where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //자신에게 표시 - $me[msgindex]++; - if($me[msgindex] >= 10) { $me[msgindex] = 0; } - $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='9',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date' where no='$me[no]'"; + $me['msgindex']++; + if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } + $query = "update general set msgindex='$me['msgindex']',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='9',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_type='10',msg{$you[msgindex]}_who='$who',msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist'"; + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_type='10',msg{$you['msgindex']}_who='$who',msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $fp = fopen("logs/_gen_msg.txt", "a"); //로그 파일에 기록 - fwrite($fp, _String::Fill($me[name],12," ")." > "._String::Fill($you[name],12," ")." | {$msg}\r\n"); + fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\r\n"); fclose($fp); } diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index 7b96765c..c6b7ba01 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -11,12 +11,12 @@ $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$meLevel = $me[level]; +$meLevel = $me['level']; -$query = "select no from general where nation='$me[nation]' and level=12"; +$query = "select no from general where nation='$me['nation']' and level=12"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); @@ -26,7 +26,7 @@ if($btn == "임명") { $general = MYDB_fetch_array($result); //임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 - if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $genlist != 0)) { + if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $genlist != 0)) { echo ""; exit(); } @@ -36,88 +36,88 @@ if($btn == "임명") { $general = MYDB_fetch_array($result); //추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 - if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $outlist != 0)) { + if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $outlist != 0)) { echo ""; exit(); } } if($btn == "추방") { - $query = "select name,l{$meLevel}set,chemi from nation where nation='$me[nation]'"; + $query = "select name,l{$meLevel}set,chemi from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //이미 지정했다면 무시 - if($nation["l{$meLevel}set"] == 0 && $general[level] > 0 && $general[level] < 12) { - $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; + if($nation["l{$meLevel}set"] == 0 && $general['level'] > 0 && $general['level'] < 12) { + $query = "select no from diplomacy where me='$general['nation']' and state>='3' and state<='4'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount1 = MYDB_num_rows($dipresult); - $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; + $query = "select no from diplomacy where me='$general['nation']' and state>='5' and state<='6'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount2 = MYDB_num_rows($dipresult); $gold = 0; $rice = 0; // 금쌀1000이상은 남김 - if($general[gold] > 1000) { - $gold = $general[gold] - 1000; - $general[gold] = 1000; + if($general['gold'] > 1000) { + $gold = $general['gold'] - 1000; + $general['gold'] = 1000; } - if($general[rice] > 1000) { - $rice = $general[rice] - 1000; - $general[rice] = 1000; + if($general['rice'] > 1000) { + $rice = $general['rice'] - 1000; + $general['rice'] = 1000; } if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:통합에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; - $log[count($log)] = "●통합에 반대하다가 $nation[name]에서 숙청당했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:통합에 반대하던 $general['name'](이)가 $nation['name']에서 숙청당했습니다."; + $log[count($log)] = "●통합에 반대하다가 $nation['name']에서 숙청당했습니다."; // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:합병에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; - $log[count($log)] = "●합병에 반대하다가 $nation[name]에서 숙청당했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:합병에 반대하던 $general['name'](이)가 $nation['name']에서 숙청당했습니다."; + $log[count($log)] = "●합병에 반대하다가 $nation['name']에서 숙청당했습니다."; // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 추방당하였습니다."; - $log[count($log)] = "$nation[name]에서 추방당하였습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 추방당하였습니다."; + $log[count($log)] = "$nation['name']에서 추방당하였습니다."; // 재야로, 국가 무소속으로, 명성/공헌 N*10%감소 - $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='$general[gold]',rice='$general[rice]',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$general[no]'"; + $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='$general['gold']',rice='$general['rice']',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 부대 처리 - $query = "select no from troop where troop='$general[troop]'"; + $query = "select no from troop where troop='$general['troop']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 - if($troop[no] == $general[no]) { + if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; + $query = "update general set troop='0' where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; + $query = "delete from troop where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general[no]'"; + $query = "update general set troop='0' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 도시관직해제 - $query = "update city set gen1='0' where gen1='$general[no]'"; + $query = "update city set gen1='0' where gen1='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; + $query = "update city set gen2='0' where gen2='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; + $query = "update city set gen3='0' where gen3='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general[npc] >= 2 && ($admin[scenario] == 0 || rand()%100 == 0)) { + if($general['npc'] >= 2 && ($admin['scenario'] == 0 || rand()%100 == 0)) { switch(rand()%5) { case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break; case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break; @@ -126,68 +126,68 @@ if($btn == "추방") { case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break; } - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $str); + PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $str); } //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } + $nation['chemi'] -= 1; + if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - if($admin[year] < $admin[startyear]+3) { + if($admin['year'] < $admin['startyear']+3) { //초반엔 군주 부상 증가(엔장 임관지양) - $query = "update general set injury=injury+1 where no='$ruler[no]'"; + $query = "update general set injury=injury+1 where no='$ruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //이번분기는 추방불가(초반 제외) - $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 추방됨"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에서 추방됨"); pushGenLog($general, $log); pushAllLog($alllog); } } elseif($btn == "임명" && $level >= 5 && $level <= 11) { - $query = "select l{$level}set,level,chemi from nation where nation='$me[nation]'"; + $query = "select l{$level}set,level,chemi 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]); + $lv = getNationChiefLevel($nation['level']); //이미 지정했다면 무시 if($nation["l{$level}set"] == 0 && $lv <= $level) { - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } + $nation['chemi'] -= 1; + if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - $query = "update nation set chemi='$nation[chemi]' where nation='$general[nation]'"; + $query = "update nation set chemi='$nation['chemi']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 장수 일반으로 - $query = "update general set level=1 where nation='$me[nation]' and level='$level'"; + $query = "update general set level=1 where nation='$me['nation']' and level='$level'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($genlist != 0) { $valid = 0; switch($level) { - case 10: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 9: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - case 8: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 7: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - case 6: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 5: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + case 10: if($general['power'] >= $_goodgenpower) { $valid = 1; } break; + case 9: if($general['intel'] >= $_goodgenintel) { $valid = 1; } break; + case 8: if($general['power'] >= $_goodgenpower) { $valid = 1; } break; + case 7: if($general['intel'] >= $_goodgenintel) { $valid = 1; } break; + case 6: if($general['power'] >= $_goodgenpower) { $valid = 1; } break; + case 5: if($general['intel'] >= $_goodgenintel) { $valid = 1; } break; default: $valid = 1; break; } if($valid == 1) { @@ -202,7 +202,7 @@ if($btn == "추방") { $query = "update general set level='$level' where no='$genlist'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //이번분기는 불가 - $query = "update nation set l{$level}set=1 where nation='$me[nation]'"; + $query = "update nation set l{$level}set=1 where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -229,8 +229,8 @@ if($btn == "추방") { if($genlist != 0) { $valid = 0; switch($level) { - case 4: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 3: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; + case 4: if($general['power'] >= $_goodgenpower) { $valid = 1; } break; + case 3: if($general['intel'] >= $_goodgenintel) { $valid = 1; } break; default: $valid = 1; break; } if($valid == 1) { diff --git a/twe/c_nationboard.php b/twe/c_nationboard.php index 78e31361..7b5e4052 100644 --- a/twe/c_nationboard.php +++ b/twe/c_nationboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -19,25 +19,25 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { $msg = trim($msg); $reply = trim($reply); - $nation = getNation($connect, $me[nation]); + $nation = getNation($connect, $me['nation']); //새글 추가시 if($num == -1 && $title != "" && $msg != "") { - $num = $nation[boardindex] + 1; + $num = $nation['boardindex'] + 1; if($num >= 20) { $num = 0; } $msg = $title."|".$msg; $msg = addslashes(SQ2DQ($msg)); $date = date('Y-m-d H:i:s'); - $query = "update nation set board{$num}='$msg',board{$num}_who='$me[no]',board{$num}_when='$date' where nation='$me[nation]'"; + $query = "update nation set board{$num}='$msg',board{$num}_who='$me['no']',board{$num}_when='$date' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set boardindex='$num' where nation='$me[nation]'"; + $query = "update nation set boardindex='$num' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //$num에 댓글시 } elseif($num >= 0 && $reply != "") { - $newmsg = $nation["board{$num}"]."|".$me[no]."|".$reply; + $newmsg = $nation["board{$num}"]."|".$me['no']."|".$reply; $newmsg = addslashes(SQ2DQ($newmsg)); - $query = "update nation set board{$num}='$newmsg' where nation='$me[nation]'"; + $query = "update nation set board{$num}='$newmsg' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_nationrule.php b/twe/c_nationrule.php index 08563c1a..1fae000c 100644 --- a/twe/c_nationrule.php +++ b/twe/c_nationrule.php @@ -7,13 +7,13 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $msg = addslashes(SQ2DQ($msg)); -$query = "update nation set rule='$msg' where nation='$me[nation]'"; +$query = "update nation set rule='$msg' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; diff --git a/twe/c_tournament.php b/twe/c_tournament.php index 666531a9..938fcba7 100644 --- a/twe/c_tournament.php +++ b/twe/c_tournament.php @@ -11,48 +11,48 @@ $query = "select tournament,phase,tnmt_type,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,userlevel,tournament from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,userlevel,tournament from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -switch($admin[tnmt_type]) { +switch($admin['tnmt_type']) { case 0: $tp = "total"; $tp2 = "전력전"; $tp3 = "leader+power+intel"; break; case 1: $tp = "leader"; $tp2 = "통솔전"; $tp3 = "leader"; break; case 2: $tp = "power"; $tp2 = "일기토"; $tp3 = "power"; break; case 3: $tp = "intel"; $tp2 = "설전"; $tp3 = "intel"; break; } -if($me[tournament] == 1 && $me[userlevel] < 5) { echo ""; exit(); } +if($me['tournament'] == 1 && $me['userlevel'] < 5) { echo ""; exit(); } -if($btn == "자동개최설정" && $me[userlevel] >= 5) { +if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $query = "update game set tnmt_trig={$trig}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "개최" && $me[userlevel] >= 5) { +} elseif($btn == "개최" && $me['userlevel'] >= 5) { startTournament($connect, $auto, $type); -} elseif($btn == "중단" && $me[userlevel] >= 5) { +} elseif($btn == "중단" && $me['userlevel'] >= 5) { $query = "update game set tnmt_auto=0, tournament=0, phase=0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif((($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") && $me[userlevel] >= 5) || $btn == "참가") { +} elseif((($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") && $me['userlevel'] >= 5) || $btn == "참가") { if($btn == "투입") { $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; } elseif($btn == "무명투입") { - $general[no] = 0; - $general[name] = "무명장수"; - $general[npc] = 2; - $general[leader] = 10; - $general[power] = 10; - $general[intel] = 10; - $general[explevel] = 10; - $general[gold] = 0; + $general['no'] = 0; + $general['name'] = "무명장수"; + $general['npc'] = 2; + $general['leader'] = 10; + $general['power'] = 10; + $general['intel'] = 10; + $general['explevel'] = 10; + $general['gold'] = 0; } elseif($btn == "쪼렙투입") { $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; } elseif($btn == "일반투입") { //참가한 사람 평균치 $query = "select AVG({$tp3}) as av from general where tournament=1"; @@ -60,36 +60,36 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { $avgGen = MYDB_fetch_array($genResult); //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; + $query = "select no from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 and {$tp3}>{$avgGen['av']}"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); $sel = rand() % 32 + $genCount - 8; - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; } elseif($btn == "굇수투입") { $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; } elseif($btn == "랜덤투입") { - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; //참가 } else { - $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$me[no]'"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$me['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - //$admin[develcost]원 참가비 - if($general[gold] < $admin[develcost]) { echo ""; exit(1); } - $general[gold] -= $admin[develcost]; + //$admin['develcost']원 참가비 + if($general['gold'] < $admin['develcost']) { echo ""; exit(1); } + $general['gold'] -= $admin['develcost']; } $query = "select grp from tournament where grp<10 group by grp having count(*)=8"; @@ -97,7 +97,7 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { $grpCount = MYDB_num_rows($result); for($i=0; $i < $grpCount; $i++) { $grp = MYDB_fetch_array($result); - $occupied[$grp[grp]] = 1; + $occupied[$grp['grp']] = 1; } for($i=0; $i < 8; $i++) { if($occupied[$i] == 0) { @@ -110,9 +110,9 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { $query = "select grp from tournament where grp='$grp'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $grpCount = MYDB_num_rows($result); - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grpCount', '$general[horse]', '$general[weap]', '$general[book]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$grp', '$grpCount', '$general['horse']', '$general['weap']', '$general['book']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold='$general[gold]' where no='$general[no]'"; + $query = "update general set tournament=1,gold='$general['gold']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -123,7 +123,7 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { $query = "update game set tournament=2, phase=0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -} elseif(($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") && $me[userlevel] >= 5) { +} elseif(($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") && $me['userlevel'] >= 5) { $z = 0; for($i=0; $i < 8; $i++) { $query = "select grp from tournament where grp='$i'"; @@ -144,7 +144,7 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { for($i=0; $i < $z; $i++) { $sel = rand() % 32; if($btn == "쪼렙전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} limit {$sel},1"; } elseif($btn == "일반전부투입") { //참가한 사람 평균치 $query = "select AVG({$tp3}) as av from general where tournament=1"; @@ -152,50 +152,50 @@ if($btn == "자동개최설정" && $me[userlevel] >= 5) { $avgGen = MYDB_fetch_array($genResult); //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; + $query = "select no from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 and {$tp3}>{$avgGen['av']}"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); $sel += $genCount - 8; - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; } elseif($btn == "굇수전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; } else { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $grp = floor($code[$i] / 10); $grp_no = $code[$i] % 10; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grp_no', '$general[horse]', '$general[weap]', '$general[book]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$grp', '$grp_no', '$general['horse']', '$general['weap']', '$general['book']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold=gold-'$admin[develcost]' where no='$general[no]'"; + $query = "update general set tournament=1,gold=gold-'$admin['develcost']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $query = "update game set tournament=2, phase=0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "무명전부투입" && $me[userlevel] >= 5) { fillLowGenAll($connect); -} elseif($btn == "예선" && $me[userlevel] >= 5) { qualify($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "예선전부" && $me[userlevel] >= 5) { qualifyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "추첨" && $me[userlevel] >= 5) { selection($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "추첨전부" && $me[userlevel] >= 5) { selectionAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "본선" && $me[userlevel] >= 5) { finallySingle($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "본선전부" && $me[userlevel] >= 5) { finallyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "배정" && $me[userlevel] >= 5) { final16set($connect); -} elseif($btn == "베팅마감" && $me[userlevel] >= 5) { +} elseif($btn == "무명전부투입" && $me['userlevel'] >= 5) { fillLowGenAll($connect); +} elseif($btn == "예선" && $me['userlevel'] >= 5) { qualify($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "예선전부" && $me['userlevel'] >= 5) { qualifyAll($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "추첨" && $me['userlevel'] >= 5) { selection($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "추첨전부" && $me['userlevel'] >= 5) { selectionAll($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "본선" && $me['userlevel'] >= 5) { finallySingle($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "본선전부" && $me['userlevel'] >= 5) { finallyAll($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "배정" && $me['userlevel'] >= 5) { final16set($connect); +} elseif($btn == "베팅마감" && $me['userlevel'] >= 5) { $dt = date("Y-m-d H:i:s", time() + 60); $query = "update game set tournament='7',phase='0',tnmt_time='$dt' where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "16강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 16); -} elseif($btn == "8강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 8); -} elseif($btn == "4강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 4); -} elseif($btn == "결승" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 2); -} elseif($btn == "포상" && $me[userlevel] >= 5) { setGift($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "회수" && $me[userlevel] >= 5) { setRefund($connect); -} elseif($btn == "메시지" && $me[userlevel] >= 5) { +} elseif($btn == "16강" && $me['userlevel'] >= 5) { finalFight($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase'], 16); +} elseif($btn == "8강" && $me['userlevel'] >= 5) { finalFight($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase'], 8); +} elseif($btn == "4강" && $me['userlevel'] >= 5) { finalFight($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase'], 4); +} elseif($btn == "결승" && $me['userlevel'] >= 5) { finalFight($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase'], 2); +} elseif($btn == "포상" && $me['userlevel'] >= 5) { setGift($connect, $admin['tnmt_type'], $admin['tournament'], $admin['phase']); +} elseif($btn == "회수" && $me['userlevel'] >= 5) { setRefund($connect); +} elseif($btn == "메시지" && $me['userlevel'] >= 5) { $msg = addslashes(SQ2DQ($msg)); $query = "update game set tnmt_msg='$msg'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/c_troop.php b/twe/c_troop.php index 0da27a5f..f9a39a6f 100644 --- a/twe/c_troop.php +++ b/twe/c_troop.php @@ -7,46 +7,46 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,troop from general where user_id='$_SESSION[p_id]'"; +$query = "select no,nation,troop from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $name = trim($name); $name = addslashes(SQ2DQ($name)); -if($btn == "부 대 창 설" && $name != "" && $me[troop] == 0) { - $query = "insert into troop (name,nation,no) values ('$name','$me[nation]','$me[no]')"; +if($btn == "부 대 창 설" && $name != "" && $me['troop'] == 0) { + $query = "insert into troop (name,nation,no) values ('$name','$me['nation']','$me['no']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select troop from troop where no='$me[no]'"; + $query = "select troop from troop where no='$me['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); - $query = "update general set troop='$troop[troop]' where no='$me[no]'"; + $query = "update general set troop='$troop['troop']' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 변 경" && $name != "") { - $query = "update troop set name='$name' where no='$me[no]'"; + $query = "update troop set name='$name' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 추 방" && $gen != 0) { $query = "update general set troop='0' where no='$gen'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 가 입" && $troop != 0) { - $query = "update general set troop='$troop' where no='$me[no]'"; + $query = "update general set troop='$troop' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 탈 퇴") { - $query = "select no from troop where troop='$me[troop]'"; + $query = "select no from troop where troop='$me['troop']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 - if($troop[no] == $me[no]) { + if($troop['no'] == $me['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$me[troop]'"; + $query = "update general set troop='0' where troop='$me['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$me[troop]'"; + $query = "delete from troop where troop='$me['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$me[no]'"; + $query = "update general set troop='0' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_vacation.php b/twe/c_vacation.php index 8101f999..c4425fd2 100644 --- a/twe/c_vacation.php +++ b/twe/c_vacation.php @@ -9,9 +9,9 @@ $query = "select killturn from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$admin[killturn] *= 3; +$admin['killturn'] *= 3; -$query = "update general set killturn='$admin[killturn]' where user_id='$_SESSION[p_id]'"; +$query = "update general set killturn='$admin['killturn']' where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; diff --git a/twe/c_vote.php b/twe/c_vote.php index 67798485..93ea0d50 100644 --- a/twe/c_vote.php +++ b/twe/c_vote.php @@ -9,46 +9,46 @@ $query = "select develcost,vote,votecomment from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where user_id='$_SESSION[p_id]'"; +$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($btn == "수정" && $me[userlevel] >= 5) { +if($btn == "수정" && $me['userlevel'] >= 5) { if($title != "") { - $vote = explode("|", $admin[vote]); + $vote = explode("|", $admin['vote']); $vote[0] = addslashes(SQ2DQ($title)); - $admin[vote] = implode("|", $vote); - $query = "update game set vote='{$admin[vote]}' where no='1'"; + $admin['vote'] = implode("|", $vote); + $query = "update game set vote='{$admin['vote']}' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -} elseif($btn == "추가" && $me[userlevel] >= 5) { +} elseif($btn == "추가" && $me['userlevel'] >= 5) { if($str != "") { $str = addslashes(SQ2DQ($str)); - $admin[vote] .= "|{$str}"; - $query = "update game set vote='{$admin[vote]}' where no='1'"; + $admin['vote'] .= "|{$str}"; + $query = "update game set vote='{$admin['vote']}' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -} elseif($btn == "리셋" && $me[userlevel] >= 5) { +} elseif($btn == "리셋" && $me['userlevel'] >= 5) { $query = "update game set voteopen=1,vote='',votecomment='' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update general set vote='0'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "알림" && $me[userlevel] >= 5) { +} elseif($btn == "알림" && $me['userlevel'] >= 5) { $query = "update general set newvote='1' where vote=0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "숨김" && $me[userlevel] >= 5) { +} elseif($btn == "숨김" && $me['userlevel'] >= 5) { $query = "update game set voteopen=0 where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전체통계만" && $me[userlevel] >= 5) { +} elseif($btn == "전체통계만" && $me['userlevel'] >= 5) { $query = "update game set voteopen=1 where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전부" && $me[userlevel] >= 5) { +} elseif($btn == "전부" && $me['userlevel'] >= 5) { $query = "update game set voteopen=2 where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "투표" && $me[vote] == 0 && $sel > 0) { - $develcost = $admin[develcost] * 5; - $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION[p_id]'"; +} elseif($btn == "투표" && $me['vote'] == 0 && $sel > 0) { + $develcost = $admin['develcost'] * 5; + $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = array(); @@ -60,15 +60,15 @@ if($btn == "수정" && $me[userlevel] >= 5) { $comment = trim($comment); $comment = addslashes(SQ2DQ($comment)); - $query = "select name from nation where nation='$me[nation]'"; + $query = "select name from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[name] == "") { $nation[name] = "재야"; } + if($nation['name'] == "") { $nation['name'] = "재야"; } - if($admin[votecomment] != "") { $admin[votecomment] .= "|"; } - $admin[votecomment] .= "{$nation[name]}:{$me[name]}:{$comment}"; + if($admin['votecomment'] != "") { $admin['votecomment'] .= "|"; } + $admin['votecomment'] .= "{$nation['name']}:{$me['name']}:{$comment}"; - $query = "update game set votecomment='{$admin[votecomment]}' where no=1"; + $query = "update game set votecomment='{$admin['votecomment']}' where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } ?> diff --git a/twe/commandlist.php b/twe/commandlist.php index 2239349c..8567ca30 100644 --- a/twe/commandlist.php +++ b/twe/commandlist.php @@ -65,7 +65,7 @@ function myCommandList($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where user_id='$_SESSION[p_id]'"; + $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $turn = getTurn($connect, $me, 2); @@ -76,13 +76,13 @@ function myCommandList($connect) { - 명령 목록 - "; - $year = $admin[year]; - $month = $admin[month]; + $year = $admin['year']; + $month = $admin['month']; // 실행된 턴시간이면 +1 - $cutTurn = cutTurn($me[turntime], $admin[turnterm]); + $cutTurn = cutTurn($me['turntime'], $admin['turnterm']); if($date <= $cutTurn) { $month++; } - $totaldate = $me[turntime]; + $totaldate = $me['turntime']; for($i=0; $i < 24; $i++) { if($month == 13) { @@ -99,7 +99,7 @@ function myCommandList($connect) { $turn[$i] "; $month++; - $totaldate = addTurn($totaldate, $admin[turnterm]); + $totaldate = addTurn($totaldate, $admin['turnterm']); } echo " diff --git a/twe/d_ally.php b/twe/d_ally.php index 21c29d87..48e37b53 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -11,7 +11,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -19,93 +19,93 @@ $query = "select no,nation,history,name from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,surlimit,history,color from nation where nation='$you[nation]'"; +$query = "select name,surlimit,history,color from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me[nation]'"; +$query = "select pop from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me[nation]'"; +$query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you[nation]'"; +$query = "select city from city where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state,term from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$query = "select state,term from diplomacy where me='$me['nation']' and you='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //상대국의 제의조건 -$query = "select reserved from diplomacy where me='$you[nation]' and you='$me[nation]'"; +$query = "select reserved from diplomacy where me='$you['nation']' and you='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip2 = MYDB_fetch_array($result); if($ok == "수락") { // 서신 보낸 후 멸망,선양 등 했을때. - if($me[level] < 5) { + if($me['level'] < 5) { $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 불가침 실패."; - } elseif($dip[term] == $when*12 && $dip[state] == 7) { + } elseif($dip['term'] == $when*12 && $dip['state'] == 7) { $mylog[count($mylog)] = "●이미 수락했습니다. 불가침 실패."; } elseif($losecitynum == 0) { $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 불가침 실패."; } elseif($wincitynum == 0) { $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 불가침 실패."; - } elseif($dip[state] == 0) { + } elseif($dip['state'] == 0) { $mylog[count($mylog)] = "●아국과 교전중입니다. 불가침 실패."; - } elseif($dip[state] == 1) { + } elseif($dip['state'] == 1) { $mylog[count($mylog)] = "●아국과 선포중입니다. 불가침 실패."; - } elseif($dip[state] == 3 || $dip[state] == 4) { + } elseif($dip['state'] == 3 || $dip['state'] == 4) { $mylog[count($mylog)] = "●아국과 합병중입니다. 불가침 실패."; - } elseif($mynation[dipmsg] == "") { + } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { -// $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 불가침에 합의."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【불가침】$mynation[name](이)가 $younation[name](와)과 불가침 조약을 체결했습니다."; +// $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 불가침에 합의."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【불가침】$mynation['name'](이)가 $younation['name'](와)과 불가침 조약을 체결했습니다."; - $youlog[count($youlog)] = "$mynation[name](와)과 $when년 불가침에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 $when년 불가침에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 수락"); + $youlog[count($youlog)] = "$mynation['name'](와)과 $when년 불가침에 성공했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 $when년 불가침에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 {$when}년 불가침 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 {$when}년 불가침 수락"); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; - PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); $when = $when * 12; //외교 변경 - $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$me[nation]' and you='$you[nation]'"; + $query = "update diplomacy set state='7',term='$when',fixed='$dip2['reserved']' where me='$me['nation']' and you='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$you[nation]' and you='$me[nation]'"; + $query = "update diplomacy set state='7',term='$when',fixed='$dip2['reserved']' where me='$you['nation']' and you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //조건 지움 - $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; + $query = "update diplomacy set reserved='' where me='$you['nation']' and you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation[name](이)가 불가침을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 불가침을 거부했습니다."; + $youlog[count($youlog)] = "$mynation['name'](이)가 불가침을 거부했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 불가침을 거부했습니다."; //조건 지움 - $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; + $query = "update diplomacy set reserved='' where me='$you['nation']' and you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 7dd03327..78000bdb 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,74 +17,74 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,surlimit,history,color from nation where nation='$you[nation]'"; +$query = "select name,surlimit,history,color from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me[nation]'"; +$query = "select pop from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me[nation]'"; +$query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you[nation]'"; +$query = "select city from city where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if($ok == "수락") { // 서신 보낸 후 멸망,선양 등 했을때. - if($me[level] < 5) { + if($me['level'] < 5) { $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 파기 실패."; } elseif($losecitynum == 0) { $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 파기 실패."; } elseif($wincitynum == 0) { $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 파기 실패."; - } elseif($dip[state] != 7) { + } elseif($dip['state'] != 7) { $mylog[count($mylog)] = "●아국과 불가침중이 아닙니다. 파기 실패."; - } elseif($mynation[dipmsg] == "") { + } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 파기 실패."; } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 조약 파기에 합의."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【파기】$mynation[name](이)가 $younation[name](와)과 불가침을 파기 하였습니다."; - $youlog[count($youlog)] = "$mynation[name](와)과 파기에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 파기에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 파기 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 파기 수락"); + $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 조약 파기에 합의."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【파기】$mynation['name'](이)가 $younation['name'](와)과 불가침을 파기 하였습니다."; + $youlog[count($youlog)] = "$mynation['name'](와)과 파기에 성공했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 파기에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 파기 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 파기 수락"); //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$me[nation]' and you='$you[nation]'"; + $query = "update diplomacy set state='2',term='0' where me='$me['nation']' and you='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$you[nation]' and you='$me[nation]'"; + $query = "update diplomacy set state='2',term='0' where me='$you['nation']' and you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 불가침 파기 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 불가침 파기 동의"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 불가침 파기 동의"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 불가침 파기 동의"; - PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation[name](이)가 파기를 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 파기를 거부했습니다."; + $youlog[count($youlog)] = "$mynation['name'](이)가 파기를 거부했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 파기를 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_cease.php b/twe/d_cease.php index 88dfd30c..2d089b8c 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,79 +17,79 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select nation,name,surlimit,history,color from nation where nation='$you[nation]'"; +$query = "select nation,name,surlimit,history,color from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$query = "select nation,name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me[nation]'"; +$query = "select pop from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me[nation]'"; +$query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you[nation]'"; +$query = "select city from city where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if($ok == "수락") { // 서신 보낸 후 멸망,선양 등 했을때. - if($me[level] < 5) { + if($me['level'] < 5) { $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 종전 실패."; } elseif($losecitynum == 0) { $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 종전 실패."; } elseif($wincitynum == 0) { $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 종전 실패."; - } elseif($dip[state] != 0 && $dip[state] != 1) { + } elseif($dip['state'] != 0 && $dip['state'] != 1) { $mylog[count($mylog)] = "●아국과 교전중이 아닙니다. 종전 실패."; - } elseif($mynation[dipmsg] == "") { + } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【종전】$mynation[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; - $youlog[count($youlog)] = "$mynation[name](와)과 종전에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 종전에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 종전 수락"); + $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 종전 합의 하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【종전】$mynation['name'](이)가 $younation['name'](와)과 종전 합의 하였습니다."; + $youlog[count($youlog)] = "$mynation['name'](와)과 종전에 성공했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 종전에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 종전 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 종전 수락"); //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$mynation[nation]' and you='$younation[nation]'"; + $query = "update diplomacy set state='2',term='0' where me='$mynation['nation']' and you='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$younation[nation]' and you='$mynation[nation]'"; + $query = "update diplomacy set state='2',term='0' where me='$younation['nation']' and you='$mynation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //외교제한 - $query = "update nation set surlimit=24 where nation='$mynation[nation]'"; + $query = "update nation set surlimit=24 where nation='$mynation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set surlimit=24 where nation='$younation[nation]'"; + $query = "update nation set surlimit=24 where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 종전 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 동의"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 종전 동의"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 종전 동의"; - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation[name](이)가 종전을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 종전을 거부했습니다."; + $youlog[count($youlog)] = "$mynation['name'](이)가 종전을 거부했습니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 종전을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_merge.php b/twe/d_merge.php index 9a202e95..6de3d9de 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -25,32 +25,32 @@ $query = "select round(std(power)) as power,round(std(gennum)) as gennum from na $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $stdnation = MYDB_fetch_array($result); -$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='$you[nation]'"; +$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select city from city where nation='$me[nation]'"; +$query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you[nation]'"; +$query = "select city from city where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 -$query = "select state from diplomacy where me='$you[nation]' and (state='0' or state='1' or state='3' or state='5')"; +$query = "select state from diplomacy where me='$you['nation']' and (state='0' or state='1' or state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); //대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) -$query = "select you,state from diplomacy where me='$me[nation]' and (state='0' or state='1')"; +$query = "select you,state from diplomacy where me='$me['nation']' and (state='0' or state='1')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $warcount = MYDB_num_rows($result); // 아국과 교전중인 국가 골라냄 @@ -58,72 +58,72 @@ $valid = 1; for($i=0; $i < $warcount; $i++) { $acdip = MYDB_fetch_array($result); //교전중 국가A와 대상국B 외교 확인 - $query = "select state from diplomacy where me='$acdip[you]' and you='$you[nation]'"; + $query = "select state from diplomacy where me='$acdip['you']' and you='$you['nation']'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $abdip = MYDB_fetch_array($dipresult); - if($abdip[state] == 7) { + if($abdip['state'] == 7) { $valid = 0; } } if($ok == "수락") { // 서신 보낸 후 멸망 했을때. - if($me[level] < 5) { + if($me['level'] < 5) { $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 통합 실패."; - } elseif($mynation[surlimit] > 0) { + } elseif($mynation['surlimit'] > 0) { $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 통합 실패."; - } elseif($younation[surlimit] > 0) { + } elseif($younation['surlimit'] > 0) { $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 통합 실패."; } elseif($losecitynum == 0) { $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 통합 실패."; } elseif($wincitynum == 0) { $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 통합 실패."; - } elseif($mynation[power]+$younation[power] > $avgnation[power]+$stdnation[power]) { + } elseif($mynation['power']+$younation['power'] > $avgnation['power']+$stdnation['power']) { $mylog[count($mylog)] = "●양국 국력이 너무 높습니다. 통합 실패."; - } elseif($mynation[gennum]+$younation[gennum] > $avgnation[gennum]+$stdnation[gennum]) { + } elseif($mynation['gennum']+$younation['gennum'] > $avgnation['gennum']+$stdnation['gennum']) { $mylog[count($mylog)] = "●양국 장수가 많습니다. 통합 실패."; - } elseif(!isClose($connect, $younation[nation], $mynation[nation])) { + } elseif(!isClose($connect, $younation['nation'], $mynation['nation'])) { $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 통합 실패."; - } elseif($dip[state] == 0) { + } elseif($dip['state'] == 0) { $mylog[count($mylog)] = "●아국과 교전중입니다. 통합 실패."; } elseif($dipcount != 0) { $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 통합 실패."; } elseif($valid == 0) { $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 통합 실패."; - } elseif($mynation[dipmsg] == "") { + } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $youlog[count($youlog)] = "$mynation[name](이)가 통합에 동의했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합시도】$mynation[name](와)과 $younation[name](이)가 통합을 시도합니다."; - $mylog[count($mylog)] = "$younation[name](와)과 통합에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 통합에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 통합 시도"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 통합 시도"); + $youlog[count($youlog)] = "$mynation['name'](이)가 통합에 동의했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합시도】$mynation['name'](와)과 $younation['name'](이)가 통합을 시도합니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 통합에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 통합에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 통합 시도"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 통합 시도"); //외교 변경 - $query = "update diplomacy set state='3',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; + $query = "update diplomacy set state='3',term='24' where me='$mynation['nation']' and you='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='4',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; + $query = "update diplomacy set state='4',term='24' where me='$younation['nation']' and you='$mynation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 통합에 합의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 통합에 합의"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 통합에 합의"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 통합에 합의"; - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; + $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_scout.php b/twe/d_scout.php index 934a0503..bfe4c3c0 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -9,7 +9,7 @@ $query = "select startyear,year,month,killturn from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,139 +17,139 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,nation,level,capital,scout from nation where nation='$you[nation]'"; +$query = "select name,nation,level,capital,scout from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); -if($ok == "수락" && $me[level] < 12 && $nation[level] > 0 && $nation[scout] == 0 && $me[nation] != $nation[nation] && $admin[year] >= $admin[startyear]+3 && strpos($me['nations'], ",{$nation['nation']},") === false) { - $youlog[count($youlog)] = "$me[name] 등용에 성공했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $nation[name](으)로 망명하였습니다."; - $mylog[count($mylog)] = "$nation[name](으)로 망명하여 수도로 이동합니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$me[name] 등용에 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$nation[name](으)로 망명"); +if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scout'] == 0 && $me['nation'] != $nation['nation'] && $admin['year'] >= $admin['startyear']+3 && strpos($me['nations'], ",{$nation['nation']},") === false) { + $youlog[count($youlog)] = "$me['name'] 등용에 성공했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $nation['name'](으)로 망명하였습니다."; + $mylog[count($mylog)] = "$nation['name'](으)로 망명하여 수도로 이동합니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$me['name'] 등용에 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$nation['name'](으)로 망명"); // 임관내역 추가 $me['nations'] .= "{$nation['nation']},"; // 국가 변경, 도시 변경, 일반으로, 수도로 - $query = "update general set killturn='$admin[killturn]',belong=1,nation='$you[nation]',nations='{$me['nations']}',level=1,city='$nation[capital]' where no='$me[no]'"; + $query = "update general set killturn='$admin['killturn']',belong=1,nation='$you['nation']',nations='{$me['nations']}',level=1,city='$nation['capital']' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 재야가 아니면 명성N*10% 공헌N*10%감소 - if($me[level] > 0) { + if($me['level'] > 0) { // 1000 1000 남기고 환수 - if($me[gold] > 1000) { $gold = $me[gold] - 1000; $me[gold] = 1000; } else { $gold = 0; } - if($me[rice] > 1000) { $rice = $me[rice] - 1000; $me[rice] = 1000; } else { $rice = 0; } - $query = "update general set gold='$me[gold]',rice='$me[rice]',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$me[no]'"; + if($me['gold'] > 1000) { $gold = $me['gold'] - 1000; $me['gold'] = 1000; } else { $gold = 0; } + if($me['rice'] > 1000) { $rice = $me['rice'] - 1000; $me['rice'] = 1000; } else { $rice = 0; } + $query = "update general set gold='$me['gold']',rice='$me['rice']',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$me[nation]'"; + $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //재야이면 100 100 증가 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$me[no]'"; + $query = "update general set dedication=dedication+100,experience=experience+100 where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //유저이면 삭턴 리셋 - if($me[npc] < 2) { - $query = "update general set killturn='$admin[killturn]' where no='$me[no]'"; + if($me['npc'] < 2) { + $query = "update general set killturn='$admin['killturn']' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //태수 군사 시중 해제 - switch($me[level]) { + switch($me['level']) { case 4: - $query = "update city set gen1=0 where gen1='$me[no]'"; + $query = "update city set gen1=0 where gen1='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 3: - $query = "update city set gen2=0 where gen2='$me[no]'"; + $query = "update city set gen2=0 where gen2='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: - $query = "update city set gen3=0 where gen3='$me[no]'"; + $query = "update city set gen3=0 where gen3='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } //등용자 명성, 공헌 상승 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$you[no]'"; + $query = "update general set dedication=dedication+100,experience=experience+100 where no='$you['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 처리 - $query = "select no from troop where troop='$me[troop]'"; + $query = "select no from troop where troop='$me['troop']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 - if($troop[no] == $me[no]) { + if($troop['no'] == $me['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$me[troop]'"; + $query = "update general set troop='0' where troop='$me['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$me[troop]'"; + $query = "delete from troop where troop='$me['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$me[no]'"; + $query = "update general set troop='0' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //국가 기술력 그대로 - $query = "select no from general where nation='$nation[nation]'"; + $query = "select no from general where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 국가 기술력 그대로 - $query = "select no from general where nation='$me[nation]'"; + $query = "select no from general where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$me[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 수정 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($me[level] == 12) { +} elseif($me['level'] == 12) { $mylog[count($mylog)] = "●군주입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($nation[level] == 0) { +} elseif($nation['level'] == 0) { $mylog[count($mylog)] = "●없는 국가이거나 방랑군입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($nation[scout] != 0) { +} elseif($nation['scout'] != 0) { $mylog[count($mylog)] = "●임관 금지중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($admin[year] < $admin[startyear]+3) { +} elseif($admin['year'] < $admin['startyear']+3) { $mylog[count($mylog)] = "●초반 제한중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { $mylog[count($mylog)] = "●이미 임관했었던 국가입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$me[name](이)가 등용을 거부했습니다."; - $mylog[count($mylog)] = "$nation[name](으)로 망명을 거부했습니다."; + $youlog[count($youlog)] = "$me['name'](이)가 등용을 거부했습니다."; + $mylog[count($mylog)] = "$nation['name'](으)로 망명을 거부했습니다."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 거부',msg{$num}_type='10' where no='$me[no]'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 거부',msg{$num}_type='10' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_surrender.php b/twe/d_surrender.php index 799f448a..6c0349f3 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,32 +17,32 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select nation,name,power,gold,rice,surlimit,history,color from nation where nation='$you[nation]'"; +$query = "select nation,name,power,gold,rice,surlimit,history,color from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,power,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; +$query = "select nation,name,power,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select city from city where nation='$me[nation]'"; +$query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you[nation]'"; +$query = "select city from city where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; +$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 -$query = "select state from diplomacy where me='$you[nation]' and (state='0' or state='1' or state='3' or state='5')"; +$query = "select state from diplomacy where me='$you['nation']' and (state='0' or state='1' or state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); //대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) -$query = "select you,state from diplomacy where me='$me[nation]' and (state='0' or state='1')"; +$query = "select you,state from diplomacy where me='$me['nation']' and (state='0' or state='1')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $warcount = MYDB_num_rows($result); // 아국과 교전중인 국가 골라냄 @@ -50,70 +50,70 @@ $valid = 1; for($i=0; $i < $warcount; $i++) { $acdip = MYDB_fetch_array($result); //교전중 국가A와 대상국B 외교 확인 - $query = "select state from diplomacy where me='$acdip[you]' and you='$you[nation]'"; + $query = "select state from diplomacy where me='$acdip['you']' and you='$you['nation']'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $abdip = MYDB_fetch_array($dipresult); - if($abdip[state] == 7) { + if($abdip['state'] == 7) { $valid = 0; } } if($ok == "수락") { // 서신 보낸 후 멸망 했을때. - if($me[level] < 5) { + if($me['level'] < 5) { $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 투항 실패."; - } elseif($mynation[surlimit] > 0) { + } elseif($mynation['surlimit'] > 0) { $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 투항 실패."; - } elseif($younation[surlimit] > 0) { + } elseif($younation['surlimit'] > 0) { $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 투항 실패."; // } elseif($losecitynum == 0) { // $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 투항 실패."; } elseif($wincitynum == 0) { $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 투항 실패."; - } elseif($younation[power] / $mynation[power] <= 3) { + } elseif($younation['power'] / $mynation['power'] <= 3) { $mylog[count($mylog)] = "●아국과 상대국의 국력차이가 크지 않습니다. 투항 실패."; - } elseif($losecitynum != 0 && !isClose($connect, $younation[nation], $mynation[nation])) { + } elseif($losecitynum != 0 && !isClose($connect, $younation['nation'], $mynation['nation'])) { $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 투항 실패."; - } elseif($dip[state] == 0) { + } elseif($dip['state'] == 0) { $mylog[count($mylog)] = "●아국과 교전중입니다. 투항 실패."; } elseif($dipcount != 0) { $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 투항 실패."; } elseif($valid == 0) { $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 투항 실패."; - } elseif($mynation[dipmsg] == "") { + } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $youlog[count($youlog)] = "$mynation[name](이)가 합병에 동의했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【합병시도】$mynation[name](와)과 $younation[name](이)가 합병을 시도합니다."; - $mylog[count($mylog)] = "$younation[name](와)과 합병에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 합병에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병 시도"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 합병 시도"); + $youlog[count($youlog)] = "$mynation['name'](이)가 합병에 동의했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【합병시도】$mynation['name'](와)과 $younation['name'](이)가 합병을 시도합니다."; + $mylog[count($mylog)] = "$younation['name'](와)과 합병에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 합병에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병 시도"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 합병 시도"); //외교 변경 - $query = "update diplomacy set state='5',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; + $query = "update diplomacy set state='5',term='24' where me='$mynation['nation']' and you='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='6',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; + $query = "update diplomacy set state='6',term='24' where me='$younation['nation']' and you='$mynation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 합병에 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 합병에 동의"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 합병에 동의"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병에 동의"; - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; + $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/event_1.php b/twe/event_1.php index 90623529..9f477b2a 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -9,11 +9,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -36,14 +36,14 @@ $query = "select year,month,turnterm,isUnited from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -if($admin[isUnited] == 0) { +if($admin['isUnited'] == 0) { $query = "select no from general where npc<2 and age>50"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); + CheckHall($connect, $general['no']); } } @@ -55,11 +55,11 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; + $query = "select city,nation from city where nation='$nation['nation']' order by rand() limit 0,1"; $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result2); - $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; + $query = "update nation set capital='$city['city']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); } @@ -86,9 +86,9 @@ for($i=0; $i < 7; $i++) { $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $nationNum[$i] = $nation[nation]; + $nationNum[$i] = $nation['nation']; - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; + $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //태수,군사,시중 해제 @@ -105,24 +105,24 @@ for($i=0; $i < 7; $i++) { $query = "update general set level=1 where no='{$city[gen3]}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + $query = "update city set nation='$nation['nation']',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "select nation,level from nation where nation!='$nation[nation]'"; + $query = "select nation,level from nation where nation!='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $count = MYDB_num_rows($result); for($k=0; $k < $count; $k++) { $your = MYDB_fetch_array($result); - if($your[level] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; + if($your['level'] > 0) { + $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -137,54 +137,54 @@ for($i=0; $i < 7; $i++) { //////////////////////////장수////////////////////////////////////////////////// // 이름 통 무 지 꿈 특기 $gencount = 2001; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } //////////////////////////장수 끝/////////////////////////////////////////////// @@ -194,9 +194,9 @@ $query = "update general set gold=999999,rice=999999"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 이민족들이 궐기합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지의 이민족들이 궐기합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_2.php b/twe/event_2.php index b104b92b..ca8204e3 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -9,11 +9,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -36,14 +36,14 @@ $query = "select year,month,turnterm,isUnited from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -if($admin[isUnited] == 0) { +if($admin['isUnited'] == 0) { $query = "select no from general where npc<2 and age>50"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); + CheckHall($connect, $general['no']); } } @@ -55,11 +55,11 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; + $query = "select city,nation from city where nation='$nation['nation']' order by rand() limit 0,1"; $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result2); - $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; + $query = "update nation set capital='$city['city']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); } @@ -77,7 +77,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $info = MYDB_fetch_array($result); for($i=0; $i < 7; $i++) { - RegNation($connect, $name[$i], "800000", 99999, 99999, "오랑캐여 일어서라! 오랑캐 궐기!", $info[tch]+500, $eachCount, "병가", 0); + RegNation($connect, $name[$i], "800000", 99999, 99999, "오랑캐여 일어서라! 오랑캐 궐기!", $info['tch']+500, $eachCount, "병가", 0); } //////////////////////////외교////////////////////////////////////////////////// @@ -90,9 +90,9 @@ for($i=0; $i < 7; $i++) { $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $nationNum[$i] = $nation[nation]; + $nationNum[$i] = $nation['nation']; - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; + $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //태수,군사,시중 해제 @@ -109,24 +109,24 @@ for($i=0; $i < 7; $i++) { $query = "update general set level=1 where no='{$city[gen3]}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + $query = "update city set nation='$nation['nation']',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "select nation,level from nation where nation!='$nation[nation]'"; + $query = "select nation,level from nation where nation!='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $count = MYDB_num_rows($result); for($k=0; $k < $count; $k++) { $your = MYDB_fetch_array($result); - if($your[level] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; + if($your['level'] > 0) { + $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -141,54 +141,54 @@ for($i=0; $i < 7; $i++) { //////////////////////////장수////////////////////////////////////////////////// // 이름 통 무 지 꿈 특기 $gencount = 2001; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } for($k=1; $k <= $eachCount; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } //////////////////////////장수 끝/////////////////////////////////////////////// @@ -198,9 +198,9 @@ $query = "update general set gold=999999,rice=999999"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 오랑캐들이 궐기합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지의 오랑캐들이 궐기합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_3.php b/twe/event_3.php index a613f347..d7c5d58a 100644 --- a/twe/event_3.php +++ b/twe/event_3.php @@ -9,11 +9,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -36,14 +36,14 @@ $query = "select year,month,turnterm,isUnited from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -if($admin[isUnited] == 0) { +if($admin['isUnited'] == 0) { $query = "select no from general where npc<2 and age>50"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); + CheckHall($connect, $general['no']); } } @@ -54,14 +54,14 @@ $gencount = 2001; for($k=1; $k <= 200; $k++) { if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount, 0, 0, "무명장{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 0, 0, "무명장{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; } //////////////////////////장수 끝/////////////////////////////////////////////// //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지에서 인재들이 등장합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지에서 인재들이 등장합니다!"; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_4.php b/twe/event_4.php index 0b4ec99d..01886f85 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -9,11 +9,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION[p_id]'"; +$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me[userlevel] < 5) { +if($me['userlevel'] < 5) { echo " @@ -37,7 +37,7 @@ $query = "select no from general where user_id='jwh1807'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); -if($general[no] > 0) { +if($general['no'] > 0) { echo " @@ -81,15 +81,15 @@ if(rand()%2 == 0) { $intel = 150 - $leader - $power; } -RegGeneral4($connect,$admin[turnterm],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general[specage], $general[specage2], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; +RegGeneral4($connect,$admin['turnterm'],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general['specage'], $general[specage2], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; //////////////////////////장수 끝/////////////////////////////////////////////// //////////////////////////이벤트/////////////////////////////////////////////// -$log[0] = "●{$admin[month]}월:ⓝ유기체가 천하에 이름을 알립니다."; +$log[0] = "●{$admin['month']}월:ⓝ유기체가 천하에 이름을 알립니다."; pushAllLog($log); -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; +$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; pushHistory($connect, $history); echo ""; diff --git a/twe/func.php b/twe/func.php index df78a67b..a76f4fd8 100644 --- a/twe/func.php +++ b/twe/func.php @@ -109,7 +109,7 @@ function GetImageURL($imgsvr) { } function CheckLogin($type=0) { - if($_SESSION[p_id] == "") { + if($_SESSION['p_id'] == "") { if($type == 0) { echo ""; } else { echo ""; } exit(); @@ -181,7 +181,7 @@ function getScenario($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - switch($admin[scenario]) { + switch($admin['scenario']) { case 0: $str = "공백지모드"; break; case 1: $str = "역사모드1 : 184년 황건적의 난"; break; case 2: $str = "역사모드2 : 190년 반동탁연합"; break; @@ -212,10 +212,10 @@ function getScenario($connect) { } function CheckBlock($connect) { - $query = "select block from general where user_id='$_SESSION[p_id]'"; + $query = "select block from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - return $me[block]; + return $me['block']; } function NationCharCall($call) { @@ -1406,7 +1406,7 @@ function getTurn($connect, $general, $type, $font=1) { case 16: //전쟁 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 출병"; + $str[$i] = "【{$city['name']}】(으)로 출병"; break; case 17: //소집해제 $str[$i] = "소집 해제"; @@ -1415,7 +1415,7 @@ function getTurn($connect, $general, $type, $font=1) { case 21: //이동 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 이동"; + $str[$i] = "【{$city['name']}】(으)로 이동"; break; case 22: //등용 $double = $command[1]; @@ -1424,7 +1424,7 @@ function getTurn($connect, $general, $type, $font=1) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $str[$i] = "【{$general[name]}】(을)를 등용"; + $str[$i] = "【{$general['name']}】(을)를 등용"; break; case 25: //임관 $double = $command[1]; @@ -1433,9 +1433,9 @@ function getTurn($connect, $general, $type, $font=1) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if(!$nation[name]) { $nation[name] = '????'; } + if(!$nation['name']) { $nation['name'] = '????'; } - $str[$i] = "【{$nation[name]}】(으)로 임관"; + $str[$i] = "【{$nation['name']}】(으)로 임관"; break; case 26: //집합 $str[$i] = "집합"; @@ -1449,38 +1449,38 @@ function getTurn($connect, $general, $type, $font=1) { case 30: //강행 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 강행"; + $str[$i] = "【{$city['name']}】(으)로 강행"; break; case 31: //첩보 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 첩보 실행"; + $str[$i] = "【{$city['name']}】에 첩보 실행"; break; case 32: //화계 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 화계 실행"; + $str[$i] = "【{$city['name']}】에 화계 실행"; break; case 33: //탈취 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 탈취 실행"; + $str[$i] = "【{$city['name']}】에 탈취 실행"; break; case 34: //파괴 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 파괴 실행"; + $str[$i] = "【{$city['name']}】에 파괴 실행"; break; case 35: //선동 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 선동 실행"; + $str[$i] = "【{$city['name']}】에 선동 실행"; break; case 36: //기습 $double = $command[1]; $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 기습 실행"; + $str[$i] = "【{$city['name']}】에 기습 실행"; break; case 41: //단련 @@ -1498,8 +1498,8 @@ function getTurn($connect, $general, $type, $font=1) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 증여"; } - else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 증여"; } + if($fourth == 1) { $str[$i] = "【{$general['name']}】에게 금 {$double}00을 증여"; } + else { $str[$i] = "【{$general['name']}】에게 쌀 {$double}00을 증여"; } break; case 44: //헌납 $third = $command[2]; @@ -1512,11 +1512,11 @@ function getTurn($connect, $general, $type, $font=1) { $str[$i] = "하야"; break; case 46: //건국 - $query = "select makenation from general where no='$general[no]'"; + $query = "select makenation from general where no='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $str[$i] = "【{$general[makenation]}】(을)를 건국"; + $str[$i] = "【{$general['makenation']}】(을)를 건국"; break; case 47: //방랑 $str[$i] = "방랑"; @@ -1559,7 +1559,7 @@ function getTurn($connect, $general, $type, $font=1) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $str[$i] = "【{$general[name]}】에게 선양"; + $str[$i] = "【{$general['name']}】에게 선양"; break; case 55: //거병 $str[$i] = "방랑군 결성"; @@ -1616,8 +1616,8 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 포상"; } - else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 포상"; } + if($fourth == 1) { $str[$i] = "【{$general['name']}】에게 금 {$double}00을 포상"; } + else { $str[$i] = "【{$general['name']}】에게 쌀 {$double}00을 포상"; } break; case 24: //몰수 $fourth = $command[3]; @@ -1628,8 +1628,8 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게서 금 {$double}00을 몰수"; } - else { $str[$i] = "【{$general[name]}】에게서 쌀 {$double}00을 몰수"; } + if($fourth == 1) { $str[$i] = "【{$general['name']}】에게서 금 {$double}00을 몰수"; } + else { $str[$i] = "【{$general['name']}】에게서 쌀 {$double}00을 몰수"; } break; case 27: //발령 $third = $command[2]; @@ -1640,7 +1640,7 @@ function getCoreTurn($connect, $nation, $level) { $general = MYDB_fetch_array($result); $city = getCity($connect, $double, "name"); - $str[$i] = "【{$general[name]}】【{$city[name]}】(으)로 발령"; + $str[$i] = "【{$general['name']}】【{$city['name']}】(으)로 발령"; break; case 51: //항복권고 $double = $command[1]; @@ -1649,7 +1649,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에게 항복 권고"; + $str[$i] = "【{$nation['name']}】에게 항복 권고"; break; case 52: //원조 $fourth = $command[3]; @@ -1662,10 +1662,10 @@ function getCoreTurn($connect, $nation, $level) { $fourth *= 1000; $third *= 1000; - $str[$i] = "【{$nation[name]}】에게 국고 {$third} 병량 {$fourth} 원조"; + $str[$i] = "【{$nation['name']}】에게 국고 {$third} 병량 {$fourth} 원조"; break; case 53: //통합제의 - $query = "select makenation from general where level='$level' and nation='$nation[nation]'"; + $query = "select makenation from general where level='$level' and nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1675,7 +1675,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 【{$general[makenation]}】(으)로 통합 제의"; + $str[$i] = "【{$nation['name']}】에 【{$general['makenation']}】(으)로 통합 제의"; break; case 61: //불가침제의 $third = $command[2]; @@ -1685,7 +1685,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 {$third}년 불가침 제의"; + $str[$i] = "【{$nation['name']}】에 {$third}년 불가침 제의"; break; case 62: //선전 포고 $double = $command[1]; @@ -1694,7 +1694,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 선전 포고"; + $str[$i] = "【{$nation['name']}】에 선전 포고"; break; case 63: //종전 제의 $double = $command[1]; @@ -1703,7 +1703,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 종전 제의"; + $str[$i] = "【{$nation['name']}】에 종전 제의"; break; case 64: //파기 제의 $double = $command[1]; @@ -1712,27 +1712,27 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 파기 제의"; + $str[$i] = "【{$nation['name']}】에 파기 제의"; break; case 65: //초토 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 초토화"; + $str[$i] = "【{$city['name']}】(을)를 초토화"; break; case 66: //천도 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 천도"; + $str[$i] = "【{$city['name']}】(으)로 천도"; break; case 67: //증축 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 증축"; + $str[$i] = "【{$city['name']}】(을)를 증축"; break; case 68: //감축 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 감축"; + $str[$i] = "【{$city['name']}】(을)를 감축"; break; case 71: //필사즉생 $str[$i] = "필사즉생"; @@ -1740,17 +1740,17 @@ function getCoreTurn($connect, $nation, $level) { case 72: //백성동원 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 백성동원"; + $str[$i] = "【{$city['name']}】에 백성동원"; break; case 73: //수몰 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 수몰"; + $str[$i] = "【{$city['name']}】(을)를 수몰"; break; case 74: //허보 $double = $command[1]; $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 허보"; + $str[$i] = "【{$city['name']}】에 허보"; break; case 75: //피장파장 $double = $command[1]; @@ -1759,7 +1759,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 피장파장"; + $str[$i] = "【{$nation['name']}】에 피장파장"; break; case 76: //의병모집 $str[$i] = "의병모집"; @@ -1771,7 +1771,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 이호경식"; + $str[$i] = "【{$nation['name']}】에 이호경식"; break; case 78: //급습 $double = $command[1]; @@ -1780,7 +1780,7 @@ function getCoreTurn($connect, $nation, $level) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $str[$i] = "【{$nation[name]}】에 급습"; + $str[$i] = "【{$nation['name']}】에 급습"; break; case 81: //국기변경 $double = $command[1]; @@ -1858,41 +1858,41 @@ function CoreTurnTable() { function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; - $query = "select no,city,skin from general where user_id='$_SESSION[p_id]'"; + $query = "select no,city,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 도시 정보 - $city = getCity($connect, $me[city]); + $city = getCity($connect, $me['city']); - $query = "select name,color from nation where nation='$city[nation]'"; + $query = "select name,color from nation where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $pop = $city[pop] / $city[pop2] * 100; - $rate = $city[rate]; - $agri = $city[agri] / $city[agri2] * 100; - $comm = $city[comm] / $city[comm2] * 100; - $secu = $city[secu] / $city[secu2] * 100; - $def = $city[def] / $city[def2] * 100; - $wall = $city[wall] / $city[wall2] * 100; - if($city[trade] == 0) { + $pop = $city['pop'] / $city[pop2] * 100; + $rate = $city['rate']; + $agri = $city['agri'] / $city[agri2] * 100; + $comm = $city['comm'] / $city[comm2] * 100; + $secu = $city['secu'] / $city[secu2] * 100; + $def = $city['def'] / $city[def2] * 100; + $wall = $city['wall'] / $city[wall2] * 100; + if($city['trade'] == 0) { $trade = 0; $tradeStr = "상인없음"; } else { - $trade = ($city[trade]-95) * 10; - $tradeStr = $city[trade] . "%"; + $trade = ($city['trade']-95) * 10; + $tradeStr = $city['trade'] . "%"; } - if($nation[color] == "" || $me[skin] < 1) { $nation[color] = "000000"; } + if($nation['color'] == "" || $me['skin'] < 1) { $nation['color'] = "000000"; } echo " - - + - + - + - + - - + + - + - + - + - + - - - + + + - + - + - + - + - - + +
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name]
"; +
【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 $city['name']
"; - if($city[nation] == 0) { + if($city['nation'] == 0) { echo "공 백 지"; } else { - echo "지배 국가 【 {$nation[name]} 】"; + echo "지배 국가 【 {$nation['name']} 】"; } if($city[gen1] > 0) { @@ -1900,7 +1900,7 @@ function cityInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen1 = MYDB_fetch_array($result); } else { - $gen1[name] = '-'; + $gen1['name'] = '-'; } if($city[gen2] > 0) { @@ -1908,7 +1908,7 @@ function cityInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen2 = MYDB_fetch_array($result); } else { - $gen2[name] = '-'; + $gen2['name'] = '-'; } if($city[gen3] > 0) { @@ -1916,7 +1916,7 @@ function cityInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen3 = MYDB_fetch_array($result); } else { - $gen3[name] = '-'; + $gen3['name'] = '-'; } echo " @@ -1924,44 +1924,44 @@ function cityInfo($connect) {
주민".bar($pop, $me[skin])."".bar($pop, $me['skin'])." 민심".bar($rate, $me[skin])."".bar($rate, $me['skin'])." 태수{$gen1[name]}{$gen1['name']}
{$city[pop]}/{$city[pop2]}{$city[rate]}{$city['pop']}/{$city[pop2]}{$city['rate']}
농업".bar($agri, $me[skin])."".bar($agri, $me['skin'])." 상업".bar($comm, $me[skin])."".bar($comm, $me['skin'])." 치안".bar($secu, $me[skin])."".bar($secu, $me['skin'])." 군사{$gen2[name]}{$gen2['name']}
{$city[agri]}/{$city[agri2]}{$city[comm]}/{$city[comm2]}{$city[secu]}/{$city[secu2]}{$city['agri']}/{$city[agri2]}{$city['comm']}/{$city[comm2]}{$city['secu']}/{$city[secu2]}
수비".bar($def, $me[skin])."".bar($def, $me['skin'])." 성벽".bar($wall, $me[skin])."".bar($wall, $me['skin'])." 시세".bar($trade, $me[skin])."".bar($trade, $me['skin'])." 시중{$gen3[name]}{$gen3['name']}
{$city[def]}/{$city[def2]}{$city[wall]}/{$city[wall2]}{$city['def']}/{$city[def2]}{$city['wall']}/{$city[wall2]} {$tradeStr}
@@ -1975,27 +1975,27 @@ function myNationInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin,no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select skin,no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='$me[nation]'"; + $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 + $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='$nation['nation']'"; // 도시 이름 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='$nation[nation]'"; // 장수 목록 + $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='$nation['nation']'"; // 장수 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name from general where nation='$nation[nation]' and level='12'"; + $query = "select name from general where nation='$nation['nation']' and level='12'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level12 = MYDB_fetch_array($genresult); - $query = "select name from general where nation='$nation[nation]' and level='11'"; + $query = "select name from general where nation='$nation['nation']' and level='11'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level11 = MYDB_fetch_array($genresult); @@ -2003,12 +2003,12 @@ function myNationInfo($connect) { 【재 야】"; } - else { echo "style=font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } + if($me['skin'] < 1) { + if($me['nation'] == 0) { echo "style=font-weight:bold;font-size:13;>【재 야】"; } + else { echo "style=font-weight:bold;font-size:13;>국가【 {$nation['name']} 】"; } } else { - if($me[nation] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13;>【재 야】"; } - else { echo "style=color:".newColor($nation[color]).";background-color:{$nation[color]};font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } + if($me['nation'] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13;>【재 야】"; } + else { echo "style=color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13;>국가【 {$nation['name']} 】"; } } echo " @@ -2016,71 +2016,71 @@ function myNationInfo($connect) { 성 향 - ".getNationType($nation[type])." (".getNationType2($nation[type], $me[skin]).") + ".getNationType($nation['type'])." (".getNationType2($nation['type'], $me['skin']).") - ".getLevel(12, $nation[level])." - ";echo $level12==''?"-":"$level12[name]"; echo " - ".getLevel(11, $nation[level])." - ";echo $level11==''?"-":"$level11[name]"; echo " + ".getLevel(12, $nation['level'])." + ";echo $level12==''?"-":"$level12['name']"; echo " + ".getLevel(11, $nation['level'])." + ";echo $level11==''?"-":"$level11['name']"; echo " 총주민 - ";echo $me[nation]==0?"해당 없음":"$city[totpop]/$city[maxpop]";echo " + ";echo $me['nation']==0?"해당 없음":"$city['totpop']/$city['maxpop']";echo " 총병사 - ";echo $me[nation]==0?"해당 없음":"$general[totcrew]/$general[maxcrew]"; echo " + ";echo $me['nation']==0?"해당 없음":"$general['totcrew']/$general['maxcrew']"; echo " 국 고 - ";echo $me[nation]==0?"해당 없음":"$nation[gold]";echo " + ";echo $me['nation']==0?"해당 없음":"$nation['gold']";echo " 병 량 - ";echo $me[nation]==0?"해당 없음":"$nation[rice]";echo " + ";echo $me['nation']==0?"해당 없음":"$nation['rice']";echo " 지급율 "; - if($me[nation] == 0) { + if($me['nation'] == 0) { echo "해당 없음"; } else { - echo $nation[bill]==0?"0 %":"$nation[bill] %"; + echo $nation['bill']==0?"0 %":"$nation['bill'] %"; } echo " 세 율 "; - if($me[nation] == 0) { + if($me['nation'] == 0) { echo "해당 없음"; } else { - echo $nation[rate]==0?"0 %":"$nation[rate] %"; + echo $nation['rate']==0?"0 %":"$nation['rate'] %"; } - $techCall = getTechCall($nation[tech]); + $techCall = getTechCall($nation['tech']); - if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $nation[tech] = "{$nation[tech]}"; } - else { $nation[tech] = "{$nation[tech]}"; } + if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $nation['tech'] = "{$nation['tech']}"; } + else { $nation['tech'] = "{$nation['tech']}"; } - $nation[tech] = "$techCall / $nation[tech]"; + $nation['tech'] = "$techCall / $nation['tech']"; - if($nation[tricklimit] != 0) { $nation[tricklimit] = "$nation[tricklimit]턴"; } - else { $nation[tricklimit] = "가 능"; } + if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "$nation['tricklimit']턴"; } + else { $nation['tricklimit'] = "가 능"; } - if($nation[surlimit] != 0) { $nation[surlimit] = "$nation[surlimit]턴"; } - else { $nation[surlimit] = "가 능"; } + if($nation['surlimit'] != 0) { $nation['surlimit'] = "$nation['surlimit']턴"; } + else { $nation['surlimit'] = "가 능"; } - if($nation[scout] != 0) { $nation[scout] = "금 지"; } - else { $nation[scout] = "허 가"; } + if($nation['scout'] != 0) { $nation['scout'] = "금 지"; } + else { $nation['scout'] = "허 가"; } - if($nation[war] != 0) { $nation[war] = "금 지"; } - else { $nation[war] = "허 가"; } + if($nation['war'] != 0) { $nation['war'] = "금 지"; } + else { $nation['war'] = "허 가"; } - if($me[skin] == 0) { - $nation[tech] = unfont($nation[tech]); - $nation[tricklimit] = unfont($nation[tricklimit]); - $nation[surlimit] = unfont($nation[surlimit]); - $nation[scout] = unfont($nation[scout]); - $nation[war] = unfont($nation[war]); + if($me['skin'] == 0) { + $nation['tech'] = unfont($nation['tech']); + $nation['tricklimit'] = unfont($nation['tricklimit']); + $nation['surlimit'] = unfont($nation['surlimit']); + $nation['scout'] = unfont($nation['scout']); + $nation['war'] = unfont($nation['war']); } echo " @@ -2088,27 +2088,27 @@ function myNationInfo($connect) { 속 령 - ";echo $me[nation]==0?"-":"$city[cnt]"; echo " + ";echo $me['nation']==0?"-":"$city['cnt']"; echo " 장 수 - ";echo $me[nation]==0?"-":"$general[cnt]"; echo " + ";echo $me['nation']==0?"-":"$general['cnt']"; echo " 국 력 - $nation[power] + $nation['power'] 기술력 - ";echo $me[nation]==0?"-":"$nation[tech]"; echo " + ";echo $me['nation']==0?"-":"$nation['tech']"; echo " 전 략 - $nation[tricklimit] + $nation['tricklimit'] 외 교 - $nation[surlimit] + $nation['surlimit'] 임 관 - $nation[scout] + $nation['scout'] 전 쟁 - $nation[war] + $nation['war'] "; @@ -2151,53 +2151,53 @@ function commandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='$_SESSION[p_id]'"; + $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $troop = getTroop($connect, $me[troop]); - $city = getCity($connect, $me[city]); + $troop = getTroop($connect, $me['troop']); + $city = getCity($connect, $me['city']); $query = "select nation from nation"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); - $query = "select city from city where nation='$me[nation]'"; + $query = "select city from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); - $query = "select no from general where nation='$me[nation]'"; + $query = "select no from general where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select type,level from nation where nation='$me[nation]'"; + $query = "select type,level from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $develcost = $admin[develcost]; - $develcostA = $admin[develcost]; $colorA = 0; - $develcostB = $admin[develcost]; $colorB = 0; - $develcostC = $admin[develcost]; $colorC = 0; - $develcostD = $admin[develcost]; $colorD = 0; - $develcostE = $admin[develcost]*2; $colorE = 0; - $develcost3 = $admin[develcost]*3; - $develcost5 = $admin[develcost]*5; + $develcost = $admin['develcost']; + $develcostA = $admin['develcost']; $colorA = 0; + $develcostB = $admin['develcost']; $colorB = 0; + $develcostC = $admin['develcost']; $colorC = 0; + $develcostD = $admin['develcost']; $colorD = 0; + $develcostE = $admin['develcost']*2; $colorE = 0; + $develcost3 = $admin['develcost']*3; + $develcost5 = $admin['develcost']*5; // 농상 국가보정 - if($nation[type] == 2 || $nation[type] == 12) { $develcostA *= 0.8; $colorA = 1; } - if($nation[type] == 8 || $nation[type] == 11) { $develcostA *= 1.2; $colorA = 2; } + if($nation['type'] == 2 || $nation['type'] == 12) { $develcostA *= 0.8; $colorA = 1; } + if($nation['type'] == 8 || $nation['type'] == 11) { $develcostA *= 1.2; $colorA = 2; } // 기술 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $develcostB *= 0.8; $colorB = 1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $develcostB *= 1.2; $colorB = 2; } + if($nation['type'] == 3 || $nation['type'] == 13) { $develcostB *= 0.8; $colorB = 1; } + if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $develcostB *= 1.2; $colorB = 2; } // 수성 국가보정 - if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $develcostC *= 0.8; $colorC = 1; } - if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $develcostC *= 1.2; $colorC = 2; } + if($nation['type'] == 3 || $nation['type'] == 5 || $nation['type'] == 10 || $nation['type'] == 11) { $develcostC *= 0.8; $colorC = 1; } + if($nation['type'] == 4 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 13) { $develcostC *= 1.2; $colorC = 2; } // 치안 국가보정 - if($nation[type] == 1 || $nation[type] == 4) { $develcostD *= 0.8; $colorD = 1; } - if($nation[type] == 6 || $nation[type] == 9) { $develcostD *= 1.2; $colorD = 2; } + if($nation['type'] == 1 || $nation['type'] == 4) { $develcostD *= 0.8; $colorD = 1; } + if($nation['type'] == 6 || $nation['type'] == 9) { $develcostD *= 1.2; $colorD = 2; } // 민심,정착장려 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $develcostE *= 0.8; $colorE = 1; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $develcostE *= 1.2; $colorE = 2; } + if($nation['type'] == 2 || $nation['type'] == 4 || $nation['type'] == 7 || $nation['type'] == 10) { $develcostE *= 0.8; $colorE = 1; } + if($nation['type'] == 1 || $nation['type'] == 3 || $nation['type'] == 9) { $develcostE *= 1.2; $colorE = 2; } $develcostA = round($develcostA); $develcostB = round($develcostB); @@ -2210,7 +2210,7 @@ function commandTable($connect) { addCommand("휴 식", 0); addCommand("요 양", 50); commandGroup("========= 내 정 =========="); - if($me[level] >= 1 && ($citycount != 0 || $admin[year] >= $admin[startyear]+3) && $city[supply] != 0) { + if($me['level'] >= 1 && ($citycount != 0 || $admin['year'] >= $admin['startyear']+3) && $city['supply'] != 0) { addCommand("농지개간(지력경험, 자금$develcostA)", 1, 1, $colorA); addCommand("상업투자(지력경험, 자금$develcostA)", 2, 1, $colorA); addCommand("기술연구(지력경험, 자금$develcostB)", 3, 1, $colorB); @@ -2229,14 +2229,14 @@ function commandTable($connect) { addCommand("정착장려(통솔경험, 군량$develcostE)", 7, 0); addCommand("주민선정(통솔경험, 군량$develcostE)", 4, 0); } - if($me[level] >= 1 && (($nation[level] > 0 && $city[nation] == $me[nation] && $city[supply] != 0) || $nation[level] == 0)) { + if($me['level'] >= 1 && (($nation['level'] > 0 && $city['nation'] == $me['nation'] && $city['supply'] != 0) || $nation['level'] == 0)) { addCommand("물자조달(랜덤경험)", 9, 1); } else { addCommand("물자조달(랜덤경험)", 9, 0); } commandGroup("", 1); commandGroup("========= 군 사 =========="); - if($me[level] >= 1 && $citycount > 0) { + if($me['level'] >= 1 && $citycount > 0) { addCommand("첩보(통솔경험, 자금$develcost3, 군량$develcost3)", 31); addCommand("징병(통솔경험)", 11); addCommand("모병(통솔경험, 자금x2)", 12); @@ -2253,7 +2253,7 @@ function commandTable($connect) { //addCommand("전투태세/3턴(통솔경험, 자금↓)", 15, 0); addCommand("출병", 16, 0); } - if($me[crew] > 0) { + if($me['crew'] > 0) { addCommand("소집해제(병사↓, 주민↑)", 17); } else { addCommand("소집해제(병사↓, 주민↑)", 17, 0); @@ -2264,34 +2264,34 @@ function commandTable($connect) { addCommand("이동(통솔경험, 자금$develcost, 사기↓)", 21); addCommand("강행(통솔경험, 자금$develcost5, 병력/사기/훈련↓)", 30); - if($nation[level] > 0 && $me[level] >= 1) { + if($nation['level'] > 0 && $me['level'] >= 1) { addCommand("인재탐색(랜덤경험, 자금$develcost)", 29); } else { addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0); } - if($me[level] >= 1 && $city[supply] != 0) { + if($me['level'] >= 1 && $city['supply'] != 0) { addCommand("등용(자금{$develcost5}+장수가치)", 22); } else { addCommand("등용(자금{$develcost5}+장수가치)", 22, 0); } - if($me[no] == $troop[no] && $citycount > 0 && $city[supply] != 0 && $city[nation] == $me[nation]) { + if($me['no'] == $troop['no'] && $citycount > 0 && $city['supply'] != 0 && $city['nation'] == $me['nation']) { addCommand("집합(통솔경험)", 26); } else { addCommand("집합(통솔경험)", 26, 0); } - if($me[level] >= 1 && $me[level] <= 12 && $nation[level] > 0) { + if($me['level'] >= 1 && $me['level'] <= 12 && $nation['level'] > 0) { addCommand("귀환(통솔경험)", 28); } else { addCommand("귀환(통솔경험)", 28, 0); } - if($me[level] == 0 && $nationcount != 0 && $me[makelimit] == 0) { + if($me['level'] == 0 && $nationcount != 0 && $me['makelimit'] == 0) { addCommand("임관", 25); } else { addCommand("임관", 25, 0); } commandGroup("", 1); commandGroup("========= 계 략 =========="); - if($me[level] >= 1 && (($nation[level] > 0 && $city[nation] == $me[nation] && $city[supply] != 0) || $nation[level] == 0)) { + if($me['level'] >= 1 && (($nation['level'] > 0 && $city['nation'] == $me['nation'] && $city['supply'] != 0) || $nation['level'] == 0)) { addCommand("화계(지력경험, 자금$develcost5, 군량$develcost5)", 32); addCommand("탈취(무력경험, 자금$develcost5, 군량$develcost5)", 33); addCommand("파괴(무력경험, 자금$develcost5, 군량$develcost5)", 34); @@ -2306,55 +2306,55 @@ function commandTable($connect) { } commandGroup("", 1); commandGroup("========= 개 인 =========="); - if($me[level] >= 1) { + if($me['level'] >= 1) { addCommand("단련(자금$develcost, 군량$develcost)", 41); } else { addCommand("단련(자금$develcost, 군량$develcost)", 41, 0); } addCommand("견문(자금?, 군량?, 경험치?)", 42); - if($city[trade] > 0 || $me[special] == 30) { + if($city['trade'] > 0 || $me['special'] == 30) { addCommand("장비매매", 48); addCommand("군량매매", 49); } else { addCommand("장비매매", 48, 0); addCommand("군량매매", 49, 0); } - if($city[supply] != 0 && $city[nation] == $me[nation]) { + if($city['supply'] != 0 && $city['nation'] == $me['nation']) { addCommand("증여(통솔경험)", 43); } else { addCommand("증여(통솔경험)", 43, 0); } - if($me[level] >= 1 && $city[supply] != 0 && $city[nation] == $me[nation]) { + if($me['level'] >= 1 && $city['supply'] != 0 && $city['nation'] == $me['nation']) { addCommand("헌납(통솔경험)", 44); } else { addCommand("헌납(통솔경험)", 44, 0); } - if($me[npc] == 0) { - if($me[level] >= 1 && $me[level] < 12) { + if($me['npc'] == 0) { + if($me['level'] >= 1 && $me['level'] < 12) { addCommand("하야", 45); } else { addCommand("하야", 45, 0); } } - if($me[level] == 0) { + if($me['level'] == 0) { addCommand("거병", 55); } else { addCommand("거병", 55, 0); } - if($me[level] == 12 && - ($city[level] == 5 || $city[level] == 6) && - $city[nation] == 0 && - $me[makelimit] == 0 && + if($me['level'] == 12 && + ($city['level'] == 5 || $city['level'] == 6) && + $city['nation'] == 0 && + $me['makelimit'] == 0 && $gencount >= 2 && $citycount == 0 && - $admin[year] < $admin[startyear]+2 + $admin['year'] < $admin['startyear']+2 ) { addCommand("건국", 46); } else { addCommand("건국", 46, 0); } - if($me[level] == 12) { + if($me['level'] == 12) { addCommand("선양", 54); if($citycount != 0) { addCommand("방랑", 47); @@ -2368,7 +2368,7 @@ function commandTable($connect) { addCommand("방랑", 47, 0); addCommand("해산", 56, 0); } - if($me[level] > 1 && $me[level] < 12) { + if($me['level'] > 1 && $me['level'] < 12) { addCommand("모반시도", 57); } else { addCommand("모반시도", 57, 0); @@ -2385,25 +2385,25 @@ function CoreCommandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,city,level from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,city,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select level,colset from nation where nation='$me[nation]'"; + $query = "select level,colset from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from general where nation='$me[nation]'"; + $query = "select no from general where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); - $query = "select supply from city where city='$me[city]'"; + $query = "select supply from city where city='$me['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - if($nation[level] > 0) { $valid = 1; } + if($nation['level'] > 0) { $valid = 1; } else { $valid = 0; } - if($city[supply] == 0) { $valid = 0; } + if($city['supply'] == 0) { $valid = 0; } echo " "; } + if($me['level'] >= 1) { echo ""; } else { echo "【회 의 실】"; } - if($me[level] >= 5) { echo ""; } + if($me['level'] >= 5) { echo ""; } else { echo "【기 밀 실】"; } - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo "【부대 편성】"; } - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo "【인 사 부】"; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo "【내 무 부】"; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo "【사 령 부】"; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo "【암 행 부】"; } - echo ""; - echo ""; + echo ""; + echo ""; echo " "; @@ -2515,31 +2515,31 @@ function commandButton($connect) { "; - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me[level] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - echo ""; - echo ""; - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } + echo ""; + echo ""; + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo ""; } - echo ""; - echo ""; + echo ""; + echo ""; echo "
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; } function myInfo($connect) { - $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; + $query = "select no,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - generalInfo($connect, $me[no], $me[skin]); + generalInfo($connect, $me['no'], $me['skin']); } function generalInfo($connect, $no, $skin) { @@ -2549,7 +2549,7 @@ function generalInfo($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin from general where user_id='$_SESSION[p_id]'"; + $query = "select skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2557,14 +2557,14 @@ function generalInfo($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select nation,level,color from nation where nation='$general[nation]'"; + $query = "select nation,level,color from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } @@ -2574,101 +2574,101 @@ function generalInfo($connect, $no, $skin) { $lbonus = ""; } - $troop = getTroop($connect, $general[troop]); + $troop = getTroop($connect, $general['troop']); - $level = getLevel($general[level], $nation[level]); - if($general[level] == 2) { - $query = "select name from city where gen3='$general[no]'"; + $level = getLevel($general['level'], $nation['level']); + if($general['level'] == 2) { + $query = "select name from city where gen3='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; - } elseif($general[level] == 3) { - $query = "select name from city where gen2='$general[no]'"; + $level = $city['name']." ".$level; + } elseif($general['level'] == 3) { + $query = "select name from city where gen2='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; - } elseif($general[level] == 4) { - $query = "select name from city where gen1='$general[no]'"; + $level = $city['name']." ".$level; + } elseif($general['level'] == 4) { + $query = "select name from city where gen1='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; + $level = $city['name']." ".$level; } - $call = getCall($general[leader], $general[power], $general[intel]); - $typename = getTypename($general[crewtype]); - $weapname = getWeapName($general[weap]); - $bookname = getBookName($general[book]); - $horsename = getHorseName($general[horse]); - $itemname = getItemName($general[item]); - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); + $call = getCall($general['leader'], $general['power'], $general['intel']); + $typename = getTypename($general['crewtype']); + $weapname = getWeapName($general['weap']); + $bookname = getBookName($general['book']); + $horsename = getHorseName($general['horse']); + $itemname = getItemName($general['item']); + if($general['injury'] > 0) { + $leader = floor($general['leader'] * (100 - $general['injury'])/100); + $power = floor($general['power'] * (100 - $general['injury'])/100); + $intel = floor($general['intel'] * (100 - $general['injury'])/100); } else { - $leader = $general[leader]; - $power = $general[power]; - $intel = $general[intel]; + $leader = $general['leader']; + $power = $general['power']; + $intel = $general['intel']; } - if($general[injury] > 60) { $color = ""; $injury = "위독"; } - elseif($general[injury] > 40) { $color = ""; $injury = "심각"; } - elseif($general[injury] > 20) { $color = ""; $injury = "중상"; } - elseif($general[injury] > 0) { $color = ""; $injury = "경상"; } + if($general['injury'] > 60) { $color = ""; $injury = "위독"; } + elseif($general['injury'] > 40) { $color = ""; $injury = "심각"; } + elseif($general['injury'] > 20) { $color = ""; $injury = "중상"; } + elseif($general['injury'] > 0) { $color = ""; $injury = "경상"; } else { $color = ""; $injury = "건강"; } - $remaining = substr($general[turntime], 14, 2) - date('i'); + $remaining = substr($general['turntime'], 14, 2) - date('i'); if($remaining < 0) { $remaining = 60 + $remaining; } - if($general[userlevel] > 2) { $specUser = "특별"; } + if($general['userlevel'] > 2) { $specUser = "특별"; } else { $specUser = "일반"; } - if($general[block] > 0) { $specUser = "블럭"; } + if($general['block'] > 0) { $specUser = "블럭"; } $specUser = ''; - if($nation[color] == "" || $skin < 1) { $nation[color] = "000000"; } + if($nation['color'] == "" || $skin < 1) { $nation['color'] = "000000"; } - if($general[age] < 60) { $general[age] = "$general[age] 세"; } - elseif($general[age] < 80) { $general[age] = "$general[age] 세"; } - else { $general[age] = "$general[age] 세"; } + if($general['age'] < 60) { $general['age'] = "$general['age'] 세"; } + elseif($general['age'] < 80) { $general['age'] = "$general['age'] 세"; } + else { $general['age'] = "$general['age'] 세"; } - $general[connect] = round($general[connect] / 10, 0) * 10; - $special = $general[special] == 0 ? "{$general[specage]}세" : "".getGenSpecial($general[special]).""; + $general['connect'] = round($general['connect'] / 10, 0) * 10; + $special = $general['special'] == 0 ? "{$general['specage']}세" : "".getGenSpecial($general['special']).""; $special2 = $general[special2] == 0 ? "{$general[specage2]}세" : "".getGenSpecial($general[special2]).""; - switch($general[personal]) { + switch($general['personal']) { case 2: case 4: - $atmos = "{$general[atmos]} (+5)"; break; + $atmos = "{$general['atmos']} (+5)"; break; case 0: case 9: case 10: - $atmos = "{$general[atmos]} (-5)"; break; + $atmos = "{$general['atmos']} (-5)"; break; default: - $atmos = "$general[atmos]"; break; + $atmos = "$general['atmos']"; break; } - switch($general[personal]) { + switch($general['personal']) { case 3: case 5: - $train = "{$general[train]} (+5)"; break; + $train = "{$general['train']} (+5)"; break; case 1: case 8: case 10: - $train = "{$general[train]} (-5)"; break; + $train = "{$general['train']} (-5)"; break; default: - $train = "$general[train]"; break; + $train = "$general['train']"; break; } - if($general[troop] == 0) { $troop[name] = "-"; } - if($general[mode] == 2) { $general[mode] = "수비 함(훈사80)"; } - elseif($general[mode] == 1) { $general[mode] = "수비 함(훈사60)"; } - else { $general[mode] = "수비 안함"; } + if($general['troop'] == 0) { $troop['name'] = "-"; } + if($general['mode'] == 2) { $general['mode'] = "수비 함(훈사80)"; } + elseif($general['mode'] == 1) { $general['mode'] = "수비 함(훈사60)"; } + else { $general['mode'] = "수비 안함"; } if($skin == 0) { - $general[age] = unfont($general[age]); + $general['age'] = unfont($general['age']); $special = unfont($special); $special2 = unfont($special2); $atmos = unfont($atmos); $train = unfont($train); - $general[mode] = unfont($general[mode]); + $general['mode'] = unfont($general['mode']); } - $weapImage = "{$images}/weap{$general[crewtype]}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; }; - $imageTemp = GetImageURL($general[imgsvr]); + $weapImage = "{$images}/weap{$general['crewtype']}.jpg"; + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; }; + $imageTemp = GetImageURL($general['imgsvr']); echo " - - + + @@ -2692,9 +2692,9 @@ function generalInfo($connect, $no, $skin) { - + - + @@ -2702,9 +2702,9 @@ function generalInfo($connect, $no, $skin) { - + - + @@ -2716,34 +2716,34 @@ function generalInfo($connect, $no, $skin) { - - + + - + - + - + - + - +
0?" background={$imageTemp}/{$general[picture]}":""; echo "> {$specUser} {$general[name]} 【 {$level} | {$call} | {$color}{$injury} 】 ".substr($general[turntime], 11)."0?" background={$imageTemp}/{$general['picture']}":""; echo "> {$specUser} {$general['name']} 【 {$level} | {$call} | {$color}{$injury} 】 ".substr($general['turntime'], 11)."
통솔
0?" background={$weapImage}":""; echo ">  자금$general[gold]$general['gold'] 군량$general[rice]$general['rice'] 도구 $itemname
병종 $typename 병사$general[crew]$general['crew'] 성격".getGenChar($general[personal])."".getGenChar($general['personal'])."
훈련
Lv {$general[explevel]} ".bar(getLevelPer($general[experience], $general[explevel]), $skin, 20)." {$general['explevel']} ".bar(getLevelPer($general['experience'], $general['explevel']), $skin, 20)." 연령$general[age]$general['age']
수비$general[mode]$general['mode'] 삭턴$general[killturn] 턴$general['killturn'] 턴 실행 $remaining 분 남음
부대$troop[name]$troop['name'] 벌점".getConnect($general[connect])." $general[connect]($general[con])".getConnect($general['connect'])." $general['connect']($general['con'])
"; } function myInfo2($connect) { - $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; + $query = "select no,skin from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - generalInfo2($connect, $me[no], $me[skin]); + generalInfo2($connect, $me['no'], $me['skin']); } function generalInfo2($connect, $no, $skin) { @@ -2753,22 +2753,22 @@ function generalInfo2($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[winrate] = round($general[winrate], 2); - $general[killrate] = round($general[killrate], 2); + $general['winrate'] = round($general['winrate'], 2); + $general['killrate'] = round($general['killrate'], 2); - switch($general[personal]) { + switch($general['personal']) { case 0: case 1; case 6: - $experience = "".getHonor($general[experience])." ($general[experience])"; break; + $experience = "".getHonor($general['experience'])." ($general['experience'])"; break; case 4: case 5: case 7: case 10: - $experience = "".getHonor($general[experience])." ($general[experience])"; break; + $experience = "".getHonor($general['experience'])." ($general['experience'])"; break; default: - $experience = getHonor($general[experience])." ($general[experience])"; break; + $experience = getHonor($general['experience'])." ($general['experience'])"; break; } - switch($general[personal]) { + switch($general['personal']) { case 10: - $dedication = "".getDed($general[dedication])." ($general[dedication])"; break; + $dedication = "".getDed($general['dedication'])." ($general['dedication'])"; break; default: - $dedication = getDed($general[dedication])." ($general[dedication])"; break; + $dedication = getDed($general['dedication'])." ($general['dedication'])"; break; } if($skin == 0) { @@ -2804,27 +2804,27 @@ function generalInfo2($connect, $no, $skin) { 전투 - $general[warnum] + $general['warnum'] 계략 - $general[firenum] + $general['firenum'] 사관 - $general[belong]년 + $general['belong']년 승률 - $general[winrate] % + $general['winrate'] % 승리 - $general[killnum] + $general['killnum'] 패배 - $general[deathnum] + $general['deathnum'] 살상률 - $general[killrate] % + $general['killrate'] % 사살 - $general[killcrew] + $general['killcrew'] 피살 - $general[deathcrew] + $general['deathcrew'] @@ -2929,7 +2929,7 @@ function pushAuctionLog($connect, $log) { function pushGenLog($general, $log) { $size = count($log); if($size > 0) { - $fp = fopen("logs/gen{$general[no]}.txt", "a"); + $fp = fopen("logs/gen{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { fwrite($fp, $log[$i]."\r\n"); } @@ -2940,7 +2940,7 @@ function pushGenLog($general, $log) { function pushBatRes($general, $log) { $size = count($log); if($size > 0) { - $fp = fopen("logs/batres{$general[no]}.txt", "a"); + $fp = fopen("logs/batres{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { fwrite($fp, $log[$i]."\r\n"); } @@ -2951,7 +2951,7 @@ function pushBatRes($general, $log) { function pushBatLog($general, $log) { $size = count($log); if($size > 0) { - $fp = fopen("logs/batlog{$general[no]}.txt", "a"); + $fp = fopen("logs/batlog{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { fwrite($fp, $log[$i]."\r\n"); } @@ -3062,20 +3062,20 @@ function MyHistory($connect, $no, $skin) { $query = "select history from general where no='$no'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - echo ConvertLog($general[history], $skin); + echo ConvertLog($general['history'], $skin); } function addHistory($connect, $me, $history) { - $me[history] = "{$history}
{$me[history]}"; - $query = "update general set history='$me[history]' where no='$me[no]'"; + $me['history'] = "{$history}
{$me['history']}"; + $query = "update general set history='$me['history']' where no='$me['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); return $me; } function addNationHistory($connect, $nation, $history) { - $nation[history] = "{$nation[history]}{$history}
"; - $query = "update nation set history='$nation[history]' where nation='$nation[nation]'"; + $nation['history'] = "{$nation['history']}{$history}
"; + $query = "update nation set history='$nation['history']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); return $nation; @@ -3087,7 +3087,7 @@ function adminMsg($connect, $skin=1) { $admin = MYDB_fetch_array($result); echo "운영자 메세지 : "; - echo $admin[msg].""; + echo $admin['msg'].""; } function allButton($connect) { @@ -3095,7 +3095,7 @@ function allButton($connect) { $query = "select npcmode from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - if($admin[npcmode] == 1) { + if($admin['npcmode'] == 1) { $site = "a_npcList.php"; $call = "빙의일람"; } else { @@ -3132,23 +3132,23 @@ function onlinenum($connect) { $query = "select online from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $game = MYDB_fetch_array($result); - return $game[online]; + return $game['online']; } function onlinegen($connect) { $onlinegen = ""; - if($_SESSION[p_nation] == 0) { + if($_SESSION['p_nation'] == 0) { $query = "select onlinegen from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $game = MYDB_fetch_array($result); - $onlinegen = $game[onlinegen]; + $onlinegen = $game['onlinegen']; } else { - $query = "select onlinegen from nation where nation='$_SESSION[p_nation]'"; + $query = "select onlinegen from nation where nation='$_SESSION['p_nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $onlinegen = $nation[onlinegen]; + $onlinegen = $nation['onlinegen']; } return $onlinegen; } @@ -3157,65 +3157,65 @@ function onlineNation($connect) { $query = "select onlinenation from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $game = MYDB_fetch_array($result); - return $game[onlinenation]; + return $game['onlinenation']; } function nationMsg($connect) { - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select msg from nation where nation='$me[nation]'"; + $query = "select msg from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - echo "".$nation[msg].""; + echo "".$nation['msg'].""; } function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,level,msgindex,userlevel from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select msg{$me[msgindex]}_who as reply,msg{$me[msgindex]}_type as type from general where user_id='$_SESSION[p_id]'"; + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $reply = MYDB_fetch_array($result); - if($reply[type] % 100 == 9) { - $reply[reply] %= 10000; - $query = "select no,name from general where no={$reply[reply]}"; + if($reply['type'] % 100 == 9) { + $reply['reply'] %= 10000; + $query = "select no,name from general where no={$reply['reply']}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); - } elseif($reply[type] % 100 == 10) { - $reply[reply] = floor($reply[reply]/10000); - $query = "select no,name from general where no={$reply[reply]}"; + } elseif($reply['type'] % 100 == 10) { + $reply['reply'] = floor($reply['reply']/10000); + $query = "select no,name from general where no={$reply['reply']}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); } - $query = "select nation,color,name from nation where nation='$me[nation]'"; + $query = "select nation,color,name from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); echo " - + "; } @@ -3762,8 +3762,10 @@ function increaseRefresh($connect, $type="", $cnt=1) { $query = "update game set refresh=refresh+'$cnt' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($_SESSION[p_id] != "") { - $query = "update general set lastrefresh='$date',con=con+'$cnt',connect=connect+'$cnt',refcnt=refcnt+'$cnt',refresh=refresh+'$cnt' where user_id='$_SESSION[p_id]'"; + if($_SESSION['p_id'] != "") { + $query = sprintf("update general set lastrefresh='%s',con=con+'%d',connect=connect+'%d',refcnt=refcnt+'%d',refresh=refresh+'%d' where user_id='%s'", + $date,$cnt,$cnt,$cnt,$cnt,$_SESSION['p_id']); + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -3771,7 +3773,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { $date2 = substr($date, 0, 10); $online = onlinenum($connect); $fp = fopen("logs/_{$date2}_refresh.txt", "a"); - $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION[p_id],13," ")._String::Fill2($_SESSION[p_name],13," ")._String::Fill2($_SESSION[p_ip],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; + $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; fwrite($fp, $msg."\r\n"); fclose($fp); @@ -3799,7 +3801,8 @@ function increaseRefresh($connect, $type="", $cnt=1) { } if($str != "") { $fp2 = fopen("logs/_{$date2}_ipcheck.txt", "a"); - $str = "ID:{$_SESSION[p_id]}//name:{$_SESSION[p_name]}//REMOTE_ADDR:{$_SERVER[REMOTE_ADDR]}" . $str; + $str = sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s", + $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str); fwrite($fp2, $str."\r\n"); fclose($fp2); } @@ -3817,13 +3820,13 @@ function updateTraffic($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $user = MYDB_fetch_array($result); - if($game[maxrefresh] < $game[refresh]) { - $game[maxrefresh] = $game[refresh]; + if($game['maxrefresh'] < $game['refresh']) { + $game['maxrefresh'] = $game['refresh']; } - if($game[maxonline] < $online) { - $game[maxonline] = $online; + if($game['maxonline'] < $online) { + $game['maxonline'] = $online; } - $query = "update game set refresh=0,maxrefresh={$game[maxrefresh]},maxonline={$game[maxonline]} where no='1'"; + $query = "update game set refresh=0,maxrefresh={$game['maxrefresh']},maxonline={$game['maxonline']} where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update general set refresh=0"; @@ -3832,7 +3835,7 @@ function updateTraffic($connect) { $date = date('Y-m-d H:i:s'); $fp = fopen("logs/_traffic.txt", "a"); //일시|년|월|총갱신|접속자|최다갱신자 - $msg = _String::Fill2($date,20," ")."|"._String::Fill2($game[year],3," ")."|"._String::Fill2($game[month],2," ")."|"._String::Fill2($game[refresh],8," ")."|"._String::Fill2($online,5," ")."|"._String::Fill2($user[name]."(".$user[refresh].")",20," "); + $msg = _String::Fill2($date,20," ")."|"._String::Fill2($game['year'],3," ")."|"._String::Fill2($game['month'],2," ")."|"._String::Fill2($game['refresh'],8," ")."|"._String::Fill2($online,5," ")."|"._String::Fill2($user['name']."(".$user['refresh'].")",20," "); fwrite($fp, $msg."\r\n"); fclose($fp); } @@ -3844,7 +3847,7 @@ function CheckOverhead($connect) { $admin = MYDB_fetch_array($result); $onlineNumber = onlinenum($connect); - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 120분턴 case 1: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 60분턴 case 2: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 360; $con2 = 240; $con3 = 120; $con4 = 60; break; // 30분턴 @@ -3855,25 +3858,25 @@ function CheckOverhead($connect) { case 7: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 90; $con2 = 60; $con3 = 40; $con4 = 30; break; // 1분턴 } - $thr1 *= $admin[conweight] / 100; - $thr2 *= $admin[conweight] / 100; - $thr3 *= $admin[conweight] / 100; - $con1 *= $admin[conweight] / 100; - $con2 *= $admin[conweight] / 100; - $con3 *= $admin[conweight] / 100; - $con4 *= $admin[conweight] / 100; + $thr1 *= $admin['conweight'] / 100; + $thr2 *= $admin['conweight'] / 100; + $thr3 *= $admin['conweight'] / 100; + $con1 *= $admin['conweight'] / 100; + $con2 *= $admin['conweight'] / 100; + $con3 *= $admin['conweight'] / 100; + $con4 *= $admin['conweight'] / 100; - //if($onlineNumber > $thr2) { $me[map] = 1; } - if ($onlineNumber > $thr3 && $admin[conlimit] != $con4) { + //if($onlineNumber > $thr2) { $me['map'] = 1; } + if ($onlineNumber > $thr3 && $admin['conlimit'] != $con4) { $query = "update game set conlimit='$con4' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber > $thr2 && $admin[conlimit] != $con3) { + } elseif($onlineNumber > $thr2 && $admin['conlimit'] != $con3) { $query = "update game set conlimit='$con3' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber > $thr1 && $admin[conlimit] != $con2) { + } elseif($onlineNumber > $thr1 && $admin['conlimit'] != $con2) { $query = "update game set conlimit='$con2' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber <= $thr1 && $admin[conlimit] != $con1) { + } elseif($onlineNumber <= $thr1 && $admin['conlimit'] != $con1) { $query = "update game set conlimit='$con1' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { @@ -3885,7 +3888,7 @@ function isLock($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $plock = MYDB_fetch_array($result); - if($plock[plock] == 0) { return 0; } // 열려있음 + if($plock['plock'] == 0) { return 0; } // 열려있음 else { return 1; } // 사용중 } @@ -3912,7 +3915,7 @@ function timeover($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $t = 20; break; // 120분턴 case 1: $t = 10; break; // 60분턴 case 2: $t = 10; break; // 30분턴 @@ -3923,7 +3926,7 @@ function timeover($connect) { case 7: $t = 1; break; // 1분턴 } - $term = $admin[diff]; + $term = $admin['diff']; if($term >= $t || $term < 0) { return 1; } else { return 0; } } @@ -3934,7 +3937,7 @@ function checkDelay($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); // 1턴이상 갱신 없었으면 서버 지연 - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $term = 120; $threshold = 1; break; case 1: $term = 60; $threshold = 1; break; case 2: $term = 30; $threshold = 1; break; @@ -3945,7 +3948,7 @@ function checkDelay($connect) { case 7: $term = 1; $threshold = 3; break; } //지연 해야할 밀린 턴 횟수 - $iter = floor($admin[offset] / $term); + $iter = floor($admin['offset'] / $term); if($iter > $threshold) { $minute = $iter * $term; $query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)"; @@ -3965,7 +3968,7 @@ function updateOnline($connect) { //국가별 이름 매핑 for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $nationname[$nation[nation]] = $nation[name]; + $nationname[$nation['nation']] = $nation['name']; } $nationname[0] = "재야"; @@ -3977,7 +3980,7 @@ function updateOnline($connect) { //국가별 접속중인 장수 for($i=0; $i < $onlinenum; $i++) { $general = MYDB_fetch_array($result); - $onnation[$general[nation]] .= $general[name].', '; + $onnation[$general['nation']] .= $general['name'].', '; } foreach($onnation as $key => $val) { @@ -4003,7 +4006,7 @@ function checkTurn($connect) { // 현재 처리중이면 접근 불가 if(isLock($connect)) { return; } - $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); // 파일락 획득 @@ -4023,7 +4026,7 @@ function checkTurn($connect) { // 세마포어 해제 //if(!@sem_release($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } - $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); //if(STEP_LOG) delStepLog(); @@ -4054,8 +4057,8 @@ function checkTurn($connect) { $date = date('Y-m-d H:i:s'); // 최종 처리 월턴의 다음 월턴시간 구함 - $prevTurn = cutTurn($admin[turntime], $admin[turnterm]); - $nextTurn = addTurn($prevTurn, $admin[turnterm]); + $prevTurn = cutTurn($admin['turntime'], $admin['turnterm']); + $nextTurn = addTurn($prevTurn, $admin['turnterm']); // 현재 턴 이전 월턴까지 모두처리. //최종 처리 이후 다음 월턴이 현재 시간보다 전이라면 while($nextTurn <= $date) { @@ -4066,19 +4069,19 @@ function checkTurn($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general[turn0]})"; //if(PROCESS_LOG) pushProcessLog($connect, $processlog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); - if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 + if($general['npc'] >= 2) { processAI($connect, $general['no']); } // npc AI 처리 //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); - PreprocessCommand($connect, $general[no]); + PreprocessCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); - processCommand($connect, $general[no]); + processCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); - updateCommand($connect, $general[no]); + updateCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); - updateTurntime($connect, $general[no]); + updateTurntime($connect, $general['no']); } @@ -4089,7 +4092,7 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', preUpdateMonthly'); $result = preUpdateMonthly($connect); if($result == false) { - $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); // 잡금 해제 @@ -4100,14 +4103,14 @@ function checkTurn($connect) { // 그 시각 년도,월 저장 $dt = turnDate($connect, $nextTurn); - $admin[year] = $dt[0]; $admin[month] = $dt[1]; + $admin['year'] = $dt[0]; $admin['month'] = $dt[1]; - $locklog[0] = "-- checkTurn() ".$admin[month]."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + $locklog[0] = "-- checkTurn() ".$admin['month']."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); // 분기계산. 장수들 턴보다 먼저 있다면 먼저처리 - if($admin[month] == 1) { + if($admin['month'] == 1) { // NPC 등장 - if($admin[scenario] > 0 && $admin[scenario] < 20) { RegNPC($connect); } + if($admin['scenario'] > 0 && $admin['scenario'] < 20) { RegNPC($connect); } //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processGoldIncome'); processGoldIncome($connect); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processSpring'); @@ -4123,14 +4126,14 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge'); addAge($connect); // 새해 알림 - $alllog[count($alllog)] = "◆{$admin[month]}월:$admin[year]년이 되었습니다."; + $alllog[count($alllog)] = "◆{$admin['month']}월:$admin['year']년이 되었습니다."; pushAllLog($alllog); - } elseif($admin[month] == 4) { + } elseif($admin['month'] == 4) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); updateQuaterly($connect); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); disaster($connect); - } elseif($admin[month] == 7) { + } elseif($admin['month'] == 7) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processRiceIncome'); processRiceIncome($connect); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processFall'); @@ -4141,7 +4144,7 @@ function checkTurn($connect) { disaster($connect); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate'); tradeRate($connect); - } elseif($admin[month] == 10) { + } elseif($admin['month'] == 10) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); updateQuaterly($connect); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); @@ -4152,7 +4155,7 @@ function checkTurn($connect) { // 다음달로 넘김 $prevTurn = $nextTurn; - $nextTurn = addTurn($prevTurn, $admin[turnterm]); + $nextTurn = addTurn($prevTurn, $admin['turnterm']); } //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); @@ -4163,7 +4166,7 @@ function checkTurn($connect) { // 그 시각 년도,월 저장 $dt = turnDate($connect, $prevTurn); - $admin[year] = $dt[0]; $admin[month] = $dt[1]; + $admin['year'] = $dt[0]; $admin['month'] = $dt[1]; // 현재시간의 월턴시간 이후 분단위 장수 처리 do { $query = "select no,name,turntime,turn0,npc from general where turntime<='$date' order by turntime"; @@ -4173,19 +4176,19 @@ function checkTurn($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general[turn0]})"; //if(PROCESS_LOG) pushProcessLog($connect, $processlog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); - if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 + if($general['npc'] >= 2) { processAI($connect, $general['no']); } // npc AI 처리 //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); - PreprocessCommand($connect, $general[no]); + PreprocessCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); - processCommand($connect, $general[no]); + processCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); - updateCommand($connect, $general[no]); + updateCommand($connect, $general['no']); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); - updateTurntime($connect, $general[no]); + updateTurntime($connect, $general['no']); } } while($gencount > 0); @@ -4196,9 +4199,9 @@ function checkTurn($connect) { // 3턴 전 시간 $letterdate = $date; - $letterdate = subTurn($letterdate, $admin[turnterm]); - $letterdate = subTurn($letterdate, $admin[turnterm]); - $letterdate = subTurn($letterdate, $admin[turnterm]); + $letterdate = subTurn($letterdate, $admin['turnterm']); + $letterdate = subTurn($letterdate, $admin['turnterm']); + $letterdate = subTurn($letterdate, $admin['turnterm']); //기한 지난 외교 메세지 지움(3개월 유지) //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); for($i=0; $i < 5; $i++) { @@ -4218,7 +4221,7 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); unlock($connect); - $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; + $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', finish'); @@ -4235,19 +4238,19 @@ function addAge($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - if($admin[year] >= $admin[startyear]+3) { + if($admin['year'] >= $admin['startyear']+3) { $query = "select no,name,nation,leader,power,intel,history from general where specage<=age and special='0'"; $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); - $special = getSpecial($connect, $general[leader], $general[power], $general[intel]); - $query = "update general set special='$special' where no='$general[no]'"; + $special = getSpecial($connect, $general['leader'], $general['power'], $general['intel']); + $query = "update general set special='$special' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special)."】(을)를 습득"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special)."】(을)를 습득"); pushGenLog($general, $log); } @@ -4257,13 +4260,13 @@ function addAge($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel'], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); - $query = "update general set special2='$special2' where no='$general[no]'"; + $query = "update general set special2='$special2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special2)."】(을)를 습득"); pushGenLog($general, $log); } } @@ -4274,10 +4277,10 @@ function turnDate($connect, $curtime) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $turn = $admin[starttime]; - $curturn = cutTurn($curtime, $admin[turnterm]); + $turn = $admin['starttime']; + $curturn = cutTurn($curtime, $admin['turnterm']); $num = 0; - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $term = 7200; break; case 1: $term = 3600; break; case 2: $term = 1800; break; @@ -4289,11 +4292,11 @@ function turnDate($connect, $curtime) { } $num = floor((strtotime($curturn) - strtotime($turn)) / $term); - $year = $admin[startyear] + floor($num / 12); + $year = $admin['startyear'] + floor($num / 12); $month = 1 + (12+$num) % 12; // 바뀐 경우만 업데이트 - if($admin[month] != $month || $admin[year] != $year) { + if($admin['month'] != $month || $admin['year'] != $year) { $query = "update game set year='$year',month='$month' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4313,12 +4316,12 @@ function SetNationFront($connect, $nationNo) { for($i=0; $i < $dipNum; $i++) { $dip = MYDB_fetch_array($result); - $query = "select city,path from city where nation={$dip[you]}"; + $query = "select city,path from city where nation={$dip['you']}"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityNum = MYDB_num_rows($result2); for($k=0; $k < $cityNum; $k++) { $city = MYDB_fetch_array($result2); - $path = explode("|", $city[path]); + $path = explode("|", $city['path']); $cnt = count($path); for($j=0; $j < $cnt; $j++) { $adj[$path[$j]] = 1; @@ -4332,7 +4335,7 @@ function SetNationFront($connect, $nationNo) { $cityNum = MYDB_num_rows($result2); for($k=0; $k < $cityNum; $k++) { $city = MYDB_fetch_array($result2); - $path = explode("|", $city[path]); + $path = explode("|", $city['path']); $cnt = count($path); for($j=0; $j < $cnt; $j++) { $adj[$path[$j]] = 1; @@ -4345,7 +4348,7 @@ function SetNationFront($connect, $nationNo) { $cityNum = MYDB_num_rows($result); for($i=0; $i < $cityNum; $i++) { $city = MYDB_fetch_array($result); - if($adj[$city[city]] == 1) { $str .= " or city={$city[city]}"; $valid = 1; } + if($adj[$city['city']] == 1) { $str .= " or city={$city['city']}"; $valid = 1; } } $query = "update city set front=0 where nation={$nationNo}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4363,9 +4366,9 @@ function checkSupply($connect) { $cityNum = MYDB_num_rows($result); for($i=0; $i < $cityNum; $i++) { $city = MYDB_fetch_array($result); - $cityPath[$city[city]] = $city[path]; - $cityNation[$city[city]] = $city[nation]; - $label[$city[city]] = 0; + $cityPath[$city['city']] = $city['path']; + $cityNation[$city['city']] = $city['nation']; + $label[$city['city']] = 0; } $select = 0; @@ -4432,7 +4435,7 @@ function checkSupply($connect) { for($i=0; $i < $nationNum; $i++) { $nation = MYDB_fetch_array($result); //수도 있는 덩어리 도시들 1로 세팅 - $lbl = $label[$nation[capital]]; + $lbl = $label[$nation['capital']]; for($k=1; $k <= $cityNum; $k++) { if($lbl == $label[$k]) { @@ -4485,7 +4488,7 @@ function preUpdateMonthly($connect) { for($i=0; $i < $cityCount; $i++) { $city = MYDB_fetch_array($result); //병 훈 사 5%감소 - $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='$city[city]' and nation='$city[nation]'"; + $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='$city['city']' and nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //민심30이하 공백지 처리 @@ -4498,7 +4501,7 @@ function preUpdateMonthly($connect) { $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【고립】$city[name](이)가 보급이 끊겨 미지배 도시가 되었습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【고립】$city['name'](이)가 보급이 끊겨 미지배 도시가 되었습니다."; } pushHistory($connect, $history); //민심30이하 공백지 처리 @@ -4517,10 +4520,10 @@ function preUpdateMonthly($connect) { $general = MYDB_fetch_array($result); // 주민으로 돌아감 - $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; + $query = "update city set pop=pop+'$general['crew']' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set crew=0,rice=0 where no='$general[no]'"; + $query = "update general set crew=0,rice=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; @@ -4542,17 +4545,17 @@ function preUpdateMonthly($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시훈사 180년 60, 220년 87, 240년 100 - $rate = round(($admin[year] - $admin[startyear]) / 1.5) + 60; + $rate = round(($admin['year'] - $admin['startyear']) / 1.5) + 60; if($rate > 100) $rate = 100; //금률 쌀률, 내정비용 // $query = "select count(*) as cnt from general"; // $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $gencount = MYDB_fetch_array($result); // 전체 등록자 수 -// $ratio = 50 + round($gencount[cnt] / $admin[normgeneral] * 100 / 2); // 300명 등록시에 100% 지급 +// $ratio = 50 + round($gencount['cnt'] / $admin['normgeneral'] * 100 / 2); // 300명 등록시에 100% 지급 $ratio = 100; // 20 ~ 140원 - $develcost = ($admin[year] - $admin[startyear] + 10) * 2; + $develcost = ($admin['year'] - $admin['startyear'] + 10) * 2; $query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4596,7 +4599,7 @@ function preUpdateMonthly($connect) { for($i=0; $i < $nationCount; $i++) { $nation = MYDB_fetch_array($result); $spy = ""; $k = 0; unset($citys); - if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } + if($nation['spy'] != "") { $citys = explode("|", $nation['spy']); } while(count($citys)) { $citys[$k]--; if($citys[$k]%10 != 0) { $spy .= "$citys[$k]"; } @@ -4604,7 +4607,7 @@ function preUpdateMonthly($connect) { if($k >= count($citys)) { break; } if($citys[$k-1]%10 != 0) { $spy .= "|"; } } - $query = "update nation set spy='$spy' where nation='$nation[nation]'"; + $query = "update nation set spy='$spy' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4653,23 +4656,23 @@ group by A.nation $nationCount = MYDB_num_rows($result); for($i=0; $i < $nationCount; $i++) { $nation = MYDB_fetch_array($result); - $genNum[$nation[nation]] = $nation[gennum]; + $genNum[$nation['nation']] = $nation['gennum']; - if($nation[gennum] > $nation[gennum2]) { + if($nation['gennum'] > $nation[gennum2]) { // 장수가 증가했을때 - $nation[chemi] -= ceil(($nation[gennum] - $nation[gennum2]) / $nation[gennum] * 100); + $nation['chemi'] -= ceil(($nation['gennum'] - $nation[gennum2]) / $nation['gennum'] * 100); } else { // 장수가 감소했을때 - $nation[chemi] -= ceil(($nation[gennum2] - $nation[gennum]) / $nation[gennum2] * 100); + $nation['chemi'] -= ceil(($nation[gennum2] - $nation['gennum']) / $nation[gennum2] * 100); } // 매달 2씩 증가 - $nation[chemi] += 2; - if($nation[chemi] < 0) { $nation[chemi] = 0; } - if($nation[chemi] > 100) { $nation[chemi] = 100; } + $nation['chemi'] += 2; + if($nation['chemi'] < 0) { $nation['chemi'] = 0; } + if($nation['chemi'] > 100) { $nation['chemi'] = 100; } //약간의 랜덤치 부여 (95% ~ 105%) - $nation[power] = round($nation[power] * (rand()%101 + 950) / 1000); - $query = "update nation set power='$nation[power]',gennum2='$nation[gennum]',chemi='$nation[chemi]' where nation='$nation[nation]'"; + $nation['power'] = round($nation['power'] * (rand()%101 + 950) / 1000); + $query = "update nation set power='$nation['power']',gennum2='$nation['gennum']',chemi='$nation['chemi']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4679,13 +4682,13 @@ group by A.nation $dipCount = MYDB_num_rows($result); for($i=0; $i < $dipCount; $i++) { $dip = MYDB_fetch_array($result); - $genCount = $genNum[$dip[me]]; + $genCount = $genNum[$dip['me']]; // 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산 // 4000 / 10 * 0.25 = 100 - $term = round($dip[dead] / 100 / $genCount) + 1; - if($dip[term] > $term) { $term = $dip[term]; } + $term = round($dip['dead'] / 100 / $genCount) + 1; + if($dip['term'] > $term) { $term = $dip['term']; } if($term > 13) { $term = 13; } - $query = "update diplomacy set term='{$term}' where (me='$dip[me]' and you='$dip[you]')"; + $query = "update diplomacy set term='{$term}' where (me='$dip['me']' and you='$dip['you']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4695,13 +4698,13 @@ group by A.nation $dipCount = MYDB_num_rows($result); for($i=0; $i < $dipCount; $i++) { $dip = MYDB_fetch_array($result); - $query = "select name from nation where nation='$dip[me]' or nation='$dip[you]'"; + $query = "select name from nation where nation='$dip['me']' or nation='$dip['you']'"; $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationResult); - $name1 = $nation[name]; + $name1 = $nation['name']; $nation = MYDB_fetch_array($nationResult); - $name2 = $nation[name]; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【개전】$name1(와)과 $name2(이)가 전쟁을 시작합니다."; + $name2 = $nation['name']; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【개전】$name1(와)과 $name2(이)가 전쟁을 시작합니다."; } //휴전국 로그 $query = "select A.me as me,A.you as you,A.term as term1,B.term as term2 from diplomacy A, diplomacy B where A.me=B.you and A.you=B.me and A.state='0' and A.me= $admin[startyear]+3) { + if($admin['year'] >= $admin['startyear']+3) { checkWander($connect); } // 작위 업데이트 @@ -4759,7 +4762,7 @@ group by A.nation $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } } @@ -4769,11 +4772,11 @@ function triggerTournament($connect) { $admin = MYDB_fetch_array($result); //현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률 - if($admin[tournament] == 0 && $admin[tnmt_trig] > 0 && rand() % 100 < 40) { + if($admin['tournament'] == 0 && $admin['tnmt_trig'] > 0 && rand() % 100 < 40) { $type = rand() % 6; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전 //전력전 50%, 통, 일, 설 각 17% if($type > 3) { $type = 0; } - startTournament($connect, $admin[tnmt_trig], $type); + startTournament($connect, $admin['tnmt_trig'], $type); } } @@ -4789,7 +4792,7 @@ function checkWander($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select no,name,nation,level,history,turntime from general where nation='$nation[nation]' and level=12"; + $query = "select no,name,nation,level,history,turntime from general where nation='$nation['nation']' and level=12"; $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($kingResult); @@ -4813,82 +4816,82 @@ function checkMerge($connect) { $dip = MYDB_fetch_array($dipresult); // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; + $query = "select no,name,history,nation from general where nation='$dip['me']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; + $query = "select no,name,history,nation,makenation from general where nation='$dip['you']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; + $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); //양국 NPC수 - $query = "select no from general where nation='$you[nation]' and npc>=2"; + $query = "select no from general where nation='$you['nation']' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); //양국 NPC수 - $query = "select no from general where nation='$me[nation]' and npc>=2"; + $query = "select no from general where nation='$me['nation']' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount2 = MYDB_num_rows($result); //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you[nation]'"; + $query = "select no,name,nation,history from general where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation[name](와)과 통합에 성공했습니다."; + $genlog[0] = "$mynation['name'](와)과 통합에 성공했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name']$you['makenation']로 통합에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me[nation]'"; + $query = "select no,name,nation,history from general where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation[name](와)과 통합에 성공했습니다."; + $genlog[0] = "$younation['name'](와)과 통합에 성공했습니다."; for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$younation[name]$you[makenation]로 통합에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$younation['name']$you['makenation']로 통합에 성공"); } - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합】$mynation[name](와)과 $younation[name](이)가 $you[makenation](으)로 통합하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $you[makenation]에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합】$mynation['name'](와)과 $younation['name'](이)가 $you['makenation'](으)로 통합하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 $you['makenation']에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$mynation['name']$you['makenation']로 통합"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation[totaltech] + $mynation[totaltech]; + $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; $newTech = round($newTotalTech / $newGenCount); // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set name='$you[makenation]',gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; + $query = "update nation set name='$you['makenation']',gold=gold+'$mynation['gold']',rice=rice+'$mynation['rice']',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 삭제 - $query = "delete from nation where nation='$me[nation]'"; + $query = "delete from nation where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; + $query = "update city set nation='$you['nation']',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 - $query = "update general set belong=1,level=1,nation='$you[nation]' where nation='$me[nation]'"; + $query = "update general set belong=1,level=1,nation='$you['nation']' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 공헌도0.9, 명성0.9 - $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='$you[nation]'"; + $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; + $query = "update troop set nation='$you['nation']' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 통합국 모든 도시 5% 감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; + $query = "delete from diplomacy where me='$me['nation']' or you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) @@ -4899,7 +4902,7 @@ function checkMerge($connect) { $resignCount = round($npccount2*(rand()%21+90)/100); } $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; + $query = "update general set turn0='$resignCommand' where nation='$you['nation']' and npc>=2 order by rand() limit {$resignCount}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($me, $mylog); @@ -4924,89 +4927,89 @@ function checkSurrender($connect) { $dip = MYDB_fetch_array($dipresult); // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; + $query = "select no,name,history,nation from general where nation='$dip['me']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; + $query = "select no,name,history,nation,makenation from general where nation='$dip['you']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; + $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); //양국 NPC수 - $query = "select no from general where nation='$you[nation]' and npc>=2"; + $query = "select no from general where nation='$you['nation']' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); //양국 NPC수 - $query = "select no from general where nation='$me[nation]' and npc>=2"; + $query = "select no from general where nation='$me['nation']' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount2 = MYDB_num_rows($result); //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you[nation]'"; + $query = "select no,name,nation,history from general where nation='$you['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation[name] 합병에 성공했습니다."; + $genlog[0] = "$mynation['name'] 합병에 성공했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name] 합병에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name'] 합병에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me[nation]'"; + $query = "select no,name,nation,history from general where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation[name](으)로 항복하여 수도로 이동합니다."; + $genlog[0] = "$younation['name'](으)로 항복하여 수도로 이동합니다."; for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$younation[name](으)로 항복"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name']$younation['name'](으)로 항복"); } - $history[count($history)] = "●$admin[year]년 $admin[month]월:【투항】$mynation[name] (이)가 $younation[name](으)로 항복하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $younation[name]에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【투항】$mynation['name'] (이)가 $younation['name'](으)로 항복하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 $younation['name']에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation[totaltech] + $mynation[totaltech]; + $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; $newTech = round($newTotalTech / $newGenCount); // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; + $query = "update nation set gold=gold+'$mynation['gold']',rice=rice+'$mynation['rice']',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //합병 당한국 모든 도시 10%감소 - $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='$me[nation]'"; + $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //합병 시도국 모든 도시 5%감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 삭제 - $query = "delete from nation where nation='$me[nation]'"; + $query = "delete from nation where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군주가 있는 위치 구함 - $query = "select city from general where nation='$you[nation]' and level='12'"; + $query = "select city from general where nation='$you['nation']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; + $query = "update city set nation='$you['nation']',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 제의국 모든 장수들 공헌도0.95, 명성0.95 - $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='$you[nation]'"; + $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='$you['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 - $query = "update general set belong=1,level=1,nation='$you[nation]',city='$king[city]',dedication=dedication*1.1,experience=experience*0.9 where nation='$me[nation]'"; + $query = "update general set belong=1,level=1,nation='$you['nation']',city='$king['city']',dedication=dedication*1.1,experience=experience*0.9 where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; + $query = "update troop set nation='$you['nation']' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; + $query = "delete from diplomacy where me='$me['nation']' or you='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) @@ -5017,7 +5020,7 @@ function checkSurrender($connect) { $resignCount = round($npccount2*(rand()%21+90)/100); } $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; + $query = "update general set turn0='$resignCommand' where nation='$you['nation']' and npc>=2 order by rand() limit {$resignCount}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($me, $mylog); @@ -5041,11 +5044,11 @@ function updateNationState($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $query = "select city,level,secu from city where nation='$nation[nation]' and level>=4"; + $query = "select city,level,secu from city where nation='$nation['nation']' and level>=4"; $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($cityresult); - $query = "select no from general where nation='$nation[nation]'"; + $query = "select no from general where nation='$nation['nation']'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -5067,39 +5070,39 @@ function updateNationState($connect) { $nationlevel = 7; // 황제 } - if($nationlevel > $nation[level]) { - $nation[level] = $nationlevel; + if($nationlevel > $nation['level']) { + $nation['level'] = $nationlevel; switch($nationlevel) { case 7: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); break; case 6: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 등극"); break; case 5: case 4: case 3: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); break; case 2: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."로 나서다"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."로 나서다"); break; } //작위 상승 - $query = "update nation set level='$nation[level]' where nation='$nation[nation]'"; + $query = "update nation set level='$nation['level']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $gennum = $gencount; if($gencount < 10) $gencount = 10; //기술 및 변경횟수 업데이트 - $myset = $nation[level] + 1; - $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation[nation]'"; + $myset = $nation['level'] + 1; + $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushHistory($connect, $history); @@ -5115,19 +5118,19 @@ function checkStatistic($connect) { $query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $general[avggold] = round($general[avggold]); - $general[avgrice] = round($general[avgrice]); - $general[avgdex] = round($general[avgdex]); - $general[avgexpded] = round($general[avgexpded]); - $etc .= "평균 금/쌀 ({$general[avggold]}/{$general[avgrice]}), 평균/최고 숙련({$general[avgdex]}/{$general[maxdex]}), 평균/최고 경험공헌({$general[avgexpded]}/{$general[maxexpded]}), "; + $general['avggold'] = round($general['avggold']); + $general['avgrice'] = round($general['avgrice']); + $general['avgdex'] = round($general['avgdex']); + $general['avgexpded'] = round($general['avgexpded']); + $etc .= "평균 금/쌀 ({$general['avggold']}/{$general['avgrice']}), 평균/최고 숙련({$general['avgdex']}/{$general['maxdex']}), 평균/최고 경험공헌({$general['avgexpded']}/{$general['maxexpded']}), "; $query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $nation[avgtech] = round($nation[avgtech]); - $nation[avgpower] = round($nation[avgpower]); - $etc .= "최저/평균/최고 기술({$nation[mintech]}/{$nation[avgtech]}/{$nation[maxtech]}), "; - $etc .= "최저/평균/최고 국력({$nation[minpower]}/{$nation[avgpower]}/{$nation[maxpower]}), "; + $nation['avgtech'] = round($nation['avgtech']); + $nation['avgpower'] = round($nation['avgpower']); + $etc .= "최저/평균/최고 기술({$nation['mintech']}/{$nation['avgtech']}/{$nation['maxtech']}), "; + $etc .= "최저/평균/최고 국력({$nation['minpower']}/{$nation['avgpower']}/{$nation['maxpower']}), "; $nationName = ''; $power_hist = ''; @@ -5211,7 +5214,7 @@ function checkStatistic($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $crewtype .= getTypeName($types[$i])."({$general[type]}), "; + $crewtype .= getTypeName($types[$i])."({$general['type']}), "; } $query = " @@ -5221,7 +5224,7 @@ function checkStatistic($connect) { gen_count, personal_hist, special_hist, power_hist, crewtype, etc ) values ( - '$admin[year]', '$admin[month]', + '$admin['year']', '$admin['month']', '$nationCount', '$nationName', '$nationHist', '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', '$crewtype', '$etc' @@ -5238,10 +5241,10 @@ function checkEmperior($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); - if($count == 1 && $admin[isUnited] == 0) { + if($count == 1 && $admin['isUnited'] == 0) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation[nation]'"; + $query = "select city from city where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -5250,7 +5253,7 @@ function checkEmperior($connect) { $allcount = MYDB_num_rows($result); if($count == $allcount) { - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name](이)가 전토를 통일"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name'](이)가 전토를 통일"); $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5261,85 +5264,85 @@ function checkEmperior($connect) { for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); + CheckHall($connect, $general['no']); } - $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='$nation[nation]'"; + $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 + $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='$nation['nation']'"; // 도시 이름 목록 $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityresult); - $pop = "{$city[totalpop]} / {$city[maxpop]}"; - $poprate = round($city[totalpop]/$city[maxpop]*100, 2); + $pop = "{$city['totalpop']} / {$city['maxpop']}"; + $poprate = round($city['totalpop']/$city['maxpop']*100, 2); $poprate .= " %"; - $query = "select name,picture,belong from general where nation='$nation[nation]' and level='12'"; + $query = "select name,picture,belong from general where nation='$nation['nation']' and level='12'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level12 = MYDB_fetch_array($genresult); - $query = "select name,picture,belong from general where nation='$nation[nation]' and level='11'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='10'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='9'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='8'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='7'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='6'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation[nation]' and level='5'"; + $query = "select name,picture,belong 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 name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 + $query = "select name,picture,killnum from general where nation='$nation['nation']' order by killnum desc limit 5"; // 오호장군 $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $tigernum = MYDB_num_rows($tigerresult); for($i=0; $i < $tigernum; $i++) { $tiger = MYDB_fetch_array($tigerresult); - if($tiger[killnum] > 0) { - $tigerstr .= "{$tiger[name]}【{$tiger[killnum]}】, "; + if($tiger['killnum'] > 0) { + $tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, "; } } - $query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 + $query = "select name,picture,firenum from general where nation='$nation['nation']' order by firenum desc limit 7"; // 건안칠자 $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $eaglenum = MYDB_num_rows($eagleresult); for($i=0; $i < $eaglenum; $i++) { $eagle = MYDB_fetch_array($eagleresult); - if($eagle[firenum] > 0) { - $eaglestr .= "{$eagle[name]}【{$eagle[firenum]}】, "; + if($eagle['firenum'] > 0) { + $eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, "; } } - $log[0] = "●$admin[year]년 $admin[month]월: $nation[name](이)가 전토를 통일하였습니다."; + $log[0] = "●$admin['year']년 $admin['month']월: $nation['name'](이)가 전토를 통일하였습니다."; - $query = "select no,name from general where nation='$nation[nation]' order by dedication desc"; + $query = "select no,name from general where nation='$nation['nation']' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - $gen .= "{$general[name]}, "; + $gen .= "{$general['name']}, "; pushGenLog($general, $log); } - $nation[type] = getNationType($nation[type]); + $nation['type'] = getNationType($nation['type']); $query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5349,10 +5352,10 @@ function checkEmperior($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_fetch_array($result); - $statNC = "1 / {$stat[nc]}"; - $statGC = "{$gencount[cnt]} / {$stat[gc]}"; + $statNC = "1 / {$stat['nc']}"; + $statGC = "{$gencount['cnt']} / {$stat['gc']}"; - $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='$stat[nc]' limit 0,1"; + $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='$stat['nc']' limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $statNation = MYDB_fetch_array($result); @@ -5374,19 +5377,19 @@ function checkEmperior($connect) { tiger, eagle, gen, history ) values ( '-', - '$statNC', '$statNation[nation_name]', '$statNation[nation_hist]', - '$statGC', '$statGeneral[personal_hist]', '$statGeneral[special_hist]', - '$nation[name]', '$nation[type]', '$nation[color]', '$admin[year]', '$admin[month]', '$nation[power]', '$nation[gennum]', '$allcount', - '$pop', '$poprate', '$nation[gold]', '$nation[rice]', - '$level12[name]', '$level12[picture]', '$level11[name]', '$level11[picture]', - '$level10[name]', '$level10[picture]', '$level9[name]', '$level9[picture]', - '$level8[name]', '$level8[picture]', '$level7[name]', '$level7[picture]', - '$level6[name]', '$level6[picture]', '$level5[name]', '$level5[picture]', - '$tigerstr', '$eaglestr', '$gen', '$nation[history]' + '$statNC', '$statNation['nation_name']', '$statNation['nation_hist']', + '$statGC', '$statGeneral['personal_hist']', '$statGeneral['special_hist']', + '$nation['name']', '$nation['type']', '$nation['color']', '$admin['year']', '$admin['month']', '$nation['power']', '$nation['gennum']', '$allcount', + '$pop', '$poprate', '$nation['gold']', '$nation['rice']', + '$level12['name']', '$level12['picture']', '$level11['name']', '$level11['picture']', + '$level10['name']', '$level10['picture']', '$level9['name']', '$level9['picture']', + '$level8['name']', '$level8['picture']', '$level7['name']', '$level7['picture']', + '$level6['name']', '$level6['picture']', '$level5['name']', '$level5['picture']', + '$tigerstr', '$eaglestr', '$gen', '$nation['history']' )"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통일】$nation[name](이)가 전토를 통일하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통일】$nation['name'](이)가 전토를 통일하였습니다."; pushHistory($connect, $history); //연감 월결산 @@ -5400,11 +5403,11 @@ function PreprocessCommand($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) { + if($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) { //특기보정 : 의술 //의서 사용 - if($general[injury] > 0) { - $general[injury] = 0; + if($general['injury'] > 0) { + $general['injury'] = 0; $query = "update general set injury=0 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5412,7 +5415,7 @@ function PreprocessCommand($connect, $no) { pushGenLog($general, $log); } - $query = "select no,name,injury from general where city='$general[city]' and injury>10 order by rand()"; + $query = "select no,name,injury from general where city='$general['city']' and injury>10 order by rand()"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $patientCount = MYDB_num_rows($result); @@ -5425,7 +5428,7 @@ function PreprocessCommand($connect, $no) { $patient = MYDB_fetch_array($result); //부상 치료 - $query = "update general set injury=0 where no='$patient[no]'"; + $query = "update general set injury=0 where no='$patient['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "{$general['name']}(이)가 의술로써 치료해줍니다!"; @@ -5446,22 +5449,22 @@ function PreprocessCommand($connect, $no) { } } - if($general[injury] > 0) { - if($general[item] >=7 && $general[item] <= 11) { + if($general['injury'] > 0) { + if($general['item'] >=7 && $general['item'] <= 11) { //영구약 사용 $query = "update general set injury=0 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[0] = "".getItemName($general[item])."(을)를 사용하여 치료합니다!"; + $log[0] = "".getItemName($general['item'])."(을)를 사용하여 치료합니다!"; pushGenLog($general, $log); - } elseif($general[injury] > 10 && $general[item] == 1 && $general[turn0] != EncodeCommand(0, 0, 0, 50)) { + } elseif($general['injury'] > 10 && $general['item'] == 1 && $general[turn0] != EncodeCommand(0, 0, 0, 50)) { //환약 사용 $query = "update general set injury=0,item=0 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "환약을 사용하여 치료합니다!"; pushGenLog($general, $log); - } elseif($general[injury] > 10) { + } elseif($general['injury'] > 10) { //부상 감소 $query = "update general set injury=injury-10 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5483,29 +5486,29 @@ function processCommand($connect, $no) { $admin = MYDB_fetch_array($result); // 블럭자는 미실행. 삭턴 감소 - if($general[block] == 2) { - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:현재 멀티, 또는 비매너로 인한블럭 대상자입니다. <1>$date"; + if($general['block'] == 2) { + $date = substr($general['turntime'],11,5); + $log[count($log)] = "●{$admin['month']}월:현재 멀티, 또는 비매너로 인한블럭 대상자입니다. <1>$date"; pushGenLog($general, $log); - $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($general[block] == 3) { - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:현재 악성유저로 분류되어 블럭, 발언권 무효 대상자입니다. <1>$date"; + } elseif($general['block'] == 3) { + $date = substr($general['turntime'],11,5); + $log[count($log)] = "●{$admin['month']}월:현재 악성유저로 분류되어 블럭, 발언권 무효 대상자입니다. <1>$date"; pushGenLog($general, $log); - $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - if($general[level] >= 5 && $general[level] <= 12) { - $query = "select l{$general[level]}turn0,l{$general[level]}term from nation where nation='$general[nation]'"; + if($general['level'] >= 5 && $general['level'] <= 12) { + $query = "select l{$general['level']}turn0,l{$general['level']}term from nation where nation='$general['nation']'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $core = MYDB_fetch_array($coreresult); - $corecommand = DecodeCommand($core["l{$general[level]}turn0"]); + $corecommand = DecodeCommand($core["l{$general['level']}turn0"]); //연속턴 아닌경우 텀 리셋 - if($core["l{$general[level]}term"]%100 != $corecommand[0]) { - $query = "update nation set l{$general[level]}term=0 where nation='$general[nation]'"; + if($core["l{$general['level']}term"]%100 != $corecommand[0]) { + $query = "update nation set l{$general['level']}term=0 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5544,26 +5547,26 @@ function processCommand($connect, $no) { $command = DecodeCommand($general[turn0]); //삭턴 처리 - if($general[npc] >= 2 || $general[killturn] > $admin[killturn]) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + if($general['npc'] >= 2 || $general['killturn'] > $admin['killturn']) { + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif(floor($command[0]) == 0 && $general[userlevel] < 5) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; + } elseif(floor($command[0]) == 0 && $general['userlevel'] < 5) { + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='$admin[killturn]' where no='$general[no]'"; + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='$admin['killturn']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //연속턴 아닌경우 텀 리셋 - if($general[term]%100 != $command[0]) { - $query = "update general set term=0 where no='$general[no]'"; + if($general['term']%100 != $command[0]) { + $query = "update general set term=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //턴 처리 switch($command[0]) { case 0: //휴식 - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:아무것도 실행하지 않았습니다. <1>$date"; + $date = substr($general['turntime'],11,5); + $log[count($log)] = "●{$admin['month']}월:아무것도 실행하지 않았습니다. <1>$date"; pushGenLog($general, $log); break; case 1: process_1($connect, $general, 1); break; //농업 @@ -5629,12 +5632,12 @@ update general set turn0=turn1,turn1=turn2,turn2=turn3,turn3=turn4,turn4=turn5,turn5=turn6,turn6=turn7,turn7=turn8,turn8=turn9, turn9=turn10,turn10=turn11,turn11=turn12,turn12=turn13,turn13=turn14,turn14=turn15,turn15=turn16,turn16=turn17, turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='00000000000000' -where no='$general[no]' +where no='$general['no']' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - if($type == 2 || ($general[level] >= 5 && $general[level] <= 12 && $type == 0)) { // 턴 처리후 수뇌부, 수뇌부 당기기 - $turn = "l{$general[level]}turn"; + if($type == 2 || ($general['level'] >= 5 && $general['level'] <= 12 && $type == 0)) { // 턴 처리후 수뇌부, 수뇌부 당기기 + $turn = "l{$general['level']}turn"; $query = " update nation set {$turn}0={$turn}1,{$turn}1={$turn}2, @@ -5643,7 +5646,7 @@ update nation set {$turn}6={$turn}7,{$turn}7={$turn}8, {$turn}8={$turn}9,{$turn}9={$turn}10, {$turn}10={$turn}11,{$turn}11='00000000000099' -where nation='$general[nation]' +where nation='$general['nation']' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5673,7 +5676,7 @@ where no='$no' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($type == 2) { // 수뇌부 미루기 - $turn = "l{$general[level]}turn"; + $turn = "l{$general['level']}turn"; $query = " update nation set {$turn}11={$turn}10,{$turn}10={$turn}9, @@ -5682,7 +5685,7 @@ update nation set {$turn}5={$turn}4,{$turn}4={$turn}3, {$turn}3={$turn}2,{$turn}2={$turn}1, {$turn}1={$turn}0,{$turn}0='00000000000099' -where nation='$general[nation]' +where nation='$general['nation']' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5698,127 +5701,127 @@ function updateTurntime($connect, $no) { $general = MYDB_fetch_array($result); // 삭턴장수 삭제처리 - if($general[killturn] <= 0) { + if($general['killturn'] <= 0) { // npc유저 삭턴시 npc로 전환 - if($general[npc] == 1 && $general[deadyear] > $admin[year]) { - $npcid = "gen" . $general[npcid]; + if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) { + $npcid = "gen" . $general['npcid']; $pw = md5("18071807"); - $general[killturn] = ($general[deadyear] - $admin[year]) * 12; - $general[npc] = $general[npc_org]; - $query = "update general set user_id='$npcid',password='$pw',npc='$general[npc]',killturn='$general[killturn]',mode=2 where no='$no'"; + $general['killturn'] = ($general['deadyear'] - $admin['year']) * 12; + $general['npc'] = $general['npc_org']; + $query = "update general set user_id='$npcid',password='$pw',npc='$general['npc']',killturn='$general['killturn']',mode=2 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin[month]}월:$general[name2](이)가 $general[name]의 육체에서 유체이탈합니다!"; + $alllog[0] = "●{$admin['month']}월:$general[name2](이)가 $general['name']의 육체에서 유체이탈합니다!"; pushAllLog($alllog); - if($admin[isUnited] == 0) { + if($admin['isUnited'] == 0) { CheckHall($connect, $no); } } else { // 군주였으면 유지 이음 - if($general[level] == 12) { + if($general['level'] == 12) { nextRuler($connect, $general); } //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general[no]'"; + $query = "update city set gen1='0' where gen1='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; + $query = "update city set gen2='0' where gen2='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; + $query = "update city set gen3='0' where gen3='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 처리 - $query = "select no from troop where troop='$general[troop]'"; + $query = "select no from troop where troop='$general['troop']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 - if($troop[no] == $general[no]) { + if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; + $query = "update general set troop='0' where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; + $query = "delete from troop where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general[no]'"; + $query = "update general set troop='0' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 장수 삭제 - $query = "delete from general where no='$general[no]'"; + $query = "delete from general where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견 switch(rand()%42) { - case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 역병에 걸려 죽고 말았습니다."; break; - case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 요절하고 말았습니다."; break; - case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 거리에서 갑자기 객사하고 말았습니다."; break; - case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; - case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; - case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; - case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; - case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; - case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 수영을 하다 익사하고 말았습니다."; break; - case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 황제를 모독하다가 처형당하고 말았습니다."; break; - case 10: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; - case 11: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; - case 12: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; - case 13: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 우울증에 걸려 자살하고 말았습니다."; break; - case 14: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; - case 15: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; - case 16: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; - case 17: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 누군가의 사주로 자객에게 암살당했습니다."; break; - case 18: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 바람난 배우자에게 독살당하고 말았습니다."; break; - case 19: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; - case 20: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 죽고말았습니다."; break; - case 21: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; - case 22: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; - case 23: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; - case 24: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; - case 25: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; - case 26: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; - case 27: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; - case 28: $alllog[0] = "●{$admin[month]}월:운좋기로 소문난 $general[name](이)가 불운하게도 죽고말았습니다."; break; - case 29: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 무리하게 단련을 하다가 죽고말았습니다."; break; - case 30: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고를 비관하며 자살하고 말았습니다."; break; - case 31: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; - case 32: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 과식하다 배가 터져 죽고 말았습니다."; break; - case 33: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; - case 34: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; - case 35: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; - case 36: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; - case 37: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; - case 38: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; - case 39: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; - case 40: $alllog[0] = "●{$admin[month]}월:희대의 사기꾼 $general[name](이)가 사망했습니다."; break; - case 41: $alllog[0] = "●{$admin[month]}월:희대의 호색한 $general[name](이)가 사망했습니다."; break; - default: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; break; + case 0: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 역병에 걸려 죽고 말았습니다."; break; + case 1: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 요절하고 말았습니다."; break; + case 2: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 거리에서 갑자기 객사하고 말았습니다."; break; + case 3: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; + case 4: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; + case 5: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; + case 6: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; + case 7: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; + case 8: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 수영을 하다 익사하고 말았습니다."; break; + case 9: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 황제를 모독하다가 처형당하고 말았습니다."; break; + case 10: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; + case 11: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; + case 12: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; + case 13: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 우울증에 걸려 자살하고 말았습니다."; break; + case 14: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; + case 15: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; + case 16: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; + case 17: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 누군가의 사주로 자객에게 암살당했습니다."; break; + case 18: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 바람난 배우자에게 독살당하고 말았습니다."; break; + case 19: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; + case 20: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 아무 이유 없이 죽고말았습니다."; break; + case 21: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; + case 22: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; + case 23: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; + case 24: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; + case 25: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; + case 26: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; + case 27: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; + case 28: $alllog[0] = "●{$admin['month']}월:운좋기로 소문난 $general['name'](이)가 불운하게도 죽고말았습니다."; break; + case 29: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 무리하게 단련을 하다가 죽고말았습니다."; break; + case 30: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 생활고를 비관하며 자살하고 말았습니다."; break; + case 31: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; + case 32: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 과식하다 배가 터져 죽고 말았습니다."; break; + case 33: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; + case 34: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; + case 35: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; + case 36: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; + case 37: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; + case 38: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; + case 39: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; + case 40: $alllog[0] = "●{$admin['month']}월:희대의 사기꾼 $general['name'](이)가 사망했습니다."; break; + case 41: $alllog[0] = "●{$admin['month']}월:희대의 호색한 $general['name'](이)가 사망했습니다."; break; + default: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사망했습니다."; break; } // 엔피씨,엠피씨,의병 사망로그 - if($general[npc] == 2) { - $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; - } elseif($general[npc] >= 3) { + if($general['npc'] == 2) { + $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사망했습니다."; + } elseif($general['npc'] >= 3) { switch(rand()%10) { - case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 푸대접에 실망하여 떠났습니다."; break; - case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 화를 내며 떠났습니다."; break; - case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 의견차이를 좁히지 못하고 떠났습니다."; break; - case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 판단 착오였다며 떠났습니다."; break; - case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고가 나아지지 않는다며 떠났습니다."; break; - case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 기대가 너무 컸다며 떠났습니다."; break; - case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 떠났습니다."; break; - case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기 목적은 달성했다며 떠났습니다."; break; - case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기가 없어도 될것 같다며 떠났습니다."; break; - case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 처자식이 그립다며 떠났습니다."; break; + case 0: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 푸대접에 실망하여 떠났습니다."; break; + case 1: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 갑자기 화를 내며 떠났습니다."; break; + case 2: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 의견차이를 좁히지 못하고 떠났습니다."; break; + case 3: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 판단 착오였다며 떠났습니다."; break; + case 4: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 생활고가 나아지지 않는다며 떠났습니다."; break; + case 5: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 기대가 너무 컸다며 떠났습니다."; break; + case 6: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 아무 이유 없이 떠났습니다."; break; + case 7: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 자기 목적은 달성했다며 떠났습니다."; break; + case 8: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 자기가 없어도 될것 같다며 떠났습니다."; break; + case 9: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 처자식이 그립다며 떠났습니다."; break; } } @@ -5828,23 +5831,23 @@ function updateTurntime($connect, $no) { } } - if($general[age] >= 80 && $general[npc] == 0) { - if($admin[isUnited] == 0) { + if($general['age'] >= 80 && $general['npc'] == 0) { + if($admin['isUnited'] == 0) { CheckHall($connect, $no); } $query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin[month]}월:$general[name](이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; + $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; pushAllLog($alllog); $log[0] = "●나이가 들어 은퇴하고 자손에게 자리를 물려줍니다."; pushGenLog($general, $log); - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); } - $turntime = addTurn($general[turntime], $admin[turnterm]); + $turntime = addTurn($general['turntime'], $admin['turnterm']); $query = "update general set turntime='$turntime' where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5888,7 +5891,7 @@ function CheckHall($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select nation,name,color from nation where nation='$general[nation]'"; + $query = "select nation,name,color from nation where nation='$general['nation']'"; $nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationresult); @@ -5898,23 +5901,23 @@ function CheckHall($connect, $no) { $count = MYDB_num_rows($result); //승률,살상률인데 10회 미만 전투시 스킵 - if(($k == 5 || $k == 7) && $general[warnum]<10) { continue; } + if(($k == 5 || $k == 7) && $general['warnum']<10) { continue; } //토너승률인데 50회 미만시 스킵 - if($k == 13 && $general[tt] < 50) { continue; } + if($k == 13 && $general['tt'] < 50) { continue; } //토너승률인데 50회 미만시 스킵 - if($k == 14 && $general[tl] < 50) { continue; } + if($k == 14 && $general['tl'] < 50) { continue; } //토너승률인데 50회 미만시 스킵 - if($k == 15 && $general[tp] < 50) { continue; } + if($k == 15 && $general['tp'] < 50) { continue; } //토너승률인데 50회 미만시 스킵 - if($k == 16 && $general[ti] < 50) { continue; } + if($k == 16 && $general['ti'] < 50) { continue; } //수익률인데 1000미만시 스킵 - if($k == 20 && $general[betgold] < 1000) { continue; } + if($k == 20 && $general['betgold'] < 1000) { continue; } $rank = 10; for($i=0; $i < $count; $i++) { $ranker = MYDB_fetch_array($result); - if($general[$type[$k]] >= $ranker[data]) { + if($general[$type[$k]] >= $ranker['data']) { $rank = $i; break; } @@ -5925,10 +5928,10 @@ function CheckHall($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ranker = MYDB_fetch_array($result); - $query = "update hall set name='$ranker[name]', nation='$ranker[nation]', data='$ranker[data]', color='$ranker[color]', picture='$ranker[picture]' where type='$k' and rank='$j'"; + $query = "update hall set name='$ranker['name']', nation='$ranker['nation']', data='$ranker['data']', color='$ranker['color']', picture='$ranker['picture']' where type='$k' and rank='$j'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - $query = "update hall set name='$general[name]', nation='{$nation[name]}', data='{$general[$type[$k]]}', color='{$nation[color]}', picture='$general[picture]' where type='$k' and rank='$rank'"; + $query = "update hall set name='$general['name']', nation='{$nation['name']}', data='{$general[$type[$k]]}', color='{$nation['color']}', picture='$general['picture']' where type='$k' and rank='$rank'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -5938,7 +5941,7 @@ function info($connect, $type=0, $skin=1) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $termtype="120분 턴"; break; case 1: $termtype="60분 턴"; break; case 2: $termtype="30분 턴"; break; @@ -5959,23 +5962,23 @@ function info($connect, $type=0, $skin=1) { switch($type) { case 0: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; case 1: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; case 2: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)"; break; case 3: - echo "등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; + echo "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; } } function uniqueItem($connect, $general, $log, $vote=0) { - if($general[npc] >= 2 || $general[betray] > 1) { return $log; } - if($general[weap] > 6 || $general[book] > 6 || $general[horse] > 6 || $general[item] > 6) { return $log; } + if($general['npc'] >= 2 || $general['betray'] > 1) { return $log; } + if($general['weap'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; } $query = "select year,month,scenario from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5985,12 +5988,12 @@ function uniqueItem($connect, $general, $log, $vote=0) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - if($game[scenario] == 0) { $prob = $gen[cnt] * 5; } // 5~6개월에 하나씩 등장 - else { $prob = $gen[cnt]; } // 1~2개월에 하나씩 등장 + if($game['scenario'] == 0) { $prob = $gen['cnt'] * 5; } // 5~6개월에 하나씩 등장 + else { $prob = $gen['cnt']; } // 1~2개월에 하나씩 등장 - if($vote == 1) { $prob = round($gen[cnt] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장 - elseif($vote == 2) { $prob = round($gen[cnt] / 10 / 2); } // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?) - elseif($vote == 3) { $prob = round($gen[cnt] / 10 / 4); } // 건국시 4개(20%) 등장(200명시 20국 정도 됨) + if($vote == 1) { $prob = round($gen['cnt'] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장 + elseif($vote == 2) { $prob = round($gen['cnt'] / 10 / 2); } // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?) + elseif($vote == 3) { $prob = round($gen['cnt'] / 10 / 4); } // 건국시 4개(20%) 등장(200명시 20국 정도 됨) if($prob < 3) { $prob = 3; } //아이템 습득 상황 @@ -6018,72 +6021,72 @@ function uniqueItem($connect, $general, $log, $vote=0) { } $it = $item[rand() % count($item)]; - $query = "update general set {$type}='$it' where no='$general[no]'"; + $query = "update general set {$type}='$it' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select name from nation where nation='$general[nation]'"; + $query = "select name from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[name] == "") { - $nation[name] = "재야"; + if($nation['name'] == "") { + $nation['name'] = "재야"; } switch($sel) { case 0: $log[count($log)] = "".getWeapName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getWeapName($it)."(을)를 습득"); + $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getWeapName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } break; case 1: $log[count($log)] = "".getBookName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getBookName($it)."(을)를 습득"); + $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getBookName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; } break; case 2: $log[count($log)] = "".getHorseName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getHorseName($it)."(을)를 습득"); + $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getHorseName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } break; case 3: $log[count($log)] = "".getItemName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getItemName($it)."(을)를 습득"); + $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getItemName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; } break; } @@ -6099,41 +6102,41 @@ function checkAbility($connect, $general, $log) { $limit = $_upgradeLimit; - $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='$general[no]'"; + $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); if($general[leader2] < 0) { - $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='$general[no]'"; + $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 떨어졌습니다!"; } elseif($general[leader2] >= $limit) { - $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='$general[no]'"; + $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 올랐습니다!"; } if($general[power2] < 0) { - $query = "update general set power2='$limit'+power2,power=power-1 where no='$general[no]'"; + $query = "update general set power2='$limit'+power2,power=power-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 떨어졌습니다!"; } elseif($general[power2] >= $limit) { - $query = "update general set power2=power2-'$limit',power=power+1 where no='$general[no]'"; + $query = "update general set power2=power2-'$limit',power=power+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 올랐습니다!"; } if($general[intel2] < 0) { - $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='$general[no]'"; + $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "지력이 1 떨어졌습니다!"; } elseif($general[intel2] >= $limit) { - $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='$general[no]'"; + $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "지력이 1 올랐습니다!"; @@ -6143,33 +6146,33 @@ function checkAbility($connect, $general, $log) { } function checkDedication($connect, $general, $log) { - $dedlevel = getDedLevel($general[dedication]); + $dedlevel = getDedLevel($general['dedication']); - $query = "update general set dedlevel='$dedlevel' where no='$general[no]'"; + $query = "update general set dedlevel='$dedlevel' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 승급했다면 - if($general[dedlevel] < $dedlevel) { - $log[count($log)] = "".getDed($general[dedication])."(으)로 승급하여 봉록이 ".getBill($general[dedication])."(으)로 상승했습니다!"; + if($general['dedlevel'] < $dedlevel) { + $log[count($log)] = "".getDed($general['dedication'])."(으)로 승급하여 봉록이 ".getBill($general['dedication'])."(으)로 상승했습니다!"; // 강등했다면 - } elseif($general[dedlevel] > $dedlevel) { - $log[count($log)] = "".getDed($general[dedication])."(으)로 강등되어 봉록이 ".getBill($general[dedication])."(으)로 하락했습니다!"; + } elseif($general['dedlevel'] > $dedlevel) { + $log[count($log)] = "".getDed($general['dedication'])."(으)로 강등되어 봉록이 ".getBill($general['dedication'])."(으)로 하락했습니다!"; } return $log; } function checkExperience($connect, $general, $log) { - $explevel = getExpLevel($general[experience]); + $explevel = getExpLevel($general['experience']); - $query = "update general set explevel='$explevel' where no='$general[no]'"; + $query = "update general set explevel='$explevel' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 승급했다면 - if($general[explevel] < $explevel) { + if($general['explevel'] < $explevel) { $log[count($log)] = "Lv $explevel로 레벨업!"; // 강등했다면 - } elseif($general[explevel] > $explevel) { + } elseif($general['explevel'] > $explevel) { $log[count($log)] = "Lv $explevel로 레벨다운!"; } @@ -6227,32 +6230,32 @@ function processGoldIncome($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $incomeList = getGoldIncome($connect, $nation[nation], $nation[rate_tmp], $admin[gold_rate], $nation[type]); + $incomeList = getGoldIncome($connect, $nation['nation'], $nation['rate_tmp'], $admin['gold_rate'], $nation['type']); $income = $incomeList[0] + $incomeList[1]; - $originoutcome = getGoldOutcome($connect, $nation[nation], 100); // 100%의 지급량 - $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 + $originoutcome = getGoldOutcome($connect, $nation['nation'], 100); // 100%의 지급량 + $outcome = round($originoutcome * $nation['bill'] / 100); // 지급량에 따른 요구량 // 실제 지급량 계산 - $nation[gold] += $income; + $nation['gold'] += $income; // 기본량도 안될경우 - if($nation[gold] < $_basegold) { + if($nation['gold'] < $_basegold) { $realoutcome = 0; // 실지급율 $ratio = 0; //기본량은 넘지만 요구량이 안될경우 - } elseif($nation[gold] - $_basegold < $outcome) { - $realoutcome = $nation[gold] - $_basegold; - $nation[gold] = $_basegold; + } elseif($nation['gold'] - $_basegold < $outcome) { + $realoutcome = $nation['gold'] - $_basegold; + $nation['gold'] = $_basegold; // 실지급율 $ratio = $realoutcome / $originoutcome; } else { $realoutcome = $outcome; - $nation[gold] -= $realoutcome; + $nation['gold'] -= $realoutcome; // 실지급율 $ratio = $realoutcome / $originoutcome; } - $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세금 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과금 : ".tab2($nation[gold],6," "); + $adminLog[count($adminLog)] = _String::Fill2($nation['name'],12," ")." // 세금 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과금 : ".tab2($nation['gold'],6," "); - $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; + $query = "select no,name,nation from general where nation='$nation['nation']' and level>='9'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($coreresult); $corelog[0] = "●이번 수입은 금 $income입니다."; @@ -6261,20 +6264,20 @@ function processGoldIncome($connect) { pushGenLog($coregen, $corelog); } - $query = "update nation set gold='$nation[gold]' where nation='$nation[nation]'"; + $query = "update nation set gold='$nation['gold']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name,nation,dedication,gold from general where nation='$nation[nation]'"; + $query = "select no,name,nation,dedication,gold from general where nation='$nation['nation']'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); // 각 장수들에게 지급 for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $gold = round(getBill($general[dedication])*$ratio); - $general[gold] += $gold; + $gold = round(getBill($general['dedication'])*$ratio); + $general['gold'] += $gold; - $query = "update general set gold='$general[gold]' where no='$general[no]'"; + $query = "update general set gold='$general['gold']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●봉급으로 금 $gold을 받았습니다."; @@ -6282,7 +6285,7 @@ function processGoldIncome($connect) { } } - $history[0] = "●$admin[year]년 $admin[month]월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; + $history[0] = "●$admin['year']년 $admin['month']월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; pushHistory($connect, $history); pushAdminLog($connect, $adminLog); } @@ -6294,8 +6297,8 @@ function popIncrease($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $rate[$nation[nation]] = $nation[rate_tmp]; - $type[$nation[nation]] = $nation[type]; + $rate[$nation['nation']] = $nation['rate_tmp']; + $type[$nation['nation']] = $nation['type']; } $query = "select * from city where supply='1'"; // 도시 목록 @@ -6306,42 +6309,42 @@ function popIncrease($connect) { for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($cityresult); - $pop = $city[pop]; - if($city[nation] == 0) { - $pop = $city[pop]; // 공백지는 증가하지 않게 + $pop = $city['pop']; + if($city['nation'] == 0) { + $pop = $city['pop']; // 공백지는 증가하지 않게 $cityrate = 50; $ratio = 0.99; // 공백지는 수비 빼고 약간씩 감소 - $agri = floor($city[agri] * $ratio); - $comm = floor($city[comm] * $ratio); - $secu = floor($city[secu] * $ratio); - $def = $city[def]; - $wall = $city[wall]; + $agri = floor($city['agri'] * $ratio); + $comm = floor($city['comm'] * $ratio); + $secu = floor($city['secu'] * $ratio); + $def = $city['def']; + $wall = $city['wall']; } else { - $ratio = (20 - $rate[$city[nation]])/200; // 20일때 0% 0일때 10% 100일때 -40% - $agri = $city[agri] + floor($city[agri] * $ratio); //내정도 증감 - $comm = $city[comm] + floor($city[comm] * $ratio); - $secu = $city[secu] + floor($city[secu] * $ratio); - $def = $city[def] + floor($city[def] * $ratio); - $wall = $city[wall] + floor($city[wall] * $ratio); - $ratio = (30 - $rate[$city[nation]])/200; // 20일때 5% 5일때 12.5% 50일때 -10% + $ratio = (20 - $rate[$city['nation']])/200; // 20일때 0% 0일때 10% 100일때 -40% + $agri = $city['agri'] + floor($city['agri'] * $ratio); //내정도 증감 + $comm = $city['comm'] + floor($city['comm'] * $ratio); + $secu = $city['secu'] + floor($city['secu'] * $ratio); + $def = $city['def'] + floor($city['def'] * $ratio); + $wall = $city['wall'] + floor($city['wall'] * $ratio); + $ratio = (30 - $rate[$city['nation']])/200; // 20일때 5% 5일때 12.5% 50일때 -10% if($ratio >= 0) { // 국가보정 - if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 1.2; } - if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 0.8; } - $ratio *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + if($type[$city['nation']] == 4 || $type[$city['nation']] == 6 || $type[$city['nation']] == 7 || $type[$city['nation']] == 8 || $type[$city['nation']] == 12 || $type[$city['nation']] == 13) { $ratio *= 1.2; } + if($type[$city['nation']] == 1 || $type[$city['nation']] == 3) { $ratio *= 0.8; } + $ratio *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 } else { // 국가보정 - if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 0.8; } - if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 1.2; } - $ratio *= (1 - $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 경감 + if($type[$city['nation']] == 4 || $type[$city['nation']] == 6 || $type[$city['nation']] == 7 || $type[$city['nation']] == 8 || $type[$city['nation']] == 12 || $type[$city['nation']] == 13) { $ratio *= 0.8; } + if($type[$city['nation']] == 1 || $type[$city['nation']] == 3) { $ratio *= 1.2; } + $ratio *= (1 - $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 경감 } - $pop = $city[pop] + floor($city[pop] * $ratio) + 5000; // 기본 5000명은 증가 + $pop = $city['pop'] + floor($city['pop'] * $ratio) + 5000; // 기본 5000명은 증가 $ratio = round($ratio*100, 2); - $cityrate = $city[rate]; - $cityrate = $cityrate + (20 - $rate[$city[nation]]); + $cityrate = $city['rate']; + $cityrate = $cityrate + (20 - $rate[$city['nation']]); if($cityrate > 100) { $cityrate = 100; } if($cityrate < 0) { $cityrate = 0; } } @@ -6354,7 +6357,7 @@ function popIncrease($connect) { if($wall > $city[wall2]) { $wall = $city[wall2]; } //시세 - $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='$city[city]'"; + $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6365,21 +6368,21 @@ function getGoldIncome($connect, $nationNo, $rate, $admin_rate, $type) { $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level4[$gen[no]] = $gen[city]; + $level4[$gen['no']] = $gen['city']; } $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level3[$gen[no]] = $gen[city]; + $level3[$gen['no']] = $gen['city']; } $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level2[$gen[no]] = $gen[city]; + $level2[$gen['no']] = $gen['city']; } $query = "select capital,level from nation where nation='$nationNo'"; // 수도 @@ -6396,17 +6399,17 @@ function getGoldIncome($connect, $nationNo, $rate, $admin_rate, $type) { $city = MYDB_fetch_array($cityresult); //민충 0~100 : 50~100 수입 - $ratio = $city[rate] / 2 + 50; - $tax1 = ($city[pop] * $city[comm] / $city[comm2] * $ratio / 1000) / 3; -// $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; - $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 -// $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + $ratio = $city['rate'] / 2 + 50; + $tax1 = ($city['pop'] * $city['comm'] / $city[comm2] * $ratio / 1000) / 3; +// $tax2 = $city['def'] * $city['wall'] / $city[wall2] / 3; + $tax1 *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 +// $tax2 *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 //도시 관직 추가 세수 - if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level4[$city[gen1]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level3[$city[gen2]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level2[$city[gen3]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } //수도 추가 세수 130%~105% - if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } + if($city['city'] == $nation['capital']) { $tax1 *= 1+(1/3/$nation['level']); $tax2 *= 1+(1/3/$nation['level']); } $income[0] += $tax1; // $income[1] += $tax2; @@ -6431,11 +6434,11 @@ function processDeadIncome($connect, $admin_rate) { for($i=0; $i < $nationCount; $i++) { $nation = MYDB_fetch_array($result); - $income = getDeadIncome($connect, $nation[nation], $nation[type], $admin_rate); + $income = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin_rate); // 단기수입 금만적용 -// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='$nation[nation]'"; - $query = "update nation set gold=gold+'$income' where nation='$nation[nation]'"; +// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='$nation['nation']'"; + $query = "update nation set gold=gold+'$income' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 10%수입, 20%부상병 @@ -6453,7 +6456,7 @@ function getDeadIncome($connect, $nation, $type, $admin_rate) { for($k=0; $k < $cityCount; $k++) { $city = MYDB_fetch_array($cityResult); - $income += $city[dead]; + $income += $city['dead']; } $income /= 10; @@ -6475,7 +6478,7 @@ function getGoldOutcome($connect, $nation, $bill) { $outcome = 0; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $outcome += getBill($general[dedication]); + $outcome += getBill($general['dedication']); } $outcome = round($outcome * $bill / 100); @@ -6527,33 +6530,33 @@ function processRiceIncome($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $incomeList = getRiceIncome($connect, $nation[nation], $nation[rate_tmp], $admin[rice_rate], $nation[type]); + $incomeList = getRiceIncome($connect, $nation['nation'], $nation['rate_tmp'], $admin['rice_rate'], $nation['type']); $income = $incomeList[0] + $incomeList[1]; - $originoutcome = getRiceOutcome($connect, $nation[nation], 100); // 100%의 지급량 - $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 + $originoutcome = getRiceOutcome($connect, $nation['nation'], 100); // 100%의 지급량 + $outcome = round($originoutcome * $nation['bill'] / 100); // 지급량에 따른 요구량 // 실제 지급량 계산 - $nation[rice] += $income; + $nation['rice'] += $income; // 기본량도 안될경우 - if($nation[rice] < $_baserice) { + if($nation['rice'] < $_baserice) { $realoutcome = 0; // 실지급율 $ratio = 0; //기본량은 넘지만 요구량이 안될경우 - } elseif($nation[rice] - $_baserice < $outcome) { - $realoutcome = $nation[rice] - $_baserice; - $nation[rice] = $_baserice; + } elseif($nation['rice'] - $_baserice < $outcome) { + $realoutcome = $nation['rice'] - $_baserice; + $nation['rice'] = $_baserice; // 실지급율 $ratio = $realoutcome / $originoutcome; } else { $realoutcome = $outcome; - $nation[rice] -= $realoutcome; + $nation['rice'] -= $realoutcome; // 실지급율 $ratio = $realoutcome / $originoutcome; } - $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세곡 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과곡 : ".tab2($nation[rice],6," "); + $adminLog[count($adminLog)] = _String::Fill2($nation['name'],12," ")." // 세곡 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과곡 : ".tab2($nation['rice'],6," "); - $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; + $query = "select no,name,nation from general where nation='$nation['nation']' and level>='9'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($coreresult); $corelog[0] = "●이번 수입은 쌀 $income입니다."; @@ -6562,20 +6565,20 @@ function processRiceIncome($connect) { pushGenLog($coregen, $corelog); } - $query = "update nation set rice='$nation[rice]' where nation='$nation[nation]'"; + $query = "update nation set rice='$nation['rice']' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name,nation,dedication,rice from general where nation='$nation[nation]'"; + $query = "select no,name,nation,dedication,rice from general where nation='$nation['nation']'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); // 각 장수들에게 지급 for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $rice = round(getBill($general[dedication])*$ratio); - $general[rice] += $rice; + $rice = round(getBill($general['dedication'])*$ratio); + $general['rice'] += $rice; - $query = "update general set rice='$general[rice]' where no='$general[no]'"; + $query = "update general set rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●봉급으로 쌀 $rice을 받았습니다."; @@ -6583,7 +6586,7 @@ function processRiceIncome($connect) { } } - $history[0] = "●$admin[year]년 $admin[month]월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; + $history[0] = "●$admin['year']년 $admin['month']월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; pushHistory($connect, $history); pushAdminLog($connect, $adminLog); } @@ -6594,21 +6597,21 @@ function getRiceIncome($connect, $nationNo, $rate, $admin_rate, $type) { $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level4[$gen[no]] = $gen[city]; + $level4[$gen['no']] = $gen['city']; } $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level3[$gen[no]] = $gen[city]; + $level3[$gen['no']] = $gen['city']; } $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($j=0; $j < $count; $j++) { $gen = MYDB_fetch_array($result); - $level2[$gen[no]] = $gen[city]; + $level2[$gen['no']] = $gen['city']; } $query = "select capital,level from nation where nation='$nationNo'"; // 수도 @@ -6625,17 +6628,17 @@ function getRiceIncome($connect, $nationNo, $rate, $admin_rate, $type) { $city = MYDB_fetch_array($cityresult); //민충 0~100 : 50~100 수입 - $ratio = $city[rate] / 2 + 50; - $tax1 = ($city[pop] * $city[agri] / $city[agri2] * $ratio / 1000) / 3; - $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; - $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 - $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 + $ratio = $city['rate'] / 2 + 50; + $tax1 = ($city['pop'] * $city['agri'] / $city[agri2] * $ratio / 1000) / 3; + $tax2 = $city['def'] * $city['wall'] / $city[wall2] / 3; + $tax1 *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 + $tax2 *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 //도시 관직 추가 세수 - if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level4[$city[gen1]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level3[$city[gen2]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } + if($level2[$city[gen3]] == $city['city']) { $tax1 *= 1.05; $tax2 *= 1.05; } //수도 추가 세수 130%~105% - if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } + if($city['city'] == $nation['capital']) { $tax1 *= 1+(1/3/$nation['level']); $tax2 *= 1+(1/3/$nation['level']); } $income[0] += $tax1; $income[1] += $tax2; } @@ -6660,7 +6663,7 @@ function getRiceOutcome($connect, $nation, $bill) { $outcome = 0; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - $outcome += getBill($general[dedication]); + $outcome += getBill($general['dedication']); } $outcome = round($outcome * $bill / 100); @@ -6676,7 +6679,7 @@ function tradeRate($connect) { for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($cityresult); //시세 - switch($city[level]) { + switch($city['level']) { case 1: $per = 0; break; case 2: $per = 0; break; case 3: $per = 0; break; @@ -6692,7 +6695,7 @@ function tradeRate($connect) { } else { $trade = 0; } - $query = "update city set trade='$trade' where city='$city[city]'"; + $query = "update city set trade='$trade' where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6707,7 +6710,7 @@ function disaster($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 초반 3년은 스킵 - if($admin[startyear] + 3 > $admin[year]) return; + if($admin['startyear'] + 3 > $admin['year']) return; $query = "select city,name,secu,secu2 from city"; // 도시 목록 $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -6715,20 +6718,20 @@ function disaster($connect) { $disastertype = rand() % 4; $isgood = 0; - if($admin[month] == 4 && $disastertype == 3) { $isgood = 1; } - if($admin[month] == 7 && $disastertype == 3) { $isgood = 1; } + if($admin['month'] == 4 && $disastertype == 3) { $isgood = 1; } + if($admin['month'] == 7 && $disastertype == 3) { $isgood = 1; } for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($cityresult); //호황 발생 도시 선택 ( 기본 3% 이므로 약 3개 도시 ) //재해 발생 도시 선택 ( 기본 6% 이므로 약 6개 도시 ) - if($isgood == 1) { $ratio = 3 + round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% - else { $ratio = 6 - round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% + if($isgood == 1) { $ratio = 3 + round(1.0*$city['secu']/$city[secu2]*3); } // 3 ~ 6% + else { $ratio = 6 - round(1.0*$city['secu']/$city[secu2]*3); } // 3 ~ 6% if(rand()%100+1 < $ratio) { - $disastercity[count($disastercity)] = $city[city]; - $disasterratio[count($disastercity)] = 1.0 * $city[secu] / $city[secu2]; - $disastername .= $city[name]." "; + $disastercity[count($disastercity)] = $city['city']; + $disasterratio[count($disastercity)] = 1.0 * $city['secu'] / $city[secu2]; + $disastername .= $city['name']." "; } } @@ -6737,24 +6740,24 @@ function disaster($connect) { //재해 처리 if(count($disastercity)) { $state = 0; - switch($admin[month]) { + switch($admin['month']) { //봄 case 1: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; $state = 4; break; case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; $state = 3; break; case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; $state = 9; break; } @@ -6763,19 +6766,19 @@ function disaster($connect) { case 4: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; $state = 7; break; case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; $state = 6; break; case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; $state = 2; $isGood = 1; break; @@ -6785,19 +6788,19 @@ function disaster($connect) { case 7: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; $state = 8; break; case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; $state = 8; break; case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; $state = 1; $isGood = 1; break; @@ -6807,19 +6810,19 @@ function disaster($connect) { case 10: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; $state = 3; break; case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; $state = 3; break; case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; $state = 9; break; } @@ -6842,19 +6845,19 @@ function disaster($connect) { $ratio = (101 + $ratio) / 100.0; // 치안률 따라서 101~105% $city = getCity($connect, $disastercity[$i]); - $city[pop] *= $ratio; $city[rate] *= $ratio; $city[agri] *= $ratio; - $city[comm] *= $ratio; $city[secu] *= $ratio; $city[def] *= $ratio; - $city[wall] *= $ratio; + $city['pop'] *= $ratio; $city['rate'] *= $ratio; $city['agri'] *= $ratio; + $city['comm'] *= $ratio; $city['secu'] *= $ratio; $city['def'] *= $ratio; + $city['wall'] *= $ratio; - if($city[pop] > $city[pop2]) { $city[pop] = $city[pop2]; } - if($city[rate] > 100) { $city[rate] = 100; } - if($city[agri] > $city[agri2]) { $city[agri] = $city[agri2]; } - if($city[comm] > $city[comm2]) { $city[comm] = $city[comm2]; } - if($city[secu] > $city[secu2]) { $city[secu] = $city[secu2]; } - if($city[def] > $city[def2]) { $city[def] = $city[def2]; } - if($city[wall] > $city[wall2]) { $city[wall] = $city[wall2]; } + if($city['pop'] > $city[pop2]) { $city['pop'] = $city[pop2]; } + if($city['rate'] > 100) { $city['rate'] = 100; } + if($city['agri'] > $city[agri2]) { $city['agri'] = $city[agri2]; } + if($city['comm'] > $city[comm2]) { $city['comm'] = $city[comm2]; } + if($city['secu'] > $city[secu2]) { $city['secu'] = $city[secu2]; } + if($city['def'] > $city[def2]) { $city['def'] = $city[def2]; } + if($city['wall'] > $city[wall2]) { $city['wall'] = $city[wall2]; } - $query = "update city set state='$state',pop='$city[pop]',rate='$city[rate]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]',def='$city[def]',wall='$city[wall]' where city='$disastercity[$i]'"; + $query = "update city set state='$state',pop='$city['pop']',rate='$city['rate']',agri='$city['agri']',comm='$city['comm']',secu='$city['secu']',def='$city['def']',wall='$city['wall']' where city='$disastercity[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6872,7 +6875,7 @@ function getAdmin($connect) { } function getMe($connect) { - $query = "select * from general where user_id='$_SESSION[p_id]'"; + $query = "select * from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -6973,32 +6976,32 @@ function ConvertLog($str, $type=1) { } function deleteNation($connect, $general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general[nation]'"; + $query = "select name from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【멸망】$nation[name]은(는) 멸망했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【멸망】$nation['name']은(는) 멸망했습니다."; // 전 장수 재야로 // 전 장수 소속 무소속으로 - $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='$general[nation]'"; + $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 도시 공백지로 - $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='$general[nation]'"; + $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where nation='$general[nation]'"; + $query = "delete from troop where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가 삭제 - $query = "delete from nation where nation='$general[nation]'"; + $query = "delete from nation where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$general[nation]' or you='$general[nation]'"; + $query = "delete from diplomacy where me='$general['nation']' or you='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushHistory($connect, $history); @@ -7009,17 +7012,17 @@ function nextRuler($connect, $general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general[nation]'"; + $query = "select nation,name,history from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no,name from general where nation='$general[nation]' and level!='12' and level>='9' order by level desc"; + $query = "select no,name from general where nation='$general['nation']' and level!='12' and level>='9' order by level desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($result); //npc or npc유저인 경우 후계 찾기 - if($general[npc] > 0) { - $query = "select no,name,nation,IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]')) as npcmatch2 from general where nation='$general[nation]' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; + if($general['npc'] > 0) { + $query = "select no,name,nation,IF(ABS(npcmatch-'$general['npcmatch']')>75,150-ABS(npcmatch-'$general['npcmatch']'),ABS(npcmatch-'$general['npcmatch']')) as npcmatch2 from general where nation='$general['nation']' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; $npcresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($npcresult); } else { @@ -7030,17 +7033,17 @@ function nextRuler($connect, $general) { if($npccount > 0) { $nextruler = MYDB_fetch_array($npcresult); //국명 교체 - //$query = "update nation set name='$nextruler[name]' where nation='$general[nation]'"; + //$query = "update nation set name='$nextruler['name']' where nation='$general['nation']'"; //MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($corecount == 0) { - $query = "select no,name from general where nation='$general[nation]' and level!='12' order by dedication desc"; + $query = "select no,name from general where nation='$general['nation']' and level!='12' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($result); // 아무도 없으면 국가 삭제 if($corecount == 0) { //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); + DeleteConflict($connect, $general['nation']); deleteNation($connect, $general); return; } else { @@ -7051,22 +7054,22 @@ function nextRuler($connect, $general) { } //군주 교체 - $query = "update general set level='12' where no='$nextruler[no]'"; + $query = "update general set level='12' where no='$nextruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen1=0 where gen1='$nextruler[no]'"; + $query = "update city set gen1=0 where gen1='$nextruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen2=0 where gen2='$nextruler[no]'"; + $query = "update city set gen2=0 where gen2='$nextruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen3=0 where gen3='$nextruler[no]'"; + $query = "update city set gen3=0 where gen3='$nextruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받았습니다"; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【유지】$nextruler['name'](이)가 $nation['name']의 유지를 이어 받았습니다"; pushHistory($connect, $history); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받음."); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:【유지】$nextruler['name'](이)가 $nation['name']의 유지를 이어 받음."); // 장수 삭제 및 부대처리는 checkTurn에서 } @@ -7118,8 +7121,8 @@ function distance($connect, $from, $maxDist=99) { $cityNum = MYDB_num_rows($result); for($i=0; $i < $cityNum; $i++) { $city = MYDB_fetch_array($result); - $cityPath[$city[city]] = $city[path]; - $dist[$city[city]] = 99; + $cityPath[$city['city']] = $city['path']; + $dist[$city['city']] = 99; } $select = 0; @@ -7168,7 +7171,7 @@ function isClose($connect, $nation1, $nation2) { $city = MYDB_fetch_array($result); // 각 도시당 모든 인접 도시 플래그 세팅 - $path = explode("|", $city[path]); + $path = explode("|", $city['path']); for($j=0; $j < count($path); $j++) { $barrier[$path[$j]] = 1; } @@ -7182,7 +7185,7 @@ function isClose($connect, $nation1, $nation2) { for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($result); - if($barrier[$city[city]] == 1) { + if($barrier[$city['city']] == 1) { $isClose = 1; } } @@ -7263,9 +7266,9 @@ function TrickInjury($connect, $city, $type=0) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); if($type == 0) { - $log[0] = "●{$admin[month]}월:계략으로 인해 부상을 당했습니다."; + $log[0] = "●{$admin['month']}월:계략으로 인해 부상을 당했습니다."; } else { - $log[0] = "●{$admin[month]}월:재난으로 인해 부상을 당했습니다."; + $log[0] = "●{$admin['month']}월:재난으로 인해 부상을 당했습니다."; } for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); @@ -7274,7 +7277,7 @@ function TrickInjury($connect, $city, $type=0) { if($injury < 30) { // 부상률 30% $injury = floor($injury / 2) + 1; // 부상 1~16 - $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='$general[no]'"; + $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); @@ -7338,7 +7341,7 @@ function command_Single($connect, $turn, $command) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$command}'"; } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; + $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; @@ -7347,17 +7350,17 @@ function command_Single($connect, $turn, $command) { function command_Chief($connect, $turn, $command) { $command = EncodeCommand(0, 0, 0, $command); - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - if($me[level] >= 5) { + if($me['level'] >= 5) { $count = sizeof($turn); $str = "type=type"; for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$command}'"; + $str .= ",l{$me['level']}turn{$turn[$i]}='{$command}'"; } - $query = "update nation set {$str} where nation='$me[nation]'"; + $query = "update nation set {$str} where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; diff --git a/twe/func_auction.php b/twe/func_auction.php index 065d6919..469fc046 100644 --- a/twe/func_auction.php +++ b/twe/func_auction.php @@ -20,7 +20,7 @@ function registerAuction($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $unit = 7200; break; case 1: $unit = 3600; break; case 2: $unit = 1800; break; @@ -36,10 +36,10 @@ function registerAuction($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($general[gold] < 1000) { $general[gold] = 1000; } - if($general[gold] > 20000) { $general[gold] = 20000; } - if($general[rice] < 1000) { $general[rice] = 1000; } - if($general[rice] > 20000) { $general[rice] = 20000; } + if($general['gold'] < 1000) { $general['gold'] = 1000; } + if($general['gold'] > 20000) { $general['gold'] = 20000; } + if($general['rice'] < 1000) { $general['rice'] = 1000; } + if($general['rice'] > 20000) { $general['rice'] = 20000; } /* // 유닉템 등록 @@ -75,8 +75,8 @@ function registerAuction($connect) { //평균 금의 100% $amount = 1; - $cost = $general[gold]; - $topv = $general[maxgold] * 10; + $cost = $general['gold']; + $topv = $general['maxgold'] * 10; if($cost < 5000) { $cost = 5000; } if($topv < 10000) { $topv = 10000; } @@ -88,8 +88,8 @@ function registerAuction($connect) { $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ암시장상인', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin[month]}월:".GetStuffName($stuff)."(이)가 거래장에 등장했습니다!"; - $history[0] = "●$admin[year]년 $admin[month]월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; + $alllog[0] = "●{$admin['month']}월:".GetStuffName($stuff)."(이)가 거래장에 등장했습니다!"; + $history[0] = "●$admin['year']년 $admin['month']월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; pushAllLog($alllog); pushHistory($connect, $history); } @@ -104,8 +104,8 @@ function registerAuction($connect) { if(rand()%$count == 0) { //평균 쌀의 5% ~ 25% $mul = rand() % 5 + 1; - $amount = $general[rice] / 20 * $mul; - $cost = $general[gold] / 20 * 0.9 * $mul; + $amount = $general['rice'] / 20 * $mul; + $cost = $general['gold'] / 20 * 0.9 * $mul; $topv = $amount * 2; if($cost <= $amount*0.8) { $cost = $amount*0.8; } if($cost >= $amount*1.2) { $cost = $amount*1.2; } @@ -128,8 +128,8 @@ function registerAuction($connect) { if(rand()%$count == 0) { //평균 쌀의 5% ~ 25% $mul = rand() % 5 + 1; - $amount = $general[rice] / 20 * $mul; - $cost = $general[gold] / 20 * 1.1 * $mul; + $amount = $general['rice'] / 20 * $mul; + $cost = $general['gold'] / 20 * 1.1 * $mul; $topv = $amount * 0.5; if($cost <= $amount*0.8) { $cost = $amount*0.8; } if($cost >= $amount*1.2) { $cost = $amount*1.2; } @@ -160,22 +160,22 @@ function processAuction($connect) { $auction = MYDB_fetch_array($result2); // 유닉템 처리 - if($auction[stuff] != 0) { + if($auction['stuff'] != 0) { if($auction[no2] == 0) { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, 그러나 입찰자 부재"; pushAuctionLog($connect, $auctionLog); } else { - $trader[no] = 0; - $trader[name] = 'ⓝ암시장상인'; - $trader[gold] = 99999999; - $trader[rice] = 99999999; + $trader['no'] = 0; + $trader['name'] = 'ⓝ암시장상인'; + $trader['gold'] = 99999999; + $trader['rice'] = 99999999; $query = "select no,name,gold,rice from general where no='$auction[no2]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $bidder = MYDB_fetch_array($result); - $sel1 = $auction[stuff] % 10; - $sel2 = floor($auction[stuff] / 10); + $sel1 = $auction['stuff'] % 10; + $sel2 = floor($auction['stuff'] / 10); switch($sel1) { case 1: $type = "weap"; break; case 2: $type = "book"; break; @@ -189,30 +189,30 @@ function processAuction($connect) { // 판매거래만 존재 if($count > 0) { - $traderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 아이템 이미 매진!"; - } elseif($auction[value] > $bidder[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + $traderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; + $bidderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 아이템 이미 매진!"; + } elseif($auction['value'] > $bidder['gold'] - 1000) { + $gold = round($auction['value'] * 0.01); + $bidder['gold'] -= $gold; + if($bidder['gold'] < 0) $bidder['gold'] = 0; + $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 ".GetStuffName($auction[stuff])."(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, ".GetStuffName($auction[stuff])." 구입!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; + $traderLog[0] = "◆{$auction['no']}번 거래 성사로 ".GetStuffName($auction['stuff'])."(을)를 판매, 금 {$auction['value']}(을)를 획득!"; + $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, ".GetStuffName($auction['stuff'])." 구입!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; $auctionLog[0] .= " ★ 아이템 거래 ★"; - $query = "update general set gold=gold-'$auction[value]',{$type}='$sel2' where no='$auction[no2]'"; + $query = "update general set gold=gold-'$auction['value']',{$type}='$sel2' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin[month]}월:$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; - $history[0] = "●$admin[year]년 $admin[month]월:【암시장】$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; + $alllog[0] = "●{$admin['month']}월:$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; + $history[0] = "●$admin['year']년 $admin['month']월:【암시장】$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; pushAllLog($alllog); pushHistory($connect, $history); } @@ -229,21 +229,21 @@ function processAuction($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $trader = MYDB_fetch_array($result); - $traderLog[0] = "◆입찰자 부재로 {$auction[no]}번 거래 유찰!"; - if($auction[type] == 0) { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, 그러나 입찰자 부재"; + $traderLog[0] = "◆입찰자 부재로 {$auction['no']}번 거래 유찰!"; + if($auction['type'] == 0) { + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, 그러나 입찰자 부재"; } else { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, 그러나 입찰자 부재"; } pushGenLog($trader, $traderLog); pushAuctionLog($connect, $auctionLog); } } else { if($auction[no1] == 0) { - $trader[no] = 0; - $trader[name] = 'ⓝ상인'; - $trader[gold] = 99999; - $trader[rice] = 99999; + $trader['no'] = 0; + $trader['name'] = 'ⓝ상인'; + $trader['gold'] = 99999; + $trader['rice'] = 99999; } else { $query = "select no,name,gold,rice from general where no='$auction[no1]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -254,41 +254,41 @@ function processAuction($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $bidder = MYDB_fetch_array($result); //판매거래 - if($auction[type] == 0) { - if($auction[amount] > $trader[rice] - 1000) { - $gold = round($auction[value] * 0.01); - $trader[gold] -= $gold; - if($trader[gold] < 0) $trader[gold] = 0; - $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; + if($auction['type'] == 0) { + if($auction['amount'] > $trader['rice'] - 1000) { + $gold = round($auction['value'] * 0.01); + $trader['gold'] -= $gold; + if($trader['gold'] < 0) $trader['gold'] = 0; + $query = "update general set gold='$trader['gold']' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $traderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; - } elseif($auction[value] > $bidder[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + $traderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; + $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; + } elseif($auction['value'] > $bidder['gold'] - 1000) { + $gold = round($auction['value'] * 0.01); + $bidder['gold'] -= $gold; + if($bidder['gold'] < 0) $bidder['gold'] = 0; + $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; - if($auction[value] >= $auction[amount] * 2) { + $traderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; + $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; + if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; - } elseif($auction[value] >= $auction[topv]) { + } elseif($auction['value'] >= $auction['topv']) { $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; - } elseif($auction[value] * 2 <= $auction[amount]) { + } elseif($auction['value'] * 2 <= $auction['amount']) { $auctionLog[0] .= " ★ 최저가 거래 ★"; } - $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no1]'"; + $query = "update general set gold=gold+'$auction['value']',rice=rice-'$auction['amount']' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no2]'"; + $query = "update general set gold=gold-'$auction['value']',rice=rice+'$auction['amount']' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); @@ -296,41 +296,41 @@ function processAuction($connect) { pushAuctionLog($connect, $auctionLog); //구매거래 } else { - if($auction[amount] > $bidder[rice] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; + if($auction['amount'] > $bidder['rice'] - 1000) { + $gold = round($auction['value'] * 0.01); + $bidder['gold'] -= $gold; + if($bidder['gold'] < 0) $bidder['gold'] = 0; + $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; - } elseif($auction[value] > $trader[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $trader[gold] -= $gold; - if($trader[gold] < 0) $trader[gold] = 0; - $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; + $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; + $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; + } elseif($auction['value'] > $trader['gold'] - 1000) { + $gold = round($auction['value'] * 0.01); + $trader['gold'] -= $gold; + if($trader['gold'] < 0) $trader['gold'] = 0; + $query = "update general set gold='$trader['gold']' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $traderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; + $traderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; + $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 판매"; - if($auction[value] >= $auction[amount] * 2) { + $traderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; + $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; + $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 판매"; + if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; - } elseif($auction[value] * 2 <= $auction[amount]) { + } elseif($auction['value'] * 2 <= $auction['amount']) { $auctionLog[0] .= " ★ 최저가 거래 ★"; - } elseif($auction[value] <= $auction[topv]) { + } elseif($auction['value'] <= $auction['topv']) { $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; } - $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no1]'"; + $query = "update general set gold=gold-'$auction['value']',rice=rice+'$auction['amount']' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no2]'"; + $query = "update general set gold=gold+'$auction['value']',rice=rice-'$auction['amount']' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); diff --git a/twe/func_history.php b/twe/func_history.php index 210eca7c..ae5b8d31 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -105,13 +105,13 @@ function LogHistory($connect, $isFirst=0) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation[nation]'"; + $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); - $nationStr .= " $nation[name]
"; - $powerStr .= "국력 $nation[power]
"; - $genStr .= "장수 $nation[gennum]
"; + $nationStr .= " $nation['name']
"; + $powerStr .= "국력 $nation['power']
"; + $genStr .= "장수 $nation['gennum']
"; $cityStr .= "속령 $citycount
"; } @@ -121,7 +121,7 @@ function LogHistory($connect, $isFirst=0) { insert into history ( year, month, map, log, genlog, nation, power, gen, city ) values ( - '$admin[year]', '$admin[month]', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' + '$admin['year']', '$admin['month']', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' )", $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/func_npc.php b/twe/func_npc.php index c1444023..fac79ba5 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -5,8 +5,8 @@ function RegNPC($connect) { $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; - $img = $admin[img]; + $fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; + $img = $admin['img']; // 상성 이름 사진 국가 도시 통 무 지 급 출생 사망 꿈 특기 RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1001, 1, "소제1",$img,1001, 0, "-", 20, 11, 48, 0, 168, 190, "유지", "-"); RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1002, 1, "헌제",$img,1002, 0, "-", 17, 13, 61, 0, 170, 250, "안전", "-", "한 왕실을 구해줄 이는 진정 없는 것인가..."); @@ -500,7 +500,7 @@ function RegNPC($connect) { RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1490, 50, "황호",$img,1490, 0, "-", 15, 17, 48, 0, 226, 263, "안전", "-"); RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1491, 147, "후성",$img,1491, 0, "-", 56, 62, 33, 0, 158, 199, "정복", "-"); - if($admin[extend] > 0) { + if($admin['extend'] > 0) { RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1492, 123, "가화",$img,1492, 0, "-", 50, 66, 40, 0, 176, 224, "-", "-"); RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1493, 999, "건석",$img,1493, 0, "-", 21, 12, 61, 0, 155, 189, "-", "-"); RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1494, 999, "견씨",$img,1494, 0, "-", 35, 24, 58, 0, 182, 221, "-", "-"); @@ -800,7 +800,7 @@ function SetDevelop($connect, $genType, $no, $city, $tech) { $city = MYDB_fetch_array($result); // 우선 선정 - if($city[rate] < 95) { + if($city['rate'] < 95) { $command = EncodeCommand(0, 0, 0, 4); // 우선 선정 $query = "update general set turn0='$command' where no='$no'"; @@ -814,16 +814,16 @@ function SetDevelop($connect, $genType, $no, $city, $tech) { case 0: //무장 case 2: //무내정장 if($prob < 30) { - if($city[de] < 99) { $command = EncodeCommand(0, 0, 0, 5); } //수비 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + if($city['de'] < 99) { $command = EncodeCommand(0, 0, 0, 5); } //수비 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } elseif($prob < 60) { - if($city[wa] < 99) { $command = EncodeCommand(0, 0, 0, 6); } //성벽 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + if($city['wa'] < 99) { $command = EncodeCommand(0, 0, 0, 6); } //성벽 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } elseif($prob < 90) { - if($city[se] < 99) { $command = EncodeCommand(0, 0, 0, 8); } //치안 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + if($city['se'] < 99) { $command = EncodeCommand(0, 0, 0, 8); } //치안 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } else { $command = EncodeCommand(0, 0, 0, 29); @@ -832,18 +832,18 @@ function SetDevelop($connect, $genType, $no, $city, $tech) { case 1: //지장 case 3: //지내정장 if($prob < 40) { - if($city[ag] < 99) { $command = EncodeCommand(0, 0, 0, 1); } //농업 + if($city['ag'] < 99) { $command = EncodeCommand(0, 0, 0, 1); } //농업 elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } elseif($prob < 80) { - if($city[co] < 99) { $command = EncodeCommand(0, 0, 0, 2); } //상업 + if($city['co'] < 99) { $command = EncodeCommand(0, 0, 0, 2); } //상업 elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } elseif($prob < 90) { if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 + elseif($city['po'] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 else { $command = EncodeCommand(0, 0, 0, 9); } //조달 } else { if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3 + (rand() % 2) * 6); } //기술, 조달 @@ -956,7 +956,7 @@ function processAI($connect, $no) { $result = MYDB_query($query, $connect) or Error("processAI00 ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); // 초반 여부 - if($admin[startyear]+2 > $admin[year] || ($admin[startyear]+2 == $admin[year] && $admin[month] < 5)) { + if($admin['startyear']+2 > $admin['year'] || ($admin['startyear']+2 == $admin['year'] && $admin['month'] < 5)) { $isStart = 1; } else { $isStart = 0; @@ -971,56 +971,56 @@ function processAI($connect, $no) { return; } - $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='$general[city]'"; + $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='$general[nation]'"; + $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] >= 5) { - $query = "select l{$general[level]}turn0 from nation where nation='$general[nation]'"; + if($general['level'] >= 5) { + $query = "select l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); $coreCommand = MYDB_fetch_array($result); } $attackable = 0; - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1"; + $query = "select city from city where nation='$general['nation']' and supply='1' and front=1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); // 공격가능도시 있으면 1 if($cityCount > 0) { $attackable = 1; } $dipState = 0; - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term>8"; + $query = "select no from diplomacy where me='$general['nation']' and state=1 and term>8"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 선포중이면 1상태 if($dipCount > 0) { $dipState = 1; } - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=8"; + $query = "select no from diplomacy where me='$general['nation']' and state=1 and term<=8"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 전쟁준비 선포중이면 2상태 if($dipCount > 0) { $dipState = 2; } - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=3"; + $query = "select no from diplomacy where me='$general['nation']' and state=1 and term<=3"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 교전 직전이면 3상태 if($dipCount > 0) { $dipState = 3; } - $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $query = "select no from diplomacy where me='$general['nation']' and state=0"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 교전중이면 4상태 if($dipCount > 0) { $dipState = 4; } //무장 - if($general[power] >= $general[intel]) { + if($general['power'] >= $general['intel']) { $genType = 0; - if($general[intel] >= $general[power] * 0.8) { //무지장 + if($general['intel'] >= $general['power'] * 0.8) { //무지장 switch(rand() % 5) { case 0: case 1: case 2: case 3: $genType = 0; break; case 4: $genType = 1; break; @@ -1029,7 +1029,7 @@ function processAI($connect, $no) { //지장 } else { $genType = 1; - if($general[power] >= $general[intel] * 0.8) { //지무장 + if($general['power'] >= $general['intel'] * 0.8) { //지무장 switch(rand() % 5) { case 0: $genType = 0; break; case 1: case 2: case 3: case 4: $genType = 1; break; @@ -1038,29 +1038,29 @@ function processAI($connect, $no) { } //내정장 - if($general[leader] < 40) { + if($general['leader'] < 40) { $genType += 2; //$genType = 2; // 무내정장 //$genType = 3; // 지내정장 } - $tech = getTechCost($nation[tech]); + $tech = getTechCost($nation['tech']); - if($general[atmos] >= 90 && $general[train] >= 90) { - if($general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; + if($general['atmos'] >= 90 && $general['train'] >= 90) { + if($general['mode'] == 0) { + $query = "update general set mode=1 where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } } else { - if($general[mode] == 1) { - $query = "update general set mode=0 where no='$general[no]'"; + if($general['mode'] == 1) { + $query = "update general set mode=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } } //유기체메시지 출력 하루 6번 //특별 메세지 있는 경우 출력 하루 4번 - switch($admin[turnterm]) { + switch($admin['turnterm']) { case 0: $term = 1; break; case 1: $term = 1; break; case 2: $term = 2; break; @@ -1070,43 +1070,43 @@ function processAI($connect, $no) { case 6: $term = 30; break; case 7: $term = 60; break; } - if($general[npcid] == 2000 && rand()%(24*$term) < 6) { - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); - } elseif($general[npcmsg] != "" && rand()%(24*$term) < 3) { - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); + if($general['npcid'] == 2000 && rand()%(24*$term) < 6) { + PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $general['npcmsg']); + } elseif($general['npcmsg'] != "" && rand()%(24*$term) < 3) { + PushMsg(1, 0, $general['picture'], $general['imgsvr'], "{$general['name']}:", $nation['color'], $nation['name'], $nation['color'], $general['npcmsg']); } //재야인경우 - if($general[npc] == 5 && $general[level] == 0) { + if($general['npc'] == 5 && $general['level'] == 0) { // 오랑캐는 바로 임관 $query = "select nation from general where level=12 and npc=5 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); $rulerCount = MYDB_num_rows($result); if($rulerCount > 0) { $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + $command = EncodeCommand(0, 0, $ruler['nation'], 25); //임관 } else { $command = EncodeCommand(0, 0, 0, 42); //견문 } - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); return; - } elseif($general[npc] < 5 && $general[level] == 0) { + } elseif($general['npc'] < 5 && $general['level'] == 0) { switch(rand()%5) { //임관 40% case 0: case 1: - if($admin[scenario] == 0 || $admin[scenario] >= 20) { + if($admin['scenario'] == 0 || $admin['scenario'] >= 20) { // 가상모드엔 랜덤임관, 초반엔 부상 적은 군주 우선 70% - if($admin[startyear]+3 > $admin[year] && rand()%100 < 70) { + if($admin['startyear']+3 > $admin['year'] && rand()%100 < 70) { $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by injury,rand() limit 0,1"; } else { $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); $rulerCount = MYDB_num_rows($result); - if($rulerCount > 0 && $general[npcmatch] != 999 && $general[makelimit] == 0) { + if($rulerCount > 0 && $general['npcmatch'] != 999 && $general['makelimit'] == 0) { $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + $command = EncodeCommand(0, 0, $ruler['nation'], 25); //임관 } else { $command = EncodeCommand(0, 0, 0, 42); //견문 } @@ -1120,17 +1120,17 @@ function processAI($connect, $no) { $ratio = round($npcCount / ($nonCount + $npcCount) * 100); $ratio = round($ratio * 1.0); //NPC우선임관 - $query = "select nation,ABS(IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; + $query = "select nation,ABS(IF(ABS(npcmatch-'$general['npcmatch']')>75,150-ABS(npcmatch-'$general['npcmatch']'),ABS(npcmatch-'$general['npcmatch']'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); $rulerCount = MYDB_num_rows($result); - if($rulerCount > 0 && $general[npcmatch] != 999 && rand()%100 < $ratio && $general[makelimit] == 0) { // 엔국 비율대로 임관(50% : 50%) + if($rulerCount > 0 && $general['npcmatch'] != 999 && rand()%100 < $ratio && $general['makelimit'] == 0) { // 엔국 비율대로 임관(50% : 50%) $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 - } elseif($general[npcmatch] != 999 && $general[makelimit] == 0) { // NPC국가 없으면 유저국 임관 + $command = EncodeCommand(0, 0, $ruler['nation'], 25); //임관 + } elseif($general['npcmatch'] != 999 && $general['makelimit'] == 0) { // NPC국가 없으면 유저국 임관 $query = "select nation from general where level=12 and npc=0 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 + $command = EncodeCommand(0, 0, $ruler['nation'], 25); //임관 } else { $command = EncodeCommand(0, 0, 0, 42); //견문 } @@ -1139,8 +1139,8 @@ function processAI($connect, $no) { case 2: case 3: //거병이나 견문 40% // 초반이면서 능력이 좋은놈 위주로 1%확률로 거병 (300명 재야시 2년간 약 10개 거병 예상) $prop = rand() % 100; - $ratio = round(($general[leader] + $general[power] + $general[intel]) / 3); - if($admin[startyear]+2 > $admin[year] && $prop < $ratio && rand()%100 < 1 && $general[makelimit] == 0) { + $ratio = round(($general['leader'] + $general['power'] + $general['intel']) / 3); + if($admin['startyear']+2 > $admin['year'] && $prop < $ratio && rand()%100 < 1 && $general['makelimit'] == 0) { //거병 $command = EncodeCommand(0, 0, 0, 55); } else { @@ -1149,80 +1149,80 @@ function processAI($connect, $no) { } break; case 4: //이동 20% - $paths = explode("|", $city[path]); + $paths = explode("|", $city['path']); $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); break; } - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); return; } $rulerCommand = 0; //군주가 할일 - if($general[level] == 12) { + if($general['level'] == 12) { //오랑캐인데 공격 못하면 바로 방랑/해산 - if($general[npc] == 5 && $dipState == 0 && $attackable == 0) { + if($general['npc'] == 5 && $dipState == 0 && $attackable == 0) { //방랑군이냐 아니냐 - if($nation[level] == 0) { + if($nation['level'] == 0) { // 해산 $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } else { // 방랑 $command = EncodeCommand(0, 0, 0, 47); - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } } //분기마다 - if($admin[month] == 1 || $admin[month] == 4 || $admin[month] == 7 || $admin[month] == 10) { + if($admin['month'] == 1 || $admin['month'] == 4 || $admin['month'] == 7 || $admin['month'] == 10) { //관직임명 - Promotion($connect, $general[nation], $nation[level]); - } elseif($admin[month] == 12) { + Promotion($connect, $general['nation'], $nation['level']); + } elseif($admin['month'] == 12) { //세율 - $nation[rate] = TaxRate($connect, $general[nation]); + $nation['rate'] = TaxRate($connect, $general['nation']); //지급율 - GoldBillRate($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type], $nation[gold]); - } elseif($admin[month] == 6) { + GoldBillRate($connect, $nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type'], $nation['gold']); + } elseif($admin['month'] == 6) { //세율 - $nation[rate] = TaxRate($connect, $general[nation]); + $nation['rate'] = TaxRate($connect, $general['nation']); //지급율 - RiceBillRate($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type], $nation[rice]); + RiceBillRate($connect, $nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type'], $nation['rice']); } //방랑군이냐 아니냐 - if($nation[level] == 0) { - if($admin[startyear]+2 <= $admin[year]) { + if($nation['level'] == 0) { + if($admin['startyear']+2 <= $admin['year']) { // 해산 $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; - } elseif($city[nation] == 0 && ($city[level] == 5 || $city[level] == 6)) { + } elseif($city['nation'] == 0 && ($city['level'] == 5 || $city['level'] == 6)) { $type = rand()%9 + 1; $colors = GetNationColors(); $color = rand() % count($colors); $command = EncodeCommand(0, $type, $color, 46); - $nationName = "㉿"._String::SubStr($general[name], 1); + $nationName = "㉿"._String::SubStr($general['name'], 1); //건국 - $query = "update general set turn0='$command',makenation='$nationName' where no='$general[no]'"; + $query = "update general set turn0='$command',makenation='$nationName' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI08 ".MYDB_error($connect),""); return; } elseif(rand()%4 > 0) { //이동 - $paths = explode("|", $city[path]); + $paths = explode("|", $city['path']); $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } else { //조달 $command = EncodeCommand(0, 0, 0, 9); - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } @@ -1230,27 +1230,27 @@ function processAI($connect, $no) { //외교 평시에 선포 if($dipState == 0 && $attackable == 0) { //전방 체크 먼저 - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); - $query = "select city from city where nation='$general[nation]' and front=1 limit 0,1"; + $query = "select city from city where nation='$general['nation']' and front=1 limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); $frontCount = MYDB_num_rows($result); //근접 공백지 없을때 if($frontCount == 0) { - $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$general[nation]'"; + $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $devRate = MYDB_fetch_array($result); //내정이 80% 이상일때 - if($devRate[dev] > 80) { + if($devRate['dev'] > 80) { $query = "select nation from nation where level>0 order by rand()"; $result = MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); $nationCount = MYDB_num_rows($result); for($i=0; $i < $nationCount; $i++) { $youNation = MYDB_fetch_array($result); - if(isClose($connect, $general[nation], $youNation[nation])) { - $command = EncodeCommand(0, 0, $youNation[nation], 62); - $query = "update nation set l12turn0='$command' where nation='$general[nation]'"; + if(isClose($connect, $general['nation'], $youNation['nation'])) { + $command = EncodeCommand(0, 0, $youNation['nation'], 62); + $query = "update nation set l12turn0='$command' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); $rulerCommand = 1; break; @@ -1263,37 +1263,37 @@ function processAI($connect, $no) { } // 입력된 턴이 있으면 - if($coreCommand["l{$general[level]}turn0"] != EncodeCommand(0, 0, 0, 99)) { + if($coreCommand["l{$general['level']}turn0"] != EncodeCommand(0, 0, 0, 99)) { $rulerCommand = 1; } //방랑군 아니고, 입력된 턴이 없을때 수뇌부가 할일 - if($nation[level] != 0 && $general[level] >= 5 && $rulerCommand == 0) { - $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation!='$general[nation]' and A.no!='$general[no]' order by rand() limit 0,1"; + if($nation['level'] != 0 && $general['level'] >= 5 && $rulerCommand == 0) { + $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation!='$general['nation']' and A.no!='$general['no']' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); $curGen = MYDB_fetch_array($result); - if($curGen[no] != 0) { // 타도시에 있는 경우 국내로 발령 + if($curGen['no'] != 0) { // 타도시에 있는 경우 국내로 발령 if($dipState >= 3) { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); - if($selCity[city] > 0) { + if($selCity['city'] > 0) { // 발령 - $command = EncodeCommand(0, $curGen[no], $selCity[city], 27); + $command = EncodeCommand(0, $curGen['no'], $selCity['city'], 27); } else { // 발령 - $command = EncodeCommand(0, $curGen[no], $city[city], 27); + $command = EncodeCommand(0, $curGen['no'], $city['city'], 27); } } else { // 발령 - $command = EncodeCommand(0, $curGen[no], $city[city], 27); + $command = EncodeCommand(0, $curGen['no'], $city['city'], 27); } - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } elseif($dipState <= 1) { // 평시엔 균등 발령만 //발령, 최소장수 도시 선택, 최다장수도시의 장수 선택 - $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.supply=1 group by A.city"; + $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.supply=1 group by A.city"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); //도시 2개 이상일때만 @@ -1303,20 +1303,20 @@ function processAI($connect, $no) { $devCity = 0; for($i=0; $i < $cityCount; $i++) { $curCity = MYDB_fetch_array($result); - if($curCity[cnt] >= $max) { $max = $curCity[cnt]; $maxCity = $curCity[city]; } - if($curCity[cnt] <= $min) { $min = $curCity[cnt]; $minCity = $curCity[city]; } - if($curCity[dev] < 70) { $devCity = $curCity[city]; } // 개발이 안된 곳 우선 + if($curCity['cnt'] >= $max) { $max = $curCity['cnt']; $maxCity = $curCity['city']; } + if($curCity['cnt'] <= $min) { $min = $curCity['cnt']; $minCity = $curCity['city']; } + if($curCity['dev'] < 70) { $devCity = $curCity['city']; } // 개발이 안된 곳 우선 } if($devCity != 0) { $minCity = $devCity; } if($maxCity != $minCity) { - $query = "select no from general where city='$maxCity' and nation='$general[nation]' and no!='$general[no]' and npc>=2 limit 0,1"; + $query = "select no from general where city='$maxCity' and nation='$general['nation']' and no!='$general['no']' and npc>=2 limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); $curGen = MYDB_fetch_array($result); - if($curGen[no] != 0) { + if($curGen['no'] != 0) { // 발령 - $command = EncodeCommand(0, $curGen[no], $minCity, 27); - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + $command = EncodeCommand(0, $curGen['no'], $minCity, 27); + $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } //계속 진행 @@ -1324,32 +1324,32 @@ function processAI($connect, $no) { } } else { // 병사있고 쌀있고 후방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; + $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selGen = MYDB_fetch_array($result); // 전방 도시, 30% 확률로 태수 있는 전방으로 발령 if(rand()%100 < 30) { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; } else { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); - if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 + if($selGen['no'] > 0 && $selCity['city'] > 0 && rand() % 100 < 80) { // 80% 확률 // 발령 - $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); + $command = EncodeCommand(0, $selGen['no'], $selCity['city'], 27); } else { //병사 없고 인구없는 전방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; + $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selGen = MYDB_fetch_array($result); // 인구많은도시 - $query = "select city from city where nation='$general[nation]' and supply=1 order by pop desc limit 0,1"; + $query = "select city from city where nation='$general['nation']' and supply=1 order by pop desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); - if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 + if($selGen['no'] > 0 && $selCity['city'] > 0 && rand() % 100 < 80) { // 80% 확률 // 발령 - $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); + $command = EncodeCommand(0, $selGen['no'], $selCity['city'], 27); } else { // 발령할 장수 없으면 몰포 if(rand() % 2 == 0) { $type = "gold"; $type2 = 1; } @@ -1357,50 +1357,50 @@ function processAI($connect, $no) { if($nation[$type] < 1000) { // 몰수 // 몰수 대상 - $query = "select no,{$type} from general where nation='$general[nation]' and no!='$general[no]' and {$type}>3000 order by {$type} desc limit 0,1"; + $query = "select no,{$type} from general where nation='$general['nation']' and no!='$general['no']' and {$type}>3000 order by {$type} desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $SelGen = MYDB_fetch_array($result); - if($SelGen[no] != 0) { + if($SelGen['no'] != 0) { $amount = floor($SelGen[$type] / 5000)*10 + 10; if($amount > 100) $amount = 100; // 몰수 - $command = EncodeCommand($type2, $SelGen[no], $amount, 24); // 금,쌀 1000단위 몰수 + $command = EncodeCommand($type2, $SelGen['no'], $amount, 24); // 금,쌀 1000단위 몰수 } } else { // 포상 // 포상 대상 - $query = "select no from general where nation='$general[nation]' and no!='$general[no]' and killturn>=5 order by {$type} limit 0,1"; + $query = "select no from general where nation='$general['nation']' and no!='$general['no']' and killturn>=5 order by {$type} limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $SelGen = MYDB_fetch_array($result); - if($SelGen[no] != 0) { + if($SelGen['no'] != 0) { $amount = floor(($nation[$type]-$_baserice) / 5000)*10 + 10; if($amount > 100) $amount = 100; // 포상 - $command = EncodeCommand($type2, $SelGen[no], $amount, 23); // 금 1000단위 포상 + $command = EncodeCommand($type2, $SelGen['no'], $amount, 23); // 금 1000단위 포상 } } } } - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } } $command = EncodeCommand(0, 0, 0, 1); //일반 할일 - if($general[killturn] < 5) { - if($general[gold] + $general[rice] == 0) { + if($general['killturn'] < 5) { + if($general['gold'] + $general['rice'] == 0) { $command = EncodeCommand(0, 0, 0, 9); //조달 - } elseif($general[gold] > $general[rice]) { + } elseif($general['gold'] > $general['rice']) { $command = EncodeCommand(0, 1, 100, 44); //헌납 } else { $command = EncodeCommand(0, 2, 100, 44); //헌납 } - } elseif($general[injury] > 10) { + } elseif($general['injury'] > 10) { // 부상 2달 이상이면 요양 $command = EncodeCommand(0, 0, 0, 50); //요양 - } elseif($nation[level] == 0) { + } elseif($nation['level'] == 0) { //방랑군일때 - if($admin[startyear]+3 <= $admin[year]) { + if($admin['startyear']+3 <= $admin['year']) { $command = EncodeCommand(0, 0, 0, 45); //하야 } else { switch(rand()%5) { @@ -1413,18 +1413,18 @@ function processAI($connect, $no) { } else { //국가일때 //아국땅 아니면 귀환 - if($general[nation] != $city[nation] || $city[supply] == 0) { + if($general['nation'] != $city['nation'] || $city['supply'] == 0) { $command = EncodeCommand(0, 0, 0, 28); //귀환 - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } //국가 병량이 없을때 바로 헌납 - if($nation[rice] < 2000 && $general[rice] > 200) { - $amount = floor(($general[rice] - 200)/100) + 1; + if($nation['rice'] < 2000 && $general['rice'] > 200) { + $amount = floor(($general['rice'] - 200)/100) + 1; if($amount > 20) { $amount = 20; } $command = EncodeCommand(0, 2, $amount, 44); //헌납 - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1439,33 +1439,33 @@ function processAI($connect, $no) { // 100 700 $resrc = $tech * 700; // 평시거나 초반아니면서 공격가능 없으면서 병사 있으면 해제(25%) - if($dipState == 0 && $isStart == 0 && $attackable == 0 && $general[crew] > 0 && rand()% 100 < 25) { + if($dipState == 0 && $isStart == 0 && $attackable == 0 && $general['crew'] > 0 && rand()% 100 < 25) { $command = EncodeCommand(0, 0, 0, 17); //소집해제 } elseif($dipState <= 1 || $isStart == 1) { //평시이거나 선포있어도 초반이면 - if($general[gold] + $general[rice] < 200) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달9 - elseif($general[rice] > 100 && $city[rate] < 95) { $command = EncodeCommand(0, 0, 0, 4); } //우선 선정 - elseif($general[gold] < 100) { //금없으면 쌀팜 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + if($general['gold'] + $general['rice'] < 200) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달9 + elseif($general['rice'] > 100 && $city['rate'] < 95) { $command = EncodeCommand(0, 0, 0, 4); } //우선 선정 + elseif($general['gold'] < 100) { //금없으면 쌀팜 + $amount = floor(($general['rice'] - $general['gold']) / 100 / 2); // 100단위 $command = EncodeCommand(0, 1, $amount, 49); //팜 - } elseif($general[gold] < 700 && $general[rice] < 700) { $command = EncodeCommand(0, 0, 0, 1); } //금쌀되면 내정 - elseif($general[rice] < 100) { //쌀없으면 쌀삼 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + } elseif($general['gold'] < 700 && $general['rice'] < 700) { $command = EncodeCommand(0, 0, 0, 1); } //금쌀되면 내정 + elseif($general['rice'] < 100) { //쌀없으면 쌀삼 + $amount = floor(($general['gold'] - $general['rice']) / 100 / 2); // 100단위 $command = EncodeCommand(0, 2, $amount, 49); //삼 } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 else { //현도시가 전방이면 공격 가능성 체크 - if($city[front] > 0) { + if($city['front'] > 0) { //주변도시 체크 - $paths = explode("|", $city[path]); + $paths = explode("|", $city['path']); for($i=0; $i < count($paths); $i++) { $query = "select city,nation from city where city='$paths[$i]'"; $result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),""); $targetCity = MYDB_fetch_array($result); //공백지이면 타겟에 포함 - if($targetCity[nation] == 0) { $target[count($target)] = $targetCity[city]; } + if($targetCity['nation'] == 0) { $target[count($target)] = $targetCity['city']; } } - if(count($target) == 0 || $isStart == 1 || $nation[war] == 1) { $command = EncodeCommand(0, 0, 0, 1); } //공격 가능도시가 없으면 내정 + if(count($target) == 0 || $isStart == 1 || $nation['war'] == 1) { $command = EncodeCommand(0, 0, 0, 1); } //공격 가능도시가 없으면 내정 else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 } else { //전방 아니면 내정 @@ -1473,13 +1473,13 @@ function processAI($connect, $no) { } if($command == EncodeCommand(0, 0, 0, 1)) { // 공격아닌 경우 - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='$general[city]'"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("processAI19 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); $sel = rand() % 10; - if($selCity[dev] > 95) { $sel = 9; } - elseif($selCity[dev] < 70) { $sel = 0; } + if($selCity['dev'] > 95) { $sel = 9; } + elseif($selCity['dev'] < 70) { $sel = 0; } switch($sel) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: // 그대로 내정 80 % $command = EncodeCommand(0, 0, 0, 1); @@ -1487,22 +1487,22 @@ function processAI($connect, $no) { case 8: case 9: // 저개발 도시로 워프 20% //도시 선택, 30% 확률로 군사 있는 곳으로 워프 if(rand()%100 < 30) { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by gen2 desc,dev limit 0,1"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general['nation']' and supply='1' order by gen2 desc,dev limit 0,1"; } else { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by dev limit 0,1"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general['nation']' and supply='1' order by dev limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); //이미 그 도시이거나, 그 도시도 고개발이면 내정 - if($selCity[city] == $general[city] || $selCity[dev] > 95) { + if($selCity['city'] == $general['city'] || $selCity['dev'] > 95) { $command = EncodeCommand(0, 0, 0, 1); } else { //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; + $query = "update general set city='$selCity['city']' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1521,23 +1521,23 @@ function processAI($connect, $no) { // 700t } else { // 공격인 경우 - if($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { //자원되고, 병사없을때 - if($city[pop] > 40000) { $command = EncodeCommand(0, 0, 0, 11); } + if($general['crew'] < 700 && $general['gold'] >= $resrc && $general['rice'] >= $resrc) { //자원되고, 병사없을때 + if($city['pop'] > 40000) { $command = EncodeCommand(0, 0, 0, 11); } else { $command = EncodeCommand(0, 0, 0, 1); } - } elseif($general[rice] < $resrc && $general[rice] <= $general[gold]) { + } elseif($general['rice'] < $resrc && $general['rice'] <= $general['gold']) { //금이 더 많으면 매매 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + $amount = floor(($general['gold'] - $general['rice']) / 100 / 2); // 100단위 if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }//삼 else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 - } elseif($general[gold] < $resrc && $general[rice] > $general[gold]) { + } elseif($general['gold'] < $resrc && $general['rice'] > $general['gold']) { //쌀이 더 많으면 매매 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + $amount = floor(($general['rice'] - $general['gold']) / 100 / 2); // 100단위 if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }//팜 else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 //자원, 병사 모두 충족 - } elseif($general[crew] >= 700 && $general[train] < 90) { + } elseif($general['crew'] >= 700 && $general['train'] < 90) { $command = EncodeCommand(0, 0, 0, 13); //훈련 - } elseif($general[crew] >= 700 && $general[atmos] < 90) { + } elseif($general['crew'] >= 700 && $general['atmos'] < 90) { $command = EncodeCommand(0, 0, 0, 14); //사기진작 } else { //공격 @@ -1556,66 +1556,66 @@ function processAI($connect, $no) { // 700t //전시일때 - if($general[gold] + $general[rice] < $resrc*2) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달 - elseif($general[rice] > $resrc && $city[rate] < 95 && $city[front] == 0) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 - elseif($general[rice] > $resrc && $city[rate] < 50 && $city[front] == 1) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 - elseif($general[gold] < $resrc) { // 금없으면 쌀팜 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 + if($general['gold'] + $general['rice'] < $resrc*2) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달 + elseif($general['rice'] > $resrc && $city['rate'] < 95 && $city['front'] == 0) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 + elseif($general['rice'] > $resrc && $city['rate'] < 50 && $city['front'] == 1) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 + elseif($general['gold'] < $resrc) { // 금없으면 쌀팜 + $amount = floor(($general['rice'] - $general['gold']) / 100 / 2); // 100단위 if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }// 팜 else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 - } elseif($general[rice] < $resrc) { // 쌀없으면 쌀삼 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 + } elseif($general['rice'] < $resrc) { // 쌀없으면 쌀삼 + $amount = floor(($general['gold'] - $general['rice']) / 100 / 2); // 100단위 if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }// 팜 else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 - elseif($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { - $query = "select no from general where nation='$general[nation]'"; + elseif($general['crew'] < 700 && $general['gold'] >= $resrc && $general['rice'] >= $resrc) { + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $genCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general[nation]' and city='$general[city]'"; + $query = "select no from general where nation='$general['nation']' and city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $genCount2 = MYDB_num_rows($result); - $query = "select sum(pop) as sum from city where nation='$general[nation]' and supply='1'"; + $query = "select sum(pop) as sum from city where nation='$general['nation']' and supply='1'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $sumCity = MYDB_fetch_array($result); // 현도시 인구 비율 - $ratio = round($city[pop] / $sumCity[sum] * 100); + $ratio = round($city['pop'] / $sumCity['sum'] * 100); // 현도시 장수 비율 $ratio2 = round($genCount2 / $genCount * 100); $ratio3 = rand() % 100; // 전체 인구 대비 확률로 현지에서 징병 - if($city[pop] > 40000 && 100 + $ratio - $ratio2 > $ratio3) { + if($city['pop'] > 40000 && 100 + $ratio - $ratio2 > $ratio3) { $command = EncodeCommand(0, 0, 0, 11); //인구 되면 징병 } else { // 인구 안되면 4만 이상인 도시로 워프 - $query = "select city from city where nation='$general[nation]' and pop>40000 and supply='1' order by rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and pop>40000 and supply='1' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); if($cityCount > 0) { $selCity = MYDB_fetch_array($result); //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; + $query = "update general set city='$selCity['city']' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } else { $command = EncodeCommand(0, 0, 0, 7); //인구 안되면 정장 } } - } elseif($general[crew] >= 700 && $general[train] < 90) { - if($general[atmos] >= 90 && $general[train] >= 60 && $general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; + } elseif($general['crew'] >= 700 && $general['train'] < 90) { + if($general['atmos'] >= 90 && $general['train'] >= 60 && $general['mode'] == 0) { + $query = "update general set mode=1 where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } $command = EncodeCommand(0, 0, 0, 13); //훈련 - } elseif($general[crew] >= 700 && $general[atmos] < 90) { - if($general[atmos] >= 60 && $general[train] >= 90 && $general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; + } elseif($general['crew'] >= 700 && $general['atmos'] < 90) { + if($general['atmos'] >= 60 && $general['train'] >= 90 && $general['mode'] == 0) { + $query = "update general set mode=1 where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } $command = EncodeCommand(0, 0, 0, 14); //사기진작 @@ -1623,56 +1623,56 @@ function processAI($connect, $no) { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달 } else { //공격 & 내정 - $paths = explode("|", $city[path]); + $paths = explode("|", $city['path']); for($i=0; $i < count($paths); $i++) { $query = "select city,nation from city where city='$paths[$i]'"; $result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),""); $targetCity = MYDB_fetch_array($result); //소유국이 있는 경우 - if($targetCity[nation] != 0 && $targetCity[nation] != $general[nation]) { - $query = "select state from diplomacy where me='$general[nation]' and you='$targetCity[nation]'"; + if($targetCity['nation'] != 0 && $targetCity['nation'] != $general['nation']) { + $query = "select state from diplomacy where me='$general['nation']' and you='$targetCity['nation']'"; $dipResult = MYDB_query($query, $connect) or Error("processAI22 ".MYDB_error($connect),""); $dip = MYDB_fetch_array($dipResult); //전쟁중인 국가이면 타겟에 포함 - if($dip[state] == 0) $target[count($target)] = $targetCity[city]; + if($dip['state'] == 0) $target[count($target)] = $targetCity['city']; } } if(count($target) == 0) { //전방 도시 선택, 30% 확률로 태수 있는 전방으로 워프 if(rand()%100 < 30) { - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; } else { - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and supply='1' and front=1 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); if($cityCount == 0) { //도시 수, 랜덤(상위 20%) 선택, 저개발 도시 선택 - $query = "select city from city where nation='$general[nation]' and supply='1'"; + $query = "select city from city where nation='$general['nation']' and supply='1'"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); $citySelect = rand() % (round($cityCount/5) + 1); - $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='$general[nation]' and supply='1' order by dev limit {$citySelect},1"; + $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='$general['nation']' and supply='1' order by dev limit {$citySelect},1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); } else { $selCity = MYDB_fetch_array($result); } - if($general[city] != $selCity[city]) { + if($general['city'] != $selCity['city']) { //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; + $query = "update general set city='$selCity['city']' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //공격 가능도시가 없고 워프도 안되면 내정, 조달 } - } elseif($nation[war] == 1) { + } elseif($nation['war'] == 1) { //전금이면 내정, 조달 $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //내정, 조달 } else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 @@ -1682,28 +1682,28 @@ function processAI($connect, $no) { switch($command) { case "00000000000001": //내정 - SetDevelop($connect, $genType, $general[no], $general[city], $nation[tech]); + SetDevelop($connect, $genType, $general['no'], $general['city'], $nation['tech']); return; case "00000000000011": //징병 - $query = "select region from city where nation='$general[nation]' order by rand() limit 0,1"; + $query = "select region from city where nation='$general['nation']' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selRegion = MYDB_fetch_array($result); - $selCity[city] = 0; + $selCity['city'] = 0; // 90% 확률로 이민족 또는 특성병 if(rand()%100 < 90) { - $query = "select city from city where nation='$general[nation]' and (level='4' or level='8') order by rand() limit 0,1"; + $query = "select city from city where nation='$general['nation']' and (level='4' or level='8') order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); } // 특병 없으면 원래대로 - if($selCity[city] == 0) { - $selCity[city] = $general[city]; + if($selCity['city'] == 0) { + $selCity['city'] = $general['city']; } - SetCrew($connect, $general[no], $general[personal], $general[gold], $general[leader], $genType, $nation[tech], $selRegion[region], $selCity[city], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + SetCrew($connect, $general['no'], $general['personal'], $general['gold'], $general['leader'], $genType, $nation['tech'], $selRegion['region'], $selCity['city'], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); return; default: - $query = "update general set turn0='$command' where no='$general[no]'"; + $query = "update general set turn0='$command' where no='$general['no']'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1747,11 +1747,11 @@ function Promotion($connect, $nation, $level) { MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 선택 - $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='$admin[killturn]' order by rand() limit 0,1"; + $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='$admin['killturn']' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $userCandidate = MYDB_fetch_array($result); // 유저수뇌 안함 - //$userCandidate[no] = 0; + //$userCandidate['no'] = 0; //NPC 후보 선택 $query = "select no from general where nation='$nation' and npc>=2 and level=1 order by intel desc limit 0,1"; @@ -1764,29 +1764,29 @@ function Promotion($connect, $nation, $level) { $level11 = MYDB_fetch_array($result); //공석이거나 삭턴 유저 참모인 경우 - if($level11[no] == 0 || ($level11[npc] < 2 && $level11[killturn] < $admin[killturn])) { - if($userCandidate[no] > 0) { + if($level11['no'] == 0 || ($level11['npc'] < 2 && $level11['killturn'] < $admin['killturn'])) { + if($userCandidate['no'] > 0) { //기존 참모 해임 $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate[no]'"; + $query = "update general set level=11 where no='$userCandidate['no']'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - } elseif($npcCandidate[no] > 0) { + } elseif($npcCandidate['no'] > 0) { //기존 참모 해임 $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //NPC 후보 있으면 임명 - $query = "update general set level=11 where no='$npcCandidate[no]'"; + $query = "update general set level=11 where no='$npcCandidate['no']'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } - } elseif($level11[npc] >= 2 && $userCandidate[no] > 0) { + } elseif($level11['npc'] >= 2 && $userCandidate['no'] > 0) { //NPC 참모인데 삭턴 아닌 유저장이 있는 경우 //기존 참모 해임 $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate[no]'"; + $query = "update general set level=11 where no='$userCandidate['no']'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } @@ -1796,13 +1796,13 @@ function Promotion($connect, $nation, $level) { $query = "select no from general where nation='$nation' and level=1 order by power desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $level = MYDB_fetch_array($result); - $query = "update general set level={$i1} where no='$level[no]'"; + $query = "update general set level={$i1} where no='$level['no']'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //문관임명 $query = "select no from general where nation='$nation' and level=1 order by intel desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $level = MYDB_fetch_array($result); - $query = "update general set level={$i2} where no='$level[no]'"; + $query = "update general set level={$i2} where no='$level['no']'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } } @@ -1822,7 +1822,7 @@ function TaxRate($connect, $nation) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $devRate = MYDB_fetch_array($result); - $avg = ($devRate[rate] + $devRate[dev]) / 2; + $avg = ($devRate['rate'] + $devRate['dev']) / 2; if($avg > 95) $rate = 25; elseif($avg > 70) $rate = 20; diff --git a/twe/func_process.php b/twe/func_process.php index 9e9d6a43..ba3e8c69 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -10,12 +10,12 @@ function CriticalRatio($leader, $power, $intel, $type=0) { } if($ratio > 1) $ratio = 1; - $r[fail] = (0.2 / $ratio - 0.1) * 100; - $r[succ] = ($ratio - 0.5) * 100; + $r['fail'] = (0.2 / $ratio - 0.1) * 100; + $r['succ'] = ($ratio - 0.5) * 100; - if($r[fail] < 0) { $r[fail] = 0; } - $r[succ] += $r[fail]; - if($r[succ] > 100) { $r[succ] = 100; } + if($r['fail'] < 0) { $r['fail'] = 0; } + $r['succ'] += $r['fail']; + if($r['succ'] > 100) { $r['succ'] = 100; } return $r; } @@ -34,7 +34,7 @@ function CriticalScore($score, $type) { function process_1($connect, &$general, $type) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -43,89 +43,89 @@ function process_1($connect, &$general, $type) { if($type == 1) { $dtype = "농지 개간"; $atype = "을"; $btype = "은"; $stype = "agri"; } elseif($type == 2) { $dtype = "상업 투자"; $atype = "를"; $btype = "는"; $stype = "comm"; } - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 실패. <1>$date"; } elseif($city["$stype"] >= $city["$stype"."2"]) { - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$btype} 충분합니다. $dtype 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}{$btype} 충분합니다. $dtype 실패. <1>$date"; } else { // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; + if($city['rate'] < $_develrate) { $city['rate'] = $_develrate; } + $rate = $city['rate'] / 100; - $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; + $score = ($general['intel'] * (100 - $general['injury'])/100 + getBookEff($general['book'])) * $rate; + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 2 || $nation[type] == 12) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 8 || $nation[type] == 11) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 2 || $nation['type'] == 12) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 8 || $nation['type'] == 11) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모, 모사 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 9 || $general['level'] == 7 || $general['level'] == 5) { $score *= 1.05; } // 군사 보정 - if($general[level] == 3 && $general[no] == $city[gen2]) { $score *= 1.05; } + if($general['level'] == 3 && $general['no'] == $city[gen2]) { $score *= 1.05; } $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 2); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 2); // 특기보정 : 경작, 상재 - if($type == 1 && $general[special] == 1) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - if($type == 2 && $general[special] == 2) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($type == 1 && $general['special'] == 1) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } + if($type == 2 && $general['special'] == 2) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:{$dtype}{$atype} 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city['rate'] >= 80 && $r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 성공하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}{$atype} 성공하여 $score 상승했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}{$atype} 하여 $score 상승했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; + $query = "update city set {$stype}='$score' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 경험치 상승 - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -137,7 +137,7 @@ function process_1($connect, &$general, $type) { function process_3($connect, &$general) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -145,86 +145,86 @@ function process_3($connect, &$general) { $dtype = "기술 연구"; - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type,tech from nation where nation='$general[nation]'"; + $query = "select level,type,tech from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 실패. <1>$date"; } else { - $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])); - $score = $score * (100 + $general[explevel]/5)/100; + $score = ($general['intel'] * (100 - $general['injury'])/100 + getBookEff($general['book'])); + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 3 || $nation['type'] == 13) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모, 모사 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 9 || $general['level'] == 7 || $general['level'] == 5) { $score *= 1.05; } $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); // 특기보정 : 발명 - if($general[special] == 3) { $score *= 1.1; $admin[develcost] *= 0.8; $r[succ] += 10; } + if($general['special'] == 3) { $score *= 1.1; $admin['develcost'] *= 0.8; $r['succ'] += 10; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city['rate'] >= 80 && $r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 부드러운 기술 제한 - if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $score = floor($score/4); } + if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $score = floor($score/4); } //장수수 구함 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); if($gencount < 10) $gencount = 10; // 내정 상승 - $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='$general[nation]'"; + $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 경험치 상승 // 공헌도, 명성 상승 = $score * 10 - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -236,89 +236,89 @@ function process_3($connect, &$general) { function process_4($connect, &$general) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 주민 선정 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 주민 선정 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 주민 선정 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 주민 선정 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*2) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 주민 선정 실패. <1>$date"; - } elseif($city[rate] >= 100) { - $log[count($log)] = "●{$admin[month]}월:민심은 충분합니다. 주민 선정 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 주민 선정 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. 주민 선정 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 주민 선정 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 주민 선정 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*2) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. 주민 선정 실패. <1>$date"; + } elseif($city['rate'] >= 100) { + $log[count($log)] = "●{$admin['month']}월:민심은 충분합니다. 주민 선정 실패. <1>$date"; } else { - $score = ($general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus) / 10; - $score = $score * (100 + $general[explevel]/5)/100; + $score = ($general['leader'] * (100 - $general['injury'])/100 + getHorseEff($general['horse']) + $lbonus) / 10; + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 2 || $nation['type'] == 4 || $nation['type'] == 7 || $nation['type'] == 10) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 1 || $nation['type'] == 3 || $nation['type'] == 9) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모 보정 - if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11) { $score *= 1.05; } // 시중 보정 - if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } + if($general['level'] == 2 && $general['no'] == $city[gen3]) { $score *= 1.05; } $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); // 특기보정 : 인덕 - if($general[special] == 20) { $r[succ] += 10; $admin[develcost] *= 0.8; $score *= 1.1; } + if($general['special'] == 20) { $r['succ'] += 10; $admin['develcost'] *= 0.8; $score *= 1.1; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:선정을 실패하여 민심이 $score 상승했습니다. <1>$date"; - } elseif($r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:선정을 실패하여 민심이 $score 상승했습니다. <1>$date"; + } elseif($r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:선정을 성공하여 민심이 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:선정을 성공하여 민심이 $score 상승했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:민심이 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:민심이 $score 상승했습니다. <1>$date"; } $exp = $score * 7; $ded = $score * 10; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $score += $city[rate]; + $score += $city['rate']; if($score > 100) { $score = 100; } // 민심 상승 - $query = "update city set rate='$score' where city='$general[city]'"; + $query = "update city set rate='$score' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 - $general[rice] -= $admin[develcost] * 2; + $general['rice'] -= $admin['develcost'] * 2; $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -330,7 +330,7 @@ function process_4($connect, &$general) { function process_5($connect, &$general, $type) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -339,88 +339,88 @@ function process_5($connect, &$general, $type) { if($type == 1) { $dtype = "수비 강화"; $stype = "def"; } elseif($type == 2) { $dtype = "성벽 보수"; $stype = "wall"; } - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 실패. <1>$date"; } elseif($city["$stype"] >= $city["$stype"."2"]) { - $log[count($log)] = "●{$admin[month]}월:{$dtype}는 충분합니다. $dtype 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}는 충분합니다. $dtype 실패. <1>$date"; } else { // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; + if($city['rate'] < $_develrate) { $city['rate'] = $_develrate; } + $rate = $city['rate'] / 100; - $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; + $score = ($general['power'] * (100 - $general['injury'])/100 + getWeapEff($general['weap'])) * $rate; + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 3 || $nation['type'] == 5 || $nation['type'] == 10 || $nation['type'] == 11) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 4 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 13) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모, 장군 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $score *= 1.05; } // 태수 보정 - if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } + if($general['level'] == 4 && $general['no'] == $city[gen1]) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); // 특기보정 : 수비, 축성 - if($type == 1 && $general[special] == 11) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - if($type == 2 && $general[special] == 10) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($type == 1 && $general['special'] == 11) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } + if($type == 2 && $general['special'] == 10) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; + } elseif($city['rate'] >= 80 && $r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; + $query = "update city set {$stype}='$score' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -432,89 +432,89 @@ function process_5($connect, &$general, $type) { function process_7($connect, &$general) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 정착 장려 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 정착 장려 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 정착 장려 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 정착 장려 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost] * 2) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 정착 장려 실패. <1>$date"; - } elseif($city[pop] >= $city[pop2]) { - $log[count($log)] = "●{$admin[month]}월:이미 포화상태입니다. 정착 장려 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 정착 장려 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. 정착 장려 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 정착 장려 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 정착 장려 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost'] * 2) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. 정착 장려 실패. <1>$date"; + } elseif($city['pop'] >= $city[pop2]) { + $log[count($log)] = "●{$admin['month']}월:이미 포화상태입니다. 정착 장려 실패. <1>$date"; } else { - $score = $general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus; - $score = $score * (100 + $general[explevel]/5)/100; + $score = $general['leader'] * (100 - $general['injury'])/100 + getHorseEff($general['horse']) + $lbonus; + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 2 || $nation['type'] == 4 || $nation['type'] == 7 || $nation['type'] == 10) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 1 || $nation['type'] == 3 || $nation['type'] == 9) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모 보정 - if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11) { $score *= 1.05; } // 시중 보정 - if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } + if($general['level'] == 2 && $general['no'] == $city[gen3]) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); // 특기보정 : 인덕 - if($general[special] == 20) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($general['special'] == 20) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:장려를 실패하여 주민이 {$score}0명 증가했습니다. <1>$date"; - } elseif($r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:장려를 실패하여 주민이 {$score}0명 증가했습니다. <1>$date"; + } elseif($r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:장려를 성공하여 주민이 {$score}0명 증가했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:장려를 성공하여 주민이 {$score}0명 증가했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:주민이 {$score}0명 증가했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:주민이 {$score}0명 증가했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $score = $city[pop] + ($score * 10); + $score = $city['pop'] + ($score * 10); if($score > $city[pop2]) { $score = $city[pop2]; } // 민심 상승 - $query = "update city set pop='$score' where city='$general[city]'"; + $query = "update city set pop='$score' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 - $general[rice] -= $admin[develcost] * 2; + $general['rice'] -= $admin['develcost'] * 2; $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -526,7 +526,7 @@ function process_7($connect, &$general) { function process_8($connect, &$general) { global $_develrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -534,87 +534,87 @@ function process_8($connect, &$general) { $dtype = "치안"; $stype = "secu"; - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 강화 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 강화 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 강화 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 강화 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 강화 실패. <1>$date"; - } elseif($city[secu] >= $city[secu2]) { - $log[count($log)] = "●{$admin[month]}월:치안은 충분합니다. $dtype 강화 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $dtype 강화 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 방랑군은 불가능합니다. $dtype 강화 실패. <1>$date"; + } elseif($city['nation'] != $general['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 강화 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 강화 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 강화 실패. <1>$date"; + } elseif($city['secu'] >= $city[secu2]) { + $log[count($log)] = "●{$admin['month']}월:치안은 충분합니다. $dtype 강화 실패. <1>$date"; } else { // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; + if($city['rate'] < $_develrate) { $city['rate'] = $_develrate; } + $rate = $city['rate'] / 100; - $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; + $score = ($general['power'] * (100 - $general['injury'])/100 + getWeapEff($general['weap'])) * $rate; + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% // 국가보정 - if($nation[type] == 1 || $nation[type] == 4) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 6 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } + if($nation['type'] == 1 || $nation['type'] == 4) { $score *= 1.1; $admin['develcost'] *= 0.8; } + if($nation['type'] == 6 || $nation['type'] == 9) { $score *= 0.9; $admin['develcost'] *= 1.2; } // 군주, 참모, 장군 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } + if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $score *= 1.05; } // 태수 보정 - if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } + if($general['level'] == 4 && $general['no'] == $city[gen1]) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); // 특기보정 : 통찰 - if($general[special] == 12) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } + if($general['special'] == 12) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } //버그방지 if($score < 1) $score = 1; - if($r[fail] > $rd) { + if($r['fail'] > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 실패하여 $score 강화했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { + $log[count($log)] = "●{$admin['month']}월:{$dtype}을 실패하여 $score 강화했습니다. <1>$date"; + } elseif($city['rate'] >= 80 && $r['succ'] > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 성공하여 $score 강화했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}을 성공하여 $score 강화했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 $score 강화했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$dtype}을 $score 강화했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; + $query = "update city set {$stype}='$score' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 - $general[gold] -= $admin[develcost]; + $general['gold'] -= $admin['develcost']; $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -625,40 +625,40 @@ function process_8($connect, &$general) { } function process_9($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 물자 조달 실패. <1>$date"; - } elseif($nation[level] > 0 && $city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 물자 조달 실패. <1>$date"; - } elseif($city[supply] == 0 && $city[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 물자 조달 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 물자 조달 실패. <1>$date"; + } elseif($nation['level'] > 0 && $city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 물자 조달 실패. <1>$date"; + } elseif($city['supply'] == 0 && $city['nation'] == $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 물자 조달 실패. <1>$date"; } else { if(rand() % 2 == 0) { $dtype = 0; $stype = "금"; } else { $dtype = 1; $stype = "쌀"; } - $score = (($general[leader]+$general[power]+$general[intel]) * (100 - $general[injury])/100 + getHorseEff($general[horse])+$lbonus+getWeapEff($general[weap])+getBookEff($general[book])); - $score = $score * (100 + $general[explevel]/5)/100; + $score = (($general['leader']+$general['power']+$general['intel']) * (100 - $general['injury'])/100 + getHorseEff($general['horse'])+$lbonus+getWeapEff($general['weap'])+getBookEff($general['book'])); + $score = $score * (100 + $general['explevel']/5)/100; $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% $rd = rand() % 100; // 현재 20% @@ -668,43 +668,43 @@ function process_9($connect, &$general) { if(30 > $rd) { $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:조달을 실패하여 {$stype}을 $score 조달했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:조달을 실패하여 {$stype}을 $score 조달했습니다. <1>$date"; } elseif(40 > $rd) { $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:조달을 성공하여 {$stype}을 $score 조달했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:조달을 성공하여 {$stype}을 $score 조달했습니다. <1>$date"; } else { $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$stype}을 $score 조달했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$stype}을 $score 조달했습니다. <1>$date"; } $exp = $score * 0.7; $ded = $score * 1.0; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 물자 상승 if($dtype == 0) { - $query = "update nation set gold=gold+'$score' where nation='$general[nation]'"; + $query = "update nation set gold=gold+'$score' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update nation set rice=rice+'$score' where nation='$general[nation]'"; + $query = "update nation set rice=rice+'$score' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } switch(rand()%3) { case 0: $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; break; case 1: $general[power2]++; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; break; case 2: $general[intel2]++; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; break; } MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -716,7 +716,7 @@ function process_9($connect, &$general) { function process_11($connect, &$general, $type) { global $_defaultatmos, $_defaulttrain, $_defaultatmos2, $_defaulttrain2; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); if($type == 1) { $defaultatmos = $_defaultatmos; $defaulttrain = $_defaulttrain; } else { $defaultatmos = $_defaultatmos2; $defaulttrain = $_defaulttrain2; } @@ -725,19 +725,19 @@ function process_11($connect, &$general, $type) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$general[nation]'"; + $query = "select level,tech from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -745,15 +745,15 @@ function process_11($connect, &$general, $type) { $armtype = $command[2]; $crew = $command[1]; - if($armtype != $general[crewtype]) { $general[crew] = 0; $general[train] = $defaulttrain; $general[atmos] = $defaultatmos; } + if($armtype != $general['crewtype']) { $general['crew'] = 0; $general['train'] = $defaulttrain; $general['atmos'] = $defaultatmos; } - if($crew*100 + $general[crew] > (floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100) { $crew = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 - $general[crew])/100, 0); } + if($crew*100 + $general['crew'] > (floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100) { $crew = round(((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100 - $general['crew'])/100, 0); } if($crew < 0) { $crew = 0; } $cost = $crew * getCost($connect, $armtype); //기술로 가격 - $cost *= getTechCost($nation[tech]); + $cost *= getTechCost($nation['tech']); //성격 보정 - $cost = CharCost($cost, $general[personal]); + $cost = CharCost($cost, $general['personal']); $cost = round($cost); //특기 보정 : 보병, 궁병, 기병, 귀병, 공성, 징병 @@ -766,7 +766,7 @@ function process_11($connect, &$general, $type) { if($type == 1) { $dtype = "징병"; } elseif($type == 2) { $dtype = "모병"; $cost *= 2; } - if($general[crew] != 0) { $dtype = "추가".$dtype; } + if($general['crew'] != 0) { $dtype = "추가".$dtype; } //현재 가능한지 검사 switch($armtype) { @@ -810,33 +810,33 @@ function process_11($connect, &$general, $type) { if($sel == 0) { // 남귀병은 기술1등급부터 // 충차는 기술1등급부터 - if($armtype == 35 && $nation[tech] < 1000) { + if($armtype == 35 && $nation['tech'] < 1000) { $cnt = 0; - } elseif($armtype == 41 && $nation[tech] < 1000) { + } elseif($armtype == 41 && $nation['tech'] < 1000) { $cnt = 0; } else { $cnt = 1; } } elseif($sel == 1) { - $query = "select city,level from city where nation='$general[nation]' and region='$rg'"; + $query = "select city,level from city where nation='$general['nation']' and region='$rg'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $rgcity = MYDB_fetch_array($result); // 기술 1000 이상부터 지역병 - if($cnt > 0 && $nation[tech] < 1000) { + if($cnt > 0 && $nation['tech'] < 1000) { $cnt = 0; } } else { - $query = "select city,level from city where nation='$general[nation]' and city='$ct'"; + $query = "select city,level from city where nation='$general['nation']' and city='$ct'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $ctcity = MYDB_fetch_array($result); // 기술 2000 이상부터 이민족병 - if($cnt > 0 && $ctcity[level] == 4 && $nation[tech] < 2000) { + if($cnt > 0 && $ctcity['level'] == 4 && $nation['tech'] < 2000) { $cnt = 0; } // 기술 3000 이상부터 특수병 - if($cnt > 0 && $ctcity[level] == 8 && $nation[tech] < 3000) { + if($cnt > 0 && $ctcity['level'] == 8 && $nation['tech'] < 3000) { $cnt = 0; } } @@ -844,52 +844,52 @@ function process_11($connect, &$general, $type) { else { $valid = 0; } // 초반 제한중 차병 불가 - if($admin[year] < $admin[startyear]+3 && floor($armtype/10) == 4) { + if($admin['year'] < $admin['startyear']+3 && floor($armtype/10) == 4) { $valid = 0; } - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $dtype 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date"; +// } elseif($city['supply'] == 0) { +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date"; } elseif($crew <= 0) { - $log[count($log)] = "●{$admin[month]}월:더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($general[rice] < $crew) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $dtype 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date"; + } elseif($general['gold'] < $cost) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($general['rice'] < $crew) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $dtype 실패. <1>$date"; } elseif($valid == 0) { - $log[count($log)] = "●{$admin[month]}월:현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date"; - } elseif($city[pop]-30000 < $crew*100) { // 주민 30000명 이상만 가능 - $log[count($log)] = "●{$admin[month]}월:주민이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($city[rate] < 20) { - $log[count($log)] = "●{$admin[month]}월:민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date"; + } elseif($city['pop']-30000 < $crew*100) { // 주민 30000명 이상만 가능 + $log[count($log)] = "●{$admin['month']}월:주민이 모자랍니다. $dtype 실패. <1>$date"; + } elseif($city['rate'] < 20) { + $log[count($log)] = "●{$admin['month']}월:민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:".getTypename($armtype)."을(를) {$crew}00명 {$dtype}했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:".getTypename($armtype)."을(를) {$crew}00명 {$dtype}했습니다. <1>$date"; $exp = $crew; $ded = $crew; // 숙련도 증가 - addGenDex($connect, $general[no], $armtype, $crew); + addGenDex($connect, $general['no'], $armtype, $crew); // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $atmos = round(($general[atmos] * $general[crew] + $defaultatmos * $crew*100) / ($general[crew] + $crew*100)); - $train = round(($general[train] * $general[crew] + $defaulttrain * $crew*100) / ($general[crew] + $crew*100)); - $general[crew] += $crew*100; - $general[gold] -= $cost; + $atmos = round(($general['atmos'] * $general['crew'] + $defaultatmos * $crew*100) / ($general['crew'] + $crew*100)); + $train = round(($general['train'] * $general['crew'] + $defaulttrain * $crew*100) / ($general['crew'] + $crew*100)); + $general['crew'] += $crew*100; + $general['gold'] -= $cost; // 주민수 감소 // 민심 김소 - if($type == 1) { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*100); } - else { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*50); } - if($city[rate] < 0) { $city[rate] = 0; } - $query = "update city set pop=pop-({$crew}*100),rate='$city[rate]' where city='$general[city]'"; + if($type == 1) { $city['rate'] = $city['rate'] - round(($crew*100 / $city['pop'])*100); } + else { $city['rate'] = $city['rate'] - round(($crew*100 / $city['pop'])*50); } + if($city['rate'] < 0) { $city['rate'] = 0; } + $query = "update city set pop=pop-({$crew}*100),rate='$city['rate']' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='$general[crew]',train='$train',atmos='$atmos',gold='$general[gold]',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='$general['crew']',train='$train',atmos='$atmos',gold='$general['gold']',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -901,67 +901,67 @@ function process_11($connect, &$general, $type) { function process_13($connect, &$general) { global $_maxtrain, $_training, $_atmosing; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general[nation]'"; + $query = "select level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 훈련 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 훈련 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 훈련 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 훈련 실패. <1>$date"; - } elseif($general[train] >= $_maxtrain) { - $log[count($log)] = "●{$admin[month]}월:병사들은 이미 정예병사들입니다. <1>$date"; -// } elseif(floor($general[crewtype]/10) == 4) { -// $log[count($log)] = "●{$admin[month]}월:병기는 훈련이 불가능합니다. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 훈련 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 훈련 실패. <1>$date"; +// } elseif($city['supply'] == 0) { +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 훈련 실패. <1>$date"; + } elseif($general['crew'] == 0) { + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. 훈련 실패. <1>$date"; + } elseif($general['train'] >= $_maxtrain) { + $log[count($log)] = "●{$admin['month']}월:병사들은 이미 정예병사들입니다. <1>$date"; +// } elseif(floor($general['crewtype']/10) == 4) { +// $log[count($log)] = "●{$admin['month']}월:병기는 훈련이 불가능합니다. <1>$date"; } else { // 훈련시 - $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); + $score = round((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100 / $general['crew'] * $_training); - $log[count($log)] = "●{$admin[month]}월:훈련치가 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:훈련치가 $score 상승했습니다. <1>$date"; $exp = 100; $ded = 70; // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + addGenDex($connect, $general['no'], $general['crewtype'], round($general['crew']/100)); // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 훈련치 변경 - $score += $general[train]; + $score += $general['train']; if($score > $_maxtrain) { $score = $_maxtrain; } - $query = "update general set train='$score' where no='$general[no]'"; + $query = "update general set train='$score' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 사기 약간 감소 - $score = floor($general[atmos] * $_atmosing); + $score = floor($general['atmos'] * $_atmosing); if($score < 0 ) { $score = 0; } - $query = "update general set atmos='$score' where no='$general[no]'"; + $query = "update general set atmos='$score' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -973,60 +973,60 @@ function process_13($connect, &$general) { function process_14($connect, &$general) { global $_maxatmos, $_training; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general[nation]'"; + $query = "select level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 사기진작 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 사기진작 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 사기진작 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 사기진작 실패. <1>$date"; - } elseif($general[gold] < $general[crew]/100) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 사기진작 실패. <1>$date"; - } elseif($general[atmos] >= $_maxatmos) { - $log[count($log)] = "●{$admin[month]}월:이미 사기는 하늘을 찌를듯 합니다. <1>$date"; -// } elseif(floor($general[crewtype]/10) == 4) { -// $log[count($log)] = "●{$admin[month]}월:병기는 사기 진작이 불가능합니다. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 사기진작 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 사기진작 실패. <1>$date"; +// } elseif($city['supply'] == 0) { +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 사기진작 실패. <1>$date"; + } elseif($general['crew'] == 0) { + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. 사기진작 실패. <1>$date"; + } elseif($general['gold'] < $general['crew']/100) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 사기진작 실패. <1>$date"; + } elseif($general['atmos'] >= $_maxatmos) { + $log[count($log)] = "●{$admin['month']}월:이미 사기는 하늘을 찌를듯 합니다. <1>$date"; +// } elseif(floor($general['crewtype']/10) == 4) { +// $log[count($log)] = "●{$admin['month']}월:병기는 사기 진작이 불가능합니다. <1>$date"; } else { - $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); - $gold = $general[gold] - round($general[crew]/100); + $score = round((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100 / $general['crew'] * $_training); + $gold = $general['gold'] - round($general['crew']/100); - $log[count($log)] = "●{$admin[month]}월:사기치가 $score 상승했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:사기치가 $score 상승했습니다. <1>$date"; $exp = 100; $ded = 70; // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + addGenDex($connect, $general['no'], $general['crewtype'], round($general['crew']/100)); // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $score += $general[atmos]; + $score += $general['atmos']; if($score > $_maxatmos) { $score = $_maxatmos; } $general[leader2]++; - $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1038,63 +1038,63 @@ function process_14($connect, &$general) { function process_15($connect, &$general) { global $_maxatmos, $_maxtrain; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,tech from nation where nation='$general[nation]'"; + $query = "select nation,tech from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - if($general[term]%100 == 15) { - $term = floor($general[term]/100) + 1; + if($general['term']%100 == 15) { + $term = floor($general['term']/100) + 1; $code = $term * 100 + 15; } else { $term = 1; $code = 100 + 15; } - $cost = round($general[crew]/100 * 3 * getTechCost($nation[tech])); + $cost = round($general['crew']/100 * 3 * getTechCost($nation['tech'])); - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 전투태세 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 전투태세 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 전투태세 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 전투태세 실패. <1>$date"; - } elseif($general[atmos] >= 90 && $general[train] >= 90) { - $log[count($log)] = "●{$admin[month]}월:이미 병사들은 날쌔고 용맹합니다. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 전투태세 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 전투태세 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 전투태세 실패. <1>$date"; +// } elseif($city['supply'] == 0) { +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 전투태세 실패. <1>$date"; + } elseif($general['crew'] == 0) { + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. 전투태세 실패. <1>$date"; + } elseif($general['atmos'] >= 90 && $general['train'] >= 90) { + $log[count($log)] = "●{$admin['month']}월:이미 병사들은 날쌔고 용맹합니다. <1>$date"; + } elseif($general['gold'] < $cost) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 전투태세 실패. <1>$date"; } elseif($term < 3) { - $log[count($log)] = "●{$admin[month]}월:병사들을 열심히 훈련중... ({$term}/3) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:병사들을 열심히 훈련중... ({$term}/3) <1>$date"; - $query = "update general set resturn='ONGOING',term={$code} where no='$general[no]'"; + $query = "update general set resturn='ONGOING',term={$code} where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //기술로 가격 - $gold = $general[gold] - $cost; + $gold = $general['gold'] - $cost; - $log[count($log)] = "●{$admin[month]}월:전투태세 완료! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:전투태세 완료! <1>$date"; $exp = 100 * 3; $ded = 70 * 3; // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100 * 3)); + addGenDex($connect, $general['no'], $general['crewtype'], round($general['crew']/100 * 3)); // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]+=3; - $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1105,21 +1105,21 @@ function process_15($connect, &$general) { } function process_16($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,war,tricklimit,tech from nation where nation='$general[nation]'"; + $query = "select nation,war,tricklimit,tech from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select path,nation,supply from city where city='$general[city]'"; + $query = "select path,nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $path = explode("|", $city[path]); + $path = explode("|", $city['path']); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -1127,11 +1127,11 @@ function process_16($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,tricklimit,tech from nation where nation='$destcity[nation]'"; + $query = "select nation,tricklimit,tech from nation where nation='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -1139,48 +1139,48 @@ function process_16($connect, &$general) { if($path[$i] == $destination) { $valid = 1; } } - if($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. $destcity[name](으)로 출병 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name](으)로 출병 실패. <1>$date"; + if($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:현재 초반 제한중입니다. $destcity['name'](으)로 출병 실패. <1>$date"; +// } elseif($city['supply'] == 0) { +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name'](으)로 출병 실패. <1>$date"; } elseif(!$valid) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[crew] <= 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[rice] <= round($general[crew]/100)) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($dip[state] != 0) { - $log[count($log)] = "●{$admin[month]}월:교전중인 국가가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:본국에서만 출병가능합니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($nation[war] == 1) { - $log[count($log)] = "●{$admin[month]}월:현재 전쟁 금지입니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:본국입니다. $destcity[name](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($general['crew'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($general['rice'] <= round($general['crew']/100)) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($dip['state'] != 0) { + $log[count($log)] = "●{$admin['month']}월:교전중인 국가가 아닙니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($general['nation'] != $city['nation']) { + $log[count($log)] = "●{$admin['month']}월:본국에서만 출병가능합니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($nation['war'] == 1) { + $log[count($log)] = "●{$admin['month']}월:현재 전쟁 금지입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:본국입니다. $destcity['name'](으)로 출병 실패. <1>$date"; pushGenLog($general, $log); process_21($connect, $general); return; } else { // 전쟁 표시 - $query = "update city set state=43,term=3 where city='$destcity[city]'"; + $query = "update city set state=43,term=3 where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); + addGenDex($connect, $general['no'], $general['crewtype'], round($general['crew']/100)); // 전투 처리 $dead = processWar($connect, $general, $destcity); // 기술력 따라서 보정 - $dead[att] = round($dead[att] * getTechCost($nation[tech])); - $dead[def] = round($dead[def] * getTechCost($dnation[tech])); + $dead['att'] = round($dead['att'] * getTechCost($nation['tech'])); + $dead['def'] = round($dead['def'] * getTechCost($dnation['tech'])); // 사상자 누적 - if($nation[nation] > 0 && $dnation[nation] > 0) { - $query = "update diplomacy set dead=dead+'$dead[att]' where me='$nation[nation]' and you='$dnation[nation]'"; + if($nation['nation'] > 0 && $dnation['nation'] > 0) { + $query = "update diplomacy set dead=dead+'$dead['att']' where me='$nation['nation']' and you='$dnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set dead=dead+'$dead[def]' where you='$nation[nation]' and me='$dnation[nation]'"; + $query = "update diplomacy set dead=dead+'$dead['def']' where you='$nation['nation']' and me='$dnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $log = uniqueItem($connect, $general, $log); @@ -1190,33 +1190,33 @@ function process_16($connect, &$general) { } function process_17($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - if($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 소집해제 실패. <1>$date"; + if($general['crew'] == 0) { + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. 소집해제 실패. <1>$date"; } else { // 주민으로 돌아감 - $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; + $query = "update city set pop=pop+'$general['crew']' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set crew='0' where no='$general[no]'"; + $query = "update general set crew='0' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[0] = "●{$admin[month]}월:병사들을 소집해제하였습니다. <1>$date"; + $log[0] = "●{$admin['month']}월:병사들을 소집해제하였습니다. <1>$date"; // 경험, 공헌 상승 $exp = 70; $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1225,17 +1225,17 @@ function process_17($connect, &$general) { } function process_21($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select path from city where city='$general[city]'"; + $query = "select path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $path = explode("|", $city[path]); + $path = explode("|", $city['path']); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -1248,34 +1248,34 @@ function process_21($connect, &$general) { } if(!$valid) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 이동 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 이동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. $destcity['name'](으)로 이동 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. $destcity['name'](으)로 이동 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 이동했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 이동했습니다. <1>$date"; $exp = 50; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); + $exp = CharExperience($exp, $general['personal']); // 이동, 경험치 상승, 명성 상승, 사기 감소 $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$admin['develcost']',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general[level] == 12) { - $query = "select level from nation where nation='$general[nation]'"; + if($general['level'] == 12) { + $query = "select level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[level] == 0) { - $query = "update general set city='$destination' where nation='$general[nation]'"; + if($nation['level'] == 0) { + $query = "update general set city='$destination' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name from general where nation='$general[nation]' and level<'12'"; + $query = "select no,name from general where nation='$general['nation']' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 이동했습니다."; + $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 이동했습니다."; for($j=0; $j < $gencount; $j++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); @@ -1289,17 +1289,17 @@ function process_21($connect, &$general) { } function process_22($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general[nation]'"; + $query = "select name from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1310,31 +1310,31 @@ function process_22($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); - $cost = round($admin[develcost] + ($you[experience] + $you[dedication])/1000) * 10; + $cost = round($admin['develcost'] + ($you['experience'] + $you['dedication'])/1000) * 10; if(!$you) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 등용 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반 제한중입니다. 등용 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 등용 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 등용 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 등용 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 등용 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:초반 제한중입니다. 등용 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 등용 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 등용 실패. <1>$date"; + } elseif($general['gold'] < $cost) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 등용 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$you[name]에게 등용 권유 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$you['name']에게 등용 권유 서신을 보냈습니다. <1>$date"; $exp = 100; $ded = 200; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - ScoutMsg($connect, $general[no], $nation[name], $who, $you[msgindex]); + ScoutMsg($connect, $general['no'], $nation['name'], $who, $you['msgindex']); $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1345,21 +1345,21 @@ function process_22($connect, &$general) { function process_23($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $what = $command[3]; $who = $command[2]; $amount = $command[1]; @@ -1369,14 +1369,14 @@ function process_23($connect, &$general) { if($amount < 100) { $amount = 100; } if($what == 1) { $dtype = "금"; - if($nation[gold]-$_basegold < $amount) { $amount = $nation[gold] - $_basegold; } + if($nation['gold']-$_basegold < $amount) { $amount = $nation['gold'] - $_basegold; } } elseif($what == 2) { $dtype = "쌀"; - if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } + if($nation['rice']-$_baserice < $amount) { $amount = $nation['rice'] - $_baserice; } } else { $what = 2; $dtype = "쌀"; - if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } + if($nation['rice']-$_baserice < $amount) { $amount = $nation['rice'] - $_baserice; } } $query = "select no,nation,level,name,gold,rice from general where no='$who'"; @@ -1384,51 +1384,51 @@ function process_23($connect, &$general) { $gen = MYDB_fetch_array($result); if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 포상 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 포상 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 포상 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 포상 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 포상 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 포상 실패. <1>$date"; + } elseif($general['no'] == $who) { + $log[count($log)] = "●{$admin['month']}월:자기 자신입니다. 포상 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 포상 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 포상 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 포상 실패. <1>$date"; } elseif($what == 1 && $amount <= 0) { - $log[count($log)] = "●{$admin[month]}월:국고가 부족합니다. 포상 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:국고가 부족합니다. 포상 실패. <1>$date"; } elseif($what == 2 && $amount <= 0) { - $log[count($log)] = "●{$admin[month]}월:병량이 부족합니다. 포상 실패. <1>$date"; - } elseif($gen[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 포상 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:병량이 부족합니다. 포상 실패. <1>$date"; + } elseif($gen['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. 포상 실패. <1>$date"; } else { $genlog[count($genlog)] = "●$dtype $amount을 포상으로 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 수여했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$gen['name']에게 $dtype $amount을 수여했습니다. <1>$date"; $exp = 1; $ded = 1; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); if($what == 1) { - $gen[gold] += $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; + $gen['gold'] += $amount; + $query = "update general set gold='$gen['gold']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[gold] -= $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + $nation['gold'] -= $amount; + $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { - $gen[rice] += $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; + $gen['rice'] += $amount; + $query = "update general set rice='$gen['rice']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[rice] -= $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + $nation['rice'] -= $amount; + $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1438,21 +1438,21 @@ function process_23($connect, &$general) { } function process_24($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,scenario,startyear from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,color,gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,color,gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $what = $command[3]; $who = $command[2]; $amount = $command[1]; @@ -1466,32 +1466,32 @@ function process_24($connect, &$general) { if($amount < 100) { $amount = 100; } if($what == 1) { $dtype = "금"; - if($gen[gold] < $amount) { $amount = $gen[gold]; } + if($gen['gold'] < $amount) { $amount = $gen['gold']; } } elseif($what == 2) { $dtype = "쌀"; - if($gen[rice] < $amount) { $amount = $gen[rice]; } + if($gen['rice'] < $amount) { $amount = $gen['rice']; } } else { $what = 2; $dtype = "쌀"; - if($gen[rice] < $amount) { $amount = $gen[rice]; } + if($gen['rice'] < $amount) { $amount = $gen['rice']; } } if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 몰수 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 몰수 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 몰수 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 몰수 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 몰수 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 몰수 실패. <1>$date"; - } elseif($gen[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 몰수 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 몰수 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:현재 초반 제한중입니다. 몰수 실패. <1>$date"; + } elseif($general['no'] == $who) { + $log[count($log)] = "●{$admin['month']}월:자기 자신입니다. 몰수 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 몰수 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 몰수 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 몰수 실패. <1>$date"; + } elseif($gen['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. 몰수 실패. <1>$date"; } else { - if($gen[npc] >= 2 && rand()%100 == 0) { + if($gen['npc'] >= 2 && rand()%100 == 0) { switch(rand()%5) { case 0: $str = "몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까..."; break; case 1: $str = "사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요..."; break; @@ -1500,38 +1500,38 @@ function process_24($connect, &$general) { case 4: $str = "몰수로 인한 사기 저하는 몰수로 얻은 물자보다 더 손해란걸 모른단 말인가!"; break; } - PushMsg(1, 0, $gen[picture], $gen[imgsvr], "{$gen[name]}:", $nation[color], $nation[name], $nation[color], $str); + PushMsg(1, 0, $gen['picture'], $gen['imgsvr'], "{$gen['name']}:", $nation['color'], $nation['name'], $nation['color'], $str); } $genlog[count($genlog)] = "●$dtype {$amount}을 몰수 당했습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게서 $dtype $amount을 몰수했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$gen['name']에게서 $dtype $amount을 몰수했습니다. <1>$date"; $exp = 1; $ded = 1; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); if($what == 1) { - $gen[gold] -= $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; + $gen['gold'] -= $amount; + $query = "update general set gold='$gen['gold']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[gold] += $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + $nation['gold'] += $amount; + $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { - $gen[rice] -= $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; + $gen['rice'] -= $amount; + $query = "update general set rice='$gen['rice']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[rice] += $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + $nation['rice'] += $amount; + $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1541,13 +1541,13 @@ function process_24($connect, &$general) { } function process_25($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation from city where city='$general[city]'"; + $query = "select nation from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1557,7 +1557,7 @@ function process_25($connect, &$general) { // 랜덤임관인 경우 if($where == 99) { // 초반시 10명이하, 임관금지없음 국가 - if($admin[year] < $admin[startyear]+3) { + if($admin['year'] < $admin['startyear']+3) { $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1568,7 +1568,7 @@ function process_25($connect, &$general) { } } elseif($where == 98) { // 초반시 10명이하, 임관금지없음 국가, 방랑군 제외 - if($admin[year] < $admin[startyear]+3) { + if($admin['year'] < $admin['startyear']+3) { $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 and level>0 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1582,61 +1582,61 @@ function process_25($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } - $query = "select no from general where nation='$nation[nation]'"; + $query = "select no from general where nation='$nation['nation']'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); if(!$nation) { - $log[count($log)] = "●{$admin[month]}월:임관할 국가가 없습니다. 임관 실패. <1>$date"; - } elseif($general[nation] != 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 임관 실패. <1>$date"; - } elseif($nation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 임관 실패. <1>$date"; - } elseif($nation[level] == 0 && $gencount >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; - } elseif($admin[year] < $admin[startyear]+3 && $gencount >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; - } elseif($nation[scout] == 1 && $general[npc] < 5) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 금지되어 있습니다. 임관 실패."; - } elseif($general[makelimit] > 0 && $general[npc] < 5) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:임관할 국가가 없습니다. 임관 실패. <1>$date"; + } elseif($general['nation'] != 0) { + $log[count($log)] = "●{$admin['month']}월:재야가 아닙니다. 임관 실패. <1>$date"; + } elseif($nation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:없는 국가입니다. 임관 실패. <1>$date"; + } elseif($nation['level'] == 0 && $gencount >= 10) { + $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 제한되고 있습니다. 임관 실패."; + } elseif($admin['year'] < $admin['startyear']+3 && $gencount >= 10) { + $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 제한되고 있습니다. 임관 실패."; + } elseif($nation['scout'] == 1 && $general['npc'] < 5) { + $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 금지되어 있습니다. 임관 실패."; + } elseif($general['makelimit'] > 0 && $general['npc'] < 5) { + $log[count($log)] = "●{$admin['month']}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; } elseif(strpos($general['nations'], ",{$nation['nation']},") > 0) { - $log[count($log)] = "●{$admin[month]}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]임관했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nation[name]에 임관했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에 임관"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']임관했습니다."; + $log[count($log)] = "●{$admin['month']}월:$nation['name']에 임관했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에 임관"); if($gencount < 10) { $exp = 700; } else { $exp = 100; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 군주가 있는 곳으로 이동 - $query = "select city from general where nation='$nation[nation]' and level='12'"; + $query = "select city from general where nation='$nation['nation']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); // NPC초반시 임관기록 추가 안함 - if($general[npc] > 1 && $admin[year] < $admin[startyear]+3) { + if($general['npc'] > 1 && $admin['year'] < $admin['startyear']+3) { } else { $general['nations'] .= "{$nation['nation']},"; } // 국적 바꾸고 등급 일반으로 // 명성 상승 - $query = "update general set resturn='SUCCESS',nation='$nation[nation]',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='$king[city]',belong=1 where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',nation='$nation['nation']',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='$king['city']',belong=1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$nation[nation]'"; + $query = "select no from general where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($where < 99) { @@ -1651,55 +1651,55 @@ function process_25($connect, &$general) { } function process_26($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); - $troop = getTroop($connect, $general[troop]); + $troop = getTroop($connect, $general['troop']); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,supply from city where city='$general[city]'"; + $query = "select nation,name,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select no,name,nation,city from general where troop='$general[troop]' and no!='$general[no]'"; + $query = "select no,name,nation,city from general where troop='$general['troop']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - if($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 집합 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 집합 실패. <1>$date"; - } elseif($general[no] != $troop[no]) { - $log[count($log)] = "●{$admin[month]}월:부대장이 아닙니다. 집합 실패. <1>$date"; + if($general['nation'] != $city['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 집합 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 집합 실패. <1>$date"; + } elseif($general['no'] != $troop['no']) { + $log[count($log)] = "●{$admin['month']}월:부대장이 아닙니다. 집합 실패. <1>$date"; } elseif($gencount == 0) { - $log[count($log)] = "●{$admin[month]}월:집합 가능한 부대원이 없습니다. 집합 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:집합 가능한 부대원이 없습니다. 집합 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$city[name]에서 집합을 실시했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$city['name']에서 집합을 실시했습니다. <1>$date"; $exp = 70; $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); //부대원에게 로그 전달 - $genlog[count($genlog)] = "$troop[name]의 부대원들은 $city[name](으)로 집합되었습니다."; + $genlog[count($genlog)] = "$troop['name']의 부대원들은 $city['name'](으)로 집합되었습니다."; for($i=0; $i < $gencount; $i++) { $troopgen = MYDB_fetch_array($result); - if($general[city] != $troopgen[city]) { + if($general['city'] != $troopgen['city']) { pushGenLog($troopgen, $genlog); } } // 같은 부대원 모두 집합 - $query = "update general set city='$general[city]' where troop='$general[troop]'"; + $query = "update general set city='$general['city']' where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 명성 공헌 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1711,13 +1711,13 @@ function process_26($connect, &$general) { } function process_27($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); - $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $who = $command[2]; $where = $command[1]; @@ -1725,7 +1725,7 @@ function process_27($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1738,37 +1738,37 @@ function process_27($connect, &$general) { $destcity = MYDB_fetch_array($result); if(!$you) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 발령 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. $you[name] 발령 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($destcity[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 도시가 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($general[nation] != $you[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. $you[name] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 발령 실패. <1>$date"; + } elseif($general['no'] == $who) { + $log[count($log)] = "●{$admin['month']}월:자기 자신입니다. $you['name'] 발령 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. $you['name'] 발령 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $you['name'] 발령 실패. <1>$date"; + } elseif($destcity['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $you['name'] 발령 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $you['name'] 발령 실패. <1>$date"; + } elseif($destcity['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 도시가 아닙니다. $you['name'] 발령 실패. <1>$date"; + } elseif($general['nation'] != $you['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. $you['name'] 발령 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$you[name](을)를 $destcity[name](으)로 발령했습니다. <1>$date"; - $youlog[count($youlog)] = "$general[name]에 의해 $destcity[name](으)로 발령됐습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$you['name'](을)를 $destcity['name'](으)로 발령했습니다. <1>$date"; + $youlog[count($youlog)] = "$general['name']에 의해 $destcity['name'](으)로 발령됐습니다. <1>$date"; $exp = 1; $ded = 1; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 발령 - $query = "update general set city='$where' where no='$you[no]'"; + $query = "update general set city='$where' where no='$you['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1779,56 +1779,56 @@ function process_27($connect, &$general) { } function process_28($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level,capital from nation where nation='$general[nation]'"; + $query = "select level,capital from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 귀환 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 귀환 실패. <1>$date"; - } elseif(($general[level] == 1 || $general[level] >= 5) && $general[city] == $nation[capital]) { - $log[count($log)] = "●{$admin[month]}월:이미 수도입니다. 귀환 실패. <1>$date"; + if($nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:방랑군입니다. 귀환 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 귀환 실패. <1>$date"; + } elseif(($general['level'] == 1 || $general['level'] >= 5) && $general['city'] == $nation['capital']) { + $log[count($log)] = "●{$admin['month']}월:이미 수도입니다. 귀환 실패. <1>$date"; } else { - if($general[level] == 2) { - $query = "select city,name from city where gen3='$general[no]'"; + if($general['level'] == 2) { + $query = "select city,name from city where gen3='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - } elseif($general[level] == 3) { - $query = "select city,name from city where gen2='$general[no]'"; + } elseif($general['level'] == 3) { + $query = "select city,name from city where gen2='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - } elseif($general[level] == 4) { - $query = "select city,name from city where gen1='$general[no]'"; + } elseif($general['level'] == 4) { + $query = "select city,name from city where gen1='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } else { - $query = "select city,name from city where city='$nation[capital]'"; + $query = "select city,name from city where city='$nation['capital']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } - $log[count($log)] = "●{$admin[month]}월:$city[name](으)로 귀환했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$city['name'](으)로 귀환했습니다. <1>$date"; $exp = 70; $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 귀환 - $query = "update general set city='$city[city]' where no='$general[no]'"; + $query = "update general set city='$city['city']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 명성,공헌 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1839,34 +1839,34 @@ function process_28($connect, &$general) { } function process_29($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost,npccount,turnterm,scenario from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,level,gennum,scout from nation where nation='$general[nation]'"; + $query = "select nation,name,level,gennum,scout from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 인재탐색 실패. <1>$date"; - } elseif($nation[level] <= 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 인재탐색 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[gennum] >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 인재탐색 실패. <1>$date"; + } elseif($nation['level'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:방랑군입니다. 인재탐색 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3 && $nation['gennum'] >= 10) { + $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; } else { - $query = "select no from general where nation='$general[nation]' and npc<2"; + $query = "select no from general where nation='$general['nation']' and npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select no from general where nation='$general[nation]' and npc=3"; + $query = "select no from general where nation='$general['nation']' and npc=3"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); - $query = "select no from general where nation!='$general[nation]' and npc=3"; + $query = "select no from general where nation!='$general['nation']' and npc=3"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $otherNpccount = MYDB_num_rows($result); $otherNpccount = round(sqrt($otherNpccount + 1)) - 1; @@ -1884,7 +1884,7 @@ function process_29($connect, &$general) { case 1: $general[power2] += 1; break; case 2: $general[intel2] += 1; break; } - $log[count($log)] = "●{$admin[month]}월:인재를 찾을 수 없었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:인재를 찾을 수 없었습니다. <1>$date"; } else { // 탐색 성공 $exp = 200; @@ -1906,28 +1906,28 @@ function process_29($connect, &$general) { $name = "{$name}{$count}"; } - if($nation[scout] != 0) { + if($nation['scout'] != 0) { $scoutType = "발견"; $scoutLevel = 0; $scoutNation = 0; } else { $scoutType = "영입"; $scoutLevel = 1; - $scoutNation = $nation[nation]; + $scoutNation = $nation['nation']; } - $log[count($log)] = "●{$admin[month]}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$name(이)라는 인재를 {$scoutType}"); + $log[count($log)] = "●{$admin['month']}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$name(이)라는 인재를 {$scoutType}"); - $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; + $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $avgGen = MYDB_fetch_array($result); // 체섭시 무장 20%, 지장 20%, 무지장 60% // 마이너 무장 40%, 지장 40%, 무지장 20% $type = rand() % 10; - if($admin[scenario] == 0) { + if($admin['scenario'] == 0) { switch($type) { case 0: case 1: $leader = 65 + rand()%11; @@ -1965,18 +1965,18 @@ function process_29($connect, &$general) { } } // 국내 최고능치 기준으로 랜덤성 스케일링 - if($avgGen[lpi] > 210) { - $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); - } elseif($avgGen[lpi] > 180) { - $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); + if($avgGen['lpi'] > 210) { + $leader = round($leader * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + $power = round($power * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + } elseif($avgGen['lpi'] > 180) { + $leader = round($leader * $avgGen['lpi'] / 150 * (75+rand()%21)/100); + $power = round($power * $avgGen['lpi'] / 150 * (75+rand()%21)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (75+rand()%21)/100); } else { - $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $leader = round($leader * $avgGen['lpi'] / 150 * (90+rand()%11)/100); + $power = round($power * $avgGen['lpi'] / 150 * (90+rand()%11)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (90+rand()%11)/100); } $over1 = 0; $over2 = 0; @@ -2013,16 +2013,16 @@ function process_29($connect, &$general) { //인재추가 $npc = 3; - $npcid = $admin[npccount]; + $npcid = $admin['npccount']; $npccount = 10000 + $npcid; $npcmatch = rand() % 150 + 1; $genid = "gen{$npccount}"; $pw = md5("18071807"); $picture = 'default.jpg'; - $turntime = getRandTurn($admin[turnterm]); + $turntime = getRandTurn($admin['turnterm']); $personal = rand() % 10; - $bornyear = $admin[year]; - $deadyear = $admin[year] + 3; + $bornyear = $admin['year']; + $deadyear = $admin['year'] + 3; $age = 20; $specage = round((80 - $age)/12) + $age; $specage2 = round((80 - $age)/3) + $age; @@ -2041,7 +2041,7 @@ function process_29($connect, &$general) { dex0, dex10, dex20, dex30, dex40 ) values ( '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$scoutNation', - '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', + '$general['city']','$leader','$power','$intel','$avgGen['exp']','$avgGen['ded']', '$scoutLevel','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', '0','$bornyear','$deadyear', @@ -2057,31 +2057,31 @@ function process_29($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //국가 기술력 그대로 - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //기술로 가격 - $gold = $general[gold] - $admin[develcost]; + $gold = $general['gold'] - $admin['develcost']; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2093,17 +2093,17 @@ function process_29($connect, &$general) { } function process_30($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select path from city where city='$general[city]'"; + $query = "select path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 3); + $dist = distance($connect, $general['city'], 3); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2111,37 +2111,37 @@ function process_30($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $cost = $admin[develcost] * 5; + $cost = $admin['develcost'] * 5; if($dist[$destination] > 3) { - $log[count($log)] = "●{$admin[month]}월:거리가 멉니다. $destcity[name](으)로 강행 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 강행 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:거리가 멉니다. $destcity['name'](으)로 강행 실패. <1>$date"; + } elseif($general['gold'] < $cost) { + $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. $destcity['name'](으)로 강행 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 강행했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 강행했습니다. <1>$date"; $exp = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); + $exp = CharExperience($exp, $general['personal']); // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general[level] == 12) { - $query = "select level from nation where nation='$general[nation]'"; + if($general['level'] == 12) { + $query = "select level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[level] == 0) { - $query = "update general set city='$destination' where nation='$general[nation]'"; + if($nation['level'] == 0) { + $query = "update general set city='$destination' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name from general where nation='$general[nation]' and level<'12'"; + $query = "select no,name from general where nation='$general['nation']' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 강행했습니다."; + $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 강행했습니다."; for($j=0; $j < $gencount; $j++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); @@ -2155,13 +2155,13 @@ function process_30($connect, &$general) { } function process_31($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 2); + $dist = distance($connect, $general['city'], 2); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2170,36 +2170,36 @@ function process_31($connect, &$general) { $city = MYDB_fetch_array($result); if(!$city) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 첩보 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*3) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*3) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; - } elseif($general[nation] == $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $city[name]에 첩보 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 첩보 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*3) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $city['name']에 첩보 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*3) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $city['name']에 첩보 실패. <1>$date"; + } elseif($general['nation'] == $city['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $city['name']에 첩보 실패. <1>$date"; // } elseif($dist[$destination] > 3) { -// $log[count($log)] = "●{$admin[month]}월:너무 멉니다. $city[name]에 첩보 실패. <1>$date"; +// $log[count($log)] = "●{$admin['month']}월:너무 멉니다. $city['name']에 첩보 실패. <1>$date"; } else { - $query = "select crew,crewtype from general where city='$destination' and nation='$city[nation]'"; + $query = "select crew,crewtype from general where city='$destination' and nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $crew = 0; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - if($gen[crew] != 0) { $typecount[$gen[crewtype]]++; $crew += $gen[crew]; } + if($gen['crew'] != 0) { $typecount[$gen['crewtype']]++; $crew += $gen['crew']; } } if($dist[$destination] > 2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 소문만 들을 수 있었습니다. <1>$date"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:$city['name']의 소문만 들을 수 있었습니다. <1>$date"; + $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; } elseif($dist[$destination] == 2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 어느정도 정보를 얻었습니다. <1>$date"; - $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:$city['name']의 어느정도 정보를 얻었습니다. <1>$date"; + $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; + $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; } else { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 많은 정보를 얻었습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:$city['name']의 많은 정보를 얻었습니다. <1>$date"; $msg[count($msg)] = "【병종】"; for($i=0; $i <= 5; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } for($i=10; $i <= 14; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } @@ -2211,24 +2211,24 @@ function process_31($connect, &$general) { for($i=$count; $i > 0; $i-=8) { $log[count($log)] = "{$msg[$i-8]} {$msg[$i-7]} {$msg[$i-6]} {$msg[$i-5]} {$msg[$i-4]} {$msg[$i-3]} {$msg[$i-2]} {$msg[$i-1]}"; } - $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; + $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; - if($general[nation] != 0 && $city[nation] != 0) { - $query = "select name,tech from nation where nation='$city[nation]'"; + if($general['nation'] != 0 && $city['nation'] != 0) { + $query = "select name,tech from nation where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $yourTech = MYDB_fetch_array($result); - $query = "select tech from nation where nation='$general[nation]'"; + $query = "select tech from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myTech = MYDB_fetch_array($result); - $diff = $yourTech[tech] - $myTech[tech]; // 차이 - if($diff >= 1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↑압도"; } - elseif($diff >= 250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▲우위"; } - elseif($diff >= -250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↕대등"; } - elseif($diff >= -1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▼열위"; } - else { $log[count($log)] = "【$yourTech[name]】아국대비기술:↓미미"; } + $diff = $yourTech['tech'] - $myTech['tech']; // 차이 + if($diff >= 1000) { $log[count($log)] = "【$yourTech['name']】아국대비기술:↑압도"; } + elseif($diff >= 250) { $log[count($log)] = "【$yourTech['name']】아국대비기술:▲우위"; } + elseif($diff >= -250) { $log[count($log)] = "【$yourTech['name']】아국대비기술:↕대등"; } + elseif($diff >= -1000) { $log[count($log)] = "【$yourTech['name']】아국대비기술:▼열위"; } + else { $log[count($log)] = "【$yourTech['name']】아국대비기술:↓미미"; } } } @@ -2237,19 +2237,19 @@ function process_31($connect, &$general) { $ded = rand() % 70 + 1; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[leader2]++; - $general[gold] -= $admin[develcost]*3; - $general[rice] -= $admin[develcost]*3; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*3; + $general['rice'] -= $admin['develcost']*3; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select spy from nation where nation='$general[nation]'"; + $query = "select spy from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } + if($nation['spy'] != "") { $citys = explode("|", $nation['spy']); } for($i=0; $i < count($citys); $i++) { if(floor($citys[$i]/10) == $destination) { $exist = 1; @@ -2263,7 +2263,7 @@ function process_31($connect, &$general) { $citys[$i] = $destination * 10 + 3; } $spy = implode("|", $citys); - $query = "update nation set spy='$spy' where nation='$general[nation]'"; + $query = "update nation set spy='$spy' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2274,13 +2274,13 @@ function process_31($connect, &$general) { function process_32($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 5); + $dist = distance($connect, $general['city'], 5); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2288,103 +2288,103 @@ function process_32($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 화계 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($city[supply] == 0 && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 화계 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($city['supply'] == 0 && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 화계 실패. <1>$date"; + } elseif($dip['state'] >= 7) { + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 화계 실패. <1>$date"; } else { - $query = "select intel,book from general where city='$destination' and nation='$destcity[nation]' order by intel desc"; + $query = "select intel,book from general where city='$destination' and nation='$destcity['nation']' order by intel desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $intelgen = MYDB_fetch_array($result); - $ratio = round((($general[intel]+getBookEff($general[book]) - $intelgen[intel]-getBookEff($intelgen[book])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['intel']+getBookEff($general['book']) - $intelgen['intel']-getBookEff($intelgen['book'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); $ratio2 = rand() % 100; - if($general[item] == 5) { + if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 21 && $general['item'] <= 22) { // 육도, 삼략 사용 $ratio += 20; } // 특기보정 : 신산, 귀모 if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } + if($general['special'] == 31) { $ratio += 20; } // 국가보정 - if($nation[type] == 9) { $ratio += 10; } + if($nation['type'] == 9) { $ratio += 10; } // 거리보정 $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 불타고 있습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name'](이)가 불타고 있습니다."; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 화계가 성공했습니다. <1>$date"; - $destcity[agri] -= rand() % $_firingpower + $_firingbase; - $destcity[comm] -= rand() % $_firingpower + $_firingbase; - if($destcity[agri] < 0) { $destcity[agri] = 0; } - if($destcity[comm] < 0) { $destcity[comm] = 0; } - $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]' where city='$destination'"; + $destcity['agri'] -= rand() % $_firingpower + $_firingbase; + $destcity['comm'] -= rand() % $_firingpower + $_firingbase; + if($destcity['agri'] < 0) { $destcity['agri'] = 0; } + if($destcity['comm'] < 0) { $destcity['comm'] = 0; } + $query = "update city set state=32,agri='$destcity['agri']',comm='$destcity['comm']' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; + $query = "update general set firenum=firenum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 화계가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[intel2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*5; + $general['rice'] -= $admin['develcost']*5; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2398,13 +2398,13 @@ function process_33($connect, &$general) { //global $_basegold, $_baserice; //TODO : 버그로 보여서 지웠는데, 진짜로 지워도 되는지 확인 //탈취는 0까지 무제한 $_basegold = 0; $_baserice = 0; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 5); + $dist = distance($connect, $general['city'], 5); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2412,108 +2412,108 @@ function process_33($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select gold,rice from nation where nation='$destcity[nation]'"; + $query = "select gold,rice from nation where nation='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 탈취 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 탈취 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($city['supply'] == 0 && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 탈취 실패. <1>$date"; + } elseif($dip['state'] >= 7) { + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 탈취 실패. <1>$date"; } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; + $query = "select power,weap from general where city='$destination' and nation='$destcity['nation']' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); - $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); $ratio2 = rand() % 100; - if($general[item] == 5) { + if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 21 && $general['item'] <= 22) { // 육도, 삼략 사용 $ratio += 20; } // 특기보정 : 신산, 귀모 if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } + if($general['special'] == 31) { $ratio += 20; } // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } + if($mynation['type'] == 9) { $ratio += 10; } // 거리보정 $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]에서 금과 쌀을 도둑맞았습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name']에서 금과 쌀을 도둑맞았습니다."; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 탈취가 성공했습니다. <1>$date"; // 탈취 최대 400 * 8 - $gold = (rand() % $_firingpower + $_firingbase) * $destcity[level]; - $rice = (rand() % $_firingpower + $_firingbase) * $destcity[level]; + $gold = (rand() % $_firingpower + $_firingbase) * $destcity['level']; + $rice = (rand() % $_firingpower + $_firingbase) * $destcity['level']; - $nation[gold] -= $gold; - $nation[rice] -= $rice; - if($nation[gold] < $_basegold) { $gold += ($nation[gold] - $_basegold); $nation[gold] = $_basegold; } - if($nation[rice] < $_baserice) { $rice += ($nation[rice] - $_baserice); $nation[rice] = $_baserice; } - $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$destcity[nation]'"; + $nation['gold'] -= $gold; + $nation['rice'] -= $rice; + if($nation['gold'] < $_basegold) { $gold += ($nation['gold'] - $_basegold); $nation['gold'] = $_basegold; } + if($nation['rice'] < $_baserice) { $rice += ($nation['rice'] - $_baserice); $nation['rice'] = $_baserice; } + $query = "update nation set gold='$nation['gold']',rice='$nation['rice']' where nation='$destcity['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update city set state=34 where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; + $query = "update general set firenum=firenum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 본국으로 회수, 재야이면 본인이 소유 - if($general[nation] != 0) { - $query = "select gold,rice from nation where nation='$general[nation]'"; + if($general['nation'] != 0) { + $query = "select gold,rice from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $nation[gold] += $gold; - $nation[rice] += $rice; - $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$general[nation]'"; + $nation['gold'] += $gold; + $nation['rice'] += $rice; + $query = "update nation set gold='$nation['gold']',rice='$nation['rice']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $general[gold] += $gold; - $general[rice] += $rice; - $query = "update general set gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $general['gold'] += $gold; + $general['rice'] += $rice; + $query = "update general set gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $log[count($log)] = "●금$gold 쌀$rice을 획득했습니다."; @@ -2522,19 +2522,19 @@ function process_33($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 탈취가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*5; + $general['rice'] -= $admin['develcost']*5; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2545,13 +2545,13 @@ function process_33($connect, &$general) { function process_34($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 5); + $dist = distance($connect, $general['city'], 5); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2559,104 +2559,104 @@ function process_34($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 파괴 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 파괴 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($city['supply'] == 0 && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 파괴 실패. <1>$date"; + } elseif($dip['state'] >= 7) { + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 파괴 실패. <1>$date"; } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; + $query = "select power,weap from general where city='$destination' and nation='$destcity['nation']' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); - $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); $ratio2 = rand() % 100; - if($general[item] == 5) { + if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 21 && $general['item'] <= 22) { // 육도, 삼략 사용 $ratio += 20; } // 특기보정 : 신산, 귀모 if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } + if($general['special'] == 31) { $ratio += 20; } // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } + if($mynation['type'] == 9) { $ratio += 10; } // 거리보정 $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $destcity[name]의 성벽을 허물었습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $destcity['name']의 성벽을 허물었습니다."; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 파괴가 성공했습니다. <1>$date"; // 파괴 - $destcity[def] -= rand() % $_firingpower + $_firingbase; - $destcity[wall] -= rand() % $_firingpower + $_firingbase; - if($destcity[def] < 100) { $destcity[def] = 100; } - if($destcity[wall] < 100) { $destcity[wall] = 100; } - $query = "update city set state=34,def='$destcity[def]',wall='$destcity[wall]' where city='$destination'"; + $destcity['def'] -= rand() % $_firingpower + $_firingbase; + $destcity['wall'] -= rand() % $_firingpower + $_firingbase; + if($destcity['def'] < 100) { $destcity['def'] = 100; } + if($destcity['wall'] < 100) { $destcity['wall'] = 100; } + $query = "update city set state=34,def='$destcity['def']',wall='$destcity['wall']' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; + $query = "update general set firenum=firenum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 파괴가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*5; + $general['rice'] -= $admin['develcost']*5; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2667,13 +2667,13 @@ function process_34($connect, &$general) { function process_35($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 5); + $dist = distance($connect, $general['city'], 5); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2681,112 +2681,112 @@ function process_35($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $mynation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $mynation[level]; + if($general['level'] == 12) { + $lbonus = $mynation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $mynation['level']; } else { $lbonus = 0; } - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 선동 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 선동 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($city['supply'] == 0 && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 선동 실패. <1>$date"; + } elseif($dip['state'] >= 7) { + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 선동 실패. <1>$date"; } else { - $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; + $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='$destcity['nation']' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $ratio = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus - ($gen[sum]-$gen[horse]+getHorseEff($gen[horse]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round(((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus - ($gen['sum']-$gen['horse']+getHorseEff($gen['horse']))) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); $ratio2 = rand() % 100; - if($general[item] == 5) { + if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 21 && $general['item'] <= 22) { // 육도, 삼략 사용 $ratio += 20; } // 특기보정 : 신산, 귀모 if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } + if($general['special'] == 31) { $ratio += 20; } // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } + if($mynation['type'] == 9) { $ratio += 10; } // 거리보정 $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]의 백성들이 동요하고 있습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name']의 백성들이 동요하고 있습니다."; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 선동이 성공했습니다. <1>$date"; // 선동 최대 10 - $destcity[secu] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; - if($destcity[secu] < 0) { $destcity[secu] = 0; } - if($destcity[rate] < 0) { $destcity[rate] = 0; } - $query = "update city set state=32,rate='$destcity[rate]',secu='$destcity[secu]' where city='$destination'"; + $destcity['secu'] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity['rate'] -= rand() % round($_firingpower/50) + $_firingbase/50; + if($destcity['secu'] < 0) { $destcity['secu'] = 0; } + if($destcity['rate'] < 0) { $destcity['rate'] = 0; } + $query = "update city set state=32,rate='$destcity['rate']',secu='$destcity['secu']' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; + $query = "update general set firenum=firenum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 선동이 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[leader2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*5; + $general['rice'] -= $admin['develcost']*5; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2797,13 +2797,13 @@ function process_35($connect, &$general) { function process_36($connect, &$general) { global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $dist = distance($connect, $general[city], 5); + $dist = distance($connect, $general['city'], 5); $command = DecodeCommand($general[turn0]); $destination = $command[1]; @@ -2811,122 +2811,122 @@ function process_36($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general[nation]'"; + $query = "select level,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - if($general[level] == 12) { - $lbonus = $mynation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $mynation[level]; + if($general['level'] == 12) { + $lbonus = $mynation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $mynation['level']; } else { $lbonus = 0; } - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 기습 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 기습 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($city['supply'] == 0 && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']*5) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($general['nation'] == $destcity['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 기습 실패. <1>$date"; + } elseif($dip['state'] >= 7) { + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 기습 실패. <1>$date"; } else { - $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; + $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='$destcity['nation']' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $ratio = round(((floor(($general[leader]+$general[intel]+$general[power]) * (100 - $general[injury])/100)+getWeapEff($general[weap])+getHorseEff($general[horse])+$lbonus+getBookEff($general[book]) - ($gen[sum]-$gen[weap]-$gen[horse]-$gen[book]+getWeapEff($gen[weap])+getHorseEff($gen[horse])+getBookEff($gen[book]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round(((floor(($general['leader']+$general['intel']+$general['power']) * (100 - $general['injury'])/100)+getWeapEff($general['weap'])+getHorseEff($general['horse'])+$lbonus+getBookEff($general['book']) - ($gen['sum']-$gen['weap']-$gen['horse']-$gen['book']+getWeapEff($gen['weap'])+getHorseEff($gen['horse'])+getBookEff($gen['book']))) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); $ratio2 = rand() % 100; - if($general[item] == 5) { + if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 21 && $general['item'] <= 22) { // 육도, 삼략 사용 $ratio += 20; } // 특기보정 : 신산, 귀모 if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } + if($general['special'] == 31) { $ratio += 20; } // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } + if($mynation['type'] == 9) { $ratio += 10; } // 거리보정 $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 누군가에게 공격 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name'](이)가 누군가에게 공격 받았습니다."; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 기습이 성공했습니다. <1>$date"; // 기습 - $destcity[agri] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[comm] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[secu] -= rand() % round($_firingpower/4) + $_firingbase; - $destcity[def] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[wall] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; - if($destcity[agri] < 0) { $destcity[agri] = 0; } - if($destcity[comm] < 0) { $destcity[comm] = 0; } - if($destcity[secu] < 0) { $destcity[secu] = 0; } - if($destcity[def] < 0) { $destcity[def] = 0; } - if($destcity[wall] < 0) { $destcity[wall] = 0; } - if($destcity[rate] < 0) { $destcity[rate] = 0; } - $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]',secu='$destcity[secu]',def='$destcity[def]',wall='$destcity[wall]',rate='$destcity[rate]' where city='$destination'"; + $destcity['agri'] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity['comm'] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity['secu'] -= rand() % round($_firingpower/4) + $_firingbase; + $destcity['def'] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity['wall'] -= rand() % round($_firingpower/2) + $_firingbase; + $destcity['rate'] -= rand() % round($_firingpower/50) + $_firingbase/50; + if($destcity['agri'] < 0) { $destcity['agri'] = 0; } + if($destcity['comm'] < 0) { $destcity['comm'] = 0; } + if($destcity['secu'] < 0) { $destcity['secu'] = 0; } + if($destcity['def'] < 0) { $destcity['def'] = 0; } + if($destcity['wall'] < 0) { $destcity['wall'] = 0; } + if($destcity['rate'] < 0) { $destcity['rate'] = 0; } + $query = "update city set state=32,agri='$destcity['agri']',comm='$destcity['comm']',secu='$destcity['secu']',def='$destcity['def']',wall='$destcity['wall']',rate='$destcity['rate']' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; + $query = "update general set firenum=firenum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 기습이 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $general[leader2]++; $general[intel2]++; $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $general['gold'] -= $admin['develcost']*5; + $general['rice'] -= $admin['develcost']*5; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2936,37 +2936,37 @@ function process_36($connect, &$general) { } function process_41($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); $ratio = rand() % 100; - $exp = $general[crew] / 400; - $crewexp = $general[crew] * $general[train] * $general[atmos] / 20 / 10000; + $exp = $general['crew'] / 400; + $crewexp = $general['crew'] * $general['train'] * $general['atmos'] / 20 / 10000; // 랜덤치 $exp = round($exp * (80 + rand() % 41)/100); // 80 ~ 120% $crewexp = round($crewexp * (80 + rand() % 41)/100); // 80 ~ 120% // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ratio = CharCritical($ratio, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ratio = CharCritical($ratio, $general['personal']); - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 단련 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 단련 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 단련 실패. <1>$date"; - } elseif($general[train] < 40) { - $log[count($log)] = "●{$admin[month]}월:훈련이 너무 낮습니다. 단련 실패. <1>$date"; - } elseif($general[atmos] < 40) { - $log[count($log)] = "●{$admin[month]}월:사기가 너무 낮습니다. 단련 실패. <1>$date"; + if($general['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 단련 실패. <1>$date"; + } elseif($general['gold'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 단련 실패. <1>$date"; + } elseif($general['rice'] < $admin['develcost']) { + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. 단련 실패. <1>$date"; + } elseif($general['train'] < 40) { + $log[count($log)] = "●{$admin['month']}월:훈련이 너무 낮습니다. 단련 실패. <1>$date"; + } elseif($general['atmos'] < 40) { + $log[count($log)] = "●{$admin['month']}월:사기가 너무 낮습니다. 단련 실패. <1>$date"; } elseif($crewexp == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 모자랍니다. 단련 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:병사가 모자랍니다. 단련 실패. <1>$date"; } else { - $type = floor($general[crewtype] / 10) * 10; + $type = floor($general['crewtype'] / 10) * 10; switch($type) { case 0: $crewstr = '보병'; break; case 1: $crewstr = '궁병'; break; @@ -2977,29 +2977,29 @@ function process_41($connect, &$general) { if($ratio < 33) { // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도 향상이 지지부진했습니다. <1>$date"; + addGenDex($connect, $general['no'], $general['crewtype'], $crewexp); + $log[count($log)] = "●{$admin['month']}월:$crewstr 숙련도 향상이 지지부진했습니다. <1>$date"; } elseif($ratio < 66) { $exp = $exp * 2; // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp * 2); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 향상되었습니다. <1>$date"; + addGenDex($connect, $general['no'], $general['crewtype'], $crewexp * 2); + $log[count($log)] = "●{$admin['month']}월:$crewstr 숙련도가 향상되었습니다. <1>$date"; } else { $exp = $exp * 3; // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp * 3); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 일취월장했습니다. <1>$date"; + addGenDex($connect, $general['no'], $general['crewtype'], $crewexp * 3); + $log[count($log)] = "●{$admin['month']}월:$crewstr 숙련도가 일취월장했습니다. <1>$date"; } // 경험치 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',rice=rice-'$admin[develcost]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$admin['develcost']',rice=rice-'$admin['develcost']',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($general, $log); } function process_42($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3009,201 +3009,201 @@ function process_42($connect, &$general) { $exp = 30; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); $exp2 = $exp * 2; switch($type) { case 1: - $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 금을 300 받았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:지나가는 행인에게서 금을 300 받았습니다. <1>$date"; // 자금 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: - $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 쌀을 300 받았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:지나가는 행인에게서 쌀을 300 받았습니다. <1>$date"; // 군량 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 3: - $log[count($log)] = "●{$admin[month]}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 4: - $log[count($log)] = "●{$admin[month]}월:명사와 설전을 벌였으나 망신만 당했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:명사와 설전을 벌였으나 망신만 당했습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 5: - $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 6: - $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 했지만 망신만 당했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 했지만 망신만 당했습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 7: - $log[count($log)] = "●{$admin[month]}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; // 자금 상승 // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 8: - $log[count($log)] = "●{$admin[month]}월:산적을 만나 금 200을 빼앗겼습니다. <1>$date"; - $general[gold] -= 200; - if($general[gold] <= 0) { $general[gold] = 0; } + $log[count($log)] = "●{$admin['month']}월:산적을 만나 금 200을 빼앗겼습니다. <1>$date"; + $general['gold'] -= 200; + if($general['gold'] <= 0) { $general['gold'] = 0; } // 자금 하락 // 경험 상승 - $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 9: - $log[count($log)] = "●{$admin[month]}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 10: - $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 다쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:호랑이에게 물려 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 11: - $log[count($log)] = "●{$admin[month]}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 12: - $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 다쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:곰에게 할퀴어 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 13: - $log[count($log)] = "●{$admin[month]}월:주점에서 사람들과 어울려 술을 마셨습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:주점에서 사람들과 어울려 술을 마셨습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 14: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구해주었습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 15: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주다가 다쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구해주다가 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 16: - $log[count($log)] = "●{$admin[month]}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 17: - $log[count($log)] = "●{$admin[month]}월:돈을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; - $general[gold] -= 200; - if($general[gold] <= 0) { $general[gold] = 0; } + $log[count($log)] = "●{$admin['month']}월:돈을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; + $general['gold'] -= 200; + if($general['gold'] <= 0) { $general['gold'] = 0; } // 명성 상승 - $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',gold='$general['gold']',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 18: - $log[count($log)] = "●{$admin[month]}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2]++; - $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 19: - $log[count($log)] = "●{$admin[month]}월:쌀을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; - $general[rice] -= 200; - if($general[rice] <= 0) { $general[rice] = 0; } + $log[count($log)] = "●{$admin['month']}월:쌀을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; + $general['rice'] -= 200; + if($general['rice'] <= 0) { $general['rice'] = 0; } // 명성 상승 - $query = "update general set resturn='SUCCESS',rice='$general[rice]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',rice='$general['rice']',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 20: - $log[count($log)] = "●{$admin[month]}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 21: - $log[count($log)] = "●{$admin[month]}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 22: - $log[count($log)] = "●{$admin[month]}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 23: - $log[count($log)] = "●{$admin[month]}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 24: - $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 크게 다쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:호랑이에게 물려 크게 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 25: - $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 크게 다쳤습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:곰에게 할퀴어 크게 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 26: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구하다가 죽을뻔 했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구하다가 죽을뻔 했습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 50 + 30; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; default: - $log[count($log)] = "●{$admin[month]}월:아무일도 일어나지 않았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아무일도 일어나지 않았습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -3213,7 +3213,7 @@ function process_42($connect, &$general) { } function process_43($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3231,7 +3231,7 @@ function process_43($connect, &$general) { elseif($what == 2) { $dtype = "쌀"; } else { $what = 2; $dtype = "쌀"; } - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -3239,42 +3239,42 @@ function process_43($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - if($what == 1 && $general[gold] < $amount) { $amount = $general[gold]; } - if($what == 2 && $general[rice] < $amount) { $amount = $general[rice]; } + if($what == 1 && $general['gold'] < $amount) { $amount = $general['gold']; } + if($what == 2 && $general['rice'] < $amount) { $amount = $general['rice']; } if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 증여 실패. <1>$date"; - } elseif($what == 1 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 증여 실패. <1>$date"; - } elseif($what == 2 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 증여 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야는 불가능합니다. 증여 실패. <1>$date"; - } elseif($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; - } elseif($general[nation] != $gen[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 증여 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 증여 실패. <1>$date"; + } elseif($what == 1 && $general['gold'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:자금이 없습니다. 증여 실패. <1>$date"; + } elseif($what == 2 && $general['rice'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:군량이 없습니다. 증여 실패. <1>$date"; + } elseif($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야는 불가능합니다. 증여 실패. <1>$date"; + } elseif($general['nation'] != $city['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 증여 실패. <1>$date"; + } elseif($general['nation'] != $gen['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. 증여 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 증여 실패. <1>$date"; } else { - $genlog[count($genlog)] = "●{$admin[month]}월:$general[name]에게서 $dtype $amount을 증여 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 증여했습니다. <1>$date"; + $genlog[count($genlog)] = "●{$admin['month']}월:$general['name']에게서 $dtype $amount을 증여 받았습니다."; + $log[count($log)] = "●{$admin['month']}월:$gen['name']에게 $dtype $amount을 증여했습니다. <1>$date"; if($what == 1) { - $gen[gold] += $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; + $gen['gold'] += $amount; + $query = "update general set gold='$gen['gold']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general[gold] -= $amount; - $query = "update general set gold='$general[gold]' where no='$general[no]'"; + $general['gold'] -= $amount; + $query = "update general set gold='$general['gold']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { - $gen[rice] += $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; + $gen['rice'] += $amount; + $query = "update general set rice='$gen['rice']' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general[rice] -= $amount; - $query = "update general set rice='$general[rice]' where no='$general[no]'"; + $general['rice'] -= $amount; + $query = "update general set rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -3282,12 +3282,12 @@ function process_43($connect, &$general) { $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3297,17 +3297,17 @@ function process_43($connect, &$general) { } function process_44($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,gold,rice from nation where nation='$general[nation]'"; + $query = "select name,gold,rice from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -3320,45 +3320,45 @@ function process_44($connect, &$general) { if($amount < 100) { $amount = 100; } if($what == 1) { $dtype = "금"; - if($general[gold] < $amount) { $amount = $general[gold]; } + if($general['gold'] < $amount) { $amount = $general['gold']; } } elseif($what == 2) { $dtype = "쌀"; - if($general[rice] < $amount) { $amount = $general[rice]; } + if($general['rice'] < $amount) { $amount = $general['rice']; } } else { $what = 2; $dtype = "쌀"; - if($general[rice] < $amount) { $amount = $general[rice]; } + if($general['rice'] < $amount) { $amount = $general['rice']; } } - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 헌납 실패. <1>$date"; - } elseif($what == 1 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 헌납 실패. <1>$date"; - } elseif($what == 2 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 헌납 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; + if($general['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 헌납 실패. <1>$date"; + } elseif($what == 1 && $general['gold'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:자금이 없습니다. 헌납 실패. <1>$date"; + } elseif($what == 2 && $general['rice'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:군량이 없습니다. 헌납 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 증여 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 증여 실패. <1>$date"; } else { -// $alllog[count($alllog)] = "●{$admin[month]}월:$nation[name]에서 장수들이 재산을 헌납 하고 있습니다."; - $log[count($log)] = "●{$admin[month]}월: $dtype $amount을 헌납했습니다. <1>$date"; +// $alllog[count($alllog)] = "●{$admin['month']}월:$nation['name']에서 장수들이 재산을 헌납 하고 있습니다."; + $log[count($log)] = "●{$admin['month']}월: $dtype $amount을 헌납했습니다. <1>$date"; if($what == 1) { - $general[gold] -= $amount; - $query = "update general set gold='$general[gold]' where no='$general[no]'"; + $general['gold'] -= $amount; + $query = "update general set gold='$general['gold']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[gold] += $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; + $nation['gold'] += $amount; + $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { - $general[rice] -= $amount; - $query = "update general set rice='$general[rice]' where no='$general[no]'"; + $general['rice'] -= $amount; + $query = "update general set rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation[rice] += $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; + $nation['rice'] += $amount; + $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -3366,12 +3366,12 @@ function process_44($connect, &$general) { $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3381,110 +3381,110 @@ function process_44($connect, &$general) { } function process_45($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,chemi from nation where nation='$general[nation]'"; + $query = "select name,chemi from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 하야 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 하야는 불가능합니다. 하야 실패. <1>$date"; - } elseif($general[level] == 12) { - $log[count($log)] = "●{$admin[month]}월:군주입니다. 하야 실패. <1>$date"; + if($general['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야입니다. 하야 실패. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:초반제한중 하야는 불가능합니다. 하야 실패. <1>$date"; + } elseif($general['level'] == 12) { + $log[count($log)] = "●{$admin['month']}월:군주입니다. 하야 실패. <1>$date"; } else { $exp = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; + $query = "select no from diplomacy where me='$general['nation']' and state>='3' and state<='4'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount1 = MYDB_num_rows($dipresult); - $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; + $query = "select no from diplomacy where me='$general['nation']' and state>='5' and state<='6'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount2 = MYDB_num_rows($dipresult); $gold = 0; $rice = 0; // 금쌀1000이상은 남김 - if($general[gold] > 1000) { - $gold = $general[gold] - 1000; - $general[gold] = 1000; + if($general['gold'] > 1000) { + $gold = $general['gold'] - 1000; + $general['gold'] = 1000; } - if($general[rice] > 1000) { - $rice = $general[rice] - 1000; - $general[rice] = 1000; + if($general['rice'] > 1000) { + $rice = $general['rice'] - 1000; + $general['rice'] = 1000; } if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 통합에 반대하며 $nation[name](을)를 떠났습니다."; - $log[count($log)] = "●{$admin[month]}월:통합에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:통합에 반대하며 $nation[name](을)를 떠남"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 통합에 반대하며 $nation['name'](을)를 떠났습니다."; + $log[count($log)] = "●{$admin['month']}월:통합에 반대하며 $nation['name']에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:통합에 반대하며 $nation['name'](을)를 떠남"); // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 합병에 반대하며 $nation[name](을)를 떠났습니다."; - $log[count($log)] = "●{$admin[month]}월:합병에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:합병에 반대하며 $nation[name](을)를 떠남"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 합병에 반대하며 $nation['name'](을)를 떠났습니다."; + $log[count($log)] = "●{$admin['month']}월:합병에 반대하며 $nation['name']에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:합병에 반대하며 $nation['name'](을)를 떠남"); // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 하야했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nation[name]에서 하야했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 하야"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 하야했습니다."; + $log[count($log)] = "●{$admin['month']}월:$nation['name']에서 하야했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에서 하야"); // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 - $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general[no]'"; + $query = "update city set gen1='0' where gen1='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; + $query = "update city set gen2='0' where gen2='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; + $query = "update city set gen3='0' where gen3='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no from troop where troop='$general[troop]'"; + $query = "select no from troop where troop='$general['troop']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 - if($troop[no] == $general[no]) { + if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; + $query = "update general set troop='0' where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; + $query = "delete from troop where troop='$general['troop']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general[no]'"; + $query = "update general set troop='0' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } + $nation['chemi'] -= 1; + if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushAllLog($alllog); @@ -3492,21 +3492,21 @@ function process_45($connect, &$general) { } function process_46($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general[city]'"; + $query = "select * from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select nation from nation where name='$general[makenation]'"; + $query = "select nation from nation where name='$general['makenation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); @@ -3522,46 +3522,46 @@ function process_46($connect, &$general) { elseif($type > 13) { $type = 9; } if($gencount < 2) { - $log[count($log)] = "●{$admin[month]}월:수하 장수가 부족합니다. 건국 실패. <1>$date"; - } elseif($admin[year] >= $admin[startyear]+2) { - $log[count($log)] = "●{$admin[month]}월:건국 기간이 지났습니다. 건국 실패. <1>$date"; - } elseif($city[nation] != 0) { - $log[count($log)] = "●{$admin[month]}월:공백지가 아닙니다. 건국 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:수하 장수가 부족합니다. 건국 실패. <1>$date"; + } elseif($admin['year'] >= $admin['startyear']+2) { + $log[count($log)] = "●{$admin['month']}월:건국 기간이 지났습니다. 건국 실패. <1>$date"; + } elseif($city['nation'] != 0) { + $log[count($log)] = "●{$admin['month']}월:공백지가 아닙니다. 건국 실패. <1>$date"; } elseif($nationcount > 0) { - $log[count($log)] = "●{$admin[month]}월:존재하는 국가명입니다. 건국 실패. <1>$date"; - } elseif($general[makelimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 건국 실패. <1>$date"; - } elseif($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 건국 실패. <1>$date"; - } elseif($city[level] != 5 && $city[level] != 6) { - $log[count($log)] = "●{$admin[month]}월:중, 소 도시에서만 가능합니다. 건국 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:존재하는 국가명입니다. 건국 실패. <1>$date"; + } elseif($general['makelimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:재야가 된지 12시간이 지나야 합니다. 건국 실패. <1>$date"; + } elseif($general['level'] != 12) { + $log[count($log)] = "●{$admin['month']}월:군주가 아닙니다. 건국 실패. <1>$date"; + } elseif($city['level'] != 5 && $city['level'] != 6) { + $log[count($log)] = "●{$admin['month']}월:중, 소 도시에서만 가능합니다. 건국 실패. <1>$date"; } else { - $query = "update nation set name='$general[makenation]',color='$color',level=1,type='$type',capital='$general[city]' where nation='$general[nation]'"; + $query = "update nation set name='$general['makenation']',color='$color',level=1,type='$type',capital='$general['city']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select nation,name,history from nation where nation='$general[nation]'"; + $query = "select nation,name,history from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); // 현 도시 소속지로 - $query = "update city set nation='$nation[nation]',conflict='',conflict2='' where city='$general[city]'"; + $query = "update city set nation='$nation['nation']',conflict='',conflict2='' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "●{$admin[month]}월:$nation[name](을)를 건국하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에 국가를 건설하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【건국】".getNationType($type)." $nation[name](이)가 새로이 등장하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 건국"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nation[name](을)를 건국"); + $log[count($log)] = "●{$admin['month']}월:$nation['name'](을)를 건국하였습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $city['name']에 국가를 건설하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【건국】".getNationType($type)." $nation['name'](이)가 새로이 등장하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 건국"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $nation['name'](을)를 건국"); $exp = 1000; $ded = 1000; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = uniqueItem($connect, $general, $log, 3); @@ -3573,56 +3573,56 @@ function process_46($connect, &$general) { } function process_47($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,level from nation where nation='$general[nation]'"; + $query = "select name,level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //현재 외교 진행중(평시, 불가침만 제외)일때 - $query = "select state from diplomacy where me='$general[nation]' and state!='2' and state!='7'"; + $query = "select state from diplomacy where me='$general['nation']' and state!='2' and state!='7'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); - if($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반제한중에는 방랑이 불가능합니다. 방랑 실패."; + if($general['level'] != 12) { + $log[count($log)] = "●{$admin['month']}월:군주가 아닙니다. <1>$date"; + } elseif($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:초반제한중에는 방랑이 불가능합니다. 방랑 실패."; } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:방랑할 수 없는 외교상태입니다. 방랑 실패."; - } elseif($nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:이미 방랑군입니다. 방랑 실패."; + $log[count($log)] = "●{$admin['month']}월:방랑할 수 없는 외교상태입니다. 방랑 실패."; + } elseif($nation['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:이미 방랑군입니다. 방랑 실패."; } else { - $log[count($log)] = "●{$admin[month]}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 방랑의 길을 떠납니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 버리고 방랑"); + $log[count($log)] = "●{$admin['month']}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 방랑의 길을 떠납니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 버리고 방랑"); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【방랑】$general[name]은(는) 방랑의 길을 떠납니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【방랑】$general['name']은(는) 방랑의 길을 떠납니다."; //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); + DeleteConflict($connect, $general['nation']); // 국명, 색깔 바꿈 국가 레벨 0, 성향리셋, 기술0 - $query = "update nation set name='$general[name]',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='$general[nation]'"; + $query = "update nation set name='$general['name']',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 본인 빼고 건국/임관제한 - $query = "update general set makelimit='12' where no!='$general[no]' and nation='$general[nation]'"; + $query = "update general set makelimit='12' where no!='$general['no']' and nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 건국/임관제한 - $query = "update general set resturn='SUCCESS',makelimit='12' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',makelimit='12' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 관직장수 일반으로 - $query = "update general set level=1 where nation='$general[nation]' and level <= 11"; + $query = "update general set level=1 where nation='$general['nation']' and level <= 11"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 도시 공백지로 - $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$general[nation]'"; + $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 리셋 - $query = "update diplomacy set state='2',term='0' where me='$general[nation]' or you='$general[nation]'"; + $query = "update diplomacy set state='2',term='0' where me='$general['nation']' or you='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushHistory($connect, $history); @@ -3632,13 +3632,13 @@ function process_47($connect, &$general) { } function process_48($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $city = getCity($connect, $general[city]); + $city = getCity($connect, $general['city']); $command = DecodeCommand($general[turn0]); $type = $command[1]; @@ -3653,67 +3653,67 @@ function process_48($connect, &$general) { else { $cost = getItemCost($type); } //특기 보정 : 거상 - if($general[special] == 30 && $type != 0) { $cost *= 0.5; } + if($general['special'] == 30 && $type != 0) { $cost *= 0.5; } - if($city[trade] == 0 && $general[special] != 30) { - $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. 장비매매 실패. <1>$date"; - } elseif($city[secu]/1000 < $type) { - $log[count($log)] = "●{$admin[month]}월:이 도시에서는 구할 수 없었습니다. 구입 실패. <1>$date"; + if($city['trade'] == 0 && $general['special'] != 30) { + $log[count($log)] = "●{$admin['month']}월:도시에 상인이 없습니다. 장비매매 실패. <1>$date"; + } elseif($city['secu']/1000 < $type) { + $log[count($log)] = "●{$admin['month']}월:이 도시에서는 구할 수 없었습니다. 구입 실패. <1>$date"; } elseif($type > 6 || $type < 0) { - $log[count($log)] = "●{$admin[month]}월:구입할 수 있는 물건이 아닙니다. 구입 실패. <1>$date"; - } elseif($general[gold] < $cost && $type != 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 구입 실패. <1>$date"; - } elseif($general[weap] == 0 && $isweap == 0 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:무기가 없습니다. 판매 실패. <1>$date"; - } elseif($general[book] == 0 && $isweap == 1 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:서적이 없습니다. 판매 실패. <1>$date"; - } elseif($general[horse] == 0 && $isweap == 2 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:명마가 없습니다. 판매 실패. <1>$date"; - } elseif($general[item] == 0 && $isweap == 3 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:도구가 없습니다. 판매 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:구입할 수 있는 물건이 아닙니다. 구입 실패. <1>$date"; + } elseif($general['gold'] < $cost && $type != 0) { + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 구입 실패. <1>$date"; + } elseif($general['weap'] == 0 && $isweap == 0 && $type == 0) { + $log[count($log)] = "●{$admin['month']}월:무기가 없습니다. 판매 실패. <1>$date"; + } elseif($general['book'] == 0 && $isweap == 1 && $type == 0) { + $log[count($log)] = "●{$admin['month']}월:서적이 없습니다. 판매 실패. <1>$date"; + } elseif($general['horse'] == 0 && $isweap == 2 && $type == 0) { + $log[count($log)] = "●{$admin['month']}월:명마가 없습니다. 판매 실패. <1>$date"; + } elseif($general['item'] == 0 && $isweap == 3 && $type == 0) { + $log[count($log)] = "●{$admin['month']}월:도구가 없습니다. 판매 실패. <1>$date"; } else { if($isweap == 0) { if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getWeapName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='$general[no]'"; + $log[count($log)] = "●{$admin['month']}월:".getWeapName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $cost = round(getItemCost($general[weap]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getWeapName($general[weap])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='$general[no]'"; + $cost = round(getItemCost($general['weap']) / 2, 0); + $log[count($log)] = "●{$admin['month']}월:".getWeapName($general['weap'])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 1) { if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getBookName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='$general[no]'"; + $log[count($log)] = "●{$admin['month']}월:".getBookName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $cost = round(getItemCost($general[book]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getBookName($general[book])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='$general[no]'"; + $cost = round(getItemCost($general['book']) / 2, 0); + $log[count($log)] = "●{$admin['month']}월:".getBookName($general['book'])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 2) { if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getHorseName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='$general[no]'"; + $log[count($log)] = "●{$admin['month']}월:".getHorseName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $cost = round(getItemCost($general[horse]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getHorseName($general[horse])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='$general[no]'"; + $cost = round(getItemCost($general['horse']) / 2, 0); + $log[count($log)] = "●{$admin['month']}월:".getHorseName($general['horse'])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 3) { if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getItemName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='$general[no]'"; + $log[count($log)] = "●{$admin['month']}월:".getItemName($type)."(을)를 구입했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $cost = round(getItemCost2($general[item]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getItemName($general[item])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='$general[no]'"; + $cost = round(getItemCost2($general['item']) / 2, 0); + $log[count($log)] = "●{$admin['month']}월:".getItemName($general['item'])."(을)를 판매했습니다. <1>$date"; + $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -3722,11 +3722,11 @@ function process_48($connect, &$general) { $exp = 10; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); @@ -3735,17 +3735,17 @@ function process_48($connect, &$general) { function process_49($connect, &$general) { global $_taxrate; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general[nation]'"; + $query = "select level from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $city = getCity($connect, $general[city]); + $city = getCity($connect, $general['city']); $command = DecodeCommand($general[turn0]); $type = $command[2]; @@ -3756,8 +3756,8 @@ function process_49($connect, &$general) { if($amount < 100) { $amount = 100; } elseif($amount > 10000) { $amount = 10000; } - if($city[trade] == 0 && ($general[special] == 30 || $general[npc] >= 2)) { - $city[trade] = 100; + if($city['trade'] == 0 && ($general['special'] == 30 || $general['npc'] >= 2)) { + $city['trade'] = 100; } // 거상 f배 이득시 금 계산 @@ -3766,28 +3766,28 @@ function process_49($connect, &$general) { // (0.99~1.01) : c = a((1-f)b+f) if($type == 1) { $dtype = "군량 판매"; - if($general[rice] < $amount) { $amount = $general[rice]; } - $cost = $amount * $city[trade] / 100; + if($general['rice'] < $amount) { $amount = $general['rice']; } + $cost = $amount * $city['trade'] / 100; //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + if($general['special'] == 30 && $city['trade'] > 100) { $cost = $amount * (6 * $city['trade']/100 - 5); } // 이익인 경우 5배 이득 + if($general['special'] == 30 && $city['trade'] < 100) { $cost = $amount * (0.2 * $city['trade']/100 + 0.8); } // 손해인 경우 1/5배 손해 $tax = $cost * $_taxrate; $cost = $cost - $tax; } elseif($type == 2) { $dtype = "군량 구입"; - $cost = $amount * $city[trade] / 100; + $cost = $amount * $city['trade'] / 100; //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + if($general['special'] == 30 && $city['trade'] < 100) { $cost = $amount * (6 * $city['trade']/100 - 5); } // 이익인 경우 5배 이득 + if($general['special'] == 30 && $city['trade'] > 100) { $cost = $amount * (0.2 * $city['trade']/100 + 0.8); } // 손해인 경우 1/5배 손해 $tax = $cost * $_taxrate; $cost = $cost + $tax; - if($general[gold] < $cost) { - $cost = $general[gold]; + if($general['gold'] < $cost) { + $cost = $general['gold']; $tax = $cost * $_taxrate; - $amount = ($cost-$tax) * 100 / $city[trade]; + $amount = ($cost-$tax) * 100 / $city['trade']; //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] < 100) { $amount = ($cost-$tax) / (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] > 100) { $amount = ($cost-$tax) / (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 + if($general['special'] == 30 && $city['trade'] < 100) { $amount = ($cost-$tax) / (6 * $city['trade']/100 - 5); } // 이익인 경우 5배 이득 + if($general['special'] == 30 && $city['trade'] > 100) { $amount = ($cost-$tax) / (0.2 * $city['trade']/100 + 0.8); } // 손해인 경우 1/5배 손해 } } @@ -3795,67 +3795,67 @@ function process_49($connect, &$general) { $amount = round($amount); $tax = round($tax); - if($city[trade] == 0 && $general[special] != 30 && $general[npc] < 2) { - $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. $dtype 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($type == 1 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. $dtype 실패. <1>$date"; - } elseif($type == 2 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. $dtype 실패. <1>$date"; + if($city['trade'] == 0 && $general['special'] != 30 && $general['npc'] < 2) { + $log[count($log)] = "●{$admin['month']}월:도시에 상인이 없습니다. $dtype 실패. <1>$date"; + } elseif($general['nation'] != $city['nation'] && $nation['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $dtype 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 실패. <1>$date"; + } elseif($type == 1 && $general['rice'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:군량이 없습니다. $dtype 실패. <1>$date"; + } elseif($type == 2 && $general['gold'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:자금이 없습니다. $dtype 실패. <1>$date"; } else { // 판매 if($type == 1) { - $log[count($log)] = "●{$admin[month]}월:군량 $amount을 팔아 자금 $cost을 얻었습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량 $amount을 팔아 자금 $cost을 얻었습니다. <1>$date"; // 군량 감소 - $query = "update general set rice=rice-{$amount} where no='$general[no]'"; + $query = "update general set rice=rice-{$amount} where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 증가 - $query = "update general set gold=gold+{$cost} where no='$general[no]'"; + $query = "update general set gold=gold+{$cost} where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 구입 } elseif($type == 2) { - $log[count($log)] = "●{$admin[month]}월:군량 $amount을 사서 자금 $cost을 썼습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량 $amount을 사서 자금 $cost을 썼습니다. <1>$date"; // 군량 증가 - $query = "update general set rice=rice+{$amount} where no='$general[no]'"; + $query = "update general set rice=rice+{$amount} where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 감소 - $query = "update general set gold=gold-{$cost} where no='$general[no]'"; + $query = "update general set gold=gold-{$cost} where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 세금 국고로 - $query = "update nation set gold=gold+'$tax' where nation='$general[nation]'"; + $query = "update nation set gold=gold+'$tax' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $exp = 30; $ded = 50; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 switch(rand()%3) { case 0: $general[leader2]++; - $query = "update general set leader2='$general[leader2]' where no='$general[no]'"; + $query = "update general set leader2='$general[leader2]' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: $general[power2]++; - $query = "update general set power2='$general[power2]' where no='$general[no]'"; + $query = "update general set power2='$general[power2]' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: $general[intel2]++; - $query = "update general set intel2='$general[intel2]' where no='$general[no]'"; + $query = "update general set intel2='$general[intel2]' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -3867,64 +3867,64 @@ function process_49($connect, &$general) { } function process_50($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $log[count($log)] = "●{$admin[month]}월:건강 회복을 위해 요양합니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:건강 회복을 위해 요양합니다. <1>$date"; // 경험치 상승 // 공헌도, 명성 상승 $exp = 10; $ded = 7; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); + $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); } function process_51($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 권고 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 권고 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 권고 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 권고 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 권고 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 권고 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 권고 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 권고 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 항복 권고 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 항복 권고 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 상대에게 발송 //먼저 삭제된 칸 중 가장 오래된 칸 찾음 @@ -3934,15 +3934,15 @@ function process_51($connect, &$general) { } //기존 메세지 한칸씩 뒤로 미룸 for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation['nation']); } //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; + $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + $query = "update nation set dip0='{$nation['name']}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -3952,27 +3952,27 @@ function process_51($connect, &$general) { function process_52($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,level,gold,rice,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,level,gold,rice,surlimit,history,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - $command = DecodeCommand($mynation["l{$general[level]}turn0"]); + $command = DecodeCommand($mynation["l{$general['level']}turn0"]); $rice = $command[3]; $gold = $command[2]; $which = $command[1]; $rice *= 1000; $gold *= 1000; - $limit = $mynation[level] * 10000; + $limit = $mynation['level'] * 10000; if($gold < 0) { $gold = 0; } if($rice < 0) { $rice = 0; } @@ -3981,30 +3981,30 @@ function process_52($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($gold > $mynation[gold]-$_basegold) { $gold = $mynation[gold] - $_basegold; } - if($rice > $mynation[rice]-$_baserice) { $rice = $mynation[rice] - $_baserice; } + if($gold > $mynation['gold']-$_basegold) { $gold = $mynation['gold'] - $_basegold; } + if($rice > $mynation['rice']-$_baserice) { $rice = $mynation['rice'] - $_baserice; } - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 원조 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 원조 실패. <1>$date"; } elseif($gold == 0 && $rice == 0) { - $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; } elseif($gold < 0 || $rice < 0) { - $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; } elseif($gold > $limit || $rice > $limit) { - $log[count($log)] = "●{$admin[month]}월:작위 제한량 이상은 보낼 수 없습니다. 원조 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 원조 실패. <1>$date"; - } elseif($mynation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:외교제한중입니다. 원조 실패. <1>$date"; - } elseif($younation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:상대국이 외교제한중입니다. 원조 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 원조 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 원조 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:작위 제한량 이상은 보낼 수 없습니다. 원조 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 원조 실패. <1>$date"; + } elseif($mynation['surlimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:외교제한중입니다. 원조 실패. <1>$date"; + } elseif($younation['surlimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:상대국이 외교제한중입니다. 원조 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 원조 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 원조 실패. <1>$date"; } else { // 본국 자원 감소 - $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='$general[nation]'"; + $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대국 자원 증가 @@ -4012,18 +4012,18 @@ function process_52($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; + $query = "select no,name,nation from general where nation='$general['nation']' and level>='9'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - $genlog[0] = "$younation[name](으)로 금$gold 쌀$rice을 지원했습니다."; + $genlog[0] = "$younation['name'](으)로 금$gold 쌀$rice을 지원했습니다."; pushGenLog($gen, $genlog); } - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name](으)로 금$gold 쌀$rice을 지원"); - $mynation = addNationHistory($connect, $mynation, "●{$admin[year]}년 {$admin[month]}월:$younation[name](으)로 금$gold 쌀$rice을 지원"); - $younation = addNationHistory($connect, $younation, "●{$admin[year]}년 {$admin[month]}월:$mynation[name](으)로부터 금$gold 쌀$rice을 지원 받음"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$younation['name'](으)로 금$gold 쌀$rice을 지원"); + $mynation = addNationHistory($connect, $mynation, "●{$admin['year']}년 {$admin['month']}월:$younation['name'](으)로 금$gold 쌀$rice을 지원"); + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:$mynation['name'](으)로부터 금$gold 쌀$rice을 지원 받음"); //상대국 수뇌부에게 로그 전달 $query = "select no,name,nation from general where nation='$which' and level>='9'"; @@ -4032,22 +4032,22 @@ function process_52($connect, &$general) { for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - $genlog[0] = "$mynation[name]에서 금$gold 쌀$rice을 원조 했습니다."; + $genlog[0] = "$mynation['name']에서 금$gold 쌀$rice을 원조 했습니다."; pushGenLog($gen, $genlog); } - $history[count($history)] = "●$admin[year]년 $admin[month]월:【원조】$mynation[name]에서 $younation[name](으)로 물자를 지원합니다."; - $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 물자를 지원합니다. <1>$date"; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【원조】$mynation['name']에서 $younation['name'](으)로 물자를 지원합니다."; + $log[count($log)] = "●{$admin['month']}월:$younation['name'](으)로 물자를 지원합니다. <1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -4057,43 +4057,43 @@ function process_52($connect, &$general) { } function process_53($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 통합 제의 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name'](으)로 통합 제의 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 상대에게 발송 //먼저 삭제된 칸 중 가장 오래된 칸 찾음 @@ -4103,15 +4103,15 @@ function process_53($connect, &$general) { } //기존 메세지 한칸씩 뒤로 미룸 for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation['nation']); } //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; + $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + $query = "update nation set dip0='{$nation['name']}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4119,7 +4119,7 @@ function process_53($connect, &$general) { } function process_54($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4132,23 +4132,23 @@ function process_54($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nextruler = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general[nation]'"; + $query = "select nation,name,history from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //현재 외교 진행중(통합제의중)일때 - $query = "select state from diplomacy where me='$general[nation]' and state='4'"; + $query = "select state from diplomacy where me='$general['nation']' and state='4'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); - if($nextruler[name] == "") { - $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; - } elseif($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 선양 실패. <1>$date"; - } elseif($nextruler[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; + if($nextruler['name'] == "") { + $log[count($log)] = "●{$admin['month']}월:잘못된 장수입니다. 선양 실패. <1>$date"; + } elseif($general['level'] != 12) { + $log[count($log)] = "●{$admin['month']}월:군주가 아닙니다. 선양 실패. <1>$date"; + } elseif($nextruler['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:잘못된 장수입니다. 선양 실패. <1>$date"; } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:현재 통합 진행중입니다. 선양 실패."; + $log[count($log)] = "●{$admin['month']}월:현재 통합 진행중입니다. 선양 실패."; } else { //군주 교체 $query = "update general set level='12' where no='$who'"; @@ -4161,16 +4161,16 @@ function process_54($connect, &$general) { $query = "update city set gen3='0' where gen3='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin[year]년 $admin[month]월:【선양】$general[name](이)가 $nation[name]의 군주 자리를 $nextruler[name]에게 선양했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nextruler[name]에게 군주의 자리를 물려줍니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 물려받습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【선양】$general['name'](이)가 $nation['name']의 군주 자리를 $nextruler['name']에게 선양했습니다."; + $log[count($log)] = "●{$admin['month']}월:$nextruler['name']에게 군주의 자리를 물려줍니다. <1>$date"; + $youlog[count($youlog)] = "●{$admin['month']}월:$general['name']에게서 군주의 자리를 물려받습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 $nextruler[name]에게 선양"); - $nextruler = addHistory($connect, $nextruler, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 물려 받음"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nextruler[name]에게 선양"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']의 군주자리를 $nextruler['name']에게 선양"); + $nextruler = addHistory($connect, $nextruler, "●$admin['year']년 $admin['month']월:$nation['name']의 군주자리를 물려 받음"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $nextruler['name']에게 선양"); } pushGenLog($general, $log); pushGenLog($nextruler, $youlog); @@ -4179,29 +4179,29 @@ function process_54($connect, &$general) { function process_55($connect, &$general) { global $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from city where city='$general[city]'"; + $query = "select name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation from nation where name='$general[name]'"; + $query = "select nation from nation where name='$general['name']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); - if($nationcount > 0) { $makename = _String::SubStr("$nationcount".$general[name], 0, 6); } - else { $makename = $general[name]; } + if($nationcount > 0) { $makename = _String::SubStr("$nationcount".$general['name'], 0, 6); } + else { $makename = $general['name']; } - if($general[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 거병 실패. <1>$date"; - } elseif($admin[year] >= $admin[startyear]+2) { - $log[count($log)] = "●{$admin[month]}월:거병 기간이 지났습니다. 거병 실패. <1>$date"; - } elseif($general[makelimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 거병 실패. <1>$date"; + if($general['level'] != 0) { + $log[count($log)] = "●{$admin['month']}월:재야가 아닙니다. 거병 실패. <1>$date"; + } elseif($admin['year'] >= $admin['startyear']+2) { + $log[count($log)] = "●{$admin['month']}월:거병 기간이 지났습니다. 거병 실패. <1>$date"; + } elseif($general['makelimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:재야가 된지 12시간이 지나야 합니다. 거병 실패. <1>$date"; } else { $query = "insert into nation (name, color, gold, rice, rate, bill, tricklimit, surlimit, type, gennum) values ('$makename', '330000', '0', '$_baserice', '20' ,'100', '36', '72', '0', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4214,31 +4214,31 @@ function process_55($connect, &$general) { $ded = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 명성 상승 // 군주로 // 현 국가 소속으로 - $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='$nation[nation]',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='$nation['nation']',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "●{$admin[month]}월:거병에 성공하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에서 거병하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【거병】$general[name](이)가 세력을 결성하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$city[name]에서 거병"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $city[name]에서 거병"); + $log[count($log)] = "●{$admin['month']}월:거병에 성공하였습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $city['name']에서 거병하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【거병】$general['name'](이)가 세력을 결성하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$city['name']에서 거병"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $city['name']에서 거병"); // 외교테이블 추가 - $query = "select nation from nation where nation!='$nation[nation]'"; + $query = "select nation from nation where nation!='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); for($i=0; $i < $nationcount; $i++) { $younation = MYDB_fetch_array($result); - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$younation[nation]', '2', '0')"; + $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$younation['nation']', '2', '0')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$younation[nation]', '$nation[nation]', '2', '0')"; + $query = "insert into diplomacy (me, you, state, term) values ('$younation['nation']', '$nation['nation']', '2', '0')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -4248,45 +4248,45 @@ function process_55($connect, &$general) { } function process_56($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general[nation]'"; + $query = "select name from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$general[nation]'"; + $query = "select city from city where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); - if($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; + if($general['level'] != 12) { + $log[count($log)] = "●{$admin['month']}월:군주가 아닙니다. <1>$date"; } elseif($citycount != 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군이 아닙니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:방랑군이 아닙니다. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:세력을 해산했습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 세력을 해산했습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 해산"); + $log[count($log)] = "●{$admin['month']}월:세력을 해산했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 세력을 해산했습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 해산"); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); // 수동 해산인 국가 페널티, 자금, 군량 if($genCount > 1) { - $query = "update general set resturn='SUCCESS' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=1000 where nation='$general[nation]' and gold>1000"; + $query = "update general set gold=1000 where nation='$general['nation']' and gold>1000"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=1000 where nation='$general[nation]' and rice>1000"; + $query = "update general set rice=1000 where nation='$general['nation']' and rice>1000"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); + DeleteConflict($connect, $general['nation']); deleteNation($connect, $general); } pushAllLog($alllog); @@ -4294,61 +4294,61 @@ function process_56($connect, &$general) { } function process_57($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,killturn from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general[nation]'"; + $query = "select nation,name,history from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select npc,no,name,killturn,history from general where nation='$general[nation]' and level='12'"; + $query = "select npc,no,name,killturn,history from general where nation='$general['nation']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야 입니다. 모반 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부 이상만 가능합니다. 모반 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 모반 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 모반 실패. <1>$date"; - } elseif($general[level] == 12) { - $log[count($log)] = "●{$admin[month]}월:이미 군주 입니다. 모반 실패. <1>$date"; - } elseif($ruler[killturn] >= $admin[killturn]) { - $log[count($log)] = "●{$admin[month]}월:군주가 활동중입니다. 모반 실패. <1>$date"; - } elseif($ruler[npc] >= 2) { - $log[count($log)] = "●{$admin[month]}월:군주가 NPC입니다. 모반 실패. <1>$date"; + if($general['level'] == 0) { + $log[count($log)] = "●{$admin['month']}월:재야 입니다. 모반 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부 이상만 가능합니다. 모반 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 모반 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 모반 실패. <1>$date"; + } elseif($general['level'] == 12) { + $log[count($log)] = "●{$admin['month']}월:이미 군주 입니다. 모반 실패. <1>$date"; + } elseif($ruler['killturn'] >= $admin['killturn']) { + $log[count($log)] = "●{$admin['month']}월:군주가 활동중입니다. 모반 실패. <1>$date"; + } elseif($ruler['npc'] >= 2) { + $log[count($log)] = "●{$admin['month']}월:군주가 NPC입니다. 모반 실패. <1>$date"; } else { //군주 교체 - $query = "update general set resturn='SUCCESS',level='12' where no='$general[no]'"; + $query = "update general set resturn='SUCCESS',level='12' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 태수,군사,시중이었다면 해제 - $query = "update city set gen1='0' where gen1='$general[no]'"; + $query = "update city set gen1='0' where gen1='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; + $query = "update city set gen2='0' where gen2='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; + $query = "update city set gen3='0' where gen3='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1',experience=experience*0.7 where no='$ruler[no]'"; + $query = "update general set level='1',experience=experience*0.7 where no='$ruler['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "●{$admin[month]}월:모반에 성공했습니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 뺏겼습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 모반에 성공했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【모반】$general[name](이)가 $nation[name]의 군주 자리를 찬탈했습니다."; + $log[count($log)] = "●{$admin['month']}월:모반에 성공했습니다. <1>$date"; + $youlog[count($youlog)] = "●{$admin['month']}월:$general['name']에게서 군주의 자리를 뺏겼습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 모반에 성공했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【모반】$general['name'](이)가 $nation['name']의 군주 자리를 찬탈했습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:모반으로 $nation[name]의 군주자리를 찬탈"); - $ruler = addHistory($connect, $ruler, "●$admin[year]년 $admin[month]월:$general[name]의 모반으로 인해 $nation[name]의 군주자리를 박탈당함"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $ruler[name]에게서 군주자리를 찬탈"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:모반으로 $nation['name']의 군주자리를 찬탈"); + $ruler = addHistory($connect, $ruler, "●$admin['year']년 $admin['month']월:$general['name']의 모반으로 인해 $nation['name']의 군주자리를 박탈당함"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $ruler['name']에게서 군주자리를 찬탈"); } pushGenLog($general, $log); pushGenLog($ruler, $youlog); @@ -4358,21 +4358,21 @@ function process_57($connect, &$general) { function process_61($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost,turnterm from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select gold,rice,name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select gold,rice,name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $when = $command[2]; $which = $command[1]; @@ -4383,24 +4383,24 @@ function process_61($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; -// } elseif($nation[gold]-$_basegold < $admin[develcost] || $nation[rice]-$_baserice < $admin[develcost]) { -// $log[count($log)] = "●{$admin[month]}월:증정할 물자가 부족합니다. 제의 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; +// } elseif($nation['gold']-$_basegold < $admin['develcost'] || $nation['rice']-$_baserice < $admin['develcost']) { +// $log[count($log)] = "●{$admin['month']}월:증정할 물자가 부족합니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 불가침 제의 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 불가침 제의 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 상대에게 발송 //먼저 삭제된 칸 중 가장 오래된 칸 찾음 @@ -4410,29 +4410,29 @@ function process_61($connect, &$general) { } //기존 메세지 한칸씩 뒤로 미룸 for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation['nation']); } //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; + $me = $general['no'] * 10000 + $younation['nation']; $type = $when * 100 + 6; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + $query = "update nation set dip0='{$nation['name']}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 3턴후 - $date = addTurn($date, $admin[turnterm]); - $date = addTurn($date, $admin[turnterm]); - $date = addTurn($date, $admin[turnterm]); + $date = addTurn($date, $admin['turnterm']); + $date = addTurn($date, $admin['turnterm']); + $date = addTurn($date, $admin['turnterm']); //조건 표시기한 설정 - $query = "update diplomacy set showing='{$date}' where me='$general[nation]' and you='$younation[nation]'"; + $query = "update diplomacy set showing='{$date}' where me='$general['nation']' and you='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // $admin[develcost]*10씩 차감 -// $amount = $admin[develcost]; -// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; + // $admin['develcost']*10씩 차감 +// $amount = $admin['develcost']; +// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; // MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4440,90 +4440,90 @@ function process_61($connect, &$general) { } function process_62($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,history,l{$general[level]}turn0,color from nation where nation='$general[nation]'"; + $query = "select nation,name,history,l{$general['level']}turn0,color from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,color,history from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - $query = "select * from general where nation='$younation[nation]' and level='12'"; + $query = "select * from general where nation='$younation['nation']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); //아국과의 관계 - $query = "select state from diplomacy where me='$nation[nation]' and you='$younation[nation]'"; + $query = "select state from diplomacy where me='$nation['nation']' and you='$younation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(합병수락중,통합수락중)일때 - $query = "select state from diplomacy where me='$younation[nation]' and (state='3' or state='5')"; + $query = "select state from diplomacy where me='$younation['nation']' and (state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 선포 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 선포 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 선포 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 0) { - $log[count($log)] = "●{$admin[month]}월:아국과 이미 교전중입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 1) { - $log[count($log)] = "●{$admin[month]}월:아국과 이미 선포중입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 7) { - $log[count($log)] = "●{$admin[month]}월:아국과 불가침중입니다. 선포 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 선포 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 선포 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 선포 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 선포 실패. <1>$date"; + } elseif($dip['state'] == 0) { + $log[count($log)] = "●{$admin['month']}월:아국과 이미 교전중입니다. 선포 실패. <1>$date"; + } elseif($dip['state'] == 1) { + $log[count($log)] = "●{$admin['month']}월:아국과 이미 선포중입니다. 선포 실패. <1>$date"; + } elseif($dip['state'] == 7) { + $log[count($log)] = "●{$admin['month']}월:아국과 불가침중입니다. 선포 실패. <1>$date"; } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:상대국이 외교 진행중입니다. 선포 실패. <1>$date"; - } elseif(!isClose($connect, $nation[nation], $younation[nation])) { - $log[count($log)] = "●{$admin[month]}월:인접하지 않았습니다. 선포 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:상대국이 외교 진행중입니다. 선포 실패. <1>$date"; + } elseif(!isClose($connect, $nation['nation'], $younation['nation'])) { + $log[count($log)] = "●{$admin['month']}월:인접하지 않았습니다. 선포 실패. <1>$date"; } elseif($admin['year'] <= $admin['startyear']) { - $log[count($log)] = "●{$admin[month]}월:초반제한 해제 2년전부터 가능합니다. 선포 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:초반제한 해제 2년전부터 가능합니다. 선포 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 선전 포고 했습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 선전 포고 했습니다.<1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $younation[name]선전 포고 하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【선포】$nation[name](이)가 $younation[name]에 선전 포고 하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name]에 선전 포고"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $younation[name]에 선전 포고"); - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 선전 포고"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $younation['name']선전 포고 하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【선포】$nation['name'](이)가 $younation['name']에 선전 포고 하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$younation['name']에 선전 포고"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $younation['name']에 선전 포고"); + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 선전 포고"); //외교 변경 - $query = "update diplomacy set state='1',term='24' where me='$nation[nation]' and you='$younation[nation]'"; + $query = "update diplomacy set state='1',term='24' where me='$nation['nation']' and you='$younation['nation']'"; MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - $query = "update diplomacy set state='1',term='24' where me='$younation[nation]' and you='$nation[nation]'"; + $query = "update diplomacy set state='1',term='24' where me='$younation['nation']' and you='$nation['nation']'"; MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name]에 선전포고"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$nation[name]에서 선전포고"; + $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name']에 선전포고"; + $youmsg = "【외교】$admin['year']년 $admin['month']월:$nation['name']에서 선전포고"; - PushMsg(2, $nation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $youmsg); + PushMsg(2, $nation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $msg); + PushMsg(3, $younation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $youmsg); } pushHistory($connect, $history); @@ -4532,43 +4532,43 @@ function process_62($connect, &$general) { } function process_63($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 종전 제의 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 종전 제의 서신을 보냈습니다. <1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 상대에게 발송 //먼저 삭제된 칸 중 가장 오래된 칸 찾음 @@ -4578,15 +4578,15 @@ function process_63($connect, &$general) { } //기존 메세지 한칸씩 뒤로 미룸 for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation['nation']); } //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; + $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + $query = "update nation set dip0='{$nation['name']}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4594,43 +4594,43 @@ function process_63($connect, &$general) { } function process_64($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; + if($younation['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:멸망한 국가입니다. 제의 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 제의 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 파기 제의 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 파기 제의 서신을 보냈습니다. <1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 상대에게 발송 //먼저 삭제된 칸 중 가장 오래된 칸 찾음 @@ -4640,15 +4640,15 @@ function process_64($connect, &$general) { } //기존 메세지 한칸씩 뒤로 미룸 for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); + moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation['nation']); } //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; + $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; + $query = "update nation set dip0='{$nation['name']}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4656,25 +4656,25 @@ function process_64($connect, &$general) { } function process_65($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select city from city where nation='$general[nation]'"; + $query = "select city from city where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); - $query = "select nation,capital,name,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,capital,name,surlimit,history,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation,pop,gen1,gen2,gen3 from city where city='$which'"; @@ -4682,43 +4682,43 @@ function process_65($connect, &$general) { $destcity = MYDB_fetch_array($result); //아국이 외교중(교전, 선포, 합병, 통합 // 즉 !통상, !불가침)일때 - $query = "select state from diplomacy where me='$nation[nation]' and (state!='2' and state!='7')"; + $query = "select state from diplomacy where me='$nation['nation']' and (state!='2' and state!='7')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 초토화 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 초토화 실패. <1>$date"; - } elseif($nation[capital] == $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도입니다. 초토화 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 초토화 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 초토화 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 초토화 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 초토화 실패. <1>$date"; + } elseif($nation['capital'] == $destcity['city']) { + $log[count($log)] = "●{$admin['month']}월:수도입니다. 초토화 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 초토화 실패. <1>$date"; + } elseif($destcity['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 영토가 아닙니다. 초토화 실패. <1>$date"; } elseif($citycount <= 4) { - $log[count($log)] = "●{$admin[month]}월:더이상 물러날 수 없습니다. 초토화 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:더이상 물러날 수 없습니다. 초토화 실패. <1>$date"; } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:평시에만 가능합니다. 초토화 실패. <1>$date"; - } elseif($nation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:제한 턴이 있습니다. 초토화 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:평시에만 가능합니다. 초토화 실패. <1>$date"; + } elseif($nation['surlimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:제한 턴이 있습니다. 초토화 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 초토화했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 초토화했습니다. <1>$date"; $exp = 5; $ded = 5; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]초토화를 명령하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【초토화】$nation[name](이)가 $destcity[name](을)를 초토화하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]초토화를 명령"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]초토화를 명령"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']초토화를 명령하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【초토화】$nation['name'](이)가 $destcity['name'](을)를 초토화하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']초토화를 명령"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name']초토화를 명령"); //외교제한 24 - $amount = round($destcity[pop] * 0.1); - $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; + $amount = round($destcity['pop'] * 0.1); + $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //직위해제 @@ -4726,15 +4726,15 @@ function process_65($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //성 공백지로 - $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='$destcity[city]'"; + $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //전장수 10% 삭감 - $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='$general[nation]'"; + $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4746,31 +4746,31 @@ function process_65($connect, &$general) { function process_66($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $dist = distance($connect, $nation[capital], 1); - $amount = $admin[develcost] * 10; + $dist = distance($connect, $nation['capital'], 1); + $amount = $admin['develcost'] * 10; - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 66) { $term = floor($code/100) + 1; $code = $term * 100 + 66; @@ -4779,45 +4779,45 @@ function process_66($connect, &$general) { $code = 100 + 66; } - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 천도 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 천도 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 천도 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 천도 실패. <1>$date"; - } elseif($dist[$destcity[city]] != 1) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. 천도 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 천도 실패. <1>$date"; - } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { - $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 천도 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 천도 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 천도 실패. <1>$date"; + } elseif($city['supply'] == 0) { + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 천도 실패. <1>$date"; + } elseif($destcity['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 영토가 아닙니다. 천도 실패. <1>$date"; + } elseif($dist[$destcity['city']] != 1) { + $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. 천도 실패. <1>$date"; + } elseif($nation['capset'] == 1) { + $log[count($log)] = "●{$admin['month']}월:다음 분기에 가능합니다. 천도 실패. <1>$date"; + } elseif($nation['gold']-$_basegold < $amount || $nation['rice']-$_baserice < $amount) { + $log[count($log)] = "●{$admin['month']}월:물자가 부족합니다. 천도 실패. <1>$date"; } elseif($term < 3) { - $log[count($log)] = "●{$admin[month]}월:천도중... ({$term}/3) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:천도중... ({$term}/3) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 천도했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 천도했습니다. <1>$date"; $exp = 15; $ded = 15; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](으)로 천도를 명령하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【천도】$nation[name](이)가 $destcity[name](으)로 천도하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](으)로 천도 명령"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](으)로 천도 명령"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](으)로 천도를 명령하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【천도】$nation['name'](이)가 $destcity['name'](으)로 천도하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](으)로 천도 명령"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](으)로 천도 명령"); //수도 변경 - $query = "update nation set l{$general[level]}term='0',capital='$destcity[city]',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term='0',capital='$destcity['city']',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4829,30 +4829,30 @@ function process_66($connect, &$general) { function process_67($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation,level from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $amount = $admin[develcost] * 500 + 60000; // 7만~13만 + $amount = $admin['develcost'] * 500 + 60000; // 7만~13만 - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 67) { $term = floor($code/100) + 1; $code = $term * 100 + 67; @@ -4861,49 +4861,49 @@ function process_67($connect, &$general) { $code = 100 + 67; } - if($nation[capital] != $general[city]) { - $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 증축 실패. <1>$date"; - } elseif($nation[capital] != $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 증축 실패. <1>$date"; - } elseif($destcity[level] <= 3) { - $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 증축 실패. <1>$date"; - } elseif($destcity[level] >= 8) { - $log[count($log)] = "●{$admin[month]}월:더이상 증축할 수 없습니다. 증축 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 증축 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 증축 실패. <1>$date"; - } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { - $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 증축 실패. <1>$date"; + if($nation['capital'] != $general['city']) { + $log[count($log)] = "●{$admin['month']}월:수도에서 실행해야 합니다. 증축 실패. <1>$date"; + } elseif($nation['capital'] != $destcity['city']) { + $log[count($log)] = "●{$admin['month']}월:수도만 가능합니다. 증축 실패. <1>$date"; + } elseif($destcity['level'] <= 3) { + $log[count($log)] = "●{$admin['month']}월:수진, 진, 관문은 불가능합니다. 증축 실패. <1>$date"; + } elseif($destcity['level'] >= 8) { + $log[count($log)] = "●{$admin['month']}월:더이상 증축할 수 없습니다. 증축 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 증축 실패. <1>$date"; + } elseif($nation['capset'] == 1) { + $log[count($log)] = "●{$admin['month']}월:다음 분기에 가능합니다. 증축 실패. <1>$date"; + } elseif($nation['gold']-$_basegold < $amount || $nation['rice']-$_baserice < $amount) { + $log[count($log)] = "●{$admin['month']}월:물자가 부족합니다. 증축 실패. <1>$date"; } elseif($term < 6) { - $log[count($log)] = "●{$admin[month]}월:증축중... ({$term}/6) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:증축중... ({$term}/6) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 증축했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 증축했습니다. <1>$date"; $exp = 5 * 6; $ded = 5 * 6; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 증축하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【증축】$nation[name](이)가 $destcity[name](을)를 증축하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 증축"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 증축"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](을)를 증축하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【증축】$nation['name'](이)가 $destcity['name'](을)를 증축하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](을)를 증축"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 증축"); //물자 감소 - $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수도 증축 - $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='$destcity[city]'"; + $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4915,30 +4915,30 @@ function process_67($connect, &$general) { function process_68($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation,level,pop,agri,comm,def,wall,secu,upgrading from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $amount = $admin[develcost] * 500 + 30000; // 4만~10만 + $amount = $admin['develcost'] * 500 + 30000; // 4만~10만 - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 68) { $term = floor($code/100) + 1; $code = $term * 100 + 68; @@ -4947,51 +4947,51 @@ function process_68($connect, &$general) { $code = 100 + 68; } - if($nation[capital] != $general[city]) { - $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 감축 실패. <1>$date"; - } elseif($nation[capital] != $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 감축 실패. <1>$date"; - } elseif($destcity[level] <= 3) { - $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 감축 실패. <1>$date"; - } elseif($destcity[level] <= 6) { - $log[count($log)] = "●{$admin[month]}월:더이상 감축할 수 없습니다. 감축 실패. <1>$date"; - } elseif($destcity[upgrading] <= 0) { - $log[count($log)] = "●{$admin[month]}월:증축된 도시가 아닙니다. 감축 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 감축 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 감축 실패. <1>$date"; -// } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { -// $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 감축 실패. <1>$date"; + if($nation['capital'] != $general['city']) { + $log[count($log)] = "●{$admin['month']}월:수도에서 실행해야 합니다. 감축 실패. <1>$date"; + } elseif($nation['capital'] != $destcity['city']) { + $log[count($log)] = "●{$admin['month']}월:수도만 가능합니다. 감축 실패. <1>$date"; + } elseif($destcity['level'] <= 3) { + $log[count($log)] = "●{$admin['month']}월:수진, 진, 관문은 불가능합니다. 감축 실패. <1>$date"; + } elseif($destcity['level'] <= 6) { + $log[count($log)] = "●{$admin['month']}월:더이상 감축할 수 없습니다. 감축 실패. <1>$date"; + } elseif($destcity['upgrading'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:증축된 도시가 아닙니다. 감축 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 감축 실패. <1>$date"; + } elseif($nation['capset'] == 1) { + $log[count($log)] = "●{$admin['month']}월:다음 분기에 가능합니다. 감축 실패. <1>$date"; +// } elseif($nation['gold']-$_basegold < $amount || $nation['rice']-$_baserice < $amount) { +// $log[count($log)] = "●{$admin['month']}월:물자가 부족합니다. 감축 실패. <1>$date"; } elseif($term < 6) { - $log[count($log)] = "●{$admin[month]}월:감축중... ({$term}/6) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:감축중... ({$term}/6) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 감축했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 감축했습니다. <1>$date"; $exp = 5 * 6; $ded = 5 * 6; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 감축하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【감축】$nation[name](이)가 $destcity[name](을)를 감축하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 감축"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 감축"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](을)를 감축하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【감축】$nation['name'](이)가 $destcity['name'](을)를 감축하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](을)를 감축"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 감축"); //물자 증가 - $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $pop = $destcity[pop] - 100000; - $agri = $destcity[agri] - 2000; - $comm = $destcity[comm] - 2000; - $def = $destcity[def] - 2000; - $wall = $destcity[wall] - 2000; - $secu = $destcity[secu] - 2000; + $pop = $destcity['pop'] - 100000; + $agri = $destcity['agri'] - 2000; + $comm = $destcity['comm'] - 2000; + $def = $destcity['def'] - 2000; + $wall = $destcity['wall'] - 2000; + $secu = $destcity['secu'] - 2000; if($pop < 30000) { $pop = 30000; } if($agri < 0) { $agri = 0; } if($comm < 0) { $comm = 0; } @@ -4999,11 +4999,11 @@ function process_68($connect, &$general) { if($wall < 0) { $wall = 0; } if($secu < 0) { $secu = 0; } //수도 감축 - $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='$destcity[city]'"; + $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5015,25 +5015,25 @@ function process_68($connect, &$general) { function process_71($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $query = "select no from diplomacy where me='$general['nation']' and state=0"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5043,7 +5043,7 @@ function process_71($connect, &$general) { $term2 = 3; $term3 = round(sqrt($genCount*8)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 71) { $term = floor($code/100) + 1; $code = $term * 100 + 71; @@ -5052,57 +5052,57 @@ function process_71($connect, &$general) { $code = 100 + 71; } - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 필사즉생 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 필사즉생 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 필사즉생 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 필사즉생 실패. <1>$date"; } elseif($dipCount == 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 필사즉생 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 필사즉생 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:전쟁중이 아닙니다. 필사즉생 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 필사즉생 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:필사즉생 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:필사즉생 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:필사즉생 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:필사즉생 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 필사즉생(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 필사즉생(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 필사즉생(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:필사즉생(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 필사즉생(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 필사즉생(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 필사즉생(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 필사즉생(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:필사즉생(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 필사즉생(을)를 발동"); //전장수 훈사100 - $query = "update general set atmos=100,train=100 where nation='$general[nation]'"; + $query = "update general set atmos=100,train=100 where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5115,32 +5115,32 @@ function process_71($connect, &$general) { function process_72($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select no from diplomacy where me='$general[nation]' and state=0"; + $query = "select no from diplomacy where me='$general['nation']' and state=0"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5150,7 +5150,7 @@ function process_72($connect, &$general) { $term2 = 1; $term3 = round(sqrt($genCount*4)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 72) { $term = floor($code/100) + 1; $code = $term * 100 + 72; @@ -5159,59 +5159,59 @@ function process_72($connect, &$general) { $code = 100 + 72; } - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 백성동원 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 백성동원 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 백성동원 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 백성동원 실패. <1>$date"; } elseif($dipCount == 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 백성동원 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 백성동원 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 도시만 가능합니다. 백성동원 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:전쟁중이 아닙니다. 백성동원 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 백성동원 실패. <1>$date"; + } elseif($destcity['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국 도시만 가능합니다. 백성동원 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:백성동원 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:백성동원 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:백성동원 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:백성동원 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]백성동원(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]백성동원(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']백성동원(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name']백성동원(을)를 발동"); //도시 성수 80% - $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='$destcity[city]'"; + $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5224,36 +5224,36 @@ function process_72($connect, &$general) { function process_73($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$destcity[nation]'"; + $query = "select nation,name,history from nation where nation='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5263,7 +5263,7 @@ function process_73($connect, &$general) { $term2 = 3; $term3 = round(sqrt($genCount*4)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 73) { $term = floor($code/100) + 1; $code = $term * 100 + 73; @@ -5272,71 +5272,71 @@ function process_73($connect, &$general) { $code = 100 + 73; } - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 수몰 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 수몰 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. 수몰 실패. <1>$date"; - } elseif($destcity[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 수몰 실패. <1>$date"; - } elseif($dip[state] > 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중인 상대국에만 가능합니다. 수몰 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 수몰 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 수몰 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 수몰 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. 수몰 실패. <1>$date"; + } elseif($destcity['nation'] == $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:대상도시가 아국입니다. 수몰 실패. <1>$date"; + } elseif($dip['state'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전쟁중인 상대국에만 가능합니다. 수몰 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 수몰 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:수몰 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:수몰 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:수몰 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:수몰 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destcity[nation]'"; + $query = "select no,name from general where nation='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$destcity[name]수몰이 발동되었습니다."; + $alllog[0] = "$destcity['name']수몰이 발동되었습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]수몰(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]수몰(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]수몰(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']수몰(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']$destcity['name']수몰(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']수몰(을)를 발동"); //도시 성수 80% 감소 - $query = "update city set def=def*0.2,wall=wall*0.2 where city='$destcity[city]'"; + $query = "update city set def=def*0.2,wall=wall*0.2 where city='$destcity['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5349,36 +5349,36 @@ function process_73($connect, &$general) { function process_74($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select city,name,nation from city where city='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$destcity[nation]'"; + $query = "select nation,name,history from nation where nation='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5388,7 +5388,7 @@ function process_74($connect, &$general) { $term2 = 2; $term3 = round(sqrt($genCount*4)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 74) { $term = floor($code/100) + 1; $code = $term * 100 + 74; @@ -5397,58 +5397,58 @@ function process_74($connect, &$general) { $code = 100 + 74; } - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 허보 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 허보 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. 허보 실패. <1>$date"; - } elseif($destcity[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 허보 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 허보 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 허보 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 허보 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 허보 실패. <1>$date"; + } elseif($destcity['nation'] == 0) { + $log[count($log)] = "●{$admin['month']}월:공백지입니다. 허보 실패. <1>$date"; + } elseif($destcity['nation'] == $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:대상도시가 아국입니다. 허보 실패. <1>$date"; + } elseif($dip['state'] > 1) { + $log[count($log)] = "●{$admin['month']}월:선포,전쟁중인 상대국에만 가능합니다. 허보 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 허보 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:허보 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:허보 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:허보 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:허보 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]허보(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]허보(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]허보(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']허보(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']$destcity['name']허보(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']허보(을)를 발동"); //상대국 도시 전부 검색 - $query = "select city from city where nation='$destcity[nation]' and supply=1"; + $query = "select city from city where nation='$destcity['nation']' and supply=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); for($i=0; $i < $cityCount; $i++) { $dCity = MYDB_fetch_array($result); - $citys[$i] = $dCity[city]; + $citys[$i] = $dCity['city']; } //상대국 유저 랜덤 배치 - $query = "select no,name from general where nation='$destcity[nation]' and city='$destcity[city]'"; + $query = "select no,name from general where nation='$destcity['nation']' and city='$destcity['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); $opplog[0] = "●상대국의 허보에 당했다! <1>$date"; @@ -5456,24 +5456,24 @@ function process_74($connect, &$general) { $gen = MYDB_fetch_array($result); $selCity = $citys[rand() % $cityCount]; //현재도시이면 한번 다시 랜덤추첨 - if($selCity == $destcity[city]) { $selCity = $citys[rand() % $cityCount]; } + if($selCity == $destcity['city']) { $selCity = $citys[rand() % $cityCount]; } - $query = "update general set city={$selCity} where no='$gen[no]'"; + $query = "update general set city={$selCity} where no='$gen['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($gen, $opplog); } // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5486,32 +5486,32 @@ function process_74($connect, &$general) { function process_75($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,history from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $query = "select state from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5521,7 +5521,7 @@ function process_75($connect, &$general) { $term2 = 3; $term3 = round(sqrt($genCount*2)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 75) { $term = floor($code/100) + 1; $code = $term * 100 + 75; @@ -5531,39 +5531,39 @@ function process_75($connect, &$general) { } if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 피장파장 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 피장파장 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 피장파장 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 피장파장 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 피장파장 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 국가입니다. 피장파장 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 피장파장 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 피장파장 실패. <1>$date"; + } elseif($dip['state'] > 1) { + $log[count($log)] = "●{$admin['month']}월:선포,전쟁중인 상대국에만 가능합니다. 피장파장 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 피장파장 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:피장파장 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:피장파장 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:피장파장 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:피장파장 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation[nation]'"; + $query = "select no,name from general where nation='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 피장파장이 발동되었습니다."; @@ -5572,28 +5572,28 @@ function process_75($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]피장파장(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]피장파장(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 피장파장(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']피장파장(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']피장파장(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 피장파장(을)를 발동"); //전략기한+60 - $query = "update nation set tricklimit=tricklimit+60 where nation='$destnation[nation]'"; + $query = "update nation set tricklimit=tricklimit+60 where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한, 최소72 if($term3 < 72) { $term3 = 72; } - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5606,21 +5606,21 @@ function process_75($connect, &$general) { function process_76($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select startyear,year,month,develcost,npccount,turnterm from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5630,7 +5630,7 @@ function process_76($connect, &$general) { $term2 = 3; $term3 = round(sqrt($genCount*10)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 76) { $term = floor($code/100) + 1; $code = $term * 100 + 76; @@ -5639,55 +5639,55 @@ function process_76($connect, &$general) { $code = 100 + 76; } - if($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 의병모집 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 의병모집 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 의병모집 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 의병모집 실패. <1>$date"; + if($admin['year'] < $admin['startyear']+3) { + $log[count($log)] = "●{$admin['month']}월:현재 초반 제한중입니다. 의병모집 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 의병모집 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 의병모집 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 의병모집 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:의병모집 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:의병모집 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:의병모집 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:의병모집 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 의병모집(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 의병모집(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 의병모집(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:의병모집(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 의병모집(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 의병모집(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 의병모집(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 의병모집(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:의병모집(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 의병모집(을)를 발동"); $query = "select avg(gennum) as gennum from nation"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $avgNation = MYDB_fetch_array($result); - $gencount = 5 + round($avgNation[gennum] / 10); + $gencount = 5 + round($avgNation['gennum'] / 10); - $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; + $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $avgGen = MYDB_fetch_array($result); //의병추가 $npc = 4; - $npcid = $admin[npccount]; + $npcid = $admin['npccount']; for($i=0; $i < $gencount; $i++) { // 무장 40%, 지장 40%, 무지장 20% $type = rand() % 10; @@ -5709,18 +5709,18 @@ function process_76($connect, &$general) { break; } // 국내 최고능치 기준으로 랜덤성 스케일링 - if($avgGen[lpi] > 210) { - $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); - } elseif($avgGen[lpi] > 180) { - $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); + if($avgGen['lpi'] > 210) { + $leader = round($leader * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + $power = round($power * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (60+rand()%31)/100); + } elseif($avgGen['lpi'] > 180) { + $leader = round($leader * $avgGen['lpi'] / 150 * (75+rand()%21)/100); + $power = round($power * $avgGen['lpi'] / 150 * (75+rand()%21)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (75+rand()%21)/100); } else { - $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); + $leader = round($leader * $avgGen['lpi'] / 150 * (90+rand()%11)/100); + $power = round($power * $avgGen['lpi'] / 150 * (90+rand()%11)/100); + $intel = round($intel * $avgGen['lpi'] / 150 * (90+rand()%11)/100); } $over1 = 0; $over2 = 0; @@ -5761,10 +5761,10 @@ function process_76($connect, &$general) { $pw = md5("18071807"); $name = "ⓖ의병장{$npcid}"; $picture = 'default.jpg'; - $turntime = getRandTurn($admin[turnterm]); + $turntime = getRandTurn($admin['turnterm']); $personal = rand() % 10; - $bornyear = $admin[year]; - $deadyear = $admin[year] + 3; + $bornyear = $admin['year']; + $deadyear = $admin['year'] + 3; $killturn = 64 + rand()%7; @MYDB_query(" @@ -5776,10 +5776,10 @@ function process_76($connect, &$general) { makelimit,bornyear,deadyear, dex0, dex10, dex20, dex30, dex40 ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation[nation]', - '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', + '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation['nation']', + '$general['city']','$leader','$power','$intel','$avgGen['exp']','$avgGen['ded']', '1','100','100','0','0','0','0','0', - '0','0','0','$turntime','$killturn','$avgGen[age]','1','$personal','0','0','0','0','', + '0','0','0','$turntime','$killturn','$avgGen['age']','1','$personal','0','0','0','0','', '0','$bornyear','$deadyear', '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' )", @@ -5793,22 +5793,22 @@ function process_76($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한, 국가 기술력 그대로 - $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5821,32 +5821,32 @@ function process_76($connect, &$general) { function process_77($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,history from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $query = "select state,term from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5854,7 +5854,7 @@ function process_77($connect, &$general) { $term2 = 1; $term3 = round(sqrt($genCount*16)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 77) { $term = floor($code/100) + 1; $code = $term * 100 + 77; @@ -5864,39 +5864,39 @@ function process_77($connect, &$general) { } if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 이호경식 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 이호경식 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 이호경식 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 이호경식 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 이호경식 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 국가입니다. 이호경식 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 이호경식 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 이호경식 실패. <1>$date"; + } elseif($dip['state'] > 1) { + $log[count($log)] = "●{$admin['month']}월:선포,전쟁중인 상대국에만 가능합니다. 이호경식 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 이호경식 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:이호경식 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:이호경식 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:이호경식 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:이호경식 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation[nation]'"; + $query = "select no,name from general where nation='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 이호경식이 발동되었습니다."; @@ -5905,32 +5905,32 @@ function process_77($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]이호경식(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]이호경식(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 이호경식(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']이호경식(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']이호경식(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 이호경식(을)를 발동"); //선포+3개월 - if($dip[state] == 0) { - $query = "update diplomacy set state=1,term=3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + if($dip['state'] == 0) { + $query = "update diplomacy set state=1,term=3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update diplomacy set term=term+3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + $query = "update diplomacy set term=term+3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5943,32 +5943,32 @@ function process_77($connect, &$general) { function process_78($connect, &$general) { global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general[city]'"; + $query = "select nation,supply from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $query = "select nation,name,history from nation where nation='$which'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; + $query = "select state,term from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5976,7 +5976,7 @@ function process_78($connect, &$general) { $term2 = 1; $term3 = round(sqrt($genCount*16)*10); - $code = $nation["l{$general[level]}term"]; + $code = $nation["l{$general['level']}term"]; if($code%100 == 78) { $term = floor($code/100) + 1; $code = $term * 100 + 78; @@ -5986,41 +5986,41 @@ function process_78($connect, &$general) { } if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 급습 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 급습 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 급습 실패. <1>$date"; - } elseif($dip[state] != 1) { - $log[count($log)] = "●{$admin[month]}월:선포중인 상대국에만 가능합니다. 급습 실패. <1>$date"; - } elseif($dip[term] < 12) { - $log[count($log)] = "●{$admin[month]}월:선포 12개월 이상인 상대국에만 가능합니다. 급습 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 급습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:없는 국가입니다. 급습 실패. <1>$date"; + } elseif($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 급습 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 급습 실패. <1>$date"; + } elseif($dip['state'] != 1) { + $log[count($log)] = "●{$admin['month']}월:선포중인 상대국에만 가능합니다. 급습 실패. <1>$date"; + } elseif($dip['term'] < 12) { + $log[count($log)] = "●{$admin['month']}월:선포 12개월 이상인 상대국에만 가능합니다. 급습 실패. <1>$date"; + } elseif($nation['tricklimit'] > 0) { + $log[count($log)] = "●{$admin['month']}월:전략기한이 남았습니다. 급습 실패. <1>$date"; } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:급습 수행중... ({$term}/{$term2}) <1>$date"; + $log[count($log)] = "●{$admin['month']}월:급습 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; + $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin[month]}월:급습 발동! <1>$date"; + $log[count($log)] = "●{$admin['month']}월:급습 발동! <1>$date"; $exp = 5 * $term2; $ded = 5 * $term2; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; + $alllog[0] = "$general['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation[nation]'"; + $query = "select no,name from general where nation='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 급습이 발동되었습니다."; @@ -6029,27 +6029,27 @@ function process_78($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]급습(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]급습(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 급습(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']급습(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']급습(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 급습(을)를 발동"); //선포-3개월 - $query = "update diplomacy set term=term-3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; + $query = "update diplomacy set term=term-3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } + if($nation['type'] == 11) { $term3 = round($term3 / 2); } + if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; + $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -6060,61 +6060,61 @@ function process_78($connect, &$general) { } function process_81($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation from city where city='$general[city]'"; + $query = "select nation from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,colset,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; + $query = "select nation,colset,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($nation["l{$general[level]}turn0"]); + $command = DecodeCommand($nation["l{$general['level']}turn0"]); $which = $command[1]; $colors = GetNationColors(); if($which >= count($colors)) { $which = 0; } $color = $colors[$which]; - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 국기변경 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 국기변경 실패. <1>$date"; - } elseif($nation[colset] <= 0) { - $log[count($log)] = "●{$admin[month]}월:더이상 변경이 불가능합니다. 국기변경 실패. <1>$date"; + if($city['nation'] != $general['nation']) { + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. 국기변경 실패. <1>$date"; + } elseif($general['level'] < 5) { + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. 국기변경 실패. <1>$date"; + } elseif($nation['colset'] <= 0) { + $log[count($log)] = "●{$admin['month']}월:더이상 변경이 불가능합니다. 국기변경 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin[month]}월:국기를 변경합니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:국기를 변경합니다. <1>$date"; $exp = 10; $ded = 10; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; + $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $genlog[0] = "$general[name](이)가 국기를 변경합니다."; + $genlog[0] = "$general['name'](이)가 국기를 변경합니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); } - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 국기를 변경하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【국기변경】$nation[name](이)가 국기를 변경하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:국기를 변경"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 국기를 변경"); + $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 국기를 변경하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【국기변경】$nation['name'](이)가 국기를 변경하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:국기를 변경"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 국기를 변경"); //국기변경 - $query = "update nation set color='$color',colset=colset-1 where nation='$nation[nation]'"; + $query = "update nation set color='$color',colset=colset-1 where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -6124,22 +6124,22 @@ function process_81($connect, &$general) { } function process_99($connect, &$general) { - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $log[count($log)] = "●{$admin[month]}월:아직 구현되지 않았습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아직 구현되지 않았습니다. <1>$date"; $exp = 100; // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); + $exp = CharExperience($exp, $general['personal']); + $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); diff --git a/twe/func_string.php b/twe/func_string.php index 4bc7aa2a..489c767d 100644 --- a/twe/func_string.php +++ b/twe/func_string.php @@ -40,6 +40,7 @@ function BadTag2Code($str) { function tab($str, $maxsize, $ch) { $size = strlen($str); + $string = ''; $count = ($maxsize - $size) / 2; for($i=0; $i < $count; $i++) { @@ -55,6 +56,7 @@ function tab($str, $maxsize, $ch) { function tab2($str, $maxsize, $ch) { $size = strlen($str); + $string = ''; $count = ($maxsize - $size); for($i=0; $i < $count; $i++) { diff --git a/twe/func_tournament.php b/twe/func_tournament.php index 569fc988..3f99f3a5 100644 --- a/twe/func_tournament.php +++ b/twe/func_tournament.php @@ -6,15 +6,15 @@ function processTournament($connect) { $admin = MYDB_fetch_array($result); //수동일땐 무시 - if($admin[tnmt_auto] == 0) { return; } + if($admin['tnmt_auto'] == 0) { return; } - $type = $admin[tnmt_type]; - $tnmt = $admin[tournament]; - $phase = $admin[phase]; + $type = $admin['tnmt_type']; + $tnmt = $admin['tournament']; + $phase = $admin['phase']; //현시간이 스탬프 지나친경우 - if($admin[offset] >= 0) { - switch($admin[tnmt_auto]) { + if($admin['offset'] >= 0) { + switch($admin['tnmt_auto']) { case 1: $unit = 720; break; case 2: $unit = 420; break; case 3: $unit = 180; break; @@ -25,7 +25,7 @@ function processTournament($connect) { } //업데이트 횟수 - $iter = floor($admin[offset] / $unit) + 1; + $iter = floor($admin['offset'] / $unit) + 1; for($i=0; $i < $iter; $i++) { switch($tnmt) { @@ -77,15 +77,15 @@ function processTournament($connect) { $betTerm = $unit * 60; if($betTerm > 3600) { $betTerm = 3600; } //처리 초 더한 날짜 - $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i + $betTerm); + $dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i + $betTerm); $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time='$dt' where no=1"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); return; } - if($admin[tnmt_auto] == 1) { + if($admin['tnmt_auto'] == 1) { //처리 초 더한 날짜 - $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i); + $dt = date("Y-m-d H:i:s", strtotime($admin['tnmt_time']) + $unit * $i); $hr = substr($dt, 11, 2); //지정시간대 넘어가면 중단 20~24시 if($hr < 20) { @@ -108,7 +108,7 @@ function getTournamentTerm($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - switch($admin[tnmt_auto]) { + switch($admin['tnmt_auto']) { case 1: $str = "경기당 12분"; break; case 2: $str = "경기당 7분"; break; case 3: $str = "경기당 3분"; break; @@ -125,8 +125,8 @@ function getTournamentTime($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $tnmt = $admin[tournament]; - $dt = substr($admin[tnmt_time], 11, 5); + $tnmt = $admin['tournament']; + $dt = substr($admin['tnmt_time'], 11, 5); switch($tnmt) { case 1: $tnmt = "개막시간 {$dt}"; break; case 2: $tnmt = "다음경기 {$dt}"; break; @@ -282,13 +282,13 @@ function fillLowGenAll($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $general[no] = 0; - $general[name] = "무명장수"; - $general[npc] = 2; - $general[leader] = 10; - $general[power] = 10; - $general[intel] = 10; - $general[explevel] = 10; + $general['no'] = 0; + $general['name'] = "무명장수"; + $general['npc'] = 2; + $general['leader'] = 10; + $general['power'] = 10; + $general['intel'] = 10; + $general['explevel'] = 10; for($i=0; $i < 8; $i++) { $query = "select grp from tournament where grp='$i'"; @@ -297,7 +297,7 @@ function fillLowGenAll($connect) { } //자동신청하고, 돈 있고, 아직 참가 안한 장수 - $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='$admin[develcost]' order by rand() limit 0,64"; + $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='$admin['develcost']' order by rand() limit 0,64"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); @@ -312,14 +312,14 @@ function fillLowGenAll($connect) { if($genCount > 0) { $genCount--; $gen = MYDB_fetch_array($result); - $query = "update general set gold=gold-'$admin[develcost]',tournament='1' where no='$gen[no]'"; + $query = "update general set gold=gold-'$admin['develcost']',tournament='1' where no='$gen['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$gen[no]', '$gen[npc]', '$gen[name]', '$gen[leader]', '$gen[power]', '$gen[intel]', '$gen[explevel]', '$i', '$grpCount[$i]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$gen['no']', '$gen['npc']', '$gen['name']', '$gen['leader']', '$gen['power']', '$gen['intel']', '$gen['explevel']', '$i', '$grpCount[$i]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //자동신청 장수 없으면 무명장수 } else { - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$i', '$grpCount[$i]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$i', '$grpCount[$i]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $grpCount[$i]++; @@ -396,7 +396,7 @@ function qualify($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($k=1; $k <= 4; $k++) { $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; + $query = "update tournament set prmt='$k' where grp='$gen['grp']' and grp_no='$gen['grp_no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -431,10 +431,10 @@ function selection($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); //본선에 추가 - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //시드 삭제 - $query = "update tournament set prmt=0 where grp='$general[grp]' and grp_no='$general[grp_no]'"; + $query = "update tournament set prmt=0 where grp='$general['grp']' and grp_no='$general['grp_no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($phase < 31) { @@ -473,7 +473,7 @@ function finallySingle($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($k=1; $k <= 2; $k++) { $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; + $query = "update tournament set prmt='$k' where grp='$gen['grp']' and grp_no='$gen['grp_no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -499,7 +499,7 @@ function final16set($connect) { //16강에 추가 $newGrp = 20 + floor($i / 2); $newGrp_no = $i % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $query = "update tournament set prmt=0"; @@ -529,7 +529,7 @@ function finalFight($connect, $tnmt_type, $tnmt, $phase, $type) { //x강에 추가 $newGrp = floor($phase / 2) + $offset + 10; $newGrp_no = $phase % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($phase >= $turn) { @@ -551,71 +551,71 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { } //16강자 명성 돈 - $cost = $admin[develcost]; + $cost = $admin['develcost']; $query = "select no,name from tournament where grp>=20 and grp<30"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; + $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 - $genNo[$i] = $general[no]; - $genName[$i] = $general[name]; - $genGold[$general[no]] = $cost; - $genCall[$general[no]] = "16강 진출"; + $genNo[$i] = $general['no']; + $genName[$i] = $general['name']; + $genGold[$general['no']] = $cost; + $genCall[$general['no']] = "16강 진출"; } //8강자 명성 돈 - $cost = $admin[develcost] * 2; + $cost = $admin['develcost'] * 2; $query = "select no from tournament where grp>=30 and grp<40"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; + $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "8강 진출"; + $genGold[$general['no']] += $cost; + $genCall[$general['no']] = "8강 진출"; } //4강자 명성 돈 - $cost = $admin[develcost] * 3; + $cost = $admin['develcost'] * 3; $query = "select no from tournament where grp>=40 and grp<50"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; + $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "4강 진출"; + $genGold[$general['no']] += $cost; + $genCall[$general['no']] = "4강 진출"; } //결승자 명성 돈 - $cost = $admin[develcost] * 6; + $cost = $admin['develcost'] * 6; $query = "select no from tournament where grp>=50 and grp<60"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; + $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "준우승으"; + $genGold[$general['no']] += $cost; + $genCall[$general['no']] = "준우승으"; } //우승자 명성 돈 - $cost = $admin[develcost] * 8; + $cost = $admin['develcost'] * 8; $query = "select no from tournament where grp>=60"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='$general[no]'"; + $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "우승으"; + $genGold[$general['no']] += $cost; + $genCall[$general['no']] = "우승으"; } //우승자 이름 $query = "select no,name from tournament where grp=60"; @@ -631,24 +631,24 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //장수열전 기록 - $query = "select no,history from general where no={$general[no]}"; + $query = "select no,history from general where no={$general['no']}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen1 = MYDB_fetch_array($result); - $query = "select no,history from general where no={$general2[no]}"; + $query = "select no,history from general where no={$general2['no']}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen2 = MYDB_fetch_array($result); - $gen1 = addHistory($connect, $gen1, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 우승"); - $gen2 = addHistory($connect, $gen2, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 준우승"); + $gen1 = addHistory($connect, $gen1, "●{$admin['year']}년 {$admin['month']}월:{$tp} 대회에서 우승"); + $gen2 = addHistory($connect, $gen2, "●{$admin['year']}년 {$admin['month']}월:{$tp} 대회에서 준우승"); - $cost = $admin[develcost] * 20; - $cost2 = $admin[develcost] * 12; - $history[0] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회에서 {$general[name]}(이)가 우승, {$general2[name]}(이)가 준우승을 차지하여 천하에 이름을 떨칩니다!"; + $cost = $admin['develcost'] * 20; + $cost2 = $admin['develcost'] * 12; + $history[0] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회에서 {$general['name']}(이)가 우승, {$general2['name']}(이)가 준우승을 차지하여 천하에 이름을 떨칩니다!"; $history[1] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회의 우승자에게는 {$cost}, 준우승자에겐 {$cost2}의 상금과 약간의 명성이 주어집니다!"; pushHistory($connect, $history); for($i=0; $i < count($genNo); $i++) { - $general[no] = $genNo[$i]; - $general[name] = $genName[$i]; + $general['no'] = $genNo[$i]; + $general['name'] = $genName[$i]; $log[0] = "{$tp} 대회의 {$genCall[$genNo[$i]]}로 {$genGold[$genNo[$i]]}의 상금, 약간의 명성 획득!"; pushGenLog($general, $log); } @@ -658,15 +658,15 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); //16강 목록에서 검색 - $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='$general[no]'"; + $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='$general['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $no = ($general[grp] - 20) * 2 + $general[grp_no]; + $no = ($general['grp'] - 20) * 2 + $general['grp_no']; $query = "select bet{$no},bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $bet = @round($admin[bet] / $admin["bet{$no}"], 2); + $bet = @round($admin['bet'] / $admin["bet{$no}"], 2); //당첨칸에 베팅한 사람들만 $query = "select no,name,gold,bet{$no} as bet from general where bet{$no}>0"; @@ -674,9 +674,9 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $gen = MYDB_fetch_array($result); - $gold = round($gen[bet] * $bet); + $gold = round($gen['bet'] * $bet); //금 지급 - $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='$gen[no]'"; + $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='$gen['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //로그 $log[0] = "{$tp} 대회의 베팅 당첨으로 {$gold}의 금 획득!"; @@ -690,13 +690,13 @@ function setRefund($connect) { $admin = MYDB_fetch_array($result); //16강자 명성 돈 - $cost = $admin[develcost]; + $cost = $admin['develcost']; $query = "select no from tournament where grp<10"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set gold=gold+'$cost' where no='$general[no]'"; + $query = "update general set gold=gold+'$cost' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -736,60 +736,60 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($tnmt_type == 2) { $tp = "pwr"; $tp2 = "tp"; } elseif($tnmt_type == 3) { $tp = "itl"; $tp2 = "ti"; } - $e1 = $energy1 = round($gen1[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); - $e2 = $energy2 = round($gen2[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); + $e1 = $energy1 = round($gen1[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10); + $e2 = $energy2 = round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10); //아이템 로그 if($gen1[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getHorseName($gen1[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 갈기를 휘날립니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getHorseName($gen1[h])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 갈기를 휘날립니다!"; break; } } if($gen1[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getWeapName($gen1[w])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getWeapName($gen1[w])."(이)가 쥐어져 있습니다!"; break; } } if($gen1[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getBookName($gen1[b])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getBookName($gen1[b])."(이)가 쥐어져 있습니다!"; break; } } if($gen2[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getHorseName($gen2[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 갈기를 휘날립니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getHorseName($gen2[h])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 갈기를 휘날립니다!"; break; } } if($gen2[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getWeapName($gen2[w])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getWeapName($gen2[w])."(이)가 쥐어져 있습니다!"; break; } } if($gen2[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getBookName($gen2[b])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getBookName($gen2[b])."(이)가 쥐어져 있습니다!"; break; } } - $log[count($log)] = "{$gen1[name]} ({$energy1}) vs ({$energy2}) {$gen2[name]}"; + $log[count($log)] = "{$gen1['name']} ({$energy1}) vs ({$energy2}) {$gen2['name']}"; $gd1 = 0; $gd2 = 0; $phase = 0; $sel = 2; @@ -813,7 +813,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } - $log[count($log)] = "{$gen1[name]}의 분노의 {$str} 공격!"; + $log[count($log)] = "{$gen1['name']}의 분노의 {$str} 공격!"; } $ratio = rand() % 300; if($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) { @@ -823,24 +823,24 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } - $log[count($log)] = "{$gen2[name]}의 분노의 {$str} 공격!"; + $log[count($log)] = "{$gen2['name']}의 분노의 {$str} 공격!"; } //1합 승부 if($phase == 1) { $ratio = rand() % 400; if($gen1[$tp]*0.9 > $gen2[$tp] && $gen1[$tp] >= $ratio) { $damage1 = 0; $damage2 = $e2; - if ($tnmt_type == 0) { $log[count($log)] = "{$gen1[name]}의 압도!"; } - elseif($tnmt_type == 1) { $log[count($log)] = "{$gen1[name]}의 팔문금쇄진!"; } - elseif($tnmt_type == 2) { $log[count($log)] = "{$gen1[name]}의 일격 필살!"; } - elseif($tnmt_type == 3) { $log[count($log)] = "{$gen1[name]}의 모독 욕설!"; } + if ($tnmt_type == 0) { $log[count($log)] = "{$gen1['name']}의 압도!"; } + elseif($tnmt_type == 1) { $log[count($log)] = "{$gen1['name']}의 팔문금쇄진!"; } + elseif($tnmt_type == 2) { $log[count($log)] = "{$gen1['name']}의 일격 필살!"; } + elseif($tnmt_type == 3) { $log[count($log)] = "{$gen1['name']}의 모독 욕설!"; } } if($gen2[$tp]*0.9 > $gen1[$tp] && $gen2[$tp] >= $ratio) { $damage2 = 0; $damage1 = $e1; - if ($tnmt_type == 0) { $log[count($log)] = "{$gen2[name]}의 압도!"; } - elseif($tnmt_type == 1) { $log[count($log)] = "{$gen2[name]}의 팔문금쇄진!"; } - elseif($tnmt_type == 2) { $log[count($log)] = "{$gen2[name]}의 일격 필살!"; } - elseif($tnmt_type == 3) { $log[count($log)] = "{$gen2[name]}의 모독 욕설!"; } + if ($tnmt_type == 0) { $log[count($log)] = "{$gen2['name']}의 압도!"; } + elseif($tnmt_type == 1) { $log[count($log)] = "{$gen2['name']}의 팔문금쇄진!"; } + elseif($tnmt_type == 2) { $log[count($log)] = "{$gen2['name']}의 일격 필살!"; } + elseif($tnmt_type == 3) { $log[count($log)] = "{$gen2['name']}의 모독 욕설!"; } } } else { $ratio = rand() % 1000; @@ -851,7 +851,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } - $log[count($log)] = "{$gen1[name]}의 {$str}!"; + $log[count($log)] = "{$gen1['name']}의 {$str}!"; } $ratio = rand() % 1000; if($critical2 == 0 && $gen2[$tp] >= $ratio) { @@ -861,7 +861,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } - $log[count($log)] = "{$gen2[name]}의 {$str}!"; + $log[count($log)] = "{$gen2['name']}의 {$str}!"; } } @@ -911,17 +911,17 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { if($energy2 <= 0) { $sel = 0; break; } } - $query = "select {$tp2}g as gl from general where no='$gen1[no]'"; + $query = "select {$tp2}g as gl from general where no='$gen1['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general1 = MYDB_fetch_array($result); - $query = "select {$tp2}g as gl from general where no='$gen2[no]'"; + $query = "select {$tp2}g as gl from general where no='$gen2['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general2 = MYDB_fetch_array($result); switch($sel) { case 0: - $log[count($log)] = "{$gen1[name]} 승리!"; + $log[count($log)] = "{$gen1['name']} 승리!"; $gl = round(($gd2 - $gd1) / 50); $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g1'"; @@ -929,17 +929,17 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g2'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general1[gl] > $general2[gl]) { $gl1 = "+1"; $gl2 = "+0"; } - elseif($general1[gl] == $general2[gl]) { $gl1 = "+2"; $gl2 = "-1"; } + if($general1['gl'] > $general2['gl']) { $gl1 = "+1"; $gl2 = "+0"; } + elseif($general1['gl'] == $general2['gl']) { $gl1 = "+2"; $gl2 = "-1"; } else { $gl1 = "+3"; $gl2 = "-2"; } - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: - $log[count($log)] = "{$gen2[name]} 승리!"; + $log[count($log)] = "{$gen2['name']} 승리!"; $gl = round(($gd1 - $gd2) / 50); $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g2'"; @@ -947,13 +947,13 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general2[gl] > $general1[gl]) { $gl2 = "+1"; $gl1 = "+0"; } - elseif($general2[gl] == $general1[gl]) { $gl2 = "+2"; $gl1 = "-1"; } + if($general2['gl'] > $general1['gl']) { $gl2 = "+1"; $gl1 = "+0"; } + elseif($general2['gl'] == $general1['gl']) { $gl2 = "+2"; $gl1 = "-1"; } else { $gl2 = "+3"; $gl1 = "-2"; } - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: @@ -962,13 +962,13 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $query = "update tournament set draw=draw+1 where grp='$group' and (grp_no='$g1' or grp_no='$g2')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($general1[gl] > $general2[gl]) { $gl2 = "-1"; $gl1 = "+1"; } - elseif($general1[gl] == $general2[gl]) { $gl2 = "+0"; $gl1 = "+0"; } + if($general1['gl'] > $general2['gl']) { $gl2 = "-1"; $gl1 = "+1"; } + elseif($general1['gl'] == $general2['gl']) { $gl2 = "+0"; $gl1 = "+0"; } else { $gl2 = "+1"; $gl1 = "-1"; } - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -984,7 +984,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen2 = MYDB_fetch_array($result); - $log[count($log)] = "--------------- 다음경기 ---------------
{$gen1[name]} vs {$gen2[name]}"; + $log[count($log)] = "--------------- 다음경기 ---------------
{$gen1['name']} vs {$gen2['name']}"; } pushFightLog($group, $log); diff --git a/twe/join.php b/twe/join.php index 6a493f29..99ee790a 100644 --- a/twe/join.php +++ b/twe/join.php @@ -3,8 +3,8 @@ include "lib.php"; include "func.php"; require("new_lib.php") -$id = $_POST[id]; -$pw = $_POST[pw]; +$id = $_POST['id']; +$pw = $_POST['pw']; $pwTemp = substr($pw, 0, 32); @@ -117,7 +117,7 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -if($gencount >= $admin[maxgeneral]) { +if($gencount >= $admin['maxgeneral']) { echo ""; echo ""; exit(); @@ -133,12 +133,12 @@ $nationcount = MYDB_num_rows($nationresult); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - if($nation[scoutmsg] == "") { + if($nation['scoutmsg'] == "") { echo " -
"; + "; } else { echo " - "; + "; } } ?> @@ -154,17 +154,17 @@ for($i=0; $i < $nationcount; $i++) { = 1 && $member[grade] >= 1 && $member[picture] != "") { - $imageTemp = GetImageURL($member[imgsvr]); +if($admin['img'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") { + $imageTemp = GetImageURL($member['imgsvr']); echo "
$regen[name]$regen['name'] $reply
$nation[name]-
$nation['name']-
$nation[name]$nation[scoutmsg]
$nation['name']$nation['scoutmsg']
장수명 - >(6글자 이내) + >(6글자 이내)
전콘 사용 여부 - + 사용 diff --git a/twe/join_post.php b/twe/join_post.php index f6ab7941..57d5df89 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -2,12 +2,12 @@ include "lib.php"; include "func.php"; -$id = $_POST[id]; -$pw = $_POST[pw]; -$name = $_POST[name]; +$id = $_POST['id']; +$pw = $_POST['pw']; +$name = $_POST['name']; $name = _String::NoSpecialCharacter($name); -$pic = $_POST[pic]; -$character = $_POST[character]; +$pic = $_POST['pic']; +$character = $_POST['character']; $pwTemp = substr($pw, 0, 32); @@ -26,7 +26,7 @@ if(!$member) { $date = date('Y-m-d H:i:s'); //등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $connect = dbConn(); @@ -41,7 +41,7 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -$query = "select no from general where user_id='$member[id]'"; +$query = "select no from general where user_id='$member['id']'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $id_num = MYDB_num_rows($result); @@ -49,7 +49,7 @@ $query = "select no from general where name='$name'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $name_num = MYDB_num_rows($result); -$query = "select * from token where id='$member[id]'"; +$query = "select * from token where id='$member['id']'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $token_num = MYDB_num_rows($result); @@ -82,7 +82,7 @@ if($id_num) { history.go(-1) "); exit; -} elseif($admin[maxgeneral] <= $gencount) { +} elseif($admin['maxgeneral'] <= $gencount) { echo(""; } else { - switch($me[block]) { + switch($me['block']) { case 1: MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; case 2: MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; case 3: MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; } - $_SESSION[p_id] = $id; - $_SESSION[p_name] = $me[name]; - $_SESSION[p_nation] = $me[nation]; - $_SESSION[p_time] = time(); + $_SESSION['p_id'] = $id; + $_SESSION['p_name'] = $me['name']; + $_SESSION['p_nation'] = $me['nation']; + $_SESSION['p_time'] = time(); $date = date('Y-m-d H:i:s'); - $query="update general set logcnt=logcnt+1,ip='$_SESSION[p_ip]',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION[p_id]'"; + $query="update general set logcnt=logcnt+1,ip='$_SESSION['p_ip']',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; @@ -56,7 +57,7 @@ if(!$member) { $date = date('Y_m_d H:i:s'); $date2 = substr($date, 0, 10); $fp = fopen("logs/_{$date2}_login.txt", "a"); - $msg = _String::Fill2($date,20," ").tab2($id,13," ")._String::Fill2($me[name],13," ")._String::Fill2($_SESSION[p_ip],16," "); + $msg = _String::Fill2($date,20," ").tab2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); fwrite($fp, $msg."\r\n"); fclose($fp); } diff --git a/twe/logout_process.php b/twe/logout_process.php index d892aa75..aaa8ed5f 100644 --- a/twe/logout_process.php +++ b/twe/logout_process.php @@ -4,17 +4,17 @@ include "func.php"; $connect=dbConn(); -$query = "select no,user_id,password,name from general where user_id='$_SESSION[p_id]'"; +$query = "select no,user_id,password,name from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$_SESSION[p_id] = ""; -$_SESSION[p_name] = ""; -$_SESSION[p_nation] = 0; +$_SESSION['p_id'] = ""; +$_SESSION['p_name'] = ""; +$_SESSION['p_nation'] = 0; -$id = $me[user_id]; -$pw = $me[password]; -$conmsg = $me[conmsg]; +$id = $me['user_id']; +$pw = $me['password']; +$conmsg = $me['conmsg']; //���Ǻ��� ���� session_destroy(); diff --git a/twe/main.php b/twe/main.php index cf243bd1..13ecf934 100644 --- a/twe/main.php +++ b/twe/main.php @@ -7,25 +7,25 @@ $connect = dbConn(); increaseRefresh($connect, "메인", 2); checkTurn($connect); -$query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='$_SESSION[p_id]'"; +$query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); //그새 사망이면 -if($me[no] == 0) { +if($me['no'] == 0) { echo "a"; echo ""; exit(0); } -if($me[newmsg] == 1 && $me[newvote] == 1) { - $query = "update general set newmsg=0,newvote=0 where user_id='$_SESSION[p_id]'"; +if($me['newmsg'] == 1 && $me['newvote'] == 1) { + $query = "update general set newmsg=0,newvote=0 where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($me[newmsg] == 1) { - $query = "update general set newmsg=0 where user_id='$_SESSION[p_id]'"; +} elseif($me['newmsg'] == 1) { + $query = "update general set newmsg=0 where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($me[newvote] == 1) { - $query = "update general set newvote=0 where user_id='$_SESSION[p_id]'"; +} elseif($me['newvote'] == 1) { + $query = "update general set newvote=0 where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -37,10 +37,10 @@ $query = "select plock from plock where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $plock = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); -if($con >= 2) { printLimitMsg($me[turntime]); exit(); } +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($me[skin] < 1) { +if($me['skin'] < 1) { $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } @@ -51,7 +51,7 @@ $scenario = getScenario($connect); 메인 - type=text/css> + type=text/css> "; } else { - switch($me[block]) { + switch($me['block']) { case 1: MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; case 2: MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; case 3: MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; } - $_SESSION[p_id] = $id; - $_SESSION[p_name] = $me[name]; - $_SESSION[p_nation] = $me[nation]; - $_SESSION[p_time] = time(); + $_SESSION['p_id'] = $id; + $_SESSION['p_name'] = $me['name']; + $_SESSION['p_nation'] = $me['nation']; + $_SESSION['p_time'] = time(); $date = date('Y-m-d H:i:s'); - $query="update general set logcnt=logcnt+1,ip='$_SESSION[p_ip]',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION[p_id]'"; + $query="update general set logcnt=logcnt+1,ip='$_SESSION['p_ip']',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; $date2 = substr($date, 0, 10); $fp = fopen("logs/_{$date2}-login.txt", "a"); - $msg = _String::Fill2($date,20," ")._String::Fill2($id,13," ")._String::Fill2($me[name],13," ")._String::Fill2($_SESSION[p_ip],16," "); + $msg = _String::Fill2($date,20," ")._String::Fill2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); fwrite($fp, $msg."\r\n"); fclose($fp); } diff --git a/twe/preprocessing.php b/twe/preprocessing.php index b6e7ad95..ed8fd35f 100644 --- a/twe/preprocessing.php +++ b/twe/preprocessing.php @@ -10,11 +10,11 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,userlevel,con from general where user_id='$_SESSION[p_id]'"; +$query = "select no,name,nation,userlevel,con from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$con = checkLimit($me[userlevel], $me[con], $admin[conlimit]); +$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); if($con >= 2) { echo ""; exit(); } $count = sizeof($turn); diff --git a/twe/process_war.php b/twe/process_war.php index f6825014..3bdcb206 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -2,74 +2,74 @@ function processWar($connect, $general, $city) { global $_armperphase, $_maximumatmos, $_maximumtrain, $_dexLimit, $_basegold, $_baserice; - $date = substr($general[turntime],11,5); + $date = substr($general['turntime'],11,5); $query = "select * from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $game = MYDB_fetch_array($result); - $deadAmount[att] = 0; - $deadAmount[def] = 0; + $deadAmount['att'] = 0; + $deadAmount['def'] = 0; - $warphase = getRate($game, $general[crewtype], "spd"); //병종간 페이즈 수 얻기 + $warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기 // 특기보정 : 돌격 if($general[special2] == 60) { $warphase += 1; } $genAtmos = 0; - if($general[item] == 3) { + if($general['item'] == 3) { //탁주 사용 $genAtmos += 3; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 14 && $general[item] <= 16) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 14 && $general['item'] <= 16) { //의적주, 두강주, 보령압주 사용 $genAtmos += 5; - } elseif($general[item] >= 19 && $general[item] <= 20) { + } elseif($general['item'] >= 19 && $general['item'] <= 20) { //춘화첩, 초선화 사용 $genAtmos += 7; } $genTrain = 0; - if($general[item] == 4) { + if($general['item'] == 4) { //청주 사용 $genTrain += 3; - $query = "update general set item=0 where no='$general[no]'"; + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 12 && $general[item] <= 13) { + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['item'] >= 12 && $general['item'] <= 13) { //과실주, 이강주 사용 $genTrain += 5; - } elseif($general[item] >= 17 && $general[item] <= 18) { + } elseif($general['item'] >= 17 && $general['item'] <= 18) { //철벽서, 단결도 사용 $genTrain += 7; } // 우선 스케일링 - $city[def] *= 10; - $city[wall] *= 10; + $city['def'] *= 10; + $city['wall'] *= 10; - $query = "select level from city where city='$general[city]'"; + $query = "select level from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $originCity = MYDB_fetch_array($result); - $query = "select nation,level,name,history,capital,tech,type from nation where nation='$general[nation]'"; + $query = "select nation,level,name,history,capital,tech,type from nation where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='$city[nation]'"; + $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); //장수수 구함 - $query = "select no from general where nation='$general[nation]'"; + $query = "select no from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); if($gencount < 10) $gencount = 10; //장수수 구함 - $query = "select no from general where nation='$destnation[nation]'"; + $query = "select no from general where nation='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destgencount = MYDB_num_rows($result); if($destgencount < 10) $destgencount = 10; @@ -77,20 +77,20 @@ function processWar($connect, $general, $city) { $genAtmosBonus = 0; $genTrainBonus = 0; $oppAtmosBonus = 0; $oppTrainBonus = 0; //공격자 수도보정 - if($nation[capital] == $general[city]) { $genAtmosBonus += 5; } + if($nation['capital'] == $general['city']) { $genAtmosBonus += 5; } //방어자 수도보정 - //if($destnation[capital] == $city[city]) { $oppTrainBonus += 5; } + //if($destnation['capital'] == $city['city']) { $oppTrainBonus += 5; } //관,진,수진 보정 - if($city[level] == 1) { $oppTrainBonus += 5; } // 방어도시가 수진이면 방어자 방어보정 - if($originCity[level] == 2) { $genAtmosBonus += 5; } // 출병도시가 진이면 공격자 공격보정 - if($city[level] == 3) { $oppTrainBonus += 5; } // 방어도시가 관이면 방어자 방어보정 + if($city['level'] == 1) { $oppTrainBonus += 5; } // 방어도시가 수진이면 방어자 방어보정 + if($originCity['level'] == 2) { $genAtmosBonus += 5; } // 출병도시가 진이면 공격자 공격보정 + if($city['level'] == 3) { $oppTrainBonus += 5; } // 방어도시가 관이면 방어자 방어보정 - $alllog[count($alllog)] = "●{$game[month]}월:$nation[name]$general[name](이)가 $city[name](으)로 진격합니다."; - $log[count($log)] = "●{$game[month]}월:$city[name](으)로 진격합니다. <1>$date"; -// $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【전투】$nation[name](이)가 $destnation[name]$city[name](으)로 진격합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:$nation['name']$general['name'](이)가 $city['name'](으)로 진격합니다."; + $log[count($log)] = "●{$game['month']}월:$city['name'](으)로 진격합니다. <1>$date"; +// $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【전투】$nation['name'](이)가 $destnation['name']$city['name'](으)로 진격합니다."; // 목표 도시내에 목표 국가 소속 장수 중, 병사가 있는 능력치합+병사수 순으로 훈,사 60, 80 이상 - $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='$city[city]' and nation='$city[nation]' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; + $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='$city['city']' and nation='$city['nation']' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opposecount = MYDB_num_rows($result); @@ -100,14 +100,14 @@ function processWar($connect, $general, $city) { $phase = 0; while($phase < $warphase) { // 장수가 없어서 도시 공격하려했으나 병량없을시 - if($opposecount == 0 && $destnation[nation] > 0 && $destnation[rice] <= 0 && $city[supply] == 1) { - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + if($opposecount == 0 && $destnation['nation'] > 0 && $destnation['rice'] <= 0 && $city['supply'] == 1) { + $general['train'] += 1; //훈련 상승 + if($general['train'] > $_maximumtrain) { $general['train'] = $_maximumtrain; } + $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[count($alllog)] = "●{$game[month]}월:병량 부족으로 $city[name]의 수비병들이 패퇴합니다."; - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【패퇴】$destnation[name](이)가 병량 부족으로 $city[name](을)를 뺏기고 말았습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:병량 부족으로 $city['name']의 수비병들이 패퇴합니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【패퇴】$destnation['name'](이)가 병량 부족으로 $city['name'](을)를 뺏기고 말았습니다."; pushGenLog($general, $log); pushAllLog($alllog); pushHistory($connect, $history); @@ -116,40 +116,40 @@ function processWar($connect, $general, $city) { unset($history); //패퇴시 병량보충 - $destnation[rice] += 500; - $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; + $destnation['rice'] += 500; + $query = "update nation set rice='$destnation['rice']' where nation='$destnation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //내정 피폐 - $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='$city[city]'"; + $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = addConflict($connect, $city, $general[nation], 1); + $city = addConflict($connect, $city, $general['nation'], 1); ConquerCity($connect, $game, $general, $city, $nation, $destnation); break; // 장수가 없어서 도시 공격 } elseif($opposecount == 0) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 ".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; - $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 ".getTypename($general['crewtype'])."(으)로 성벽을 공격합니다."; + $log[count($log)] = "●".getTypename($general['crewtype'])."(으)로 성벽을 공격합니다."; - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + $general['train'] += 1; //훈련 상승 + if($general['train'] > $_maximumtrain) { $general['train'] = $_maximumtrain; } + $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mykillnum = 0; $mydeathnum = 0; while($phase < $warphase) { $phase++; - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - $myAtt = getAtt($game, $general, $nation[tech], $lbonus); - $myDef = getDef($game, $general, $nation[tech]); + $myAtt = getAtt($game, $general, $nation['tech'], $lbonus); + $myDef = getDef($game, $general, $nation['tech']); $cityAtt = getCityAtt($city); $cityDef = getCityDef($city); @@ -160,35 +160,35 @@ function processWar($connect, $general, $city) { if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } //훈련 사기따라 - $myCrew = getCrew($myCrew, $game[city_rate]+$oppAtmosBonus, CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); - $cityCrew = getCrew($cityCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), $game[city_rate]+$oppTrainBonus); + $myCrew = getCrew($myCrew, $game['city_rate']+$oppAtmosBonus, CharTrain($general['train']+$genTrain+$genTrainBonus, $general['personal'])); + $cityCrew = getCrew($cityCrew, CharAtmos($general['atmos']+$genAtmos+$genAtmosBonus, $general['personal']), $game['city_rate']+$oppTrainBonus); //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); + $genDexAtt = getGenDex($general, $general['crewtype']); $genDexDef = getGenDex($general, 40); - $cityCrew *= getDexLog($genDexAtt, ($game[city_rate]-60)*7200); - $myCrew *= getDexLog(($game[city_rate]-60)*7200, $genDexDef); + $cityCrew *= getDexLog($genDexAtt, ($game['city_rate']-60)*7200); + $myCrew *= getDexLog(($game['city_rate']-60)*7200, $genDexDef); $avoid = 1; // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); - if($general[crewtype] == 30) { + if(floor($general['crewtype']/10) == 3) { // 귀병 + $int = round($general['intel'] * (100-$general['injury'])/100) + getBookEff($general['book']); + if($general['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { + } elseif($general['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { + } elseif($general['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { + } elseif($general['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { + } elseif($general['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { + } elseif($general['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { + } elseif($general['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { + } elseif($general['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { + } elseif($general['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } @@ -240,22 +240,22 @@ function processWar($connect, $general, $city) { } } } - } elseif($general[crewtype] == 40) { // 정란 + } elseif($general['crewtype'] == 40) { // 정란 $cityCrew = $cityCrew * 1.5; - } elseif($general[crewtype] == 41) { // 충차 + } elseif($general['crewtype'] == 41) { // 충차 $cityCrew = $cityCrew * 2.0; - } elseif($general[crewtype] == 42) { // 벽력거 + } elseif($general['crewtype'] == 42) { // 벽력거 $cityCrew = $cityCrew * 1.5; } //군주 공격 보정 10% - if($general[level] == 12) { + if($general['level'] == 12) { $cityCrew = $cityCrew * 1.10; //참모, 장군 공격 보정 5% - } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + } elseif($general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $cityCrew = $cityCrew * 1.05; } //레벨 보정 - $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; + $cityCrew = $cityCrew * (100 + $general['explevel']/6)/100; // 특기보정 : 공성, 기병, 돌격, 무쌍, 보병, 견고, 의술(청낭서,태평청령) if($general[special2] == 53) { $cityCrew *= 2.00; } @@ -265,7 +265,7 @@ function processWar($connect, $general, $city) { if($general[special2] == 50) { $myCrew *= 0.90; } if($general[special2] == 62) { $myCrew *= 0.90; } $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $avoid == 1) { + if(($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $avoid == 1) { $batlog[count($batlog)] = "치료했다!"; $myCrew /= 1.5; // 66%만 소모 $avoid = 0; @@ -273,7 +273,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 if($general[special2] == 61) { $ratio += 10; } if($general[special2] == 71) { $ratio += 20; } @@ -284,11 +284,11 @@ function processWar($connect, $general, $city) { } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 //특기보정 : 궁병 if($general[special2] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 - if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } + if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $avoid == 1) { $batlog[count($batlog)] = "회피했다!"; $myCrew /= 10; // 10%만 소모 @@ -300,153 +300,153 @@ function processWar($connect, $general, $city) { $myCrew *= (rand() % 21 + 90)/100; // 90~110% //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { + if($general[special2] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; $myCrew = 0; } - $general[crew] -= round($myCrew); - $city[def] -= round($cityCrew); - $city[wall] -= round($cityCrew); + $general['crew'] -= round($myCrew); + $city['def'] -= round($cityCrew); + $city['wall'] -= round($cityCrew); $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; - $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; + $tempGeneralCrew = $general['crew']; $tempCityDef = $city['def']; - if($city[wall] <= 0) { $city[wall] = 0; } + if($city['wall'] <= 0) { $city['wall'] = 0; } - if($general[crew] <= 0 && $city[def] <= 0) { + if($general['crew'] <= 0 && $city['def'] <= 0) { $r1 = $tempGeneralCrew / $tempMyCrew; $r2 = $tempCityDef / $tempCityCrew; if($r1 > $r2) { $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $cityCrew += $tempCityDef; - $city[def] = 0; + $city['def'] = 0; } else { $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); $cityCrew += $offset; - $city[def] -= $offset; + $city['def'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } - } elseif($general[crew] * $city[def] <= 0) { - if($city[def] < 0) { + } elseif($general['crew'] * $city['def'] <= 0) { + if($city['def'] < 0) { $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $cityCrew += $tempCityDef; - $city[def] = 0; + $city['def'] = 0; } - if($general[crew] < 0) { + if($general['crew'] < 0) { $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); $cityCrew += $offset; - $city[def] -= $offset; + $city['def'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } } $exp += $cityCrew; $opexp += $myCrew; - $general[crew] = round($general[crew]); + $general['crew'] = round($general['crew']); $cityCrew = round($cityCrew); $myCrew = round($myCrew); - $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【$city[name]】"; + $batlog[count($batlog)] = "● $phase : 【$general['name']】 $general['crew'] (-$myCrew) VS $city['def'] (-$cityCrew) 【$city['name']】"; $mykillnum += $cityCrew; $mydeathnum += $myCrew; // 중간 쌀 체크 $myRice = round($exp / 50); // 성격 보정 - $myRice = CharExperience($myRice, $general[personal]); + $myRice = CharExperience($myRice, $general['personal']); // 쌀 소모 - $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); + $myRice = ($myRice * 5 * getCrewtypeRice($game, $general['crewtype'], $nation['tech'])); // 결과 쌀 - $myRice = $general[rice] - $myRice; + $myRice = $general['rice'] - $myRice; - if($myRice <= round($general[crew]/100)) { break; } + if($myRice <= round($general['crew']/100)) { break; } - if($city[def] <= 0) { break; } - if($general[crew] <= 0) { break; } + if($city['def'] <= 0) { break; } + if($general['crew'] <= 0) { break; } } - $res = "성 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $city[def] (-$mykillnum) 【$city[name]】<1>성벽"; + $res = "성 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 $general['crew'] (-$mydeathnum) VS $city['def'] (-$mykillnum) 【$city['name']】<1>성벽"; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; - $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; - $deadAmount[att] = $deadAmount[att] + $mydeathnum; - $deadAmount[def] = $deadAmount[def] + $mykillnum; + $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; + $deadAmount['att'] = $deadAmount['att'] + $mydeathnum; + $deadAmount['def'] = $deadAmount['def'] + $mykillnum; // 도시쌀 소모 계산 $opexp = round($opexp / 50 * 0.8); - $rice = round($opexp * 5 * getCrewtypeRice($game, 0, 0) * ($game[city_rate]/100 - 0.2)); - $destnation[rice] -= $rice; - if($destnation[rice] < 0) { $destnation[rice] = 0; } - $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; + $rice = round($opexp * 5 * getCrewtypeRice($game, 0, 0) * ($game['city_rate']/100 - 0.2)); + $destnation['rice'] -= $rice; + if($destnation['rice'] < 0) { $destnation['rice'] = 0; } + $query = "update nation set rice='$destnation['rice']' where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $adminLog[0] = "성벽 쌀 소모 : $rice"; pushAdminLog($connect, $adminLog); //원래대로 스케일링 - $city[def] = round($city[def] / 10); - $city[wall] = round($city[wall] / 10); + $city['def'] = round($city['def'] / 10); + $city['wall'] = round($city['wall'] / 10); //내정 감소 $dec = round($cityCrew / 10); - $city[agri] -= $dec; - $city[comm] -= $dec; - $city[secu] -= $dec; - if($city[agri] < 0) { $city[agri] = 0; } - if($city[comm] < 0) { $city[comm] = 0; } - if($city[secu] < 0) { $city[secu] = 0; } + $city['agri'] -= $dec; + $city['comm'] -= $dec; + $city['secu'] -= $dec; + if($city['agri'] < 0) { $city['agri'] = 0; } + if($city['comm'] < 0) { $city['comm'] = 0; } + if($city['secu'] < 0) { $city['secu'] = 0; } // 병사수 변경 - $query = "update general set crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; + $query = "update general set crew='$general['crew']',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $mykillnum); - addGenDex($connect, $general[no], 40, $mydeathnum); + addGenDex($connect, $general['no'], $general['crewtype'], $mykillnum); + addGenDex($connect, $general['no'], 40, $mydeathnum); // 죽은수 기술로 누적 $num = round($mydeathnum * 0.01); // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } + if($nation['type'] == 3 || $nation['type'] == 13) { $num *= 1.1; } + if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; + if(TechLimit($game['startyear'], $game['year'], $nation['tech'])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 기술로 누적 $num = round($mykillnum * 0.01); // 국가보정 - if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } - if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } + if($destnation['type'] == 3 || $destnation['type'] == 13) { $num *= 1.1; } + if($destnation['type'] == 5 || $destnation['type'] == 6 || $destnation['type'] == 7 || $destnation['type'] == 8 || $destnation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; + if(TechLimit($game['startyear'], $game['year'], $destnation['tech'])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //양국 평균 기술가격 - //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; + //$techRatio = (getTechCost($nation['tech']) + getTechCost($destnation['tech'])) / 2; $techRatio = 1.0; // 죽은수 도시 재정으로 누적 60% $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); // 국가보정 - if($destnation[type] == 1) { $num *= 1.1; } - if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num',def='$city[def]',wall='$city[wall]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]' where city='$city[city]'"; + if($destnation['type'] == 1) { $num *= 1.1; } + if($destnation['type'] == 9 || $destnation['type'] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num',def='$city['def']',wall='$city['wall']',agri='$city['agri']',comm='$city['comm']',secu='$city['secu']' where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 도시 재정으로 누적 40% $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); // 국가보정 - if($nation[type] == 1) { $num *= 1.1; } - if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general[city]'"; + if($nation['type'] == 1) { $num *= 1.1; } + if($nation['type'] == 9 || $nation['type'] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //분쟁현황에 추가 - $city = addConflict($connect, $city, $general[nation], $mykillnum); + $city = addConflict($connect, $city, $general['nation'], $mykillnum); // 병사 소진시 성 함락 - if($city[def] <= 0) { + if($city['def'] <= 0) { $exp += 1000; $exp2++; @@ -464,118 +464,118 @@ function processWar($connect, $general, $city) { ConquerCity($connect, $game, $general, $city, $nation, $destnation); break; // 공격 장수 병사 소진시 실패 처리 - } elseif($general[crew] <= 0) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + } elseif($general['crew'] <= 0) { + $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●퇴각했습니다."; - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; - } elseif($myRice <= round($general[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + } elseif($myRice <= round($general['crew']/100)) { + $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●군량 부족으로 퇴각합니다."; - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } // 장수 대결 } else { $oppose = MYDB_fetch_array($result); - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(와)과 $oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 대결합니다."; - $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 $oppose[name]의 ".getTypename($oppose[crewtype])."(을)를 공격합니다."; - $opplog[count($opplog)] = "●".getTypename($oppose[crewtype])."(으)로 $general[name]의 ".getTypename($general[crewtype])."(을)를 수비합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(와)과 $oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 대결합니다."; + $log[count($log)] = "●".getTypename($general['crewtype'])."(으)로 $oppose['name']의 ".getTypename($oppose['crewtype'])."(을)를 공격합니다."; + $opplog[count($opplog)] = "●".getTypename($oppose['crewtype'])."(으)로 $general['name']의 ".getTypename($general['crewtype'])."(을)를 수비합니다."; $oppAtmos = 0; - if($oppose[item] == 3) { + if($oppose['item'] == 3) { //탁주 사용 $oppAtmos += 3; - $query = "update general set item=0 where no='$oppose[no]'"; + $query = "update general set item=0 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[item] >= 14 && $oppose[item] <= 16) { + $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; + $oppose['item'] = 0; + } elseif($oppose['item'] >= 14 && $oppose['item'] <= 16) { //의적주, 두강주, 보령압주 사용 $oppAtmos += 5; - } elseif($oppose[item] >= 19 && $oppose[item] <= 20) { + } elseif($oppose['item'] >= 19 && $oppose['item'] <= 20) { //춘화첩, 초선화 사용 $oppAtmos += 7; } $oppTrain = 0; - if($oppose[item] == 4) { + if($oppose['item'] == 4) { //청주 사용 $oppTrain += 3; - $query = "update general set item=0 where no='$oppose[no]'"; + $query = "update general set item=0 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[item] >= 12 && $oppose[item] <= 13) { + $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; + $oppose['item'] = 0; + } elseif($oppose['item'] >= 12 && $oppose['item'] <= 13) { //과실주, 이강주 사용 $oppTrain += 5; - } elseif($oppose[item] >= 17 && $oppose[item] <= 18) { + } elseif($oppose['item'] >= 17 && $oppose['item'] <= 18) { //철벽서, 단결도 사용 $oppTrain += 7; } - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $oppose[train] += 1; //훈련 상승 - if($oppose[train] > $_maximumtrain) { $oppose[train] = $_maximumtrain; } + $general['train'] += 1; //훈련 상승 + if($general['train'] > $_maximumtrain) { $general['train'] = $_maximumtrain; } + $oppose['train'] += 1; //훈련 상승 + if($oppose['train'] > $_maximumtrain) { $oppose['train'] = $_maximumtrain; } - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; + $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set recwar='$general[turntime]',train='$oppose[train]',warnum=warnum+1 where no='$oppose[no]'"; + $query = "update general set recwar='$general['turntime']',train='$oppose['train']',warnum=warnum+1 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ratio = rand() % 100; //특기보정 : 저격(수극), 활무기저격 - if(($general[special2] == 70 && $ratio <= 33) || ($general[item] == 2 && $ratio <= 20) || (($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) && $ratio <= 20)) { + if(($general[special2] == 70 && $ratio <= 33) || ($general['item'] == 2 && $ratio <= 20) || (($general['weap'] == 10 || $general['weap'] == 14 || $general['weap'] == 18 || $general['weap'] == 22) && $ratio <= 20)) { //수극 사용 - if($general[item] == 2) { - $query = "update general set item=0 where no='$general[no]'"; + if($general['item'] == 2) { + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) { -// $log[count($log)] = "".getWeapName($general[weap])."(을)를 사용!"; + $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; + $general['item'] = 0; + } elseif($general['weap'] == 10 || $general['weap'] == 14 || $general['weap'] == 18 || $general['weap'] == 22) { +// $log[count($log)] = "".getWeapName($general['weap'])."(을)를 사용!"; } $log[count($log)] = "●상대를 저격했다!"; $batlog[count($batlog)] = "●상대를 저격했다!"; $opplog[count($opplog)] = "●상대에게 저격당했다!"; $oppbatlog[count($oppbatlog)] = "●상대에게 저격당했다!"; // 부상 - $oppose[injury] += rand() % 41 + 20; // 20 ~ 60 - if($oppose[injury] > 80) { $oppose[injury] = 80; } - } else if($general[item] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$general[no]'"; + $oppose['injury'] += rand() % 41 + 20; // 20 ~ 60 + if($oppose['injury'] > 80) { $oppose['injury'] = 80; } + } else if($general['item'] == 2 && $ratio <= 40) { + $query = "update general set item=0 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $batlog[count($batlog)] = "".getItemName($general[item])."(이)가 빗나갑니다!"; - $general[item] = 0; + $batlog[count($batlog)] = "".getItemName($general['item'])."(이)가 빗나갑니다!"; + $general['item'] = 0; } $ratio = rand() % 100; //특기보정 : 저격(수극), 활무기저격 - if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose[item] == 2 && $ratio <= 20) || (($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) && $ratio <= 20)) { + if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose['item'] == 2 && $ratio <= 20) || (($oppose['weap'] == 10 || $oppose['weap'] == 14 || $oppose['weap'] == 18 || $oppose['weap'] == 22) && $ratio <= 20)) { //수극 사용 - if($oppose[item] == 2) { - $query = "update general set item=0 where no='$oppose[no]'"; + if($oppose['item'] == 2) { + $query = "update general set item=0 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) { -// $opplog[count($opplog)] = "".getWeapName($oppose[weap])."(을)를 사용!"; + $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; + $oppose['item'] = 0; + } elseif($oppose['weap'] == 10 || $oppose['weap'] == 14 || $oppose['weap'] == 18 || $oppose['weap'] == 22) { +// $opplog[count($opplog)] = "".getWeapName($oppose['weap'])."(을)를 사용!"; } $oppbatlog[count($oppbatlog)] = "●상대를 저격했다!"; $opplog[count($opplog)] = "●상대를 저격했다!"; $batlog[count($batlog)] = "●상대에게 저격당했다!"; $log[count($log)] = "●상대에게 저격당했다!"; // 부상 - $general[injury] += rand() % 41 + 20; // 20 ~ 60 - if($general[injury] > 80) { $general[injury] = 80; } - } else if($oppose[item] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$oppose[no]'"; + $general['injury'] += rand() % 41 + 20; // 20 ~ 60 + if($general['injury'] > 80) { $general['injury'] = 80; } + } else if($oppose['item'] == 2 && $ratio <= 40) { + $query = "update general set item=0 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $oppbatlog[count($oppbatlog)] = "".getItemName($oppose[item])."(이)가 빗나갑니다!"; - $oppose[item] = 0; + $oppbatlog[count($oppbatlog)] = "".getItemName($oppose['item'])."(이)가 빗나갑니다!"; + $oppose['item'] = 0; } $mykillnum = 0; $mydeathnum = 0; @@ -583,63 +583,63 @@ function processWar($connect, $general, $city) { while($phase < $warphase) { $phase++; - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; + if($general['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($general['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } - $myAtt = getAtt($game, $general, $nation[tech], $lbonus); - $myDef = getDef($game, $general, $nation[tech]); + $myAtt = getAtt($game, $general, $nation['tech'], $lbonus); + $myDef = getDef($game, $general, $nation['tech']); - if($oppose[level] == 12) { - $opplbonus = $destnation[level] * 2; - } elseif($oppose[level] >= 5) { - $opplbonus = $destnation[level]; + if($oppose['level'] == 12) { + $opplbonus = $destnation['level'] * 2; + } elseif($oppose['level'] >= 5) { + $opplbonus = $destnation['level']; } else { $opplbonus = 0; } - $opAtt = getAtt($game, $oppose, $destnation[tech], $opplbonus); - $opDef = getDef($game, $oppose, $destnation[tech]); + $opAtt = getAtt($game, $oppose, $destnation['tech'], $opplbonus); + $opDef = getDef($game, $oppose, $destnation['tech']); // 감소할 병사 수 $myCrew = $_armperphase + $opAtt - $myDef; $opCrew = $_armperphase + $myAtt - $opDef; if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } if($opCrew <= 0) { $opCrew = rand() % 90 + 10; } //훈련 사기따라 - $myCrew = getCrew($myCrew, CharAtmos($oppose[atmos]+$oppAtmos+$oppAtmosBonus, $oppose[personal]), CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); - $opCrew = getCrew($opCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), CharTrain($oppose[train]+$oppTrain+$oppTrainBonus, $oppose[personal])); + $myCrew = getCrew($myCrew, CharAtmos($oppose['atmos']+$oppAtmos+$oppAtmosBonus, $oppose['personal']), CharTrain($general['train']+$genTrain+$genTrainBonus, $general['personal'])); + $opCrew = getCrew($opCrew, CharAtmos($general['atmos']+$genAtmos+$genAtmosBonus, $general['personal']), CharTrain($oppose['train']+$oppTrain+$oppTrainBonus, $oppose['personal'])); //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, $oppose[crewtype]); - $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); - $oppDexDef = getGenDex($oppose, $general[crewtype]); + $genDexAtt = getGenDex($general, $general['crewtype']); + $genDexDef = getGenDex($general, $oppose['crewtype']); + $oppDexAtt = getGenDex($oppose, $oppose['crewtype']); + $oppDexDef = getGenDex($oppose, $general['crewtype']); $opCrew *= getDexLog($genDexAtt, $oppDexDef); $myCrew *= getDexLog($oppDexAtt, $genDexDef); $myAvoid = 1; $opAvoid = 1; // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); - if($general[crewtype] == 30) { + if(floor($general['crewtype']/10) == 3) { // 귀병 + $int = round($general['intel'] * (100-$general['injury'])/100) + getBookEff($general['book']); + if($general['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { + } elseif($general['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { + } elseif($general['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { + } elseif($general['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { + } elseif($general['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { + } elseif($general['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { + } elseif($general['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { + } elseif($general['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { + } elseif($general['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } @@ -762,25 +762,25 @@ function processWar($connect, $general, $city) { } // 상대 장수 병종간 특성 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $int = round($oppose[intel] * (100-$oppose[injury])/100) + getBookEff($oppose[book]); - if($oppose[crewtype] == 30) { + if(floor($oppose['crewtype']/10) == 3) { // 귀병 + $int = round($oppose['intel'] * (100-$oppose['injury'])/100) + getBookEff($oppose['book']); + if($oppose['crewtype'] == 30) { $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($oppose[crewtype] == 31) { + } elseif($oppose['crewtype'] == 31) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 32) { + } elseif($oppose['crewtype'] == 32) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 33) { + } elseif($oppose['crewtype'] == 33) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 34) { + } elseif($oppose['crewtype'] == 34) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 35) { + } elseif($oppose['crewtype'] == 35) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 36) { + } elseif($oppose['crewtype'] == 36) { $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 37) { + } elseif($oppose['crewtype'] == 37) { $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 38) { + } elseif($oppose['crewtype'] == 38) { $ratio2 = $int * 6; // 0~600 즉 60% } @@ -903,10 +903,10 @@ function processWar($connect, $general, $city) { } // 특기보정: 돌격 - if($oppose[crewtype] == 43 && $general[special2] != 60) { // 목우 + if($oppose['crewtype'] == 43 && $general[special2] != 60) { // 목우 $r = 0; - $r += $oppose[atmos] + $oppAtmos + $oppAtmosBonus; - $r += $oppose[train] + $oppTrain + $oppTrainBonus; + $r += $oppose['atmos'] + $oppAtmos + $oppAtmosBonus; + $r += $oppose['train'] + $oppTrain + $oppTrainBonus; $ratio = rand() % 400; // 최대 50% 저지 if($ratio < $r && $opAvoid == 1) { $batlog[count($batlog)] = "저지당했다!"; @@ -918,76 +918,76 @@ function processWar($connect, $general, $city) { // my 입장 상성 // 보병계열 > 궁병계열 - if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { + if(floor($general['crewtype']/10) == 0 && floor($oppose['crewtype']/10) == 1) { $myCrew *= 0.8; $opCrew *= 1.2; } // 궁병계열 > 기병계열 - if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { + if(floor($general['crewtype']/10) == 1 && floor($oppose['crewtype']/10) == 2) { $myCrew *= 0.8; $opCrew *= 1.2; } // 기병계열 > 보병계열 - if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { + if(floor($general['crewtype']/10) == 2 && floor($oppose['crewtype']/10) == 0) { $myCrew *= 0.8; $opCrew *= 1.2; } // 차병계열 - if(floor($general[crewtype]/10) == 4) { + if(floor($general['crewtype']/10) == 4) { $myCrew *= 1.2; $opCrew *= 0.8; } // op 입장 상성 // 보병계열 > 궁병계열 - if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { + if(floor($oppose['crewtype']/10) == 0 && floor($general['crewtype']/10) == 1) { $opCrew *= 0.8; $myCrew *= 1.2; } // 궁병계열 > 기병계열 - if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { + if(floor($oppose['crewtype']/10) == 1 && floor($general['crewtype']/10) == 2) { $opCrew *= 0.8; $myCrew *= 1.2; } // 기병계열 > 보병계열 - if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { + if(floor($oppose['crewtype']/10) == 2 && floor($general['crewtype']/10) == 0) { $opCrew *= 0.8; $myCrew *= 1.2; } // 차병계열 - if(floor($oppose[crewtype]/10) == 4) { + if(floor($oppose['crewtype']/10) == 4) { $opCrew *= 1.2; $myCrew *= 0.8; } //군주 공격 보정 10% - if($general[level] == 12) { + if($general['level'] == 12) { $opCrew = $opCrew * 1.10; //참모, 장군 공격 보정 5% - } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { + } elseif($general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $opCrew = $opCrew * 1.05; } //상대장수 관직 보정 //군주 방어 보정 10% - if($oppose[level] == 12) { + if($oppose['level'] == 12) { $opCrew = $opCrew * 0.90; //참모, 모사 방어 보정 5% - } elseif($oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { + } elseif($oppose['level'] == 11 || $oppose['level'] == 9 || $oppose['level'] == 7 || $oppose['level'] == 5) { $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 + } elseif($oppose['level'] == 4 && $oppose['no'] == $city[gen1]) { // 태수 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 + } elseif($oppose['level'] == 3 && $oppose['no'] == $city[gen2]) { // 군사 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 + } elseif($oppose['level'] == 2 && $oppose['no'] == $city[gen3]) { // 시중 보정 $opCrew = $opCrew * 0.95; } //레벨 보정 - $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); - $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); - $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); - $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); + $myCrew = $myCrew * ((100 - $general['explevel']/3)/100); + $opCrew = $opCrew / ((100 - $general['explevel']/3)/100); + $myCrew = $myCrew / ((100 - $oppose['explevel']/3)/100); + $opCrew = $opCrew * ((100 - $oppose['explevel']/3)/100); // 특기보정 : 기병, 돌격, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) if($general[special2] == 52) { $opCrew *= 1.20; } @@ -996,14 +996,14 @@ function processWar($connect, $general, $city) { if($general[special2] == 50) { $myCrew *= 0.90; } if($general[special2] == 62) { $myCrew *= 0.90; } if($general[special2] == 75) { - if($oppose[crewtype] != 0 && $oppose[crewtype] != 10 && $oppose[crewtype] != 20 && - $oppose[crewtype] != 30 && $oppose[crewtype] != 40 && $oppose[crewtype] != 41) + if($oppose['crewtype'] != 0 && $oppose['crewtype'] != 10 && $oppose['crewtype'] != 20 && + $oppose['crewtype'] != 30 && $oppose['crewtype'] != 40 && $oppose['crewtype'] != 41) { $opCrew *= 1.1; $myCrew *= 0.9; } } $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $myAvoid == 1) { + if(($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $myAvoid == 1) { $batlog[count($batlog)] = "치료했다!"; $myCrew /= 1.5; // 66%만 소모 $myAvoid = 0; @@ -1015,14 +1015,14 @@ function processWar($connect, $general, $city) { if($oppose[special2] == 50) { $opCrew *= 0.80; } if($oppose[special2] == 62) { $myCrew *= 1.10; } if($oppose[special2] == 75) { - if($general[crewtype] != 0 && $general[crewtype] != 10 && $general[crewtype] != 20 && - $general[crewtype] != 30 && $general[crewtype] != 40 && $general[crewtype] != 41) + if($general['crewtype'] != 0 && $general['crewtype'] != 10 && $general['crewtype'] != 20 && + $general['crewtype'] != 30 && $general['crewtype'] != 40 && $general['crewtype'] != 41) { $myCrew *= 1.1; $opCrew *= 0.9; } } $ratio = rand() % 100; // 0 ~ 99 - if(($oppose[special2] == 73 || $oppose[item] == 23 || $oppose[item] == 24) && $ratio > 80 && $opAvoid == 1) { + if(($oppose[special2] == 73 || $oppose['item'] == 23 || $oppose['item'] == 24) && $ratio > 80 && $opAvoid == 1) { $oppbatlog[count($oppbatlog)] = "치료했다!"; $opCrew /= 1.5; // 66%만 소모 $opAvoid = 0; @@ -1030,7 +1030,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); + $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 if($general[special2] == 61) { $ratio += 10; } if($general[special2] == 71) { $ratio += 20; } @@ -1052,7 +1052,7 @@ function processWar($connect, $general, $city) { } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book])); + $ratio = CriticalRatio2($oppose['leader']+getHorseEff($oppose['horse'])+$opplbonus, $oppose['power']+getWeapEff($oppose['weap']), $oppose['intel']+getBookEff($oppose['book'])); // 특기보정 : 필살 if($oppose[special2] == 71) { $ratio += 20; } if($ratio >= $rd && $opAvoid == 1) { @@ -1080,12 +1080,12 @@ function processWar($connect, $general, $city) { //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 //특기보정 : 돌격, 궁병 if($oppose[special2] == 60) { $ratio2 -= 100; } if($general[special2] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 - if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } + if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $myAvoid == 1) { // 특기보정 : 격노 if($oppose[special2] == 74 && rand() % 100 < 50) { @@ -1102,12 +1102,12 @@ function processWar($connect, $general, $city) { } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 + $ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율 // 특기보정 : 돌격, 궁병 if($general[special2] == 60) { $ratio2 -= 100; } if($oppose[special2] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 - if($oppose[item] == 26 || $oppose[item] == 25) { $ratio2 += 20; } + if($oppose['item'] == 26 || $oppose['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $opAvoid == 1) { // 특기보정 : 격노 if($general[special2] == 74 && rand() % 100 < 33) { @@ -1134,64 +1134,64 @@ function processWar($connect, $general, $city) { $myCrew *= (rand() % 21 + 90)/100; // 90~110% //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { + if($general[special2] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; $oppbatlog[count($oppbatlog)] = "●상대에게 위압받았다!"; $myCrew = 0; } //특기보정: 위압 - if($oppose[special2] == 63 && $phase == 1 && $oppose[crew] >= 1000 && $oppose[atmos] >= 90 && $oppose[train] >= 90) { + if($oppose[special2] == 63 && $phase == 1 && $oppose['crew'] >= 1000 && $oppose['atmos'] >= 90 && $oppose['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압받았다!"; $oppbatlog[count($oppbatlog)] = "●상대에게 위압을 줬다!"; $opCrew = 0; } - $general[crew] -= round($myCrew); - $oppose[crew] -= round($opCrew); + $general['crew'] -= round($myCrew); + $oppose['crew'] -= round($opCrew); $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; - $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; - if($general[crew] <= 0 && $oppose[crew] <= 0) { + $tempGeneralCrew = $general['crew']; $tempOpposeCrew = $oppose['crew']; + if($general['crew'] <= 0 && $oppose['crew'] <= 0) { $r1 = $tempGeneralCrew / $tempMyCrew; $r2 = $tempOpposeCrew / $tempOpCrew; if($r1 > $r2) { $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; + $oppose['crew'] = 0; } else { $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); $opCrew += $offset; - $oppose[crew] -= $offset; + $oppose['crew'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } - } elseif($general[crew] * $oppose[crew] <= 0) { - if($oppose[crew] < 0) { + } elseif($general['crew'] * $oppose['crew'] <= 0) { + if($oppose['crew'] < 0) { $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); $myCrew += $offset; - $general[crew] -= $offset; + $general['crew'] -= $offset; $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; + $oppose['crew'] = 0; } - if($general[crew] < 0) { + if($general['crew'] < 0) { $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); $opCrew += $offset; - $oppose[crew] -= $offset; + $oppose['crew'] -= $offset; $myCrew += $tempGeneralCrew; - $general[crew] = 0; + $general['crew'] = 0; } } $exp += $opCrew; $opexp += $myCrew; - $general[crew] = round($general[crew]); - $oppose[crew] = round($oppose[crew]); + $general['crew'] = round($general['crew']); + $oppose['crew'] = round($oppose['crew']); $myCrew = round($myCrew); $opCrew = round($opCrew); - $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【$oppose[name]】"; - $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose[name]】 $oppose[crew] (-$opCrew) VS $general[crew] (-$myCrew) 【$general[name]】"; + $batlog[count($batlog)] = "● $phase : 【$general['name']】 $general['crew'] (-$myCrew) VS $oppose['crew'] (-$opCrew) 【$oppose['name']】"; + $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose['name']】 $oppose['crew'] (-$opCrew) VS $general['crew'] (-$myCrew) 【$general['name']】"; $mykillnum += $opCrew; $mydeathnum += $myCrew; $opkillnum += $myCrew; $opdeathnum += $opCrew; @@ -1199,131 +1199,131 @@ function processWar($connect, $general, $city) { // 중간 쌀 체크 $myRice = round($exp / 50); // 성격 보정 - $myRice = CharExperience($myRice, $general[personal]); + $myRice = CharExperience($myRice, $general['personal']); // 쌀 소모 - $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); + $myRice = ($myRice * 5 * getCrewtypeRice($game, $general['crewtype'], $nation['tech'])); // 결과 쌀 - $myRice = $general[rice] - $myRice; + $myRice = $general['rice'] - $myRice; // 중간 쌀 체크 $opRice = round($opexp / 50 * 0.8); // 성격 보정 - $opRice = CharExperience($opRice, $oppose[personal]); + $opRice = CharExperience($opRice, $oppose['personal']); // 쌀 소모 - $opRice = ($opRice * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); + $opRice = ($opRice * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); // 결과 쌀 - $opRice = $oppose[rice] - $opRice; + $opRice = $oppose['rice'] - $opRice; - if($opRice <= round($oppose[crew]/100)) { break; } - if($myRice <= round($general[crew]/100)) { break; } + if($opRice <= round($oppose['crew']/100)) { break; } + if($myRice <= round($general['crew']/100)) { break; } - if($oppose[crew] <= 0) { break; } - if($general[crew] <= 0) { break; } + if($oppose['crew'] <= 0) { break; } + if($general['crew'] <= 0) { break; } } - $res = "공 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $oppose[crew] (-$opdeathnum) 【$oppose[name]】<1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2).""; + $res = "공 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 $general['crew'] (-$mydeathnum) VS $oppose['crew'] (-$opdeathnum) 【$oppose['name']】<1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2).""; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; - $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; - $oppres = "수 <1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2)."【$oppose[name]】 $oppose[crew] (-$opdeathnum) VS $general[crew] (-$mydeathnum) 【$general[name]】<1>"._String::SubStr(getTypename($general[crewtype]), 0, 2).""; + $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; + $oppres = "수 <1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2)."【$oppose['name']】 $oppose['crew'] (-$opdeathnum) VS $general['crew'] (-$mydeathnum) 【$general['name']】<1>"._String::SubStr(getTypename($general['crewtype']), 0, 2).""; $opplog[count($opplog)] = "◆".$oppres; $oppbatlog[count($oppbatlog)] = "◆".$oppres; - $oppbatres[count($oppbatres)] = "◆{$game[year]}년 {$game[month]}월: ".$oppres; + $oppbatres[count($oppbatres)] = "◆{$game['year']}년 {$game['month']}월: ".$oppres; - $deadAmount[att] = $deadAmount[att] + $mydeathnum; - $deadAmount[def] = $deadAmount[def] + $opdeathnum; + $deadAmount['att'] = $deadAmount['att'] + $mydeathnum; + $deadAmount['def'] = $deadAmount['def'] + $opdeathnum; // 상대장수 부상 $ratio = rand() % 100; if($ratio >= 95) { $opplog[count($opplog)] = "●전투중 부상당했다!"; - $oppose[injury] += rand() % 71 + 10; // 10 ~ 80 - if($oppose[injury] > 80) { $oppose[injury] = 80; } + $oppose['injury'] += rand() % 71 + 10; // 10 ~ 80 + if($oppose['injury'] > 80) { $oppose['injury'] = 80; } } // 병사수 변경 - $query = "update general set injury='$oppose[injury]',crew='$oppose[crew]',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='$oppose[no]'"; + $query = "update general set injury='$oppose['injury']',crew='$oppose['crew']',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 - addGenDex($connect, $oppose[no], $oppose[crewtype], $opkillnum * 0.9); - addGenDex($connect, $oppose[no], $general[crewtype], $opdeathnum * 0.9); + addGenDex($connect, $oppose['no'], $oppose['crewtype'], $opkillnum * 0.9); + addGenDex($connect, $oppose['no'], $general['crewtype'], $opdeathnum * 0.9); // 죽은수 기술로 누적 $num = round($mydeathnum * 0.01); // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } + if($nation['type'] == 3 || $nation['type'] == 13) { $num *= 1.1; } + if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; + if(TechLimit($game['startyear'], $game['year'], $nation['tech'])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 장수 부상 $ratio = rand() % 100; if($ratio >= 95) { $log[count($log)] = "●전투중 부상당했다!"; - $general[injury] += rand() % 71 + 10; // 10 ~ 80 - if($general[injury] > 80) { $general[injury] = 80; } + $general['injury'] += rand() % 71 + 10; // 10 ~ 80 + if($general['injury'] > 80) { $general['injury'] = 80; } } // 병사수 변경 - $query = "update general set injury='$general[injury]',crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; + $query = "update general set injury='$general['injury']',crew='$general['crew']',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $mykillnum); - addGenDex($connect, $general[no], $oppose[crewtype], $mydeathnum); + addGenDex($connect, $general['no'], $general['crewtype'], $mykillnum); + addGenDex($connect, $general['no'], $oppose['crewtype'], $mydeathnum); // 죽은수 기술로 누적 $num = round($opdeathnum * 0.01); // 국가보정 - if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } - if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } + if($destnation['type'] == 3 || $destnation['type'] == 13) { $num *= 1.1; } + if($destnation['type'] == 5 || $destnation['type'] == 6 || $destnation['type'] == 7 || $destnation['type'] == 8 || $destnation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; + if(TechLimit($game['startyear'], $game['year'], $destnation['tech'])) { $num = floor($num/4); } + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //양국 평균 기술가격 - //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; + //$techRatio = (getTechCost($nation['tech']) + getTechCost($destnation['tech'])) / 2; $techRatio = 1.0; // 죽은수 도시 재정으로 누적 60% $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); // 국가보정 - if($destnation[type] == 1) { $num *= 1.1; } - if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$city[city]'"; + if($destnation['type'] == 1) { $num *= 1.1; } + if($destnation['type'] == 9 || $destnation['type'] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 도시 재정으로 누적 40% $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); // 국가보정 - if($nation[type] == 1) { $num *= 1.1; } - if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general[city]'"; + if($nation['type'] == 1) { $num *= 1.1; } + if($nation['type'] == 9 || $nation['type'] == 10) { $num *= 0.9; } + $query = "update city set dead=dead+'$num' where city='$general['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대 병사 소진이나 쌀 소진시 다음 장수 - if($oppose[crew] <= 0 || ($opRice <= round($oppose[crew]/100) && $general[crew] > 0)) { - if($opRice <= round($oppose[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; - $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; + if($oppose['crew'] <= 0 || ($opRice <= round($oppose['crew']/100) && $general['crew'] > 0)) { + if($opRice <= round($oppose['crew']/100)) { + $alllog[count($alllog)] = "●{$game['month']}월:$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; + $log[count($log)] = "$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; $opplog[count($opplog)] = "●군량 부족으로 패퇴합니다."; } else { - $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; - $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; + $log[count($log)] = "$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; $opplog[count($opplog)] = "●전멸했습니다."; } $opposecount--; - $general[atmos] *= 1.1; //사기 증가 - if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } + $general['atmos'] *= 1.1; //사기 증가 + if($general['atmos'] > $_maximumatmos) { $general['atmos'] = $_maximumatmos; } - $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + $query = "update general set atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $exp2++; // 상대장수 경험 등등 증가 $opexp = round($opexp / 50 * 0.8); // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); + $opexp = CharExperience($opexp, $oppose['personal']); // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } + $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); + if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set deathnum=deathnum+1,rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; + $query = "update general set deathnum=deathnum+1,rice='$oppose['rice']',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opexp = 0; @@ -1334,40 +1334,40 @@ function processWar($connect, $general, $city) { unset($oppbatlog); unset($oppbatres); // 공격 장수 병사 소진이나 쌀 소진시 실패 처리 - } elseif($general[crew] <= 0 || $myRice <= round($general[crew]/100)) { - if($myRice <= round($general[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + } elseif($general['crew'] <= 0 || $myRice <= round($general['crew']/100)) { + if($myRice <= round($general['crew']/100)) { + $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●군량 부족으로 퇴각합니다."; - $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $opplog[count($opplog)] = "$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; } else { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●퇴각했습니다."; - $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; + $opplog[count($opplog)] = "$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; } // 경험치 상승 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 + if(floor($oppose['crewtype']/10) == 3) { // 귀병 $oppose[intel2]++; - } elseif(floor($oppose[crewtype]/10) == 4) { // 차병 + } elseif(floor($oppose['crewtype']/10) == 4) { // 차병 $oppose[leader2]++; } else { $oppose[power2]++; } - $oppose[atmos] *= 1.1; //사기 증가 - if($oppose[atmos] > $_maximumatmos) { $oppose[atmos] = $_maximumatmos; } + $oppose['atmos'] *= 1.1; //사기 증가 + if($oppose['atmos'] > $_maximumatmos) { $oppose['atmos'] = $_maximumatmos; } // 상대장수 경험 등등 증가 $opexp = round($opexp / 50 * 0.8); // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); + $opexp = CharExperience($opexp, $oppose['personal']); // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } + $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); + if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set rice='$oppose[rice]',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='$oppose[atmos]',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='$oppose[no]'"; + $query = "update general set rice='$oppose['rice']',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='$oppose['atmos']',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; + $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opexp = 0; @@ -1378,8 +1378,8 @@ function processWar($connect, $general, $city) { unset($opplog); unset($oppbatlog); unset($oppbatres); -// $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 }$city[name] 공략에 실패했습니다. <1>$date"; -// $log[count($log)] = "$city[name] 공략에 실패했습니다. <1>$date"; +// $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 }$city['name'] 공략에 실패했습니다. <1>$date"; +// $log[count($log)] = "$city['name'] 공략에 실패했습니다. <1>$date"; break; } else { // 무승부일때 로그 남김 @@ -1396,34 +1396,34 @@ function processWar($connect, $general, $city) { // 상대장수 경험 등등 증가(페이즈 초과시) $opexp = round($opexp / 50 * 0.8); // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); + $opexp = CharExperience($opexp, $oppose['personal']); // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } + $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); + if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; + $query = "update general set rice='$oppose['rice']',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 - if(floor($general[crewtype]/10) == 3) { // 귀병 + if(floor($general['crewtype']/10) == 3) { // 귀병 $general[intel2] += $exp2; - } elseif(floor($general[crewtype]/10) == 4) { // 차병 + } elseif(floor($general['crewtype']/10) == 4) { // 차병 $general[leader2] += $exp2; } else { $general[power2] += $exp2; } - $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='$general[no]'"; + $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 공헌, 명성 상승 $exp = round($exp / 50); // 성격 보정 - $exp = CharExperience($exp, $general[personal]); + $exp = CharExperience($exp, $general['personal']); // 쌀 소모 - $general[rice] -= ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); - if($general[rice] < 0) { $general[rice] = 0; } + $general['rice'] -= ($exp * 5 * getCrewtypeRice($game, $general['crewtype'], $nation['tech'])); + if($general['rice'] < 0) { $general['rice'] = 0; } - $query = "update general set rice='$general[rice]',dedication=dedication+'$exp',experience=experience+'$exp' where no='$general[no]'"; + $query = "update general set rice='$general['rice']',dedication=dedication+'$exp',experience=experience+'$exp' where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1476,14 +1476,14 @@ function getCrewtypeRice($game, $crewtype, $tech) { ////////////////////////////////////////////////////////////// function getAtt($game, $general, $tech, $lbonus) { - $att = getRate($game, $general[crewtype], "att") + getTechAbil($tech); + $att = getRate($game, $general['crewtype'], "att") + getTechAbil($tech); - if(floor($general[crewtype]/10) == 3) { // 귀병 지100% - $ratio = (floor($general[intel]*(100-$general[injury])/100)+getBookEff($general[book]))*2 - 40; - } elseif(floor($general[crewtype]/10) == 4) { // 차병 통100% - $ratio = (floor($general[leader]*(100-$general[injury])/100)+getHorseEff($general[horse])+$lbonus)*2 - 40; + if(floor($general['crewtype']/10) == 3) { // 귀병 지100% + $ratio = (floor($general['intel']*(100-$general['injury'])/100)+getBookEff($general['book']))*2 - 40; + } elseif(floor($general['crewtype']/10) == 4) { // 차병 통100% + $ratio = (floor($general['leader']*(100-$general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*2 - 40; } else { - $ratio = (floor($general[power]*(100-$general[injury])/100)+getWeapEff($general[weap]))*2 - 40; //10일때 -20, 70일때 100, 100일때 160 + $ratio = (floor($general['power']*(100-$general['injury'])/100)+getWeapEff($general['weap']))*2 - 40; //10일때 -20, 70일때 100, 100일때 160 } if($ratio < 10) { $ratio = 10; } if($ratio > 100) { $ratio = 50 + $ratio/2; } // 100보다 큰 경우는 상승률 1/2 @@ -1493,21 +1493,21 @@ function getAtt($game, $general, $tech, $lbonus) { } function getDef($game, $general, $tech) { - $def = getRate($game, $general[crewtype], "def") + getTechAbil($tech); + $def = getRate($game, $general['crewtype'], "def") + getTechAbil($tech); - $crew = ($general[crew] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점 + $crew = ($general['crew'] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점 $def = $def * $crew / 100; return $def; } function getCityAtt($city) { - $att = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; //50000일때 300점 100000일때 400점 + $att = ($city['def']*0.1 + $city['wall']*0.9) / 500 + 200; //50000일때 300점 100000일때 400점 return $att; } function getCityDef($city) { - $def = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; + $def = ($city['def']*0.1 + $city['wall']*0.9) / 500 + 200; return $def; } @@ -1521,11 +1521,11 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); $game = MYDB_fetch_array($result); - if($city[conflict] == "") { + if($city['conflict'] == "") { unset($nationlist); unset($killnum); } else { - $nationlist = explode("|", $city[conflict]); + $nationlist = explode("|", $city['conflict']); $killnum = explode("|", $city[conflict2]); } @@ -1537,20 +1537,20 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁】$nation[name](이)가 $city[name] 공략에 가담하여 분쟁이 발생하고 있습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁】$nation['name'](이)가 $city['name'] 공략에 가담하여 분쟁이 발생하고 있습니다."; pushHistory($connect, $history); } $nationlist[$i] = $nationnum; - if($i == 0 || $city[def] == 0) { // 선타, 막타 보너스 + if($i == 0 || $city['def'] == 0) { // 선타, 막타 보너스 $killnum[$i] += round($mykillnum * 1.05); } else { $killnum[$i] += $mykillnum; } - $city[conflict] = implode("|", $nationlist); + $city['conflict'] = implode("|", $nationlist); $city[conflict2] = implode("|", $killnum); - $query = "update city set conflict='$city[conflict]',conflict2='$city[conflict2]' where city='$city[city]'"; + $query = "update city set conflict='$city['conflict']',conflict2='$city[conflict2]' where city='$city['city']'"; MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); return $city; @@ -1565,8 +1565,8 @@ function DeleteConflict($connect, $nation) { for($k=0; $k < $cityNum; $k++) { $city = MYDB_fetch_array($result); - if(strpos($city[conflict], $nation)) { - $nationlist = explode("|", $city[conflict]); + if(strpos($city['conflict'], $nation)) { + $nationlist = explode("|", $city['conflict']); $killnum = explode("|", $city[conflict2]); $count = count($nationlist); @@ -1580,14 +1580,14 @@ function DeleteConflict($connect, $nation) { $conflict = implode("|", $nationlist); $conflict2 = implode("|", $killnum); - $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='$city[city]'"; + $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='$city['city']'"; MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); } } } function getConquerNation($connect, $city) { - $nationlist = explode("|", $city[conflict]); + $nationlist = explode("|", $city['conflict']); $killnum = explode("|", $city[conflict2]); $max = 0; @@ -1603,138 +1603,138 @@ function getConquerNation($connect, $city) { function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { global $_armperphase, $_maximumatmos, $_basegold, $_baserice; - if($destnation[nation] > 0) { - $destnationName = "$destnation[name]의"; + if($destnation['nation'] > 0) { + $destnationName = "$destnation['name']의"; } else { $destnationName = "공백지인"; } - $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 $city[name] 공략에 성공했습니다."; - $log[count($log)] = "$city[name] 공략에 성공했습니다."; - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【지배】$nation[name](이)가 $city[name](을)를 지배했습니다."; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 함락시킴"); - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$general[name](이)가 {$destnationName} $city[name](을)를 점령"); - $destnation = addNationHistory($connect, $destnation, "●{$game[year]}년 {$game[month]}월:$nation[name]$general[name]에 의해 $city[name](이)가 함락"); + $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 $city['name'] 공략에 성공했습니다."; + $log[count($log)] = "$city['name'] 공략에 성공했습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【지배】$nation['name'](이)가 $city['name'](을)를 지배했습니다."; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:$city['name'](을)를 함락시킴"); + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$general['name'](이)가 {$destnationName} $city['name'](을)를 점령"); + $destnation = addNationHistory($connect, $destnation, "●{$game['year']}년 {$game['month']}월:$nation['name']$general['name']에 의해 $city['name'](이)가 함락"); - $query = "select city from city where nation='$city[nation]'"; + $query = "select city from city where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); // 국가 멸망시 - if($citycount == 1 && $city[nation] != 0) { - $query = "select nation,name,history,tech,type from nation where nation='$nation[nation]'"; + if($citycount == 1 && $city['nation'] != 0) { + $query = "select nation,name,history,tech,type from nation where nation='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice from nation where nation='$city[nation]'"; + $query = "select nation,name,gold,rice from nation where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losenation = MYDB_fetch_array($result); - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【멸망】$losenation[name](이)가 멸망하였습니다."; - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$losenation[name](을)를 정복"); + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【멸망】$losenation['name'](이)가 멸망하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$losenation['name'](을)를 정복"); - $query = "select no from general where nation='$general[nation]' and level='12'"; + $query = "select no from general where nation='$general['nation']' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); //다굴치는 나라들 전방설정을 위해 미리 얻어옴 - $query = "select you from diplomacy where me='$losenation[nation]' and state<2"; + $query = "select you from diplomacy where me='$losenation['nation']' and state<2"; $dipResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($dipResult); $loseGeneralGold = 0; $loseGeneralRice = 0; //멸망국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='$city[nation]'"; + $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='$city['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation[name](이)가 멸망했습니다."; + $genlog[0] = "$losenation['name'](이)가 멸망했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - $loseGold = floor($gen[gold] * (rand()%30+20)/100.0); - $loseRice = floor($gen[rice] * (rand()%30+20)/100.0); + $loseGold = floor($gen['gold'] * (rand()%30+20)/100.0); + $loseRice = floor($gen['rice'] * (rand()%30+20)/100.0); $genlog[1] = "●도주하며 금$loseGold 쌀$loseRice을 분실했습니다."; - $query = "update general set gold=gold-{$loseGold},rice=rice-{$loseRice} where no={$gen[no]}"; + $query = "update general set gold=gold-{$loseGold},rice=rice-{$loseRice} where no={$gen['no']}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$game[year]}년 {$game[month]}월:$losenation[name](이)가 멸망"); + $gen = addHistory($connect, $gen, "●{$game['year']}년 {$game['month']}월:$losenation['name'](이)가 멸망"); $loseGeneralGold += $loseGold; $loseGeneralRice += $loseRice; //모두 등용장 발부 - if($nation[name] == "강족" || $nation[name] == "저족" || $nation[name] == "흉노족" - || $nation[name] == "남만족" || $nation[name] == "산월족" || $nation[name] == "오환족" - || $nation[name] == "왜족") { + if($nation['name'] == "강족" || $nation['name'] == "저족" || $nation['name'] == "흉노족" + || $nation['name'] == "남만족" || $nation['name'] == "산월족" || $nation['name'] == "오환족" + || $nation['name'] == "왜족") { //등용장 미발부 } elseif(rand() % 100 < 50) { - ScoutMsg($connect, $ruler[no], $nation[name], $gen[no], $gen[msgindex]); + ScoutMsg($connect, $ruler['no'], $nation['name'], $gen['no'], $gen['msgindex']); } //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) - if($gen[npc] >= 2 && $gen[npc] <= 4 && rand() % 100 < 10) { - $commissionCommand = EncodeCommand(0, 0, $nation[nation], 25); //임관 - $query = "update general set turn0='$commissionCommand' where no={$gen[no]}"; + if($gen['npc'] >= 2 && $gen['npc'] <= 4 && rand() % 100 < 10) { + $commissionCommand = EncodeCommand(0, 0, $nation['nation'], 25); //임관 + $query = "update general set turn0='$commissionCommand' where no={$gen['no']}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } unset($genlog[1]); // 승전국 보상 - $losenation[gold] -= $_basegold; - $losenation[rice] -= $_baserice; - if($losenation[gold] < 0) { $losenation[gold] = 0; } - if($losenation[rice] < 0) { $losenation[rice] = 0; } + $losenation['gold'] -= $_basegold; + $losenation['rice'] -= $_baserice; + if($losenation['gold'] < 0) { $losenation['gold'] = 0; } + if($losenation['rice'] < 0) { $losenation['rice'] = 0; } - $losenation[gold] += $loseGeneralGold; - $losenation[rice] += $loseGeneralRice; + $losenation['gold'] += $loseGeneralGold; + $losenation['rice'] += $loseGeneralRice; - $losenation[gold] = floor($losenation[gold] / 2); - $losenation[rice] = floor($losenation[gold] / 2); + $losenation['gold'] = floor($losenation['gold'] / 2); + $losenation['rice'] = floor($losenation['gold'] / 2); // 기본량 제외 금쌀50% + 장수들 분실 금쌀50% 흡수 - $query = "update nation set gold=gold+'$losenation[gold]',rice=rice+'$losenation[rice]' where nation='$general[nation]'"; + $query = "update nation set gold=gold+'$losenation['gold']',rice=rice+'$losenation['rice']' where nation='$general['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; + $query = "select no,name,nation from general where nation='$general['nation']' and level>='9'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation[name] 정복으로 금$losenation[gold] 쌀$losenation[rice]을 획득했습니다."; + $genlog[0] = "$losenation['name'] 정복으로 금$losenation['gold'] 쌀$losenation['rice']을 획득했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); } //분쟁기록 모두 지움 - DeleteConflict($connect, $city[nation]); + DeleteConflict($connect, $city['nation']); // 전 장수 공헌 명성치 깎음 - $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='$city[nation]'"; + $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 도시 공백지로 - $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='$city[nation]'"; + $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 장수 소속 무소속으로, 재야로, 부대 탈퇴 - $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='$city[nation]'"; + $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 삭제 - $query = "delete from troop where nation='$city[nation]'"; + $query = "delete from troop where nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$city[nation]' or you='$city[nation]'"; + $query = "delete from diplomacy where me='$city['nation']' or you='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가 삭제 - $query = "delete from nation where nation='$city[nation]'"; + $query = "delete from nation where nation='$city['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아까 얻어온 다굴국들 전방설정 for($i=0; $i < $dipCount; $i++) { $dip = MYDB_fetch_array($dipResult); //전방설정 - SetNationFront($connect, $dip[you]); + SetNationFront($connect, $dip['you']); } // 멸망이 아니면 } else { @@ -1746,32 +1746,32 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $query = "update general set level='1' where no='$city[gen3]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수도였으면 긴급 천도 - if($destnation[capital] == $city[city]) { - $dist = distance($connect, $city[city]); + if($destnation['capital'] == $city['city']) { + $dist = distance($connect, $city['city']); - $query = "select city,name,pop from city where nation='$destnation[nation]' and city!='$city[city]'"; + $query = "select city,name,pop from city where nation='$destnation['nation']' and city!='$city['city']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); $minDist = 99; $minCity = 0; $minCityPop = 0; for($i=0; $i < $cityCount; $i++) { $nextCap = MYDB_fetch_array($result); - if($minDist > $dist[$nextCap[city]]) { - $minDist = $dist[$nextCap[city]]; - $minCity = $nextCap[city]; - $minCityPop = $nextCap[pop]; - $minCityName = $nextCap[name]; - } elseif($minDist == $dist[$nextCap[city]] && $minCityPop < $nextCap[pop]) { - $minDist = $dist[$nextCap[city]]; - $minCity = $nextCap[city]; - $minCityPop = $nextCap[pop]; - $minCityName = $nextCap[name]; + if($minDist > $dist[$nextCap['city']]) { + $minDist = $dist[$nextCap['city']]; + $minCity = $nextCap['city']; + $minCityPop = $nextCap['pop']; + $minCityName = $nextCap['name']; + } elseif($minDist == $dist[$nextCap['city']] && $minCityPop < $nextCap['pop']) { + $minDist = $dist[$nextCap['city']]; + $minCity = $nextCap['city']; + $minCityPop = $nextCap['pop']; + $minCityName = $nextCap['name']; } } - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【긴급천도】$destnation[name](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【긴급천도】$destnation['name'](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$destnation[nation]' and level>='5'"; + $query = "select no,name,nation from general where nation='$destnation['nation']' and level>='5'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "●수도가 함락되어 $minCityName으로 긴급천도합니다."; @@ -1780,63 +1780,63 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { pushGenLog($gen, $genlog); } //천도 - $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='$destnation[nation]'"; + $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //보급도시로 만듬 $query = "update city set supply=1 where city='$minCity'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수뇌부 이동 - $query = "update general set city='$minCity' where nation='$destnation[nation]' and level>='5'"; + $query = "update general set city='$minCity' where nation='$destnation['nation']' and level>='5'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //장수 사기 감소 - $query = "update general set atmos=atmos*0.8 where nation='$destnation[nation]'"; + $query = "update general set atmos=atmos*0.8 where nation='$destnation['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } - $general[atmos] *= 1.1; //사기 증가 - if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } + $general['atmos'] *= 1.1; //사기 증가 + if($general['atmos'] > $_maximumatmos) { $general['atmos'] = $_maximumatmos; } $conquerNation = getConquerNation($connect, $city); - if($conquerNation == $general[nation]) { + if($conquerNation == $general['nation']) { // 이동 및 사기 변경 - $query = "update general set city='$city[city]',atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + $query = "update general set city='$city['city']',atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($city[level] > 3) { + if($city['level'] > 3) { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$general['nation']',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$general['nation']',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //전방설정 - SetNationFront($connect, $nation[nation]); - SetNationFront($connect, $destnation[nation]); + SetNationFront($connect, $nation['nation']); + SetNationFront($connect, $destnation['nation']); } else { $query = "select name,nation,history from nation where nation='$conquerNation'"; $conquerResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $conquerNationArray = MYDB_fetch_array($conquerResult); - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁협상】$conquerNationArray[name](이)가 영토분쟁에서 우위를 점하여 $city[name](을)를 양도받았습니다."; - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 $conquerNationArray[name]양도"); - $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game[year]}년 {$game[month]}월:$nation[name]에서 $city[name](을)를 양도 받음"); + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁협상】$conquerNationArray['name'](이)가 영토분쟁에서 우위를 점하여 $city['name'](을)를 양도받았습니다."; + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$city['name'](을)를 $conquerNationArray['name']양도"); + $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game['year']}년 {$game['month']}월:$nation['name']에서 $city['name'](을)를 양도 받음"); // 이동X 및 사기 변경 - $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; + $query = "update general set atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($city[level] > 3) { + if($city['level'] > 3) { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //전방설정 - SetNationFront($connect, $destnation[nation]); + SetNationFront($connect, $destnation['nation']); SetNationFront($connect, $conquerNation); } diff --git a/twe/processing.php b/twe/processing.php index 49788cdd..650cf2c0 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -143,15 +143,15 @@ function ender($type=0) { } function command_99($connect, $turn) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - if($me[level] >= 5) { + if($me['level'] >= 5) { $command = EncodeCommand(0, 0, 0, 99); for($i=0; $i < sizeof($turn); $i++) { - $query = "update nation set l{$me[level]}turn{$turn[$i]}='{$command}' where nation='$me[nation]'"; + $query = "update nation set l{$me['level']}turn{$turn[$i]}='{$command}' where nation='$me['nation']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -206,30 +206,30 @@ function command_11($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); //현재 도시 - $query = "select city,region from city where city='$me[city]'"; + $query = "select city,region from city where city='$me['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $curCity = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$me[nation]'"; + $query = "select level,tech from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($me[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($me[level] >= 5) { - $lbonus = $nation[level]; + if($me['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($me['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } $explain = GetExplain(); - if($admin[year] < $admin[startyear]+3) { + if($admin['year'] < $admin['startyear']+3) { //그 국가에서 그 병종 가능한지 $valid[0] = 1; $color[0] = $_basecolor2; $valid[10] = 1; $color[10] = $_basecolor2; @@ -239,23 +239,23 @@ function command_11($connect, $turn, $command) { $valid[41] = 1; $color[41] = "red"; // 충차 } else { // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me[nation]'"; + $query = "select city,level,region from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $citycount = MYDB_num_rows($result); for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($result); // 기술 1000 이상부터 지역병 - if($nation[tech] >= 1000) { - $myregion[$city[region]] = 1; + if($nation['tech'] >= 1000) { + $myregion[$city['region']] = 1; } // 기술 2000 이상부터 이민족병 - if($city[level] == 4 && $nation[tech] >= 2000) { - $mycity[$city[city]] = 1; + if($city['level'] == 4 && $nation['tech'] >= 2000) { + $mycity[$city['city']] = 1; } // 기술 3000 이상부터 특수병 - if($city[level] == 8 && $nation[tech] >= 3000) { - $mycity[$city[city]] = 1; + if($city['level'] == 8 && $nation['tech'] >= 3000) { + $mycity[$city['city']] = 1; } } @@ -294,19 +294,19 @@ function command_11($connect, $turn, $command) { $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) // 남귀병은 기술1등급부터 - if($nation[tech] < 1000) { + if($nation['tech'] < 1000) { $valid[35] = 0; } // 충차는 기술1등급부터 - if($nation[tech] < 1000) { + if($nation['tech'] < 1000) { $valid[41] = 0; } } - $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; - $crew = $leader - round($me[crew]/100); - $abil = getTechAbil($nation[tech]); - $cost = getTechCost($nation[tech]); + $leader = floor($me['leader'] * (100 - $me['injury'])/100) + getHorseEff($me['horse']) + $lbonus; + $crew = $leader - round($me['crew']/100); + $abil = getTechAbil($nation['tech']); + $cost = getTechCost($nation['tech']); echo " 병사를 모집합니다. 훈련과 사기치는 낮지만 가격이 저렴합니다.
가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
@@ -356,11 +356,11 @@ function calc(cost, formnum) { @@ -384,7 +384,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 보병, 징병 if($me[special2] == 50) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -396,7 +396,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -434,7 +434,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 궁병, 징병 if($me[special2] == 51) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -446,7 +446,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -484,7 +484,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 기병, 징병 if($me[special2] == 52) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -496,7 +496,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -534,7 +534,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 귀병, 징병 if($me[special2] == 40) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -546,7 +546,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -584,7 +584,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 공성, 징병 if($me[special2] == 53) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -596,7 +596,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -639,30 +639,30 @@ function command_12($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); //현재 도시 - $query = "select city,region from city where city='$me[city]'"; + $query = "select city,region from city where city='$me['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $curCity = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$me[nation]'"; + $query = "select level,tech from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($me[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($me[level] >= 5) { - $lbonus = $nation[level]; + if($me['level'] == 12) { + $lbonus = $nation['level'] * 2; + } elseif($me['level'] >= 5) { + $lbonus = $nation['level']; } else { $lbonus = 0; } $explain = GetExplain(); - if($admin[year] < $admin[startyear]+3) { + if($admin['year'] < $admin['startyear']+3) { //그 국가에서 그 병종 가능한지 $valid[0] = 1; $color[0] = $_basecolor2; $valid[10] = 1; $color[10] = $_basecolor2; @@ -672,23 +672,23 @@ function command_12($connect, $turn, $command) { $valid[41] = 1; $color[41] = "red"; // 충차 } else { // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me[nation]'"; + $query = "select city,level,region from city where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $citycount = MYDB_num_rows($result); for($i=0; $i < $citycount; $i++) { $city = MYDB_fetch_array($result); // 기술 1000 이상부터 지역병 - if($nation[tech] >= 1000) { - $myregion[$city[region]] = 1; + if($nation['tech'] >= 1000) { + $myregion[$city['region']] = 1; } // 기술 2000 이상부터 이민족병 - if($city[level] == 4 && $nation[tech] >= 2000) { - $mycity[$city[city]] = 1; + if($city['level'] == 4 && $nation['tech'] >= 2000) { + $mycity[$city['city']] = 1; } // 기술 3000 이상부터 특수병 - if($city[level] == 8 && $nation[tech] >= 3000) { - $mycity[$city[city]] = 1; + if($city['level'] == 8 && $nation['tech'] >= 3000) { + $mycity[$city['city']] = 1; } } @@ -727,19 +727,19 @@ function command_12($connect, $turn, $command) { $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) // 남귀병은 기술1등급부터 - if($nation[tech] < 1000) { + if($nation['tech'] < 1000) { $valid[35] = 0; } // 충차는 기술1등급부터 - if($nation[tech] < 1000) { + if($nation['tech'] < 1000) { $valid[41] = 0; } } - $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; - $crew = $leader - round($me[crew]/100); - $abil = getTechAbil($nation[tech]); - $cost = getTechCost($nation[tech]); + $leader = floor($me['leader'] * (100 - $me['injury'])/100) + getHorseEff($me['horse']) + $lbonus; + $crew = $leader - round($me['crew']/100); + $abil = getTechAbil($nation['tech']); + $cost = getTechCost($nation['tech']); echo " 병사를 모집합니다. 훈련과 사기치는 높지만 자금이 많이 듭니다.
가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
@@ -790,11 +790,11 @@ function calc(cost, formnum) {
@@ -818,7 +818,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 보병, 징병 if($me[special2] == 50) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -830,7 +830,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -868,7 +868,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 궁병, 징병 if($me[special2] == 51) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -880,7 +880,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -918,7 +918,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 기병, 징병 if($me[special2] == 52) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -930,7 +930,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -968,7 +968,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 귀병, 징병 if($me[special2] == 40) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -980,7 +980,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -1018,7 +1018,7 @@ function calc(cost, formnum) { $ric = $admin["ric{$i}"] * $cost; $cst = $admin["cst{$i}"] * $cost; //성격 보정 - $cst = CharCost($cst, $me[personal]); + $cst = CharCost($cst, $me['personal']); //특기 보정 : 공성, 징병 if($me[special2] == 53) { $cst *= 0.9; } if($me[special2] == 72) { $cst *= 0.5; } @@ -1030,7 +1030,7 @@ function calc(cost, formnum) { $cst = round($cst); $l = $color[$i]; $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } + if($admin['img'] < 2) { $weapImage = "{$image}/default.jpg"; } echo " @@ -1068,12 +1068,12 @@ function calc(cost, formnum) { function command_15($connect, $turn, $command) { starter("재편성"); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $me = $general[no]; + $me = $general['no']; - $query = "select no,name from general where nation='$general[nation]'"; + $query = "select no,name from general where nation='$general['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1084,9 +1084,9 @@ function command_15($connect, $turn, $command) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if($me != $general[no]) { + if($me != $general['no']) { echo " - "; + "; } } @@ -1109,11 +1109,11 @@ function command_15($connect, $turn, $command) { function command_16($connect, $turn, $command) { starter("출병"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general[city]'"; + $query = "select city,name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1123,7 +1123,7 @@ function command_16($connect, $turn, $command) { 선택된 도시로 침공을 합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity[name] => +$currentcity['name'] => "; OptionsForCitys(); @@ -1182,7 +1182,7 @@ $currentcity[name] => "; - printCitysName($connect, $currentcity[city], 1); + printCitysName($connect, $currentcity['city'], 1); ender(); } @@ -1190,7 +1190,7 @@ $currentcity[name] => function command_22($connect, $turn, $command) { starter("등용"); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1209,33 +1209,33 @@ function command_22($connect, $turn, $command) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if ($general[npc] >= 2) { $style = "style=color:cyan;"; } - elseif($general[npc] == 1) { $style = "style=color:skyblue;"; } + if ($general['npc'] >= 2) { $style = "style=color:cyan;"; } + elseif($general['npc'] == 1) { $style = "style=color:skyblue;"; } else { $style = ""; } echo " - "; + "; } - $query = "select nation,name,color from nation where nation!='$me[nation]'"; + $query = "select nation,name,color from nation where nation!='$me['nation']'"; $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 ""; - $query = "select no,name,npc from general where nation='$nation[nation]' and level!='12' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc from general where nation='$nation['nation']' and level!='12' and npc<2 order by npc,binary(name)"; $genresult = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if ($general[npc] >= 2) { $style = "style=color:cyan;"; } - elseif($general[npc] == 1) { $style = "style=color:skyblue;"; } + if ($general['npc'] >= 2) { $style = "style=color:cyan;"; } + elseif($general['npc'] == 1) { $style = "style=color:skyblue;"; } else { $style = ""; } echo " - "; + "; } } echo " @@ -1255,11 +1255,11 @@ function command_22($connect, $turn, $command) { function command_23($connect, $turn, $command) { starter("포상", 1); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='$general['nation']' and no!='$general['no']' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1270,15 +1270,15 @@ function command_23($connect, $turn, $command) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if ($general[npc] >= 2) { $style = "style=color:cyan;"; } - elseif($general[npc] == 1) { $style = "style=color:skyblue;"; } + if ($general['npc'] >= 2) { $style = "style=color:cyan;"; } + elseif($general['npc'] == 1) { $style = "style=color:skyblue;"; } else { $style = ""; } - if($general[level] >= 5) { + if($general['level'] >= 5) { echo " - "; + "; } else { echo " - "; + "; } } @@ -1325,11 +1325,11 @@ function command_23($connect, $turn, $command) { function command_24($connect, $turn, $command) { starter("몰수", 1); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='$general['nation']' and no!='$general['no']' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1341,15 +1341,15 @@ function command_24($connect, $turn, $command) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if ($general[npc] >= 2) { $style = "style=color:cyan;"; } - elseif($general[npc] == 1) { $style = "style=color:skyblue;"; } + if ($general['npc'] >= 2) { $style = "style=color:cyan;"; } + elseif($general['npc'] == 1) { $style = "style=color:skyblue;"; } else { $style = ""; } - if($general[level] >= 5) { + if($general['level'] >= 5) { echo " - "; + "; } else { echo " - "; + "; } } @@ -1403,7 +1403,7 @@ function command_25($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nations from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nations from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1429,26 +1429,26 @@ function command_25($connect, $turn, $command) { for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); - if($nation[scoutmsg] == "") { - $scoutStr .= "
"; + if($nation['scoutmsg'] == "") { + $scoutStr .= ""; } else { - $scoutStr .= ""; + $scoutStr .= ""; } - if($admin[year] < $admin[startyear]+3 && $nation[gennum] >= 10) { + if($admin['year'] < $admin['startyear']+3 && $nation['gennum'] >= 10) { echo " - "; - } elseif($nation[scout] == 1) { + "; + } elseif($nation['scout'] == 1) { echo " - "; + "; } elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { /* echo " - "; + "; */ } else { echo " - "; + "; } } echo " @@ -1473,11 +1473,11 @@ function command_25($connect, $turn, $command) { function command_27($connect, $turn, $command) { starter("발령", 1); - $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$me[nation]' and no!='$me[no]' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='$me['nation']' and no!='$me['no']' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1492,15 +1492,15 @@ function command_27($connect, $turn, $command) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - if ($general[npc] >= 2) { $style = "style=color:cyan;"; } - elseif($general[npc] == 1) { $style = "style=color:skyblue;"; } + if ($general['npc'] >= 2) { $style = "style=color:cyan;"; } + elseif($general['npc'] == 1) { $style = "style=color:skyblue;"; } else { $style = ""; } - if($general[level] >= 5) { + if($general['level'] >= 5) { echo " - "; + "; } else { echo " - "; + "; } } @@ -1529,11 +1529,11 @@ function command_27($connect, $turn, $command) { function command_30($connect, $turn, $command) { starter("강행"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general[city]'"; + $query = "select city,name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1544,7 +1544,7 @@ function command_30($connect, $turn, $command) { 최대 3칸내 도시로만 강행이 가능합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity[name] => +$currentcity['name'] => "; OptionsForCitys(); @@ -1608,19 +1608,19 @@ $currentcity[name] => 모든 도시가 가능하지만 많은 정보를 얻을 수 있는
"; - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); + printCitysName($connect, $currentcity['city'], 1); + printCitysName($connect, $currentcity['city'], 2); ender(); } function command_32($connect, $turn, $command) { starter("화계"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general[city]'"; + $query = "select city,name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1630,7 +1630,7 @@ function command_32($connect, $turn, $command) { 선택된 도시에 화계를 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity[name] => +$currentcity['name'] => "; OptionsForCitys(); @@ -1688,19 +1688,19 @@ $currentcity[name] => "; - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); + printCitysName($connect, $currentcity['city'], 1); + printCitysName($connect, $currentcity['city'], 2); ender(); } function command_34($connect, $turn, $command) { starter("파괴"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general[city]'"; + $query = "select city,name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1710,7 +1710,7 @@ function command_34($connect, $turn, $command) { 선택된 도시에 파괴를 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity[name] => +$currentcity['name'] => "; OptionsForCitys(); @@ -1768,19 +1768,19 @@ $currentcity[name] => "; - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); + printCitysName($connect, $currentcity['city'], 1); + printCitysName($connect, $currentcity['city'], 2); ender(); } function command_36($connect, $turn, $command) { starter("기습"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general[city]'"; + $query = "select city,name from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1790,7 +1790,7 @@ function command_36($connect, $turn, $command) { 선택된 도시에 기습을 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity[name] => +$currentcity['name'] => @@ -2139,11 +2139,11 @@ function command_49($connect, $turn, $command) { function command_51($connect, $turn, $command) { starter("항복 권고", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select nation,power from nation where nation='$me[nation]'"; + $query = "select nation,power from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -2155,17 +2155,17 @@ function command_51($connect, $turn, $command) { "; - $query = "select nation,name,color from nation where nation!='$me[nation]'"; + $query = "select nation,name,color from nation where nation!='$me['nation']'"; $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 ""; } echo " @@ -2234,7 +2234,7 @@ function command_52($connect, $turn, $command) { "; - for($i=1; $i <= $mynation[level]; $i++) { + for($i=1; $i <= $mynation['level']; $i++) { echo ""; } echo " @@ -2250,7 +2250,7 @@ function command_52($connect, $turn, $command) { "; - for($i=1; $i <= $mynation[level]; $i++) { + for($i=1; $i <= $mynation['level']; $i++) { echo ""; } echo " @@ -2271,7 +2271,7 @@ function command_52($connect, $turn, $command) { function command_53($connect, $turn, $command) { starter("통합제의", 1); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; + $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2283,7 +2283,7 @@ function command_53($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $stdNation = MYDB_fetch_array($result); - $query = "select nation,power,gennum from nation where nation='$me[nation]'"; + $query = "select nation,power,gennum from nation where nation='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -2295,20 +2295,20 @@ function command_53($connect, $turn, $command) { 대상국 : "; - $query = "select you,state from diplomacy where me='$me[nation]'"; + $query = "select you,state from diplomacy where me='$me['nation']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=1; $i <= $count; $i++) { $dip = MYDB_fetch_array($result); - $diplomacy[$dip[you]] = $dip[state]; + $diplomacy[$dip['you']] = $dip['state']; } - $query = "select nation,name,color from nation where nation!='$me[nation]'"; + $query = "select nation,name,color from nation where nation!='$me['nation']'"; $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); - switch($diplomacy[$nation[nation]]) { + switch($diplomacy[$nation['nation']]) { case 0: $color = "red"; break; case 1: $color = "red"; break; case 2: $color = "black"; break; @@ -2416,7 +2416,7 @@ function command_61($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -2460,7 +2460,7 @@ function command_61($connect, $turn, $command) { function command_62($connect, $turn, $command) { starter("선전포고", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2473,29 +2473,29 @@ function command_62($connect, $turn, $command) { 대상 국가 @@ -2525,7 +2525,7 @@ function command_62($connect, $turn, $command) { function command_63($connect, $turn, $command) { starter("종전", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2536,22 +2536,22 @@ function command_63($connect, $turn, $command) { 대상 국가 @@ -2581,7 +2581,7 @@ function command_63($connect, $turn, $command) { function command_64($connect, $turn, $command) { starter("파기", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2592,22 +2592,22 @@ function command_64($connect, $turn, $command) { 대상 국가 @@ -2636,11 +2636,11 @@ function command_64($connect, $turn, $command) { function command_65($connect, $turn, $command) { starter("초토화", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2673,11 +2673,11 @@ echo " function command_66($connect, $turn, $command) { starter("천도", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2711,11 +2711,11 @@ echo " function command_67($connect, $turn, $command) { starter("증축", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2749,11 +2749,11 @@ echo " function command_68($connect, $turn, $command) { starter("감축", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2787,11 +2787,11 @@ echo " function command_72($connect, $turn, $command) { starter("백성동원", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2825,11 +2825,11 @@ echo " function command_73($connect, $turn, $command) { starter("수몰", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2863,11 +2863,11 @@ echo " function command_74($connect, $turn, $command) { starter("허보", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; + $query = "select city from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name,path from city where city='$general[city]'"; + $query = "select name,path from city where city='$general['city']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -2902,7 +2902,7 @@ echo " function command_75($connect, $turn, $command) { starter("피장파장", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2914,22 +2914,22 @@ function command_75($connect, $turn, $command) { 대상 국가 @@ -2959,7 +2959,7 @@ function command_75($connect, $turn, $command) { function command_77($connect, $turn, $command) { starter("이호경식", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2971,22 +2971,22 @@ function command_77($connect, $turn, $command) { 대상 국가 @@ -3016,7 +3016,7 @@ function command_77($connect, $turn, $command) { function command_78($connect, $turn, $command) { starter("급습", 1); - $query = "select nation from general where user_id='$_SESSION[p_id]'"; + $query = "select nation from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3028,22 +3028,22 @@ function command_78($connect, $turn, $command) { 대상 국가 @@ -3081,7 +3081,7 @@ function command_81($connect, $turn, $command) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $nationcolor[$i] = $nation[color]; + $nationcolor[$i] = $nation['color']; } $validCount = count($color); //등록된 색깔 가려내기 diff --git a/twe/scenario_1.php b/twe/scenario_1.php index e39633f0..16aa9cc5 100644 --- a/twe/scenario_1.php +++ b/twe/scenario_1.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드1 : 184년 황건적의 난 //////////////////////////국가1///////////////////////////////////////////////// @@ -780,7 +780,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_10.php b/twe/scenario_10.php index 47588492..82def41a 100644 --- a/twe/scenario_10.php +++ b/twe/scenario_10.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드10 : 225년 칠종칠금 //////////////////////////국가1///////////////////////////////////////////////// @@ -883,7 +883,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_11.php b/twe/scenario_11.php index e064095a..bb6220b6 100644 --- a/twe/scenario_11.php +++ b/twe/scenario_11.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드11 : 228년 출사표 //////////////////////////국가1///////////////////////////////////////////////// @@ -883,7 +883,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_12.php b/twe/scenario_12.php index 73d612cc..81000489 100644 --- a/twe/scenario_12.php +++ b/twe/scenario_12.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //IF모드1 : 191년 백마장군의 위세 //국가1 원소 국가2 공손찬 국가3 동탁 국가4 원술 국가5 유언 국가6 마등 국가7 유표 @@ -1166,7 +1166,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_2.php b/twe/scenario_2.php index 8340b15b..4cd917fa 100644 --- a/twe/scenario_2.php +++ b/twe/scenario_2.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_190A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드2 : 190년 반동탁연합 //국가1 동탁 국가2 원소 국가3 유표 국가4 조조 국가5 유언 국가6 원술 국가7 손견 @@ -1686,7 +1686,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_20.php b/twe/scenario_20.php index a4ae577f..1a2a9183 100644 --- a/twe/scenario_20.php +++ b/twe/scenario_20.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드1 : 180년 영웅 난무 //////////////////////////외교////////////////////////////////////////////////// diff --git a/twe/scenario_21.php b/twe/scenario_21.php index 6dd317b0..165a92b1 100644 --- a/twe/scenario_21.php +++ b/twe/scenario_21.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드1 : 180년 영웅 집결 //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_22.php b/twe/scenario_22.php index 5176501c..2a986d70 100644 --- a/twe/scenario_22.php +++ b/twe/scenario_22.php @@ -17,94 +17,94 @@ $admin = MYDB_fetch_array($result); //////////////////////////장수////////////////////////////////////////////////// // 이름 통 무 지 꿈 특기 $gencount = 1679; -RegGeneral2($connect,$admin[turnterm],$gencount,"6글자 이내", 63, 46, 62,"안전","징병", "장수명에 6글자 이내로 입력하라고 해서 6글자 이내를 입력했습니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "Cato", 44, 41, 67,"재간","저격", "★☆ 승리의 카토 ★☆"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "hui", 42, 61, 53,"재간","저격", "모반으로 천통군주된 먹튀 후이에요~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "Misty", 63, 71, 25,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "yhp", 34, 53, 75,"재간","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "갈매기", 46, 32, 70,"재간","귀병", "끼룩 끼룩 끼끼룩~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "강유", 75, 18, 74,"왕좌","무쌍", "제대할때까지 NPC가 대신 활동함..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "개수작", 74, 72, 19,"출세","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "견희", 62, 76, 13,"정복","무쌍", "피리로 다 쓸어버리겠다!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "계백의난", 82, 65, 18,"패권","공성", "이거 이름 잘못됐네요. 훼백의난이에요."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "김동팔", 52, 40, 64,"왕좌","상재", "띠용~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "낭군", 66, 25, 73,"대의","보병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"내동생고기", 55, 75, 31,"유지","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "네시", 75, 85, 11,"의협","무쌍", "내가 군대에 있어도 분신이 움직임. ㄳ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "독우", 32, 60, 65,"출세","경작", "장비한테 쳐맞은 독우올시다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"뒷집할머니", 63, 60, 31,"의협","축성", "꺄훌~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "듀라한", 74, 75, 10,"패권","격노", "그거 나 안해! 삭턴탈꺼야!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "땅꾼", 64, 85, 10,"왕좌","위압", "숨은 굇수인 나를 모름?"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "라디에르", 76, 65, 14,"대의","수비", "안냐셍. 훼디에요."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "람슈타인", 74, 66, 20,"출세","견고", "붱.."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "러블리", 50, 72, 63,"재간","발명", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "레스텐", 52, 36, 73,"패권","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "류비연", 70, 10, 62,"대의","인덕", "쌀풀러 왔어요^ㅇ^"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "리칼", 64, 68, 22,"유지","의술", "난 훼신이 아님. 그냥 오덕일뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "마법사", 31, 59, 88,"출세","발명", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "명예회장", 54, 73, 18,"정복","필살", "양민학살 명훼훼장임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "모모리", 75, 20, 70,"패권","통찰", "몹몰러 왔다능~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "묵왕", 70, 70, 10,"정복","궁병", "훼신의 귀환."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "반사대선", 70, 15, 70,"재간","신중", "자소유님 샤릉해요 ㅎ_ㅎ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "불곰", 69, 71, 10,"유지","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "블래싱", 59, 61, 30,"유지","수비", "유... 유리야!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사나에♡", 69, 13, 63,"안전","귀모", "러브호텔에 어서오세요 >ㅁ< ♡"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"6글자 이내", 63, 46, 62,"안전","징병", "장수명에 6글자 이내로 입력하라고 해서 6글자 이내를 입력했습니다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "Cato", 44, 41, 67,"재간","저격", "★☆ 승리의 카토 ★☆"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "hui", 42, 61, 53,"재간","저격", "모반으로 천통군주된 먹튀 후이에요~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "Misty", 63, 71, 25,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "yhp", 34, 53, 75,"재간","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "갈매기", 46, 32, 70,"재간","귀병", "끼룩 끼룩 끼끼룩~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "강유", 75, 18, 74,"왕좌","무쌍", "제대할때까지 NPC가 대신 활동함..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "개수작", 74, 72, 19,"출세","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "견희", 62, 76, 13,"정복","무쌍", "피리로 다 쓸어버리겠다!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "계백의난", 82, 65, 18,"패권","공성", "이거 이름 잘못됐네요. 훼백의난이에요."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "김동팔", 52, 40, 64,"왕좌","상재", "띠용~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "낭군", 66, 25, 73,"대의","보병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"내동생고기", 55, 75, 31,"유지","신중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "네시", 75, 85, 11,"의협","무쌍", "내가 군대에 있어도 분신이 움직임. ㄳ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "독우", 32, 60, 65,"출세","경작", "장비한테 쳐맞은 독우올시다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"뒷집할머니", 63, 60, 31,"의협","축성", "꺄훌~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "듀라한", 74, 75, 10,"패권","격노", "그거 나 안해! 삭턴탈꺼야!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "땅꾼", 64, 85, 10,"왕좌","위압", "숨은 굇수인 나를 모름?"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "라디에르", 76, 65, 14,"대의","수비", "안냐셍. 훼디에요."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "람슈타인", 74, 66, 20,"출세","견고", "붱.."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "러블리", 50, 72, 63,"재간","발명", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "레스텐", 52, 36, 73,"패권","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "류비연", 70, 10, 62,"대의","인덕", "쌀풀러 왔어요^ㅇ^"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "리칼", 64, 68, 22,"유지","의술", "난 훼신이 아님. 그냥 오덕일뿐..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "마법사", 31, 59, 88,"출세","발명", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "명예회장", 54, 73, 18,"정복","필살", "양민학살 명훼훼장임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "모모리", 75, 20, 70,"패권","통찰", "몹몰러 왔다능~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "묵왕", 70, 70, 10,"정복","궁병", "훼신의 귀환."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "반사대선", 70, 15, 70,"재간","신중", "자소유님 샤릉해요 ㅎ_ㅎ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "불곰", 69, 71, 10,"유지","징병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "블래싱", 59, 61, 30,"유지","수비", "유... 유리야!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "사나에♡", 69, 13, 63,"안전","귀모", "러브호텔에 어서오세요 >ㅁ< ♡"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; //////////////////////////장수 끝/////////////////////////////////////////////// @@ -168,10 +168,10 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); // 군주로 // 현 국가 소속으로 - $query = "update general set belong=1,level=12,nation='$nation[nation]' where user_id='$genid'"; + $query = "update general set belong=1,level=12,nation='$nation['nation']' where user_id='$genid'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //외교 추가 - $query = "select nation from nation where nation!='$nation[nation]'"; + $query = "select nation from nation where nation!='$nation['nation']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { @@ -180,14 +180,14 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p insert into diplomacy ( me, you, state, term ) values ( - '$nation[nation]', '$you[nation]', '2', '0' + '$nation['nation']', '$you['nation']', '2', '0' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); @MYDB_query(" insert into diplomacy ( me, you, state, term ) values ( - '$you[nation]', '$nation[nation]', '2', '0' + '$you['nation']', '$nation['nation']', '2', '0' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/scenario_23.php b/twe/scenario_23.php index dee04c1c..156fbed0 100644 --- a/twe/scenario_23.php +++ b/twe/scenario_23.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드3 : 180년 영웅 시대 //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_24.php b/twe/scenario_24.php index 8fb46725..a15084d9 100644 --- a/twe/scenario_24.php +++ b/twe/scenario_24.php @@ -65,171 +65,171 @@ MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //////////////////////////장수////////////////////////////////////////////////// // 이름 통 무 지 꿈 특기 $gencount = 1679; -RegGeneral2($connect,$admin[turnterm],$gencount,"6글자 이내", 63, 46, 62,"안전","징병", "장수명에 6글자 이내로 입력하라고 해서 6글자 이내를 입력했습니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "Cato", 44, 41, 67,"재간","저격", "★☆ 승리의 카토 ★☆"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "hui", 42, 61, 53,"재간","저격", "모반으로 천통군주된 먹튀 후이에요~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "Misty", 63, 71, 25,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "yhp", 34, 53, 75,"재간","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "갈매기", 46, 32, 70,"재간","귀병", "끼룩 끼룩 끼끼룩~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "강유", 75, 18, 74,"왕좌","무쌍", "제대할때까지 NPC가 대신 활동함..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "개수작", 74, 72, 19,"출세","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "견희", 62, 76, 13,"정복","무쌍", "피리로 다 쓸어버리겠다!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "계백의난", 82, 65, 18,"패권","공성", "이거 이름 잘못됐네요. 훼백의난이에요."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "김동팔", 52, 40, 64,"왕좌","상재", "띠용~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "낭군", 66, 25, 73,"대의","보병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"내동생고기", 55, 75, 31,"유지","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "네시", 75, 85, 11,"의협","무쌍", "내가 군대에 있어도 분신이 움직임. ㄳ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "독우", 32, 60, 65,"출세","경작", "장비한테 쳐맞은 독우올시다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"뒷집할머니", 63, 60, 31,"의협","축성", "꺄훌~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "듀라한", 74, 75, 10,"패권","격노", "훼라셀 강림이요."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "땅꾼", 64, 85, 10,"왕좌","위압", "숨은 굇수인 나를 모름?"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "라디에르", 76, 65, 14,"대의","수비", "안냐셍. 훼디에요."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "람슈타인", 74, 66, 20,"출세","견고", "붱.."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "러블리", 50, 72, 63,"재간","발명", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "레스텐", 52, 36, 73,"패권","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "류비연", 70, 10, 62,"대의","인덕", "쌀풀러 왔어요^ㅇ^"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "리칼", 64, 68, 22,"유지","의술", "난 휏신이 아님. 그냥 오덕일뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "마법사", 31, 59, 88,"출세","발명", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "명예회장", 54, 73, 18,"정복","필살", "양민학살 명훼훼장임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "모모리", 75, 20, 70,"패권","통찰", "몹몰러 왔다능~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "묵왕", 70, 70, 10,"정복","궁병", "훼신의 귀환."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "반사대선", 70, 15, 70,"재간","신중", "자소유님 샤릉해요 ㅎ_ㅎ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "불곰", 69, 71, 10,"유지","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "블래싱", 59, 61, 30,"유지","수비", "유... 유리야!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사나에♡", 69, 13, 63,"안전","귀모", "러브호텔에 어서오세요 >ㅁ< ♡"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"6글자 이내", 63, 46, 62,"안전","징병", "장수명에 6글자 이내로 입력하라고 해서 6글자 이내를 입력했습니다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "Cato", 44, 41, 67,"재간","저격", "★☆ 승리의 카토 ★☆"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "hui", 42, 61, 53,"재간","저격", "모반으로 천통군주된 먹튀 후이에요~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "Misty", 63, 71, 25,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "yhp", 34, 53, 75,"재간","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "갈매기", 46, 32, 70,"재간","귀병", "끼룩 끼룩 끼끼룩~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "강유", 75, 18, 74,"왕좌","무쌍", "제대할때까지 NPC가 대신 활동함..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "개수작", 74, 72, 19,"출세","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "견희", 62, 76, 13,"정복","무쌍", "피리로 다 쓸어버리겠다!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "계백의난", 82, 65, 18,"패권","공성", "이거 이름 잘못됐네요. 훼백의난이에요."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "김동팔", 52, 40, 64,"왕좌","상재", "띠용~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "낭군", 66, 25, 73,"대의","보병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"내동생고기", 55, 75, 31,"유지","신중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "네시", 75, 85, 11,"의협","무쌍", "내가 군대에 있어도 분신이 움직임. ㄳ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "독우", 32, 60, 65,"출세","경작", "장비한테 쳐맞은 독우올시다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"뒷집할머니", 63, 60, 31,"의협","축성", "꺄훌~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "듀라한", 74, 75, 10,"패권","격노", "훼라셀 강림이요."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "땅꾼", 64, 85, 10,"왕좌","위압", "숨은 굇수인 나를 모름?"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "라디에르", 76, 65, 14,"대의","수비", "안냐셍. 훼디에요."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "람슈타인", 74, 66, 20,"출세","견고", "붱.."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "러블리", 50, 72, 63,"재간","발명", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "레스텐", 52, 36, 73,"패권","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "류비연", 70, 10, 62,"대의","인덕", "쌀풀러 왔어요^ㅇ^"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "리칼", 64, 68, 22,"유지","의술", "난 휏신이 아님. 그냥 오덕일뿐..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "마법사", 31, 59, 88,"출세","발명", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "명예회장", 54, 73, 18,"정복","필살", "양민학살 명훼훼장임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "모모리", 75, 20, 70,"패권","통찰", "몹몰러 왔다능~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "묵왕", 70, 70, 10,"정복","궁병", "훼신의 귀환."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "반사대선", 70, 15, 70,"재간","신중", "자소유님 샤릉해요 ㅎ_ㅎ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "불곰", 69, 71, 10,"유지","징병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "블래싱", 59, 61, 30,"유지","수비", "유... 유리야!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "사나에♡", 69, 13, 63,"안전","귀모", "러브호텔에 어서오세요 >ㅁ< ♡"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; +RegGeneral2($connect,$admin['turnterm'],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; //군주임명 $no = rand() % 79 + 2; $query = "update general set level=12 where no='$no'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -RegGeneral3($connect,$admin[turnterm],$gencount, 2,12,"오랑캐대왕", 95, 95, 95,"패권","돌격", "오랑캐들이여 일어서라!"); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2,11, "오환대왕", 85, 55, 85,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2,10, "저대왕", 75, 75, 45,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 9, "흉노대왕", 65, 50, 50,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 8, "남만대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 7, "산월대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 6, "왜대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 5, "강대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2,12,"오랑캐대왕", 95, 95, 95,"패권","돌격", "오랑캐들이여 일어서라!"); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2,11, "오환대왕", 85, 55, 85,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2,10, "저대왕", 75, 75, 45,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 9, "흉노대왕", 65, 50, 50,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 8, "남만대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 7, "산월대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 6, "왜대왕", 45, 15, 45,"패권","환술", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 5, "강대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "북적대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "서융대왕", 45, 15, 45,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "동이대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1, "북적대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1, "서융대왕", 45, 15, 45,"패권","돌격", ""); $gencount++; +RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1, "동이대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"북적장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"북적장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"서융장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"서융장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"동이장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"동이장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"강장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"강장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"저장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"저장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"흉노장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"흉노장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"오환장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"오환장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"남만장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"남만장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"산월장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"산월장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } for($k=0; $k <= 99; $k++) { if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"왜장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; + RegGeneral3($connect,$admin['turnterm'],$gencount, 2, 1,"왜장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; } //////////////////////////장수 끝/////////////////////////////////////////////// diff --git a/twe/scenario_25.php b/twe/scenario_25.php index 906f1525..c3cc8cd0 100644 --- a/twe/scenario_25.php +++ b/twe/scenario_25.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드5 : 180년 영웅독존 //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_26.php b/twe/scenario_26.php index 4f32a294..d174771a 100644 --- a/twe/scenario_26.php +++ b/twe/scenario_26.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드6 : 180년 무풍지대 //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_27.php b/twe/scenario_27.php index 46082d2b..5d18462b 100644 --- a/twe/scenario_27.php +++ b/twe/scenario_27.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드7 : 180년 가요대잔치 /* //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_28.php b/twe/scenario_28.php index f233c2bd..36dfb9b8 100644 --- a/twe/scenario_28.php +++ b/twe/scenario_28.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = 1; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = 1; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //가상모드8 : 180년 확산성 밀리언 아서 /* //////////////////////////국가1///////////////////////////////////////////////// diff --git a/twe/scenario_3.php b/twe/scenario_3.php index 34380b1f..ca2b3c2d 100644 --- a/twe/scenario_3.php +++ b/twe/scenario_3.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드3 : 194년 군웅할거 //////////////////////////국가1///////////////////////////////////////////////// @@ -1734,7 +1734,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_4.php b/twe/scenario_4.php index ffc45ada..1ad99bda 100644 --- a/twe/scenario_4.php +++ b/twe/scenario_4.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드4 : 196년 황제는 허도로 //////////////////////////국가1///////////////////////////////////////////////// @@ -1268,7 +1268,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_5.php b/twe/scenario_5.php index c621480b..5ce25929 100644 --- a/twe/scenario_5.php +++ b/twe/scenario_5.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드5 : 200년 관도대전 //////////////////////////국가1///////////////////////////////////////////////// @@ -980,7 +980,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_6.php b/twe/scenario_6.php index f697a60f..b9ff513d 100644 --- a/twe/scenario_6.php +++ b/twe/scenario_6.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드6 : 202년 원가의 분열 //////////////////////////국가1///////////////////////////////////////////////// @@ -1026,7 +1026,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_7.php b/twe/scenario_7.php index 8cc61f2d..ad6b89e2 100644 --- a/twe/scenario_7.php +++ b/twe/scenario_7.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드7 : 207년 적벽대전 //////////////////////////국가1///////////////////////////////////////////////// @@ -1077,7 +1077,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_8.php b/twe/scenario_8.php index 6529ca47..40ea4158 100644 --- a/twe/scenario_8.php +++ b/twe/scenario_8.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드8 : 213년 익주 공방전 //////////////////////////국가1///////////////////////////////////////////////// @@ -929,7 +929,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/scenario_9.php b/twe/scenario_9.php index ba703829..8768603a 100644 --- a/twe/scenario_9.php +++ b/twe/scenario_9.php @@ -43,8 +43,8 @@ $connect=dbConn(); $query = "select startyear,year,month,turnterm,scenario,extend,fiction,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$fiction = $admin[fiction]; $turnterm = $admin[turnterm]; $startyear = $admin[startyear]; $year = $admin[year]; $extend = $admin[extend]; -$img = $admin[img]; +$fiction = $admin['fiction']; $turnterm = $admin['turnterm']; $startyear = $admin['startyear']; $year = $admin['year']; $extend = $admin['extend']; +$img = $admin['img']; //역사모드9 : 219년 삼국정립 //////////////////////////국가1///////////////////////////////////////////////// @@ -854,7 +854,7 @@ $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($con $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); + SetNationFront($connect, $nation['nation']); } //////////////////////////도시 끝/////////////////////////////////////////////// diff --git a/twe/select_npc.php b/twe/select_npc.php index 4935099e..6c3e1e4b 100644 --- a/twe/select_npc.php +++ b/twe/select_npc.php @@ -2,8 +2,8 @@ include "lib.php"; include "func.php"; -$id = $_POST[id]; -$pw = $_POST[pw]; +$id = $_POST['id']; +$pw = $_POST['pw']; $pwTemp = substr($pw, 0, 32); @@ -43,7 +43,7 @@ $query = "select npcmode,maxgeneral,img from game where no='1'"; $result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -if($admin[npcmode] != 1) { +if($admin['npcmode'] != 1) { echo ""; echo ""; exit(); @@ -53,7 +53,7 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -if($gencount >= $admin[maxgeneral]) { +if($gencount >= $admin['maxgeneral']) { echo ""; echo ""; exit(); @@ -69,12 +69,12 @@ $nationcount = MYDB_num_rows($nationresult); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - if($nation[scoutmsg] == "") { + if($nation['scoutmsg'] == "") { echo " -
"; + "; } else { echo " - "; + "; } } ?> @@ -88,7 +88,7 @@ for($i=0; $i < $nationcount; $i++) { = 3) { +if($admin['img'] >= 3) { ?> @@ -108,9 +108,9 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $npc = MYDB_fetch_array($result); - $call = "{$npc[leader]} / {$npc[power]} / {$npc[intel]}"; + $call = "{$npc['leader']} / {$npc['power']} / {$npc['intel']}"; echo " - "; + "; } ?> diff --git a/twe/select_npc_post.php b/twe/select_npc_post.php index ebe9997c..73868744 100644 --- a/twe/select_npc_post.php +++ b/twe/select_npc_post.php @@ -2,9 +2,9 @@ include "lib.php"; include "func.php"; -$id = $_POST[id]; -$pw = $_POST[pw]; -$face = $_POST[face]; +$id = $_POST['id']; +$pw = $_POST['pw']; +$face = $_POST['face']; $pwTemp = substr($pw, 0, 32); @@ -23,7 +23,7 @@ if(!$member) { $date = date('Y-m-d H:i:s'); //등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member['no']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $connect = dbConn(); @@ -43,11 +43,11 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -$query = "select no from general where user_id='$member[id]'"; +$query = "select no from general where user_id='$member['id']'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $id_num = MYDB_num_rows($result); -if($admin[npcmode] != 1) { +if($admin['npcmode'] != 1) { echo ""; echo ""; exit(); @@ -57,26 +57,26 @@ if($admin[npcmode] != 1) { history.go(-1) "); exit; -} elseif($admin[maxgeneral] <= $gencount) { +} elseif($admin['maxgeneral'] <= $gencount) { echo(""); exit; -} elseif($npc[npc] < 2) { +} elseif($npc['npc'] < 2) { echo(""); exit; -} elseif($npc[npc] != 2) { +} elseif($npc['npc'] != 2) { echo(""); exit; /* -} elseif($npc[level] >= 5) { +} elseif($npc['level'] >= 5) { echo(""; exit(); } switch($type) { @@ -29,7 +29,7 @@ case 0: if($k >= 24) break; $query .= ","; } - $query .= " where user_id='$_SESSION[p_id]'"; + $query .= " where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } */ @@ -43,7 +43,7 @@ case 0: if($k >= 24) break; } } - $query .= " where user_id='$_SESSION[p_id]'"; + $query .= " where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: @@ -61,7 +61,7 @@ case 1: if($k < 0) break; $query .= ","; } - $query .= " where user_id='$_SESSION[p_id]'"; + $query .= " where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: @@ -79,7 +79,7 @@ case 2: if($i >= 24) break; $query .= ","; } - $query .= " where user_id='$_SESSION[p_id]'"; + $query .= " where user_id='$_SESSION['p_id']'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } diff --git a/twe/turn_pop_core.php b/twe/turn_pop_core.php index 4198b506..640cb74c 100644 --- a/twe/turn_pop_core.php +++ b/twe/turn_pop_core.php @@ -5,10 +5,10 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where user_id='$_SESSION[p_id]'"; +$query = "select no from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -updateCommand($connect, $me[no], 2); +updateCommand($connect, $me['no'], 2); echo ""; diff --git a/twe/turn_push_core.php b/twe/turn_push_core.php index 740ae1a7..ec7fff46 100644 --- a/twe/turn_push_core.php +++ b/twe/turn_push_core.php @@ -5,11 +5,11 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where user_id='$_SESSION[p_id]'"; +$query = "select no from general where user_id='$_SESSION['p_id']'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -backupdateCommand($connect, $me[no], 2); +backupdateCommand($connect, $me['no'], 2); echo ""; From 44a86cedec15d47f766b76bf3937f06dfa8eb2e8 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 16 Jan 2018 04:00:03 +0900 Subject: [PATCH 024/622] =?UTF-8?q?twe=5Frest=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe_rest/index.html | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 twe_rest/index.html diff --git a/twe_rest/index.html b/twe_rest/index.html deleted file mode 100644 index 2a5d662e..00000000 --- a/twe_rest/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file From 9502197cc2b201918858dce336f970e1f48d9da8 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 16 Jan 2018 04:05:20 +0900 Subject: [PATCH 025/622] =?UTF-8?q?string=20=EB=82=B4=EB=B6=80=20$=20?= =?UTF-8?q?=EA=B8=B0=ED=98=B8=20=EC=B6=94=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_119.php | 2 +- twe/_119_b.php | 2 +- twe/_admin1.php | 2 +- twe/_admin1_submit.php | 6 +- twe/_admin2.php | 2 +- twe/_admin2_submit.php | 30 +- twe/_admin3.php | 2 +- twe/_admin3_submit.php | 12 +- twe/_admin4.php | 4 +- twe/_admin4_submit.php | 4 +- twe/_admin5.php | 6 +- twe/_admin5_submit.php | 6 +- twe/_admin6.php | 2 +- twe/_admin7.php | 2 +- twe/_admin8.php | 2 +- twe/_simul.php | 2 +- twe/a_bestGeneral.php | 2 +- twe/a_emperior.php | 2 +- twe/a_emperior2.php | 2 +- twe/a_genList.php | 2 +- twe/a_history.php | 2 +- twe/a_kingdomList.php | 24 +- twe/a_status.php | 2 +- twe/a_vote.php | 2 +- twe/b_auction.php | 6 +- twe/b_battleCenter.php | 4 +- twe/b_betting.php | 4 +- twe/b_chiefboard.php | 2 +- twe/b_chiefcenter.php | 8 +- twe/b_currentCity.php | 18 +- twe/b_dipcenter.php | 14 +- twe/b_diplomacy.php | 4 +- twe/b_genList.php | 22 +- twe/b_myBossInfo.php | 46 +- twe/b_myCityInfo.php | 32 +- twe/b_myGenInfo.php | 34 +- twe/b_myKingdomInfo.php | 10 +- twe/b_myPage.php | 6 +- twe/b_nationboard.php | 2 +- twe/b_nationrule.php | 4 +- twe/b_tournament.php | 4 +- twe/b_troop.php | 10 +- twe/c_auction.php | 18 +- twe/c_betting.php | 4 +- twe/c_chiefboard.php | 8 +- twe/c_dipcenter.php | 20 +- twe/c_double.php | 22 +- twe/c_msgsubmit.php | 14 +- twe/c_myBossInfo.php | 46 +- twe/c_nationboard.php | 8 +- twe/c_nationrule.php | 4 +- twe/c_tournament.php | 32 +- twe/c_troop.php | 20 +- twe/c_vacation.php | 2 +- twe/c_vote.php | 6 +- twe/commandlist.php | 2 +- twe/d_ally.php | 28 +- twe/d_cancel.php | 22 +- twe/d_cease.php | 26 +- twe/d_merge.php | 26 +- twe/d_scout.php | 52 +-- twe/d_surrender.php | 26 +- twe/event_1.php | 20 +- twe/event_2.php | 20 +- twe/event_3.php | 2 +- twe/event_4.php | 2 +- twe/func.php | 386 ++++++++--------- twe/func_auction.php | 20 +- twe/func_history.php | 4 +- twe/func_npc.php | 134 +++--- twe/func_process.php | 872 +++++++++++++++++++------------------- twe/func_tournament.php | 52 +-- twe/join_post.php | 8 +- twe/login_process.php | 2 +- twe/logout_process.php | 2 +- twe/main.php | 8 +- twe/map.php | 10 +- twe/msglist.php | 2 +- twe/npc_login_process.php | 2 +- twe/preprocessing.php | 2 +- twe/process_war.php | 136 +++--- twe/processing.php | 180 ++++---- twe/scenario_22.php | 8 +- twe/select_npc_post.php | 4 +- twe/stylesheet.php | 2 +- twe/turn.php | 10 +- twe/turn_pop_core.php | 2 +- twe/turn_push_core.php | 2 +- 88 files changed, 1316 insertions(+), 1316 deletions(-) diff --git a/twe/_119.php b/twe/_119.php index 53026166..ef39f6e9 100644 --- a/twe/_119.php +++ b/twe/_119.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_119_b.php b/twe/_119_b.php index 78cf0c09..eb8e746e 100644 --- a/twe/_119_b.php +++ b/twe/_119_b.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin1.php b/twe/_admin1.php index 65a7eeeb..db28e3a0 100644 --- a/twe/_admin1.php +++ b/twe/_admin1.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin1_submit.php b/twe/_admin1_submit.php index 7fbc8430..8f032a9a 100644 --- a/twe/_admin1_submit.php +++ b/twe/_admin1_submit.php @@ -7,7 +7,7 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -82,7 +82,7 @@ switch($btn) { for($i=0; $i < $count; $i++) { $gen = MYDB_fetch_array($result); $turntime = getRandTurn($turnterm); - $query = "update general set turntime='$turntime' where no='$gen['no']'"; + $query = "update general set turntime='$turntime' where no='{$gen['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 턴시간이 너무 멀리 떨어진 선수 제대로 보정 @@ -95,7 +95,7 @@ switch($btn) { $num = floor((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']'"; + $query = "update general set turntime='{$gen['turntime']}' where no='{$gen['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/_admin2.php b/twe/_admin2.php index ee4966e7..e2433b48 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index b29bfcb5..ec12db61 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -112,7 +112,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -122,7 +122,7 @@ switch($btn) { $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel']); - $query = "update general set specage2=age,special2='$special2' where no='$general['no']'"; + $query = "update general set specage2=age,special2='$special2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; @@ -139,7 +139,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -156,7 +156,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -173,7 +173,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -190,7 +190,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -207,7 +207,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -224,7 +224,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -241,7 +241,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -282,7 +282,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; @@ -297,7 +297,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -320,7 +320,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -343,7 +343,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -366,7 +366,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { diff --git a/twe/_admin3.php b/twe/_admin3.php index c95e8e52..775f1f5a 100644 --- a/twe/_admin3.php +++ b/twe/_admin3.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin3_submit.php b/twe/_admin3_submit.php index 17c2d848..5b2da323 100644 --- a/twe/_admin3_submit.php +++ b/twe/_admin3_submit.php @@ -7,7 +7,7 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -27,7 +27,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -50,7 +50,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -73,7 +73,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -96,7 +96,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date' where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } for($i=0; $i < sizeof($genlist); $i++) { @@ -123,7 +123,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin4.php b/twe/_admin4.php index dc76d56c..a8d3844a 100644 --- a/twe/_admin4.php +++ b/twe/_admin4.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -157,7 +157,7 @@ $conMsg = ""; for($i=0; $i < $ipCount; $i++) { $ip = MYDB_fetch_array($result); - $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='$ip['password']' and npc<2"; + $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='{$ip['password']}' and npc<2"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); for($k=0; $k < $genCount; $k++) { diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index 3f0a0f45..ef8b543f 100644 --- a/twe/_admin4_submit.php +++ b/twe/_admin4_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -96,7 +96,7 @@ switch($btn) { // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}_type=10,msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_who='$genlist[$i]'+10000,msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin5.php b/twe/_admin5.php index cb467a61..23b38f7a 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -195,7 +195,7 @@ for($i=0; $i < $nationCount; $i++) { ROUND(AVG(intel), 1) as avgi, ROUND(AVG(explevel), 1) as avge, SUM(crew) as crew - from general where nation='$nation['nation']'"; + from general where nation='{$nation['nation']}'"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($genResult); @@ -207,7 +207,7 @@ for($i=0; $i < $nationCount; $i++) { 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']'"; + from city where nation='{$nation['nation']}'"; $cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityResult); diff --git a/twe/_admin5_submit.php b/twe/_admin5_submit.php index 3ef4b803..c99f6fce 100644 --- a/twe/_admin5_submit.php +++ b/twe/_admin5_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -16,10 +16,10 @@ if($me['userlevel'] < 5) { switch($btn) { case "국가변경": if($nation == 0) { - $query = "update general set nation=0,level=0 where user_id='$_SESSION['p_id']'"; + $query = "update general set nation=0,level=0 where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set nation='{$nation}',level=1 where user_id='$_SESSION['p_id']'"; + $query = "update general set nation='{$nation}',level=1 where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin6.php b/twe/_admin6.php index b5b9885d..2ddfca5c 100644 --- a/twe/_admin6.php +++ b/twe/_admin6.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin7.php b/twe/_admin7.php index 1028d082..3810804d 100644 --- a/twe/_admin7.php +++ b/twe/_admin7.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin8.php b/twe/_admin8.php index 2fb87418..561521ea 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_simul.php b/twe/_simul.php index a69a15d0..f71e2683 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "시뮬", 2); -$query = "select no,tournament,userlevel,con,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select no,tournament,userlevel,con,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_bestGeneral.php b/twe/a_bestGeneral.php index 10cd6224..e81b0910 100644 --- a/twe/a_bestGeneral.php +++ b/twe/a_bestGeneral.php @@ -10,7 +10,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select con,userlevel,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_emperior.php b/twe/a_emperior.php index fb37e672..60d967c3 100644 --- a/twe/a_emperior.php +++ b/twe/a_emperior.php @@ -38,7 +38,7 @@ if($select == 0) { diff --git a/twe/a_emperior2.php b/twe/a_emperior2.php index 08ca3b38..a20cd017 100644 --- a/twe/a_emperior2.php +++ b/twe/a_emperior2.php @@ -38,7 +38,7 @@ if($select == 0) { diff --git a/twe/a_genList.php b/twe/a_genList.php index 8eb94ecc..eeaa7d38 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -10,7 +10,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select con,userlevel,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_history.php b/twe/a_history.php index d3fb554b..5b2e756e 100644 --- a/twe/a_history.php +++ b/twe/a_history.php @@ -12,7 +12,7 @@ $query = "select startyear,year,month,conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,map,con,userlevel,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index d6d10bbb..58befbd3 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -10,7 +10,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select con,userlevel,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -38,43 +38,43 @@ $count = MYDB_num_rows($result); for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); //국가정보 - $query = "select city,name from city where nation='$nation['nation']'"; // 도시 이름 목록 + $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); - $query = "select npc,name,city from general where nation='$nation['nation']' and level='12'"; + $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); - $query = "select npc,name from general where nation='$nation['nation']' and level='11'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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'"; + $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"; // 장수 목록 + $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); @@ -167,7 +167,7 @@ for($i=1; $i <= $count; $i++) { } } } else { - $query = "select name from city where city='$level12['city']'"; // 군주 위치 도시 이름 + $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); diff --git a/twe/a_status.php b/twe/a_status.php index 04a372c3..deedfe44 100644 --- a/twe/a_status.php +++ b/twe/a_status.php @@ -11,7 +11,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,userlevel,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,map,con,userlevel,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_vote.php b/twe/a_vote.php index 06d5f565..16524b01 100644 --- a/twe/a_vote.php +++ b/twe/a_vote.php @@ -4,7 +4,7 @@ include "func.php"; $connect = dbConn(); increaseRefresh($connect, "설문조사", 1); -$query = "select no,userlevel,vote from general where user_id='$_SESSION['p_id']'"; +$query = "select no,userlevel,vote from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_auction.php b/twe/b_auction.php index 6d40d218..538a8452 100644 --- a/twe/b_auction.php +++ b/twe/b_auction.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "거래장", 2); -$query = "select no,special,skin,userlevel,con,turntime from general where user_id='$_SESSION['p_id']'"; +$query = "select no,special,skin,userlevel,con,turntime from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,11 +17,11 @@ $admin = MYDB_fetch_array($result); $con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -$query = "select no from auction where no1='$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']'"; +$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); diff --git a/twe/b_battleCenter.php b/twe/b_battleCenter.php index 4ad44de1..be4339ad 100644 --- a/twe/b_battleCenter.php +++ b/twe/b_battleCenter.php @@ -16,11 +16,11 @@ $query = "select nation from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='{$_SESSION['p_id']}'"; $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']'"; +$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); diff --git a/twe/b_betting.php b/twe/b_betting.php index 04ea3512..0ff55019 100644 --- a/twe/b_betting.php +++ b/twe/b_betting.php @@ -7,7 +7,7 @@ $connect = dbConn(); increaseRefresh($connect, "베팅장", 1); checkTurn($connect); -$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION['p_id']'"; +$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -191,7 +191,7 @@ for($i=0; $i < 16; $i++) { echo ""; } -$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='$_SESSION['p_id']'"; +$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); for($i=0; $i < 16; $i++) { diff --git a/twe/b_chiefboard.php b/twe/b_chiefboard.php index 77ff26a8..ff1dbacc 100644 --- a/twe/b_chiefboard.php +++ b/twe/b_chiefboard.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "기밀실", 1); -$query = "select skin,no,nation,level from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_chiefcenter.php b/twe/b_chiefcenter.php index 390f646d..b24353d9 100644 --- a/twe/b_chiefcenter.php +++ b/twe/b_chiefcenter.php @@ -10,11 +10,11 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='{$_SESSION['p_id']}'"; $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']'"; +$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); @@ -51,7 +51,7 @@ $query = " 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']'"; + from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -59,7 +59,7 @@ $lv = getNationChiefLevel($nation['level']); for($i=12; $i >= $lv; $i--) { $turn[$i] = getCoreTurn($connect, $nation, $i); - $query = "select name,turntime,npc from general where level={$i} and nation='$me['nation']'"; + $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); } diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index a764c958..9c158a71 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -6,11 +6,11 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "현재도시", 1); -$query = "select skin,no,nation,userlevel,level,city from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,userlevel,level,city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select nation,level,spy from nation where nation='$me['nation']'"; +$query = "select nation,level,spy from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -44,7 +44,7 @@ if($_POST['citylist'] == '') { $_POST['citylist'] = $me['city']; } // 재야일때는 현재 도시만 $valid = 0; if($me['level'] == 0) { - $query = "select city,name,nation from city where city='$me['city']'"; + $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 " @@ -57,7 +57,7 @@ if($me['level'] == 0) { echo "============================================"; } else { // 아국 도시들 선택 - $query = "select city,name,nation from city where nation='$me['nation']'"; + $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); @@ -74,7 +74,7 @@ if($me['level'] == 0) { } // 아국 장수가 있는 타국 도시들 선택 - $query = "select distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation='$me['nation']' and B.nation!='$me['nation']'"; + $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); @@ -133,11 +133,11 @@ if($valid == 0 && $me['userlevel'] < 5) { $_POST['citylist'] = $me['city']; } -$query = "select * from city where city='$_POST['citylist']'"; // 도시 이름 목록 +$query = "select * from city where city='{$_POST['citylist']}'"; // 도시 이름 목록 $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityresult); -$query = "select nation,name,color from nation where nation='$city['nation']'"; +$query = "select nation,name,color from nation where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -199,7 +199,7 @@ echo "
- 현재 기술력 : + 현재 기술력 : 현재 통솔 : - 현재 병종 : - 현재 병사 : - 현재 자금 : + 현재 병종 : + 현재 병사 : + 현재 자금 :
모병은 가격 2배의 자금이 소요됩니다.
- 현재 기술력 : + 현재 기술력 : 현재 통솔 : - 현재 병종 : - 현재 병사 : - 현재 자금 : + 현재 병종 : + 현재 병사 : + 현재 자금 :
$nation[name]-
$nation['name']-
$nation[name]".$nation[scoutmsg]."
$nation['name']".$nation['scoutmsg']."
$nation[name]-
$nation['name']-
$nation[name]$nation[scoutmsg]
$nation['name']$nation['scoutmsg']
장수 선택
장수 $emperior['phase'] - +
$emperior['phase'] - +
{$gen[$i]}
장수 "; - $query = "select name from general where city='$city['city']' and nation='$city['nation']'"; // 장수 목록 + $query = "select name from general where city='{$city['city']}' and nation='{$city['nation']}'"; // 장수 목록 $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); if($gencount == 0) echo "-"; @@ -212,7 +212,7 @@ echo "
"; -$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 from general where city='$city['city']' order by dedication desc"; // 장수 목록 +$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 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); diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index c32cd080..17118897 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -10,11 +10,11 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='{$_SESSION['p_id']}'"; $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']'"; +$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); @@ -72,7 +72,7 @@ for($i=0; $i < $nationcount; $i++) { // 아국표시 if($nation['nation'] == $me['nation']) { //속령수 - $query = "select city from city where nation='$nation['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 " @@ -90,15 +90,15 @@ for($i=0; $i < $nationcount; $i++) { continue; } - $query = "select state,term,fixed,reserved,showing from diplomacy where me='$me['nation']' and you='$nation['nation']'"; + $query = "select state,term,fixed,reserved,showing from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result2); - $query = "select reserved,showing from diplomacy where you='$me['nation']' and me='$nation['nation']'"; + $query = "select reserved,showing from diplomacy where you='{$me['nation']}' and me='{$nation['nation']}'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip2 = MYDB_fetch_array($result2); //속령수 - $query = "select city from city where nation='$nation['nation']'"; + $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']) { @@ -172,7 +172,7 @@ echo "
"; -$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me['nation']'"; +$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index c9725a09..84f026ae 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -10,7 +10,7 @@ $query = "select turnterm from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,nation,skin,map,userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select no,nation,skin,map,userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -22,7 +22,7 @@ $nationStr = ""; for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation['nation']'"; + $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); diff --git a/twe/b_genList.php b/twe/b_genList.php index aca8e6ce..cdbec204 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -10,11 +10,11 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select level,secretlimit from nation where nation='$me['nation']'"; +$query = "select level,secretlimit from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -63,7 +63,7 @@ if($me['skin'] < 1) { = 5) { $btn = "submit"; } else { $btn = "hidden"; } -$query = "select name,level,picture,imgsvr,belong from general where nation='$nation['nation']' and level>={$lv} order by level desc"; +$query = "select name,level,picture,imgsvr,belong from general where nation='{$nation['nation']}' and level>={$lv} order by level desc"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($i=12; $i >= $lv; $i--) { $levels = MYDB_fetch_array($genresult); $level[$levels['level']] = $levels; } -$query = "select name,picture,killnum from general where nation='$nation['nation']' order by killnum desc limit 5"; // 오호장군 +$query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군 $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "select name,picture,firenum from general where nation='$nation['nation']' order by firenum desc limit 7"; // 건안칠자 +$query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자 $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo " @@ -140,7 +140,7 @@ if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) { echo " "; } -$query = "select name,city from general where nation='$me['nation']' and level=12"; +$query = "select name,city from general where nation='{$me['nation']}' and level=12"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); echo " @@ -178,7 +178,7 @@ if($meLevel >= 5 && $nation['l11set'] == 0) { echo " "; } else { - $query = "select name,city from general where nation='$me['nation']' and level='11'"; + $query = "select name,city from general where nation='{$me['nation']}' and level='11'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); echo "{$general['name']} 【{$cityNames[$general['city']]}】"; @@ -209,12 +209,12 @@ echo " "; -$querys[10] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[9] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[8] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[7] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[6] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[5] = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[10] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[9] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[8] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[7] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; +$querys[6] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; +$querys[5] = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; for($i=10; $i >= $lv; $i--) { if($i % 2 == 0) { echo ""; } @@ -249,7 +249,7 @@ for($i=10; $i >= $lv; $i--) { "; } else { - $query = "select name,city from general where nation='$me['nation']' and level={$i}"; + $query = "select name,city from general where nation='{$me['nation']}' and level={$i}"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); echo "{$general['name']} 【{$cityNames[$general['city']]}】"; @@ -273,7 +273,7 @@ if($meLevel >= 5) { "; - $query = "select city,name,region from city where nation='$nation['nation']' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 + $query = "select city,name,region from city where nation='{$nation['nation']}' and gen2set=0 order by region,level desc,binary(name)"; // 도시 이름 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -353,7 +353,7 @@ if($meLevel >= 5) { "; - $query = "select no,name,level,city from general where nation='$me['nation']' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; + $query = "select no,name,level,city from general where nation='{$me['nation']}' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { @@ -381,7 +381,7 @@ if($meLevel >= 5) { "; - $query = "select no,name,npc,tnmt,leader,power,intel,leader+power+intel as total from general where tournament=0 and gold>='$admin['develcost']' order by {$tp3} desc"; + $query = "select no,name,npc,tnmt,leader,power,intel,leader+power+intel as total from general where tournament=0 and gold>='{$admin['develcost']}' order by {$tp3} desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); diff --git a/twe/b_troop.php b/twe/b_troop.php index 9c6a8607..22a8af17 100644 --- a/twe/b_troop.php +++ b/twe/b_troop.php @@ -6,11 +6,11 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "부대편성", 1); -$query = "select skin,no,nation,troop from general where user_id='$_SESSION['p_id']'"; +$query = "select skin,no,nation,troop from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select * from troop where nation='$me['nation']'"; +$query = "select * from troop where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troopcount = MYDB_num_rows($result); @@ -45,7 +45,7 @@ for($i=0; $i < $troopcount; $i++) { $troop = MYDB_fetch_array($result); $genlist = ""; - $query = "select no,name,picture,imgsvr,turntime,city,turn0,turn1,turn2,turn3,turn4,turn5 from general where troop='$troop['troop']'"; + $query = "select no,name,picture,imgsvr,turntime,city,turn0,turn1,turn2,turn3,turn4,turn5 from general where troop='{$troop['troop']}'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); for($j=0; $j < $gencount; $j++) { @@ -56,7 +56,7 @@ for($i=0; $i < $troopcount; $i++) { $imageTemp = GetImageURL($general['imgsvr']); $name = $general['name']; $turntime = $general['turntime']; - $query = "select name from city where city='$general['city']'"; + $query = "select name from city where city='{$general['city']}'"; $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityresult); $cityname = $city['name']; @@ -94,7 +94,7 @@ for($i=0; $i < $troopcount; $i++) { "; if($troop['no'] == $me['no']) { - $query = "select no,name from general where troop='$troop['troop']' and no!='$me['no']' order by binary(name)"; + $query = "select no,name from general where troop='{$troop['troop']}' and no!='{$me['no']}' order by binary(name)"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genresult); echo " diff --git a/twe/c_auction.php b/twe/c_auction.php index f949f357..587406d6 100644 --- a/twe/c_auction.php +++ b/twe/c_auction.php @@ -10,15 +10,15 @@ $query = "select turnterm from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,gold,rice,special,userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,gold,rice,special,userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -$query = "select no from auction where no1='$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']'"; +$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); @@ -82,7 +82,7 @@ if($btn == "판매") { if($valid == 1) { $msg = "ㆍ등록 성공."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '$me['no']', '$me['name']', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '{$me['no']}', '{$me['name']}', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($btn == "구매시도") { @@ -123,12 +123,12 @@ if($btn == "판매") { $msg = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); if($auction['expire'] > $date) $date = $auction['expire']; - $query = "update auction set value='$value',no2='$me['no']',name2='$me['name']',expire='$date' where no='$sel'"; + $query = "update auction set value='$value',no2='{$me['no']}',name2='{$me['name']}',expire='$date' where no='$sel'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($valid == 2) { $msg = "ㆍ즉시판매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - $query = "update auction set value='$value',no2='$me['no']',name2='$me['name']',expire='$date' where no='$sel'"; + $query = "update auction set value='$value',no2='{$me['no']}',name2='{$me['name']}',expire='$date' where no='$sel'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($btn == "구매") { @@ -163,7 +163,7 @@ if($btn == "판매") { if($valid == 1) { $msg2 = "ㆍ등록 성공."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '$me['no']', '$me['name']', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; + $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '{$me['no']}', '{$me['name']}', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($btn == "판매시도") { @@ -202,12 +202,12 @@ if($btn == "판매") { $msg2 = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); if($auction['expire'] > $date) $date = $auction['expire']; - $query = "update auction set value='$value',no2='$me['no']',name2='$me['name']',expire='$date' where no='$sel'"; + $query = "update auction set value='$value',no2='{$me['no']}',name2='{$me['name']}',expire='$date' where no='$sel'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($valid == 2) { $msg2 = "ㆍ즉시구매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - $query = "update auction set value='$value',no2='$me['no']',name2='$me['name']',expire='$date' where no='$sel'"; + $query = "update auction set value='$value',no2='{$me['no']}',name2='{$me['name']}',expire='$date' where no='$sel'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_betting.php b/twe/c_betting.php index 3e674ee3..06a4e4e0 100644 --- a/twe/c_betting.php +++ b/twe/c_betting.php @@ -17,7 +17,7 @@ if($admin['tournament'] != 6) { exit(); } -$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION['p_id']'"; +$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -27,7 +27,7 @@ for($i=0; $i < 16; $i++) { $mebet = $me["bet{$i}"]; if($gold >= 10 && $gold <= 1000) { if($gold + 500 <= $me['gold'] && $gold + $mebet <= 1000 && $gold + $me['bet'] <= 1000) { - $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='$_SESSION['p_id']'"; + $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update game set bet{$i}=bet{$i}+'$gold' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/c_chiefboard.php b/twe/c_chiefboard.php index 8c0e2e9a..2615e896 100644 --- a/twe/c_chiefboard.php +++ b/twe/c_chiefboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -28,16 +28,16 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { $msg = $title."|".$msg; $msg = addslashes(SQ2DQ($msg)); $date = date('Y-m-d H:i:s'); - $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='$me['no']',coreboard{$num}_when='$date' where nation='$me['nation']'"; + $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='{$me['no']}',coreboard{$num}_when='$date' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set coreindex='$num' where nation='$me['nation']'"; + $query = "update nation set coreindex='$num' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //$num에 댓글시 } elseif($num >= 0 && $reply != "") { $newmsg = $nation["coreboard{$num}"]."|".$me['no']."|".$reply; $newmsg = addslashes(SQ2DQ($newmsg)); - $query = "update nation set coreboard{$num}='$newmsg' where nation='$me['nation']'"; + $query = "update nation set coreboard{$num}='$newmsg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_dipcenter.php b/twe/c_dipcenter.php index d7c505f8..c369612b 100644 --- a/twe/c_dipcenter.php +++ b/twe/c_dipcenter.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; +$query = "select no,nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -21,38 +21,38 @@ if($me['level'] < 5) { if($btn == "국가방침") { $msg = BadTag2Code(addslashes(SQ2DQ($msg))); - $query = "update nation set msg='$msg' where nation='$me['nation']'"; + $query = "update nation set msg='$msg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관권유") { $scoutmsg = BadTag2Code(addslashes(SQ2DQ($scoutmsg))); - $query = "update nation set scoutmsg='$scoutmsg' where nation='$me['nation']'"; + $query = "update nation set scoutmsg='$scoutmsg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "세율") { if($rate < 5) { $rate = 5; } if($rate > 30) { $rate = 30; } - $query = "update nation set rate='$rate' where nation='$me['nation']'"; + $query = "update nation set rate='$rate' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "지급율") { if($bill < 20) { $bill = 20; } if($bill > 200) { $bill = 200; } - $query = "update nation set bill='$bill' where nation='$me['nation']'"; + $query = "update nation set bill='$bill' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "기밀권한") { if($secretlimit < 1) { $secretlimit = 1; } if($secretlimit > 99) { $secretlimit = 99; } - $query = "update nation set secretlimit='$secretlimit' where nation='$me['nation']'"; + $query = "update nation set secretlimit='$secretlimit' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 금지") { - $query = "update nation set myset=myset-1,scout='1' where nation='$me['nation']' and myset>0"; + $query = "update nation set myset=myset-1,scout='1' where nation='{$me['nation']}' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "임관 허가") { - $query = "update nation set myset=myset-1,scout='0' where nation='$me['nation']' and myset>0"; + $query = "update nation set myset=myset-1,scout='0' where nation='{$me['nation']}' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 금지") { - $query = "update nation set myset=myset-1,war='1' where nation='$me['nation']' and myset>0"; + $query = "update nation set myset=myset-1,war='1' where nation='{$me['nation']}' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "전쟁 허가") { - $query = "update nation set myset=myset-1,war='0' where nation='$me['nation']' and myset>0"; + $query = "update nation set myset=myset-1,war='0' where nation='{$me['nation']}' and myset>0"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/c_double.php b/twe/c_double.php index 50c9206c..ba3734ca 100644 --- a/twe/c_double.php +++ b/twe/c_double.php @@ -30,7 +30,7 @@ if($command == 46) { if($name == "") { $name = "무명"; } $name = _String::SubStrForWidth($name, 0, 12); - $query = "update general set makenation='{$name}' where user_id='$_SESSION['p_id']'"; + $query = "update general set makenation='{$name}' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); @@ -38,12 +38,12 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; + $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; //통합제의 } elseif($command == 53) { - $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -55,7 +55,7 @@ if($command == 46) { if($nationname == "") { $nationname = "무명"; } $nationname = _String::SubStrForWidth($nationname, 0, 12); - $query = "update general set makenation='{$nationname}' where level>=5 and nation='$me['nation']'"; + $query = "update general set makenation='{$nationname}' where level>=5 and nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); @@ -63,13 +63,13 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me['nation']'"; + $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; //불가침 } elseif($command == 61) { - $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -80,7 +80,7 @@ if($command == 46) { $note = str_replace(" ", "뷁", $note); $note = _String::SubStrForWidth($note, 0, 90); - $query = "update diplomacy set reserved='{$note}' where me='$me['nation']' and you='$double'"; + $query = "update diplomacy set reserved='{$note}' where me='{$me['nation']}' and you='$double'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); @@ -88,7 +88,7 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me['nation']'"; + $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; @@ -97,7 +97,7 @@ if($command == 46) { //백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 //국기변경 } elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) { - $query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -109,7 +109,7 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'"; } - $query = "update nation set {$str} where nation='$me['nation']'"; + $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; @@ -119,7 +119,7 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; + $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; } diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index 549641d2..ea20a7bf 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -17,7 +17,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -37,7 +37,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $nation['name'] = '재야'; $nation['color'] = 'FFFFFF'; } else { - $query = "select nation,name,color from nation where nation='$me['nation']'"; + $query = "select nation,name,color from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } @@ -48,7 +48,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $nation['name'] = '재야'; $nation['color'] = 'FFFFFF'; } else { - $query = "select nation,name,color from nation where nation='$me['nation']'"; + $query = "select nation,name,color from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } @@ -80,7 +80,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $msg = addslashes(SQ2DQ($msg)); - $query = "select msg{$me['msgindex']}_when as priv_when from general where no='$me['no']'"; + $query = "select msg{$me['msgindex']}_when as priv_when from general where no='{$me['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $prev_msg = MYDB_fetch_array($result); $diff_second = strtotime($date) - strtotime($prev_msg['priv_when']); @@ -91,19 +91,19 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { //자신에게 표시 $me['msgindex']++; if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } - $query = "update general set msgindex='$me['msgindex']',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='10',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date',newmsg=1 where no='$me['no']'"; + $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='10',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date',newmsg=1 where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //자신에게 표시 $me['msgindex']++; if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } - $query = "update general set msgindex='$me['msgindex']',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='9',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date' where no='$me['no']'"; + $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='9',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대에게 발송 $you['msgindex']++; if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='$you['msgindex']',msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_type='10',msg{$you['msgindex']}_who='$who',msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist'"; + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_type='10',msg{$you['msgindex']}_who='$who',msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index c6b7ba01..a4047852 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -11,12 +11,12 @@ $query = "select startyear,year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; +$query = "select no,nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $meLevel = $me['level']; -$query = "select no from general where nation='$me['nation']' and level=12"; +$query = "select no from general where nation='{$me['nation']}' and level=12"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); @@ -43,17 +43,17 @@ if($btn == "임명") { } if($btn == "추방") { - $query = "select name,l{$meLevel}set,chemi from nation where nation='$me['nation']'"; + $query = "select name,l{$meLevel}set,chemi from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //이미 지정했다면 무시 if($nation["l{$meLevel}set"] == 0 && $general['level'] > 0 && $general['level'] < 12) { - $query = "select no from diplomacy where me='$general['nation']' and state>='3' and state<='4'"; + $query = "select no from diplomacy where me='{$general['nation']}' and state>='3' and state<='4'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount1 = MYDB_num_rows($dipresult); - $query = "select no from diplomacy where me='$general['nation']' and state>='5' and state<='6'"; + $query = "select no from diplomacy where me='{$general['nation']}' and state>='5' and state<='6'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount2 = MYDB_num_rows($dipresult); @@ -74,47 +74,47 @@ if($btn == "추방") { $log[count($log)] = "●통합에 반대하다가 $nation['name']에서 숙청당했습니다."; // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { $alllog[count($alllog)] = "●{$admin['month']}월:합병에 반대하던 $general['name'](이)가 $nation['name']에서 숙청당했습니다."; $log[count($log)] = "●합병에 반대하다가 $nation['name']에서 숙청당했습니다."; // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 추방당하였습니다."; $log[count($log)] = "$nation['name']에서 추방당하였습니다."; // 재야로, 국가 무소속으로, 명성/공헌 N*10%감소 - $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='$general['gold']',rice='$general['rice']',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$general['no']'"; + $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 부대 처리 - $query = "select no from troop where troop='$general['troop']'"; + $query = "select no from troop where troop='{$general['troop']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general['troop']'"; + $query = "update general set troop='0' where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general['troop']'"; + $query = "delete from troop where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general['no']'"; + $query = "update general set troop='0' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 도시관직해제 - $query = "update city set gen1='0' where gen1='$general['no']'"; + $query = "update city set gen1='0' where gen1='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general['no']'"; + $query = "update city set gen2='0' where gen2='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general['no']'"; + $query = "update city set gen3='0' where gen3='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($general['npc'] >= 2 && ($admin['scenario'] == 0 || rand()%100 == 0)) { @@ -130,7 +130,7 @@ if($btn == "추방") { } //국가 기술력 그대로 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; @@ -141,14 +141,14 @@ if($btn == "추방") { if($admin['year'] < $admin['startyear']+3) { //초반엔 군주 부상 증가(엔장 임관지양) - $query = "update general set injury=injury+1 where no='$ruler['no']'"; + $query = "update general set injury=injury+1 where no='{$ruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='{$nation['chemi']}',gold=gold+'$gold',rice=rice+'$rice' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //이번분기는 추방불가(초반 제외) - $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; + $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='{$nation['chemi']}',gold=gold+'$gold',rice=rice+'$rice' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -161,7 +161,7 @@ if($btn == "추방") { pushAllLog($alllog); } } elseif($btn == "임명" && $level >= 5 && $level <= 11) { - $query = "select l{$level}set,level,chemi from nation where nation='$me['nation']'"; + $query = "select l{$level}set,level,chemi from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -173,11 +173,11 @@ if($btn == "추방") { $nation['chemi'] -= 1; if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - $query = "update nation set chemi='$nation['chemi']' where nation='$general['nation']'"; + $query = "update nation set chemi='{$nation['chemi']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 장수 일반으로 - $query = "update general set level=1 where nation='$me['nation']' and level='$level'"; + $query = "update general set level=1 where nation='{$me['nation']}' and level='$level'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($genlist != 0) { $valid = 0; @@ -202,7 +202,7 @@ if($btn == "추방") { $query = "update general set level='$level' where no='$genlist'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //이번분기는 불가 - $query = "update nation set l{$level}set=1 where nation='$me['nation']'"; + $query = "update nation set l{$level}set=1 where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_nationboard.php b/twe/c_nationboard.php index 7b5e4052..4b55d19f 100644 --- a/twe/c_nationboard.php +++ b/twe/c_nationboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -28,16 +28,16 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { $msg = $title."|".$msg; $msg = addslashes(SQ2DQ($msg)); $date = date('Y-m-d H:i:s'); - $query = "update nation set board{$num}='$msg',board{$num}_who='$me['no']',board{$num}_when='$date' where nation='$me['nation']'"; + $query = "update nation set board{$num}='$msg',board{$num}_who='{$me['no']}',board{$num}_when='$date' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set boardindex='$num' where nation='$me['nation']'"; + $query = "update nation set boardindex='$num' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //$num에 댓글시 } elseif($num >= 0 && $reply != "") { $newmsg = $nation["board{$num}"]."|".$me['no']."|".$reply; $newmsg = addslashes(SQ2DQ($newmsg)); - $query = "update nation set board{$num}='$newmsg' where nation='$me['nation']'"; + $query = "update nation set board{$num}='$newmsg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_nationrule.php b/twe/c_nationrule.php index 1fae000c..bc7b8327 100644 --- a/twe/c_nationrule.php +++ b/twe/c_nationrule.php @@ -7,13 +7,13 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation from general where user_id='$_SESSION['p_id']'"; +$query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $msg = addslashes(SQ2DQ($msg)); -$query = "update nation set rule='$msg' where nation='$me['nation']'"; +$query = "update nation set rule='$msg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; diff --git a/twe/c_tournament.php b/twe/c_tournament.php index 938fcba7..f58be2f9 100644 --- a/twe/c_tournament.php +++ b/twe/c_tournament.php @@ -11,7 +11,7 @@ $query = "select tournament,phase,tnmt_type,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,userlevel,tournament from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,userlevel,tournament from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -49,7 +49,7 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $general['gold'] = 0; } elseif($btn == "쪼렙투입") { $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $general['gold'] -= $admin['develcost']; @@ -60,30 +60,30 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $avgGen = MYDB_fetch_array($genResult); //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 and {$tp3}>{$avgGen['av']}"; + $query = "select no from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 and {$tp3}>{$avgGen['av']}"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); $sel = rand() % 32 + $genCount - 8; - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $general['gold'] -= $admin['develcost']; } elseif($btn == "굇수투입") { $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $general['gold'] -= $admin['develcost']; } elseif($btn == "랜덤투입") { - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by rand() limit 0,1"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $general['gold'] -= $admin['develcost']; //참가 } else { - $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$me['no']'"; + $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='{$me['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -110,9 +110,9 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $query = "select grp from tournament where grp='$grp'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $grpCount = MYDB_num_rows($result); - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$grp', '$grpCount', '$general['horse']', '$general['weap']', '$general['book']')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['leader']}', '{$general['power']}', '{$general['intel']}', '{$general['explevel']}', '$grp', '$grpCount', '{$general['horse']}', '{$general['weap']}', '{$general['book']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold='$general['gold']' where no='$general['no']'"; + $query = "update general set tournament=1,gold='{$general['gold']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -144,7 +144,7 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { for($i=0; $i < $z; $i++) { $sel = rand() % 32; if($btn == "쪼렙전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1"; } elseif($btn == "일반전부투입") { //참가한 사람 평균치 $query = "select AVG({$tp3}) as av from general where tournament=1"; @@ -152,26 +152,26 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $avgGen = MYDB_fetch_array($genResult); //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 and {$tp3}>{$avgGen['av']}"; + $query = "select no from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 and {$tp3}>{$avgGen['av']}"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); $sel += $genCount - 8; - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1"; } elseif($btn == "굇수전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by {$tp} desc limit {$sel},1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1"; } else { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin['develcost']' and npc>=2 order by rand() limit 0,1"; + $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $grp = floor($code[$i] / 10); $grp_no = $code[$i] % 10; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$grp', '$grp_no', '$general['horse']', '$general['weap']', '$general['book']')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['leader']}', '{$general['power']}', '{$general['intel']}', '{$general['explevel']}', '$grp', '$grp_no', '{$general['horse']}', '{$general['weap']}', '{$general['book']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold=gold-'$admin['develcost']' where no='$general['no']'"; + $query = "update general set tournament=1,gold=gold-'{$admin['develcost']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/c_troop.php b/twe/c_troop.php index f9a39a6f..6409b1a5 100644 --- a/twe/c_troop.php +++ b/twe/c_troop.php @@ -7,46 +7,46 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,troop from general where user_id='$_SESSION['p_id']'"; +$query = "select no,nation,troop from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $name = trim($name); $name = addslashes(SQ2DQ($name)); if($btn == "부 대 창 설" && $name != "" && $me['troop'] == 0) { - $query = "insert into troop (name,nation,no) values ('$name','$me['nation']','$me['no']')"; + $query = "insert into troop (name,nation,no) values ('$name','{$me['nation']}','{$me['no']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select troop from troop where no='$me['no']'"; + $query = "select troop from troop where no='{$me['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); - $query = "update general set troop='$troop['troop']' where no='$me['no']'"; + $query = "update general set troop='{$troop['troop']}' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 변 경" && $name != "") { - $query = "update troop set name='$name' where no='$me['no']'"; + $query = "update troop set name='$name' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 추 방" && $gen != 0) { $query = "update general set troop='0' where no='$gen'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 가 입" && $troop != 0) { - $query = "update general set troop='$troop' where no='$me['no']'"; + $query = "update general set troop='$troop' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "부 대 탈 퇴") { - $query = "select no from troop where troop='$me['troop']'"; + $query = "select no from troop where troop='{$me['troop']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 if($troop['no'] == $me['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$me['troop']'"; + $query = "update general set troop='0' where troop='{$me['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$me['troop']'"; + $query = "delete from troop where troop='{$me['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$me['no']'"; + $query = "update general set troop='0' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/c_vacation.php b/twe/c_vacation.php index c4425fd2..dcc23100 100644 --- a/twe/c_vacation.php +++ b/twe/c_vacation.php @@ -11,7 +11,7 @@ $admin = MYDB_fetch_array($result); $admin['killturn'] *= 3; -$query = "update general set killturn='$admin['killturn']' where user_id='$_SESSION['p_id']'"; +$query = "update general set killturn='{$admin['killturn']}' where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; diff --git a/twe/c_vote.php b/twe/c_vote.php index 93ea0d50..6623d7be 100644 --- a/twe/c_vote.php +++ b/twe/c_vote.php @@ -9,7 +9,7 @@ $query = "select develcost,vote,votecomment from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where user_id='$_SESSION['p_id']'"; +$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -48,7 +48,7 @@ if($btn == "수정" && $me['userlevel'] >= 5) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "투표" && $me['vote'] == 0 && $sel > 0) { $develcost = $admin['develcost'] * 5; - $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION['p_id']'"; + $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = array(); @@ -60,7 +60,7 @@ if($btn == "수정" && $me['userlevel'] >= 5) { $comment = trim($comment); $comment = addslashes(SQ2DQ($comment)); - $query = "select name from nation where nation='$me['nation']'"; + $query = "select name from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); if($nation['name'] == "") { $nation['name'] = "재야"; } diff --git a/twe/commandlist.php b/twe/commandlist.php index 8567ca30..ca27aab5 100644 --- a/twe/commandlist.php +++ b/twe/commandlist.php @@ -65,7 +65,7 @@ function myCommandList($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where user_id='$_SESSION['p_id']'"; + $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $turn = getTurn($connect, $me, 2); diff --git a/twe/d_ally.php b/twe/d_ally.php index 48e37b53..33a207cc 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -11,7 +11,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -19,33 +19,33 @@ $query = "select no,nation,history,name from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,surlimit,history,color from nation where nation='$you['nation']'"; +$query = "select name,surlimit,history,color from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; +$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me['nation']'"; +$query = "select pop from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me['nation']'"; +$query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you['nation']'"; +$query = "select city from city where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state,term from diplomacy where me='$me['nation']' and you='$you['nation']'"; +$query = "select state,term from diplomacy where me='{$me['nation']}' and you='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //상대국의 제의조건 -$query = "select reserved from diplomacy where me='$you['nation']' and you='$me['nation']'"; +$query = "select reserved from diplomacy where me='{$you['nation']}' and you='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip2 = MYDB_fetch_array($result); @@ -85,27 +85,27 @@ if($ok == "수락") { $when = $when * 12; //외교 변경 - $query = "update diplomacy set state='7',term='$when',fixed='$dip2['reserved']' where me='$me['nation']' and you='$you['nation']'"; + $query = "update diplomacy set state='7',term='$when',fixed='{$dip2['reserved']}' where me='{$me['nation']}' and you='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='7',term='$when',fixed='$dip2['reserved']' where me='$you['nation']' and you='$me['nation']'"; + $query = "update diplomacy set state='7',term='$when',fixed='{$dip2['reserved']}' where me='{$you['nation']}' and you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //조건 지움 - $query = "update diplomacy set reserved='' where me='$you['nation']' and you='$me['nation']'"; + $query = "update diplomacy set reserved='' where me='{$you['nation']}' and you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$mynation['name'](이)가 불가침을 거부했습니다."; $mylog[count($mylog)] = "$younation['name'](와)과 불가침을 거부했습니다."; //조건 지움 - $query = "update diplomacy set reserved='' where me='$you['nation']' and you='$me['nation']'"; + $query = "update diplomacy set reserved='' where me='{$you['nation']}' and you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 78000bdb..15870eae 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,28 +17,28 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,surlimit,history,color from nation where nation='$you['nation']'"; +$query = "select name,surlimit,history,color from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; +$query = "select name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me['nation']'"; +$query = "select pop from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me['nation']'"; +$query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you['nation']'"; +$query = "select city from city where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; +$query = "select state from diplomacy where me='{$me['nation']}' and you='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -63,9 +63,9 @@ if($ok == "수락") { $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 파기 수락"); //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$me['nation']' and you='$you['nation']'"; + $query = "update diplomacy set state='2',term='0' where me='{$me['nation']}' and you='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$you['nation']' and you='$me['nation']'"; + $query = "update diplomacy set state='2',term='0' where me='{$you['nation']}' and you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 @@ -77,14 +77,14 @@ if($ok == "수락") { } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$mynation['name'](이)가 파기를 거부했습니다."; $mylog[count($mylog)] = "$younation['name'](와)과 파기를 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_cease.php b/twe/d_cease.php index 2d089b8c..3854af56 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,28 +17,28 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select nation,name,surlimit,history,color from nation where nation='$you['nation']'"; +$query = "select nation,name,surlimit,history,color from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; +$query = "select nation,name,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select pop from city where nation='$me['nation']'"; +$query = "select pop from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); -$query = "select city from city where nation='$me['nation']'"; +$query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you['nation']'"; +$query = "select city from city where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; +$query = "select state from diplomacy where me='{$me['nation']}' and you='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -63,14 +63,14 @@ if($ok == "수락") { $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 종전 수락"); //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$mynation['nation']' and you='$younation['nation']'"; + $query = "update diplomacy set state='2',term='0' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$younation['nation']' and you='$mynation['nation']'"; + $query = "update diplomacy set state='2',term='0' where me='{$younation['nation']}' and you='{$mynation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //외교제한 - $query = "update nation set surlimit=24 where nation='$mynation['nation']'"; + $query = "update nation set surlimit=24 where nation='{$mynation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set surlimit=24 where nation='$younation['nation']'"; + $query = "update nation set surlimit=24 where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 @@ -82,14 +82,14 @@ if($ok == "수락") { } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$mynation['name'](이)가 종전을 거부했습니다."; $mylog[count($mylog)] = "$younation['name'](와)과 종전을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_merge.php b/twe/d_merge.php index 6de3d9de..cd866785 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -25,32 +25,32 @@ $query = "select round(std(power)) as power,round(std(gennum)) as gennum from na $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $stdnation = MYDB_fetch_array($result); -$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='$you['nation']'"; +$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; +$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select city from city where nation='$me['nation']'"; +$query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you['nation']'"; +$query = "select city from city where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; +$query = "select state from diplomacy where me='{$me['nation']}' and you='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 -$query = "select state from diplomacy where me='$you['nation']' and (state='0' or state='1' or state='3' or state='5')"; +$query = "select state from diplomacy where me='{$you['nation']}' and (state='0' or state='1' or state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); //대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) -$query = "select you,state from diplomacy where me='$me['nation']' and (state='0' or state='1')"; +$query = "select you,state from diplomacy where me='{$me['nation']}' and (state='0' or state='1')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $warcount = MYDB_num_rows($result); // 아국과 교전중인 국가 골라냄 @@ -58,7 +58,7 @@ $valid = 1; for($i=0; $i < $warcount; $i++) { $acdip = MYDB_fetch_array($result); //교전중 국가A와 대상국B 외교 확인 - $query = "select state from diplomacy where me='$acdip['you']' and you='$you['nation']'"; + $query = "select state from diplomacy where me='{$acdip['you']}' and you='{$you['nation']}'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $abdip = MYDB_fetch_array($dipresult); @@ -102,9 +102,9 @@ if($ok == "수락") { $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 통합 시도"); //외교 변경 - $query = "update diplomacy set state='3',term='24' where me='$mynation['nation']' and you='$younation['nation']'"; + $query = "update diplomacy set state='3',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='4',term='24' where me='$younation['nation']' and you='$mynation['nation']'"; + $query = "update diplomacy set state='4',term='24' where me='{$younation['nation']}' and you='{$mynation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 @@ -116,14 +116,14 @@ if($ok == "수락") { } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_scout.php b/twe/d_scout.php index bfe4c3c0..b776bb18 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -9,7 +9,7 @@ $query = "select startyear,year,month,killturn from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,7 +17,7 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select name,nation,level,capital,scout from nation where nation='$you['nation']'"; +$query = "select name,nation,level,capital,scout from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -32,124 +32,124 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou $me['nations'] .= "{$nation['nation']},"; // 국가 변경, 도시 변경, 일반으로, 수도로 - $query = "update general set killturn='$admin['killturn']',belong=1,nation='$you['nation']',nations='{$me['nations']}',level=1,city='$nation['capital']' where no='$me['no']'"; + $query = "update general set killturn='{$admin['killturn']}',belong=1,nation='{$you['nation']}',nations='{$me['nations']}',level=1,city='{$nation['capital']}' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 재야가 아니면 명성N*10% 공헌N*10%감소 if($me['level'] > 0) { // 1000 1000 남기고 환수 if($me['gold'] > 1000) { $gold = $me['gold'] - 1000; $me['gold'] = 1000; } else { $gold = 0; } if($me['rice'] > 1000) { $rice = $me['rice'] - 1000; $me['rice'] = 1000; } else { $rice = 0; } - $query = "update general set gold='$me['gold']',rice='$me['rice']',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$me['no']'"; + $query = "update general set gold='{$me['gold']}',rice='{$me['rice']}',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$me['nation']'"; + $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //재야이면 100 100 증가 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$me['no']'"; + $query = "update general set dedication=dedication+100,experience=experience+100 where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //유저이면 삭턴 리셋 if($me['npc'] < 2) { - $query = "update general set killturn='$admin['killturn']' where no='$me['no']'"; + $query = "update general set killturn='{$admin['killturn']}' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //태수 군사 시중 해제 switch($me['level']) { case 4: - $query = "update city set gen1=0 where gen1='$me['no']'"; + $query = "update city set gen1=0 where gen1='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 3: - $query = "update city set gen2=0 where gen2='$me['no']'"; + $query = "update city set gen2=0 where gen2='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: - $query = "update city set gen3=0 where gen3='$me['no']'"; + $query = "update city set gen3=0 where gen3='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } //등용자 명성, 공헌 상승 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$you['no']'"; + $query = "update general set dedication=dedication+100,experience=experience+100 where no='{$you['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 처리 - $query = "select no from troop where troop='$me['troop']'"; + $query = "select no from troop where troop='{$me['troop']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 if($troop['no'] == $me['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$me['troop']'"; + $query = "update general set troop='0' where troop='{$me['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$me['troop']'"; + $query = "delete from troop where troop='{$me['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$me['no']'"; + $query = "update general set troop='0' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //국가 기술력 그대로 - $query = "select no from general where nation='$nation['nation']'"; + $query = "select no from general where nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 국가 기술력 그대로 - $query = "select no from general where nation='$me['nation']'"; + $query = "select no from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$me['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 수정 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['level'] == 12) { $mylog[count($mylog)] = "●군주입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($nation['level'] == 0) { $mylog[count($mylog)] = "●없는 국가이거나 방랑군입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($nation['scout'] != 0) { $mylog[count($mylog)] = "●임관 금지중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($admin['year'] < $admin['startyear']+3) { $mylog[count($mylog)] = "●초반 제한중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { $mylog[count($mylog)] = "●이미 임관했었던 국가입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$me['name'](이)가 등용을 거부했습니다."; $mylog[count($mylog)] = "$nation['name'](으)로 망명을 거부했습니다."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 거부',msg{$num}_type='10' where no='$me['no']'"; + $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 거부',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_surrender.php b/twe/d_surrender.php index 6c0349f3..47865881 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,32 +17,32 @@ $query = "select no,nation,history from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); -$query = "select nation,name,power,gold,rice,surlimit,history,color from nation where nation='$you['nation']'"; +$query = "select nation,name,power,gold,rice,surlimit,history,color from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); -$query = "select nation,name,power,surlimit,color,dip{$num} as dipmsg from nation where nation='$me['nation']'"; +$query = "select nation,name,power,surlimit,color,dip{$num} as dipmsg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); -$query = "select city from city where nation='$me['nation']'"; +$query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losecitynum = MYDB_num_rows($result); -$query = "select city from city where nation='$you['nation']'"; +$query = "select city from city where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $wincitynum = MYDB_num_rows($result); //아국과의 관계 -$query = "select state from diplomacy where me='$me['nation']' and you='$you['nation']'"; +$query = "select state from diplomacy where me='{$me['nation']}' and you='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 -$query = "select state from diplomacy where me='$you['nation']' and (state='0' or state='1' or state='3' or state='5')"; +$query = "select state from diplomacy where me='{$you['nation']}' and (state='0' or state='1' or state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); //대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) -$query = "select you,state from diplomacy where me='$me['nation']' and (state='0' or state='1')"; +$query = "select you,state from diplomacy where me='{$me['nation']}' and (state='0' or state='1')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $warcount = MYDB_num_rows($result); // 아국과 교전중인 국가 골라냄 @@ -50,7 +50,7 @@ $valid = 1; for($i=0; $i < $warcount; $i++) { $acdip = MYDB_fetch_array($result); //교전중 국가A와 대상국B 외교 확인 - $query = "select state from diplomacy where me='$acdip['you']' and you='$you['nation']'"; + $query = "select state from diplomacy where me='{$acdip['you']}' and you='{$you['nation']}'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $abdip = MYDB_fetch_array($dipresult); @@ -92,9 +92,9 @@ if($ok == "수락") { $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 합병 시도"); //외교 변경 - $query = "update diplomacy set state='5',term='24' where me='$mynation['nation']' and you='$younation['nation']'"; + $query = "update diplomacy set state='5',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='6',term='24' where me='$younation['nation']' and you='$mynation['nation']'"; + $query = "update diplomacy set state='6',term='24' where me='{$younation['nation']}' and you='{$mynation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 @@ -106,14 +106,14 @@ if($ok == "수락") { } //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me['nation']'"; + $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/event_1.php b/twe/event_1.php index 9f477b2a..c6f65b2d 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -55,11 +55,11 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city,nation from city where nation='$nation['nation']' order by rand() limit 0,1"; + $query = "select city,nation from city where nation='{$nation['nation']}' order by rand() limit 0,1"; $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result2); - $query = "update nation set capital='$city['city']' where nation='$nation['nation']'"; + $query = "update nation set capital='{$city['city']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); } @@ -88,7 +88,7 @@ for($i=0; $i < 7; $i++) { $nationNum[$i] = $nation['nation']; - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation['nation']'"; + $query = "update nation set scout=1,capital={$cap[$i]} where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //태수,군사,시중 해제 @@ -105,24 +105,24 @@ for($i=0; $i < 7; $i++) { $query = "update general set level=1 where no='{$city[gen3]}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "update city set nation='$nation['nation']',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + $query = "update city set nation='{$nation['nation']}',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "select nation,level from nation where nation!='$nation['nation']'"; + $query = "select nation,level from nation where nation!='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $count = MYDB_num_rows($result); for($k=0; $k < $count; $k++) { $your = MYDB_fetch_array($result); if($your['level'] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$nation['nation']}', '{$your['nation']}', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$your['nation']}', '{$nation['nation']}', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$nation['nation']}', '{$your['nation']}', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$your['nation']}', '{$nation['nation']}', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/event_2.php b/twe/event_2.php index ca8204e3..c3a26b3d 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -55,11 +55,11 @@ $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city,nation from city where nation='$nation['nation']' order by rand() limit 0,1"; + $query = "select city,nation from city where nation='{$nation['nation']}' order by rand() limit 0,1"; $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result2); - $query = "update nation set capital='$city['city']' where nation='$nation['nation']'"; + $query = "update nation set capital='{$city['city']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); } @@ -92,7 +92,7 @@ for($i=0; $i < 7; $i++) { $nationNum[$i] = $nation['nation']; - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation['nation']'"; + $query = "update nation set scout=1,capital={$cap[$i]} where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //태수,군사,시중 해제 @@ -109,24 +109,24 @@ for($i=0; $i < 7; $i++) { $query = "update general set level=1 where no='{$city[gen3]}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "update city set nation='$nation['nation']',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; + $query = "update city set nation='{$nation['nation']}',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $query = "select nation,level from nation where nation!='$nation['nation']'"; + $query = "select nation,level from nation where nation!='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $count = MYDB_num_rows($result); for($k=0; $k < $count; $k++) { $your = MYDB_fetch_array($result); if($your['level'] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$nation['nation']}', '{$your['nation']}', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '1', '1')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$your['nation']}', '{$nation['nation']}', '1', '1')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$your['nation']', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$nation['nation']}', '{$your['nation']}', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your['nation']', '$nation['nation']', '7', '999')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$your['nation']}', '{$nation['nation']}', '7', '999')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } diff --git a/twe/event_3.php b/twe/event_3.php index d7c5d58a..d93df100 100644 --- a/twe/event_3.php +++ b/twe/event_3.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/event_4.php b/twe/event_4.php index 01886f85..2de1693c 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='$_SESSION['p_id']'"; +$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func.php b/twe/func.php index a76f4fd8..a3bef4fd 100644 --- a/twe/func.php +++ b/twe/func.php @@ -212,7 +212,7 @@ function getScenario($connect) { } function CheckBlock($connect) { - $query = "select block from general where user_id='$_SESSION['p_id']'"; + $query = "select block from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); return $me['block']; @@ -1512,7 +1512,7 @@ function getTurn($connect, $general, $type, $font=1) { $str[$i] = "하야"; break; case 46: //건국 - $query = "select makenation from general where no='$general['no']'"; + $query = "select makenation from general where no='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1665,7 +1665,7 @@ function getCoreTurn($connect, $nation, $level) { $str[$i] = "【{$nation['name']}】에게 국고 {$third} 병량 {$fourth} 원조"; break; case 53: //통합제의 - $query = "select makenation from general where level='$level' and nation='$nation['nation']'"; + $query = "select makenation from general where level='$level' and nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1858,14 +1858,14 @@ function CoreTurnTable() { function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; - $query = "select no,city,skin from general where user_id='$_SESSION['p_id']'"; + $query = "select no,city,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 도시 정보 $city = getCity($connect, $me['city']); - $query = "select name,color from nation where nation='$city['nation']'"; + $query = "select name,color from nation where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1975,27 +1975,27 @@ function myNationInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin,no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select skin,no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='$me['nation']'"; + $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='$nation['nation']'"; // 도시 이름 목록 + $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='$nation['nation']'"; // 장수 목록 + $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='{$nation['nation']}'"; // 장수 목록 $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select name from general where nation='$nation['nation']' and level='12'"; + $query = "select name from general where nation='{$nation['nation']}' and level='12'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level12 = MYDB_fetch_array($genresult); - $query = "select name from general where nation='$nation['nation']' and level='11'"; + $query = "select name from general where nation='{$nation['nation']}' and level='11'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level11 = MYDB_fetch_array($genresult); @@ -2151,7 +2151,7 @@ function commandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='$_SESSION['p_id']'"; + $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2162,15 +2162,15 @@ function commandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); - $query = "select city from city where nation='$me['nation']'"; + $query = "select city from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); - $query = "select no from general where nation='$me['nation']'"; + $query = "select no from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select type,level from nation where nation='$me['nation']'"; + $query = "select type,level from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -2385,19 +2385,19 @@ function CoreCommandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,city,level from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,city,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select level,colset from nation where nation='$me['nation']'"; + $query = "select level,colset from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from general where nation='$me['nation']'"; + $query = "select no from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); - $query = "select supply from city where city='$me['city']'"; + $query = "select supply from city where city='{$me['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -2477,11 +2477,11 @@ function CoreCommandTable($connect) { function commandButton($connect) { global $_basecolor, $_basecolor2; - $query = "select skin,no,nation,level,belong from general where user_id='$_SESSION['p_id']'"; + $query = "select skin,no,nation,level,belong from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select nation,color,secretlimit from nation where nation='$me['nation']'"; + $query = "select nation,color,secretlimit from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -2535,7 +2535,7 @@ function commandButton($connect) { } function myInfo($connect) { - $query = "select no,skin from general where user_id='$_SESSION['p_id']'"; + $query = "select no,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2549,7 +2549,7 @@ function generalInfo($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin from general where user_id='$_SESSION['p_id']'"; + $query = "select skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2557,7 +2557,7 @@ function generalInfo($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select nation,level,color from nation where nation='$general['nation']'"; + $query = "select nation,level,color from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -2578,17 +2578,17 @@ function generalInfo($connect, $no, $skin) { $level = getLevel($general['level'], $nation['level']); if($general['level'] == 2) { - $query = "select name from city where gen3='$general['no']'"; + $query = "select name from city where gen3='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); $level = $city['name']." ".$level; } elseif($general['level'] == 3) { - $query = "select name from city where gen2='$general['no']'"; + $query = "select name from city where gen2='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); $level = $city['name']." ".$level; } elseif($general['level'] == 4) { - $query = "select name from city where gen1='$general['no']'"; + $query = "select name from city where gen1='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); $level = $city['name']." ".$level; @@ -2739,7 +2739,7 @@ function generalInfo($connect, $no, $skin) { } function myInfo2($connect) { - $query = "select no,skin from general where user_id='$_SESSION['p_id']'"; + $query = "select no,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3067,7 +3067,7 @@ function MyHistory($connect, $no, $skin) { function addHistory($connect, $me, $history) { $me['history'] = "{$history}
{$me['history']}"; - $query = "update general set history='$me['history']' where no='$me['no']'"; + $query = "update general set history='{$me['history']}' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); return $me; @@ -3075,7 +3075,7 @@ function addHistory($connect, $me, $history) { function addNationHistory($connect, $nation, $history) { $nation['history'] = "{$nation['history']}{$history}
"; - $query = "update nation set history='$nation['history']' where nation='$nation['nation']'"; + $query = "update nation set history='{$nation['history']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); return $nation; @@ -3144,7 +3144,7 @@ function onlinegen($connect) { $onlinegen = $game['onlinegen']; } else { - $query = "select onlinegen from nation where nation='$_SESSION['p_nation']'"; + $query = "select onlinegen from nation where nation='{$_SESSION['p_nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3161,11 +3161,11 @@ function onlineNation($connect) { } function nationMsg($connect) { - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select msg from nation where nation='$me['nation']'"; + $query = "select msg from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3173,11 +3173,11 @@ function nationMsg($connect) { } function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='$_SESSION['p_id']'"; + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $reply = MYDB_fetch_array($result); if($reply['type'] % 100 == 9) { @@ -3192,7 +3192,7 @@ function genList($connect) { $you = MYDB_fetch_array($result); } - $query = "select nation,color,name from nation where nation='$me['nation']'"; + $query = "select nation,color,name from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3239,7 +3239,7 @@ function genList($connect) { echo " "; - $query = "select no,name,npc from general where nation=0 and user_id!='$_SESSION['p_id']' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc from general where nation=0 and user_id!='{$_SESSION['p_id']}' and npc<2 order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { @@ -3261,7 +3261,7 @@ function genList($connect) { echo " "; - $query = "select no,name,npc,level from general where nation='$nation['nation']' and user_id!='$_SESSION['p_id']' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc,level from general where nation='{$nation['nation']}' and user_id!='{$_SESSION['p_id']}' and npc<2 order by npc,binary(name)"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); for($j=0; $j < $gencount; $j++) { @@ -3292,7 +3292,7 @@ function MsgMe($connect, $bg) { msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when - from general where user_id='$_SESSION['p_id']'"; + from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3305,11 +3305,11 @@ function MsgMe($connect, $bg) { } function MsgDip($connect, $bg) { - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='$me['nation']'"; + $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3323,7 +3323,7 @@ function MsgDip($connect, $bg) { // type : xx,xx(불가침기간,타입) // who : xxxx,xxxx(발신인, 수신인) function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { - $query = "select skin,no,nation,name,picture,level from general where user_id='$_SESSION['p_id']'"; + $query = "select skin,no,nation,name,picture,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3343,7 +3343,7 @@ function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { $sndrnation['name'] = '재야'; $sndrnation['color'] = 'FFFFFF'; } else { - $query = "select name,color from nation where nation='$sndr['nation']'"; + $query = "select name,color from nation where nation='{$sndr['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $sndrnation = MYDB_fetch_array($result); } @@ -3354,7 +3354,7 @@ function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { } if($category == 6) { - $query = "select reserved from diplomacy where me='$sndr['nation']' and you='$me['nation']'"; + $query = "select reserved from diplomacy where me='{$sndr['nation']}' and you='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -3374,7 +3374,7 @@ function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { $rcvrnation['name'] = '재야'; $rcvrnation['color'] = 'FFFFFF'; } else { - $query = "select name,color from nation where nation='$rcvr['nation']'"; + $query = "select name,color from nation where nation='{$rcvr['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $rcvrnation = MYDB_fetch_array($result); } @@ -4246,7 +4246,7 @@ function addAge($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); $special = getSpecial($connect, $general['leader'], $general['power'], $general['intel']); - $query = "update general set special='$special' where no='$general['no']'"; + $query = "update general set special='$special' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special)."】(을)를 익혔습니다!"; @@ -4262,7 +4262,7 @@ function addAge($connect) { $general = MYDB_fetch_array($result); $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel'], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); - $query = "update general set special2='$special2' where no='$general['no']'"; + $query = "update general set special2='$special2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; @@ -4488,7 +4488,7 @@ function preUpdateMonthly($connect) { for($i=0; $i < $cityCount; $i++) { $city = MYDB_fetch_array($result); //병 훈 사 5%감소 - $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='$city['city']' and nation='$city['nation']'"; + $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='{$city['city']}' and nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //민심30이하 공백지 처리 @@ -4520,10 +4520,10 @@ function preUpdateMonthly($connect) { $general = MYDB_fetch_array($result); // 주민으로 돌아감 - $query = "update city set pop=pop+'$general['crew']' where city='$general['city']'"; + $query = "update city set pop=pop+'{$general['crew']}' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set crew=0,rice=0 where no='$general['no']'"; + $query = "update general set crew=0,rice=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; @@ -4607,7 +4607,7 @@ function preUpdateMonthly($connect) { if($k >= count($citys)) { break; } if($citys[$k-1]%10 != 0) { $spy .= "|"; } } - $query = "update nation set spy='$spy' where nation='$nation['nation']'"; + $query = "update nation set spy='$spy' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4672,7 +4672,7 @@ group by A.nation //약간의 랜덤치 부여 (95% ~ 105%) $nation['power'] = round($nation['power'] * (rand()%101 + 950) / 1000); - $query = "update nation set power='$nation['power']',gennum2='$nation['gennum']',chemi='$nation['chemi']' where nation='$nation['nation']'"; + $query = "update nation set power='{$nation['power']}',gennum2='{$nation['gennum']}',chemi='{$nation['chemi']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4688,7 +4688,7 @@ group by A.nation $term = round($dip['dead'] / 100 / $genCount) + 1; if($dip['term'] > $term) { $term = $dip['term']; } if($term > 13) { $term = 13; } - $query = "update diplomacy set term='{$term}' where (me='$dip['me']' and you='$dip['you']')"; + $query = "update diplomacy set term='{$term}' where (me='{$dip['me']}' and you='{$dip['you']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4698,7 +4698,7 @@ group by A.nation $dipCount = MYDB_num_rows($result); for($i=0; $i < $dipCount; $i++) { $dip = MYDB_fetch_array($result); - $query = "select name from nation where nation='$dip['me']' or nation='$dip['you']'"; + $query = "select name from nation where nation='{$dip['me']}' or nation='{$dip['you']}'"; $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationResult); $name1 = $nation['name']; @@ -4715,7 +4715,7 @@ group by A.nation //양측 기간 모두 0이 되는 상황이면 휴전 if($dip[term1] <= 1 && $dip[term2] <= 1) { - $query = "select name from nation where nation='$dip['me']' or nation='$dip['you']'"; + $query = "select name from nation where nation='{$dip['me']}' or nation='{$dip['you']}'"; $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationResult); $name1 = $nation['name']; @@ -4723,7 +4723,7 @@ group by A.nation $name2 = $nation['name']; $history[count($history)] = "●$admin['year']년 $admin['month']월:【휴전】$name1(와)과 $name2(이)가 휴전합니다."; //기한 되면 휴전으로 - $query = "update diplomacy set state='2',term='0' where (me='$dip['me']' and you='$dip['you']') or (me='$dip['you']' and you='$dip['me']')"; + $query = "update diplomacy set state='2',term='0' where (me='{$dip['me']}' and you='{$dip['you']}') or (me='{$dip['you']}' and you='{$dip['me']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -4792,7 +4792,7 @@ function checkWander($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select no,name,nation,level,history,turntime from general where nation='$nation['nation']' and level=12"; + $query = "select no,name,nation,level,history,turntime from general where nation='{$nation['nation']}' and level=12"; $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($kingResult); @@ -4816,32 +4816,32 @@ function checkMerge($connect) { $dip = MYDB_fetch_array($dipresult); // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip['me']' and level='12'"; + $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip['you']' and level='12'"; + $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you['nation']'"; + $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me['nation']'"; + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); //양국 NPC수 - $query = "select no from general where nation='$you['nation']' and npc>=2"; + $query = "select no from general where nation='{$you['nation']}' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); //양국 NPC수 - $query = "select no from general where nation='$me['nation']' and npc>=2"; + $query = "select no from general where nation='{$me['nation']}' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount2 = MYDB_num_rows($result); //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you['nation']'"; + $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "$mynation['name'](와)과 통합에 성공했습니다."; @@ -4851,7 +4851,7 @@ function checkMerge($connect) { $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name']$you['makenation']로 통합에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me['nation']'"; + $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); $genlog[0] = "$younation['name'](와)과 통합에 성공했습니다."; @@ -4870,28 +4870,28 @@ function checkMerge($connect) { $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; $newTech = round($newTotalTech / $newGenCount); // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set name='$you['makenation']',gold=gold+'$mynation['gold']',rice=rice+'$mynation['rice']',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation['nation']'"; + $query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 삭제 - $query = "delete from nation where nation='$me['nation']'"; + $query = "delete from nation where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you['nation']',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me['nation']'"; + $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 - $query = "update general set belong=1,level=1,nation='$you['nation']' where nation='$me['nation']'"; + $query = "update general set belong=1,level=1,nation='{$you['nation']}' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 공헌도0.9, 명성0.9 - $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='$you['nation']'"; + $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you['nation']' where nation='$me['nation']'"; + $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 통합국 모든 도시 5% 감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you['nation']'"; + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$me['nation']' or you='$me['nation']'"; + $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) @@ -4902,7 +4902,7 @@ function checkMerge($connect) { $resignCount = round($npccount2*(rand()%21+90)/100); } $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you['nation']' and npc>=2 order by rand() limit {$resignCount}"; + $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($me, $mylog); @@ -4927,32 +4927,32 @@ function checkSurrender($connect) { $dip = MYDB_fetch_array($dipresult); // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip['me']' and level='12'"; + $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip['you']' and level='12'"; + $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $you = MYDB_fetch_array($result); // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you['nation']'"; + $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me['nation']'"; + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); //양국 NPC수 - $query = "select no from general where nation='$you['nation']' and npc>=2"; + $query = "select no from general where nation='{$you['nation']}' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); //양국 NPC수 - $query = "select no from general where nation='$me['nation']' and npc>=2"; + $query = "select no from general where nation='{$me['nation']}' and npc>=2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount2 = MYDB_num_rows($result); //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you['nation']'"; + $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "$mynation['name'] 합병에 성공했습니다."; @@ -4962,7 +4962,7 @@ function checkSurrender($connect) { $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name'] 합병에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me['nation']'"; + $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); $genlog[0] = "$younation['name'](으)로 항복하여 수도로 이동합니다."; @@ -4981,35 +4981,35 @@ function checkSurrender($connect) { $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; $newTech = round($newTotalTech / $newGenCount); // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set gold=gold+'$mynation['gold']',rice=rice+'$mynation['rice']',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation['nation']'"; + $query = "update nation set gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //합병 당한국 모든 도시 10%감소 - $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='$me['nation']'"; + $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //합병 시도국 모든 도시 5%감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you['nation']'"; + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 삭제 - $query = "delete from nation where nation='$me['nation']'"; + $query = "delete from nation where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군주가 있는 위치 구함 - $query = "select city from general where nation='$you['nation']' and level='12'"; + $query = "select city from general where nation='{$you['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you['nation']',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me['nation']'"; + $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 제의국 모든 장수들 공헌도0.95, 명성0.95 - $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='$you['nation']'"; + $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='{$you['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 - $query = "update general set belong=1,level=1,nation='$you['nation']',city='$king['city']',dedication=dedication*1.1,experience=experience*0.9 where nation='$me['nation']'"; + $query = "update general set belong=1,level=1,nation='{$you['nation']}',city='{$king['city']}',dedication=dedication*1.1,experience=experience*0.9 where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you['nation']' where nation='$me['nation']'"; + $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$me['nation']' or you='$me['nation']'"; + $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) @@ -5020,7 +5020,7 @@ function checkSurrender($connect) { $resignCount = round($npccount2*(rand()%21+90)/100); } $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you['nation']' and npc>=2 order by rand() limit {$resignCount}"; + $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($me, $mylog); @@ -5044,11 +5044,11 @@ function updateNationState($connect) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); - $query = "select city,level,secu from city where nation='$nation['nation']' and level>=4"; + $query = "select city,level,secu from city where nation='{$nation['nation']}' and level>=4"; $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($cityresult); - $query = "select no from general where nation='$nation['nation']'"; + $query = "select no from general where nation='{$nation['nation']}'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -5095,14 +5095,14 @@ function updateNationState($connect) { } //작위 상승 - $query = "update nation set level='$nation['level']' where nation='$nation['nation']'"; + $query = "update nation set level='{$nation['level']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $gennum = $gencount; if($gencount < 10) $gencount = 10; //기술 및 변경횟수 업데이트 $myset = $nation['level'] + 1; - $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation['nation']'"; + $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushHistory($connect, $history); @@ -5224,7 +5224,7 @@ function checkStatistic($connect) { gen_count, personal_hist, special_hist, power_hist, crewtype, etc ) values ( - '$admin['year']', '$admin['month']', + '{$admin['year']}', '{$admin['month']}', '$nationCount', '$nationName', '$nationHist', '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', '$crewtype', '$etc' @@ -5244,7 +5244,7 @@ function checkEmperior($connect) { if($count == 1 && $admin['isUnited'] == 0) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation['nation']'"; + $query = "select city from city where nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -5267,50 +5267,50 @@ function checkEmperior($connect) { CheckHall($connect, $general['no']); } - $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='$nation['nation']'"; + $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='$nation['nation']'"; // 도시 이름 목록 + $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록 $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityresult); $pop = "{$city['totalpop']} / {$city['maxpop']}"; $poprate = round($city['totalpop']/$city['maxpop']*100, 2); $poprate .= " %"; - $query = "select name,picture,belong from general where nation='$nation['nation']' and level='12'"; + $query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $level12 = MYDB_fetch_array($genresult); - $query = "select name,picture,belong from general where nation='$nation['nation']' and level='11'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='10'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='9'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='8'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='7'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='6'"; + $query = "select name,picture,belong 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 name,picture,belong from general where nation='$nation['nation']' and level='5'"; + $query = "select name,picture,belong 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 name,picture,killnum from general where nation='$nation['nation']' order by killnum desc limit 5"; // 오호장군 + $query = "select name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군 $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $tigernum = MYDB_num_rows($tigerresult); for($i=0; $i < $tigernum; $i++) { @@ -5320,7 +5320,7 @@ function checkEmperior($connect) { } } - $query = "select name,picture,firenum from general where nation='$nation['nation']' order by firenum desc limit 7"; // 건안칠자 + $query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자 $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $eaglenum = MYDB_num_rows($eagleresult); for($i=0; $i < $eaglenum; $i++) { @@ -5332,7 +5332,7 @@ function checkEmperior($connect) { $log[0] = "●$admin['year']년 $admin['month']월: $nation['name'](이)가 전토를 통일하였습니다."; - $query = "select no,name from general where nation='$nation['nation']' order by dedication desc"; + $query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { @@ -5355,7 +5355,7 @@ function checkEmperior($connect) { $statNC = "1 / {$stat['nc']}"; $statGC = "{$gencount['cnt']} / {$stat['gc']}"; - $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='$stat['nc']' limit 0,1"; + $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $statNation = MYDB_fetch_array($result); @@ -5377,15 +5377,15 @@ function checkEmperior($connect) { tiger, eagle, gen, history ) values ( '-', - '$statNC', '$statNation['nation_name']', '$statNation['nation_hist']', - '$statGC', '$statGeneral['personal_hist']', '$statGeneral['special_hist']', - '$nation['name']', '$nation['type']', '$nation['color']', '$admin['year']', '$admin['month']', '$nation['power']', '$nation['gennum']', '$allcount', - '$pop', '$poprate', '$nation['gold']', '$nation['rice']', - '$level12['name']', '$level12['picture']', '$level11['name']', '$level11['picture']', - '$level10['name']', '$level10['picture']', '$level9['name']', '$level9['picture']', - '$level8['name']', '$level8['picture']', '$level7['name']', '$level7['picture']', - '$level6['name']', '$level6['picture']', '$level5['name']', '$level5['picture']', - '$tigerstr', '$eaglestr', '$gen', '$nation['history']' + '$statNC', '{$statNation['nation_name']}', '{$statNation['nation_hist']}', + '$statGC', '{$statGeneral['personal_hist']}', '{$statGeneral['special_hist']}', + '{$nation['name']}', '{$nation['type']}', '{$nation['color']}', '{$admin['year']}', '{$admin['month']}', '{$nation['power']}', '{$nation['gennum']}', '$allcount', + '$pop', '$poprate', '{$nation['gold']}', '{$nation['rice']}', + '{$level12['name']}', '{$level12['picture']}', '{$level11['name']}', '{$level11['picture']}', + '{$level10['name']}', '{$level10['picture']}', '{$level9['name']}', '{$level9['picture']}', + '{$level8['name']}', '{$level8['picture']}', '{$level7['name']}', '{$level7['picture']}', + '{$level6['name']}', '{$level6['picture']}', '{$level5['name']}', '{$level5['picture']}', + '$tigerstr', '$eaglestr', '$gen', '{$nation['history']}' )"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5415,7 +5415,7 @@ function PreprocessCommand($connect, $no) { pushGenLog($general, $log); } - $query = "select no,name,injury from general where city='$general['city']' and injury>10 order by rand()"; + $query = "select no,name,injury from general where city='{$general['city']}' and injury>10 order by rand()"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $patientCount = MYDB_num_rows($result); @@ -5428,7 +5428,7 @@ function PreprocessCommand($connect, $no) { $patient = MYDB_fetch_array($result); //부상 치료 - $query = "update general set injury=0 where no='$patient['no']'"; + $query = "update general set injury=0 where no='{$patient['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "{$general['name']}(이)가 의술로써 치료해줍니다!"; @@ -5491,24 +5491,24 @@ function processCommand($connect, $no) { $log[count($log)] = "●{$admin['month']}월:현재 멀티, 또는 비매너로 인한블럭 대상자입니다. <1>$date"; pushGenLog($general, $log); - $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; + $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($general['block'] == 3) { $date = substr($general['turntime'],11,5); $log[count($log)] = "●{$admin['month']}월:현재 악성유저로 분류되어 블럭, 발언권 무효 대상자입니다. <1>$date"; pushGenLog($general, $log); - $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; + $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { if($general['level'] >= 5 && $general['level'] <= 12) { - $query = "select l{$general['level']}turn0,l{$general['level']}term from nation where nation='$general['nation']'"; + $query = "select l{$general['level']}turn0,l{$general['level']}term from nation where nation='{$general['nation']}'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $core = MYDB_fetch_array($coreresult); $corecommand = DecodeCommand($core["l{$general['level']}turn0"]); //연속턴 아닌경우 텀 리셋 if($core["l{$general['level']}term"]%100 != $corecommand[0]) { - $query = "update nation set l{$general['level']}term=0 where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term=0 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5548,18 +5548,18 @@ function processCommand($connect, $no) { $command = DecodeCommand($general[turn0]); //삭턴 처리 if($general['npc'] >= 2 || $general['killturn'] > $admin['killturn']) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif(floor($command[0]) == 0 && $general['userlevel'] < 5) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general['no']'"; + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='$admin['killturn']' where no='$general['no']'"; + $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='{$admin['killturn']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //연속턴 아닌경우 텀 리셋 if($general['term']%100 != $command[0]) { - $query = "update general set term=0 where no='$general['no']'"; + $query = "update general set term=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //턴 처리 @@ -5632,7 +5632,7 @@ update general set turn0=turn1,turn1=turn2,turn2=turn3,turn3=turn4,turn4=turn5,turn5=turn6,turn6=turn7,turn7=turn8,turn8=turn9, turn9=turn10,turn10=turn11,turn11=turn12,turn12=turn13,turn13=turn14,turn14=turn15,turn15=turn16,turn16=turn17, turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='00000000000000' -where no='$general['no']' +where no='{$general['no']}' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5646,7 +5646,7 @@ update nation set {$turn}6={$turn}7,{$turn}7={$turn}8, {$turn}8={$turn}9,{$turn}9={$turn}10, {$turn}10={$turn}11,{$turn}11='00000000000099' -where nation='$general['nation']' +where nation='{$general['nation']}' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5685,7 +5685,7 @@ update nation set {$turn}5={$turn}4,{$turn}4={$turn}3, {$turn}3={$turn}2,{$turn}2={$turn}1, {$turn}1={$turn}0,{$turn}0='00000000000099' -where nation='$general['nation']' +where nation='{$general['nation']}' "; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5708,7 +5708,7 @@ function updateTurntime($connect, $no) { $pw = md5("18071807"); $general['killturn'] = ($general['deadyear'] - $admin['year']) * 12; $general['npc'] = $general['npc_org']; - $query = "update general set user_id='$npcid',password='$pw',npc='$general['npc']',killturn='$general['killturn']',mode=2 where no='$no'"; + $query = "update general set user_id='$npcid',password='$pw',npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[0] = "●{$admin['month']}월:$general[name2](이)가 $general['name']의 육체에서 유체이탈합니다!"; @@ -5724,41 +5724,41 @@ function updateTurntime($connect, $no) { } //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general['no']'"; + $query = "update city set gen1='0' where gen1='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general['no']'"; + $query = "update city set gen2='0' where gen2='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general['no']'"; + $query = "update city set gen3='0' where gen3='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 처리 - $query = "select no from troop where troop='$general['troop']'"; + $query = "select no from troop where troop='{$general['troop']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general['troop']'"; + $query = "update general set troop='0' where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general['troop']'"; + $query = "delete from troop where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general['no']'"; + $query = "update general set troop='0' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 장수 삭제 - $query = "delete from general where no='$general['no']'"; + $query = "delete from general where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //기존 국가 기술력 그대로 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견 @@ -5891,7 +5891,7 @@ function CheckHall($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select nation,name,color from nation where nation='$general['nation']'"; + $query = "select nation,name,color from nation where nation='{$general['nation']}'"; $nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationresult); @@ -5928,10 +5928,10 @@ function CheckHall($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ranker = MYDB_fetch_array($result); - $query = "update hall set name='$ranker['name']', nation='$ranker['nation']', data='$ranker['data']', color='$ranker['color']', picture='$ranker['picture']' where type='$k' and rank='$j'"; + $query = "update hall set name='{$ranker['name']}', nation='{$ranker['nation']}', data='{$ranker['data']}', color='{$ranker['color']}', picture='{$ranker['picture']}' where type='$k' and rank='$j'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - $query = "update hall set name='$general['name']', nation='{$nation['name']}', data='{$general[$type[$k]]}', color='{$nation['color']}', picture='$general['picture']' where type='$k' and rank='$rank'"; + $query = "update hall set name='{$general['name']}', nation='{$nation['name']}', data='{$general[$type[$k]]}', color='{$nation['color']}', picture='{$general['picture']}' where type='$k' and rank='$rank'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6021,10 +6021,10 @@ function uniqueItem($connect, $general, $log, $vote=0) { } $it = $item[rand() % count($item)]; - $query = "update general set {$type}='$it' where no='$general['no']'"; + $query = "update general set {$type}='$it' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select name from nation where nation='$general['nation']'"; + $query = "select name from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -6102,41 +6102,41 @@ function checkAbility($connect, $general, $log) { $limit = $_upgradeLimit; - $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='$general['no']'"; + $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); if($general[leader2] < 0) { - $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='$general['no']'"; + $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 떨어졌습니다!"; } elseif($general[leader2] >= $limit) { - $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='$general['no']'"; + $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 올랐습니다!"; } if($general[power2] < 0) { - $query = "update general set power2='$limit'+power2,power=power-1 where no='$general['no']'"; + $query = "update general set power2='$limit'+power2,power=power-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 떨어졌습니다!"; } elseif($general[power2] >= $limit) { - $query = "update general set power2=power2-'$limit',power=power+1 where no='$general['no']'"; + $query = "update general set power2=power2-'$limit',power=power+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 올랐습니다!"; } if($general[intel2] < 0) { - $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='$general['no']'"; + $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "지력이 1 떨어졌습니다!"; } elseif($general[intel2] >= $limit) { - $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='$general['no']'"; + $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "지력이 1 올랐습니다!"; @@ -6148,7 +6148,7 @@ function checkAbility($connect, $general, $log) { function checkDedication($connect, $general, $log) { $dedlevel = getDedLevel($general['dedication']); - $query = "update general set dedlevel='$dedlevel' where no='$general['no']'"; + $query = "update general set dedlevel='$dedlevel' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 승급했다면 @@ -6165,7 +6165,7 @@ function checkDedication($connect, $general, $log) { function checkExperience($connect, $general, $log) { $explevel = getExpLevel($general['experience']); - $query = "update general set explevel='$explevel' where no='$general['no']'"; + $query = "update general set explevel='$explevel' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 승급했다면 @@ -6255,7 +6255,7 @@ function processGoldIncome($connect) { } $adminLog[count($adminLog)] = _String::Fill2($nation['name'],12," ")." // 세금 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과금 : ".tab2($nation['gold'],6," "); - $query = "select no,name,nation from general where nation='$nation['nation']' and level>='9'"; + $query = "select no,name,nation from general where nation='{$nation['nation']}' and level>='9'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($coreresult); $corelog[0] = "●이번 수입은 금 $income입니다."; @@ -6264,10 +6264,10 @@ function processGoldIncome($connect) { pushGenLog($coregen, $corelog); } - $query = "update nation set gold='$nation['gold']' where nation='$nation['nation']'"; + $query = "update nation set gold='{$nation['gold']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name,nation,dedication,gold from general where nation='$nation['nation']'"; + $query = "select no,name,nation,dedication,gold from general where nation='{$nation['nation']}'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -6277,7 +6277,7 @@ function processGoldIncome($connect) { $gold = round(getBill($general['dedication'])*$ratio); $general['gold'] += $gold; - $query = "update general set gold='$general['gold']' where no='$general['no']'"; + $query = "update general set gold='{$general['gold']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●봉급으로 금 $gold을 받았습니다."; @@ -6357,7 +6357,7 @@ function popIncrease($connect) { if($wall > $city[wall2]) { $wall = $city[wall2]; } //시세 - $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='$city['city']'"; + $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6437,8 +6437,8 @@ function processDeadIncome($connect, $admin_rate) { $income = getDeadIncome($connect, $nation['nation'], $nation['type'], $admin_rate); // 단기수입 금만적용 -// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='$nation['nation']'"; - $query = "update nation set gold=gold+'$income' where nation='$nation['nation']'"; +// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='{$nation['nation']}'"; + $query = "update nation set gold=gold+'$income' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 10%수입, 20%부상병 @@ -6556,7 +6556,7 @@ function processRiceIncome($connect) { } $adminLog[count($adminLog)] = _String::Fill2($nation['name'],12," ")." // 세곡 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과곡 : ".tab2($nation['rice'],6," "); - $query = "select no,name,nation from general where nation='$nation['nation']' and level>='9'"; + $query = "select no,name,nation from general where nation='{$nation['nation']}' and level>='9'"; $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($coreresult); $corelog[0] = "●이번 수입은 쌀 $income입니다."; @@ -6565,10 +6565,10 @@ function processRiceIncome($connect) { pushGenLog($coregen, $corelog); } - $query = "update nation set rice='$nation['rice']' where nation='$nation['nation']'"; + $query = "update nation set rice='{$nation['rice']}' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name,nation,dedication,rice from general where nation='$nation['nation']'"; + $query = "select no,name,nation,dedication,rice from general where nation='{$nation['nation']}'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -6578,7 +6578,7 @@ function processRiceIncome($connect) { $rice = round(getBill($general['dedication'])*$ratio); $general['rice'] += $rice; - $query = "update general set rice='$general['rice']' where no='$general['no']'"; + $query = "update general set rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●봉급으로 쌀 $rice을 받았습니다."; @@ -6695,7 +6695,7 @@ function tradeRate($connect) { } else { $trade = 0; } - $query = "update city set trade='$trade' where city='$city['city']'"; + $query = "update city set trade='$trade' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6857,7 +6857,7 @@ function disaster($connect) { if($city['def'] > $city[def2]) { $city['def'] = $city[def2]; } if($city['wall'] > $city[wall2]) { $city['wall'] = $city[wall2]; } - $query = "update city set state='$state',pop='$city['pop']',rate='$city['rate']',agri='$city['agri']',comm='$city['comm']',secu='$city['secu']',def='$city['def']',wall='$city['wall']' where city='$disastercity[$i]'"; + $query = "update city set state='$state',pop='{$city['pop']}',rate='{$city['rate']}',agri='{$city['agri']}',comm='{$city['comm']}',secu='{$city['secu']}',def='{$city['def']}',wall='{$city['wall']}' where city='$disastercity[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -6875,7 +6875,7 @@ function getAdmin($connect) { } function getMe($connect) { - $query = "select * from general where user_id='$_SESSION['p_id']'"; + $query = "select * from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -6982,26 +6982,26 @@ function deleteNation($connect, $general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general['nation']'"; + $query = "select name from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); $history[count($history)] = "●$admin['year']년 $admin['month']월:【멸망】$nation['name']은(는) 멸망했습니다."; // 전 장수 재야로 // 전 장수 소속 무소속으로 - $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='$general['nation']'"; + $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 도시 공백지로 - $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='$general['nation']'"; + $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where nation='$general['nation']'"; + $query = "delete from troop where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가 삭제 - $query = "delete from nation where nation='$general['nation']'"; + $query = "delete from nation where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$general['nation']' or you='$general['nation']'"; + $query = "delete from diplomacy where me='{$general['nation']}' or you='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushHistory($connect, $history); @@ -7012,17 +7012,17 @@ function nextRuler($connect, $general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general['nation']'"; + $query = "select nation,name,history from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no,name from general where nation='$general['nation']' and level!='12' and level>='9' order by level desc"; + $query = "select no,name from general where nation='{$general['nation']}' and level!='12' and level>='9' order by level desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($result); //npc or npc유저인 경우 후계 찾기 if($general['npc'] > 0) { - $query = "select no,name,nation,IF(ABS(npcmatch-'$general['npcmatch']')>75,150-ABS(npcmatch-'$general['npcmatch']'),ABS(npcmatch-'$general['npcmatch']')) as npcmatch2 from general where nation='$general['nation']' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; + $query = "select no,name,nation,IF(ABS(npcmatch-'{$general['npcmatch']}')>75,150-ABS(npcmatch-'{$general['npcmatch']}'),ABS(npcmatch-'{$general['npcmatch']}')) as npcmatch2 from general where nation='{$general['nation']}' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; $npcresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($npcresult); } else { @@ -7033,10 +7033,10 @@ function nextRuler($connect, $general) { if($npccount > 0) { $nextruler = MYDB_fetch_array($npcresult); //국명 교체 - //$query = "update nation set name='$nextruler['name']' where nation='$general['nation']'"; + //$query = "update nation set name='{$nextruler['name']}' where nation='{$general['nation']}'"; //MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($corecount == 0) { - $query = "select no,name from general where nation='$general['nation']' and level!='12' order by dedication desc"; + $query = "select no,name from general where nation='{$general['nation']}' and level!='12' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $corecount = MYDB_num_rows($result); @@ -7054,16 +7054,16 @@ function nextRuler($connect, $general) { } //군주 교체 - $query = "update general set level='12' where no='$nextruler['no']'"; + $query = "update general set level='12' where no='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen1=0 where gen1='$nextruler['no']'"; + $query = "update city set gen1=0 where gen1='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen2=0 where gen2='$nextruler['no']'"; + $query = "update city set gen2=0 where gen2='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //도시관직해제 - $query = "update city set gen3=0 where gen3='$nextruler['no']'"; + $query = "update city set gen3=0 where gen3='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $history[count($history)] = "●$admin['year']년 $admin['month']월:【유지】$nextruler['name'](이)가 $nation['name']의 유지를 이어 받았습니다"; @@ -7277,7 +7277,7 @@ function TrickInjury($connect, $city, $type=0) { if($injury < 30) { // 부상률 30% $injury = floor($injury / 2) + 1; // 부상 1~16 - $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='$general['no']'"; + $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); @@ -7341,7 +7341,7 @@ function command_Single($connect, $turn, $command) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$command}'"; } - $query = "update general set {$str} where user_id='$_SESSION['p_id']'"; + $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; @@ -7350,7 +7350,7 @@ function command_Single($connect, $turn, $command) { function command_Chief($connect, $turn, $command) { $command = EncodeCommand(0, 0, 0, $command); - $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -7360,7 +7360,7 @@ function command_Chief($connect, $turn, $command) { for($i=0; $i < $count; $i++) { $str .= ",l{$me['level']}turn{$turn[$i]}='{$command}'"; } - $query = "update nation set {$str} where nation='$me['nation']'"; + $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } echo ""; diff --git a/twe/func_auction.php b/twe/func_auction.php index 469fc046..f7356a38 100644 --- a/twe/func_auction.php +++ b/twe/func_auction.php @@ -196,7 +196,7 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰!"; @@ -208,7 +208,7 @@ function processAuction($connect) { $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; $auctionLog[0] .= " ★ 아이템 거래 ★"; - $query = "update general set gold=gold-'$auction['value']',{$type}='$sel2' where no='$auction[no2]'"; + $query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[0] = "●{$admin['month']}월:$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; @@ -259,7 +259,7 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $trader['gold'] -= $gold; if($trader['gold'] < 0) $trader['gold'] = 0; - $query = "update general set gold='$trader['gold']' where no='$auction[no1]'"; + $query = "update general set gold='{$trader['gold']}' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; @@ -269,7 +269,7 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; @@ -286,9 +286,9 @@ function processAuction($connect) { } elseif($auction['value'] * 2 <= $auction['amount']) { $auctionLog[0] .= " ★ 최저가 거래 ★"; } - $query = "update general set gold=gold+'$auction['value']',rice=rice-'$auction['amount']' where no='$auction[no1]'"; + $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold-'$auction['value']',rice=rice+'$auction['amount']' where no='$auction[no2]'"; + $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); @@ -300,7 +300,7 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='$bidder['gold']' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; @@ -310,7 +310,7 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $trader['gold'] -= $gold; if($trader['gold'] < 0) $trader['gold'] = 0; - $query = "update general set gold='$trader['gold']' where no='$auction[no1]'"; + $query = "update general set gold='{$trader['gold']}' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; @@ -328,9 +328,9 @@ function processAuction($connect) { $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; } - $query = "update general set gold=gold-'$auction['value']',rice=rice+'$auction['amount']' where no='$auction[no1]'"; + $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='$auction[no1]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold+'$auction['value']',rice=rice-'$auction['amount']' where no='$auction[no2]'"; + $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); diff --git a/twe/func_history.php b/twe/func_history.php index ae5b8d31..3277eb85 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -105,7 +105,7 @@ function LogHistory($connect, $isFirst=0) { for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$nation['nation']'"; + $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); @@ -121,7 +121,7 @@ function LogHistory($connect, $isFirst=0) { insert into history ( year, month, map, log, genlog, nation, power, gen, city ) values ( - '$admin['year']', '$admin['month']', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' + '{$admin['year']}', '{$admin['month']}', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' )", $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/func_npc.php b/twe/func_npc.php index fac79ba5..5a3ca365 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -971,47 +971,47 @@ function processAI($connect, $no) { return; } - $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='$general['city']'"; + $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='$general['nation']'"; + $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); if($general['level'] >= 5) { - $query = "select l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); $coreCommand = MYDB_fetch_array($result); } $attackable = 0; - $query = "select city from city where nation='$general['nation']' and supply='1' and front=1"; + $query = "select city from city where nation='{$general['nation']}' and supply='1' and front=1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); // 공격가능도시 있으면 1 if($cityCount > 0) { $attackable = 1; } $dipState = 0; - $query = "select no from diplomacy where me='$general['nation']' and state=1 and term>8"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=1 and term>8"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 선포중이면 1상태 if($dipCount > 0) { $dipState = 1; } - $query = "select no from diplomacy where me='$general['nation']' and state=1 and term<=8"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=1 and term<=8"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 전쟁준비 선포중이면 2상태 if($dipCount > 0) { $dipState = 2; } - $query = "select no from diplomacy where me='$general['nation']' and state=1 and term<=3"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=1 and term<=3"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 교전 직전이면 3상태 if($dipCount > 0) { $dipState = 3; } - $query = "select no from diplomacy where me='$general['nation']' and state=0"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=0"; $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); // 교전중이면 4상태 @@ -1048,12 +1048,12 @@ function processAI($connect, $no) { if($general['atmos'] >= 90 && $general['train'] >= 90) { if($general['mode'] == 0) { - $query = "update general set mode=1 where no='$general['no']'"; + $query = "update general set mode=1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } } else { if($general['mode'] == 1) { - $query = "update general set mode=0 where no='$general['no']'"; + $query = "update general set mode=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } } @@ -1088,7 +1088,7 @@ function processAI($connect, $no) { } else { $command = EncodeCommand(0, 0, 0, 42); //견문 } - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); return; } elseif($general['npc'] < 5 && $general['level'] == 0) { @@ -1120,7 +1120,7 @@ function processAI($connect, $no) { $ratio = round($npcCount / ($nonCount + $npcCount) * 100); $ratio = round($ratio * 1.0); //NPC우선임관 - $query = "select nation,ABS(IF(ABS(npcmatch-'$general['npcmatch']')>75,150-ABS(npcmatch-'$general['npcmatch']'),ABS(npcmatch-'$general['npcmatch']'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; + $query = "select nation,ABS(IF(ABS(npcmatch-'{$general['npcmatch']}')>75,150-ABS(npcmatch-'{$general['npcmatch']}'),ABS(npcmatch-'{$general['npcmatch']}'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); $rulerCount = MYDB_num_rows($result); if($rulerCount > 0 && $general['npcmatch'] != 999 && rand()%100 < $ratio && $general['makelimit'] == 0) { // 엔국 비율대로 임관(50% : 50%) @@ -1153,7 +1153,7 @@ function processAI($connect, $no) { $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); break; } - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); return; } @@ -1167,13 +1167,13 @@ function processAI($connect, $no) { if($nation['level'] == 0) { // 해산 $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } else { // 방랑 $command = EncodeCommand(0, 0, 0, 47); - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } @@ -1199,7 +1199,7 @@ function processAI($connect, $no) { if($admin['startyear']+2 <= $admin['year']) { // 해산 $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } elseif($city['nation'] == 0 && ($city['level'] == 5 || $city['level'] == 6)) { @@ -1209,20 +1209,20 @@ function processAI($connect, $no) { $command = EncodeCommand(0, $type, $color, 46); $nationName = "㉿"._String::SubStr($general['name'], 1); //건국 - $query = "update general set turn0='$command',makenation='$nationName' where no='$general['no']'"; + $query = "update general set turn0='$command',makenation='$nationName' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI08 ".MYDB_error($connect),""); return; } elseif(rand()%4 > 0) { //이동 $paths = explode("|", $city['path']); $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } else { //조달 $command = EncodeCommand(0, 0, 0, 9); - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); return; } @@ -1232,12 +1232,12 @@ function processAI($connect, $no) { //전방 체크 먼저 SetNationFront($connect, $nation['nation']); - $query = "select city from city where nation='$general['nation']' and front=1 limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and front=1 limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); $frontCount = MYDB_num_rows($result); //근접 공백지 없을때 if($frontCount == 0) { - $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$general['nation']'"; + $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $devRate = MYDB_fetch_array($result); //내정이 80% 이상일때 @@ -1250,7 +1250,7 @@ function processAI($connect, $no) { if(isClose($connect, $general['nation'], $youNation['nation'])) { $command = EncodeCommand(0, 0, $youNation['nation'], 62); - $query = "update nation set l12turn0='$command' where nation='$general['nation']'"; + $query = "update nation set l12turn0='$command' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); $rulerCommand = 1; break; @@ -1269,13 +1269,13 @@ function processAI($connect, $no) { //방랑군 아니고, 입력된 턴이 없을때 수뇌부가 할일 if($nation['level'] != 0 && $general['level'] >= 5 && $rulerCommand == 0) { - $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation!='$general['nation']' and A.no!='$general['no']' order by rand() limit 0,1"; + $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='{$general['nation']}' and B.nation!='{$general['nation']}' and A.no!='{$general['no']}' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); $curGen = MYDB_fetch_array($result); if($curGen['no'] != 0) { // 타도시에 있는 경우 국내로 발령 if($dipState >= 3) { - $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and front=1 and supply=1 order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); if($selCity['city'] > 0) { @@ -1289,11 +1289,11 @@ function processAI($connect, $no) { // 발령 $command = EncodeCommand(0, $curGen['no'], $city['city'], 27); } - $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}turn0='$command' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } elseif($dipState <= 1) { // 평시엔 균등 발령만 //발령, 최소장수 도시 선택, 최다장수도시의 장수 선택 - $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.supply=1 group by A.city"; + $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='{$general['nation']}' and B.nation='{$general['nation']}' and B.supply=1 group by A.city"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); //도시 2개 이상일때만 @@ -1309,14 +1309,14 @@ function processAI($connect, $no) { } if($devCity != 0) { $minCity = $devCity; } if($maxCity != $minCity) { - $query = "select no from general where city='$maxCity' and nation='$general['nation']' and no!='$general['no']' and npc>=2 limit 0,1"; + $query = "select no from general where city='$maxCity' and nation='{$general['nation']}' and no!='{$general['no']}' and npc>=2 limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); $curGen = MYDB_fetch_array($result); if($curGen['no'] != 0) { // 발령 $command = EncodeCommand(0, $curGen['no'], $minCity, 27); - $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}turn0='$command' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } //계속 진행 @@ -1324,14 +1324,14 @@ function processAI($connect, $no) { } } else { // 병사있고 쌀있고 후방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; + $query = "select A.no from general A, city B where A.city=B.city and A.nation='{$general['nation']}' and B.nation='{$general['nation']}' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selGen = MYDB_fetch_array($result); // 전방 도시, 30% 확률로 태수 있는 전방으로 발령 if(rand()%100 < 30) { - $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; } else { - $query = "select city from city where nation='$general['nation']' and front=1 and supply=1 order by rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and front=1 and supply=1 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); @@ -1340,11 +1340,11 @@ function processAI($connect, $no) { $command = EncodeCommand(0, $selGen['no'], $selCity['city'], 27); } else { //병사 없고 인구없는 전방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general['nation']' and B.nation='$general['nation']' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; + $query = "select A.no from general A, city B where A.city=B.city and A.nation='{$general['nation']}' and B.nation='{$general['nation']}' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selGen = MYDB_fetch_array($result); // 인구많은도시 - $query = "select city from city where nation='$general['nation']' and supply=1 order by pop desc limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and supply=1 order by pop desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); if($selGen['no'] > 0 && $selCity['city'] > 0 && rand() % 100 < 80) { // 80% 확률 @@ -1357,7 +1357,7 @@ function processAI($connect, $no) { if($nation[$type] < 1000) { // 몰수 // 몰수 대상 - $query = "select no,{$type} from general where nation='$general['nation']' and no!='$general['no']' and {$type}>3000 order by {$type} desc limit 0,1"; + $query = "select no,{$type} from general where nation='{$general['nation']}' and no!='{$general['no']}' and {$type}>3000 order by {$type} desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $SelGen = MYDB_fetch_array($result); if($SelGen['no'] != 0) { @@ -1368,7 +1368,7 @@ function processAI($connect, $no) { } } else { // 포상 // 포상 대상 - $query = "select no from general where nation='$general['nation']' and no!='$general['no']' and killturn>=5 order by {$type} limit 0,1"; + $query = "select no from general where nation='{$general['nation']}' and no!='{$general['no']}' and killturn>=5 order by {$type} limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $SelGen = MYDB_fetch_array($result); if($SelGen['no'] != 0) { @@ -1380,7 +1380,7 @@ function processAI($connect, $no) { } } } - $query = "update nation set l{$general['level']}turn0='$command' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}turn0='$command' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); } } @@ -1415,7 +1415,7 @@ function processAI($connect, $no) { //아국땅 아니면 귀환 if($general['nation'] != $city['nation'] || $city['supply'] == 0) { $command = EncodeCommand(0, 0, 0, 28); //귀환 - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1424,7 +1424,7 @@ function processAI($connect, $no) { $amount = floor(($general['rice'] - 200)/100) + 1; if($amount > 20) { $amount = 20; } $command = EncodeCommand(0, 2, $amount, 44); //헌납 - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1473,7 +1473,7 @@ function processAI($connect, $no) { } if($command == EncodeCommand(0, 0, 0, 1)) { // 공격아닌 경우 - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='$general['city']'"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("processAI19 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); @@ -1487,9 +1487,9 @@ function processAI($connect, $no) { case 8: case 9: // 저개발 도시로 워프 20% //도시 선택, 30% 확률로 군사 있는 곳으로 워프 if(rand()%100 < 30) { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general['nation']' and supply='1' order by gen2 desc,dev limit 0,1"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='{$general['nation']}' and supply='1' order by gen2 desc,dev limit 0,1"; } else { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general['nation']' and supply='1' order by dev limit 0,1"; + $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='{$general['nation']}' and supply='1' order by dev limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); @@ -1498,11 +1498,11 @@ function processAI($connect, $no) { $command = EncodeCommand(0, 0, 0, 1); } else { //워프 - $query = "update general set city='$selCity['city']' where no='$general['no']'"; + $query = "update general set city='{$selCity['city']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1569,15 +1569,15 @@ function processAI($connect, $no) { else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 elseif($general['crew'] < 700 && $general['gold'] >= $resrc && $general['rice'] >= $resrc) { - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $genCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general['nation']' and city='$general['city']'"; + $query = "select no from general where nation='{$general['nation']}' and city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $genCount2 = MYDB_num_rows($result); - $query = "select sum(pop) as sum from city where nation='$general['nation']' and supply='1'"; + $query = "select sum(pop) as sum from city where nation='{$general['nation']}' and supply='1'"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $sumCity = MYDB_fetch_array($result); // 현도시 인구 비율 @@ -1590,17 +1590,17 @@ function processAI($connect, $no) { $command = EncodeCommand(0, 0, 0, 11); //인구 되면 징병 } else { // 인구 안되면 4만 이상인 도시로 워프 - $query = "select city from city where nation='$general['nation']' and pop>40000 and supply='1' order by rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and pop>40000 and supply='1' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); if($cityCount > 0) { $selCity = MYDB_fetch_array($result); //워프 - $query = "update general set city='$selCity['city']' where no='$general['no']'"; + $query = "update general set city='{$selCity['city']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } else { @@ -1609,13 +1609,13 @@ function processAI($connect, $no) { } } elseif($general['crew'] >= 700 && $general['train'] < 90) { if($general['atmos'] >= 90 && $general['train'] >= 60 && $general['mode'] == 0) { - $query = "update general set mode=1 where no='$general['no']'"; + $query = "update general set mode=1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } $command = EncodeCommand(0, 0, 0, 13); //훈련 } elseif($general['crew'] >= 700 && $general['atmos'] < 90) { if($general['atmos'] >= 60 && $general['train'] >= 90 && $general['mode'] == 0) { - $query = "update general set mode=1 where no='$general['no']'"; + $query = "update general set mode=1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); } $command = EncodeCommand(0, 0, 0, 14); //사기진작 @@ -1630,7 +1630,7 @@ function processAI($connect, $no) { $targetCity = MYDB_fetch_array($result); //소유국이 있는 경우 if($targetCity['nation'] != 0 && $targetCity['nation'] != $general['nation']) { - $query = "select state from diplomacy where me='$general['nation']' and you='$targetCity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$targetCity['nation']}'"; $dipResult = MYDB_query($query, $connect) or Error("processAI22 ".MYDB_error($connect),""); $dip = MYDB_fetch_array($dipResult); //전쟁중인 국가이면 타겟에 포함 @@ -1640,20 +1640,20 @@ function processAI($connect, $no) { if(count($target) == 0) { //전방 도시 선택, 30% 확률로 태수 있는 전방으로 워프 if(rand()%100 < 30) { - $query = "select city from city where nation='$general['nation']' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; } else { - $query = "select city from city where nation='$general['nation']' and supply='1' and front=1 order by rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and supply='1' and front=1 order by rand() limit 0,1"; } $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); if($cityCount == 0) { //도시 수, 랜덤(상위 20%) 선택, 저개발 도시 선택 - $query = "select city from city where nation='$general['nation']' and supply='1'"; + $query = "select city from city where nation='{$general['nation']}' and supply='1'"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); $citySelect = rand() % (round($cityCount/5) + 1); - $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='$general['nation']' and supply='1' order by dev limit {$citySelect},1"; + $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='{$general['nation']}' and supply='1' order by dev limit {$citySelect},1"; $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); } else { @@ -1662,11 +1662,11 @@ function processAI($connect, $no) { if($general['city'] != $selCity['city']) { //워프 - $query = "update general set city='$selCity['city']' where no='$general['no']'"; + $query = "update general set city='{$selCity['city']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } else { @@ -1685,14 +1685,14 @@ function processAI($connect, $no) { SetDevelop($connect, $genType, $general['no'], $general['city'], $nation['tech']); return; case "00000000000011": //징병 - $query = "select region from city where nation='$general['nation']' order by rand() limit 0,1"; + $query = "select region from city where nation='{$general['nation']}' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selRegion = MYDB_fetch_array($result); $selCity['city'] = 0; // 90% 확률로 이민족 또는 특성병 if(rand()%100 < 90) { - $query = "select city from city where nation='$general['nation']' and (level='4' or level='8') order by rand() limit 0,1"; + $query = "select city from city where nation='{$general['nation']}' and (level='4' or level='8') order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); $selCity = MYDB_fetch_array($result); } @@ -1703,7 +1703,7 @@ function processAI($connect, $no) { SetCrew($connect, $general['no'], $general['personal'], $general['gold'], $general['leader'], $genType, $nation['tech'], $selRegion['region'], $selCity['city'], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); return; default: - $query = "update general set turn0='$command' where no='$general['no']'"; + $query = "update general set turn0='$command' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); return; } @@ -1747,7 +1747,7 @@ function Promotion($connect, $nation, $level) { MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 선택 - $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='$admin['killturn']' order by rand() limit 0,1"; + $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='{$admin['killturn']}' order by rand() limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $userCandidate = MYDB_fetch_array($result); // 유저수뇌 안함 @@ -1770,14 +1770,14 @@ function Promotion($connect, $nation, $level) { $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate['no']'"; + $query = "update general set level=11 where no='{$userCandidate['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } elseif($npcCandidate['no'] > 0) { //기존 참모 해임 $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //NPC 후보 있으면 임명 - $query = "update general set level=11 where no='$npcCandidate['no']'"; + $query = "update general set level=11 where no='{$npcCandidate['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } } elseif($level11['npc'] >= 2 && $userCandidate['no'] > 0) { @@ -1786,7 +1786,7 @@ function Promotion($connect, $nation, $level) { $query = "update general set level=1 where nation='$nation' and level=11"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate['no']'"; + $query = "update general set level=11 where no='{$userCandidate['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } @@ -1796,13 +1796,13 @@ function Promotion($connect, $nation, $level) { $query = "select no from general where nation='$nation' and level=1 order by power desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $level = MYDB_fetch_array($result); - $query = "update general set level={$i1} where no='$level['no']'"; + $query = "update general set level={$i1} where no='{$level['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); //문관임명 $query = "select no from general where nation='$nation' and level=1 order by intel desc limit 0,1"; $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); $level = MYDB_fetch_array($result); - $query = "update general set level={$i2} where no='$level['no']'"; + $query = "update general set level={$i2} where no='{$level['no']}'"; MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); } } diff --git a/twe/func_process.php b/twe/func_process.php index ba3e8c69..5b81f404 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -43,11 +43,11 @@ function process_1($connect, &$general, $type) { if($type == 1) { $dtype = "농지 개간"; $atype = "을"; $btype = "은"; $stype = "agri"; } elseif($type == 2) { $dtype = "상업 투자"; $atype = "를"; $btype = "는"; $stype = "comm"; } - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -120,12 +120,12 @@ function process_1($connect, &$general, $type) { $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general['city']'"; + $query = "update city set {$stype}='$score' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 경험치 상승 $general['gold'] -= $admin['develcost']; $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -145,11 +145,11 @@ function process_3($connect, &$general) { $dtype = "기술 연구"; - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type,tech from nation where nation='$general['nation']'"; + $query = "select level,type,tech from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -213,18 +213,18 @@ function process_3($connect, &$general) { if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $score = floor($score/4); } //장수수 구함 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); if($gencount < 10) $gencount = 10; // 내정 상승 - $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='$general['nation']'"; + $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 경험치 상승 // 공헌도, 명성 상승 = $score * 10 $general['gold'] -= $admin['develcost']; $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -242,11 +242,11 @@ function process_4($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -313,12 +313,12 @@ function process_4($connect, &$general) { $score += $city['rate']; if($score > 100) { $score = 100; } // 민심 상승 - $query = "update city set rate='$score' where city='$general['city']'"; + $query = "update city set rate='$score' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -339,11 +339,11 @@ function process_5($connect, &$general, $type) { if($type == 1) { $dtype = "수비 강화"; $stype = "def"; } elseif($type == 2) { $dtype = "성벽 보수"; $stype = "wall"; } - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -415,12 +415,12 @@ function process_5($connect, &$general, $type) { $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general['city']'"; + $query = "update city set {$stype}='$score' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -438,11 +438,11 @@ function process_7($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -509,12 +509,12 @@ function process_7($connect, &$general) { $score = $city['pop'] + ($score * 10); if($score > $city[pop2]) { $score = $city[pop2]; } // 민심 상승 - $query = "update city set pop='$score' where city='$general['city']'"; + $query = "update city set pop='$score' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -534,11 +534,11 @@ function process_8($connect, &$general) { $dtype = "치안"; $stype = "secu"; - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -609,12 +609,12 @@ function process_8($connect, &$general) { $score += $city["$stype"]; if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general['city']'"; + $query = "update city set {$stype}='$score' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -631,11 +631,11 @@ function process_9($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -686,25 +686,25 @@ function process_9($connect, &$general) { // 물자 상승 if($dtype == 0) { - $query = "update nation set gold=gold+'$score' where nation='$general['nation']'"; + $query = "update nation set gold=gold+'$score' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update nation set rice=rice+'$score' where nation='$general['nation']'"; + $query = "update nation set rice=rice+'$score' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } switch(rand()%3) { case 0: $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 1: $general[power2]++; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 2: $general[intel2]++; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; } MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -725,7 +725,7 @@ function process_11($connect, &$general, $type) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$general['nation']'"; + $query = "select level,tech from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -737,7 +737,7 @@ function process_11($connect, &$general, $type) { $lbonus = 0; } - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -818,7 +818,7 @@ function process_11($connect, &$general, $type) { $cnt = 1; } } elseif($sel == 1) { - $query = "select city,level from city where nation='$general['nation']' and region='$rg'"; + $query = "select city,level from city where nation='{$general['nation']}' and region='$rg'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $rgcity = MYDB_fetch_array($result); @@ -827,7 +827,7 @@ function process_11($connect, &$general, $type) { $cnt = 0; } } else { - $query = "select city,level from city where nation='$general['nation']' and city='$ct'"; + $query = "select city,level from city where nation='{$general['nation']}' and city='$ct'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $ctcity = MYDB_fetch_array($result); @@ -884,12 +884,12 @@ function process_11($connect, &$general, $type) { if($type == 1) { $city['rate'] = $city['rate'] - round(($crew*100 / $city['pop'])*100); } else { $city['rate'] = $city['rate'] - round(($crew*100 / $city['pop'])*50); } if($city['rate'] < 0) { $city['rate'] = 0; } - $query = "update city set pop=pop-({$crew}*100),rate='$city['rate']' where city='$general['city']'"; + $query = "update city set pop=pop-({$crew}*100),rate='{$city['rate']}' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='$general['crew']',train='$train',atmos='$atmos',gold='$general['gold']',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='{$general['crew']}',train='$train',atmos='$atmos',gold='{$general['gold']}',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -907,7 +907,7 @@ function process_13($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general['nation']'"; + $query = "select level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -919,7 +919,7 @@ function process_13($connect, &$general) { $lbonus = 0; } - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -951,17 +951,17 @@ function process_13($connect, &$general) { // 훈련치 변경 $score += $general['train']; if($score > $_maxtrain) { $score = $_maxtrain; } - $query = "update general set train='$score' where no='$general['no']'"; + $query = "update general set train='$score' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 사기 약간 감소 $score = floor($general['atmos'] * $_atmosing); if($score < 0 ) { $score = 0; } - $query = "update general set atmos='$score' where no='$general['no']'"; + $query = "update general set atmos='$score' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -979,7 +979,7 @@ function process_14($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general['nation']'"; + $query = "select level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -991,7 +991,7 @@ function process_14($connect, &$general) { $lbonus = 0; } - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1026,7 +1026,7 @@ function process_14($connect, &$general) { $score += $general['atmos']; if($score > $_maxatmos) { $score = $_maxatmos; } $general[leader2]++; - $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1044,11 +1044,11 @@ function process_15($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,tech from nation where nation='$general['nation']'"; + $query = "select nation,tech from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1077,7 +1077,7 @@ function process_15($connect, &$general) { } elseif($term < 3) { $log[count($log)] = "●{$admin['month']}월:병사들을 열심히 훈련중... ({$term}/3) <1>$date"; - $query = "update general set resturn='ONGOING',term={$code} where no='$general['no']'"; + $query = "update general set resturn='ONGOING',term={$code} where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { //기술로 가격 @@ -1094,7 +1094,7 @@ function process_15($connect, &$general) { // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]+=3; - $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1111,11 +1111,11 @@ function process_16($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,war,tricklimit,tech from nation where nation='$general['nation']'"; + $query = "select nation,war,tricklimit,tech from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select path,nation,supply from city where city='$general['city']'"; + $query = "select path,nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1127,11 +1127,11 @@ function process_16($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,tricklimit,tech from nation where nation='$destcity['nation']'"; + $query = "select nation,tricklimit,tech from nation where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -1164,7 +1164,7 @@ function process_16($connect, &$general) { return; } else { // 전쟁 표시 - $query = "update city set state=43,term=3 where city='$destcity['city']'"; + $query = "update city set state=43,term=3 where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 addGenDex($connect, $general['no'], $general['crewtype'], round($general['crew']/100)); @@ -1177,10 +1177,10 @@ function process_16($connect, &$general) { // 사상자 누적 if($nation['nation'] > 0 && $dnation['nation'] > 0) { - $query = "update diplomacy set dead=dead+'$dead['att']' where me='$nation['nation']' and you='$dnation['nation']'"; + $query = "update diplomacy set dead=dead+'{$dead['att']}' where me='{$nation['nation']}' and you='{$dnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set dead=dead+'$dead['def']' where you='$nation['nation']' and me='$dnation['nation']'"; + $query = "update diplomacy set dead=dead+'{$dead['def']}' where you='{$nation['nation']}' and me='{$dnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $log = uniqueItem($connect, $general, $log); @@ -1200,10 +1200,10 @@ function process_17($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. 소집해제 실패. <1>$date"; } else { // 주민으로 돌아감 - $query = "update city set pop=pop+'$general['crew']' where city='$general['city']'"; + $query = "update city set pop=pop+'{$general['crew']}' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set crew='0' where no='$general['no']'"; + $query = "update general set crew='0' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●{$admin['month']}월:병사들을 소집해제하였습니다. <1>$date"; @@ -1216,7 +1216,7 @@ function process_17($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1231,7 +1231,7 @@ function process_21($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select path from city where city='$general['city']'"; + $query = "select path from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1260,19 +1260,19 @@ function process_21($connect, &$general) { // 이동, 경험치 상승, 명성 상승, 사기 감소 $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$admin['develcost']',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold-'{$admin['develcost']}',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($general['level'] == 12) { - $query = "select level from nation where nation='$general['nation']'"; + $query = "select level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); if($nation['level'] == 0) { - $query = "update general set city='$destination' where nation='$general['nation']'"; + $query = "update general set city='$destination' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name from general where nation='$general['nation']' and level<'12'"; + $query = "select no,name from general where nation='{$general['nation']}' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 이동했습니다."; @@ -1295,11 +1295,11 @@ function process_22($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general['nation']'"; + $query = "select name from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1334,7 +1334,7 @@ function process_22($connect, &$general) { ScoutMsg($connect, $general['no'], $nation['name'], $who, $you['msgindex']); $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1351,11 +1351,11 @@ function process_23($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1411,24 +1411,24 @@ function process_23($connect, &$general) { if($what == 1) { $gen['gold'] += $amount; - $query = "update general set gold='$gen['gold']' where no='$who'"; + $query = "update general set gold='{$gen['gold']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['gold'] -= $amount; - $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; + $query = "update nation set gold='{$nation['gold']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { $gen['rice'] += $amount; - $query = "update general set rice='$gen['rice']' where no='$who'"; + $query = "update general set rice='{$gen['rice']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['rice'] -= $amount; - $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; + $query = "update nation set rice='{$nation['rice']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1444,11 +1444,11 @@ function process_24($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,color,gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,color,gold,rice,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1514,24 +1514,24 @@ function process_24($connect, &$general) { if($what == 1) { $gen['gold'] -= $amount; - $query = "update general set gold='$gen['gold']' where no='$who'"; + $query = "update general set gold='{$gen['gold']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['gold'] += $amount; - $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; + $query = "update nation set gold='{$nation['gold']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { $gen['rice'] -= $amount; - $query = "update general set rice='$gen['rice']' where no='$who'"; + $query = "update general set rice='{$gen['rice']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['rice'] += $amount; - $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; + $query = "update nation set rice='{$nation['rice']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1547,7 +1547,7 @@ function process_25($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation from city where city='$general['city']'"; + $query = "select nation from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1582,7 +1582,7 @@ function process_25($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); } - $query = "select no from general where nation='$nation['nation']'"; + $query = "select no from general where nation='{$nation['nation']}'"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -1615,7 +1615,7 @@ function process_25($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 군주가 있는 곳으로 이동 - $query = "select city from general where nation='$nation['nation']' and level='12'"; + $query = "select city from general where nation='{$nation['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); @@ -1626,17 +1626,17 @@ function process_25($connect, &$general) { } // 국적 바꾸고 등급 일반으로 // 명성 상승 - $query = "update general set resturn='SUCCESS',nation='$nation['nation']',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='$king['city']',belong=1 where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',nation='{$nation['nation']}',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='{$king['city']}',belong=1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$nation['nation']'"; + $query = "select no from general where nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; if($gencount < 10) $gencount = 10; - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($where < 99) { @@ -1659,11 +1659,11 @@ function process_26($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,supply from city where city='$general['city']'"; + $query = "select nation,name,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select no,name,nation,city from general where troop='$general['troop']' and no!='$general['no']'"; + $query = "select no,name,nation,city from general where troop='{$general['troop']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1695,11 +1695,11 @@ function process_26($connect, &$general) { } // 같은 부대원 모두 집합 - $query = "update general set city='$general['city']' where troop='$general['troop']'"; + $query = "update general set city='{$general['city']}' where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 명성 공헌 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1713,7 +1713,7 @@ function process_26($connect, &$general) { function process_27($connect, &$general) { $date = substr($general['turntime'],11,5); - $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select gold,rice,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1725,7 +1725,7 @@ function process_27($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -1764,11 +1764,11 @@ function process_27($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 발령 - $query = "update general set city='$where' where no='$you['no']'"; + $query = "update general set city='$where' where no='{$you['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -1785,7 +1785,7 @@ function process_28($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level,capital from nation where nation='$general['nation']'"; + $query = "select level,capital from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1797,19 +1797,19 @@ function process_28($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:이미 수도입니다. 귀환 실패. <1>$date"; } else { if($general['level'] == 2) { - $query = "select city,name from city where gen3='$general['no']'"; + $query = "select city,name from city where gen3='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } elseif($general['level'] == 3) { - $query = "select city,name from city where gen2='$general['no']'"; + $query = "select city,name from city where gen2='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } elseif($general['level'] == 4) { - $query = "select city,name from city where gen1='$general['no']'"; + $query = "select city,name from city where gen1='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } else { - $query = "select city,name from city where city='$nation['capital']'"; + $query = "select city,name from city where city='{$nation['capital']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); } @@ -1823,12 +1823,12 @@ function process_28($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 귀환 - $query = "update general set city='$city['city']' where no='$general['no']'"; + $query = "update general set city='{$city['city']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 명성,공헌 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1845,7 +1845,7 @@ function process_29($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,level,gennum,scout from nation where nation='$general['nation']'"; + $query = "select nation,name,level,gennum,scout from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -1858,15 +1858,15 @@ function process_29($connect, &$general) { } elseif($general['gold'] < $admin['develcost']) { $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; } else { - $query = "select no from general where nation='$general['nation']' and npc<2"; + $query = "select no from general where nation='{$general['nation']}' and npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select no from general where nation='$general['nation']' and npc=3"; + $query = "select no from general where nation='{$general['nation']}' and npc=3"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $npccount = MYDB_num_rows($result); - $query = "select no from general where nation!='$general['nation']' and npc=3"; + $query = "select no from general where nation!='{$general['nation']}' and npc=3"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $otherNpccount = MYDB_num_rows($result); $otherNpccount = round(sqrt($otherNpccount + 1)) - 1; @@ -1920,7 +1920,7 @@ function process_29($connect, &$general) { $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$name(이)라는 인재를 {$scoutType}"); - $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general['nation']'"; + $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $avgGen = MYDB_fetch_array($result); @@ -2041,7 +2041,7 @@ function process_29($connect, &$general) { dex0, dex10, dex20, dex30, dex40 ) values ( '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$scoutNation', - '$general['city']','$leader','$power','$intel','$avgGen['exp']','$avgGen['ded']', + '{$general['city']}','$leader','$power','$intel','{$avgGen['exp']}','{$avgGen['ded']}', '$scoutLevel','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', '0','$bornyear','$deadyear', @@ -2057,7 +2057,7 @@ function process_29($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; @@ -2068,7 +2068,7 @@ function process_29($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //국가 기술력 그대로 - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -2081,7 +2081,7 @@ function process_29($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2099,7 +2099,7 @@ function process_30($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select path from city where city='$general['city']'"; + $query = "select path from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -2126,19 +2126,19 @@ function process_30($connect, &$general) { // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($general['level'] == 12) { - $query = "select level from nation where nation='$general['nation']'"; + $query = "select level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); if($nation['level'] == 0) { - $query = "update general set city='$destination' where nation='$general['nation']'"; + $query = "update general set city='$destination' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no,name from general where nation='$general['nation']' and level<'12'"; + $query = "select no,name from general where nation='{$general['nation']}' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 강행했습니다."; @@ -2180,7 +2180,7 @@ function process_31($connect, &$general) { // } elseif($dist[$destination] > 3) { // $log[count($log)] = "●{$admin['month']}월:너무 멉니다. $city['name']에 첩보 실패. <1>$date"; } else { - $query = "select crew,crewtype from general where city='$destination' and nation='$city['nation']'"; + $query = "select crew,crewtype from general where city='$destination' and nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $crew = 0; @@ -2215,11 +2215,11 @@ function process_31($connect, &$general) { $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; if($general['nation'] != 0 && $city['nation'] != 0) { - $query = "select name,tech from nation where nation='$city['nation']'"; + $query = "select name,tech from nation where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $yourTech = MYDB_fetch_array($result); - $query = "select tech from nation where nation='$general['nation']'"; + $query = "select tech from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myTech = MYDB_fetch_array($result); @@ -2243,10 +2243,10 @@ function process_31($connect, &$general) { $general[leader2]++; $general['gold'] -= $admin['develcost']*3; $general['rice'] -= $admin['develcost']*3; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select spy from nation where nation='$general['nation']'"; + $query = "select spy from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); if($nation['spy'] != "") { $citys = explode("|", $nation['spy']); } @@ -2263,7 +2263,7 @@ function process_31($connect, &$general) { $citys[$i] = $destination * 10 + 3; } $spy = implode("|", $citys); - $query = "update nation set spy='$spy' where nation='$general['nation']'"; + $query = "update nation set spy='$spy' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2288,15 +2288,15 @@ function process_32($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -2319,7 +2319,7 @@ function process_32($connect, &$general) { } elseif($dip['state'] >= 7) { $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 화계 실패. <1>$date"; } else { - $query = "select intel,book from general where city='$destination' and nation='$destcity['nation']' order by intel desc"; + $query = "select intel,book from general where city='$destination' and nation='{$destcity['nation']}' order by intel desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $intelgen = MYDB_fetch_array($result); @@ -2329,14 +2329,14 @@ function process_32($connect, &$general) { if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -2363,9 +2363,9 @@ function process_32($connect, &$general) { $destcity['comm'] -= rand() % $_firingpower + $_firingbase; if($destcity['agri'] < 0) { $destcity['agri'] = 0; } if($destcity['comm'] < 0) { $destcity['comm'] = 0; } - $query = "update city set state=32,agri='$destcity['agri']',comm='$destcity['comm']' where city='$destination'"; + $query = "update city set state=32,agri='{$destcity['agri']}',comm='{$destcity['comm']}' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general['no']'"; + $query = "update general set firenum=firenum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); @@ -2384,7 +2384,7 @@ function process_32($connect, &$general) { $general[intel2]++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2412,19 +2412,19 @@ function process_33($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select gold,rice from nation where nation='$destcity['nation']'"; + $query = "select gold,rice from nation where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -2447,7 +2447,7 @@ function process_33($connect, &$general) { } elseif($dip['state'] >= 7) { $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 탈취 실패. <1>$date"; } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity['nation']' order by power desc"; + $query = "select power,weap from general where city='$destination' and nation='{$destcity['nation']}' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); @@ -2457,14 +2457,14 @@ function process_33($connect, &$general) { if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -2495,25 +2495,25 @@ function process_33($connect, &$general) { $nation['rice'] -= $rice; if($nation['gold'] < $_basegold) { $gold += ($nation['gold'] - $_basegold); $nation['gold'] = $_basegold; } if($nation['rice'] < $_baserice) { $rice += ($nation['rice'] - $_baserice); $nation['rice'] = $_baserice; } - $query = "update nation set gold='$nation['gold']',rice='$nation['rice']' where nation='$destcity['nation']'"; + $query = "update nation set gold='{$nation['gold']}',rice='{$nation['rice']}' where nation='{$destcity['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update city set state=34 where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general['no']'"; + $query = "update general set firenum=firenum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 본국으로 회수, 재야이면 본인이 소유 if($general['nation'] != 0) { - $query = "select gold,rice from nation where nation='$general['nation']'"; + $query = "select gold,rice from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); $nation['gold'] += $gold; $nation['rice'] += $rice; - $query = "update nation set gold='$nation['gold']',rice='$nation['rice']' where nation='$general['nation']'"; + $query = "update nation set gold='{$nation['gold']}',rice='{$nation['rice']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $general['gold'] += $gold; $general['rice'] += $rice; - $query = "update general set gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $log[count($log)] = "●금$gold 쌀$rice을 획득했습니다."; @@ -2534,7 +2534,7 @@ function process_33($connect, &$general) { $general[power2]++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2559,15 +2559,15 @@ function process_34($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -2590,7 +2590,7 @@ function process_34($connect, &$general) { } elseif($dip['state'] >= 7) { $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 파괴 실패. <1>$date"; } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity['nation']' order by power desc"; + $query = "select power,weap from general where city='$destination' and nation='{$destcity['nation']}' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); @@ -2600,14 +2600,14 @@ function process_34($connect, &$general) { if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -2635,9 +2635,9 @@ function process_34($connect, &$general) { $destcity['wall'] -= rand() % $_firingpower + $_firingbase; if($destcity['def'] < 100) { $destcity['def'] = 100; } if($destcity['wall'] < 100) { $destcity['wall'] = 100; } - $query = "update city set state=34,def='$destcity['def']',wall='$destcity['wall']' where city='$destination'"; + $query = "update city set state=34,def='{$destcity['def']}',wall='{$destcity['wall']}' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general['no']'"; + $query = "update general set firenum=firenum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); @@ -2656,7 +2656,7 @@ function process_34($connect, &$general) { $general[power2]++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2681,7 +2681,7 @@ function process_35($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); @@ -2693,11 +2693,11 @@ function process_35($connect, &$general) { $lbonus = 0; } - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -2720,7 +2720,7 @@ function process_35($connect, &$general) { } elseif($dip['state'] >= 7) { $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 선동 실패. <1>$date"; } else { - $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='$destcity['nation']' order by sum desc"; + $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='{$destcity['nation']}' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); @@ -2730,14 +2730,14 @@ function process_35($connect, &$general) { if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -2765,9 +2765,9 @@ function process_35($connect, &$general) { $destcity['rate'] -= rand() % round($_firingpower/50) + $_firingbase/50; if($destcity['secu'] < 0) { $destcity['secu'] = 0; } if($destcity['rate'] < 0) { $destcity['rate'] = 0; } - $query = "update city set state=32,rate='$destcity['rate']',secu='$destcity['secu']' where city='$destination'"; + $query = "update city set state=32,rate='{$destcity['rate']}',secu='{$destcity['secu']}' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general['no']'"; + $query = "update general set firenum=firenum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); @@ -2786,7 +2786,7 @@ function process_35($connect, &$general) { $general[leader2]++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2811,7 +2811,7 @@ function process_36($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select level,type from nation where nation='$general['nation']'"; + $query = "select level,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); @@ -2823,11 +2823,11 @@ function process_36($connect, &$general) { $lbonus = 0; } - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); @@ -2850,7 +2850,7 @@ function process_36($connect, &$general) { } elseif($dip['state'] >= 7) { $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 기습 실패. <1>$date"; } else { - $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='$destcity['nation']' order by sum desc"; + $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='{$destcity['nation']}' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); @@ -2860,14 +2860,14 @@ function process_36($connect, &$general) { if($general['item'] == 5) { // 이추 사용 $ratio += 10; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; } elseif($general['item'] == 6) { // 향낭 사용 $ratio += 20; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -2903,9 +2903,9 @@ function process_36($connect, &$general) { if($destcity['def'] < 0) { $destcity['def'] = 0; } if($destcity['wall'] < 0) { $destcity['wall'] = 0; } if($destcity['rate'] < 0) { $destcity['rate'] = 0; } - $query = "update city set state=32,agri='$destcity['agri']',comm='$destcity['comm']',secu='$destcity['secu']',def='$destcity['def']',wall='$destcity['wall']',rate='$destcity['rate']' where city='$destination'"; + $query = "update city set state=32,agri='{$destcity['agri']}',comm='{$destcity['comm']}',secu='{$destcity['secu']}',def='{$destcity['def']}',wall='{$destcity['wall']}',rate='{$destcity['rate']}' where city='$destination'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general['no']'"; + $query = "update general set firenum=firenum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); TrickInjury($connect, $destination); @@ -2926,7 +2926,7 @@ function process_36($connect, &$general) { $general[power2]++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='$general['gold']',rice='$general['rice']',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2992,7 +2992,7 @@ function process_41($connect, &$general) { } // 경험치 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold-'$admin['develcost']',rice=rice-'$admin['develcost']',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold-'{$admin['develcost']}',rice=rice-'{$admin['develcost']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($general, $log); @@ -3018,46 +3018,46 @@ function process_42($connect, &$general) { case 1: $log[count($log)] = "●{$admin['month']}월:지나가는 행인에게서 금을 300 받았습니다. <1>$date"; // 자금 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: $log[count($log)] = "●{$admin['month']}월:지나가는 행인에게서 쌀을 300 받았습니다. <1>$date"; // 군량 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 3: $log[count($log)] = "●{$admin['month']}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 4: $log[count($log)] = "●{$admin['month']}월:명사와 설전을 벌였으나 망신만 당했습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 5: $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 6: $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 했지만 망신만 당했습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 7: $log[count($log)] = "●{$admin['month']}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; // 자금 상승 // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 8: @@ -3065,14 +3065,14 @@ function process_42($connect, &$general) { $general['gold'] -= 200; if($general['gold'] <= 0) { $general['gold'] = 0; } // 자금 하락 // 경험 상승 - $query = "update general set resturn='SUCCESS',gold='$general['gold']',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 9: $log[count($log)] = "●{$admin['month']}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 10: @@ -3080,14 +3080,14 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 11: $log[count($log)] = "●{$admin['month']}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 12: @@ -3095,19 +3095,19 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 13: $log[count($log)] = "●{$admin['month']}월:주점에서 사람들과 어울려 술을 마셨습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 14: $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구해주었습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 15: @@ -3115,14 +3115,14 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 16: $log[count($log)] = "●{$admin['month']}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 17: @@ -3130,14 +3130,14 @@ function process_42($connect, &$general) { $general['gold'] -= 200; if($general['gold'] <= 0) { $general['gold'] = 0; } // 명성 상승 - $query = "update general set resturn='SUCCESS',gold='$general['gold']',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 18: $log[count($log)] = "●{$admin['month']}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2]++; - $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 19: @@ -3145,35 +3145,35 @@ function process_42($connect, &$general) { $general['rice'] -= 200; if($general['rice'] <= 0) { $general['rice'] = 0; } // 명성 상승 - $query = "update general set resturn='SUCCESS',rice='$general['rice']',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 20: $log[count($log)] = "●{$admin['month']}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 21: $log[count($log)] = "●{$admin['month']}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 22: $log[count($log)] = "●{$admin['month']}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 23: $log[count($log)] = "●{$admin['month']}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 24: @@ -3181,7 +3181,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 25: @@ -3189,7 +3189,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 26: @@ -3197,13 +3197,13 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 50 + 30; $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; default: $log[count($log)] = "●{$admin['month']}월:아무일도 일어나지 않았습니다. <1>$date"; // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -3231,7 +3231,7 @@ function process_43($connect, &$general) { elseif($what == 2) { $dtype = "쌀"; } else { $what = 2; $dtype = "쌀"; } - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -3262,19 +3262,19 @@ function process_43($connect, &$general) { if($what == 1) { $gen['gold'] += $amount; - $query = "update general set gold='$gen['gold']' where no='$who'"; + $query = "update general set gold='{$gen['gold']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general['gold'] -= $amount; - $query = "update general set gold='$general['gold']' where no='$general['no']'"; + $query = "update general set gold='{$general['gold']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { $gen['rice'] += $amount; - $query = "update general set rice='$gen['rice']' where no='$who'"; + $query = "update general set rice='{$gen['rice']}' where no='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general['rice'] -= $amount; - $query = "update general set rice='$general['rice']' where no='$general['no']'"; + $query = "update general set rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -3287,7 +3287,7 @@ function process_43($connect, &$general) { // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3303,11 +3303,11 @@ function process_44($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,gold,rice from nation where nation='$general['nation']'"; + $query = "select name,gold,rice from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); @@ -3346,19 +3346,19 @@ function process_44($connect, &$general) { if($what == 1) { $general['gold'] -= $amount; - $query = "update general set gold='$general['gold']' where no='$general['no']'"; + $query = "update general set gold='{$general['gold']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['gold'] += $amount; - $query = "update nation set gold='$nation['gold']' where nation='$general['nation']'"; + $query = "update nation set gold='{$nation['gold']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($what == 2) { $general['rice'] -= $amount; - $query = "update general set rice='$general['rice']' where no='$general['no']'"; + $query = "update general set rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation['rice'] += $amount; - $query = "update nation set rice='$nation['rice']' where nation='$general['nation']'"; + $query = "update nation set rice='{$nation['rice']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -3371,7 +3371,7 @@ function process_44($connect, &$general) { // 경험치 상승 // 공헌도, 명성 상승 $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3387,7 +3387,7 @@ function process_45($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,chemi from nation where nation='$general['nation']'"; + $query = "select name,chemi from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3404,11 +3404,11 @@ function process_45($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no from diplomacy where me='$general['nation']' and state>='3' and state<='4'"; + $query = "select no from diplomacy where me='{$general['nation']}' and state>='3' and state<='4'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount1 = MYDB_num_rows($dipresult); - $query = "select no from diplomacy where me='$general['nation']' and state>='5' and state<='6'"; + $query = "select no from diplomacy where me='{$general['nation']}' and state>='5' and state<='6'"; $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount2 = MYDB_num_rows($dipresult); @@ -3430,7 +3430,7 @@ function process_45($connect, &$general) { $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:통합에 반대하며 $nation['name'](을)를 떠남"); // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 합병에 반대하며 $nation['name'](을)를 떠났습니다."; @@ -3438,7 +3438,7 @@ function process_45($connect, &$general) { $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:합병에 반대하며 $nation['name'](을)를 떠남"); // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 하야했습니다."; @@ -3446,36 +3446,36 @@ function process_45($connect, &$general) { $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에서 하야"); // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 - $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='$general['gold']',rice='$general['rice']' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general['no']'"; + $query = "update city set gen1='0' where gen1='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general['no']'"; + $query = "update city set gen2='0' where gen2='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general['no']'"; + $query = "update city set gen3='0' where gen3='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select no from troop where troop='$general['troop']'"; + $query = "select no from troop where troop='{$general['troop']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troop = MYDB_fetch_array($result); //부대장일 경우 if($troop['no'] == $general['no']) { // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general['troop']'"; + $query = "update general set troop='0' where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대 삭제 - $query = "delete from troop where troop='$general['troop']'"; + $query = "delete from troop where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set troop='0' where no='$general['no']'"; + $query = "update general set troop='0' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //국가 기술력 그대로 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; @@ -3484,7 +3484,7 @@ function process_45($connect, &$general) { $nation['chemi'] -= 1; if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation['chemi']',gold=gold+'$gold',rice=rice+'$rice' where nation='$general['nation']'"; + $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='{$nation['chemi']}',gold=gold+'$gold',rice=rice+'$rice' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushAllLog($alllog); @@ -3498,15 +3498,15 @@ function process_46($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select * from city where city='$general['city']'"; + $query = "select * from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $query = "select nation from nation where name='$general['makenation']'"; + $query = "select nation from nation where name='{$general['makenation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); @@ -3536,15 +3536,15 @@ function process_46($connect, &$general) { } elseif($city['level'] != 5 && $city['level'] != 6) { $log[count($log)] = "●{$admin['month']}월:중, 소 도시에서만 가능합니다. 건국 실패. <1>$date"; } else { - $query = "update nation set name='$general['makenation']',color='$color',level=1,type='$type',capital='$general['city']' where nation='$general['nation']'"; + $query = "update nation set name='{$general['makenation']}',color='$color',level=1,type='$type',capital='{$general['city']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "select nation,name,history from nation where nation='$general['nation']'"; + $query = "select nation,name,history from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); // 현 도시 소속지로 - $query = "update city set nation='$nation['nation']',conflict='',conflict2='' where city='$general['city']'"; + $query = "update city set nation='{$nation['nation']}',conflict='',conflict2='' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "●{$admin['month']}월:$nation['name'](을)를 건국하였습니다. <1>$date"; @@ -3561,7 +3561,7 @@ function process_46($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = uniqueItem($connect, $general, $log, 3); @@ -3579,12 +3579,12 @@ function process_47($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name,level from nation where nation='$general['nation']'"; + $query = "select name,level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //현재 외교 진행중(평시, 불가침만 제외)일때 - $query = "select state from diplomacy where me='$general['nation']' and state!='2' and state!='7'"; + $query = "select state from diplomacy where me='{$general['nation']}' and state!='2' and state!='7'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); @@ -3607,22 +3607,22 @@ function process_47($connect, &$general) { //분쟁기록 모두 지움 DeleteConflict($connect, $general['nation']); // 국명, 색깔 바꿈 국가 레벨 0, 성향리셋, 기술0 - $query = "update nation set name='$general['name']',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='$general['nation']'"; + $query = "update nation set name='{$general['name']}',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 본인 빼고 건국/임관제한 - $query = "update general set makelimit='12' where no!='$general['no']' and nation='$general['nation']'"; + $query = "update general set makelimit='12' where no!='{$general['no']}' and nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 건국/임관제한 - $query = "update general set resturn='SUCCESS',makelimit='12' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',makelimit='12' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 관직장수 일반으로 - $query = "update general set level=1 where nation='$general['nation']' and level <= 11"; + $query = "update general set level=1 where nation='{$general['nation']}' and level <= 11"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 도시 공백지로 - $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$general['nation']'"; + $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 리셋 - $query = "update diplomacy set state='2',term='0' where me='$general['nation']' or you='$general['nation']'"; + $query = "update diplomacy set state='2',term='0' where me='{$general['nation']}' or you='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushHistory($connect, $history); @@ -3675,45 +3675,45 @@ function process_48($connect, &$general) { if($isweap == 0) { if($type != 0) { $log[count($log)] = "●{$admin['month']}월:".getWeapName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $cost = round(getItemCost($general['weap']) / 2, 0); $log[count($log)] = "●{$admin['month']}월:".getWeapName($general['weap'])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 1) { if($type != 0) { $log[count($log)] = "●{$admin['month']}월:".getBookName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $cost = round(getItemCost($general['book']) / 2, 0); $log[count($log)] = "●{$admin['month']}월:".getBookName($general['book'])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 2) { if($type != 0) { $log[count($log)] = "●{$admin['month']}월:".getHorseName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $cost = round(getItemCost($general['horse']) / 2, 0); $log[count($log)] = "●{$admin['month']}월:".getHorseName($general['horse'])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } elseif($isweap == 3) { if($type != 0) { $log[count($log)] = "●{$admin['month']}월:".getItemName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $cost = round(getItemCost2($general['item']) / 2, 0); $log[count($log)] = "●{$admin['month']}월:".getItemName($general['item'])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -3726,7 +3726,7 @@ function process_48($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); @@ -3741,7 +3741,7 @@ function process_49($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select level from nation where nation='$general['nation']'"; + $query = "select level from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3810,24 +3810,24 @@ function process_49($connect, &$general) { if($type == 1) { $log[count($log)] = "●{$admin['month']}월:군량 $amount을 팔아 자금 $cost을 얻었습니다. <1>$date"; // 군량 감소 - $query = "update general set rice=rice-{$amount} where no='$general['no']'"; + $query = "update general set rice=rice-{$amount} where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 증가 - $query = "update general set gold=gold+{$cost} where no='$general['no']'"; + $query = "update general set gold=gold+{$cost} where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 구입 } elseif($type == 2) { $log[count($log)] = "●{$admin['month']}월:군량 $amount을 사서 자금 $cost을 썼습니다. <1>$date"; // 군량 증가 - $query = "update general set rice=rice+{$amount} where no='$general['no']'"; + $query = "update general set rice=rice+{$amount} where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 감소 - $query = "update general set gold=gold-{$cost} where no='$general['no']'"; + $query = "update general set gold=gold-{$cost} where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } // 세금 국고로 - $query = "update nation set gold=gold+'$tax' where nation='$general['nation']'"; + $query = "update nation set gold=gold+'$tax' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $exp = 30; @@ -3838,24 +3838,24 @@ function process_49($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 switch(rand()%3) { case 0: $general[leader2]++; - $query = "update general set leader2='$general[leader2]' where no='$general['no']'"; + $query = "update general set leader2='$general[leader2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: $general[power2]++; - $query = "update general set power2='$general[power2]' where no='$general['no']'"; + $query = "update general set power2='$general[power2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: $general[intel2]++; - $query = "update general set intel2='$general[intel2]' where no='$general['no']'"; + $query = "update general set intel2='$general[intel2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -3881,7 +3881,7 @@ function process_50($connect, &$general) { // 성격 보정 $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); @@ -3894,11 +3894,11 @@ function process_51($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -3939,10 +3939,10 @@ function process_51($connect, &$general) { //권고 서신시 장수번호/상대국 번호 $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation['name']}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; + $query = "update nation set dip0='{$nation['name']}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -3958,11 +3958,11 @@ function process_52($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,level,gold,rice,surlimit,history,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,level,gold,rice,surlimit,history,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mynation = MYDB_fetch_array($result); @@ -4004,7 +4004,7 @@ function process_52($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 원조 실패. <1>$date"; } else { // 본국 자원 감소 - $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='$general['nation']'"; + $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대국 자원 증가 @@ -4012,7 +4012,7 @@ function process_52($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general['nation']' and level>='9'"; + $query = "select no,name,nation from general where nation='{$general['nation']}' and level>='9'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -4047,7 +4047,7 @@ function process_52($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); @@ -4063,11 +4063,11 @@ function process_53($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4108,10 +4108,10 @@ function process_53($connect, &$general) { //권고 서신시 장수번호/상대국 번호 $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation['name']}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; + $query = "update nation set dip0='{$nation['name']}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4132,12 +4132,12 @@ function process_54($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nextruler = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general['nation']'"; + $query = "select nation,name,history from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); //현재 외교 진행중(통합제의중)일때 - $query = "select state from diplomacy where me='$general['nation']' and state='4'"; + $query = "select state from diplomacy where me='{$general['nation']}' and state='4'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); @@ -4161,7 +4161,7 @@ function process_54($connect, &$general) { $query = "update city set gen3='0' where gen3='$who'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $history[count($history)] = "●$admin['year']년 $admin['month']월:【선양】$general['name'](이)가 $nation['name']의 군주 자리를 $nextruler['name']에게 선양했습니다."; @@ -4185,11 +4185,11 @@ function process_55($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from city where city='$general['city']'"; + $query = "select name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation from nation where name='$general['name']'"; + $query = "select nation from nation where name='{$general['name']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); @@ -4220,7 +4220,7 @@ function process_55($connect, &$general) { // 명성 상승 // 군주로 // 현 국가 소속으로 - $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='$nation['nation']',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='{$nation['nation']}',dedication=dedication+'$ded', experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "●{$admin['month']}월:거병에 성공하였습니다. <1>$date"; @@ -4230,15 +4230,15 @@ function process_55($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $city['name']에서 거병"); // 외교테이블 추가 - $query = "select nation from nation where nation!='$nation['nation']'"; + $query = "select nation from nation where nation!='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); for($i=0; $i < $nationcount; $i++) { $younation = MYDB_fetch_array($result); - $query = "insert into diplomacy (me, you, state, term) values ('$nation['nation']', '$younation['nation']', '2', '0')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$nation['nation']}', '{$younation['nation']}', '2', '0')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$younation['nation']', '$nation['nation']', '2', '0')"; + $query = "insert into diplomacy (me, you, state, term) values ('{$younation['nation']}', '{$nation['nation']}', '2', '0')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -4254,11 +4254,11 @@ function process_56($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select name from nation where nation='$general['nation']'"; + $query = "select name from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select city from city where nation='$general['nation']'"; + $query = "select city from city where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -4271,17 +4271,17 @@ function process_56($connect, &$general) { $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 세력을 해산했습니다."; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 해산"); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); // 수동 해산인 국가 페널티, 자금, 군량 if($genCount > 1) { - $query = "update general set resturn='SUCCESS' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=1000 where nation='$general['nation']' and gold>1000"; + $query = "update general set gold=1000 where nation='{$general['nation']}' and gold>1000"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=1000 where nation='$general['nation']' and rice>1000"; + $query = "update general set rice=1000 where nation='{$general['nation']}' and rice>1000"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4300,15 +4300,15 @@ function process_57($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$general['nation']'"; + $query = "select nation,name,history from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select npc,no,name,killturn,history from general where nation='$general['nation']' and level='12'"; + $query = "select npc,no,name,killturn,history from general where nation='{$general['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); @@ -4328,17 +4328,17 @@ function process_57($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:군주가 NPC입니다. 모반 실패. <1>$date"; } else { //군주 교체 - $query = "update general set resturn='SUCCESS',level='12' where no='$general['no']'"; + $query = "update general set resturn='SUCCESS',level='12' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 태수,군사,시중이었다면 해제 - $query = "update city set gen1='0' where gen1='$general['no']'"; + $query = "update city set gen1='0' where gen1='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general['no']'"; + $query = "update city set gen2='0' where gen2='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general['no']'"; + $query = "update city set gen3='0' where gen3='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1',experience=experience*0.7 where no='$ruler['no']'"; + $query = "update general set level='1',experience=experience*0.7 where no='{$ruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "●{$admin['month']}월:모반에 성공했습니다. <1>$date"; @@ -4364,11 +4364,11 @@ function process_61($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select gold,rice,name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select gold,rice,name,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4416,7 +4416,7 @@ function process_61($connect, &$general) { $me = $general['no'] * 10000 + $younation['nation']; $type = $when * 100 + 6; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation['name']}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; + $query = "update nation set dip0='{$nation['name']}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 3턴후 @@ -4424,15 +4424,15 @@ function process_61($connect, &$general) { $date = addTurn($date, $admin['turnterm']); $date = addTurn($date, $admin['turnterm']); //조건 표시기한 설정 - $query = "update diplomacy set showing='{$date}' where me='$general['nation']' and you='$younation['nation']'"; + $query = "update diplomacy set showing='{$date}' where me='{$general['nation']}' and you='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $admin['develcost']*10씩 차감 // $amount = $admin['develcost']; -// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; +// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; // MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4446,11 +4446,11 @@ function process_62($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,history,l{$general['level']}turn0,color from nation where nation='$general['nation']'"; + $query = "select nation,name,history,l{$general['level']}turn0,color from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4461,16 +4461,16 @@ function process_62($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $younation = MYDB_fetch_array($result); - $query = "select * from general where nation='$younation['nation']' and level='12'"; + $query = "select * from general where nation='{$younation['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $king = MYDB_fetch_array($result); //아국과의 관계 - $query = "select state from diplomacy where me='$nation['nation']' and you='$younation['nation']'"; + $query = "select state from diplomacy where me='{$nation['nation']}' and you='{$younation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); //대상국이 외교 진행중(합병수락중,통합수락중)일때 - $query = "select state from diplomacy where me='$younation['nation']' and (state='3' or state='5')"; + $query = "select state from diplomacy where me='{$younation['nation']}' and (state='3' or state='5')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); @@ -4510,12 +4510,12 @@ function process_62($connect, &$general) { $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 선전 포고"); //외교 변경 - $query = "update diplomacy set state='1',term='24' where me='$nation['nation']' and you='$younation['nation']'"; + $query = "update diplomacy set state='1',term='24' where me='{$nation['nation']}' and you='{$younation['nation']}'"; MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - $query = "update diplomacy set state='1',term='24' where me='$younation['nation']' and you='$nation['nation']'"; + $query = "update diplomacy set state='1',term='24' where me='{$younation['nation']}' and you='{$nation['nation']}'"; MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 @@ -4538,11 +4538,11 @@ function process_63($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4583,10 +4583,10 @@ function process_63($connect, &$general) { //권고 서신시 장수번호/상대국 번호 $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation['name']}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; + $query = "update nation set dip0='{$nation['name']}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4600,11 +4600,11 @@ function process_64($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select name,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select name,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4645,10 +4645,10 @@ function process_64($connect, &$general) { //권고 서신시 장수번호/상대국 번호 $me = $general['no'] * 10000 + $younation['nation']; $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation['name']}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='$younation['nation']'"; + $query = "update nation set dip0='{$nation['name']}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='{$younation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // $log = checkAbility($connect, $general, $log); } @@ -4662,15 +4662,15 @@ function process_65($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select city from city where nation='$general['nation']'"; + $query = "select city from city where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); - $query = "select nation,capital,name,surlimit,history,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,capital,name,surlimit,history,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4682,7 +4682,7 @@ function process_65($connect, &$general) { $destcity = MYDB_fetch_array($result); //아국이 외교중(교전, 선포, 합병, 통합 // 즉 !통상, !불가침)일때 - $query = "select state from diplomacy where me='$nation['nation']' and (state!='2' and state!='7')"; + $query = "select state from diplomacy where me='{$nation['nation']}' and (state!='2' and state!='7')"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipcount = MYDB_num_rows($result); @@ -4718,7 +4718,7 @@ function process_65($connect, &$general) { //외교제한 24 $amount = round($destcity['pop'] * 0.1); - $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='$general['nation']'"; + $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //직위해제 @@ -4726,15 +4726,15 @@ function process_65($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //성 공백지로 - $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='$destcity['city']'"; + $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //전장수 10% 삭감 - $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='$general['nation']'"; + $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4752,11 +4752,11 @@ function process_66($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4796,7 +4796,7 @@ function process_66($connect, &$general) { } elseif($term < 3) { $log[count($log)] = "●{$admin['month']}월:천도중... ({$term}/3) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 천도했습니다. <1>$date"; @@ -4813,11 +4813,11 @@ function process_66($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](으)로 천도 명령"); //수도 변경 - $query = "update nation set l{$general['level']}term='0',capital='$destcity['city']',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term='0',capital='{$destcity['city']}',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4835,11 +4835,11 @@ function process_67($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4878,7 +4878,7 @@ function process_67($connect, &$general) { } elseif($term < 6) { $log[count($log)] = "●{$admin['month']}월:증축중... ({$term}/6) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 증축했습니다. <1>$date"; @@ -4895,15 +4895,15 @@ function process_67($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 증축"); //물자 감소 - $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수도 증축 - $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='$destcity['city']'"; + $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -4921,11 +4921,11 @@ function process_68($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='$general['nation']'"; + $query = "select nation,name,gold,rice,surlimit,history,l{$general['level']}term,l{$general['level']}turn0,capital,capset from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -4966,7 +4966,7 @@ function process_68($connect, &$general) { } elseif($term < 6) { $log[count($log)] = "●{$admin['month']}월:감축중... ({$term}/6) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 감축했습니다. <1>$date"; @@ -4983,7 +4983,7 @@ function process_68($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 감축"); //물자 증가 - $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $pop = $destcity['pop'] - 100000; @@ -4999,11 +4999,11 @@ function process_68($connect, &$general) { if($wall < 0) { $wall = 0; } if($secu < 0) { $secu = 0; } //수도 감축 - $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='$destcity['city']'"; + $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5021,19 +5021,19 @@ function process_71($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from diplomacy where me='$general['nation']' and state=0"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=0"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5063,7 +5063,7 @@ function process_71($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:필사즉생 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:필사즉생 발동! <1>$date"; @@ -5074,7 +5074,7 @@ function process_71($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 필사즉생(을)를 발동하였습니다."; @@ -5090,7 +5090,7 @@ function process_71($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 필사즉생(을)를 발동"); //전장수 훈사100 - $query = "update general set atmos=100,train=100 where nation='$general['nation']'"; + $query = "update general set atmos=100,train=100 where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 @@ -5098,11 +5098,11 @@ function process_71($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5121,11 +5121,11 @@ function process_72($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5136,11 +5136,11 @@ function process_72($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select no from diplomacy where me='$general['nation']' and state=0"; + $query = "select no from diplomacy where me='{$general['nation']}' and state=0"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5172,7 +5172,7 @@ function process_72($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:백성동원 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:백성동원 발동! <1>$date"; @@ -5183,7 +5183,7 @@ function process_72($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; @@ -5199,7 +5199,7 @@ function process_72($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name']백성동원(을)를 발동"); //도시 성수 80% - $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='$destcity['city']'"; + $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 @@ -5207,11 +5207,11 @@ function process_72($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5230,11 +5230,11 @@ function process_73($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5245,15 +5245,15 @@ function process_73($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$destcity['nation']'"; + $query = "select nation,name,history from nation where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5287,7 +5287,7 @@ function process_73($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:수몰 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:수몰 발동! <1>$date"; @@ -5298,7 +5298,7 @@ function process_73($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; @@ -5307,7 +5307,7 @@ function process_73($connect, &$general) { pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destcity['nation']'"; + $query = "select no,name from general where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$destcity['name']수몰이 발동되었습니다."; @@ -5324,7 +5324,7 @@ function process_73($connect, &$general) { $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']수몰(을)를 발동"); //도시 성수 80% 감소 - $query = "update city set def=def*0.2,wall=wall*0.2 where city='$destcity['city']'"; + $query = "update city set def=def*0.2,wall=wall*0.2 where city='{$destcity['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 @@ -5332,11 +5332,11 @@ function process_73($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5355,11 +5355,11 @@ function process_74($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5370,15 +5370,15 @@ function process_74($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destcity = MYDB_fetch_array($result); - $query = "select nation,name,history from nation where nation='$destcity['nation']'"; + $query = "select nation,name,history from nation where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destcity['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5412,7 +5412,7 @@ function process_74($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:허보 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:허보 발동! <1>$date"; @@ -5423,7 +5423,7 @@ function process_74($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; @@ -5440,7 +5440,7 @@ function process_74($connect, &$general) { $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']허보(을)를 발동"); //상대국 도시 전부 검색 - $query = "select city from city where nation='$destcity['nation']' and supply=1"; + $query = "select city from city where nation='{$destcity['nation']}' and supply=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); for($i=0; $i < $cityCount; $i++) { @@ -5448,7 +5448,7 @@ function process_74($connect, &$general) { $citys[$i] = $dCity['city']; } //상대국 유저 랜덤 배치 - $query = "select no,name from general where nation='$destcity['nation']' and city='$destcity['city']'"; + $query = "select no,name from general where nation='{$destcity['nation']}' and city='{$destcity['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); $opplog[0] = "●상대국의 허보에 당했다! <1>$date"; @@ -5458,7 +5458,7 @@ function process_74($connect, &$general) { //현재도시이면 한번 다시 랜덤추첨 if($selCity == $destcity['city']) { $selCity = $citys[rand() % $cityCount]; } - $query = "update general set city={$selCity} where no='$gen['no']'"; + $query = "update general set city={$selCity} where no='{$gen['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($gen, $opplog); @@ -5469,11 +5469,11 @@ function process_74($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5492,11 +5492,11 @@ function process_75($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5507,11 +5507,11 @@ function process_75($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; + $query = "select state from diplomacy where me='{$general['nation']}' and you='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5543,7 +5543,7 @@ function process_75($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:피장파장 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:피장파장 발동! <1>$date"; @@ -5554,7 +5554,7 @@ function process_75($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; @@ -5563,7 +5563,7 @@ function process_75($connect, &$general) { pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation['nation']'"; + $query = "select no,name from general where nation='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 피장파장이 발동되었습니다."; @@ -5580,7 +5580,7 @@ function process_75($connect, &$general) { $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 피장파장(을)를 발동"); //전략기한+60 - $query = "update nation set tricklimit=tricklimit+60 where nation='$destnation['nation']'"; + $query = "update nation set tricklimit=tricklimit+60 where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 @@ -5589,11 +5589,11 @@ function process_75($connect, &$general) { //전략기한, 최소72 if($term3 < 72) { $term3 = 72; } - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5612,15 +5612,15 @@ function process_76($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5650,7 +5650,7 @@ function process_76($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:의병모집 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:의병모집 발동! <1>$date"; @@ -5661,7 +5661,7 @@ function process_76($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 의병모집(을)를 발동하였습니다."; @@ -5681,7 +5681,7 @@ function process_76($connect, &$general) { $avgNation = MYDB_fetch_array($result); $gencount = 5 + round($avgNation['gennum'] / 10); - $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general['nation']'"; + $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $avgGen = MYDB_fetch_array($result); @@ -5776,10 +5776,10 @@ function process_76($connect, &$general) { makelimit,bornyear,deadyear, dex0, dex10, dex20, dex30, dex40 ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation['nation']', - '$general['city']','$leader','$power','$intel','$avgGen['exp']','$avgGen['ded']', + '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','{$nation['nation']}', + '{$general['city']}','$leader','$power','$intel','{$avgGen['exp']}','{$avgGen['ded']}', '1','100','100','0','0','0','0','0', - '0','0','0','$turntime','$killturn','$avgGen['age']','1','$personal','0','0','0','0','', + '0','0','0','$turntime','$killturn','{$avgGen['age']}','1','$personal','0','0','0','0','', '0','$bornyear','$deadyear', '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' )", @@ -5793,7 +5793,7 @@ function process_76($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국가 기술력 그대로 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $gennum = $gencount; @@ -5804,11 +5804,11 @@ function process_76($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한, 국가 기술력 그대로 - $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5827,11 +5827,11 @@ function process_77($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5842,11 +5842,11 @@ function process_77($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state,term from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; + $query = "select state,term from diplomacy where me='{$general['nation']}' and you='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -5876,7 +5876,7 @@ function process_77($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:이호경식 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:이호경식 발동! <1>$date"; @@ -5887,7 +5887,7 @@ function process_77($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; @@ -5896,7 +5896,7 @@ function process_77($connect, &$general) { pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation['nation']'"; + $query = "select no,name from general where nation='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 이호경식이 발동되었습니다."; @@ -5914,10 +5914,10 @@ function process_77($connect, &$general) { //선포+3개월 if($dip['state'] == 0) { - $query = "update diplomacy set state=1,term=3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; + $query = "update diplomacy set state=1,term=3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update diplomacy set term=term+3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; + $query = "update diplomacy set term=term+3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5926,11 +5926,11 @@ function process_77($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -5949,11 +5949,11 @@ function process_78($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation,supply from city where city='$general['city']'"; + $query = "select nation,supply from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -5964,11 +5964,11 @@ function process_78($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); - $query = "select state,term from diplomacy where me='$general['nation']' and you='$destnation['nation']'"; + $query = "select state,term from diplomacy where me='{$general['nation']}' and you='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); if($genCount < 10) { $genCount = 10; } @@ -6000,7 +6000,7 @@ function process_78($connect, &$general) { } elseif($term < $term2) { $log[count($log)] = "●{$admin['month']}월:급습 수행중... ({$term}/{$term2}) <1>$date"; - $query = "update nation set l{$general['level']}term={$code} where nation='$general['nation']'"; + $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $log[count($log)] = "●{$admin['month']}월:급습 발동! <1>$date"; @@ -6011,7 +6011,7 @@ function process_78($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "$general['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; @@ -6020,7 +6020,7 @@ function process_78($connect, &$general) { pushGenLog($gen, $alllog); } - $query = "select no,name from general where nation='$destnation['nation']'"; + $query = "select no,name from general where nation='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $alllog[0] = "●아국에 급습이 발동되었습니다."; @@ -6037,7 +6037,7 @@ function process_78($connect, &$general) { $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 급습(을)를 발동"); //선포-3개월 - $query = "update diplomacy set term=term-3 where (me='$general['nation']' and you='$destnation['nation']') or (you='$general['nation']' and me='$destnation['nation']')"; + $query = "update diplomacy set term=term-3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가보정 @@ -6045,11 +6045,11 @@ function process_78($connect, &$general) { if($nation['type'] == 12) { $term3 = $term3 * 2; } //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general['nation']'"; + $query = "update nation set tricklimit={$term3} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -6066,11 +6066,11 @@ function process_81($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select nation from city where city='$general['city']'"; + $query = "select nation from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $query = "select nation,colset,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='$general['nation']'"; + $query = "select nation,colset,name,type,tricklimit,history,l{$general['level']}term,l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -6095,7 +6095,7 @@ function process_81($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $query = "select no,name from general where nation='$general['nation']' and no!='$general['no']'"; + $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); $genlog[0] = "$general['name'](이)가 국기를 변경합니다."; @@ -6110,11 +6110,11 @@ function process_81($connect, &$general) { $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 국기를 변경"); //국기변경 - $query = "update nation set color='$color',colset=colset-1 where nation='$nation['nation']'"; + $query = "update nation set color='$color',colset=colset-1 where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -6139,7 +6139,7 @@ function process_99($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); pushGenLog($general, $log); diff --git a/twe/func_tournament.php b/twe/func_tournament.php index 3f99f3a5..f184bd73 100644 --- a/twe/func_tournament.php +++ b/twe/func_tournament.php @@ -297,7 +297,7 @@ function fillLowGenAll($connect) { } //자동신청하고, 돈 있고, 아직 참가 안한 장수 - $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='$admin['develcost']' order by rand() limit 0,64"; + $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='{$admin['develcost']}' order by rand() limit 0,64"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($result); @@ -312,14 +312,14 @@ function fillLowGenAll($connect) { if($genCount > 0) { $genCount--; $gen = MYDB_fetch_array($result); - $query = "update general set gold=gold-'$admin['develcost']',tournament='1' where no='$gen['no']'"; + $query = "update general set gold=gold-'{$admin['develcost']}',tournament='1' where no='{$gen['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$gen['no']', '$gen['npc']', '$gen['name']', '$gen['leader']', '$gen['power']', '$gen['intel']', '$gen['explevel']', '$i', '$grpCount[$i]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('{$gen['no']}', '{$gen['npc']}', '{$gen['name']}', '{$gen['leader']}', '{$gen['power']}', '{$gen['intel']}', '{$gen['explevel']}', '$i', '$grpCount[$i]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //자동신청 장수 없으면 무명장수 } else { - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$general['no']', '$general['npc']', '$general['name']', '$general['leader']', '$general['power']', '$general['intel']', '$general['explevel']', '$i', '$grpCount[$i]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['leader']}', '{$general['power']}', '{$general['intel']}', '{$general['explevel']}', '$i', '$grpCount[$i]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $grpCount[$i]++; @@ -396,7 +396,7 @@ function qualify($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($k=1; $k <= 4; $k++) { $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen['grp']' and grp_no='$gen['grp_no']'"; + $query = "update tournament set prmt='$k' where grp='{$gen['grp']}' and grp_no='{$gen['grp_no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -431,10 +431,10 @@ function selection($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); //본선에 추가 - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //시드 삭제 - $query = "update tournament set prmt=0 where grp='$general['grp']' and grp_no='$general['grp_no']'"; + $query = "update tournament set prmt=0 where grp='{$general['grp']}' and grp_no='{$general['grp_no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($phase < 31) { @@ -473,7 +473,7 @@ function finallySingle($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($k=1; $k <= 2; $k++) { $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen['grp']' and grp_no='$gen['grp_no']'"; + $query = "update tournament set prmt='$k' where grp='{$gen['grp']}' and grp_no='{$gen['grp_no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -499,7 +499,7 @@ function final16set($connect) { //16강에 추가 $newGrp = 20 + floor($i / 2); $newGrp_no = $i % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $query = "update tournament set prmt=0"; @@ -529,7 +529,7 @@ function finalFight($connect, $tnmt_type, $tnmt, $phase, $type) { //x강에 추가 $newGrp = floor($phase / 2) + $offset + 10; $newGrp_no = $phase % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general['no']', '$general['npc']', '$general['name']', '$general['ldr']', '$general['pwr']', '$general['itl']', '$general['lvl']', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($phase >= $turn) { @@ -557,7 +557,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general['no']'"; + $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 $genNo[$i] = $general['no']; @@ -572,7 +572,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general['no']'"; + $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 $genGold[$general['no']] += $cost; @@ -585,7 +585,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general['no']'"; + $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 $genGold[$general['no']] += $cost; @@ -598,7 +598,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general['no']'"; + $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 $genGold[$general['no']] += $cost; @@ -611,7 +611,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='$general['no']'"; + $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //포상 장수 이름, 금액 $genGold[$general['no']] += $cost; @@ -658,7 +658,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); //16강 목록에서 검색 - $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='$general['no']'"; + $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); $no = ($general['grp'] - 20) * 2 + $general['grp_no']; @@ -676,7 +676,7 @@ function setGift($connect, $tnmt_type, $tnmt, $phase) { $gen = MYDB_fetch_array($result); $gold = round($gen['bet'] * $bet); //금 지급 - $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='$gen['no']'"; + $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='{$gen['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //로그 $log[0] = "{$tp} 대회의 베팅 당첨으로 {$gold}의 금 획득!"; @@ -696,7 +696,7 @@ function setRefund($connect) { $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $general = MYDB_fetch_array($result); - $query = "update general set gold=gold+'$cost' where no='$general['no']'"; + $query = "update general set gold=gold+'$cost' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -911,11 +911,11 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { if($energy2 <= 0) { $sel = 0; break; } } - $query = "select {$tp2}g as gl from general where no='$gen1['no']'"; + $query = "select {$tp2}g as gl from general where no='{$gen1['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general1 = MYDB_fetch_array($result); - $query = "select {$tp2}g as gl from general where no='$gen2['no']'"; + $query = "select {$tp2}g as gl from general where no='{$gen2['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general2 = MYDB_fetch_array($result); @@ -933,9 +933,9 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($general1['gl'] == $general2['gl']) { $gl1 = "+2"; $gl2 = "-1"; } else { $gl1 = "+3"; $gl2 = "-2"; } - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='{$gen1['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='{$gen2['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: @@ -951,9 +951,9 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($general2['gl'] == $general1['gl']) { $gl2 = "+2"; $gl1 = "-1"; } else { $gl2 = "+3"; $gl1 = "-2"; } - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; + $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='{$gen1['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; + $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='{$gen2['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: @@ -966,9 +966,9 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { elseif($general1['gl'] == $general2['gl']) { $gl2 = "+0"; $gl1 = "+0"; } else { $gl2 = "+1"; $gl1 = "-1"; } - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1['no']'"; + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='{$gen1['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2['no']'"; + $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='{$gen2['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } diff --git a/twe/join_post.php b/twe/join_post.php index 57d5df89..6d5ce9a2 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -26,7 +26,7 @@ if(!$member) { $date = date('Y-m-d H:i:s'); //등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member['no']'"; +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='{$member['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $connect = dbConn(); @@ -41,7 +41,7 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -$query = "select no from general where user_id='$member['id']'"; +$query = "select no from general where user_id='{$member['id']}'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $id_num = MYDB_num_rows($result); @@ -49,7 +49,7 @@ $query = "select no from general where name='$name'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $name_num = MYDB_num_rows($result); -$query = "select * from token where id='$member['id']'"; +$query = "select * from token where id='{$member['id']}'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $token_num = MYDB_num_rows($result); @@ -234,7 +234,7 @@ if($id_num) { $r = rand() % 999 + 1; $me['name'] = '장수-'.$r; - $query = "update general set name='$me['name']' where user_id='$id'"; + $query = "update general set name='{$me['name']}' where user_id='$id'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $cityname = getCity($connect, $city, "name"); diff --git a/twe/login_process.php b/twe/login_process.php index c31ec645..2b130b98 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -49,7 +49,7 @@ if(!$member) { $date = date('Y-m-d H:i:s'); - $query="update general set logcnt=logcnt+1,ip='$_SESSION['p_ip']',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION['p_id']'"; + $query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); echo ""; diff --git a/twe/logout_process.php b/twe/logout_process.php index aaa8ed5f..03172f8f 100644 --- a/twe/logout_process.php +++ b/twe/logout_process.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select no,user_id,password,name from general where user_id='$_SESSION['p_id']'"; +$query = "select no,user_id,password,name from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/main.php b/twe/main.php index 13ecf934..b4dfeb7a 100644 --- a/twe/main.php +++ b/twe/main.php @@ -7,7 +7,7 @@ $connect = dbConn(); increaseRefresh($connect, "메인", 2); checkTurn($connect); -$query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='$_SESSION['p_id']'"; +$query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -19,13 +19,13 @@ if($me['no'] == 0) { } if($me['newmsg'] == 1 && $me['newvote'] == 1) { - $query = "update general set newmsg=0,newvote=0 where user_id='$_SESSION['p_id']'"; + $query = "update general set newmsg=0,newvote=0 where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newmsg'] == 1) { - $query = "update general set newmsg=0 where user_id='$_SESSION['p_id']'"; + $query = "update general set newmsg=0 where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newvote'] == 1) { - $query = "update general set newvote=0 where user_id='$_SESSION['p_id']'"; + $query = "update general set newvote=0 where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/map.php b/twe/map.php index 0116fbb2..96eaaadc 100644 --- a/twe/map.php +++ b/twe/map.php @@ -103,11 +103,11 @@ function showMap($connect, $type, $graphic) { $result = MYDB_query($query, $connect) or Error("showMap ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,userlevel,level,city from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,userlevel,level,city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select spy from nation where nation='$me['nation']'"; + $query = "select spy from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -173,13 +173,13 @@ function showMap($connect, $type, $graphic) { } } elseif($me['level'] == 0) { // 재야는 내 도시만 - $query = "select city,name,nation from city where city='$me['city']'"; + $query = "select city,name,nation from city where city='{$me['city']}'"; $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityvalid = MYDB_fetch_array($cityresult); $valid[$cityvalid['city']] = 1; } else { // 아국 도시 - $query = "select city,name from city where nation='$me['nation']'"; + $query = "select city,name 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++) { @@ -187,7 +187,7 @@ function showMap($connect, $type, $graphic) { $valid[$cityvalid['city']] = 1; } // 아국 장수가 있는 타국 도시들 선택 - $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']'"; + $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++) { diff --git a/twe/msglist.php b/twe/msglist.php index d1924bab..331793a0 100644 --- a/twe/msglist.php +++ b/twe/msglist.php @@ -17,7 +17,7 @@ $connect = dbconn(); window.top.location.replace('./');"; diff --git a/twe/preprocessing.php b/twe/preprocessing.php index ed8fd35f..7eb12b68 100644 --- a/twe/preprocessing.php +++ b/twe/preprocessing.php @@ -10,7 +10,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,userlevel,con from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,userlevel,con from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/process_war.php b/twe/process_war.php index 3bdcb206..02f3226a 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -20,7 +20,7 @@ function processWar($connect, $general, $city) { if($general['item'] == 3) { //탁주 사용 $genAtmos += 3; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -35,7 +35,7 @@ function processWar($connect, $general, $city) { if($general['item'] == 4) { //청주 사용 $genTrain += 3; - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -51,25 +51,25 @@ function processWar($connect, $general, $city) { $city['def'] *= 10; $city['wall'] *= 10; - $query = "select level from city where city='$general['city']'"; + $query = "select level from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $originCity = MYDB_fetch_array($result); - $query = "select nation,level,name,history,capital,tech,type from nation where nation='$general['nation']'"; + $query = "select nation,level,name,history,capital,tech,type from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='$city['nation']'"; + $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destnation = MYDB_fetch_array($result); //장수수 구함 - $query = "select no from general where nation='$general['nation']'"; + $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); if($gencount < 10) $gencount = 10; //장수수 구함 - $query = "select no from general where nation='$destnation['nation']'"; + $query = "select no from general where nation='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $destgencount = MYDB_num_rows($result); if($destgencount < 10) $destgencount = 10; @@ -90,7 +90,7 @@ function processWar($connect, $general, $city) { // $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【전투】$nation['name'](이)가 $destnation['name']$city['name'](으)로 진격합니다."; // 목표 도시내에 목표 국가 소속 장수 중, 병사가 있는 능력치합+병사수 순으로 훈,사 60, 80 이상 - $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='$city['city']' and nation='$city['nation']' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; + $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='{$city['city']}' and nation='{$city['nation']}' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opposecount = MYDB_num_rows($result); @@ -103,7 +103,7 @@ function processWar($connect, $general, $city) { if($opposecount == 0 && $destnation['nation'] > 0 && $destnation['rice'] <= 0 && $city['supply'] == 1) { $general['train'] += 1; //훈련 상승 if($general['train'] > $_maximumtrain) { $general['train'] = $_maximumtrain; } - $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; + $query = "update general set recwar='{$general['turntime']}',train='{$general['train']}',warnum=warnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[count($alllog)] = "●{$game['month']}월:병량 부족으로 $city['name']의 수비병들이 패퇴합니다."; @@ -117,10 +117,10 @@ function processWar($connect, $general, $city) { //패퇴시 병량보충 $destnation['rice'] += 500; - $query = "update nation set rice='$destnation['rice']' where nation='$destnation['nation']'"; + $query = "update nation set rice='{$destnation['rice']}' where nation='{$destnation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //내정 피폐 - $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='$city['city']'"; + $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = addConflict($connect, $city, $general['nation'], 1); @@ -134,7 +134,7 @@ function processWar($connect, $general, $city) { $general['train'] += 1; //훈련 상승 if($general['train'] > $_maximumtrain) { $general['train'] = $_maximumtrain; } - $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; + $query = "update general set recwar='{$general['turntime']}',train='{$general['train']}',warnum=warnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $mykillnum = 0; $mydeathnum = 0; @@ -383,7 +383,7 @@ function processWar($connect, $general, $city) { $rice = round($opexp * 5 * getCrewtypeRice($game, 0, 0) * ($game['city_rate']/100 - 0.2)); $destnation['rice'] -= $rice; if($destnation['rice'] < 0) { $destnation['rice'] = 0; } - $query = "update nation set rice='$destnation['rice']' where nation='$destnation['nation']'"; + $query = "update nation set rice='{$destnation['rice']}' where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $adminLog[0] = "성벽 쌀 소모 : $rice"; @@ -401,7 +401,7 @@ function processWar($connect, $general, $city) { if($city['comm'] < 0) { $city['comm'] = 0; } if($city['secu'] < 0) { $city['secu'] = 0; } // 병사수 변경 - $query = "update general set crew='$general['crew']',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general['no']'"; + $query = "update general set crew='{$general['crew']}',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 addGenDex($connect, $general['no'], $general['crewtype'], $mykillnum); @@ -413,7 +413,7 @@ function processWar($connect, $general, $city) { if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 if(TechLimit($game['startyear'], $game['year'], $nation['tech'])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation['nation']'"; + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 기술로 누적 $num = round($mykillnum * 0.01); @@ -422,7 +422,7 @@ function processWar($connect, $general, $city) { if($destnation['type'] == 5 || $destnation['type'] == 6 || $destnation['type'] == 7 || $destnation['type'] == 8 || $destnation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 if(TechLimit($game['startyear'], $game['year'], $destnation['tech'])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation['nation']'"; + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //양국 평균 기술가격 //$techRatio = (getTechCost($nation['tech']) + getTechCost($destnation['tech'])) / 2; @@ -432,14 +432,14 @@ function processWar($connect, $general, $city) { // 국가보정 if($destnation['type'] == 1) { $num *= 1.1; } if($destnation['type'] == 9 || $destnation['type'] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num',def='$city['def']',wall='$city['wall']',agri='$city['agri']',comm='$city['comm']',secu='$city['secu']' where city='$city['city']'"; + $query = "update city set dead=dead+'$num',def='{$city['def']}',wall='{$city['wall']}',agri='{$city['agri']}',comm='{$city['comm']}',secu='{$city['secu']}' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 도시 재정으로 누적 40% $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); // 국가보정 if($nation['type'] == 1) { $num *= 1.1; } if($nation['type'] == 9 || $nation['type'] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general['city']'"; + $query = "update city set dead=dead+'$num' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //분쟁현황에 추가 @@ -468,14 +468,14 @@ function processWar($connect, $general, $city) { $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●퇴각했습니다."; - $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; + $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } elseif($myRice <= round($general['crew']/100)) { $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●군량 부족으로 퇴각합니다."; - $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; + $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -490,7 +490,7 @@ function processWar($connect, $general, $city) { if($oppose['item'] == 3) { //탁주 사용 $oppAtmos += 3; - $query = "update general set item=0 where no='$oppose['no']'"; + $query = "update general set item=0 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; $oppose['item'] = 0; @@ -505,7 +505,7 @@ function processWar($connect, $general, $city) { if($oppose['item'] == 4) { //청주 사용 $oppTrain += 3; - $query = "update general set item=0 where no='$oppose['no']'"; + $query = "update general set item=0 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; $oppose['item'] = 0; @@ -522,9 +522,9 @@ function processWar($connect, $general, $city) { $oppose['train'] += 1; //훈련 상승 if($oppose['train'] > $_maximumtrain) { $oppose['train'] = $_maximumtrain; } - $query = "update general set recwar='$general['turntime']',train='$general['train']',warnum=warnum+1 where no='$general['no']'"; + $query = "update general set recwar='{$general['turntime']}',train='{$general['train']}',warnum=warnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set recwar='$general['turntime']',train='$oppose['train']',warnum=warnum+1 where no='$oppose['no']'"; + $query = "update general set recwar='{$general['turntime']}',train='{$oppose['train']}',warnum=warnum+1 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ratio = rand() % 100; @@ -532,7 +532,7 @@ function processWar($connect, $general, $city) { if(($general[special2] == 70 && $ratio <= 33) || ($general['item'] == 2 && $ratio <= 20) || (($general['weap'] == 10 || $general['weap'] == 14 || $general['weap'] == 18 || $general['weap'] == 22) && $ratio <= 20)) { //수극 사용 if($general['item'] == 2) { - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "".getItemName($general['item'])."(을)를 사용!"; $general['item'] = 0; @@ -547,7 +547,7 @@ function processWar($connect, $general, $city) { $oppose['injury'] += rand() % 41 + 20; // 20 ~ 60 if($oppose['injury'] > 80) { $oppose['injury'] = 80; } } else if($general['item'] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$general['no']'"; + $query = "update general set item=0 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $batlog[count($batlog)] = "".getItemName($general['item'])."(이)가 빗나갑니다!"; $general['item'] = 0; @@ -557,7 +557,7 @@ function processWar($connect, $general, $city) { if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose['item'] == 2 && $ratio <= 20) || (($oppose['weap'] == 10 || $oppose['weap'] == 14 || $oppose['weap'] == 18 || $oppose['weap'] == 22) && $ratio <= 20)) { //수극 사용 if($oppose['item'] == 2) { - $query = "update general set item=0 where no='$oppose['no']'"; + $query = "update general set item=0 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opplog[count($opplog)] = "".getItemName($oppose['item'])."(을)를 사용!"; $oppose['item'] = 0; @@ -572,7 +572,7 @@ function processWar($connect, $general, $city) { $general['injury'] += rand() % 41 + 20; // 20 ~ 60 if($general['injury'] > 80) { $general['injury'] = 80; } } else if($oppose['item'] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$oppose['no']'"; + $query = "update general set item=0 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $oppbatlog[count($oppbatlog)] = "".getItemName($oppose['item'])."(이)가 빗나갑니다!"; $oppose['item'] = 0; @@ -1240,7 +1240,7 @@ function processWar($connect, $general, $city) { if($oppose['injury'] > 80) { $oppose['injury'] = 80; } } // 병사수 변경 - $query = "update general set injury='$oppose['injury']',crew='$oppose['crew']',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='$oppose['no']'"; + $query = "update general set injury='{$oppose['injury']}',crew='{$oppose['crew']}',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 addGenDex($connect, $oppose['no'], $oppose['crewtype'], $opkillnum * 0.9); @@ -1252,7 +1252,7 @@ function processWar($connect, $general, $city) { if($nation['type'] == 5 || $nation['type'] == 6 || $nation['type'] == 7 || $nation['type'] == 8 || $nation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 if(TechLimit($game['startyear'], $game['year'], $nation['tech'])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation['nation']'"; + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='{$nation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 장수 부상 @@ -1263,7 +1263,7 @@ function processWar($connect, $general, $city) { if($general['injury'] > 80) { $general['injury'] = 80; } } // 병사수 변경 - $query = "update general set injury='$general['injury']',crew='$general['crew']',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general['no']'"; + $query = "update general set injury='{$general['injury']}',crew='{$general['crew']}',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 숙련도 증가 addGenDex($connect, $general['no'], $general['crewtype'], $mykillnum); @@ -1275,7 +1275,7 @@ function processWar($connect, $general, $city) { if($destnation['type'] == 5 || $destnation['type'] == 6 || $destnation['type'] == 7 || $destnation['type'] == 8 || $destnation['type'] == 12) { $num *= 0.9; } // 부드러운 기술 제한 if(TechLimit($game['startyear'], $game['year'], $destnation['tech'])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation['nation']'"; + $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //양국 평균 기술가격 //$techRatio = (getTechCost($nation['tech']) + getTechCost($destnation['tech'])) / 2; @@ -1285,14 +1285,14 @@ function processWar($connect, $general, $city) { // 국가보정 if($destnation['type'] == 1) { $num *= 1.1; } if($destnation['type'] == 9 || $destnation['type'] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$city['city']'"; + $query = "update city set dead=dead+'$num' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 죽은수 도시 재정으로 누적 40% $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); // 국가보정 if($nation['type'] == 1) { $num *= 1.1; } if($nation['type'] == 9 || $nation['type'] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general['city']'"; + $query = "update city set dead=dead+'$num' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 상대 병사 소진이나 쌀 소진시 다음 장수 @@ -1311,7 +1311,7 @@ function processWar($connect, $general, $city) { $general['atmos'] *= 1.1; //사기 증가 if($general['atmos'] > $_maximumatmos) { $general['atmos'] = $_maximumatmos; } - $query = "update general set atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; + $query = "update general set atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $exp2++; @@ -1323,7 +1323,7 @@ function processWar($connect, $general, $city) { $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set deathnum=deathnum+1,rice='$oppose['rice']',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose['no']'"; + $query = "update general set deathnum=deathnum+1,rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opexp = 0; @@ -1365,9 +1365,9 @@ function processWar($connect, $general, $city) { $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set rice='$oppose['rice']',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='$oppose['atmos']',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='$oppose['no']'"; + $query = "update general set rice='{$oppose['rice']}',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='{$oppose['atmos']}',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set deathnum=deathnum+1 where no='$general['no']'"; + $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $opexp = 0; @@ -1401,7 +1401,7 @@ function processWar($connect, $general, $city) { $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set rice='$oppose['rice']',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose['no']'"; + $query = "update general set rice='{$oppose['rice']}',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 @@ -1412,7 +1412,7 @@ function processWar($connect, $general, $city) { } else { $general[power2] += $exp2; } - $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='$general['no']'"; + $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 공헌, 명성 상승 @@ -1423,7 +1423,7 @@ function processWar($connect, $general, $city) { $general['rice'] -= ($exp * 5 * getCrewtypeRice($game, $general['crewtype'], $nation['tech'])); if($general['rice'] < 0) { $general['rice'] = 0; } - $query = "update general set rice='$general['rice']',dedication=dedication+'$exp',experience=experience+'$exp' where no='$general['no']'"; + $query = "update general set rice='{$general['rice']}',dedication=dedication+'$exp',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1550,7 +1550,7 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { $city['conflict'] = implode("|", $nationlist); $city[conflict2] = implode("|", $killnum); - $query = "update city set conflict='$city['conflict']',conflict2='$city[conflict2]' where city='$city['city']'"; + $query = "update city set conflict='{$city['conflict']}',conflict2='$city[conflict2]' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); return $city; @@ -1580,7 +1580,7 @@ function DeleteConflict($connect, $nation) { $conflict = implode("|", $nationlist); $conflict2 = implode("|", $killnum); - $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='$city['city']'"; + $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); } } @@ -1616,36 +1616,36 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$general['name'](이)가 {$destnationName} $city['name'](을)를 점령"); $destnation = addNationHistory($connect, $destnation, "●{$game['year']}년 {$game['month']}월:$nation['name']$general['name']에 의해 $city['name'](이)가 함락"); - $query = "select city from city where nation='$city['nation']'"; + $query = "select city from city where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($result); // 국가 멸망시 if($citycount == 1 && $city['nation'] != 0) { - $query = "select nation,name,history,tech,type from nation where nation='$nation['nation']'"; + $query = "select nation,name,history,tech,type from nation where nation='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $query = "select nation,name,gold,rice from nation where nation='$city['nation']'"; + $query = "select nation,name,gold,rice from nation where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losenation = MYDB_fetch_array($result); $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【멸망】$losenation['name'](이)가 멸망하였습니다."; $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$losenation['name'](을)를 정복"); - $query = "select no from general where nation='$general['nation']' and level='12'"; + $query = "select no from general where nation='{$general['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $ruler = MYDB_fetch_array($result); //다굴치는 나라들 전방설정을 위해 미리 얻어옴 - $query = "select you from diplomacy where me='$losenation['nation']' and state<2"; + $query = "select you from diplomacy where me='{$losenation['nation']}' and state<2"; $dipResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dipCount = MYDB_num_rows($dipResult); $loseGeneralGold = 0; $loseGeneralRice = 0; //멸망국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='$city['nation']'"; + $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "$losenation['name'](이)가 멸망했습니다."; @@ -1697,11 +1697,11 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $losenation['rice'] = floor($losenation['gold'] / 2); // 기본량 제외 금쌀50% + 장수들 분실 금쌀50% 흡수 - $query = "update nation set gold=gold+'$losenation['gold']',rice=rice+'$losenation['rice']' where nation='$general['nation']'"; + $query = "update nation set gold=gold+'{$losenation['gold']}',rice=rice+'{$losenation['rice']}' where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general['nation']' and level>='9'"; + $query = "select no,name,nation from general where nation='{$general['nation']}' and level>='9'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "$losenation['name'] 정복으로 금$losenation['gold'] 쌀$losenation['rice']을 획득했습니다."; @@ -1713,22 +1713,22 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { //분쟁기록 모두 지움 DeleteConflict($connect, $city['nation']); // 전 장수 공헌 명성치 깎음 - $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='$city['nation']'"; + $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 도시 공백지로 - $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='$city['nation']'"; + $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 전 장수 소속 무소속으로, 재야로, 부대 탈퇴 - $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='$city['nation']'"; + $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 부대도 삭제 - $query = "delete from troop where nation='$city['nation']'"; + $query = "delete from troop where nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 외교 삭제 - $query = "delete from diplomacy where me='$city['nation']' or you='$city['nation']'"; + $query = "delete from diplomacy where me='{$city['nation']}' or you='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 국가 삭제 - $query = "delete from nation where nation='$city['nation']'"; + $query = "delete from nation where nation='{$city['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 아까 얻어온 다굴국들 전방설정 for($i=0; $i < $dipCount; $i++) { @@ -1749,7 +1749,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { if($destnation['capital'] == $city['city']) { $dist = distance($connect, $city['city']); - $query = "select city,name,pop from city where nation='$destnation['nation']' and city!='$city['city']'"; + $query = "select city,name,pop from city where nation='{$destnation['nation']}' and city!='{$city['city']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cityCount = MYDB_num_rows($result); $minDist = 99; $minCity = 0; $minCityPop = 0; @@ -1771,7 +1771,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【긴급천도】$destnation['name'](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$destnation['nation']' and level>='5'"; + $query = "select no,name,nation from general where nation='{$destnation['nation']}' and level>='5'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); $genlog[0] = "●수도가 함락되어 $minCityName으로 긴급천도합니다."; @@ -1780,16 +1780,16 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { pushGenLog($gen, $genlog); } //천도 - $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='$destnation['nation']'"; + $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //보급도시로 만듬 $query = "update city set supply=1 where city='$minCity'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수뇌부 이동 - $query = "update general set city='$minCity' where nation='$destnation['nation']' and level>='5'"; + $query = "update general set city='$minCity' where nation='{$destnation['nation']}' and level>='5'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //장수 사기 감소 - $query = "update general set atmos=atmos*0.8 where nation='$destnation['nation']'"; + $query = "update general set atmos=atmos*0.8 where nation='{$destnation['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -1801,15 +1801,15 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { if($conquerNation == $general['nation']) { // 이동 및 사기 변경 - $query = "update general set city='$city['city']',atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; + $query = "update general set city='{$city['city']}',atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($city['level'] > 3) { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$general['nation']',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='{$general['nation']}',gen1=0,gen2=0,gen3=0 where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$general['nation']',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='{$general['nation']}',gen1=0,gen2=0,gen3=0 where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //전방설정 @@ -1824,15 +1824,15 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$city['name'](을)를 $conquerNationArray['name']양도"); $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game['year']}년 {$game['month']}월:$nation['name']에서 $city['name'](을)를 양도 받음"); // 이동X 및 사기 변경 - $query = "update general set atmos='$general['atmos']',killnum=killnum+1 where no='$general['no']'"; + $query = "update general set atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($city['level'] > 3) { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city['city']'"; + $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='{$city['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } //전방설정 diff --git a/twe/processing.php b/twe/processing.php index 650cf2c0..93ee12cc 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -143,7 +143,7 @@ function ender($type=0) { } function command_99($connect, $turn) { - $query = "select nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -151,7 +151,7 @@ function command_99($connect, $turn) { $command = EncodeCommand(0, 0, 0, 99); for($i=0; $i < sizeof($turn); $i++) { - $query = "update nation set l{$me['level']}turn{$turn[$i]}='{$command}' where nation='$me['nation']'"; + $query = "update nation set l{$me['level']}turn{$turn[$i]}='{$command}' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } @@ -206,16 +206,16 @@ function command_11($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); //현재 도시 - $query = "select city,region from city where city='$me['city']'"; + $query = "select city,region from city where city='{$me['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $curCity = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$me['nation']'"; + $query = "select level,tech from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -239,7 +239,7 @@ function command_11($connect, $turn, $command) { $valid[41] = 1; $color[41] = "red"; // 충차 } else { // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me['nation']'"; + $query = "select city,level,region from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -639,16 +639,16 @@ function command_12($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); //현재 도시 - $query = "select city,region from city where city='$me['city']'"; + $query = "select city,region from city where city='{$me['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $curCity = MYDB_fetch_array($result); - $query = "select level,tech from nation where nation='$me['nation']'"; + $query = "select level,tech from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); @@ -672,7 +672,7 @@ function command_12($connect, $turn, $command) { $valid[41] = 1; $color[41] = "red"; // 충차 } else { // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me['nation']'"; + $query = "select city,level,region from city where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $citycount = MYDB_num_rows($result); @@ -1068,12 +1068,12 @@ function calc(cost, formnum) { function command_15($connect, $turn, $command) { starter("재편성"); - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); $me = $general['no']; - $query = "select no,name from general where nation='$general['nation']'"; + $query = "select no,name from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1109,11 +1109,11 @@ function command_15($connect, $turn, $command) { function command_16($connect, $turn, $command) { starter("출병"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1149,11 +1149,11 @@ $currentcity['name'] => function command_21($connect, $turn, $command) { starter("이동"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1190,7 +1190,7 @@ $currentcity['name'] => function command_22($connect, $turn, $command) { starter("등용"); - $query = "select nation from general where user_id='$_SESSION['p_id']'"; + $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1216,7 +1216,7 @@ function command_22($connect, $turn, $command) { "; } - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -1225,7 +1225,7 @@ function command_22($connect, $turn, $command) { echo ""; - $query = "select no,name,npc from general where nation='$nation['nation']' and level!='12' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc from general where nation='{$nation['nation']}' and level!='12' and npc<2 order by npc,binary(name)"; $genresult = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); @@ -1255,11 +1255,11 @@ function command_22($connect, $turn, $command) { function command_23($connect, $turn, $command) { starter("포상", 1); - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$general['nation']' and no!='$general['no']' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='{$general['nation']}' and no!='{$general['no']}' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1325,11 +1325,11 @@ function command_23($connect, $turn, $command) { function command_24($connect, $turn, $command) { starter("몰수", 1); - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$general['nation']' and no!='$general['no']' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='{$general['nation']}' and no!='{$general['no']}' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1403,7 +1403,7 @@ function command_25($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nations from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nations from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1473,11 +1473,11 @@ function command_25($connect, $turn, $command) { function command_27($connect, $turn, $command) { starter("발령", 1); - $query = "select no,nation,level from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation,level from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$me['nation']' and no!='$me['no']' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='{$me['nation']}' and no!='{$me['no']}' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -1529,11 +1529,11 @@ function command_27($connect, $turn, $command) { function command_30($connect, $turn, $command) { starter("강행"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1571,11 +1571,11 @@ ender(); function command_31($connect, $turn, $command) { starter("첩보"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1616,11 +1616,11 @@ $currentcity['name'] => function command_32($connect, $turn, $command) { starter("화계"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1656,11 +1656,11 @@ $currentcity['name'] => function command_33($connect, $turn, $command) { starter("탈취"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1696,11 +1696,11 @@ $currentcity['name'] => function command_34($connect, $turn, $command) { starter("파괴"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1736,11 +1736,11 @@ $currentcity['name'] => function command_35($connect, $turn, $command) { starter("선동"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1776,11 +1776,11 @@ $currentcity['name'] => function command_36($connect, $turn, $command) { starter("기습"); - $query = "select city from general where user_id='$_SESSION['p_id']'"; + $query = "select city from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select city,name from city where city='$general['city']'"; + $query = "select city,name from city where city='{$general['city']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $currentcity = MYDB_fetch_array($result); @@ -1816,11 +1816,11 @@ $currentcity['name'] => function command_43($connect, $turn, $command) { starter("증여"); - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); - $query = "select no,name,level,npc from general where nation='$general['nation']' and no!='$general['no']' order by npc,binary(name)"; + $query = "select no,name,level,npc from general where nation='{$general['nation']}' and no!='{$general['no']}' order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $gencount = MYDB_num_rows($result); @@ -2029,7 +2029,7 @@ function command_46($connect, $turn, $command) { function command_48($connect, $turn, $command) { starter("장비 매매"); - $query = "select no,city,gold from general where user_id='$_SESSION['p_id']'"; + $query = "select no,city,gold from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("command_48 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); $city = getCity($connect, $me['city'], "secu"); @@ -2139,11 +2139,11 @@ function command_49($connect, $turn, $command) { function command_51($connect, $turn, $command) { starter("항복 권고", 1); - $query = "select nation from general where user_id='$_SESSION['p_id']'"; + $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $query = "select nation,power from nation where nation='$me['nation']'"; + $query = "select nation,power from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -2155,7 +2155,7 @@ function command_51($connect, $turn, $command) { "; - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2271,7 +2271,7 @@ function command_52($connect, $turn, $command) { function command_53($connect, $turn, $command) { starter("통합제의", 1); - $query = "select no,nation from general where user_id='$_SESSION['p_id']'"; + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2283,7 +2283,7 @@ function command_53($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $stdNation = MYDB_fetch_array($result); - $query = "select nation,power,gennum from nation where nation='$me['nation']'"; + $query = "select nation,power,gennum from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); @@ -2295,7 +2295,7 @@ function command_53($connect, $turn, $command) { 대상국 : "; - $query = "select you,state from diplomacy where me='$me['nation']'"; + $query = "select you,state from diplomacy where me='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2400,7 +2400,7 @@ function command_61($connect, $turn, $command) { $diplomacy[$dip['you']] = $dip['state']; } - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2460,7 +2460,7 @@ function command_61($connect, $turn, $command) { function command_62($connect, $turn, $command) { starter("선전포고", 1); - $query = "select nation from general where user_id='$_SESSION['p_id']'"; + $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2473,7 +2473,7 @@ function command_62($connect, $turn, $command) { 대상 국가 "; - $query = "select you,state from diplomacy where me='$me['nation']'"; + $query = "select you,state from diplomacy where me='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2545,7 +2545,7 @@ function command_63($connect, $turn, $command) { $diplomacy[$dip['you']] = $dip['state']; } - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2581,7 +2581,7 @@ function command_63($connect, $turn, $command) { function command_64($connect, $turn, $command) { starter("파기", 1); - $query = "select nation from general where user_id='$_SESSION['p_id']'"; + $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2592,7 +2592,7 @@ function command_64($connect, $turn, $command) { 대상 국가 "; - $query = "select you,state from diplomacy where me='$me['nation']'"; + $query = "select you,state from diplomacy where me='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2923,7 +2923,7 @@ function command_75($connect, $turn, $command) { $diplomacy[$dip['you']] = $dip['state']; } - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -2959,7 +2959,7 @@ function command_75($connect, $turn, $command) { function command_77($connect, $turn, $command) { starter("이호경식", 1); - $query = "select nation from general where user_id='$_SESSION['p_id']'"; + $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2971,7 +2971,7 @@ function command_77($connect, $turn, $command) { 대상 국가 "; - $query = "select you,state from diplomacy where me='$me['nation']'"; + $query = "select you,state from diplomacy where me='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); @@ -3037,7 +3037,7 @@ function command_78($connect, $turn, $command) { $diplomacy[$dip['you']] = $dip['state']; } - $query = "select nation,name,color from nation where nation!='$me['nation']'"; + $query = "select nation,name,color from nation where nation!='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); diff --git a/twe/scenario_22.php b/twe/scenario_22.php index 2a986d70..2b77b622 100644 --- a/twe/scenario_22.php +++ b/twe/scenario_22.php @@ -168,10 +168,10 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); // 군주로 // 현 국가 소속으로 - $query = "update general set belong=1,level=12,nation='$nation['nation']' where user_id='$genid'"; + $query = "update general set belong=1,level=12,nation='{$nation['nation']}' where user_id='$genid'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //외교 추가 - $query = "select nation from nation where nation!='$nation['nation']'"; + $query = "select nation from nation where nation!='{$nation['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { @@ -180,14 +180,14 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p insert into diplomacy ( me, you, state, term ) values ( - '$nation['nation']', '$you['nation']', '2', '0' + '{$nation['nation']}', '{$you['nation']}', '2', '0' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); @MYDB_query(" insert into diplomacy ( me, you, state, term ) values ( - '$you['nation']', '$nation['nation']', '2', '0' + '{$you['nation']}', '{$nation['nation']}', '2', '0' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/select_npc_post.php b/twe/select_npc_post.php index 73868744..278eb8ed 100644 --- a/twe/select_npc_post.php +++ b/twe/select_npc_post.php @@ -23,7 +23,7 @@ if(!$member) { $date = date('Y-m-d H:i:s'); //등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member['no']'"; +$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='{$member['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $connect = dbConn(); @@ -43,7 +43,7 @@ $query = "select no from general where npc<2"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); -$query = "select no from general where user_id='$member['id']'"; +$query = "select no from general where user_id='{$member['id']}'"; $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); $id_num = MYDB_num_rows($result); diff --git a/twe/stylesheet.php b/twe/stylesheet.php index c3857e7d..5f268e66 100644 --- a/twe/stylesheet.php +++ b/twe/stylesheet.php @@ -6,7 +6,7 @@ $query = "select month from game"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,skin,con from general where user_id='$_SESSION['p_id']'"; +$query = "select no,skin,con from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/turn.php b/twe/turn.php index eaa463cc..61c76a91 100644 --- a/twe/turn.php +++ b/twe/turn.php @@ -10,7 +10,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,msgindex,userlevel,con from general where user_id='$_SESSION['p_id']'"; +$query = "select no,name,nation,msgindex,userlevel,con from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -29,7 +29,7 @@ case 0: if($k >= 24) break; $query .= ","; } - $query .= " where user_id='$_SESSION['p_id']'"; + $query .= " where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } */ @@ -43,7 +43,7 @@ case 0: if($k >= 24) break; } } - $query .= " where user_id='$_SESSION['p_id']'"; + $query .= " where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: @@ -61,7 +61,7 @@ case 1: if($k < 0) break; $query .= ","; } - $query .= " where user_id='$_SESSION['p_id']'"; + $query .= " where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: @@ -79,7 +79,7 @@ case 2: if($i >= 24) break; $query .= ","; } - $query .= " where user_id='$_SESSION['p_id']'"; + $query .= " where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } diff --git a/twe/turn_pop_core.php b/twe/turn_pop_core.php index 640cb74c..6c2adf2d 100644 --- a/twe/turn_pop_core.php +++ b/twe/turn_pop_core.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where user_id='$_SESSION['p_id']'"; +$query = "select no from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/turn_push_core.php b/twe/turn_push_core.php index ec7fff46..d8b8aea4 100644 --- a/twe/turn_push_core.php +++ b/twe/turn_push_core.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where user_id='$_SESSION['p_id']'"; +$query = "select no from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); From c0011790882c3de35468dcc4e6cdd013c3fba4c7 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 16 Jan 2018 04:09:31 +0900 Subject: [PATCH 026/622] =?UTF-8?q?string=20=EB=82=B4=20$=20=EA=B8=B0?= =?UTF-8?q?=ED=98=B8=20=EC=B6=94=EA=B0=80=20=EB=B3=80=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_admin2.php | 2 +- twe/_admin3.php | 4 +- twe/_admin4.php | 2 +- twe/_admin5.php | 4 +- twe/_admin6.php | 10 +- twe/a_emperior.php | 70 +++--- twe/a_emperior2.php | 70 +++--- twe/a_genList.php | 6 +- twe/a_kingdomList.php | 42 ++-- twe/a_npcList.php | 12 +- twe/b_currentCity.php | 14 +- twe/b_dipcenter.php | 16 +- twe/b_diplomacy.php | 4 +- twe/b_genList.php | 16 +- twe/b_myBossInfo.php | 6 +- twe/b_myCityInfo.php | 2 +- twe/b_myGenInfo.php | 10 +- twe/b_myKingdomInfo.php | 6 +- twe/b_nationrule.php | 4 +- twe/b_troop.php | 6 +- twe/c_myBossInfo.php | 14 +- twe/d_ally.php | 16 +- twe/d_cancel.php | 16 +- twe/d_cease.php | 16 +- twe/d_merge.php | 16 +- twe/d_scout.php | 14 +- twe/d_surrender.php | 16 +- twe/func.php | 248 ++++++++++---------- twe/func_history.php | 2 +- twe/func_process.php | 492 ++++++++++++++++++++-------------------- twe/join.php | 4 +- twe/join_post.php | 8 +- twe/process_war.php | 76 +++---- twe/processing.php | 4 +- twe/select_npc.php | 4 +- twe/select_npc_post.php | 4 +- 36 files changed, 628 insertions(+), 628 deletions(-) diff --git a/twe/_admin2.php b/twe/_admin2.php index e2433b48..651e80fe 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -79,7 +79,7 @@ for($i=0; $i < $gencount; $i++) { if($general['userlevel'] > 2) { $style .= "color:blue;"; } echo " - "; + "; } echo " diff --git a/twe/_admin3.php b/twe/_admin3.php index 775f1f5a..e191f3c9 100644 --- a/twe/_admin3.php +++ b/twe/_admin3.php @@ -57,10 +57,10 @@ for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); if($general['power'] >= $general['intel']) { echo " - "; + "; } else { echo " - "; + "; } } diff --git a/twe/_admin4.php b/twe/_admin4.php index a8d3844a..b09b2fca 100644 --- a/twe/_admin4.php +++ b/twe/_admin4.php @@ -66,7 +66,7 @@ for($i=0; $i < $gencount; $i++) { if($general['userlevel'] > 2) { $style .= "color:blue;"; } echo " - "; + "; } echo " diff --git a/twe/_admin5.php b/twe/_admin5.php index 23b38f7a..1be26719 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -213,7 +213,7 @@ for($i=0; $i < $nationCount; $i++) { echo " - $nation['name'] + {$nation['name']}  {$nation['connect']}   {$nation['con']}   {$nation['power']}  @@ -243,7 +243,7 @@ for($i=0; $i < $nationCount; $i++) {  {$city['secu']}%   {$city['wall']}%   {$city['def']}%  - $nation['name'] + {$nation['name']} "; } diff --git a/twe/_admin6.php b/twe/_admin6.php index 2ddfca5c..890323fb 100644 --- a/twe/_admin6.php +++ b/twe/_admin6.php @@ -80,13 +80,13 @@ for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($genresult); echo " - $gen['name'] - $gen['connect'] - $gen['startage'] - $gen['age'] + {$gen['name']} + {$gen['connect']} + {$gen['startage']} + {$gen['age']} ".round($gen['refcnt']/2, 1)." ".round($gen['ref']/2,1)." - $gen['logcnt'] + {$gen['logcnt']} ".round($gen['log']/2,1)." "; } diff --git a/twe/a_emperior.php b/twe/a_emperior.php index 60d967c3..70b4f30d 100644 --- a/twe/a_emperior.php +++ b/twe/a_emperior.php @@ -36,7 +36,7 @@ if($select == 0) { @@ -48,23 +48,23 @@ if($select == 0) { - + - + - + - + - + - + - + - +
- $emperior['phase'] + {$emperior['phase']}
국 력$emperior['power']{$emperior['power']} 장 수$emperior['gennum']{$emperior['gennum']} 속 령$emperior['citynum']{$emperior['citynum']} 성 향$emperior['type']{$emperior['type']}
황 제$emperior['l12name']{$emperior['l12name']} 승 상$emperior['l11name']{$emperior['l11name']} 위 장 군$emperior['l10name']{$emperior['l10name']} 사 공$emperior['l9name']{$emperior['l9name']}
"; @@ -80,32 +80,32 @@ if($select == 0) { - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/twe/a_emperior2.php b/twe/a_emperior2.php index a20cd017..87e5f1e7 100644 --- a/twe/a_emperior2.php +++ b/twe/a_emperior2.php @@ -36,7 +36,7 @@ if($select == 0) {
- $emperior['phase'] + {$emperior['phase']}
국 가 수
(최종 / 최대)
$emperior['nation_count']{$emperior['nation_count']} 장 수 수
(최종 / 최대)
$emperior['gen_count']{$emperior['gen_count']}
등 장 국 가$emperior['nation_name']{$emperior['nation_name']}
국가별 성향$emperior['nation_hist']{$emperior['nation_hist']}
장 수 성 격$emperior['personal_hist']{$emperior['personal_hist']}
장 수 특 기$emperior['special_hist']{$emperior['special_hist']}
@@ -114,71 +114,71 @@ if($select == 0) {
국 력$emperior['power']{$emperior['power']} 성 향$emperior['type']{$emperior['type']}
장 수$emperior['gennum']{$emperior['gennum']} 속 령$emperior['citynum']{$emperior['citynum']}
총 인 구$emperior['pop']{$emperior['pop']} 인 구 율$emperior['poprate']{$emperior['poprate']}
국 고$emperior['gold']{$emperior['gold']} 병 량$emperior['rice']{$emperior['rice']}
황 제  $emperior['l12name']{$emperior['l12name']} 승 상  $emperior['l11name']{$emperior['l11name']}
위 장 군  $emperior['l10name']{$emperior['l10name']} 사 공  $emperior['l9name']{$emperior['l9name']}
표 기 장 군  $emperior['l8name']{$emperior['l8name']} 태 위  $emperior['l7name']{$emperior['l7name']}
거 기 장 군  $emperior['l6name']{$emperior['l6name']} 사 도  $emperior['l5name']{$emperior['l5name']}
오 호 장 군$emperior['tiger']{$emperior['tiger']}
건 안 칠 자$emperior['eagle']{$emperior['eagle']}
장 수 들
(공헌도 순서)
$emperior['gen']{$emperior['gen']}
역 사 기 록
@@ -48,23 +48,23 @@ if($select == 0) { - + - + - + - + - + - + - + - +
- $emperior['phase'] + {$emperior['phase']}
국 력$emperior['power']{$emperior['power']} 장 수$emperior['gennum']{$emperior['gennum']} 속 령$emperior['citynum']{$emperior['citynum']} 성 향$emperior['type']{$emperior['type']}
황 제$emperior['l12name']{$emperior['l12name']} 승 상$emperior['l11name']{$emperior['l11name']} 위 장 군$emperior['l10name']{$emperior['l10name']} 사 공$emperior['l9name']{$emperior['l9name']}
"; @@ -81,32 +81,32 @@ if($select == 0) { - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/twe/a_genList.php b/twe/a_genList.php index eeaa7d38..7677cf2c 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -139,8 +139,8 @@ for($j=0; $j < $gencount; $j++) { $intel = "{$general['intel']}"; } - if($general['npc'] >= 2) { $name = "$general['name']"; } - elseif($general['npc'] == 1) { $name = "$general['name']"; } + if($general['npc'] >= 2) { $name = "{$general['name']}"; } + elseif($general['npc'] == 1) { $name = "{$general['name']}"; } else { $name = "$general['name']"; } $general['connect'] = round($general['connect'] / 10, 0) * 10; @@ -161,7 +161,7 @@ for($j=0; $j < $gencount; $j++) { - + "; } diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index 58befbd3..5681252c 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -79,43 +79,43 @@ for($i=1; $i <= $count; $i++) { $gencount = MYDB_num_rows($genresult); if($level12['name'] == "") { $l12 = "-"; } - elseif($level12['npc'] >= 2) { $l12 = "$level12['name']"; } - elseif($level12['npc'] == 1) { $l12 = "$level12['name']"; } + elseif($level12['npc'] >= 2) { $l12 = "{$level12['name']}"; } + elseif($level12['npc'] == 1) { $l12 = "{$level12['name']}"; } else { $l12 = $level12['name']; } if($level11['name'] == "") { $l11 = "-"; } - elseif($level11['npc'] >= 2) { $l11 = "$level11['name']"; } - elseif($level11['npc'] == 1) { $l11 = "$level11['name']"; } + elseif($level11['npc'] >= 2) { $l11 = "{$level11['name']}"; } + elseif($level11['npc'] == 1) { $l11 = "{$level11['name']}"; } else { $l11 = $level11['name']; } if($level10['name'] == "") { $l10 = "-"; } - elseif($level10['npc'] >= 2) { $l10 = "$level10['name']"; } - elseif($level10['npc'] == 1) { $l10 = "$level10['name']"; } + elseif($level10['npc'] >= 2) { $l10 = "{$level10['name']}"; } + elseif($level10['npc'] == 1) { $l10 = "{$level10['name']}"; } else { $l10 = $level10['name']; } if($level9['name'] == "") { $l9 = "-"; } - elseif($level9['npc'] >= 2) { $l9 = "$level9['name']"; } - elseif($level9['npc'] == 1) { $l9 = "$level9['name']"; } + elseif($level9['npc'] >= 2) { $l9 = "{$level9['name']}"; } + elseif($level9['npc'] == 1) { $l9 = "{$level9['name']}"; } else { $l9 = $level9['name']; } if($level8['name'] == "") { $l8 = "-"; } - elseif($level8['npc'] >= 2) { $l8 = "$level8['name']"; } - elseif($level8['npc'] == 1) { $l8 = "$level8['name']"; } + elseif($level8['npc'] >= 2) { $l8 = "{$level8['name']}"; } + elseif($level8['npc'] == 1) { $l8 = "{$level8['name']}"; } else { $l8 = $level8['name']; } if($level7['name'] == "") { $l7 = "-"; } - elseif($level7['npc'] >= 2) { $l7 = "$level7['name']"; } - elseif($level7['npc'] == 1) { $l7 = "$level7['name']"; } + elseif($level7['npc'] >= 2) { $l7 = "{$level7['name']}"; } + elseif($level7['npc'] == 1) { $l7 = "{$level7['name']}"; } else { $l7 = $level7['name']; } if($level6['name'] == "") { $l6 = "-"; } - elseif($level6['npc'] >= 2) { $l6 = "$level6['name']"; } - elseif($level6['npc'] == 1) { $l6 = "$level6['name']"; } + elseif($level6['npc'] >= 2) { $l6 = "{$level6['name']}"; } + elseif($level6['npc'] == 1) { $l6 = "{$level6['name']}"; } else { $l6 = $level6['name']; } if($level5['name'] == "") { $l5 = "-"; } - elseif($level5['npc'] >= 2) { $l5 = "$level5['name']"; } - elseif($level5['npc'] == 1) { $l5 = "$level5['name']"; } + elseif($level5['npc'] >= 2) { $l5 = "{$level5['name']}"; } + elseif($level5['npc'] == 1) { $l5 = "{$level5['name']}"; } else { $l5 = $level5['name']; } echo " @@ -171,7 +171,7 @@ for($i=1; $i <= $count; $i++) { $cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityResult); - echo "현재 위치 : $city['name']"; + echo "현재 위치 : {$city['name']}"; } echo" @@ -180,8 +180,8 @@ for($i=1; $i <= $count; $i++) { - - - - + + + + "; diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index 9c158a71..c4c3434b 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -184,7 +184,7 @@ echo " - + @@ -281,7 +281,7 @@ for($j=0; $j < $gencount; $j++) { echo " - + @@ -297,9 +297,9 @@ for($j=0; $j < $gencount; $j++) { echo " - - - "; + + + "; if($general['npc'] >= 2) { echo " - + - + - - - + + + @@ -150,9 +150,9 @@ for($i=0; $i < $nationcount; $i++) { echo " - - - + + + "; if($dip['term'] != 0) { @@ -220,9 +220,9 @@ echo " - + - + diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 84f026ae..8d95cc30 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -30,7 +30,7 @@ for($i=0; $i < $nationcount; $i++) { $nationname[$nation['nation']] = $nation['name']; $nationcolor[$nation['nation']] = $nation['color']; - $nationStr .= "$nation['name']
"; + $nationStr .= "{$nation['name']}
"; $powerStr .= "국력 $nation['power']
"; $genStr .= "장수 $nation['gennum']
"; $cityStr .= "속령 $citycount
"; @@ -149,7 +149,7 @@ for($i=0; $i < $citycount; $i++) { } echo " - + - - + + - - - "; + + + "; if($general['npc'] >= 2) { echo " - + "; } diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index 2fd47501..b8a33b89 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -484,9 +484,9 @@ for($j=0; $j < $citycount; $j++) { - - - + + + "; } diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index e65f2e81..163e81dc 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -129,7 +129,7 @@ for($j=0; $j < $citycount; $j++) { - + diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index 1ace5d7b..f5729836 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -132,8 +132,8 @@ for($j=0; $j < $gencount; $j++) { $intel = "{$general['intel']}"; } - if($general['npc'] >= 2) { $name = "$general['name']"; } - elseif($general['npc'] == 1) { $name = "$general['name']"; } + if($general['npc'] >= 2) { $name = "{$general['name']}"; } + elseif($general['npc'] == 1) { $name = "{$general['name']}"; } else { $name = "$general['name']"; } $imageTemp = GetImageURL($general['imgsvr']); @@ -148,11 +148,11 @@ for($j=0; $j < $gencount; $j++) { - - + + - + "; } diff --git a/twe/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php index aa4698d6..2ff1055d 100644 --- a/twe/b_myKingdomInfo.php +++ b/twe/b_myKingdomInfo.php @@ -88,7 +88,7 @@ echo " - + @@ -115,7 +115,7 @@ echo " - + @@ -123,7 +123,7 @@ echo " - + diff --git a/twe/b_nationrule.php b/twe/b_nationrule.php index 7bac0728..cc272ca9 100644 --- a/twe/b_nationrule.php +++ b/twe/b_nationrule.php @@ -31,12 +31,12 @@ $nation = MYDB_fetch_array($result); if($me['level'] >= 5) { echo " -
+
"; } else { echo " -
"; +
"; } ?> diff --git a/twe/b_troop.php b/twe/b_troop.php index 22a8af17..8f7ee9ca 100644 --- a/twe/b_troop.php +++ b/twe/b_troop.php @@ -77,7 +77,7 @@ for($i=0; $i < $troopcount; $i++) { echo " - + @@ -88,7 +88,7 @@ for($i=0; $i < $troopcount; $i++) { echo " - + - + - + - + - + - +
- $emperior['phase'] + {$emperior['phase']}
국 가 수
(최종 / 최대)
$emperior['nation_count']{$emperior['nation_count']} 장 수 수
(최종 / 최대)
$emperior['gen_count']{$emperior['gen_count']}
등 장 국 가$emperior['nation_name']{$emperior['nation_name']}
국가별 성향$emperior['nation_hist']{$emperior['nation_hist']}
장 수 성 격$emperior['personal_hist']{$emperior['personal_hist']}
장 수 특 기$emperior['special_hist']{$emperior['special_hist']}
@@ -115,71 +115,71 @@ if($select == 0) {
국 력$emperior['power']{$emperior['power']} 성 향$emperior['type']{$emperior['type']}
장 수$emperior['gennum']{$emperior['gennum']} 속 령$emperior['citynum']{$emperior['citynum']}
총 인 구$emperior['pop']{$emperior['pop']} 인 구 율$emperior['poprate']{$emperior['poprate']}
국 고$emperior['gold']{$emperior['gold']} 병 량$emperior['rice']{$emperior['rice']}
황 제  $emperior['l12name']{$emperior['l12name']} 승 상  $emperior['l11name']{$emperior['l11name']}
위 장 군  $emperior['l10name']{$emperior['l10name']} 사 공  $emperior['l9name']{$emperior['l9name']}
표 기 장 군  $emperior['l8name']{$emperior['l8name']} 태 위  $emperior['l7name']{$emperior['l7name']}
거 기 장 군  $emperior['l6name']{$emperior['l6name']} 사 도  $emperior['l5name']{$emperior['l5name']}
오 호 장 군$emperior['tiger']{$emperior['tiger']}
건 안 칠 자$emperior['eagle']{$emperior['eagle']}
장 수 들
(공헌도 순서)
$emperior['gen']{$emperior['gen']}
역 사 기 록$leader $power $intel$general['killturn']{$general['killturn']} $general['connect']"; echo "
【".getConnect($general['connect'])."】
장수 일람 : "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if($general['npc'] >= 2) { echo "$general['name'], "; } - elseif($general['npc'] == 1) { echo "$general['name'], "; } + if($general['npc'] >= 2) { echo "{$general['name']}, "; } + elseif($general['npc'] == 1) { echo "{$general['name']}, "; } else { echo "$general['name'], "; } } echo" @@ -225,8 +225,8 @@ echo" 장수 일람 : "; for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); - if($general['npc'] >= 2) { echo "$general['name'], "; } - elseif($general['npc'] == 1) { echo "$general['name'], "; } + if($general['npc'] >= 2) { echo "{$general['name']}, "; } + elseif($general['npc'] == 1) { echo "{$general['name']}, "; } else { echo "$general['name'], "; } } echo" diff --git a/twe/a_npcList.php b/twe/a_npcList.php index a308d02e..eec09182 100644 --- a/twe/a_npcList.php +++ b/twe/a_npcList.php @@ -80,8 +80,8 @@ for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); $nation = $nationname[$general['nation']]; - if($general['npc'] >= 2) { $name = "$general['name']"; } - elseif($general['npc'] == 1) { $name = "$general['name']"; } + if($general['npc'] >= 2) { $name = "{$general['name']}"; } + elseif($general['npc'] == 1) { $name = "{$general['name']}"; } else { $name = "$general['name']"; } echo " @@ -92,10 +92,10 @@ for($j=0; $j < $gencount; $j++) { {$nation} ".getGenChar($general['personal'])." ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])."$general['sum']$general['leader']$general['power']$general['intel']{$general['sum']}{$general['leader']}{$general['power']}{$general['intel']} {$general['experience']} {$general['dedication']}
민심$city['rate']{$city['rate']} 시세 {$city['trade']}% 인구
$general['name']{$general['name']} $leader $power $intel$mode ".getTypename($general['crewtype'])."$general['crew']$general['train']$general['atmos']{$general['crew']}{$general['train']}{$general['atmos']}NPC 장수"; @@ -321,7 +321,7 @@ for($j=0; $j < $gencount; $j++) { echo " ? ?$general['crew']{$general['crew']} ? ? 【{$nationname[$general['nation']]}】 장수"; @@ -329,7 +329,7 @@ for($j=0; $j < $gencount; $j++) { echo " ? ?$general['crew']{$general['crew']} ? ?   재 야"; diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 17118897..7aa75d6e 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -77,9 +77,9 @@ for($i=0; $i < $nationcount; $i++) { $citycount = MYDB_num_rows($result2); echo "
$nation['name']$nation['power']$nation['gennum']{$nation['name']}{$nation['power']}{$nation['gennum']} $citycount - -
$nation['name']$nation['power']$nation['gennum']{$nation['name']}{$nation['power']}{$nation['gennum']} $citycount $state
현 재   $nation['gold']{$nation['gold']} 현 재   $nation['rice']{$nation['rice']}
단기수입   
$city['name']{$city['name']} "; for($k=0; $k < count($nation); $k++) { $per = 100*$killnum[$seq[$k]] / $sum; diff --git a/twe/b_genList.php b/twe/b_genList.php index cdbec204..8a0ce459 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -136,8 +136,8 @@ for($j=0; $j < $gencount; $j++) { $intel = "{$general['intel']}"; } - if($general['npc'] >= 2) { $name = "$general['name']"; } - elseif($general['npc'] == 1) { $name = "$general['name']"; } + if($general['npc'] >= 2) { $name = "{$general['name']}"; } + elseif($general['npc'] == 1) { $name = "{$general['name']}"; } else { $name = "$general['name']"; } switch($general['mode']) { @@ -151,14 +151,14 @@ for($j=0; $j < $gencount; $j++) { $name
Lv ".getExpLevel($general['experience'])."
{$leader}∥{$power}∥{$intel} $troop$general['gold']$general['rice']{$general['gold']}{$general['rice']} $city $mode ".getTypename($general['crewtype'])."$general['crew']$general['train']$general['atmos']{$general['crew']}{$general['train']}{$general['atmos']} @@ -179,7 +179,7 @@ for($j=0; $j < $gencount; $j++) { echo " $general['killturn']{$general['killturn']} ".substr($general['turntime'],14,5)."
【{$citylevel[$city['level']]}】 $city['name']  $gen1['name']$gen2['name']$gen3['name']{$gen1['name']}{$gen2['name']}{$gen3['name']}
민심$city['rate']{$city['rate']} 시세 {$city['trade']}% 인구$leader $power $intel$general['gold']$general['rice']{$general['gold']}{$general['rice']} ".getGenChar($general['personal'])." ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])."$general['belong']{$general['belong']} $general['connect']"; echo "
(".getConnect($general['connect']).")
총병사 {$general['totcrew']}/{$general['maxcrew']} 국 력$nation['power']{$nation['power']}
국 고속 령 $citycount 장 수$nation['gennum']{$nation['gennum']}
국고 예산병량 예산 {$budgetrice} ({$budgetricediff}) 기술력$nation['tech']{$nation['tech']} 작 위 ".getNationLevel($nation['level'])."
$troop['name']
【 $cityname 】
{$troop['name']}
【 $cityname 】
  $genlist $turn
 $troop['name']
【 $cityname 】
{$troop['name']}
【 $cityname 】
  $genlist "; @@ -102,7 +102,7 @@ for($i=0; $i < $troopcount; $i++) { for($k=0; $k < $genCount; $k++) { $general = MYDB_fetch_array($genresult); echo " - "; + "; } echo "
diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index a4047852..8570da3a 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -70,22 +70,22 @@ if($btn == "추방") { } if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin['month']}월:통합에 반대하던 $general['name'](이)가 $nation['name']에서 숙청당했습니다."; - $log[count($log)] = "●통합에 반대하다가 $nation['name']에서 숙청당했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:통합에 반대하던 {$general['name']}(이)가 {$nation['name']}에서 숙청당했습니다."; + $log[count($log)] = "●통합에 반대하다가 {$nation['name']}에서 숙청당했습니다."; // 재야로, 국가 무소속으로 $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin['month']}월:합병에 반대하던 $general['name'](이)가 $nation['name']에서 숙청당했습니다."; - $log[count($log)] = "●합병에 반대하다가 $nation['name']에서 숙청당했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:합병에 반대하던 {$general['name']}(이)가 {$nation['name']}에서 숙청당했습니다."; + $log[count($log)] = "●합병에 반대하다가 {$nation['name']}에서 숙청당했습니다."; // 재야로, 국가 무소속으로 $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 추방당하였습니다."; - $log[count($log)] = "$nation['name']에서 추방당하였습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$nation['name']}에서 추방당하였습니다."; + $log[count($log)] = "{$nation['name']}에서 추방당하였습니다."; // 재야로, 국가 무소속으로, 명성/공헌 N*10%감소 $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='{$general['no']}'"; @@ -155,7 +155,7 @@ if($btn == "추방") { $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에서 추방됨"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에서 추방됨"); pushGenLog($general, $log); pushAllLog($alllog); diff --git a/twe/d_ally.php b/twe/d_ally.php index 33a207cc..a36bc80b 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -68,13 +68,13 @@ if($ok == "수락") { } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { -// $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 불가침에 합의."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【불가침】$mynation['name'](이)가 $younation['name'](와)과 불가침 조약을 체결했습니다."; +// $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 불가침에 합의."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【불가침】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침 조약을 체결했습니다."; - $youlog[count($youlog)] = "$mynation['name'](와)과 $when년 불가침에 성공했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 $when년 불가침에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 {$when}년 불가침 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 {$when}년 불가침 수락"); + $youlog[count($youlog)] = "{$mynation['name']}(와)과 $when년 불가침에 성공했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 $when년 불가침에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 {$when}년 불가침 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 {$when}년 불가침 수락"); //국메로 저장 $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; @@ -98,8 +98,8 @@ if($ok == "수락") { $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 불가침을 거부했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 불가침을 거부했습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(이)가 불가침을 거부했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 불가침을 거부했습니다."; //조건 지움 $query = "update diplomacy set reserved='' where me='{$you['nation']}' and you='{$me['nation']}'"; diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 15870eae..96c77701 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -55,12 +55,12 @@ if($ok == "수락") { } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 파기 실패."; } else { - $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 조약 파기에 합의."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【파기】$mynation['name'](이)가 $younation['name'](와)과 불가침을 파기 하였습니다."; - $youlog[count($youlog)] = "$mynation['name'](와)과 파기에 성공했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 파기에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 파기 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 파기 수락"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 조약 파기에 합의."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【파기】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침을 파기 하였습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(와)과 파기에 성공했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 파기에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 파기 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 파기 수락"); //외교 변경 $query = "update diplomacy set state='2',term='0' where me='{$me['nation']}' and you='{$you['nation']}'"; @@ -80,8 +80,8 @@ if($ok == "수락") { $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 파기를 거부했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 파기를 거부했습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(이)가 파기를 거부했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 파기를 거부했습니다."; //현 메세지 지움 $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; diff --git a/twe/d_cease.php b/twe/d_cease.php index 3854af56..e1121a5e 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -55,12 +55,12 @@ if($ok == "수락") { } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 종전 합의 하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【종전】$mynation['name'](이)가 $younation['name'](와)과 종전 합의 하였습니다."; - $youlog[count($youlog)] = "$mynation['name'](와)과 종전에 성공했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 종전에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 종전 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 종전 수락"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 종전 합의 하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【종전】{$mynation['name']}(이)가 {$younation['name']}(와)과 종전 합의 하였습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(와)과 종전에 성공했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 종전에 합의했습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 종전 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 종전 수락"); //외교 변경 $query = "update diplomacy set state='2',term='0' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -85,8 +85,8 @@ if($ok == "수락") { $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 종전을 거부했습니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 종전을 거부했습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(이)가 종전을 거부했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 종전을 거부했습니다."; //현 메세지 지움 $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; diff --git a/twe/d_merge.php b/twe/d_merge.php index cd866785..c12f60ce 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -94,12 +94,12 @@ if($ok == "수락") { } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 통합에 동의했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합시도】$mynation['name'](와)과 $younation['name'](이)가 통합을 시도합니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 통합에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 통합에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 통합 시도"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 통합 시도"); + $youlog[count($youlog)] = "{$mynation['name']}(이)가 통합에 동의했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 통합을 시도합니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 통합에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 통합에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 통합 시도"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 통합 시도"); //외교 변경 $query = "update diplomacy set state='3',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -119,8 +119,8 @@ if($ok == "수락") { $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(으)로 항복을 거부했습니다."; //현 메세지 지움 $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; diff --git a/twe/d_scout.php b/twe/d_scout.php index b776bb18..fa89606d 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -22,11 +22,11 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $nation = MYDB_fetch_array($result); if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scout'] == 0 && $me['nation'] != $nation['nation'] && $admin['year'] >= $admin['startyear']+3 && strpos($me['nations'], ",{$nation['nation']},") === false) { - $youlog[count($youlog)] = "$me['name'] 등용에 성공했습니다."; - $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $nation['name'](으)로 망명하였습니다."; - $mylog[count($mylog)] = "$nation['name'](으)로 망명하여 수도로 이동합니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$me['name'] 등용에 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$nation['name'](으)로 망명"); + $youlog[count($youlog)] = "{$me['name']} 등용에 성공했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$nation['name']}(으)로 망명하였습니다."; + $mylog[count($mylog)] = "{$nation['name']}(으)로 망명하여 수도로 이동합니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$me['name']} 등용에 성공"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$nation['name']}(으)로 망명"); // 임관내역 추가 $me['nations'] .= "{$nation['nation']},"; @@ -145,8 +145,8 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$me['name'](이)가 등용을 거부했습니다."; - $mylog[count($mylog)] = "$nation['name'](으)로 망명을 거부했습니다."; + $youlog[count($youlog)] = "{$me['name']}(이)가 등용을 거부했습니다."; + $mylog[count($mylog)] = "{$nation['name']}(으)로 망명을 거부했습니다."; //현 메세지 지움 $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 거부',msg{$num}_type='10' where no='{$me['no']}'"; diff --git a/twe/d_surrender.php b/twe/d_surrender.php index 47865881..c6f27e20 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -84,12 +84,12 @@ if($ok == "수락") { } elseif($mynation['dipmsg'] == "") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 합병에 동의했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【합병시도】$mynation['name'](와)과 $younation['name'](이)가 합병을 시도합니다."; - $mylog[count($mylog)] = "$younation['name'](와)과 합병에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin['month']}월:$me['name'](이)가 $younation['name'](와)과 합병에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병 시도"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$younation['name'](와)과 합병 시도"); + $youlog[count($youlog)] = "{$mynation['name']}(이)가 합병에 동의했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【합병시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 합병을 시도합니다."; + $mylog[count($mylog)] = "{$younation['name']}(와)과 합병에 동의했습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 합병에 동의하였습니다."; + $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 합병 시도"); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 합병 시도"); //외교 변경 $query = "update diplomacy set state='5',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -109,8 +109,8 @@ if($ok == "수락") { $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $youlog[count($youlog)] = "$mynation['name'](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation['name'](으)로 항복을 거부했습니다."; + $youlog[count($youlog)] = "{$mynation['name']}(이)가 항복을 거부했습니다."; + $mylog[count($mylog)] = "{$younation['name']}(으)로 항복을 거부했습니다."; //현 메세지 지움 $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='{$me['nation']}'"; diff --git a/twe/func.php b/twe/func.php index a3bef4fd..641948a0 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2094,21 +2094,21 @@ function myNationInfo($connect) {
국 력$nation['power']{$nation['power']} 기술력 ";echo $me['nation']==0?"-":"$nation['tech']"; echo "
전 략$nation['tricklimit']{$nation['tricklimit']} 외 교$nation['surlimit']{$nation['surlimit']}
임 관$nation['scout']{$nation['scout']} 전 쟁$nation['war']{$nation['war']}
"; @@ -2692,9 +2692,9 @@ function generalInfo($connect, $no, $skin) { 0?" background={$weapImage}":""; echo ">  자금 - $general['gold'] + {$general['gold']} 군량 - $general['rice'] + {$general['rice']} 도구 $itemname @@ -2702,7 +2702,7 @@ function generalInfo($connect, $no, $skin) { 병종 $typename 병사 - $general['crew'] + {$general['crew']} 성격 ".getGenChar($general['personal'])." @@ -2719,11 +2719,11 @@ function generalInfo($connect, $no, $skin) {  {$general['explevel']}  ".bar(getLevelPer($general['experience'], $general['explevel']), $skin, 20)." 연령 - $general['age'] + {$general['age']} 수비 - $general['mode'] + {$general['mode']} 삭턴 $general['killturn'] 턴 실행 @@ -2731,7 +2731,7 @@ function generalInfo($connect, $no, $skin) { 부대 - $troop['name'] + {$troop['name']} 벌점 ".getConnect($general['connect'])." $general['connect']($general['con']) @@ -2804,9 +2804,9 @@ function generalInfo2($connect, $no, $skin) { 전투 - $general['warnum'] + {$general['warnum']} 계략 - $general['firenum'] + {$general['firenum']} 사관 $general['belong']년 @@ -2814,17 +2814,17 @@ function generalInfo2($connect, $no, $skin) { 승률 $general['winrate'] % 승리 - $general['killnum'] + {$general['killnum']} 패배 - $general['deathnum'] + {$general['deathnum']} 살상률 $general['killrate'] % 사살 - $general['killcrew'] + {$general['killcrew']} 피살 - $general['deathcrew'] + {$general['deathcrew']} @@ -3512,7 +3512,7 @@ function msgprint($connect, $msg, $name, $picture, $imgsvr, $when, $num, $type) $regen = MYDB_fetch_array($result); echo " - + "; } @@ -4126,7 +4126,7 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge'); addAge($connect); // 새해 알림 - $alllog[count($alllog)] = "◆{$admin['month']}월:$admin['year']년이 되었습니다."; + $alllog[count($alllog)] = "◆{$admin['month']}월:{$admin['year']}년이 되었습니다."; pushAllLog($alllog); } elseif($admin['month'] == 4) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); @@ -4501,7 +4501,7 @@ function preUpdateMonthly($connect) { $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【고립】$city['name'](이)가 보급이 끊겨 미지배 도시가 되었습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; } pushHistory($connect, $history); //민심30이하 공백지 처리 @@ -4844,26 +4844,26 @@ function checkMerge($connect) { $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation['name'](와)과 통합에 성공했습니다."; + $genlog[0] = "{$mynation['name']}(와)과 통합에 성공했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name']$you['makenation']로 통합에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$mynation['name']}{$you['makenation']}로 통합에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation['name'](와)과 통합에 성공했습니다."; + $genlog[0] = "{$younation['name']}(와)과 통합에 성공했습니다."; for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$younation['name']$you['makenation']로 통합에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$younation['name']}{$you['makenation']}로 통합에 성공"); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합】$mynation['name'](와)과 $younation['name'](이)가 $you['makenation'](으)로 통합하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 $you['makenation']에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$mynation['name']$you['makenation']로 통합"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합】{$mynation['name']}(와)과 {$younation['name']}(이)가 {$you['makenation']}(으)로 통합하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 {$you['makenation']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$mynation['name']}{$you['makenation']}로 통합"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } @@ -4955,26 +4955,26 @@ function checkSurrender($connect) { $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation['name'] 합병에 성공했습니다."; + $genlog[0] = "{$mynation['name']} 합병에 성공했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name'] 합병에 성공"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$mynation['name']} 합병에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation['name'](으)로 항복하여 수도로 이동합니다."; + $genlog[0] = "{$younation['name']}(으)로 항복하여 수도로 이동합니다."; for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:$mynation['name']$younation['name'](으)로 항복"); + $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$mynation['name']}{$younation['name']}(으)로 항복"); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【투항】$mynation['name'] (이)가 $younation['name'](으)로 항복하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 $younation['name']에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【투항】{$mynation['name']} (이)가 {$younation['name']}(으)로 항복하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 {$younation['name']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 합병"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } @@ -5075,22 +5075,22 @@ function updateNationState($connect) { switch($nationlevel) { case 7: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); break; case 6: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 등극"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극"); break; case 5: case 4: case 3: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); break; case 2: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】$nation['name']의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name']의 군주가 ".getNationLevel($nationlevel)."로 나서다"); + $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."로 나서다"); break; } @@ -5253,7 +5253,7 @@ function checkEmperior($connect) { $allcount = MYDB_num_rows($result); if($count == $allcount) { - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$nation['name'](이)가 전토를 통일"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}(이)가 전토를 통일"); $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5330,7 +5330,7 @@ function checkEmperior($connect) { } } - $log[0] = "●$admin['year']년 $admin['month']월: $nation['name'](이)가 전토를 통일하였습니다."; + $log[0] = "●$admin['year']년 $admin['month']월: {$nation['name']}(이)가 전토를 통일하였습니다."; $query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5389,7 +5389,7 @@ function checkEmperior($connect) { )"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통일】$nation['name'](이)가 전토를 통일하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【통일】{$nation['name']}(이)가 전토를 통일하였습니다."; pushHistory($connect, $history); //연감 월결산 @@ -5711,7 +5711,7 @@ function updateTurntime($connect, $no) { $query = "update general set user_id='$npcid',password='$pw',npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin['month']}월:$general[name2](이)가 $general['name']의 육체에서 유체이탈합니다!"; + $alllog[0] = "●{$admin['month']}월:$general[name2](이)가 {$general['name']}의 육체에서 유체이탈합니다!"; pushAllLog($alllog); if($admin['isUnited'] == 0) { @@ -5763,65 +5763,65 @@ function updateTurntime($connect, $no) { // 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견 switch(rand()%42) { - case 0: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 역병에 걸려 죽고 말았습니다."; break; - case 1: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 요절하고 말았습니다."; break; - case 2: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 거리에서 갑자기 객사하고 말았습니다."; break; - case 3: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; - case 4: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; - case 5: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; - case 6: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; - case 7: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; - case 8: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 수영을 하다 익사하고 말았습니다."; break; - case 9: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 황제를 모독하다가 처형당하고 말았습니다."; break; - case 10: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; - case 11: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; - case 12: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; - case 13: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 우울증에 걸려 자살하고 말았습니다."; break; - case 14: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; - case 15: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; - case 16: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; - case 17: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 누군가의 사주로 자객에게 암살당했습니다."; break; - case 18: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 바람난 배우자에게 독살당하고 말았습니다."; break; - case 19: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; - case 20: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 아무 이유 없이 죽고말았습니다."; break; - case 21: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; - case 22: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; - case 23: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; - case 24: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; - case 25: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; - case 26: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; - case 27: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; - case 28: $alllog[0] = "●{$admin['month']}월:운좋기로 소문난 $general['name'](이)가 불운하게도 죽고말았습니다."; break; - case 29: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 무리하게 단련을 하다가 죽고말았습니다."; break; - case 30: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 생활고를 비관하며 자살하고 말았습니다."; break; - case 31: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; - case 32: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 과식하다 배가 터져 죽고 말았습니다."; break; - case 33: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; - case 34: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; - case 35: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; - case 36: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; - case 37: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; - case 38: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; - case 39: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; - case 40: $alllog[0] = "●{$admin['month']}월:희대의 사기꾼 $general['name'](이)가 사망했습니다."; break; - case 41: $alllog[0] = "●{$admin['month']}월:희대의 호색한 $general['name'](이)가 사망했습니다."; break; - default: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사망했습니다."; break; + case 0: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 역병에 걸려 죽고 말았습니다."; break; + case 1: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 요절하고 말았습니다."; break; + case 2: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 거리에서 갑자기 객사하고 말았습니다."; break; + case 3: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; + case 4: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; + case 5: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; + case 6: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; + case 7: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; + case 8: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 수영을 하다 익사하고 말았습니다."; break; + case 9: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 황제를 모독하다가 처형당하고 말았습니다."; break; + case 10: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; + case 11: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; + case 12: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; + case 13: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 우울증에 걸려 자살하고 말았습니다."; break; + case 14: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; + case 15: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; + case 16: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; + case 17: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 누군가의 사주로 자객에게 암살당했습니다."; break; + case 18: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 바람난 배우자에게 독살당하고 말았습니다."; break; + case 19: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; + case 20: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 아무 이유 없이 죽고말았습니다."; break; + case 21: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; + case 22: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; + case 23: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; + case 24: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; + case 25: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; + case 26: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; + case 27: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; + case 28: $alllog[0] = "●{$admin['month']}월:운좋기로 소문난 {$general['name']}(이)가 불운하게도 죽고말았습니다."; break; + case 29: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 무리하게 단련을 하다가 죽고말았습니다."; break; + case 30: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 생활고를 비관하며 자살하고 말았습니다."; break; + case 31: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; + case 32: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 과식하다 배가 터져 죽고 말았습니다."; break; + case 33: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; + case 34: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; + case 35: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; + case 36: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; + case 37: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; + case 38: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; + case 39: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; + case 40: $alllog[0] = "●{$admin['month']}월:희대의 사기꾼 {$general['name']}(이)가 사망했습니다."; break; + case 41: $alllog[0] = "●{$admin['month']}월:희대의 호색한 {$general['name']}(이)가 사망했습니다."; break; + default: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 사망했습니다."; break; } // 엔피씨,엠피씨,의병 사망로그 if($general['npc'] == 2) { - $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 사망했습니다."; + $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 사망했습니다."; } elseif($general['npc'] >= 3) { switch(rand()%10) { - case 0: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 푸대접에 실망하여 떠났습니다."; break; - case 1: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 갑자기 화를 내며 떠났습니다."; break; - case 2: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 의견차이를 좁히지 못하고 떠났습니다."; break; - case 3: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 판단 착오였다며 떠났습니다."; break; - case 4: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 생활고가 나아지지 않는다며 떠났습니다."; break; - case 5: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 기대가 너무 컸다며 떠났습니다."; break; - case 6: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 아무 이유 없이 떠났습니다."; break; - case 7: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 자기 목적은 달성했다며 떠났습니다."; break; - case 8: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 자기가 없어도 될것 같다며 떠났습니다."; break; - case 9: $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 처자식이 그립다며 떠났습니다."; break; + case 0: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 푸대접에 실망하여 떠났습니다."; break; + case 1: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 갑자기 화를 내며 떠났습니다."; break; + case 2: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 의견차이를 좁히지 못하고 떠났습니다."; break; + case 3: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 판단 착오였다며 떠났습니다."; break; + case 4: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 생활고가 나아지지 않는다며 떠났습니다."; break; + case 5: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 기대가 너무 컸다며 떠났습니다."; break; + case 6: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 아무 이유 없이 떠났습니다."; break; + case 7: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 자기 목적은 달성했다며 떠났습니다."; break; + case 8: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 자기가 없어도 될것 같다며 떠났습니다."; break; + case 9: $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 처자식이 그립다며 떠났습니다."; break; } } @@ -5839,7 +5839,7 @@ function updateTurntime($connect, $no) { $query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin['month']}월:$general['name'](이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; + $alllog[0] = "●{$admin['month']}월:{$general['name']}(이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; pushAllLog($alllog); $log[0] = "●나이가 들어 은퇴하고 자손에게 자리를 물려줍니다."; @@ -6035,58 +6035,58 @@ function uniqueItem($connect, $general, $log, $vote=0) { switch($sel) { case 0: $log[count($log)] = "".getWeapName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getWeapName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } break; case 1: $log[count($log)] = "".getBookName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getBookName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } break; case 2: $log[count($log)] = "".getHorseName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getHorseName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } break; case 3: $log[count($log)] = "".getItemName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game['month']}월:$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getItemName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】$nation['name']$general['name'](이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } break; } @@ -6986,7 +6986,7 @@ function deleteNation($connect, $general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【멸망】$nation['name']은(는) 멸망했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【멸망】{$nation['name']}은(는) 멸망했습니다."; // 전 장수 재야로 // 전 장수 소속 무소속으로 $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'"; @@ -7066,10 +7066,10 @@ function nextRuler($connect, $general) { $query = "update city set gen3=0 where gen3='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【유지】$nextruler['name'](이)가 $nation['name']의 유지를 이어 받았습니다"; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받았습니다"; pushHistory($connect, $history); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:【유지】$nextruler['name'](이)가 $nation['name']의 유지를 이어 받음."); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받음."); // 장수 삭제 및 부대처리는 checkTurn에서 } diff --git a/twe/func_history.php b/twe/func_history.php index 3277eb85..69c1e645 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -109,7 +109,7 @@ function LogHistory($connect, $isFirst=0) { $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($cityresult); - $nationStr .= " $nation['name']
"; + $nationStr .= " {$nation['name']}
"; $powerStr .= "국력 $nation['power']
"; $genStr .= "장수 $nation['gennum']
"; $cityStr .= "속령 $citycount
"; diff --git a/twe/func_process.php b/twe/func_process.php index 5b81f404..bd055a6a 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -1140,25 +1140,25 @@ function process_16($connect, &$general) { } if($admin['year'] < $admin['startyear']+3) { - $log[count($log)] = "●{$admin['month']}월:현재 초반 제한중입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:현재 초반 제한중입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; // } elseif($city['supply'] == 0) { -// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name'](으)로 출병 실패. <1>$date"; +// $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif(!$valid) { - $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['crew'] <= 0) { - $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:병사가 없습니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['rice'] <= round($general['crew']/100)) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($dip['state'] != 0) { - $log[count($log)] = "●{$admin['month']}월:교전중인 국가가 아닙니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:교전중인 국가가 아닙니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['nation'] != $city['nation']) { - $log[count($log)] = "●{$admin['month']}월:본국에서만 출병가능합니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:본국에서만 출병가능합니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($nation['war'] == 1) { - $log[count($log)] = "●{$admin['month']}월:현재 전쟁 금지입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:현재 전쟁 금지입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:본국입니다. $destcity['name'](으)로 출병 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:본국입니다. {$destcity['name']}(으)로 출병 실패. <1>$date"; pushGenLog($general, $log); process_21($connect, $general); return; @@ -1248,11 +1248,11 @@ function process_21($connect, &$general) { } if(!$valid) { - $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. $destcity['name'](으)로 이동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:인접도시가 아닙니다. {$destcity['name']}(으)로 이동 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']) { - $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. $destcity['name'](으)로 이동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. {$destcity['name']}(으)로 이동 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 이동했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(으)로 이동했습니다. <1>$date"; $exp = 50; // 성격 보정 @@ -1275,7 +1275,7 @@ function process_21($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 이동했습니다."; + $genlog[0] = "●방랑군 세력이 {$destcity['name']}(으)로 이동했습니다."; for($j=0; $j < $gencount; $j++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); @@ -1323,7 +1323,7 @@ function process_22($connect, &$general) { } elseif($general['gold'] < $cost) { $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 등용 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$you['name']에게 등용 권유 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$you['name']}에게 등용 권유 서신을 보냈습니다. <1>$date"; $exp = 100; $ded = 200; @@ -1401,7 +1401,7 @@ function process_23($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. 포상 실패. <1>$date"; } else { $genlog[count($genlog)] = "●$dtype $amount을 포상으로 받았습니다."; - $log[count($log)] = "●{$admin['month']}월:$gen['name']에게 $dtype $amount을 수여했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$gen['name']}에게 $dtype $amount을 수여했습니다. <1>$date"; $exp = 1; $ded = 1; @@ -1504,7 +1504,7 @@ function process_24($connect, &$general) { } $genlog[count($genlog)] = "●$dtype {$amount}을 몰수 당했습니다."; - $log[count($log)] = "●{$admin['month']}월:$gen['name']에게서 $dtype $amount을 몰수했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$gen['name']}에게서 $dtype $amount을 몰수했습니다. <1>$date"; $exp = 1; $ded = 1; @@ -1593,19 +1593,19 @@ function process_25($connect, &$general) { } elseif($nation['nation'] == 0) { $log[count($log)] = "●{$admin['month']}월:없는 국가입니다. 임관 실패. <1>$date"; } elseif($nation['level'] == 0 && $gencount >= 10) { - $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 제한되고 있습니다. 임관 실패."; + $log[count($log)] = "●{$admin['month']}월:현재 {$nation['name']}은(는) 임관이 제한되고 있습니다. 임관 실패."; } elseif($admin['year'] < $admin['startyear']+3 && $gencount >= 10) { - $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 제한되고 있습니다. 임관 실패."; + $log[count($log)] = "●{$admin['month']}월:현재 {$nation['name']}은(는) 임관이 제한되고 있습니다. 임관 실패."; } elseif($nation['scout'] == 1 && $general['npc'] < 5) { - $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 임관이 금지되어 있습니다. 임관 실패."; + $log[count($log)] = "●{$admin['month']}월:현재 {$nation['name']}은(는) 임관이 금지되어 있습니다. 임관 실패."; } elseif($general['makelimit'] > 0 && $general['npc'] < 5) { $log[count($log)] = "●{$admin['month']}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; } elseif(strpos($general['nations'], ",{$nation['nation']},") > 0) { $log[count($log)] = "●{$admin['month']}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; } else { - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']임관했습니다."; - $log[count($log)] = "●{$admin['month']}월:$nation['name']에 임관했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에 임관"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$nation['name']}임관했습니다."; + $log[count($log)] = "●{$admin['month']}월:{$nation['name']}에 임관했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에 임관"); if($gencount < 10) { $exp = 700; } else { $exp = 100; } @@ -1676,7 +1676,7 @@ function process_26($connect, &$general) { } elseif($gencount == 0) { $log[count($log)] = "●{$admin['month']}월:집합 가능한 부대원이 없습니다. 집합 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$city['name']에서 집합을 실시했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$city['name']}에서 집합을 실시했습니다. <1>$date"; $exp = 70; $ded = 100; @@ -1685,7 +1685,7 @@ function process_26($connect, &$general) { $ded = CharDedication($ded, $general['personal']); //부대원에게 로그 전달 - $genlog[count($genlog)] = "$troop['name']의 부대원들은 $city['name'](으)로 집합되었습니다."; + $genlog[count($genlog)] = "{$troop['name']}의 부대원들은 {$city['name']}(으)로 집합되었습니다."; for($i=0; $i < $gencount; $i++) { $troopgen = MYDB_fetch_array($result); @@ -1740,22 +1740,22 @@ function process_27($connect, &$general) { if(!$you) { $log[count($log)] = "●{$admin['month']}월:없는 장수입니다. 발령 실패. <1>$date"; } elseif($general['no'] == $who) { - $log[count($log)] = "●{$admin['month']}월:자기 자신입니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자기 자신입니다. {$you['name']} 발령 실패. <1>$date"; } elseif($general['level'] < 5) { - $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:수뇌부가 아닙니다. {$you['name']} 발령 실패. <1>$date"; } elseif($city['nation'] != $general['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$you['name']} 발령 실패. <1>$date"; } elseif($destcity['supply'] == 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$you['name']} 발령 실패. <1>$date"; } elseif($city['supply'] == 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$you['name']} 발령 실패. <1>$date"; } elseif($destcity['nation'] != $general['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국 도시가 아닙니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국 도시가 아닙니다. {$you['name']} 발령 실패. <1>$date"; } elseif($general['nation'] != $you['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. $you['name'] 발령 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국 장수가 아닙니다. {$you['name']} 발령 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$you['name'](을)를 $destcity['name'](으)로 발령했습니다. <1>$date"; - $youlog[count($youlog)] = "$general['name']에 의해 $destcity['name'](으)로 발령됐습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$you['name']}(을)를 {$destcity['name']}(으)로 발령했습니다. <1>$date"; + $youlog[count($youlog)] = "{$general['name']}에 의해 {$destcity['name']}(으)로 발령됐습니다. <1>$date"; $exp = 1; $ded = 1; @@ -1814,7 +1814,7 @@ function process_28($connect, &$general) { $city = MYDB_fetch_array($result); } - $log[count($log)] = "●{$admin['month']}월:$city['name'](으)로 귀환했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$city['name']}(으)로 귀환했습니다. <1>$date"; $exp = 70; $ded = 100; @@ -1854,7 +1854,7 @@ function process_29($connect, &$general) { } elseif($nation['level'] <= 0) { $log[count($log)] = "●{$admin['month']}월:방랑군입니다. 인재탐색 실패. <1>$date"; } elseif($admin['year'] < $admin['startyear']+3 && $nation['gennum'] >= 10) { - $log[count($log)] = "●{$admin['month']}월:현재 $nation['name']은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; + $log[count($log)] = "●{$admin['month']}월:현재 {$nation['name']}은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; } elseif($general['gold'] < $admin['develcost']) { $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; } else { @@ -1917,7 +1917,7 @@ function process_29($connect, &$general) { } $log[count($log)] = "●{$admin['month']}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$name(이)라는 인재를 {$scoutType}"); $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='{$general['nation']}'"; @@ -2114,11 +2114,11 @@ function process_30($connect, &$general) { $cost = $admin['develcost'] * 5; if($dist[$destination] > 3) { - $log[count($log)] = "●{$admin['month']}월:거리가 멉니다. $destcity['name'](으)로 강행 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:거리가 멉니다. {$destcity['name']}(으)로 강행 실패. <1>$date"; } elseif($general['gold'] < $cost) { - $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. $destcity['name'](으)로 강행 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 부족합니다. {$destcity['name']}(으)로 강행 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 강행했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(으)로 강행했습니다. <1>$date"; $exp = 100; // 성격 보정 @@ -2141,7 +2141,7 @@ function process_30($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and level<'12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity['name'](으)로 강행했습니다."; + $genlog[0] = "●방랑군 세력이 {$destcity['name']}(으)로 강행했습니다."; for($j=0; $j < $gencount; $j++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); @@ -2172,13 +2172,13 @@ function process_31($connect, &$general) { if(!$city) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 첩보 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*3) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $city['name']에 첩보 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$city['name']}에 첩보 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*3) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $city['name']에 첩보 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$city['name']}에 첩보 실패. <1>$date"; } elseif($general['nation'] == $city['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $city['name']에 첩보 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$city['name']}에 첩보 실패. <1>$date"; // } elseif($dist[$destination] > 3) { -// $log[count($log)] = "●{$admin['month']}월:너무 멉니다. $city['name']에 첩보 실패. <1>$date"; +// $log[count($log)] = "●{$admin['month']}월:너무 멉니다. {$city['name']}에 첩보 실패. <1>$date"; } else { $query = "select crew,crewtype from general where city='$destination' and nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2189,17 +2189,17 @@ function process_31($connect, &$general) { if($gen['crew'] != 0) { $typecount[$gen['crewtype']]++; $crew += $gen['crew']; } } if($dist[$destination] > 2) { - $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin['month']}월:$city['name']의 소문만 들을 수 있었습니다. <1>$date"; - $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 소문만 들을 수 있었습니다. <1>$date"; + $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; } elseif($dist[$destination] == 2) { - $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin['month']}월:$city['name']의 어느정도 정보를 얻었습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 어느정도 정보를 얻었습니다. <1>$date"; $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; - $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; } else { - $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $city['name'](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin['month']}월:$city['name']의 많은 정보를 얻었습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; + $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 많은 정보를 얻었습니다. <1>$date"; $msg[count($msg)] = "【병종】"; for($i=0; $i <= 5; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } for($i=10; $i <= 14; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } @@ -2212,7 +2212,7 @@ function process_31($connect, &$general) { $log[count($log)] = "{$msg[$i-8]} {$msg[$i-7]} {$msg[$i-6]} {$msg[$i-5]} {$msg[$i-4]} {$msg[$i-3]} {$msg[$i-2]} {$msg[$i-1]}"; } $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; - $log[count($log)] = "【$city['name']】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; if($general['nation'] != 0 && $city['nation'] != 0) { $query = "select name,tech from nation where nation='{$city['nation']}'"; @@ -2224,11 +2224,11 @@ function process_31($connect, &$general) { $myTech = MYDB_fetch_array($result); $diff = $yourTech['tech'] - $myTech['tech']; // 차이 - if($diff >= 1000) { $log[count($log)] = "【$yourTech['name']】아국대비기술:↑압도"; } - elseif($diff >= 250) { $log[count($log)] = "【$yourTech['name']】아국대비기술:▲우위"; } - elseif($diff >= -250) { $log[count($log)] = "【$yourTech['name']】아국대비기술:↕대등"; } - elseif($diff >= -1000) { $log[count($log)] = "【$yourTech['name']】아국대비기술:▼열위"; } - else { $log[count($log)] = "【$yourTech['name']】아국대비기술:↓미미"; } + if($diff >= 1000) { $log[count($log)] = "【{$yourTech['name']}】아국대비기술:↑압도"; } + elseif($diff >= 250) { $log[count($log)] = "【{$yourTech['name']}】아국대비기술:▲우위"; } + elseif($diff >= -250) { $log[count($log)] = "【{$yourTech['name']}】아국대비기술:↕대등"; } + elseif($diff >= -1000) { $log[count($log)] = "【{$yourTech['name']}】아국대비기술:▼열위"; } + else { $log[count($log)] = "【{$yourTech['name']}】아국대비기술:↓미미"; } } } @@ -2303,21 +2303,21 @@ function process_32($connect, &$general) { if(!$destcity) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 화계 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($general['nation'] != $city['nation'] && $nation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($city['supply'] == 0 && $nation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($destcity['nation'] == 0) { - $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:공백지입니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$destcity['name']}에 화계 실패. <1>$date"; } elseif($dip['state'] >= 7) { - $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 화계 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. {$destcity['name']}에 화계 실패. <1>$date"; } else { $query = "select intel,book from general where city='$destination' and nation='{$destcity['nation']}' order by intel desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2356,8 +2356,8 @@ function process_32($connect, &$general) { $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name'](이)가 불타고 있습니다."; - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 화계가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$destcity['name']}(이)가 불타고 있습니다."; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 화계가 성공했습니다. <1>$date"; $destcity['agri'] -= rand() % $_firingpower + $_firingbase; $destcity['comm'] -= rand() % $_firingpower + $_firingbase; @@ -2372,7 +2372,7 @@ function process_32($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 화계가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 화계가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } @@ -2431,21 +2431,21 @@ function process_33($connect, &$general) { if(!$destcity) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 탈취 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($city['supply'] == 0 && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($destcity['nation'] == 0) { - $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:공백지입니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$destcity['name']}에 탈취 실패. <1>$date"; } elseif($dip['state'] >= 7) { - $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 탈취 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. {$destcity['name']}에 탈취 실패. <1>$date"; } else { $query = "select power,weap from general where city='$destination' and nation='{$destcity['nation']}' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2484,8 +2484,8 @@ function process_33($connect, &$general) { $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name']에서 금과 쌀을 도둑맞았습니다."; - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 탈취가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$destcity['name']}에서 금과 쌀을 도둑맞았습니다."; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 탈취가 성공했습니다. <1>$date"; // 탈취 최대 400 * 8 $gold = (rand() % $_firingpower + $_firingbase) * $destcity['level']; @@ -2522,7 +2522,7 @@ function process_33($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 탈취가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 탈취가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } @@ -2574,21 +2574,21 @@ function process_34($connect, &$general) { if(!$destcity) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 파괴 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($city['supply'] == 0 && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($destcity['nation'] == 0) { - $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:공백지입니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$destcity['name']}에 파괴 실패. <1>$date"; } elseif($dip['state'] >= 7) { - $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 파괴 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. {$destcity['name']}에 파괴 실패. <1>$date"; } else { $query = "select power,weap from general where city='$destination' and nation='{$destcity['nation']}' order by power desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2627,8 +2627,8 @@ function process_34($connect, &$general) { $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 $destcity['name']의 성벽을 허물었습니다."; - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 파괴가 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$destcity['name']}의 성벽을 허물었습니다."; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 파괴가 성공했습니다. <1>$date"; // 파괴 $destcity['def'] -= rand() % $_firingpower + $_firingbase; @@ -2644,7 +2644,7 @@ function process_34($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 파괴가 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 파괴가 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } @@ -2704,21 +2704,21 @@ function process_35($connect, &$general) { if(!$destcity) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 선동 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($city['supply'] == 0 && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($destcity['nation'] == 0) { - $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:공백지입니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$destcity['name']}에 선동 실패. <1>$date"; } elseif($dip['state'] >= 7) { - $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 선동 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. {$destcity['name']}에 선동 실패. <1>$date"; } else { $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='{$destcity['nation']}' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2757,8 +2757,8 @@ function process_35($connect, &$general) { $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name']의 백성들이 동요하고 있습니다."; - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 선동이 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$destcity['name']}의 백성들이 동요하고 있습니다."; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 선동이 성공했습니다. <1>$date"; // 선동 최대 10 $destcity['secu'] -= rand() % round($_firingpower/2) + $_firingbase; @@ -2774,7 +2774,7 @@ function process_35($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 선동이 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 선동이 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } @@ -2834,21 +2834,21 @@ function process_36($connect, &$general) { if(!$destcity) { $log[count($log)] = "●{$admin['month']}월:없는 도시입니다. 기습 실패. <1>$date"; } elseif($general['level'] == 0) { - $log[count($log)] = "●{$admin['month']}월:재야입니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:재야입니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($general['nation'] != $city['nation'] && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국이 아닙니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($city['supply'] == 0 && $mynation['level'] != 0) { - $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($destcity['nation'] == 0) { - $log[count($log)] = "●{$admin['month']}월:공백지입니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:공백지입니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($general['rice'] < $admin['develcost']*5) { - $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:군량이 모자랍니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($general['nation'] == $destcity['nation']) { - $log[count($log)] = "●{$admin['month']}월:아국입니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:아국입니다. {$destcity['name']}에 기습 실패. <1>$date"; } elseif($dip['state'] >= 7) { - $log[count($log)] = "●{$admin['month']}월:불가침국입니다. $destcity['name']에 기습 실패. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:불가침국입니다. {$destcity['name']}에 기습 실패. <1>$date"; } else { $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='{$destcity['nation']}' order by sum desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2887,8 +2887,8 @@ function process_36($connect, &$general) { $ratio /= $dist[$destination]; if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin['month']}월:$destcity['name'](이)가 누군가에게 공격 받았습니다."; - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 기습이 성공했습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$destcity['name']}(이)가 누군가에게 공격 받았습니다."; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 기습이 성공했습니다. <1>$date"; // 기습 $destcity['agri'] -= rand() % round($_firingpower/2) + $_firingbase; @@ -2912,7 +2912,7 @@ function process_36($connect, &$general) { $exp = rand() % 100 + 201; $ded = rand() % 70 + 141; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name']에 기습이 실패했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}에 기습이 실패했습니다. <1>$date"; $exp = rand() % 100 + 1; $ded = rand() % 70 + 1; } @@ -3257,8 +3257,8 @@ function process_43($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 증여 실패. <1>$date"; } else { - $genlog[count($genlog)] = "●{$admin['month']}월:$general['name']에게서 $dtype $amount을 증여 받았습니다."; - $log[count($log)] = "●{$admin['month']}월:$gen['name']에게 $dtype $amount을 증여했습니다. <1>$date"; + $genlog[count($genlog)] = "●{$admin['month']}월:{$general['name']}에게서 $dtype $amount을 증여 받았습니다."; + $log[count($log)] = "●{$admin['month']}월:{$gen['name']}에게 $dtype $amount을 증여했습니다. <1>$date"; if($what == 1) { $gen['gold'] += $amount; @@ -3341,7 +3341,7 @@ function process_44($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 증여 실패. <1>$date"; } else { -// $alllog[count($alllog)] = "●{$admin['month']}월:$nation['name']에서 장수들이 재산을 헌납 하고 있습니다."; +// $alllog[count($alllog)] = "●{$admin['month']}월:{$nation['name']}에서 장수들이 재산을 헌납 하고 있습니다."; $log[count($log)] = "●{$admin['month']}월: $dtype $amount을 헌납했습니다. <1>$date"; if($what == 1) { @@ -3425,25 +3425,25 @@ function process_45($connect, &$general) { } if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 통합에 반대하며 $nation['name'](을)를 떠났습니다."; - $log[count($log)] = "●{$admin['month']}월:통합에 반대하며 $nation['name']에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:통합에 반대하며 $nation['name'](을)를 떠남"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 통합에 반대하며 {$nation['name']}(을)를 떠났습니다."; + $log[count($log)] = "●{$admin['month']}월:통합에 반대하며 {$nation['name']}에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:통합에 반대하며 {$nation['name']}(을)를 떠남"); // 국적 바꾸고 등급 재야로 $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 합병에 반대하며 $nation['name'](을)를 떠났습니다."; - $log[count($log)] = "●{$admin['month']}월:합병에 반대하며 $nation['name']에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:합병에 반대하며 $nation['name'](을)를 떠남"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 합병에 반대하며 {$nation['name']}(을)를 떠났습니다."; + $log[count($log)] = "●{$admin['month']}월:합병에 반대하며 {$nation['name']}에서 떠났습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:합병에 반대하며 {$nation['name']}(을)를 떠남"); // 국적 바꾸고 등급 재야로 $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $nation['name']에서 하야했습니다."; - $log[count($log)] = "●{$admin['month']}월:$nation['name']에서 하야했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']에서 하야"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$nation['name']}에서 하야했습니다."; + $log[count($log)] = "●{$admin['month']}월:{$nation['name']}에서 하야했습니다. <1>$date"; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에서 하야"); // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; @@ -3547,11 +3547,11 @@ function process_46($connect, &$general) { $query = "update city set nation='{$nation['nation']}',conflict='',conflict2='' where city='{$general['city']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "●{$admin['month']}월:$nation['name'](을)를 건국하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $city['name']에 국가를 건설하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【건국】".getNationType($type)." $nation['name'](이)가 새로이 등장하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 건국"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $nation['name'](을)를 건국"); + $log[count($log)] = "●{$admin['month']}월:{$nation['name']}(을)를 건국하였습니다. <1>$date"; + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$city['name']}에 국가를 건설하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【건국】".getNationType($type)." {$nation['name']}(이)가 새로이 등장하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 건국"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$nation['name']}(을)를 건국"); $exp = 1000; $ded = 1000; @@ -3599,10 +3599,10 @@ function process_47($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:이미 방랑군입니다. 방랑 실패."; } else { $log[count($log)] = "●{$admin['month']}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 방랑의 길을 떠납니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 버리고 방랑"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 방랑의 길을 떠납니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 버리고 방랑"); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【방랑】$general['name']은(는) 방랑의 길을 떠납니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【방랑】{$general['name']}은(는) 방랑의 길을 떠납니다."; //분쟁기록 모두 지움 DeleteConflict($connect, $general['nation']); @@ -3918,7 +3918,7 @@ function process_51($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 권고 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 항복 권고 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}으로 항복 권고 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; @@ -4018,12 +4018,12 @@ function process_52($connect, &$general) { for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - $genlog[0] = "$younation['name'](으)로 금$gold 쌀$rice을 지원했습니다."; + $genlog[0] = "{$younation['name']}(으)로 금$gold 쌀$rice을 지원했습니다."; pushGenLog($gen, $genlog); } - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$younation['name'](으)로 금$gold 쌀$rice을 지원"); - $mynation = addNationHistory($connect, $mynation, "●{$admin['year']}년 {$admin['month']}월:$younation['name'](으)로 금$gold 쌀$rice을 지원"); - $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:$mynation['name'](으)로부터 금$gold 쌀$rice을 지원 받음"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$younation['name']}(으)로 금$gold 쌀$rice을 지원"); + $mynation = addNationHistory($connect, $mynation, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(으)로 금$gold 쌀$rice을 지원"); + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(으)로부터 금$gold 쌀$rice을 지원 받음"); //상대국 수뇌부에게 로그 전달 $query = "select no,name,nation from general where nation='$which' and level>='9'"; @@ -4032,12 +4032,12 @@ function process_52($connect, &$general) { for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); - $genlog[0] = "$mynation['name']에서 금$gold 쌀$rice을 원조 했습니다."; + $genlog[0] = "{$mynation['name']}에서 금$gold 쌀$rice을 원조 했습니다."; pushGenLog($gen, $genlog); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【원조】$mynation['name']에서 $younation['name'](으)로 물자를 지원합니다."; - $log[count($log)] = "●{$admin['month']}월:$younation['name'](으)로 물자를 지원합니다. <1>$date"; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【원조】{$mynation['name']}에서 {$younation['name']}(으)로 물자를 지원합니다."; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}(으)로 물자를 지원합니다. <1>$date"; $exp = 5; $ded = 5; @@ -4087,7 +4087,7 @@ function process_53($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name'](으)로 통합 제의 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}(으)로 통합 제의 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; @@ -4164,13 +4164,13 @@ function process_54($connect, &$general) { $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【선양】$general['name'](이)가 $nation['name']의 군주 자리를 $nextruler['name']에게 선양했습니다."; - $log[count($log)] = "●{$admin['month']}월:$nextruler['name']에게 군주의 자리를 물려줍니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin['month']}월:$general['name']에게서 군주의 자리를 물려받습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【선양】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 {$nextruler['name']}에게 선양했습니다."; + $log[count($log)] = "●{$admin['month']}월:{$nextruler['name']}에게 군주의 자리를 물려줍니다. <1>$date"; + $youlog[count($youlog)] = "●{$admin['month']}월:{$general['name']}에게서 군주의 자리를 물려받습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name']의 군주자리를 $nextruler['name']에게 선양"); - $nextruler = addHistory($connect, $nextruler, "●$admin['year']년 $admin['month']월:$nation['name']의 군주자리를 물려 받음"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $nextruler['name']에게 선양"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주자리를 {$nextruler['name']}에게 선양"); + $nextruler = addHistory($connect, $nextruler, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주자리를 물려 받음"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$nextruler['name']}에게 선양"); } pushGenLog($general, $log); pushGenLog($nextruler, $youlog); @@ -4224,10 +4224,10 @@ function process_55($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "●{$admin['month']}월:거병에 성공하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $city['name']에서 거병하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【거병】$general['name'](이)가 세력을 결성하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$city['name']에서 거병"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $city['name']에서 거병"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$city['name']}에서 거병하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【거병】{$general['name']}(이)가 세력을 결성하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$city['name']}에서 거병"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$city['name']}에서 거병"); // 외교테이블 추가 $query = "select nation from nation where nation!='{$nation['nation']}'"; @@ -4268,8 +4268,8 @@ function process_56($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:방랑군이 아닙니다. <1>$date"; } else { $log[count($log)] = "●{$admin['month']}월:세력을 해산했습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 세력을 해산했습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$nation['name'](을)를 해산"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 세력을 해산했습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 해산"); $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4342,13 +4342,13 @@ function process_57($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "●{$admin['month']}월:모반에 성공했습니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin['month']}월:$general['name']에게서 군주의 자리를 뺏겼습니다."; - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 모반에 성공했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【모반】$general['name'](이)가 $nation['name']의 군주 자리를 찬탈했습니다."; + $youlog[count($youlog)] = "●{$admin['month']}월:{$general['name']}에게서 군주의 자리를 뺏겼습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 모반에 성공했습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【모반】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 찬탈했습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:모반으로 $nation['name']의 군주자리를 찬탈"); - $ruler = addHistory($connect, $ruler, "●$admin['year']년 $admin['month']월:$general['name']의 모반으로 인해 $nation['name']의 군주자리를 박탈당함"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $ruler['name']에게서 군주자리를 찬탈"); + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:모반으로 {$nation['name']}의 군주자리를 찬탈"); + $ruler = addHistory($connect, $ruler, "●$admin['year']년 $admin['month']월:{$general['name']}의 모반으로 인해 {$nation['name']}의 군주자리를 박탈당함"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$ruler['name']}에게서 군주자리를 찬탈"); } pushGenLog($general, $log); pushGenLog($ruler, $youlog); @@ -4394,7 +4394,7 @@ function process_61($connect, &$general) { // } elseif($nation['gold']-$_basegold < $admin['develcost'] || $nation['rice']-$_baserice < $admin['develcost']) { // $log[count($log)] = "●{$admin['month']}월:증정할 물자가 부족합니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 불가침 제의 서신을 보냈습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}으로 불가침 제의 서신을 보냈습니다.<1>$date"; $exp = 5; $ded = 5; @@ -4495,7 +4495,7 @@ function process_62($connect, &$general) { } elseif($admin['year'] <= $admin['startyear']) { $log[count($log)] = "●{$admin['month']}월:초반제한 해제 2년전부터 가능합니다. 선포 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 선전 포고 했습니다.<1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}으로 선전 포고 했습니다.<1>$date"; $exp = 5; $ded = 5; @@ -4503,11 +4503,11 @@ function process_62($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $younation['name']선전 포고 하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【선포】$nation['name'](이)가 $younation['name']에 선전 포고 하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$younation['name']에 선전 포고"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $younation['name']에 선전 포고"); - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 선전 포고"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$younation['name']}선전 포고 하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【선포】{$nation['name']}(이)가 {$younation['name']}에 선전 포고 하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$younation['name']}에 선전 포고"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$younation['name']}에 선전 포고"); + $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 선전 포고"); //외교 변경 $query = "update diplomacy set state='1',term='24' where me='{$nation['nation']}' and you='{$younation['nation']}'"; @@ -4562,7 +4562,7 @@ function process_63($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 종전 제의 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}으로 종전 제의 서신을 보냈습니다. <1>$date"; $exp = 5; $ded = 5; @@ -4624,7 +4624,7 @@ function process_64($connect, &$general) { } elseif($city['supply'] == 0) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. 제의 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$younation['name']으로 파기 제의 서신을 보냈습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$younation['name']}으로 파기 제의 서신을 보냈습니다. <1>$date"; $exp = 5; $ded = 5; @@ -4703,7 +4703,7 @@ function process_65($connect, &$general) { } elseif($nation['surlimit'] > 0) { $log[count($log)] = "●{$admin['month']}월:제한 턴이 있습니다. 초토화 실패. <1>$date"; } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 초토화했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(을)를 초토화했습니다. <1>$date"; $exp = 5; $ded = 5; @@ -4711,10 +4711,10 @@ function process_65($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']초토화를 명령하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【초토화】$nation['name'](이)가 $destcity['name'](을)를 초토화하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']초토화를 명령"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name']초토화를 명령"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}초토화를 명령하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【초토화】{$nation['name']}(이)가 {$destcity['name']}(을)를 초토화하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}초토화를 명령"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}초토화를 명령"); //외교제한 24 $amount = round($destcity['pop'] * 0.1); @@ -4799,7 +4799,7 @@ function process_66($connect, &$general) { $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](으)로 천도했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(으)로 천도했습니다. <1>$date"; $exp = 15; $ded = 15; @@ -4807,10 +4807,10 @@ function process_66($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](으)로 천도를 명령하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【천도】$nation['name'](이)가 $destcity['name'](으)로 천도하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](으)로 천도 명령"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](으)로 천도 명령"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(으)로 천도를 명령하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【천도】{$nation['name']}(이)가 {$destcity['name']}(으)로 천도하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(으)로 천도 명령"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(으)로 천도 명령"); //수도 변경 $query = "update nation set l{$general['level']}term='0',capital='{$destcity['city']}',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; @@ -4881,7 +4881,7 @@ function process_67($connect, &$general) { $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 증축했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(을)를 증축했습니다. <1>$date"; $exp = 5 * 6; $ded = 5 * 6; @@ -4889,10 +4889,10 @@ function process_67($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](을)를 증축하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【증축】$nation['name'](이)가 $destcity['name'](을)를 증축하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](을)를 증축"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 증축"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 증축하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【증축】{$nation['name']}(이)가 {$destcity['name']}(을)를 증축하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(을)를 증축"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(을)를 증축"); //물자 감소 $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; @@ -4969,7 +4969,7 @@ function process_68($connect, &$general) { $query = "update nation set l{$general['level']}term={$code} where nation='{$general['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $log[count($log)] = "●{$admin['month']}월:$destcity['name'](을)를 감축했습니다. <1>$date"; + $log[count($log)] = "●{$admin['month']}월:{$destcity['name']}(을)를 감축했습니다. <1>$date"; $exp = 5 * 6; $ded = 5 * 6; @@ -4977,10 +4977,10 @@ function process_68($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name'](을)를 감축하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【감축】$nation['name'](이)가 $destcity['name'](을)를 감축하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name'](을)를 감축"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name'](을)를 감축"); + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 감축하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【감축】{$nation['name']}(이)가 {$destcity['name']}(을)를 감축하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(을)를 감축"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(을)를 감축"); //물자 증가 $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='{$general['nation']}'"; @@ -5077,17 +5077,17 @@ function process_71($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 필사즉생(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 필사즉생(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 필사즉생(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 필사즉생(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 필사즉생(을)를 발동하였습니다."; +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 필사즉생(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:필사즉생(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 필사즉생(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 필사즉생(을)를 발동"); //전장수 훈사100 $query = "update general set atmos=100,train=100 where nation='{$general['nation']}'"; @@ -5186,17 +5186,17 @@ function process_72($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']백성동원(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']백성동원(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destcity['name']백성동원(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}백성동원(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동"); //도시 성수 80% $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='{$destcity['city']}'"; @@ -5301,7 +5301,7 @@ function process_73($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); @@ -5310,18 +5310,18 @@ function process_73($connect, &$general) { $query = "select no,name from general where nation='{$destcity['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$destcity['name']수몰이 발동되었습니다."; + $alllog[0] = "{$destcity['name']}수몰이 발동되었습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']수몰(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']수몰(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']$destcity['name']수몰(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']수몰(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}수몰(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}수몰(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}수몰(을)를 발동"); //도시 성수 80% 감소 $query = "update city set def=def*0.2,wall=wall*0.2 where city='{$destcity['city']}'"; @@ -5426,18 +5426,18 @@ function process_74($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destcity['name']허보(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destcity['name']허보(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']$destcity['name']허보(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국의 $destcity['name']허보(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}허보(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}허보(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}허보(을)를 발동"); //상대국 도시 전부 검색 $query = "select city from city where nation='{$destcity['nation']}' and supply=1"; @@ -5557,7 +5557,7 @@ function process_75($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); @@ -5572,12 +5572,12 @@ function process_75($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']피장파장(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']피장파장(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']피장파장(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 피장파장(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}피장파장(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 피장파장(을)를 발동"); //전략기한+60 $query = "update nation set tricklimit=tricklimit+60 where nation='{$destnation['nation']}'"; @@ -5664,17 +5664,17 @@ function process_76($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 의병모집(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 의병모집(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 의병모집(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 의병모집(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 의병모집(을)를 발동하였습니다."; +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 의병모집(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:의병모집(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 의병모집(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 의병모집(을)를 발동"); $query = "select avg(gennum) as gennum from nation"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5890,7 +5890,7 @@ function process_77($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); @@ -5905,12 +5905,12 @@ function process_77($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']이호경식(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']이호경식(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']이호경식(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 이호경식(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}이호경식(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 이호경식(을)를 발동"); //선포+3개월 if($dip['state'] == 0) { @@ -6014,7 +6014,7 @@ function process_78($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $alllog[0] = "$general['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; + $alllog[0] = "{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $alllog); @@ -6029,12 +6029,12 @@ function process_78($connect, &$general) { pushGenLog($gen, $alllog); } -// $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】$nation['name'](이)가 $destnation['name']급습(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$destnation['name']급습(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 $destnation['name']급습(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:$nation['name']$general['name'](이)가 아국에 급습(을)를 발동"); +// $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; +// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}급습(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 급습(을)를 발동"); //선포-3개월 $query = "update diplomacy set term=term-3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')"; @@ -6098,16 +6098,16 @@ function process_81($connect, &$general) { $query = "select no,name from general where nation='{$general['nation']}' and no!='{$general['no']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $cnt = MYDB_num_rows($result); - $genlog[0] = "$general['name'](이)가 국기를 변경합니다."; + $genlog[0] = "{$general['name']}(이)가 국기를 변경합니다."; for($i=0; $i < $cnt; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); } - $alllog[count($alllog)] = "●{$admin['month']}월:$general['name'](이)가 국기를 변경하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【국기변경】$nation['name'](이)가 국기를 변경하였습니다."; + $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 국기를 변경하였습니다."; + $history[count($history)] = "●$admin['year']년 $admin['month']월:【국기변경】{$nation['name']}(이)가 국기를 변경하였습니다."; $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:국기를 변경"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:$general['name'](이)가 국기를 변경"); + $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 국기를 변경"); //국기변경 $query = "update nation set color='$color',colset=colset-1 where nation='{$nation['nation']}'"; diff --git a/twe/join.php b/twe/join.php index 99ee790a..81d435a3 100644 --- a/twe/join.php +++ b/twe/join.php @@ -135,10 +135,10 @@ for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); if($nation['scoutmsg'] == "") { echo " -
"; + "; } else { echo " - "; + "; } } ?> diff --git a/twe/join_post.php b/twe/join_post.php index 6d5ce9a2..974d6cc2 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -239,15 +239,15 @@ if($id_num) { } $cityname = getCity($connect, $city, "name"); if($genius == 1) { - $log[0] = "●{$admin['month']}월:$cityname['name']에서 $me['name'](이)라는 기재가 천하에 이름을 알립니다."; + $log[0] = "●{$admin['month']}월:{$cityname['name']}에서 {$me['name']}(이)라는 기재가 천하에 이름을 알립니다."; $log[1] = "●{$admin['month']}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; - $history[0] = "●$admin['year']년 $admin['month']월:【천재】$cityname['name']에 천재가 등장했습니다."; + $history[0] = "●$admin['year']년 $admin['month']월:【천재】{$cityname['name']}에 천재가 등장했습니다."; pushHistory($connect, $history); } else { - $log[0] = "●{$admin['month']}월:$cityname['name']에서 $me['name'](이)라는 호걸이 천하에 이름을 알립니다."; + $log[0] = "●{$admin['month']}월:{$cityname['name']}에서 {$me['name']}(이)라는 호걸이 천하에 이름을 알립니다."; } - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$me['name'], $cityname['name']에서 큰 뜻을 품다."); + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$me['name']}, {$cityname['name']}에서 큰 뜻을 품다."); $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; diff --git a/twe/process_war.php b/twe/process_war.php index 02f3226a..a701aed4 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -85,9 +85,9 @@ function processWar($connect, $general, $city) { if($originCity['level'] == 2) { $genAtmosBonus += 5; } // 출병도시가 진이면 공격자 공격보정 if($city['level'] == 3) { $oppTrainBonus += 5; } // 방어도시가 관이면 방어자 방어보정 - $alllog[count($alllog)] = "●{$game['month']}월:$nation['name']$general['name'](이)가 $city['name'](으)로 진격합니다."; - $log[count($log)] = "●{$game['month']}월:$city['name'](으)로 진격합니다. <1>$date"; -// $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【전투】$nation['name'](이)가 $destnation['name']$city['name'](으)로 진격합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$nation['name']}{$general['name']}(이)가 {$city['name']}(으)로 진격합니다."; + $log[count($log)] = "●{$game['month']}월:{$city['name']}(으)로 진격합니다. <1>$date"; +// $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【전투】{$nation['name']}(이)가 {$destnation['name']}{$city['name']}(으)로 진격합니다."; // 목표 도시내에 목표 국가 소속 장수 중, 병사가 있는 능력치합+병사수 순으로 훈,사 60, 80 이상 $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='{$city['city']}' and nation='{$city['nation']}' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; @@ -106,8 +106,8 @@ function processWar($connect, $general, $city) { $query = "update general set recwar='{$general['turntime']}',train='{$general['train']}',warnum=warnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[count($alllog)] = "●{$game['month']}월:병량 부족으로 $city['name']의 수비병들이 패퇴합니다."; - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【패퇴】$destnation['name'](이)가 병량 부족으로 $city['name'](을)를 뺏기고 말았습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:병량 부족으로 {$city['name']}의 수비병들이 패퇴합니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【패퇴】{$destnation['name']}(이)가 병량 부족으로 {$city['name']}(을)를 뺏기고 말았습니다."; pushGenLog($general, $log); pushAllLog($alllog); pushHistory($connect, $history); @@ -129,7 +129,7 @@ function processWar($connect, $general, $city) { break; // 장수가 없어서 도시 공격 } elseif($opposecount == 0) { - $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 ".getTypename($general['crewtype'])."(으)로 성벽을 공격합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}(이)가 ".getTypename($general['crewtype'])."(으)로 성벽을 공격합니다."; $log[count($log)] = "●".getTypename($general['crewtype'])."(으)로 성벽을 공격합니다."; $general['train'] += 1; //훈련 상승 @@ -465,14 +465,14 @@ function processWar($connect, $general, $city) { break; // 공격 장수 병사 소진시 실패 처리 } elseif($general['crew'] <= 0) { - $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●퇴각했습니다."; $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } elseif($myRice <= round($general['crew']/100)) { - $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●군량 부족으로 퇴각합니다."; $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; @@ -482,9 +482,9 @@ function processWar($connect, $general, $city) { // 장수 대결 } else { $oppose = MYDB_fetch_array($result); - $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(와)과 $oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 대결합니다."; - $log[count($log)] = "●".getTypename($general['crewtype'])."(으)로 $oppose['name']의 ".getTypename($oppose['crewtype'])."(을)를 공격합니다."; - $opplog[count($opplog)] = "●".getTypename($oppose['crewtype'])."(으)로 $general['name']의 ".getTypename($general['crewtype'])."(을)를 수비합니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}의 ".getTypename($general['crewtype'])."(와)과 {$oppose['name']}의 ".getTypename($oppose['crewtype'])."(이)가 대결합니다."; + $log[count($log)] = "●".getTypename($general['crewtype'])."(으)로 {$oppose['name']}의 ".getTypename($oppose['crewtype'])."(을)를 공격합니다."; + $opplog[count($opplog)] = "●".getTypename($oppose['crewtype'])."(으)로 {$general['name']}의 ".getTypename($general['crewtype'])."(을)를 수비합니다."; $oppAtmos = 0; if($oppose['item'] == 3) { @@ -1298,12 +1298,12 @@ function processWar($connect, $general, $city) { // 상대 병사 소진이나 쌀 소진시 다음 장수 if($oppose['crew'] <= 0 || ($opRice <= round($oppose['crew']/100) && $general['crew'] > 0)) { if($opRice <= round($oppose['crew']/100)) { - $alllog[count($alllog)] = "●{$game['month']}월:$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; - $log[count($log)] = "$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$oppose['name']}의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; + $log[count($log)] = "{$oppose['name']}의 ".getTypename($oppose['crewtype'])."(이)가 패퇴했습니다."; $opplog[count($opplog)] = "●군량 부족으로 패퇴합니다."; } else { - $alllog[count($alllog)] = "●{$game['month']}월:$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; - $log[count($log)] = "$oppose['name']의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$oppose['name']}의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; + $log[count($log)] = "{$oppose['name']}의 ".getTypename($oppose['crewtype'])."(이)가 전멸했습니다."; $opplog[count($opplog)] = "●전멸했습니다."; } $opposecount--; @@ -1336,13 +1336,13 @@ function processWar($connect, $general, $city) { // 공격 장수 병사 소진이나 쌀 소진시 실패 처리 } elseif($general['crew'] <= 0 || $myRice <= round($general['crew']/100)) { if($myRice <= round($general['crew']/100)) { - $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●군량 부족으로 퇴각합니다."; - $opplog[count($opplog)] = "$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $opplog[count($opplog)] = "{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; } else { - $alllog[count($alllog)] = "●{$game['month']}월:$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; $log[count($log)] = "●퇴각했습니다."; - $opplog[count($opplog)] = "$general['name']의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; + $opplog[count($opplog)] = "{$general['name']}의 ".getTypename($general['crewtype'])."(이)가 퇴각했습니다."; } // 경험치 상승 @@ -1378,8 +1378,8 @@ function processWar($connect, $general, $city) { unset($opplog); unset($oppbatlog); unset($oppbatres); -// $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 }$city['name'] 공략에 실패했습니다. <1>$date"; -// $log[count($log)] = "$city['name'] 공략에 실패했습니다. <1>$date"; +// $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}(이)가 }{$city['name']} 공략에 실패했습니다. <1>$date"; +// $log[count($log)] = "{$city['name']} 공략에 실패했습니다. <1>$date"; break; } else { // 무승부일때 로그 남김 @@ -1537,7 +1537,7 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁】$nation['name'](이)가 $city['name'] 공략에 가담하여 분쟁이 발생하고 있습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁】{$nation['name']}(이)가 {$city['name']} 공략에 가담하여 분쟁이 발생하고 있습니다."; pushHistory($connect, $history); } @@ -1604,17 +1604,17 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { global $_armperphase, $_maximumatmos, $_basegold, $_baserice; if($destnation['nation'] > 0) { - $destnationName = "$destnation['name']의"; + $destnationName = "{$destnation['name']}의"; } else { $destnationName = "공백지인"; } - $alllog[count($alllog)] = "●{$game['month']}월:$general['name'](이)가 $city['name'] 공략에 성공했습니다."; - $log[count($log)] = "$city['name'] 공략에 성공했습니다."; - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【지배】$nation['name'](이)가 $city['name'](을)를 지배했습니다."; - $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:$city['name'](을)를 함락시킴"); - $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$general['name'](이)가 {$destnationName} $city['name'](을)를 점령"); - $destnation = addNationHistory($connect, $destnation, "●{$game['year']}년 {$game['month']}월:$nation['name']$general['name']에 의해 $city['name'](이)가 함락"); + $alllog[count($alllog)] = "●{$game['month']}월:{$general['name']}(이)가 {$city['name']} 공략에 성공했습니다."; + $log[count($log)] = "{$city['name']} 공략에 성공했습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【지배】{$nation['name']}(이)가 {$city['name']}(을)를 지배했습니다."; + $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:{$city['name']}(을)를 함락시킴"); + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:{$general['name']}(이)가 {$destnationName} {$city['name']}(을)를 점령"); + $destnation = addNationHistory($connect, $destnation, "●{$game['year']}년 {$game['month']}월:{$nation['name']}{$general['name']}에 의해 {$city['name']}(이)가 함락"); $query = "select city from city where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1630,8 +1630,8 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $losenation = MYDB_fetch_array($result); - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【멸망】$losenation['name'](이)가 멸망하였습니다."; - $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$losenation['name'](을)를 정복"); + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【멸망】{$losenation['name']}(이)가 멸망하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:{$losenation['name']}(을)를 정복"); $query = "select no from general where nation='{$general['nation']}' and level='12'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1648,7 +1648,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='{$city['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation['name'](이)가 멸망했습니다."; + $genlog[0] = "{$losenation['name']}(이)가 멸망했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); @@ -1661,7 +1661,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$game['year']}년 {$game['month']}월:$losenation['name'](이)가 멸망"); + $gen = addHistory($connect, $gen, "●{$game['year']}년 {$game['month']}월:{$losenation['name']}(이)가 멸망"); $loseGeneralGold += $loseGold; $loseGeneralRice += $loseRice; @@ -1704,7 +1704,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $query = "select no,name,nation from general where nation='{$general['nation']}' and level>='9'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation['name'] 정복으로 금$losenation['gold'] 쌀$losenation['rice']을 획득했습니다."; + $genlog[0] = "{$losenation['name']} 정복으로 금{$losenation['gold']} 쌀{$losenation['rice']}을 획득했습니다."; for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); @@ -1768,7 +1768,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { } } - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【긴급천도】$destnation['name'](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【긴급천도】{$destnation['name']}(이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; //아국 수뇌부에게 로그 전달 $query = "select no,name,nation from general where nation='{$destnation['nation']}' and level>='5'"; @@ -1820,9 +1820,9 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $conquerResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $conquerNationArray = MYDB_fetch_array($conquerResult); - $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁협상】$conquerNationArray['name'](이)가 영토분쟁에서 우위를 점하여 $city['name'](을)를 양도받았습니다."; - $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:$city['name'](을)를 $conquerNationArray['name']양도"); - $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game['year']}년 {$game['month']}월:$nation['name']에서 $city['name'](을)를 양도 받음"); + $history[count($history)] = "●{$game['year']}년 {$game['month']}월:【분쟁협상】{$conquerNationArray['name']}(이)가 영토분쟁에서 우위를 점하여 {$city['name']}(을)를 양도받았습니다."; + $nation = addNationHistory($connect, $nation, "●{$game['year']}년 {$game['month']}월:{$city['name']}(을)를 {$conquerNationArray['name']}양도"); + $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game['year']}년 {$game['month']}월:{$nation['name']}에서 {$city['name']}(을)를 양도 받음"); // 이동X 및 사기 변경 $query = "update general set atmos='{$general['atmos']}',killnum=killnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/processing.php b/twe/processing.php index 93ee12cc..7d55e6da 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -1430,9 +1430,9 @@ function command_25($connect, $turn, $command) { $nation = MYDB_fetch_array($result); if($nation['scoutmsg'] == "") { - $scoutStr .= ""; + $scoutStr .= ""; } else { - $scoutStr .= ""; + $scoutStr .= ""; } if($admin['year'] < $admin['startyear']+3 && $nation['gennum'] >= 10) { diff --git a/twe/select_npc.php b/twe/select_npc.php index 6c3e1e4b..ea945e22 100644 --- a/twe/select_npc.php +++ b/twe/select_npc.php @@ -71,10 +71,10 @@ for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); if($nation['scoutmsg'] == "") { echo " - "; + "; } else { echo " - "; + "; } } ?> diff --git a/twe/select_npc_post.php b/twe/select_npc_post.php index 278eb8ed..46dc4d65 100644 --- a/twe/select_npc_post.php +++ b/twe/select_npc_post.php @@ -107,8 +107,8 @@ if($admin['npcmode'] != 1) { $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $log[0] = "●{$admin['month']}월:$me['name']의 육체에 $member['name'](이)가 빙의됩니다!"; - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:$me['name']의 육체에 $member['name'](이)가 빙의되다."); + $log[0] = "●{$admin['month']}월:{$me['name']}의 육체에 {$member['name']}(이)가 빙의됩니다!"; + $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$me['name']}의 육체에 {$member['name']}(이)가 빙의되다."); pushGenLog($me, $mylog); pushAllLog($log); From 131c5319ecb93ce6b9a0458a8659f433d49f6529 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 16 Jan 2018 04:19:20 +0900 Subject: [PATCH 027/622] string $ --- twe/_admin2.php | 2 +- twe/_admin2_submit.php | 2 +- twe/_admin8.php | 2 +- twe/_simul.php | 4 +- twe/a_emperior.php | 4 +- twe/a_emperior2.php | 4 +- twe/a_genList.php | 4 +- twe/b_currentCity.php | 12 +-- twe/b_dipcenter.php | 2 +- twe/b_diplomacy.php | 4 +- twe/b_myBossInfo.php | 2 +- twe/b_myCityInfo.php | 12 +-- twe/b_myGenInfo.php | 2 +- twe/c_myBossInfo.php | 2 +- twe/c_tournament.php | 2 +- twe/d_ally.php | 10 +-- twe/d_cancel.php | 10 +-- twe/d_cease.php | 10 +-- twe/d_merge.php | 10 +-- twe/d_scout.php | 4 +- twe/d_surrender.php | 10 +-- twe/event_1.php | 6 +- twe/event_2.php | 6 +- twe/event_3.php | 4 +- twe/event_4.php | 2 +- twe/func.php | 148 +++++++++++++++++----------------- twe/func_auction.php | 28 +++---- twe/func_history.php | 4 +- twe/func_process.php | 164 +++++++++++++++++++------------------- twe/join_post.php | 6 +- twe/login_process.php | 4 +- twe/npc_login_process.php | 4 +- twe/process_war.php | 12 +-- twe/processing.php | 2 +- twe/select_npc_post.php | 2 +- 35 files changed, 253 insertions(+), 253 deletions(-) diff --git a/twe/_admin2.php b/twe/_admin2.php index 651e80fe..48610db6 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -79,7 +79,7 @@ for($i=0; $i < $gencount; $i++) { if($general['userlevel'] > 2) { $style .= "color:blue;"; } echo " - "; + "; } echo " diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index ec12db61..354f26bf 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -126,7 +126,7 @@ switch($btn) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:특기 【".getGenSpecial($special2)."】(을)를 습득"); pushGenLog($general, $log); } break; diff --git a/twe/_admin8.php b/twe/_admin8.php index 561521ea..19026d70 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -142,7 +142,7 @@ for($i=0; $i < $dipcount; $i++) { - + "; } diff --git a/twe/_simul.php b/twe/_simul.php index f71e2683..8324364e 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -249,7 +249,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $myDef = round($myDef, 2); $cityAtt = round($cityAtt, 2); $cityDef = round($cityDef, 2); - $msg .= "● $phase : 【공격장수】 $general['crew'] (-$myCrew) VS $city['def'] (-$cityCrew) 【성벽】
"; + $msg .= "● $phase : 【공격장수】 {$general['crew']} (-$myCrew) VS {$city['def']} (-$cityCrew) 【성벽】
"; $mykillnum += $cityCrew; $mydeathnum += $myCrew; @@ -636,7 +636,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $myDef = round($myDef, 2); $opAtt = round($opAtt, 2); $opDef = round($opDef, 2); - $msg .= "● $phase : 【공격장수】 $general['crew'] (-$myCrew) VS $oppose['crew'] (-$opCrew) 【수비장수】
"; + $msg .= "● $phase : 【공격장수】 {$general['crew']} (-$myCrew) VS {$oppose['crew']} (-$opCrew) 【수비장수】
"; $mykillnum += $opCrew; $mydeathnum += $myCrew; diff --git a/twe/a_emperior.php b/twe/a_emperior.php index 70b4f30d..7a433b7d 100644 --- a/twe/a_emperior.php +++ b/twe/a_emperior.php @@ -43,7 +43,7 @@ if($select == 0) {
@@ -109,7 +109,7 @@ if($select == 0) { diff --git a/twe/a_emperior2.php b/twe/a_emperior2.php index 87e5f1e7..a7d2eb19 100644 --- a/twe/a_emperior2.php +++ b/twe/a_emperior2.php @@ -43,7 +43,7 @@ if($select == 0) { @@ -110,7 +110,7 @@ if($select == 0) { diff --git a/twe/a_genList.php b/twe/a_genList.php index 7677cf2c..7cb0331a 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -150,7 +150,7 @@ for($j=0; $j < $gencount; $j++) { - + @@ -162,7 +162,7 @@ for($j=0; $j < $gencount; $j++) { - + "; } echo " diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index c4c3434b..dede11a4 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -170,17 +170,17 @@ echo " - + - + - + - + - + - + diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 7aa75d6e..38cfc504 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -157,7 +157,7 @@ for($i=0; $i < $nationcount; $i++) { "; if($dip['term'] != 0) { echo" - + "; } else { echo" diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 8d95cc30..50029cd3 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -31,8 +31,8 @@ for($i=0; $i < $nationcount; $i++) { $nationcolor[$nation['nation']] = $nation['color']; $nationStr .= " {$nation['name']}
"; - $powerStr .= "국력 $nation['power']
"; - $genStr .= "장수 $nation['gennum']
"; + $powerStr .= "국력 {$nation['power']}
"; + $genStr .= "장수 {$nation['gennum']}
"; $cityStr .= "속령 $citycount
"; } diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index b8a33b89..a450e3db 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -483,7 +483,7 @@ for($j=0; $j < $citycount; $j++) { echo "
- + diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 163e81dc..7f9a0ad6 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -115,17 +115,17 @@ for($j=0; $j < $citycount; $j++) { - + - + - + - + - + - + diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index f5729836..16c9a0f6 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -153,7 +153,7 @@ for($j=0; $j < $gencount; $j++) { - + "; } echo " diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index 8570da3a..5471fae3 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -155,7 +155,7 @@ if($btn == "추방") { $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에서 추방됨"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}에서 추방됨"); pushGenLog($general, $log); pushAllLog($alllog); diff --git a/twe/c_tournament.php b/twe/c_tournament.php index f58be2f9..14fd7148 100644 --- a/twe/c_tournament.php +++ b/twe/c_tournament.php @@ -87,7 +87,7 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - //$admin['develcost']원 참가비 + //{$admin['develcost']}원 참가비 if($general['gold'] < $admin['develcost']) { echo ""; exit(1); } $general['gold'] -= $admin['develcost']; } diff --git a/twe/d_ally.php b/twe/d_ally.php index a36bc80b..05ae5f11 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -69,16 +69,16 @@ if($ok == "수락") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { // $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 불가침에 합의."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【불가침】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침 조약을 체결했습니다."; +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【불가침】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침 조약을 체결했습니다."; $youlog[count($youlog)] = "{$mynation['name']}(와)과 $when년 불가침에 성공했습니다."; $mylog[count($mylog)] = "{$younation['name']}(와)과 $when년 불가침에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 {$when}년 불가침 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 {$when}년 불가침 수락"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 {$when}년 불가침 성공"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 {$when}년 불가침 수락"); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 96c77701..0e3759cf 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -56,11 +56,11 @@ if($ok == "수락") { $mylog[count($mylog)] = "●이미 거절했습니다. 파기 실패."; } else { $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 조약 파기에 합의."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【파기】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침을 파기 하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【파기】{$mynation['name']}(이)가 {$younation['name']}(와)과 불가침을 파기 하였습니다."; $youlog[count($youlog)] = "{$mynation['name']}(와)과 파기에 성공했습니다."; $mylog[count($mylog)] = "{$younation['name']}(와)과 파기에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 파기 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 파기 수락"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 파기 성공"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 파기 수락"); //외교 변경 $query = "update diplomacy set state='2',term='0' where me='{$me['nation']}' and you='{$you['nation']}'"; @@ -69,8 +69,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 불가침 파기 동의"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 불가침 파기 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 불가침 파기 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 불가침 파기 동의"; PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_cease.php b/twe/d_cease.php index e1121a5e..d0847818 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -56,11 +56,11 @@ if($ok == "수락") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 종전 합의 하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【종전】{$mynation['name']}(이)가 {$younation['name']}(와)과 종전 합의 하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【종전】{$mynation['name']}(이)가 {$younation['name']}(와)과 종전 합의 하였습니다."; $youlog[count($youlog)] = "{$mynation['name']}(와)과 종전에 성공했습니다."; $mylog[count($mylog)] = "{$younation['name']}(와)과 종전에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 종전 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 종전 수락"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 종전 성공"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 종전 수락"); //외교 변경 $query = "update diplomacy set state='2',term='0' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -74,8 +74,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 종전 동의"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 종전 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 종전 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 종전 동의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_merge.php b/twe/d_merge.php index c12f60ce..34932130 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -95,11 +95,11 @@ if($ok == "수락") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { $youlog[count($youlog)] = "{$mynation['name']}(이)가 통합에 동의했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 통합을 시도합니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통합시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 통합을 시도합니다."; $mylog[count($mylog)] = "{$younation['name']}(와)과 통합에 동의했습니다."; $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 통합에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 통합 시도"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 통합 시도"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 통합 시도"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 통합 시도"); //외교 변경 $query = "update diplomacy set state='3',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -108,8 +108,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 통합에 합의"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 통합에 합의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 통합에 합의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 통합에 합의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_scout.php b/twe/d_scout.php index fa89606d..db06252a 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -25,8 +25,8 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou $youlog[count($youlog)] = "{$me['name']} 등용에 성공했습니다."; $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$nation['name']}(으)로 망명하였습니다."; $mylog[count($mylog)] = "{$nation['name']}(으)로 망명하여 수도로 이동합니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$me['name']} 등용에 성공"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$nation['name']}(으)로 망명"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$me['name']} 등용에 성공"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(으)로 망명"); // 임관내역 추가 $me['nations'] .= "{$nation['nation']},"; diff --git a/twe/d_surrender.php b/twe/d_surrender.php index c6f27e20..0d372cf5 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -85,11 +85,11 @@ if($ok == "수락") { $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; } else { $youlog[count($youlog)] = "{$mynation['name']}(이)가 합병에 동의했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【합병시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 합병을 시도합니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【합병시도】{$mynation['name']}(와)과 {$younation['name']}(이)가 합병을 시도합니다."; $mylog[count($mylog)] = "{$younation['name']}(와)과 합병에 동의했습니다."; $alllog[count($alllog)] = "●{$admin['month']}월:{$me['name']}(이)가 {$younation['name']}(와)과 합병에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 합병 시도"); - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$younation['name']}(와)과 합병 시도"); + $you = addHistory($connect, $you, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 합병 시도"); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 합병 시도"); //외교 변경 $query = "update diplomacy set state='5',term='24' where me='{$mynation['nation']}' and you='{$younation['nation']}'"; @@ -98,8 +98,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name'](와)과 합병에 동의"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$mynation['name'](와)과 합병에 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 합병에 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 합병에 동의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/event_1.php b/twe/event_1.php index c6f65b2d..b9a61d7e 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -194,9 +194,9 @@ $query = "update general set gold=999999,rice=999999"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지의 이민족들이 궐기합니다!"; -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】각지의 이민족들이 궐기합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_2.php b/twe/event_2.php index c3a26b3d..29696f41 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -198,9 +198,9 @@ $query = "update general set gold=999999,rice=999999"; MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지의 오랑캐들이 궐기합니다!"; -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】각지의 오랑캐들이 궐기합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】중원의 전 국가에 선전포고 합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_3.php b/twe/event_3.php index d93df100..8236c1a9 100644 --- a/twe/event_3.php +++ b/twe/event_3.php @@ -60,8 +60,8 @@ for($k=1; $k <= 200; $k++) { //////////////////////////장수 끝/////////////////////////////////////////////// //////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】각지에서 인재들이 등장합니다!"; -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】각지에서 인재들이 등장합니다!"; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; pushHistory($connect, $history); echo ""; diff --git a/twe/event_4.php b/twe/event_4.php index 2de1693c..0379269a 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -89,7 +89,7 @@ RegGeneral4($connect,$admin['turnterm'],$gencount, 0, 0, "유기체", $leader $log[0] = "●{$admin['month']}월:ⓝ유기체가 천하에 이름을 알립니다."; pushAllLog($log); -$history[count($history)] = "●$admin['year']년 $admin['month']월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; +$history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; pushHistory($connect, $history); echo ""; diff --git a/twe/func.php b/twe/func.php index 641948a0..3b2a0561 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2063,10 +2063,10 @@ function myNationInfo($connect) { $nation['tech'] = "$techCall / $nation['tech']"; - if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "$nation['tricklimit']턴"; } + if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "{$nation['tricklimit']}턴"; } else { $nation['tricklimit'] = "가 능"; } - if($nation['surlimit'] != 0) { $nation['surlimit'] = "$nation['surlimit']턴"; } + if($nation['surlimit'] != 0) { $nation['surlimit'] = "{$nation['surlimit']}턴"; } else { $nation['surlimit'] = "가 능"; } if($nation['scout'] != 0) { $nation['scout'] = "금 지"; } @@ -2624,9 +2624,9 @@ function generalInfo($connect, $no, $skin) { if($nation['color'] == "" || $skin < 1) { $nation['color'] = "000000"; } - if($general['age'] < 60) { $general['age'] = "$general['age'] 세"; } - elseif($general['age'] < 80) { $general['age'] = "$general['age'] 세"; } - else { $general['age'] = "$general['age'] 세"; } + if($general['age'] < 60) { $general['age'] = "{$general['age']} 세"; } + elseif($general['age'] < 80) { $general['age'] = "{$general['age']} 세"; } + else { $general['age'] = "{$general['age']} 세"; } $general['connect'] = round($general['connect'] / 10, 0) * 10; $special = $general['special'] == 0 ? "{$general['specage']}세" : "".getGenSpecial($general['special']).""; @@ -2725,7 +2725,7 @@ function generalInfo($connect, $no, $skin) { - + @@ -2808,11 +2808,11 @@ function generalInfo2($connect, $no, $skin) { - + - + @@ -2820,7 +2820,7 @@ function generalInfo2($connect, $no, $skin) { - + @@ -4250,7 +4250,7 @@ function addAge($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special)."】(을)를 습득"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:특기 【".getGenSpecial($special)."】(을)를 습득"); pushGenLog($general, $log); } @@ -4266,7 +4266,7 @@ function addAge($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:특기 【".getGenSpecial($special2)."】(을)를 습득"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:특기 【".getGenSpecial($special2)."】(을)를 습득"); pushGenLog($general, $log); } } @@ -4501,7 +4501,7 @@ function preUpdateMonthly($connect) { $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; } pushHistory($connect, $history); //민심30이하 공백지 처리 @@ -4704,7 +4704,7 @@ group by A.nation $name1 = $nation['name']; $nation = MYDB_fetch_array($nationResult); $name2 = $nation['name']; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【개전】$name1(와)과 $name2(이)가 전쟁을 시작합니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【개전】$name1(와)과 $name2(이)가 전쟁을 시작합니다."; } //휴전국 로그 $query = "select A.me as me,A.you as you,A.term as term1,B.term as term2 from diplomacy A, diplomacy B where A.me=B.you and A.you=B.me and A.state='0' and A.me●$admin['year']년 $admin['month']월:{$mynation['name']}{$you['makenation']}로 통합에 성공"); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; @@ -4858,12 +4858,12 @@ function checkMerge($connect) { for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$younation['name']}{$you['makenation']}로 통합에 성공"); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}{$you['makenation']}로 통합에 성공"); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통합】{$mynation['name']}(와)과 {$younation['name']}(이)가 {$you['makenation']}(으)로 통합하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 {$you['makenation']}에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$mynation['name']}{$you['makenation']}로 통합"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통합】{$mynation['name']}(와)과 {$younation['name']}(이)가 {$you['makenation']}(으)로 통합하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$you['makenation']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } @@ -4959,7 +4959,7 @@ function checkSurrender($connect) { for($i=0; $i < $gencount; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$mynation['name']} 합병에 성공"); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']} 합병에 성공"); } //항복국 장수들 역사 기록 및 로그 전달 $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; @@ -4969,12 +4969,12 @@ function checkSurrender($connect) { for($i=0; $i < $gencount2; $i++) { $gen = MYDB_fetch_array($result); pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin['year']년 $admin['month']월:{$mynation['name']}{$younation['name']}(으)로 항복"); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$younation['name']}(으)로 항복"); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【투항】{$mynation['name']} (이)가 {$younation['name']}(으)로 항복하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【혼란】통합에 반대하는 세력들로 인해 {$younation['name']}에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$mynation['name']}(와)과 합병"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【투항】{$mynation['name']} (이)가 {$younation['name']}(으)로 항복하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$younation['name']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 합병"); $newGenCount = $gencount + $gencount2; if($newGenCount < 10) { $newGenCount = 10; } @@ -5075,22 +5075,22 @@ function updateNationState($connect) { switch($nationlevel) { case 7: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); break; case 6: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극"); break; case 5: case 4: case 3: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); break; case 2: - $history[count($history)] = "●$admin['year']년 $admin['month']월:【작위】{$nation['name']}의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."로 나서다"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."로 나서다"); break; } @@ -5253,7 +5253,7 @@ function checkEmperior($connect) { $allcount = MYDB_num_rows($result); if($count == $allcount) { - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$nation['name']}(이)가 전토를 통일"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(이)가 전토를 통일"); $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5330,7 +5330,7 @@ function checkEmperior($connect) { } } - $log[0] = "●$admin['year']년 $admin['month']월: {$nation['name']}(이)가 전토를 통일하였습니다."; + $log[0] = "●{$admin['year']}년 {$admin['month']}월: {$nation['name']}(이)가 전토를 통일하였습니다."; $query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5389,7 +5389,7 @@ function checkEmperior($connect) { )"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【통일】{$nation['name']}(이)가 전토를 통일하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통일】{$nation['name']}(이)가 전토를 통일하였습니다."; pushHistory($connect, $history); //연감 월결산 @@ -5844,7 +5844,7 @@ function updateTurntime($connect, $no) { $log[0] = "●나이가 들어 은퇴하고 자손에게 자리를 물려줍니다."; pushGenLog($general, $log); - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); } $turntime = addTurn($general['turntime'], $admin['turnterm']); @@ -5901,7 +5901,7 @@ function CheckHall($connect, $no) { $count = MYDB_num_rows($result); //승률,살상률인데 10회 미만 전투시 스킵 - if(($k == 5 || $k == 7) && $general['warnum']<10) { continue; } + if(($k == 5 || $k == 7) && {$general['warnum']}<10) { continue; } //토너승률인데 50회 미만시 스킵 if($k == 13 && $general['tt'] < 50) { continue; } //토너승률인데 50회 미만시 스킵 @@ -6038,13 +6038,13 @@ function uniqueItem($connect, $general, $log, $vote=0) { $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getWeapName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getWeapName($it)."(을)를 습득했습니다!"; } break; case 1: @@ -6052,13 +6052,13 @@ function uniqueItem($connect, $general, $log, $vote=0) { $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getBookName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getBookName($it)."(을)를 습득했습니다!"; } break; case 2: @@ -6066,13 +6066,13 @@ function uniqueItem($connect, $general, $log, $vote=0) { $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getHorseName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getHorseName($it)."(을)를 습득했습니다!"; } break; case 3: @@ -6080,13 +6080,13 @@ function uniqueItem($connect, $general, $log, $vote=0) { $alllog[0] = "●{$game['month']}월:{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; $general = addHistory($connect, $general, "●{$game['year']}년 {$game['month']}월:".getItemName($it)."(을)를 습득"); if($vote == 0) { - $history[0] = "●$game['year']년 $game['month']월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【아이템】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 1) { - $history[0] = "●$game['year']년 $game['month']월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【설문상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 2) { - $history[0] = "●$game['year']년 $game['month']월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【랜덤임관상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } elseif($vote == 3) { - $history[0] = "●$game['year']년 $game['month']월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; + $history[0] = "●{$game['year']}년 {$game['month']}월:【건국상품】{$nation['name']}{$general['name']}(이)가 ".getItemName($it)."(을)를 습득했습니다!"; } break; } @@ -6285,7 +6285,7 @@ function processGoldIncome($connect) { } } - $history[0] = "●$admin['year']년 $admin['month']월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; pushHistory($connect, $history); pushAdminLog($connect, $adminLog); } @@ -6586,7 +6586,7 @@ function processRiceIncome($connect) { } } - $history[0] = "●$admin['year']년 $admin['month']월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; pushHistory($connect, $history); pushAdminLog($connect, $adminLog); } @@ -6745,19 +6745,19 @@ function disaster($connect) { case 1: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; $state = 4; break; case 1: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; $state = 3; break; case 3: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; $state = 9; break; } @@ -6766,19 +6766,19 @@ function disaster($connect) { case 4: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; $state = 7; break; case 1: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; $state = 6; break; case 3: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; $state = 2; $isGood = 1; break; @@ -6788,19 +6788,19 @@ function disaster($connect) { case 7: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; $state = 8; break; case 1: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; $state = 8; break; case 3: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; $state = 1; $isGood = 1; break; @@ -6810,19 +6810,19 @@ function disaster($connect) { case 10: switch($disastertype) { case 0: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; $state = 3; break; case 1: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; $state = 5; break; case 2: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; $state = 3; break; case 3: - $disaster[count($disaster)] = "●$admin['year']년 $admin['month']월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; + $disaster[count($disaster)] = "●{$admin['year']}년 {$admin['month']}월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; $state = 9; break; } @@ -6986,7 +6986,7 @@ function deleteNation($connect, $general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【멸망】{$nation['name']}은(는) 멸망했습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【멸망】{$nation['name']}은(는) 멸망했습니다."; // 전 장수 재야로 // 전 장수 소속 무소속으로 $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='{$general['nation']}'"; @@ -7066,10 +7066,10 @@ function nextRuler($connect, $general) { $query = "update city set gen3=0 where gen3='{$nextruler['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받았습니다"; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받았습니다"; pushHistory($connect, $history); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받음."); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:【유지】{$nextruler['name']}(이)가 {$nation['name']}의 유지를 이어 받음."); // 장수 삭제 및 부대처리는 checkTurn에서 } diff --git a/twe/func_auction.php b/twe/func_auction.php index f7356a38..153a3d48 100644 --- a/twe/func_auction.php +++ b/twe/func_auction.php @@ -89,7 +89,7 @@ function registerAuction($connect) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[0] = "●{$admin['month']}월:".GetStuffName($stuff)."(이)가 거래장에 등장했습니다!"; - $history[0] = "●$admin['year']년 $admin['month']월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; pushAllLog($alllog); pushHistory($connect, $history); } @@ -162,7 +162,7 @@ function processAuction($connect) { // 유닉템 처리 if($auction['stuff'] != 0) { if($auction[no2] == 0) { - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, 그러나 입찰자 부재"; pushAuctionLog($connect, $auctionLog); } else { $trader['no'] = 0; @@ -191,7 +191,7 @@ function processAuction($connect) { if($count > 0) { $traderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; $bidderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 아이템 이미 매진!"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 아이템 이미 매진!"; } elseif($auction['value'] > $bidder['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; @@ -201,18 +201,18 @@ function processAuction($connect) { $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰!"; $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 ".GetStuffName($auction['stuff'])."(을)를 판매, 금 {$auction['value']}(을)를 획득!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, ".GetStuffName($auction['stuff'])." 구입!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; $auctionLog[0] .= " ★ 아이템 거래 ★"; $query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='$auction[no2]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[0] = "●{$admin['month']}월:$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; - $history[0] = "●$admin['year']년 $admin['month']월:【암시장】$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【암시장】$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; pushAllLog($alllog); pushHistory($connect, $history); } @@ -231,9 +231,9 @@ function processAuction($connect) { $traderLog[0] = "◆입찰자 부재로 {$auction['no']}번 거래 유찰!"; if($auction['type'] == 0) { - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, 그러나 입찰자 부재"; } else { - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, 그러나 입찰자 부재"; } pushGenLog($trader, $traderLog); pushAuctionLog($connect, $auctionLog); @@ -264,7 +264,7 @@ function processAuction($connect) { $traderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; } elseif($auction['value'] > $bidder['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; @@ -274,11 +274,11 @@ function processAuction($connect) { $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; } elseif($auction['value'] >= $auction['topv']) { @@ -305,7 +305,7 @@ function processAuction($connect) { $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; } elseif($auction['value'] > $trader['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $trader['gold'] -= $gold; @@ -315,11 +315,11 @@ function processAuction($connect) { $traderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; - $auctionLog[0] = "◆$admin['year']년 $admin['month']월, {$auction['no']}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 판매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 판매"; if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; } elseif($auction['value'] * 2 <= $auction['amount']) { diff --git a/twe/func_history.php b/twe/func_history.php index 69c1e645..9eecf9c2 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -110,8 +110,8 @@ function LogHistory($connect, $isFirst=0) { $citycount = MYDB_num_rows($cityresult); $nationStr .= " {$nation['name']}
"; - $powerStr .= "국력 $nation['power']
"; - $genStr .= "장수 $nation['gennum']
"; + $powerStr .= "국력 {$nation['power']}
"; + $genStr .= "장수 {$nation['gennum']}
"; $cityStr .= "속령 $citycount
"; } diff --git a/twe/func_process.php b/twe/func_process.php index bd055a6a..713fc1fa 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -1605,7 +1605,7 @@ function process_25($connect, &$general) { } else { $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$nation['name']}임관했습니다."; $log[count($log)] = "●{$admin['month']}월:{$nation['name']}에 임관했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에 임관"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}에 임관"); if($gencount < 10) { $exp = 700; } else { $exp = 100; } @@ -1918,7 +1918,7 @@ function process_29($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:$name(이)라는 인재를 {$scoutType}"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:$name(이)라는 인재를 {$scoutType}"); $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3427,7 +3427,7 @@ function process_45($connect, &$general) { if($dipcount1 > 0) { $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 통합에 반대하며 {$nation['name']}(을)를 떠났습니다."; $log[count($log)] = "●{$admin['month']}월:통합에 반대하며 {$nation['name']}에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:통합에 반대하며 {$nation['name']}(을)를 떠남"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:통합에 반대하며 {$nation['name']}(을)를 떠남"); // 국적 바꾸고 등급 재야로 $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; @@ -3435,7 +3435,7 @@ function process_45($connect, &$general) { } elseif($dipcount2 > 0) { $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 합병에 반대하며 {$nation['name']}(을)를 떠났습니다."; $log[count($log)] = "●{$admin['month']}월:합병에 반대하며 {$nation['name']}에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:합병에 반대하며 {$nation['name']}(을)를 떠남"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:합병에 반대하며 {$nation['name']}(을)를 떠남"); // 국적 바꾸고 등급 재야로 $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; @@ -3443,7 +3443,7 @@ function process_45($connect, &$general) { } else { $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$nation['name']}에서 하야했습니다."; $log[count($log)] = "●{$admin['month']}월:{$nation['name']}에서 하야했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}에서 하야"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}에서 하야"); // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='{$general['gold']}',rice='{$general['rice']}' where no='{$general['no']}'"; @@ -3549,9 +3549,9 @@ function process_46($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:{$nation['name']}(을)를 건국하였습니다. <1>$date"; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$city['name']}에 국가를 건설하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【건국】".getNationType($type)." {$nation['name']}(이)가 새로이 등장하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 건국"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$nation['name']}(을)를 건국"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【건국】".getNationType($type)." {$nation['name']}(이)가 새로이 등장하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(을)를 건국"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$nation['name']}(을)를 건국"); $exp = 1000; $ded = 1000; @@ -3600,9 +3600,9 @@ function process_47($connect, &$general) { } else { $log[count($log)] = "●{$admin['month']}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 방랑의 길을 떠납니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 버리고 방랑"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(을)를 버리고 방랑"); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【방랑】{$general['name']}은(는) 방랑의 길을 떠납니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【방랑】{$general['name']}은(는) 방랑의 길을 떠납니다."; //분쟁기록 모두 지움 DeleteConflict($connect, $general['nation']); @@ -4021,7 +4021,7 @@ function process_52($connect, &$general) { $genlog[0] = "{$younation['name']}(으)로 금$gold 쌀$rice을 지원했습니다."; pushGenLog($gen, $genlog); } - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$younation['name']}(으)로 금$gold 쌀$rice을 지원"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(으)로 금$gold 쌀$rice을 지원"); $mynation = addNationHistory($connect, $mynation, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(으)로 금$gold 쌀$rice을 지원"); $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(으)로부터 금$gold 쌀$rice을 지원 받음"); @@ -4036,7 +4036,7 @@ function process_52($connect, &$general) { pushGenLog($gen, $genlog); } - $history[count($history)] = "●$admin['year']년 $admin['month']월:【원조】{$mynation['name']}에서 {$younation['name']}(으)로 물자를 지원합니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【원조】{$mynation['name']}에서 {$younation['name']}(으)로 물자를 지원합니다."; $log[count($log)] = "●{$admin['month']}월:{$younation['name']}(으)로 물자를 지원합니다. <1>$date"; $exp = 5; @@ -4164,13 +4164,13 @@ function process_54($connect, &$general) { $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $history[count($history)] = "●$admin['year']년 $admin['month']월:【선양】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 {$nextruler['name']}에게 선양했습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【선양】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 {$nextruler['name']}에게 선양했습니다."; $log[count($log)] = "●{$admin['month']}월:{$nextruler['name']}에게 군주의 자리를 물려줍니다. <1>$date"; $youlog[count($youlog)] = "●{$admin['month']}월:{$general['name']}에게서 군주의 자리를 물려받습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주자리를 {$nextruler['name']}에게 선양"); - $nextruler = addHistory($connect, $nextruler, "●$admin['year']년 $admin['month']월:{$nation['name']}의 군주자리를 물려 받음"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$nextruler['name']}에게 선양"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주자리를 {$nextruler['name']}에게 선양"); + $nextruler = addHistory($connect, $nextruler, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주자리를 물려 받음"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$nextruler['name']}에게 선양"); } pushGenLog($general, $log); pushGenLog($nextruler, $youlog); @@ -4225,9 +4225,9 @@ function process_55($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:거병에 성공하였습니다. <1>$date"; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$city['name']}에서 거병하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【거병】{$general['name']}(이)가 세력을 결성하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$city['name']}에서 거병"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$city['name']}에서 거병"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【거병】{$general['name']}(이)가 세력을 결성하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$city['name']}에서 거병"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$city['name']}에서 거병"); // 외교테이블 추가 $query = "select nation from nation where nation!='{$nation['nation']}'"; @@ -4269,7 +4269,7 @@ function process_56($connect, &$general) { } else { $log[count($log)] = "●{$admin['month']}월:세력을 해산했습니다. <1>$date"; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 세력을 해산했습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$nation['name']}(을)를 해산"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(을)를 해산"); $query = "select no from general where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4344,11 +4344,11 @@ function process_57($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:모반에 성공했습니다. <1>$date"; $youlog[count($youlog)] = "●{$admin['month']}월:{$general['name']}에게서 군주의 자리를 뺏겼습니다."; $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 모반에 성공했습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【모반】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 찬탈했습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【모반】{$general['name']}(이)가 {$nation['name']}의 군주 자리를 찬탈했습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:모반으로 {$nation['name']}의 군주자리를 찬탈"); - $ruler = addHistory($connect, $ruler, "●$admin['year']년 $admin['month']월:{$general['name']}의 모반으로 인해 {$nation['name']}의 군주자리를 박탈당함"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$ruler['name']}에게서 군주자리를 찬탈"); + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:모반으로 {$nation['name']}의 군주자리를 찬탈"); + $ruler = addHistory($connect, $ruler, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}의 모반으로 인해 {$nation['name']}의 군주자리를 박탈당함"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$ruler['name']}에게서 군주자리를 찬탈"); } pushGenLog($general, $log); pushGenLog($ruler, $youlog); @@ -4504,10 +4504,10 @@ function process_62($connect, &$general) { $ded = CharDedication($ded, $general['personal']); $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$younation['name']}선전 포고 하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【선포】{$nation['name']}(이)가 {$younation['name']}에 선전 포고 하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$younation['name']}에 선전 포고"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$younation['name']}에 선전 포고"); - $younation = addNationHistory($connect, $younation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 선전 포고"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【선포】{$nation['name']}(이)가 {$younation['name']}에 선전 포고 하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}에 선전 포고"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$younation['name']}에 선전 포고"); + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국에 선전 포고"); //외교 변경 $query = "update diplomacy set state='1',term='24' where me='{$nation['nation']}' and you='{$younation['nation']}'"; @@ -4519,8 +4519,8 @@ function process_62($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】$admin['year']년 $admin['month']월:$younation['name']에 선전포고"; - $youmsg = "【외교】$admin['year']년 $admin['month']월:$nation['name']에서 선전포고"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}에 선전포고"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$nation['name']}에서 선전포고"; PushMsg(2, $nation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $general['picture'], $general['imgsvr'], "{$general['name']}:{$nation['name']}▶", $nation['color'], $younation['name'], $younation['color'], $youmsg); @@ -4712,9 +4712,9 @@ function process_65($connect, &$general) { $ded = CharDedication($ded, $general['personal']); $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}초토화를 명령하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【초토화】{$nation['name']}(이)가 {$destcity['name']}(을)를 초토화하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}초토화를 명령"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}초토화를 명령"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【초토화】{$nation['name']}(이)가 {$destcity['name']}(을)를 초토화하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}초토화를 명령"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}초토화를 명령"); //외교제한 24 $amount = round($destcity['pop'] * 0.1); @@ -4808,9 +4808,9 @@ function process_66($connect, &$general) { $ded = CharDedication($ded, $general['personal']); $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(으)로 천도를 명령하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【천도】{$nation['name']}(이)가 {$destcity['name']}(으)로 천도하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(으)로 천도 명령"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(으)로 천도 명령"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【천도】{$nation['name']}(이)가 {$destcity['name']}(으)로 천도하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}(으)로 천도 명령"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(으)로 천도 명령"); //수도 변경 $query = "update nation set l{$general['level']}term='0',capital='{$destcity['city']}',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; @@ -4890,9 +4890,9 @@ function process_67($connect, &$general) { $ded = CharDedication($ded, $general['personal']); $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 증축하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【증축】{$nation['name']}(이)가 {$destcity['name']}(을)를 증축하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(을)를 증축"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(을)를 증축"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【증축】{$nation['name']}(이)가 {$destcity['name']}(을)를 증축하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}(을)를 증축"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 증축"); //물자 감소 $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='{$general['nation']}'"; @@ -4978,9 +4978,9 @@ function process_68($connect, &$general) { $ded = CharDedication($ded, $general['personal']); $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 감축하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【감축】{$nation['name']}(이)가 {$destcity['name']}(을)를 감축하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}(을)를 감축"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}(을)를 감축"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【감축】{$nation['name']}(이)가 {$destcity['name']}(을)를 감축하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}(을)를 감축"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}(을)를 감축"); //물자 증가 $query = "update nation set l{$general['level']}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='{$general['nation']}'"; @@ -5084,10 +5084,10 @@ function process_71($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 필사즉생(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:필사즉생(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 필사즉생(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 필사즉생(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:필사즉생(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 필사즉생(을)를 발동"); //전장수 훈사100 $query = "update general set atmos=100,train=100 where nation='{$general['nation']}'"; @@ -5193,10 +5193,10 @@ function process_72($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}백성동원(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}백성동원(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}백성동원(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}백성동원(을)를 발동"); //도시 성수 80% $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='{$destcity['city']}'"; @@ -5317,11 +5317,11 @@ function process_73($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}수몰(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}수몰(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}수몰(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}수몰(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}수몰(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}수몰(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}수몰(을)를 발동"); //도시 성수 80% 감소 $query = "update city set def=def*0.2,wall=wall*0.2 where city='{$destcity['city']}'"; @@ -5433,11 +5433,11 @@ function process_74($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destcity['name']}허보(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}허보(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}허보(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destcity['name']}허보(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destcity['name']}허보(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}{$destcity['name']}허보(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국의 {$destcity['name']}허보(을)를 발동"); //상대국 도시 전부 검색 $query = "select city from city where nation='{$destcity['nation']}' and supply=1"; @@ -5573,11 +5573,11 @@ function process_75($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}피장파장(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 피장파장(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}피장파장(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destnation['name']}피장파장(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}피장파장(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국에 피장파장(을)를 발동"); //전략기한+60 $query = "update nation set tricklimit=tricklimit+60 where nation='{$destnation['nation']}'"; @@ -5671,10 +5671,10 @@ function process_76($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 의병모집(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:의병모집(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 의병모집(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 의병모집(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:의병모집(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 의병모집(을)를 발동"); $query = "select avg(gennum) as gennum from nation"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5906,11 +5906,11 @@ function process_77($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}이호경식(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 이호경식(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}이호경식(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destnation['name']}이호경식(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}이호경식(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국에 이호경식(을)를 발동"); //선포+3개월 if($dip['state'] == 0) { @@ -6030,11 +6030,11 @@ function process_78($connect, &$general) { } // $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin['year']년 $admin['month']월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:{$destnation['name']}급습(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin['year']년 $admin['month']월:{$nation['name']}{$general['name']}(이)가 아국에 급습(을)를 발동"); +// $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; + $tricklog[count($tricklog)] = "●{$admin['year']}년 {$admin['month']}월:【전략】{$nation['name']}(이)가 {$destnation['name']}급습(을)를 발동하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:{$destnation['name']}급습(을)를 발동"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 {$destnation['name']}급습(을)를 발동"); + $destnation = addNationHistory($connect, $destnation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}{$general['name']}(이)가 아국에 급습(을)를 발동"); //선포-3개월 $query = "update diplomacy set term=term-3 where (me='{$general['nation']}' and you='{$destnation['nation']}') or (you='{$general['nation']}' and me='{$destnation['nation']}')"; @@ -6105,9 +6105,9 @@ function process_81($connect, &$general) { } $alllog[count($alllog)] = "●{$admin['month']}월:{$general['name']}(이)가 국기를 변경하였습니다."; - $history[count($history)] = "●$admin['year']년 $admin['month']월:【국기변경】{$nation['name']}(이)가 국기를 변경하였습니다."; - $general = addHistory($connect, $general, "●$admin['year']년 $admin['month']월:국기를 변경"); - $nation = addNationHistory($connect, $nation, "●$admin['year']년 $admin['month']월:{$general['name']}(이)가 국기를 변경"); + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【국기변경】{$nation['name']}(이)가 국기를 변경하였습니다."; + $general = addHistory($connect, $general, "●{$admin['year']}년 {$admin['month']}월:국기를 변경"); + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$general['name']}(이)가 국기를 변경"); //국기변경 $query = "update nation set color='$color',colset=colset-1 where nation='{$nation['nation']}'"; diff --git a/twe/join_post.php b/twe/join_post.php index 974d6cc2..d1074408 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -242,12 +242,12 @@ if($id_num) { $log[0] = "●{$admin['month']}월:{$cityname['name']}에서 {$me['name']}(이)라는 기재가 천하에 이름을 알립니다."; $log[1] = "●{$admin['month']}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; - $history[0] = "●$admin['year']년 $admin['month']월:【천재】{$cityname['name']}에 천재가 등장했습니다."; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【천재】{$cityname['name']}에 천재가 등장했습니다."; pushHistory($connect, $history); } else { $log[0] = "●{$admin['month']}월:{$cityname['name']}에서 {$me['name']}(이)라는 호걸이 천하에 이름을 알립니다."; } - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:{$me['name']}, {$cityname['name']}에서 큰 뜻을 품다."); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$me['name']}, {$cityname['name']}에서 큰 뜻을 품다."); $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; @@ -256,7 +256,7 @@ if($id_num) { $mylog[count($mylog)] = "●연령은 $age세로 시작합니다."; if($genius == 1) { $mylog[count($mylog)] = "●축하합니다! 천재로 태어나 처음부터 ".getGenSpecial($special2)." 특기를 가지게 됩니다!"; - $me = addHistory($connect, $me, "●$admin['year']년 $admin['month']월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); + $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); } pushGenLog($me, $mylog); pushAllLog($log); diff --git a/twe/login_process.php b/twe/login_process.php index 2b130b98..32f5f541 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -36,10 +36,10 @@ if(!$member) { MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; case 2: MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; case 3: MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; } $_SESSION['p_id'] = $id; diff --git a/twe/npc_login_process.php b/twe/npc_login_process.php index bbafe447..5f40f7f6 100644 --- a/twe/npc_login_process.php +++ b/twe/npc_login_process.php @@ -31,10 +31,10 @@ if(!$me2) { MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; case 2: MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; case 3: MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me['killturn']시간 후 재등록 가능합니다."); break; + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; } $_SESSION['p_id'] = $id; diff --git a/twe/process_war.php b/twe/process_war.php index a701aed4..6c2d4154 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -353,7 +353,7 @@ function processWar($connect, $general, $city) { $general['crew'] = round($general['crew']); $cityCrew = round($cityCrew); $myCrew = round($myCrew); - $batlog[count($batlog)] = "● $phase : 【$general['name']】 $general['crew'] (-$myCrew) VS $city['def'] (-$cityCrew) 【$city['name']】"; + $batlog[count($batlog)] = "● $phase : 【$general['name']】 {$general['crew']} (-$myCrew) VS {$city['def']} (-$cityCrew) 【$city['name']】"; $mykillnum += $cityCrew; $mydeathnum += $myCrew; @@ -371,7 +371,7 @@ function processWar($connect, $general, $city) { if($city['def'] <= 0) { break; } if($general['crew'] <= 0) { break; } } - $res = "성 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 $general['crew'] (-$mydeathnum) VS $city['def'] (-$mykillnum) 【$city['name']】<1>성벽"; + $res = "성 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 {$general['crew']} (-$mydeathnum) VS {$city['def']} (-$mykillnum) 【$city['name']】<1>성벽"; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; @@ -1190,8 +1190,8 @@ function processWar($connect, $general, $city) { $oppose['crew'] = round($oppose['crew']); $myCrew = round($myCrew); $opCrew = round($opCrew); - $batlog[count($batlog)] = "● $phase : 【$general['name']】 $general['crew'] (-$myCrew) VS $oppose['crew'] (-$opCrew) 【$oppose['name']】"; - $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose['name']】 $oppose['crew'] (-$opCrew) VS $general['crew'] (-$myCrew) 【$general['name']】"; + $batlog[count($batlog)] = "● $phase : 【$general['name']】 {$general['crew']} (-$myCrew) VS {$oppose['crew']} (-$opCrew) 【$oppose['name']】"; + $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose['name']】 {$oppose['crew']} (-$opCrew) VS {$general['crew']} (-$myCrew) 【$general['name']】"; $mykillnum += $opCrew; $mydeathnum += $myCrew; $opkillnum += $myCrew; $opdeathnum += $opCrew; @@ -1220,11 +1220,11 @@ function processWar($connect, $general, $city) { if($oppose['crew'] <= 0) { break; } if($general['crew'] <= 0) { break; } } - $res = "공 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 $general['crew'] (-$mydeathnum) VS $oppose['crew'] (-$opdeathnum) 【$oppose['name']】<1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2).""; + $res = "공 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 {$general['crew']} (-$mydeathnum) VS {$oppose['crew']} (-$opdeathnum) 【$oppose['name']】<1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2).""; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; - $oppres = "수 <1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2)."【$oppose['name']】 $oppose['crew'] (-$opdeathnum) VS $general['crew'] (-$mydeathnum) 【$general['name']】<1>"._String::SubStr(getTypename($general['crewtype']), 0, 2).""; + $oppres = "수 <1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2)."【$oppose['name']】 {$oppose['crew']} (-$opdeathnum) VS {$general['crew']} (-$mydeathnum) 【$general['name']】<1>"._String::SubStr(getTypename($general['crewtype']), 0, 2).""; $opplog[count($opplog)] = "◆".$oppres; $oppbatlog[count($oppbatlog)] = "◆".$oppres; $oppbatres[count($oppbatres)] = "◆{$game['year']}년 {$game['month']}월: ".$oppres; diff --git a/twe/processing.php b/twe/processing.php index 7d55e6da..3c118730 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -2045,7 +2045,7 @@ function command_48($connect, $turn, $command) { echo " 장비를 구입하거나 매각합니다.
현재 구입 불가능한 것은 붉은색으로 표시됩니다.
-현재 도시 치안 : $city['secu']    현재 자금 : $me['gold']
+현재 도시 치안 : $city['secu']    현재 자금 : {$me['gold']}
장비 :
- + @@ -243,7 +243,7 @@ for($i=0; $i < $nationCount; $i++) { - + "; } diff --git a/twe/a_genList.php b/twe/a_genList.php index 7cb0331a..5e367b18 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -141,7 +141,7 @@ for($j=0; $j < $gencount; $j++) { if($general['npc'] >= 2) { $name = "{$general['name']}"; } elseif($general['npc'] == 1) { $name = "{$general['name']}"; } - else { $name = "$general['name']"; } + else { $name = "{$general['name']}"; } $general['connect'] = round($general['connect'] / 10, 0) * 10; diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index 5681252c..3097997b 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -163,7 +163,7 @@ for($i=1; $i <= $count; $i++) { if($city['city'] == $nation['capital']) { echo "[{$city['name']}], "; } else { - echo "$city['name'], "; + echo "{$city['name']}, "; } } } else { @@ -182,7 +182,7 @@ for($i=1; $i <= $count; $i++) { $general = MYDB_fetch_array($genresult); if($general['npc'] >= 2) { echo "{$general['name']}, "; } elseif($general['npc'] == 1) { echo "{$general['name']}, "; } - else { echo "$general['name'], "; } + else { echo "{$general['name']}, "; } } echo" @@ -216,7 +216,7 @@ echo " @@ -227,7 +227,7 @@ echo" $general = MYDB_fetch_array($genresult); if($general['npc'] >= 2) { echo "{$general['name']}, "; } elseif($general['npc'] == 1) { echo "{$general['name']}, "; } - else { echo "$general['name'], "; } + else { echo "{$general['name']}, "; } } echo" diff --git a/twe/a_npcList.php b/twe/a_npcList.php index eec09182..0668c376 100644 --- a/twe/a_npcList.php +++ b/twe/a_npcList.php @@ -82,7 +82,7 @@ for($j=0; $j < $gencount; $j++) { if($general['npc'] >= 2) { $name = "{$general['name']}"; } elseif($general['npc'] == 1) { $name = "{$general['name']}"; } - else { $name = "$general['name']"; } + else { $name = "{$general['name']}"; } echo " diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index dede11a4..bf02feca 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -48,7 +48,7 @@ if($me['level'] == 0) { $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($cityresult); echo " -
$regen['name']{$regen['name']} $reply
$nation['name']-
{$nation['name']}-
$nation['name']$nation['scoutmsg']
{$nation['name']}{$nation['scoutmsg']}
$nation['name']-
{$nation['name']}-
$nation['name']".$nation['scoutmsg']."
{$nation['name']}".$nation['scoutmsg']."
$nation['name']-
{$nation['name']}-
$nation['name']$nation['scoutmsg']
{$nation['name']}{$nation['scoutmsg']}
$nationName[$me] $nationName[$you] $state$dip['term'] 개월{$dip['term']} 개월 {$note}
- $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月) + {$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)
- $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月) + {$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)
- $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月) + {$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)
- $emperior['name'] ({$emperior['year']}年 {$emperior['month']}月) + {$emperior['name']} ({$emperior['year']}年 {$emperior['month']}月)
$name$general['age']세{$general['age']}세 ".getGenChar($general['personal'])." ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])." Lv ".getExpLevel($general['experience'])."$power $intel {$general['killturn']}$general['connect']"; echo "
【".getConnect($general['connect'])."】
{$general['connect']}"; echo "
【".getConnect($general['connect'])."】
주민$city['pop']/$city[pop2]{$city['pop']}/$city[pop2] 농업$city['agri']/$city[agri2]{$city['agri']}/$city[agri2] 상업$city['comm']/$city[comm2]{$city['comm']}/$city[comm2] 치안$city['secu']/$city[secu2]{$city['secu']}/$city[secu2] 수비$city['def']/$city[def2]{$city['def']}/$city[def2] 성벽$city['wall']/$city[wall2]{$city['wall']}/$city[wall2]
민심$state$dip['term'] 개월{$dip['term']} 개월 {$year}年 {$month}月
【{$citylevel[$city['level']]}】$city['name']  {$city['name']}   {$gen1['name']} {$gen2['name']} {$gen3['name']}
주민$city['pop']/$city[pop2]{$city['pop']}/$city[pop2] 농업$city['agri']/$city[agri2]{$city['agri']}/$city[agri2] 상업$city['comm']/$city[comm2]{$city['comm']}/$city[comm2] 치안$city['secu']/$city[secu2]{$city['secu']}/$city[secu2] 수비$city['def']/$city[def2]{$city['def']}/$city[def2] 성벽$city['wall']/$city[wall2]{$city['wall']}/$city[wall2]
민심".getGenChar($general['personal'])." ".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])." {$general['belong']}$general['connect']"; echo "
(".getConnect($general['connect']).")
{$general['connect']}"; echo "
(".getConnect($general['connect']).")
수비 {$general['mode']} 삭턴$general['killturn'] 턴{$general['killturn']} 턴 실행 $remaining 분 남음
계략 {$general['firenum']} 사관$general['belong']년{$general['belong']}년
승률$general['winrate'] %{$general['winrate']} % 승리 {$general['killnum']} 패배
살상률$general['killrate'] %{$general['killrate']} % 사살 {$general['killcrew']} 피살
{$nation['name']}{$nation['name']}  {$nation['connect']}   {$nation['con']}   {$nation['power']}  {$city['secu']}%   {$city['wall']}%   {$city['def']}% {$nation['name']}{$nation['name']}
속령 일람 : "; for($j=0; $j < $citycount; $j++) { $city = MYDB_fetch_array($cityresult); - echo "$city['name'], "; + echo "{$city['name']}, "; } echo"
- + @@ -190,11 +190,11 @@ echo " - + - + - + @@ -205,7 +205,7 @@ echo " if($gencount == 0) echo "-"; for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($genresult); - echo "$general['name'], "; + echo "{$general['name']}, "; } echo " diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 50029cd3..c3fc617c 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -30,7 +30,7 @@ for($i=0; $i < $nationcount; $i++) { $nationname[$nation['nation']] = $nation['name']; $nationcolor[$nation['nation']] = $nation['color']; - $nationStr .= " {$nation['name']}
"; + $nationStr .= " {$nation['name']}
"; $powerStr .= "국력 {$nation['power']}
"; $genStr .= "장수 {$nation['gennum']}
"; $cityStr .= "속령 $citycount
"; diff --git a/twe/b_genList.php b/twe/b_genList.php index 8a0ce459..1fb96bf0 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -138,7 +138,7 @@ for($j=0; $j < $gencount; $j++) { if($general['npc'] >= 2) { $name = "{$general['name']}"; } elseif($general['npc'] == 1) { $name = "{$general['name']}"; } - else { $name = "$general['name']"; } + else { $name = "{$general['name']}"; } switch($general['mode']) { case 0: $mode = "×"; break; diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index a450e3db..40093ed9 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -71,7 +71,7 @@ echo "
【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 $city['name']【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 {$city['name']}
주민인구 ".round($city['pop']/$city[pop2]*100, 2)." % 태수";echo $gen1['name']==''?"-":"$gen1['name']";echo "";echo $gen1['name']==''?"-":"{$gen1['name']}";echo " 군사";echo $gen2['name']==''?"-":"$gen2['name']";echo "";echo $gen2['name']==''?"-":"{$gen2['name']}";echo " 시중";echo $gen3['name']==''?"-":"$gen3['name']";echo "";echo $gen3['name']==''?"-":"{$gen3['name']}";echo "
장수
"; diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 7f9a0ad6..0e4fdd4a 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -135,11 +135,11 @@ for($j=0; $j < $citycount; $j++) { - + - + - + @@ -152,7 +152,7 @@ for($j=0; $j < $citycount; $j++) { $general = MYDB_fetch_array($genresult); if($general['npc'] >= 2) { echo "{$general['name']}, "; } elseif($general['npc'] == 1) { echo "{$general['name']}, "; } - else { echo "$general['name'], "; } + else { echo "{$general['name']}, "; } } echo " diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index 16c9a0f6..c7261994 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -134,7 +134,7 @@ for($j=0; $j < $gencount; $j++) { if($general['npc'] >= 2) { $name = "{$general['name']}"; } elseif($general['npc'] == 1) { $name = "{$general['name']}"; } - else { $name = "$general['name']"; } + else { $name = "{$general['name']}"; } $imageTemp = GetImageURL($general['imgsvr']); echo " diff --git a/twe/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php index 2ff1055d..f9441468 100644 --- a/twe/b_myKingdomInfo.php +++ b/twe/b_myKingdomInfo.php @@ -80,7 +80,7 @@ else { $budgetricediff = "$budgetricediff"; } echo "
- 【 $nation['name'] 】 + 【 {$nation['name']} 】
인구 ".round($city['pop']/$city[pop2]*100, 2)." % 태수";echo $gen1['name']==''?"-":"$gen1['name']";echo "";echo $gen1['name']==''?"-":"{$gen1['name']}";echo " 군사";echo $gen2['name']==''?"-":"$gen2['name']";echo "";echo $gen2['name']==''?"-":"{$gen2['name']}";echo " 시중";echo $gen3['name']==''?"-":"$gen3['name']";echo "";echo $gen3['name']==''?"-":"{$gen3['name']}";echo "
장수
- + @@ -92,11 +92,11 @@ echo " - + - + - + @@ -105,7 +105,7 @@ echo " - + diff --git a/twe/b_troop.php b/twe/b_troop.php index 8f7ee9ca..37e4fe93 100644 --- a/twe/b_troop.php +++ b/twe/b_troop.php @@ -102,7 +102,7 @@ for($i=0; $i < $troopcount; $i++) { for($k=0; $k < $genCount; $k++) { $general = MYDB_fetch_array($genresult); echo " - "; + "; } echo "
diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index 5471fae3..b2d46c2f 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -251,6 +251,6 @@ if($btn == "추방") { } //echo ""; -echo 'b_myBossInfo.php'//TODO:replace +echo 'b_myBossInfo.php';//TODO:replace diff --git a/twe/d_ally.php b/twe/d_ally.php index 05ae5f11..7077afea 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -77,8 +77,8 @@ if($ok == "수락") { $me = addHistory($connect, $me, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 {$when}년 불가침 수락"); //국메로 저장 - $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; - $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 {$when}년 불가침 합의, 비고: {$dip2['reserved']}"; PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 0e3759cf..92b3a124 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -69,8 +69,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 불가침 파기 동의"; - $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 불가침 파기 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 불가침 파기 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 불가침 파기 동의"; PushMsg(2, $me['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $you['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_cease.php b/twe/d_cease.php index d0847818..c03939b3 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -74,8 +74,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 종전 동의"; - $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 종전 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 종전 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 종전 동의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_merge.php b/twe/d_merge.php index 34932130..62c9ac26 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -108,8 +108,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 통합에 합의"; - $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 통합에 합의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 통합에 합의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 통합에 합의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/d_scout.php b/twe/d_scout.php index db06252a..95160cc6 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -112,44 +112,44 @@ if($ok == "수락" && $me['level'] < 12 && $nation['level'] > 0 && $nation['scou MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //현 메세지 수정 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['level'] == 12) { $mylog[count($mylog)] = "●군주입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($nation['level'] == 0) { $mylog[count($mylog)] = "●없는 국가이거나 방랑군입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($nation['scout'] != 0) { $mylog[count($mylog)] = "●임관 금지중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($admin['year'] < $admin['startyear']+3) { $mylog[count($mylog)] = "●초반 제한중입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { $mylog[count($mylog)] = "●이미 임관했었던 국가입니다. 등용 수락 불가."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { $youlog[count($youlog)] = "{$me['name']}(이)가 등용을 거부했습니다."; $mylog[count($mylog)] = "{$nation['name']}(으)로 망명을 거부했습니다."; //현 메세지 지움 - $query = "update general set msg{$num}='$nation['name'](으)로 등용 제의 거부',msg{$num}_type='10' where no='{$me['no']}'"; + $query = "update general set msg{$num}='{$nation['name']}(으)로 등용 제의 거부',msg{$num}_type='10' where no='{$me['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/d_surrender.php b/twe/d_surrender.php index 0d372cf5..dd7729e0 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -98,8 +98,8 @@ if($ok == "수락") { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //국메로 저장 - $msg = "【외교】{$admin['year']}년 {$admin['month']}월:$younation['name'](와)과 합병에 동의"; - $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:$mynation['name'](와)과 합병에 동의"; + $msg = "【외교】{$admin['year']}년 {$admin['month']}월:{$younation['name']}(와)과 합병에 동의"; + $youmsg = "【외교】{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 합병에 동의"; PushMsg(2, $mynation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $msg); PushMsg(3, $younation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$mynation['name']}▶", $mynation['color'], $younation['name'], $younation['color'], $youmsg); diff --git a/twe/func.php b/twe/func.php index 3b2a0561..75e2faeb 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1886,8 +1886,8 @@ function cityInfo($connect) { if($nation['color'] == "" || $me['skin'] < 1) { $nation['color'] = "000000"; } echo "
【 ";echo $me['nation']==0?"공 백 지":"$nation['name']";echo " 】【 ";echo $me['nation']==0?"공 백 지":"{$nation['name']}";echo " 】
총주민
국 고"; echo $nation['gold']==0?"-":"$nation['gold']"; echo ""; echo $nation['gold']==0?"-":"{$nation['gold']}"; echo " 병 량"; echo $nation['rice']==0?"-":"$nation['rice']"; echo ""; echo $nation['rice']==0?"-":"{$nation['rice']}"; echo " 세 율"; echo $me['nation']==0?"해당 없음":"$nation['rate'] %"; echo ""; echo $me['nation']==0?"해당 없음":"{$nation['rate']} %"; echo "
세곡/둔전 +$riceincomeList[0] / +$riceincomeList[1] 지급율"; echo $me['nation']==0?"해당 없음":"$nation['bill'] %"; echo ""; echo $me['nation']==0?"해당 없음":"{$nation['bill']} %"; echo "
수입/지출
- - + - + - + - + - + - + - + @@ -2044,7 +2044,7 @@ function myNationInfo($connect) { if($me['nation'] == 0) { echo "해당 없음"; } else { - echo $nation['bill']==0?"0 %":"$nation['bill'] %"; + echo $nation['bill']==0?"0 %":"{$nation['bill']} %"; } echo " @@ -2053,7 +2053,7 @@ function myNationInfo($connect) { if($me['nation'] == 0) { echo "해당 없음"; } else { - echo $nation['rate']==0?"0 %":"$nation['rate'] %"; + echo $nation['rate']==0?"0 %":"{$nation['rate']} %"; } $techCall = getTechCall($nation['tech']); @@ -2061,7 +2061,7 @@ function myNationInfo($connect) { if(TechLimit($admin['startyear'], $admin['year'], $nation['tech'])) { $nation['tech'] = "{$nation['tech']}"; } else { $nation['tech'] = "{$nation['tech']}"; } - $nation['tech'] = "$techCall / $nation['tech']"; + $nation['tech'] = "$techCall / {$nation['tech']}"; if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "{$nation['tricklimit']}턴"; } else { $nation['tricklimit'] = "가 능"; } @@ -2088,15 +2088,15 @@ function myNationInfo($connect) { - + - + - + @@ -2491,22 +2491,22 @@ function commandButton($connect) {
【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 $city['name']
"; +
【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 {$city['name']}
"; if($city['nation'] == 0) { echo "공 백 지"; @@ -2021,22 +2021,22 @@ function myNationInfo($connect) {
".getLevel(12, $nation['level'])."";echo $level12==''?"-":"$level12['name']"; echo "";echo $level12==''?"-":"{$level12['name']}"; echo " ".getLevel(11, $nation['level'])."";echo $level11==''?"-":"$level11['name']"; echo "";echo $level11==''?"-":"{$level11['name']}"; echo "
총주민";echo $me['nation']==0?"해당 없음":"$city['totpop']/$city['maxpop']";echo "";echo $me['nation']==0?"해당 없음":"{$city['totpop']}/{$city['maxpop']}";echo " 총병사";echo $me['nation']==0?"해당 없음":"$general['totcrew']/$general['maxcrew']"; echo "";echo $me['nation']==0?"해당 없음":"{$general['totcrew']}/{$general['maxcrew']}"; echo "
국 고";echo $me['nation']==0?"해당 없음":"$nation['gold']";echo "";echo $me['nation']==0?"해당 없음":"{$nation['gold']}";echo " 병 량";echo $me['nation']==0?"해당 없음":"$nation['rice']";echo "";echo $me['nation']==0?"해당 없음":"{$nation['rice']}";echo "
지급율
속 령";echo $me['nation']==0?"-":"$city['cnt']"; echo "";echo $me['nation']==0?"-":"{$city['cnt']}"; echo " 장 수";echo $me['nation']==0?"-":"$general['cnt']"; echo "";echo $me['nation']==0?"-":"{$general['cnt']}"; echo "
국 력 {$nation['power']} 기술력";echo $me['nation']==0?"-":"$nation['tech']"; echo "";echo $me['nation']==0?"-":"{$nation['tech']}"; echo "
전 략
"; - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 5) { echo ""; } + if($me['level'] >= 5) { echo ""; } else { echo ""; } - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo ""; } - echo ""; - echo ""; + echo ""; + echo ""; echo "
【회 의 실】【기 밀 실】【부대 편성】【인 사 부】【내 무 부】【사 령 부】【암 행 부】
"; @@ -2515,20 +2515,20 @@ function commandButton($connect) { "; - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - if($me['level'] >= 1) { echo ""; } + if($me['level'] >= 1) { echo ""; } else { echo ""; } - echo ""; - echo ""; - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } + echo ""; + echo ""; + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } else { echo ""; } - echo ""; - echo ""; + echo ""; + echo ""; echo "
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; @@ -2638,7 +2638,7 @@ function generalInfo($connect, $no, $skin) { case 0: case 9: case 10: $atmos = "{$general['atmos']} (-5)"; break; default: - $atmos = "$general['atmos']"; break; + $atmos = "{$general['atmos']}"; break; } switch($general['personal']) { case 3: case 5: @@ -2646,7 +2646,7 @@ function generalInfo($connect, $no, $skin) { case 1: case 8: case 10: $train = "{$general['train']} (-5)"; break; default: - $train = "$general['train']"; break; + $train = "{$general['train']}"; break; } if($general['troop'] == 0) { $troop['name'] = "-"; } if($general['mode'] == 2) { $general['mode'] = "수비 함(훈사80)"; } @@ -2733,7 +2733,7 @@ function generalInfo($connect, $no, $skin) { 부대 {$troop['name']} 벌점 - ".getConnect($general['connect'])." $general['connect']($general['con']) + ".getConnect($general['connect'])." {$general['connect']}({$general['con']}) "; } @@ -2758,17 +2758,17 @@ function generalInfo2($connect, $no, $skin) { switch($general['personal']) { case 0: case 1; case 6: - $experience = "".getHonor($general['experience'])." ($general['experience'])"; break; + $experience = "".getHonor($general['experience'])." ({$general['experience']})"; break; case 4: case 5: case 7: case 10: - $experience = "".getHonor($general['experience'])." ($general['experience'])"; break; + $experience = "".getHonor($general['experience'])." ({$general['experience']})"; break; default: - $experience = getHonor($general['experience'])." ($general['experience'])"; break; + $experience = getHonor($general['experience'])." ({$general['experience']})"; break; } switch($general['personal']) { case 10: - $dedication = "".getDed($general['dedication'])." ($general['dedication'])"; break; + $dedication = "".getDed($general['dedication'])." ({$general['dedication']})"; break; default: - $dedication = getDed($general['dedication'])." ($general['dedication'])"; break; + $dedication = getDed($general['dedication'])." ({$general['dedication']})"; break; } if($skin == 0) { @@ -5901,7 +5901,7 @@ function CheckHall($connect, $no) { $count = MYDB_num_rows($result); //승률,살상률인데 10회 미만 전투시 스킵 - if(($k == 5 || $k == 7) && {$general['warnum']}<10) { continue; } + if(($k == 5 || $k == 7) && $general['warnum']<10) { continue; } //토너승률인데 50회 미만시 스킵 if($k == 13 && $general['tt'] < 50) { continue; } //토너승률인데 50회 미만시 스킵 diff --git a/twe/func_history.php b/twe/func_history.php index 9eecf9c2..35ce714c 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -109,7 +109,7 @@ function LogHistory($connect, $isFirst=0) { $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $citycount = MYDB_num_rows($cityresult); - $nationStr .= " {$nation['name']}
"; + $nationStr .= " {$nation['name']}
"; $powerStr .= "국력 {$nation['power']}
"; $genStr .= "장수 {$nation['gennum']}
"; $cityStr .= "속령 $citycount
"; diff --git a/twe/func_process.php b/twe/func_process.php index 713fc1fa..683e5d31 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -2191,12 +2191,12 @@ function process_31($connect, &$general) { if($dist[$destination] > 2) { $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 소문만 들을 수 있었습니다. <1>$date"; - $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【{$city['name']}】주민:{$city['pop']}, 민심:{$city['rate']}, 장수:$gencount, 병력:$crew"; } elseif($dist[$destination] == 2) { $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 어느정도 정보를 얻었습니다. <1>$date"; - $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; - $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【첩보】농업:{$city['agri']}, 상업:{$city['comm']}, 치안:{$city['secu']}, 수비:{$city['def']}, 성벽:{$city['wall']}"; + $log[count($log)] = "【{$city['name']}】주민:{$city['pop']}, 민심:{$city['rate']}, 장수:$gencount, 병력:$crew"; } else { $alllog[count($alllog)] = "●{$admin['month']}월:누군가가 {$city['name']}(을)를 살피는 것 같습니다."; $log[count($log)] = "●{$admin['month']}월:{$city['name']}의 많은 정보를 얻었습니다. <1>$date"; @@ -2211,8 +2211,8 @@ function process_31($connect, &$general) { for($i=$count; $i > 0; $i-=8) { $log[count($log)] = "{$msg[$i-8]} {$msg[$i-7]} {$msg[$i-6]} {$msg[$i-5]} {$msg[$i-4]} {$msg[$i-3]} {$msg[$i-2]} {$msg[$i-1]}"; } - $log[count($log)] = "【첩보】농업:$city['agri'], 상업:$city['comm'], 치안:$city['secu'], 수비:$city['def'], 성벽:$city['wall']"; - $log[count($log)] = "【{$city['name']}】주민:$city['pop'], 민심:$city['rate'], 장수:$gencount, 병력:$crew"; + $log[count($log)] = "【첩보】농업:{$city['agri']}, 상업:{$city['comm']}, 치안:{$city['secu']}, 수비:{$city['def']}, 성벽:{$city['wall']}"; + $log[count($log)] = "【{$city['name']}】주민:{$city['pop']}, 민심:{$city['rate']}, 장수:$gencount, 병력:$crew"; if($general['nation'] != 0 && $city['nation'] != 0) { $query = "select name,tech from nation where nation='{$city['nation']}'"; diff --git a/twe/join.php b/twe/join.php index 81d435a3..05ceb001 100644 --- a/twe/join.php +++ b/twe/join.php @@ -1,7 +1,7 @@ {$nation['name']}-"; + {$nation['name']}-"; } else { echo " - {$nation['name']}{$nation['scoutmsg']}"; + {$nation['name']}{$nation['scoutmsg']}"; } } ?> diff --git a/twe/process_war.php b/twe/process_war.php index 6c2d4154..9ea5b3e4 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -353,7 +353,7 @@ function processWar($connect, $general, $city) { $general['crew'] = round($general['crew']); $cityCrew = round($cityCrew); $myCrew = round($myCrew); - $batlog[count($batlog)] = "● $phase : 【$general['name']】 {$general['crew']} (-$myCrew) VS {$city['def']} (-$cityCrew) 【$city['name']】"; + $batlog[count($batlog)] = "● $phase : 【{$general['name']}】 {$general['crew']} (-$myCrew) VS {$city['def']} (-$cityCrew) 【{$city['name']}】"; $mykillnum += $cityCrew; $mydeathnum += $myCrew; @@ -371,7 +371,7 @@ function processWar($connect, $general, $city) { if($city['def'] <= 0) { break; } if($general['crew'] <= 0) { break; } } - $res = "성 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 {$general['crew']} (-$mydeathnum) VS {$city['def']} (-$mykillnum) 【$city['name']】<1>성벽"; + $res = "성 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【{$general['name']}】 {$general['crew']} (-$mydeathnum) VS {$city['def']} (-$mykillnum) 【{$city['name']}】<1>성벽"; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; @@ -1190,8 +1190,8 @@ function processWar($connect, $general, $city) { $oppose['crew'] = round($oppose['crew']); $myCrew = round($myCrew); $opCrew = round($opCrew); - $batlog[count($batlog)] = "● $phase : 【$general['name']】 {$general['crew']} (-$myCrew) VS {$oppose['crew']} (-$opCrew) 【$oppose['name']】"; - $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose['name']】 {$oppose['crew']} (-$opCrew) VS {$general['crew']} (-$myCrew) 【$general['name']】"; + $batlog[count($batlog)] = "● $phase : 【{$general['name']}】 {$general['crew']} (-$myCrew) VS {$oppose['crew']} (-$opCrew) 【{$oppose['name']}】"; + $oppbatlog[count($oppbatlog)] = "● $phase : 【{$oppose['name']}】 {$oppose['crew']} (-$opCrew) VS {$general['crew']} (-$myCrew) 【{$general['name']}】"; $mykillnum += $opCrew; $mydeathnum += $myCrew; $opkillnum += $myCrew; $opdeathnum += $opCrew; @@ -1220,11 +1220,11 @@ function processWar($connect, $general, $city) { if($oppose['crew'] <= 0) { break; } if($general['crew'] <= 0) { break; } } - $res = "공 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【$general['name']】 {$general['crew']} (-$mydeathnum) VS {$oppose['crew']} (-$opdeathnum) 【$oppose['name']】<1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2).""; + $res = "공 <1>"._String::SubStr(getTypename($general['crewtype']), 0, 2)."【{$general['name']}】 {$general['crew']} (-$mydeathnum) VS {$oppose['crew']} (-$opdeathnum) 【{$oppose['name']}】<1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2).""; $log[count($log)] = "◆".$res; $batlog[count($batlog)] = "◆".$res; $batres[count($batres)] = "◆{$game['year']}년 {$game['month']}월: ".$res; - $oppres = "수 <1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2)."【$oppose['name']】 {$oppose['crew']} (-$opdeathnum) VS {$general['crew']} (-$mydeathnum) 【$general['name']】<1>"._String::SubStr(getTypename($general['crewtype']), 0, 2).""; + $oppres = "수 <1>"._String::SubStr(getTypename($oppose['crewtype']), 0, 2)."【{$oppose['name']}】 {$oppose['crew']} (-$opdeathnum) VS {$general['crew']} (-$mydeathnum) 【{$general['name']}】<1>"._String::SubStr(getTypename($general['crewtype']), 0, 2).""; $opplog[count($opplog)] = "◆".$oppres; $oppbatlog[count($oppbatlog)] = "◆".$oppres; $oppbatres[count($oppbatres)] = "◆{$game['year']}년 {$game['month']}월: ".$oppres; diff --git a/twe/processing.php b/twe/processing.php index 3c118730..4e71454d 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -359,8 +359,8 @@ function calc(cost, formnum) { 현재 기술력 : 현재 통솔 : 현재 병종 : - 현재 병사 : - 현재 자금 : + 현재 병사 : + 현재 자금 : @@ -793,8 +793,8 @@ function calc(cost, formnum) { 현재 기술력 : 현재 통솔 : 현재 병종 : - 현재 병사 : - 현재 자금 : + 현재 병사 : + 현재 자금 : @@ -1123,7 +1123,7 @@ function command_16($connect, $turn, $command) { 선택된 도시로 침공을 합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity['name'] => +{$currentcity['name']} => "; OptionsForCitys(); @@ -1544,7 +1544,7 @@ function command_30($connect, $turn, $command) { 최대 3칸내 도시로만 강행이 가능합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity['name'] => +{$currentcity['name']} => "; OptionsForCitys(); @@ -1630,7 +1630,7 @@ function command_32($connect, $turn, $command) { 선택된 도시에 화계를 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity['name'] => +{$currentcity['name']} => "; OptionsForCitys(); @@ -1710,7 +1710,7 @@ function command_34($connect, $turn, $command) { 선택된 도시에 파괴를 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity['name'] => +{$currentcity['name']} => "; OptionsForCitys(); @@ -1790,7 +1790,7 @@ function command_36($connect, $turn, $command) { 선택된 도시에 기습을 실행합니다.
목록을 선택하거나 도시를 클릭하세요.
-$currentcity['name'] => +{$currentcity['name']} => @@ -2163,9 +2163,9 @@ function command_51($connect, $turn, $command) { $nation = MYDB_fetch_array($result); if($myNation['power'] / $nation['power'] <= 3 || !isClose($connect, $me['nation'], $nation['nation'])) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } echo " @@ -2219,7 +2219,7 @@ function command_52($connect, $turn, $command) { for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); - echo ""; + echo ""; } echo " @@ -2306,9 +2306,9 @@ function command_53($connect, $turn, $command) { $nation = MYDB_fetch_array($result); if($myNation['power']+$nation['power'] > $cond1 || $myNation['gennum']+$nation['gennum'] > $cond2 || !isClose($connect, $me['nation'], $nation['nation'])) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } @@ -2416,7 +2416,7 @@ function command_61($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -2505,7 +2505,7 @@ function command_62($connect, $turn, $command) { case 6: $color = "black"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -2561,7 +2561,7 @@ function command_63($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "red"; break; } - echo ""; + echo ""; } echo " @@ -2617,7 +2617,7 @@ function command_64($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -2939,7 +2939,7 @@ function command_75($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -2996,7 +2996,7 @@ function command_77($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " @@ -3053,7 +3053,7 @@ function command_78($connect, $turn, $command) { case 6: $color = "red"; break; case 7: $color = "blue"; break; } - echo ""; + echo ""; } echo " diff --git a/twe/select_npc.php b/twe/select_npc.php index ea945e22..55b36561 100644 --- a/twe/select_npc.php +++ b/twe/select_npc.php @@ -71,10 +71,10 @@ for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); if($nation['scoutmsg'] == "") { echo " - {$nation['name']}-"; + {$nation['name']}-"; } else { echo " - {$nation['name']}{$nation['scoutmsg']}"; + {$nation['name']}{$nation['scoutmsg']}"; } } ?> From 1e74389e338cdc965f78a1cd0750f6e8a594537d Mon Sep 17 00:00:00 2001 From: revofpla Date: Tue, 16 Jan 2018 23:01:45 +0900 Subject: [PATCH 029/622] =?UTF-8?q?[php5=5Fdebug]=20func.php=EC=97=90?= =?UTF-8?q?=EC=84=9C=20delInDir=20=ED=95=A8=EC=88=98=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=EA=B0=80=20=EC=97=86=EB=8A=94=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=EC=97=90=20=EB=AC=B4=ED=95=9C=EB=A3=A8=ED=94=84=20?= =?UTF-8?q?=EB=8F=8C=20=EC=88=98=20=EC=9E=88=EC=9D=8C.=20=EB=94=B0?= =?UTF-8?q?=EB=9D=BC=EC=84=9C,=20opendir=EC=9D=B4=20false=EA=B0=80=20?= =?UTF-8?q?=EB=96=A8=EC=96=B4=EC=A7=80=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=20=ED=8F=B4=EB=8D=94=EB=8A=94=20=EC=97=86?= =?UTF-8?q?=EB=8B=A4=EA=B3=A0=20=EB=B3=B4=EA=B3=A0=20=EC=A7=84=ED=96=89?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=A1=9C=EC=A7=81=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/twe/func.php b/twe/func.php index 75e2faeb..5620c6c7 100644 --- a/twe/func.php +++ b/twe/func.php @@ -79,17 +79,19 @@ function abilityPowint() { function delInDir($dir) { $handle = opendir($dir); - while(false !== ($FolderOrFile = readdir($handle))) { - if($FolderOrFile == "." || $FolderOrFile == "..") { - continue; - } + if($handle !== false){ + while(false !== ($FolderOrFile = readdir($handle))) { + if ($FolderOrFile == "." || $FolderOrFile == "..") { + continue; + } - $filepath = sprintf('%s/%s', $dir, $FolderOrFile); - if(is_dir($filepath)) { - delInDir($filepath); - } // recursive - else { - @unlink($filepath); + $filepath = sprintf('%s/%s', $dir, $FolderOrFile); + if (is_dir($filepath)) { + delInDir($filepath); + } // recursive + else { + @unlink($filepath); + } } } closedir($handle); From 1082a8077d844238f339f2df4c49d977e7ff0c55 Mon Sep 17 00:00:00 2001 From: revofpla Date: Tue, 16 Jan 2018 23:18:27 +0900 Subject: [PATCH 030/622] =?UTF-8?q?[php5=5Fdebug]=20lib.php=EC=9D=98=20log?= =?UTF-8?q?Text=EC=97=90=EC=84=9C=20=ED=8F=B4=EB=8D=94=EA=B0=80=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EC=97=90=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=EB=A5=BC=20=EC=83=9D=EC=84=B1=ED=95=98=EC=97=AC,=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EC=A0=95=EC=83=81=EC=A0=81?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=83=9D=EC=84=B1=EB=90=A0=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8F=84=EB=A1=9D=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/twe/lib.php b/twe/lib.php index c28bd14f..b87313b4 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -169,7 +169,14 @@ function PrintElapsedTime() { } function LogText($prefix, $variable){ - $fp = fopen('logs/dbg_logs.txt', 'at'); + $fp = fopen('logs/dbg_logs.txt', 'a+'); + if($fp == false){ + $directory_name = dirname('logs/dbg_logs.txt'); + if(!is_dir($directory_name)){ + mkdir($directory_name); + $fp = fopen('logs/dbg_logs.txt', 'a+'); + } + } fwrite($fp, sprintf('%s : %s\n', $prefix, var_export($_POST, true))); fclose($fp); } From 9a1d23f8b9b337253e2729105e4ad95f6c5af492 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 13:05:30 +0900 Subject: [PATCH 031/622] =?UTF-8?q?[php5=5Fdebug]=20String=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4=EC=97=90=EC=84=9C=20Fill2=ED=95=A8=EC=88=98?= =?UTF-8?q?=EC=97=90=EC=84=9C=20$String=EB=B3=80=EC=88=98=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=EA=B0=80=20=EC=97=86=EC=96=B4=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EA=B0=80=20=EB=B0=9C=EC=83=9D.=20=EA=B2=BD=EC=9A=B0?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=8D=94=EB=AF=B8=EA=B0=92?= =?UTF-8?q?=EC=9D=B4=20=EB=93=A4=EC=96=B4=EA=B0=88=20=EC=97=AC=EC=A7=80?= =?UTF-8?q?=EA=B0=80=20=EC=9E=88=EC=96=B4=20for=EB=AC=B8=20=EC=95=9E?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=B4=88=EA=B8=B0=ED=99=94=EB=A5=BC=201?= =?UTF-8?q?=ED=9A=8C=20=EC=88=98=ED=96=89.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_func/class._String.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/f_func/class._String.php b/f_func/class._String.php index 5ab0cbb6..be0865eb 100644 --- a/f_func/class._String.php +++ b/f_func/class._String.php @@ -173,7 +173,7 @@ class _String { $size = strlen($str); $count = ($maxsize - $size); - + $string = ''; for($i=0; $i < $count; $i++) { $string = $string.$ch; } From 8c0d913e894f795b4d0f484768706555dcfaad3f Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 13:06:34 +0900 Subject: [PATCH 032/622] =?UTF-8?q?[php5=5Fdebug]=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20=EB=A1=9C=EC=A7=81=EC=97=90=EC=84=9C=20DB?= =?UTF-8?q?=EC=97=90=20INSERT=EC=88=98=ED=96=89=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=EC=97=90=EC=84=9C=20column=EB=AA=85=EC=97=90?= =?UTF-8?q?=20=EB=94=B0=EC=98=B4=ED=91=9C=EA=B0=80=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=98=EC=96=B4=20json=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90?= =?UTF-8?q?=20php=20notice=EA=B0=80=20=EB=B0=98=ED=99=98=EB=90=98=EC=96=B4?= =?UTF-8?q?=20=EC=A0=81=EC=A0=88=ED=95=98=EA=B2=8C=20=ED=95=B8=EB=93=A4?= =?UTF-8?q?=EB=A7=81=EB=90=98=EC=A7=80=20=EB=AA=BB=ED=95=98=EA=B3=A0=20?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_login/join/Post.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/i_login/join/Post.php b/i_login/join/Post.php index ace78906..5507b0cd 100644 --- a/i_login/join/Post.php +++ b/i_login/join/Post.php @@ -160,14 +160,14 @@ if($response['result'] != 'SUCCESS') { // 멤버 등록 $DB->InsertArray('MEMBER', array( - ID => $id, - PW => $pw, - PID => $pid, - NAME => $name, - EMAIL => $email, - IP => $_SERVER['REMOTE_ADDR'], - GRADE => 1, - REG_DATE => _Time::DatetimeNow() + 'ID' => $id, + 'PW' => $pw, + 'PID' => $pid, + 'NAME' => $name, + 'EMAIL' => $email, + 'IP' => $_SERVER['REMOTE_ADDR'], + 'GRADE' => 1, + 'REG_DATE' => _Time::DatetimeNow() )); $response['result'] = 'SUCCESS'; From a9fa1b9d37ddcd99956cb4e10e0fe1f734118cbd Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 13:19:56 +0900 Subject: [PATCH 033/622] =?UTF-8?q?[php5=5Fdebug]=20InsertArray=EB=AC=B8?= =?UTF-8?q?=EC=9D=98=20=EC=BB=AC=EB=9F=BC=EB=AA=85=20=EB=94=B0=EC=98=B4?= =?UTF-8?q?=ED=91=9C=20=EB=88=84=EB=9D=BD=20=EC=9D=BC=EA=B4=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_entrance/donation/Post.php | 16 ++++++++-------- i_login/findpw/sendCodePost.php | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/i_entrance/donation/Post.php b/i_entrance/donation/Post.php index 7a4293cd..260a736d 100644 --- a/i_entrance/donation/Post.php +++ b/i_entrance/donation/Post.php @@ -40,14 +40,14 @@ if($member['GRADE'] < 6) { $total = $donator['TOT'] + $amount; $DB->InsertArray('DONATION', array( - ID => $id, - NAME => $name, - RNAME => $rname, - SUBNAME => $subname, - DATE => $date, - AMOUNT => $amount, - CUMUL => $cumul, - TOTAL => $total + 'ID' => $id, + 'NAME' => $name, + 'RNAME' => $rname, + 'SUBNAME' => $subname, + 'DATE' => $date, + 'AMOUNT' => $amount, + 'CUMUL' => $cumul, + 'TOTAL' => $total )); $response['result'] = 'SUCCESS'; diff --git a/i_login/findpw/sendCodePost.php b/i_login/findpw/sendCodePost.php index e062ef40..9ce8fa20 100644 --- a/i_login/findpw/sendCodePost.php +++ b/i_login/findpw/sendCodePost.php @@ -32,10 +32,10 @@ if($err == 1) { $DB->Delete('EMAIL', "EMAIL='{$email}'"); } $DB->InsertArray('EMAIL', array( - EMAIL => $email, - CODE => $code, - VERIFIED=> 0, - REG_DATE=> _Time::DatetimeNow() + 'EMAIL' => $email, + 'CODE' => $code, + 'VERIFIED'=> 0, + 'REG_DATE'=> _Time::DatetimeNow() )); $response['result'] = 'SUCCESS'; From 80368dd140f8f74bdc1eeefacf3e66c3660a3452 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 13:21:19 +0900 Subject: [PATCH 034/622] =?UTF-8?q?[php5=5Fdebug]=20updateArray=EB=AC=B8?= =?UTF-8?q?=EC=9D=98=20=EC=BB=AC=EB=9F=BC=EB=AA=85=20=EB=94=B0=EC=98=B4?= =?UTF-8?q?=ED=91=9C=20=EB=88=84=EB=9D=BD=20=EC=9D=BC=EA=B4=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_entrance/manage/quitPost.php | 4 ++-- i_login/findpw/verifyCodePost.php | 4 ++-- i_login/join/verifyCodePost.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/i_entrance/manage/quitPost.php b/i_entrance/manage/quitPost.php index d3e1f51f..fc505b41 100644 --- a/i_entrance/manage/quitPost.php +++ b/i_entrance/manage/quitPost.php @@ -19,8 +19,8 @@ if($member['PW'] != $pw) { $response['msg'] = '실패: 현재 비밀번호가 일치하지 않습니다.'; } else { $DB->UpdateArray('MEMBER', array( - QUIT => 'Y', - REG_DATE=> _Time::DatetimeNow() + 'QUIT' => 'Y', + 'REG_DATE'=> _Time::DatetimeNow() ), "NO='{$SESSION->NoMember()}'"); diff --git a/i_login/findpw/verifyCodePost.php b/i_login/findpw/verifyCodePost.php index 9926eaa9..4f166455 100644 --- a/i_login/findpw/verifyCodePost.php +++ b/i_login/findpw/verifyCodePost.php @@ -32,8 +32,8 @@ if($err == 1) { $response['msg'] = '인증번호가 일치하지 않습니다.'; } else { $DB->UpdateArray('EMAIL', array( - VERIFIED=> 1, - VRF_DATE=> _Time::DatetimeNow() + 'VERIFIED'=> 1, + 'VRF_DATE'=> _Time::DatetimeNow() ), "EMAIL='{$email}'"); $response['result'] = 'SUCCESS'; diff --git a/i_login/join/verifyCodePost.php b/i_login/join/verifyCodePost.php index 9926eaa9..4f166455 100644 --- a/i_login/join/verifyCodePost.php +++ b/i_login/join/verifyCodePost.php @@ -32,8 +32,8 @@ if($err == 1) { $response['msg'] = '인증번호가 일치하지 않습니다.'; } else { $DB->UpdateArray('EMAIL', array( - VERIFIED=> 1, - VRF_DATE=> _Time::DatetimeNow() + 'VERIFIED'=> 1, + 'VRF_DATE'=> _Time::DatetimeNow() ), "EMAIL='{$email}'"); $response['result'] = 'SUCCESS'; From f2113d235bd81232bec0b0d7e76f78d3e1cb50b2 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 13:46:18 +0900 Subject: [PATCH 035/622] =?UTF-8?q?[php5=5Fdebug]=20twe/data/session=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=EA=B0=80=20=EC=97=86=EB=8A=94=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0,=20=ED=95=B4=EB=8B=B9=20=ED=8F=B4=EB=8D=94=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=A1=9C=EC=A7=81=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=ED=84=B0=EC=A7=90.=20=ED=95=B4=EB=8B=B9?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81=EC=97=90=EC=84=9C=20mkdir=EC=9D=84=20?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/lib.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/twe/lib.php b/twe/lib.php index b87313b4..9049f7cc 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -64,8 +64,21 @@ unset($member); unset($setup); // Data, Icon, 세션디렉토리의 쓰기 권한이 없다면 에러 처리 -if(!is_writable("data")) Error("Data 디렉토리의 쓰기 권한이 없습니다!"); -if(!is_writable("data/session")) Error("세션 디렉토리 data/session의 쓰기 권한이 없습니다!"); +// 단, 폴더가 없는 경우라면 폴더를 생성 할 필요가 있음. +// data폴더가 없으면 data/session까지 생성 +if(is_dir("data")){ + if(!is_writable("data")) Error("Data 디렉토리의 쓰기 권한이 없습니다!"); + if(is_dir("data/session")){ + if(!is_writable("data/session")) Error("세션 디렉토리 data/session의 쓰기 권한이 없습니다!"); + }else{ + mkdir("data/session"); + } +}else{ + mkdir("data"); + mkdir("data/session"); +} + + session_save_path('data/session'); session_cache_limiter('nocache, must_revalidate'); From 16858743a782c971731a3f92509de5638dedec8f Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 14:01:00 +0900 Subject: [PATCH 036/622] =?UTF-8?q?[php5=5Fdebug]=20=EC=A0=91=EC=86=8D?= =?UTF-8?q?=EC=A4=91=20=EC=A0=95=EB=B3=B4=EB=A5=BC=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=ED=95=A0=20=EB=95=8C=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=20=EC=95=88=ED=95=9C=20=EB=B3=80=EC=88=98,=20?= =?UTF-8?q?=EA=B1=B4=EA=B5=AD=EA=B5=AD=EA=B0=80=EA=B0=80=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=20=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EC=9B=8C=EB=8B=9D,=20empty=20array=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=9C=20foreach=20=EB=93=B1=EC=9D=98=20=EB=A1=9C=EC=A7=81?= =?UTF-8?q?=EC=9D=84=20=EA=B0=9C=EC=84=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/twe/func.php b/twe/func.php index 5620c6c7..f6cee524 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3979,23 +3979,29 @@ function updateOnline($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $onlinenum = MYDB_num_rows($result); + $onnation = array(); + $onnationstr = ""; + //국가별 접속중인 장수 for($i=0; $i < $onlinenum; $i++) { $general = MYDB_fetch_array($result); $onnation[$general['nation']] .= $general['name'].', '; } - - foreach($onnation as $key => $val) { - $onnationstr .= "【{$nationname[$key]}】, "; - - if($key == 0) { - $query = "update game set onlinegen='$onnation[0]' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update nation set onlinegen='$onnation[$key]' where nation='$key'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } + + //$onnation이 empty라면 굳이 foreach를 수행 할 이유가 없음. + if(!empty($onnation)){ + foreach($onnation as $key => $val) { + $onnationstr .= "【{$nationname[$key]}】, "; + + if($key == 0) { + $query = "update game set onlinegen='$onnation[0]' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + $query = "update nation set onlinegen='$onnation[$key]' where nation='$key'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + } + } //접속중인 국가 $query = "update game set online='$onlinenum',onlinenation='$onnationstr' where no='1'"; From edacc1f585d507384bd1e9bfea68f6f4629c87fe Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 14:32:46 +0900 Subject: [PATCH 037/622] =?UTF-8?q?[php5=5Fdebug]=20func.php=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=94=B0=EC=98=B4=ED=91=9C=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=9C=20=EB=B6=80=EB=B6=84=EC=97=90=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 86 ++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/twe/func.php b/twe/func.php index f6cee524..1edc4719 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1337,34 +1337,34 @@ function getItemCost($weap) { } function getTurn($connect, $general, $type, $font=1) { - $turn[0] = $general[turn0]; + $turn[0] = $general["turn0"]; if($type >= 1) { - $turn[1] = $general[turn1]; - $turn[2] = $general[turn2]; - $turn[3] = $general[turn3]; - $turn[4] = $general[turn4]; - $turn[5] = $general[turn5]; + $turn[1] = $general["turn1"]; + $turn[2] = $general["turn2"]; + $turn[3] = $general["turn3"]; + $turn[4] = $general["turn4"]; + $turn[5] = $general["turn5"]; } if($type >= 2) { - $turn[6] = $general[turn6]; - $turn[7] = $general[turn7]; - $turn[8] = $general[turn8]; - $turn[9] = $general[turn9]; - $turn[10] = $general[turn10]; - $turn[11] = $general[turn11]; - $turn[12] = $general[turn12]; - $turn[13] = $general[turn13]; - $turn[14] = $general[turn14]; - $turn[15] = $general[turn15]; - $turn[16] = $general[turn16]; - $turn[17] = $general[turn17]; - $turn[18] = $general[turn18]; - $turn[19] = $general[turn19]; - $turn[20] = $general[turn20]; - $turn[21] = $general[turn21]; - $turn[22] = $general[turn22]; - $turn[23] = $general[turn23]; + $turn[6] = $general["turn6"]; + $turn[7] = $general["turn7"]; + $turn[8] = $general["turn8"]; + $turn[9] = $general["turn9"]; + $turn[10] = $general["turn10"]; + $turn[11] = $general["turn11"]; + $turn[12] = $general["turn12"]; + $turn[13] = $general["turn13"]; + $turn[14] = $general["turn14"]; + $turn[15] = $general["turn15"]; + $turn[16] = $general["turn16"]; + $turn[17] = $general["turn17"]; + $turn[18] = $general["turn18"]; + $turn[19] = $general["turn19"]; + $turn[20] = $general["turn20"]; + $turn[21] = $general["turn21"]; + $turn[22] = $general["turn22"]; + $turn[23] = $general["turn23"]; } if($type == 0) { $count = 1; } @@ -1871,13 +1871,13 @@ function cityInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $pop = $city['pop'] / $city[pop2] * 100; + $pop = $city['pop'] / $city['pop2'] * 100; $rate = $city['rate']; - $agri = $city['agri'] / $city[agri2] * 100; - $comm = $city['comm'] / $city[comm2] * 100; - $secu = $city['secu'] / $city[secu2] * 100; - $def = $city['def'] / $city[def2] * 100; - $wall = $city['wall'] / $city[wall2] * 100; + $agri = $city['agri'] / $city['agri2'] * 100; + $comm = $city['comm'] / $city['comm2'] * 100; + $secu = $city['secu'] / $city['secu2'] * 100; + $def = $city['def'] / $city['def2'] * 100; + $wall = $city['wall'] / $city['wall2'] * 100; if($city['trade'] == 0) { $trade = 0; $tradeStr = "상인없음"; @@ -1897,7 +1897,7 @@ function cityInfo($connect) { echo "지배 국가 【 {$nation['name']} 】"; } - if($city[gen1] > 0) { + if($city['gen1'] > 0) { $query = "select name from general where no='$city[gen1]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen1 = MYDB_fetch_array($result); @@ -1905,7 +1905,7 @@ function cityInfo($connect) { $gen1['name'] = '-'; } - if($city[gen2] > 0) { + if($city['gen2'] > 0) { $query = "select name from general where no='$city[gen2]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen2 = MYDB_fetch_array($result); @@ -1913,7 +1913,7 @@ function cityInfo($connect) { $gen2['name'] = '-'; } - if($city[gen3] > 0) { + if($city['gen3'] > 0) { $query = "select name from general where no='$city[gen3]'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen3 = MYDB_fetch_array($result); @@ -1933,7 +1933,7 @@ function cityInfo($connect) { {$gen1['name']} - {$city['pop']}/{$city[pop2]} + {$city['pop']}/{$city['pop2']} {$city['rate']} @@ -1947,9 +1947,9 @@ function cityInfo($connect) { {$gen2['name']} - {$city['agri']}/{$city[agri2]} - {$city['comm']}/{$city[comm2]} - {$city['secu']}/{$city[secu2]} + {$city['agri']}/{$city['agri2']} + {$city['comm']}/{$city['comm2']} + {$city['secu']}/{$city['secu2']} 수비 @@ -1962,8 +1962,8 @@ function cityInfo($connect) { {$gen3['name']} - {$city['def']}/{$city[def2]} - {$city['wall']}/{$city[wall2]} + {$city['def']}/{$city['def2']} + {$city['wall']}/{$city['wall2']} {$tradeStr} @@ -2632,7 +2632,7 @@ function generalInfo($connect, $no, $skin) { $general['connect'] = round($general['connect'] / 10, 0) * 10; $special = $general['special'] == 0 ? "{$general['specage']}세" : "".getGenSpecial($general['special']).""; - $special2 = $general[special2] == 0 ? "{$general[specage2]}세" : "".getGenSpecial($general[special2]).""; + $special2 = $general['special2'] == 0 ? "{$general['specage2']}세" : "".getGenSpecial($general['special2']).""; switch($general['personal']) { case 2: case 4: @@ -2675,13 +2675,13 @@ function generalInfo($connect, $no, $skin) { 통솔  {$color}{$leader}
{$lbonus}  - ".bar(expStatus($general[leader2]), $skin, 20)." + ".bar(expStatus($general['leader2']), $skin, 20)." 무력  {$color}{$power}
  - ".bar(expStatus($general[power2]), $skin, 20)." + ".bar(expStatus($general['power2']), $skin, 20)." 지력  {$color}{$intel}
  - ".bar(expStatus($general[intel2]), $skin, 20)." + ".bar(expStatus($general['intel2']), $skin, 20)." 명마 From 1b45add2e94b7992b87610b5f6608e520e17382f Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 15:02:18 +0900 Subject: [PATCH 038/622] =?UTF-8?q?[php5=5Fdebug]=20func.php=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=94=B0=EC=98=B4=ED=91=9C=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=9C=20=EB=B6=80=EB=B6=84=EC=97=90=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20empty=20array=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80,=20=EB=B6=88=ED=95=84=EC=9A=94=20=EC=A3=BC?= =?UTF-8?q?=EC=84=9D=EC=B2=98=EB=A6=AC=EC=86=8C=EC=8A=A4=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 30 ++++++++++++++++++++---------- twe/main.php | 4 ---- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/twe/func.php b/twe/func.php index 1edc4719..27f97990 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3001,7 +3001,9 @@ function AllLog($count, $skin) { @fclose($fp); $log = explode("\r\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + } echo $str; } @@ -3023,7 +3025,9 @@ function History($count, $skin) { @fclose($fp); $log = explode("\r\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + } echo $str; } @@ -3034,7 +3038,9 @@ function MyLog($no, $count, $skin) { @fclose($fp); $log = explode("\r\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + } echo $str; } @@ -3315,11 +3321,11 @@ function MsgDip($connect, $bg) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - if($nation[dip0]) { echo "\n"; DecodeMsg($connect, $nation[dip0], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } - if($nation[dip1]) { echo "\n"; DecodeMsg($connect, $nation[dip1], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } - if($nation[dip2]) { echo "\n"; DecodeMsg($connect, $nation[dip2], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } - if($nation[dip3]) { echo "\n"; DecodeMsg($connect, $nation[dip3], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } - if($nation[dip4]) { echo "\n"; DecodeMsg($connect, $nation[dip4], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } + if($nation['dip0']) { echo "\n"; DecodeMsg($connect, $nation['dip0'], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } + if($nation['dip1']) { echo "\n"; DecodeMsg($connect, $nation['dip1'], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } + if($nation['dip2']) { echo "\n"; DecodeMsg($connect, $nation['dip2'], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } + if($nation['dip3']) { echo "\n"; DecodeMsg($connect, $nation['dip3'], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } + if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } } // type : xx,xx(불가침기간,타입) @@ -3412,10 +3418,14 @@ function MsgFile($skin, $bg, $nation=0, $level=0) { @fclose($fp); $code = explode("\r\n",$file); for($i=0; $i < $count; $i++) { - $msg = explode("|", $code[count($code)-2-$i]); + $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); $cnt = count($msg); - for($k=0; $k < $cnt; $k++) { $msg[$k] = trim($msg[$k]); } + if(!empty($cnt)){ + for($k=0; $k < $cnt; $k++) { + $msg[$k] = trim($msg[$k]); + } + } ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); } diff --git a/twe/main.php b/twe/main.php index b4dfeb7a..22831d26 100644 --- a/twe/main.php +++ b/twe/main.php @@ -53,7 +53,6 @@ $scenario = getScenario($connect); type=text/css> '; if($me['nation'] == 0) { $nation['name'] = '재야'; $nation['color'] = 'FFFFFF'; @@ -47,6 +50,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { if($me['nation'] == 0) { $nation['name'] = '재야'; $nation['color'] = 'FFFFFF'; + $nation['nation'] = 0; } else { $query = "select nation,name,color from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -57,6 +61,13 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $query = "select nation,name,color from nation where nation='$genlist'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dest = MYDB_fetch_array($result); + + //$dest가 없다는건 수신도 재야. + if(empty($dest)){ + $dest['name'] = '재야'; + $dest['color'] = 'FFFFFF'; + $dest['nation'] = 0; + } if($nation['nation'] == $dest['nation']) { PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $dest['name'], $dest['color'], $msg); @@ -113,6 +124,6 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { fclose($fp); } -//echo ""; -echo 'msglist.php';//TODO:replace +echo ""; +//echo 'msglist.php';//TODO:replace diff --git a/twe/func.php b/twe/func.php index 27f97990..50250199 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3184,7 +3184,8 @@ function genList($connect) { $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - + $you = array(); + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $reply = MYDB_fetch_array($result); @@ -3426,8 +3427,9 @@ function MsgFile($skin, $bg, $nation=0, $level=0) { $msg[$k] = trim($msg[$k]); } } - - ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); + if(!empty($msg)){ + ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); + } } } diff --git a/twe/func_string.php b/twe/func_string.php index 489c767d..c8a6561a 100644 --- a/twe/func_string.php +++ b/twe/func_string.php @@ -236,6 +236,22 @@ class _String { } return $string; } + + function Fill($str, $maxsize, $ch) { + $size = strlen($str); + + $count = ($maxsize - $size) / 2; + + $string = ''; + for($i=0; $i < $count; $i++) { + $string = $string.$ch; + } + $string = $string.$str; + for($i=0; $i < $count; $i++) { + $string = $string.$ch; + } + return $string; + } //우측정렬 public static function Fill2($str, $maxsize, $ch='0') { From d93c56dae19749507312a4af81e2f646ed8bb88e Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:17:22 +0900 Subject: [PATCH 040/622] =?UTF-8?q?[php5=5Fdebug]=20=EB=AF=B8=EC=A0=90?= =?UTF-8?q?=EB=A0=B9=20=EC=A7=80=EC=97=AD=EC=9D=B8=20=EA=B2=BD=EC=9A=B0?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=9C=20=EC=A7=80=EB=8F=84=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=20=EB=A1=9C=EC=A7=81=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/map.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/twe/map.php b/twe/map.php index 96eaaadc..4cc69839 100644 --- a/twe/map.php +++ b/twe/map.php @@ -1,6 +1,7 @@ @@ -232,14 +233,24 @@ function showMap($connect, $type, $graphic) { 210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435 ); + $nationname = array(); + $nationcolor = array(); + $nationCapital = array(); + $query = "select name,level,nation,city,state,region,supply from city"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); for($i=0; $i < $allcount; $i++) { $city = MYDB_fetch_array($result); $name = $city['name']; - $nation = $nationname[$city['nation']]; - $color = $nationcolor[$city['nation']]; - $capital = $nationCapital[$city['nation']]; + if($city['nation']!=0){ + $nation = $nationname[$city['nation']]; + $color = $nationcolor[$city['nation']]; + $capital = $nationCapital[$city['nation']]; + }else{ + $nation = ""; + $color = "FFFFFF"; + $capital = ""; + } $level = $city['level']; $state = $city['state']; $region = $city['region']; From 32ca97ed4d5c4b9545c3f7c7d1330edb8cb0f004 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:34:21 +0900 Subject: [PATCH 041/622] =?UTF-8?q?[php5=5Fdebug]=20=EC=82=AC=EC=8B=A4=20?= =?UTF-8?q?=EC=9E=AC=EC=95=BC=EC=9D=BC=EB=95=8C=EB=8A=94=20=EA=B5=AD?= =?UTF-8?q?=EA=B0=80=EC=A0=95=EB=B3=B4=20=ED=8C=A8=EB=84=90=EC=9D=98=20?= =?UTF-8?q?=EB=8C=80=EB=B6=80=EB=B6=84=20=EC=A0=95=EB=B3=B4=EA=B0=80=20'?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=20=EC=97=86=EC=9D=8C'=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=82=98=EC=99=80=EC=95=BC=20=EB=A7=9E=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=84=EA=B9=8C=20=EC=8B=B6=EC=9C=BC=EC=9A=94....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_login/join/sendCodePost.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/i_login/join/sendCodePost.php b/i_login/join/sendCodePost.php index 5c74adfe..4347afaa 100644 --- a/i_login/join/sendCodePost.php +++ b/i_login/join/sendCodePost.php @@ -9,39 +9,39 @@ require_once(ROOT.W.F_FUNC.W.'class._String.php'); require_once(ROOT.W.F_FUNC.W.'class._Validation.php'); require_once(ROOT.W.F_FUNC.W.'class._Time.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); -require_once(ROOT.W.F_CONFIG.W.'MAIL'.PHP); +//require_once(ROOT.W.F_CONFIG.W.'MAIL'.PHP); $response['result'] = 'FAIL'; -$err = _Validation::CheckEmail($email); -if($err == 1) { - $response['result'] = 'FAIL'; - $response['msg'] = '이메일이 올바르지 않습니다!'; -} elseif($err == 0) { +//$err = _Validation::CheckEmail($email); +//if($err == 1) { +// $response['result'] = 'FAIL'; +// $response['msg'] = '이메일이 올바르지 않습니다!'; +//} elseif($err == 0) { $code = _String::Fill2(rand()%1000000, 6); - $res = $MAIL->Send($email, 'Auth code from 62che.com', "인증번호: {$code}"); +// $res = $MAIL->Send($email, 'Auth code from 62che.com', "인증번호: {$code}"); - if($res['result'] != 0) { - $response['result'] = 'FAIL'; - $response['msg'] = '이메일전송이 실패: '.$res['msg']; - } else { +// if($res['result'] != 0) { +// $response['result'] = 'FAIL'; +// $response['msg'] = '이메일전송이 실패: '.$res['msg']; +// } else { $rs = $DB->Select('EMAIL', 'EMAIL', "EMAIL='{$email}'"); $count = $DB->Count($rs); if($count > 0) { $DB->Delete('EMAIL', "EMAIL='{$email}'"); } $DB->InsertArray('EMAIL', array( - EMAIL => $email, - CODE => $code, - VERIFIED=> 0, - REG_DATE=> _Time::DatetimeNow() + 'EMAIL' => $email, + 'CODE' => $code, + 'VERIFIED'=> 0, + 'REG_DATE'=> _Time::DatetimeNow() )); $response['result'] = 'SUCCESS'; $response['msg'] = $email.'로 인증번호가 전송되었습니다. 이메일을 확인하세요.'; - } -} +// } +//} //sleep(1); echo json_encode($response); From 0ddd8b1baede2496b0b227b77ef5301181d1174c Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:36:09 +0900 Subject: [PATCH 042/622] =?UTF-8?q?Revert=20"[php5=5Fdebug]=20=EC=82=AC?= =?UTF-8?q?=EC=8B=A4=20=EC=9E=AC=EC=95=BC=EC=9D=BC=EB=95=8C=EB=8A=94=20?= =?UTF-8?q?=EA=B5=AD=EA=B0=80=EC=A0=95=EB=B3=B4=20=ED=8C=A8=EB=84=90?= =?UTF-8?q?=EC=9D=98=20=EB=8C=80=EB=B6=80=EB=B6=84=20=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=EA=B0=80=20'=ED=95=B4=EB=8B=B9=20=EC=97=86=EC=9D=8C'=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=82=98=EC=99=80=EC=95=BC=20=EB=A7=9E=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=84=EA=B9=8C=20=EC=8B=B6=EC=9C=BC=EC=9A=94...."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 32ca97ed4d5c4b9545c3f7c7d1330edb8cb0f004. --- i_login/join/sendCodePost.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/i_login/join/sendCodePost.php b/i_login/join/sendCodePost.php index 4347afaa..5c74adfe 100644 --- a/i_login/join/sendCodePost.php +++ b/i_login/join/sendCodePost.php @@ -9,39 +9,39 @@ require_once(ROOT.W.F_FUNC.W.'class._String.php'); require_once(ROOT.W.F_FUNC.W.'class._Validation.php'); require_once(ROOT.W.F_FUNC.W.'class._Time.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); -//require_once(ROOT.W.F_CONFIG.W.'MAIL'.PHP); +require_once(ROOT.W.F_CONFIG.W.'MAIL'.PHP); $response['result'] = 'FAIL'; -//$err = _Validation::CheckEmail($email); -//if($err == 1) { -// $response['result'] = 'FAIL'; -// $response['msg'] = '이메일이 올바르지 않습니다!'; -//} elseif($err == 0) { +$err = _Validation::CheckEmail($email); +if($err == 1) { + $response['result'] = 'FAIL'; + $response['msg'] = '이메일이 올바르지 않습니다!'; +} elseif($err == 0) { $code = _String::Fill2(rand()%1000000, 6); -// $res = $MAIL->Send($email, 'Auth code from 62che.com', "인증번호: {$code}"); + $res = $MAIL->Send($email, 'Auth code from 62che.com', "인증번호: {$code}"); -// if($res['result'] != 0) { -// $response['result'] = 'FAIL'; -// $response['msg'] = '이메일전송이 실패: '.$res['msg']; -// } else { + if($res['result'] != 0) { + $response['result'] = 'FAIL'; + $response['msg'] = '이메일전송이 실패: '.$res['msg']; + } else { $rs = $DB->Select('EMAIL', 'EMAIL', "EMAIL='{$email}'"); $count = $DB->Count($rs); if($count > 0) { $DB->Delete('EMAIL', "EMAIL='{$email}'"); } $DB->InsertArray('EMAIL', array( - 'EMAIL' => $email, - 'CODE' => $code, - 'VERIFIED'=> 0, - 'REG_DATE'=> _Time::DatetimeNow() + EMAIL => $email, + CODE => $code, + VERIFIED=> 0, + REG_DATE=> _Time::DatetimeNow() )); $response['result'] = 'SUCCESS'; $response['msg'] = $email.'로 인증번호가 전송되었습니다. 이메일을 확인하세요.'; -// } -//} + } +} //sleep(1); echo json_encode($response); From 793f0055e629a8b5ed60a772f1a2266168da41ea Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:37:35 +0900 Subject: [PATCH 043/622] =?UTF-8?q?[php5=5Fdebug]=20=EC=82=AC=EC=8B=A4=20?= =?UTF-8?q?=EC=9E=AC=EC=95=BC=EC=9D=BC=EB=95=8C=EB=8A=94=20=EA=B5=AD?= =?UTF-8?q?=EA=B0=80=EC=A0=95=EB=B3=B4=20=ED=8C=A8=EB=84=90=EC=9D=98=20?= =?UTF-8?q?=EB=8C=80=EB=B6=80=EB=B6=84=20=EC=A0=95=EB=B3=B4=EA=B0=80=20'?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=20=EC=97=86=EC=9D=8C'=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=82=98=EC=99=80=EC=95=BC=20=EB=A7=9E=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EC=9D=84=EA=B9=8C=20=EC=8B=B6=EC=9C=BC=EC=9A=94....?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/twe/func.php b/twe/func.php index 50250199..36c9b23f 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2064,18 +2064,28 @@ function myNationInfo($connect) { else { $nation['tech'] = "{$nation['tech']}"; } $nation['tech'] = "$techCall / {$nation['tech']}"; - - if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "{$nation['tricklimit']}턴"; } - else { $nation['tricklimit'] = "가 능"; } - - if($nation['surlimit'] != 0) { $nation['surlimit'] = "{$nation['surlimit']}턴"; } - else { $nation['surlimit'] = "가 능"; } - - if($nation['scout'] != 0) { $nation['scout'] = "금 지"; } - else { $nation['scout'] = "허 가"; } - - if($nation['war'] != 0) { $nation['war'] = "금 지"; } - else { $nation['war'] = "허 가"; } + + if($me['nation']==0){ + $nation['tricklimit'] = "해당 없음"; + $nation['surlimit'] = "해당 없음"; + $nation['scout'] = "해당 없음"; + $nation['war'] = "해당 없음"; + $nation['power'] = "해당 없음"; + } else { + if($nation['tricklimit'] != 0) { $nation['tricklimit'] = "{$nation['tricklimit']}턴"; } + else { $nation['tricklimit'] = "가 능"; } + + if($nation['surlimit'] != 0) { $nation['surlimit'] = "{$nation['surlimit']}턴"; } + else { $nation['surlimit'] = "가 능"; } + + if($nation['scout'] != 0) { $nation['scout'] = "금 지"; } + else { $nation['scout'] = "허 가"; } + + if($nation['war'] != 0) { $nation['war'] = "금 지"; } + else { $nation['war'] = "허 가"; } + + + } if($me['skin'] == 0) { $nation['tech'] = unfont($nation['tech']); From 33ffaa573d15e376e90c9d814539fa3f3985d8b1 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:47:16 +0900 Subject: [PATCH 044/622] =?UTF-8?q?[php5=5Fdebug]=20general=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=EC=9D=98=20skin=EC=A0=95=EB=B3=B4=EB=8A=94?= =?UTF-8?q?=20=EC=8B=A4=EC=8B=9C=EA=B0=84=EC=9C=BC=EB=A1=9C=20=EB=95=A1?= =?UTF-8?q?=EA=B2=A8=EC=98=A4=EB=8A=94=EA=B2=8C=20=EB=A7=9E=EB=8B=A4?= =?UTF-8?q?=EA=B3=A0=20=ED=8C=90=EB=8B=A8=ED=95=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/twe/func.php b/twe/func.php index 36c9b23f..88159667 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3179,7 +3179,7 @@ function onlineNation($connect) { } function nationMsg($connect) { - $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3187,7 +3187,7 @@ function nationMsg($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - echo "".$nation['msg'].""; + echo "".$nation['msg'].""; } function genList($connect) { From 55fb7d6e92af8225f2e2333a003a0d6c2b08f4da Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:53:18 +0900 Subject: [PATCH 045/622] =?UTF-8?q?[php5=5Fdebug]=20=EC=A0=81=EC=A0=88?= =?UTF-8?q?=ED=95=9C=20=EC=B5=9C=EC=A0=81=ED=99=94=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=9F=B0=20=EB=AA=A8=EB=93=9C=EA=B0=80=20=ED=95=84=EC=9A=94?= =?UTF-8?q?=EC=97=86=EA=B2=8C=20=ED=95=B4=EC=95=BC=20=ED=95=A0=20=EA=B2=83?= =?UTF-8?q?=EC=9D=B4=EA=B8=B0=EC=97=90=20=EA=B3=BC=EA=B0=90=ED=95=98?= =?UTF-8?q?=EA=B2=8C=20=EC=82=AD=EC=A0=9C=ED=95=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/main.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/twe/main.php b/twe/main.php index 22831d26..b6b51ec3 100644 --- a/twe/main.php +++ b/twe/main.php @@ -168,11 +168,7 @@ if($valid == 1) { $thr3) { $state = "(긴급모드)"; } -elseif($onlineNumber > $thr2) { $state = "(안전모드)"; } -elseif($onlineNumber > $thr1) { $state = "(절약모드)"; } -else { $state = ""; } -if($plock['plock'] == 0) { echo "서버 가동중{$state}"; } +if($plock['plock'] == 0) { echo "서버 가동중"; } else { echo "서버 동결중{$state}"; } echo " From 90ac4797700586b61e18c925a6707c2af8f81b91 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 17:58:46 +0900 Subject: [PATCH 046/622] =?UTF-8?q?[php5=5Fdebug]=20=EB=82=B4=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=EC=9D=98=20=EC=A0=84=ED=88=AC=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A0=84=ED=88=AC=EA=B8=B0=EB=A1=9D=EB=8F=84=20off?= =?UTF-8?q?set=20=EB=AC=B8=EC=A0=9C=EA=B0=80=20=EC=97=86=EB=8F=84=EB=A1=9D?= =?UTF-8?q?=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/twe/func.php b/twe/func.php index 88159667..b3f82b74 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3061,7 +3061,9 @@ function MyBatRes($no, $count, $skin) { @fclose($fp); $log = explode("\r\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + } echo $str; } @@ -3072,7 +3074,9 @@ function MyBatLog($no, $count, $skin) { @fclose($fp); $log = explode("\r\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + } echo $str; } From 009524edf3b4051c8484cf4d30cb063760fe487c Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 18:54:48 +0900 Subject: [PATCH 047/622] =?UTF-8?q?[php5=5Fdebug]=20=EC=A7=80=EB=8F=84=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=EA=B4=80=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20=EB=82=B4=20=EC=A0=95=EB=B3=B4=EC=9D=98=20array=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=EC=97=90=20=EB=94=B0=EC=98=B4=ED=91=9C=20?= =?UTF-8?q?=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 20 ++++++++++---------- twe/map.php | 11 +++++++---- twe/new_lib.php | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/twe/func.php b/twe/func.php index b3f82b74..a29ce46c 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2788,11 +2788,11 @@ function generalInfo2($connect, $no, $skin) { $dedication = unfont($dedication); } - $dex0 = $general[dex0] / $_dexLimit * 100; - $dex10 = $general[dex10] / $_dexLimit * 100; - $dex20 = $general[dex20] / $_dexLimit * 100; - $dex30 = $general[dex30] / $_dexLimit * 100; - $dex40 = $general[dex40] / $_dexLimit * 100; + $dex0 = $general['dex0'] / $_dexLimit * 100; + $dex10 = $general['dex10'] / $_dexLimit * 100; + $dex20 = $general['dex20'] / $_dexLimit * 100; + $dex30 = $general['dex30'] / $_dexLimit * 100; + $dex40 = $general['dex40'] / $_dexLimit * 100; if($dex0 > 100) { $dex0 = 100; } if($dex10 > 100) { $dex10 = 100; } @@ -2800,11 +2800,11 @@ function generalInfo2($connect, $no, $skin) { if($dex30 > 100) { $dex30 = 100; } if($dex40 > 100) { $dex40 = 100; } - $general[dex0] = getDexCall($general[dex0]); - $general[dex10] = getDexCall($general[dex10]); - $general[dex20] = getDexCall($general[dex20]); - $general[dex30] = getDexCall($general[dex30]); - $general[dex40] = getDexCall($general[dex40]); + $general['dex0'] = getDexCall($general['dex0']); + $general['dex10'] = getDexCall($general['dex10']); + $general['dex20'] = getDexCall($general['dex20']); + $general['dex30'] = getDexCall($general['dex30']); + $general['dex40'] = getDexCall($general['dex40']); echo " diff --git a/twe/map.php b/twe/map.php index 4cc69839..7ab98e5c 100644 --- a/twe/map.php +++ b/twe/map.php @@ -159,6 +159,11 @@ function showMap($connect, $type, $graphic) { $query = "select nation,name,color,capital from nation"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); + + $nationname = array(); + $nationcolor = array(); + $nationCapital = array(); + for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); $nationcolor[$nation['nation']] = $nation['color']; @@ -233,9 +238,7 @@ function showMap($connect, $type, $graphic) { 210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435 ); - $nationname = array(); - $nationcolor = array(); - $nationCapital = array(); + $query = "select name,level,nation,city,state,region,supply from city"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -262,7 +265,7 @@ function showMap($connect, $type, $graphic) { else { $cap = 0; } city($graphic, $brouserIE, - $type, $name, $nation, $color, $level, $region, $i+1, $valid[$i+1], $x[$i], $y[$i], + $type, $name, $nation, $color, $level, $region, $i+1, isset($valid[$i+1])?$valid[$i+1]:0 , $x[$i], $y[$i], $state, $myCity, $city['supply'], $cap); } diff --git a/twe/new_lib.php b/twe/new_lib.php index 5158468e..b08635cd 100644 --- a/twe/new_lib.php +++ b/twe/new_lib.php @@ -1,6 +1,6 @@ Date: Wed, 17 Jan 2018 19:27:49 +0900 Subject: [PATCH 048/622] =?UTF-8?q?[php5=5Fdebug]=20jquery=EB=9D=BC?= =?UTF-8?q?=EB=8A=94=20=EC=A2=8B=EC=9D=80=EA=B2=8C=20=EC=9E=88=EC=9D=8C=20?= =?UTF-8?q?=EC=8D=A8=EC=95=BC=EC=A7=80;;;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/a_genList.php | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/twe/a_genList.php b/twe/a_genList.php index 5e367b18..42dac455 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -17,10 +17,9 @@ $me = MYDB_fetch_array($result); $con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -if($type == 0) { +if(!isset($type) || $type == 0) { $type = 9; } -$sel[$type] = "selected"; ?> @@ -29,6 +28,7 @@ $sel[$type] = "selected"; 장수일람 + @@ -36,23 +36,23 @@ $sel[$type] = "selected";
추 가 정 보
@@ -152,7 +152,7 @@ for($j=0; $j < $gencount; $j++) { - + @@ -177,6 +177,11 @@ MYDB_close($connect);
장 수 일 람
정렬순서 : - + + + + + + + + + + + + + + + +
$name {$general['age']}세 ".getGenChar($general['personal'])."".getGenSpecial($general['special'])." / ".getGenSpecial($general[special2])."".getGenSpecial($general['special'])." / ".getGenSpecial($general['special2'])." Lv ".getExpLevel($general['experience'])." {$nation} ".getHonor($general['experience'])."
+ From 4823e0de549f4142be8116063f351f34ca7a3a79 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 17 Jan 2018 19:58:30 +0900 Subject: [PATCH 049/622] =?UTF-8?q?che=20=ED=8F=B4=EB=8D=94=20=EB=82=A0?= =?UTF-8?q?=EB=A6=BC.=20=EC=8B=9C=EB=AE=AC=EB=A0=88=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=82=B4=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 2 - che/.htaccess | 4 - che/MYDB.php | 40 - che/_119.php | 54 - che/_119_b.php | 57 - che/_admin1.php | 223 -- che/_admin1_submit.php | 180 - che/_admin2.php | 149 - che/_admin2_submit.php | 432 --- che/_admin3.php | 100 - che/_admin3_submit.php | 134 - che/_admin4.php | 193 - che/_admin4_submit.php | 107 - che/_admin5.php | 313 -- che/_admin5_submit.php | 31 - che/_admin6.php | 101 - che/_admin7.php | 133 - che/_admin8.php | 156 - che/_simul.php | 1562 -------- che/a_bestGeneral.php | 279 -- che/a_emperior.php | 199 - che/a_emperior2.php | 200 - che/a_genList.php | 182 - che/a_hallOfFame.php | 103 - che/a_history.php | 137 - che/a_kingdomList.php | 246 -- che/a_npcList.php | 117 - che/a_status.php | 58 - che/a_traffic.php | 257 -- che/a_vote.php | 338 -- che/analytics.php | 14 - che/b_auction.php | 260 -- che/b_battleCenter.php | 142 - che/b_betting.php | 339 -- che/b_chiefboard.php | 71 - che/b_chiefcenter.php | 175 - che/b_currentCity.php | 352 -- che/b_dipcenter.php | 298 -- che/b_diplomacy.php | 222 -- che/b_genList.php | 199 - che/b_myBossInfo.php | 503 --- che/b_myCityInfo.php | 173 - che/b_myGenInfo.php | 173 - che/b_myKingdomInfo.php | 156 - che/b_myPage.php | 139 - che/b_nationboard.php | 66 - che/b_nationrule.php | 50 - che/b_tournament.php | 405 -- che/b_troop.php | 161 - che/c_auction.php | 216 -- che/c_betting.php | 42 - che/c_chiefboard.php | 51 - che/c_dipcenter.php | 62 - che/c_double.php | 127 - che/c_msgsubmit.php | 118 - che/c_myBossInfo.php | 256 -- che/c_nationboard.php | 52 - che/c_nationrule.php | 21 - che/c_tournament.php | 206 - che/c_troop.php | 56 - che/c_vacation.php | 19 - che/c_vote.php | 77 - che/commandlist.php | 113 - che/confirm.png | Bin 582 -> 0 bytes che/d_ally.php | 118 - che/d_cancel.php | 97 - che/d_cease.php | 102 - che/d_merge.php | 136 - che/d_scout.php | 162 - che/d_setting/.htaccess | 1 - che/d_setting/_common.php | 9 - che/d_surrender.php | 126 - che/data/.htaccess | 1 - che/error.php | 32 - che/event_1.php | 246 -- che/event_2.php | 255 -- che/event_3.php | 116 - che/event_4.php | 145 - che/func.php | 7421 ------------------------------------- che/func_auction.php | 347 -- che/func_history.php | 130 - che/func_http.php | 287 -- che/func_npc.php | 1863 ---------- che/func_process.php | 6147 ------------------------------ che/func_string.php | 303 -- che/func_tournament.php | 991 ----- che/gen.xlsx | Bin 61653 -> 0 bytes che/genDatabase.txt | 684 ---- che/index.php | 9 - che/install.php | 91 - che/install1.php | 85 - che/install2.php | 122 - che/install2_ok.php | 385 -- che/install3_ok.php | 10 - che/install_ok.php | 102 - che/join.php | 246 -- che/join_post.php | 274 -- che/join_post.php.orig | 274 -- che/join_token.php | 57 - che/jquery-1.11.0.min.js | 4 - che/lib.php | 180 - che/license.txt | 1 - che/lock.txt | 1 - che/login_process.php | 80 - che/logout_process.php | 36 - che/main.php | 336 -- che/map.php | 434 --- che/map_history.php | 33 - che/msglist.php | 43 - che/mysql_opt.txt | 53 - che/new_lib.php | 27 - che/npc_login.php | 44 - che/npc_login_process.php | 75 - che/preprocessing.php | 122 - che/proc.php | 7 - che/proc.sh | 10 - che/process_war.php | 1847 --------- che/processing.php | 3127 ---------------- che/queue.php | 40 - che/reset.php | 80 - che/scenario_1.php | 794 ---- che/scenario_10.php | 900 ----- che/scenario_11.php | 899 ----- che/scenario_12.php | 1183 ------ che/scenario_2.php | 1713 --------- che/scenario_20.php | 748 ---- che/scenario_21.php | 776 ---- che/scenario_22.php | 196 - che/scenario_23.php | 752 ---- che/scenario_24.php | 327 -- che/scenario_25.php | 318 -- che/scenario_26.php | 315 -- che/scenario_27.php | 593 --- che/scenario_28.php | 422 --- che/scenario_3.php | 1754 --------- che/scenario_4.php | 1291 ------- che/scenario_5.php | 997 ----- che/scenario_6.php | 1043 ------ che/scenario_7.php | 1095 ------ che/scenario_8.php | 947 ----- che/scenario_9.php | 871 ----- che/schema.php | 619 ---- che/schema.sql.orig | 619 ---- che/select_npc.php | 149 - che/select_npc_post.php | 126 - che/selection.php | 35 - che/start.php | 3 - che/stylesheet.php | 86 - che/templates/.htaccess | 1 - che/turn.php | 87 - che/turn_pop_core.php | 14 - che/turn_push_core.php | 15 - i_entrance/member/Get.php | 1 + twe/_simul.php | 74 +- 154 files changed, 63 insertions(+), 59055 deletions(-) delete mode 100644 che/.htaccess delete mode 100644 che/MYDB.php delete mode 100644 che/_119.php delete mode 100644 che/_119_b.php delete mode 100644 che/_admin1.php delete mode 100644 che/_admin1_submit.php delete mode 100644 che/_admin2.php delete mode 100644 che/_admin2_submit.php delete mode 100644 che/_admin3.php delete mode 100644 che/_admin3_submit.php delete mode 100644 che/_admin4.php delete mode 100644 che/_admin4_submit.php delete mode 100644 che/_admin5.php delete mode 100644 che/_admin5_submit.php delete mode 100644 che/_admin6.php delete mode 100644 che/_admin7.php delete mode 100644 che/_admin8.php delete mode 100644 che/_simul.php delete mode 100644 che/a_bestGeneral.php delete mode 100644 che/a_emperior.php delete mode 100644 che/a_emperior2.php delete mode 100644 che/a_genList.php delete mode 100644 che/a_hallOfFame.php delete mode 100644 che/a_history.php delete mode 100644 che/a_kingdomList.php delete mode 100644 che/a_npcList.php delete mode 100644 che/a_status.php delete mode 100644 che/a_traffic.php delete mode 100644 che/a_vote.php delete mode 100644 che/analytics.php delete mode 100644 che/b_auction.php delete mode 100644 che/b_battleCenter.php delete mode 100644 che/b_betting.php delete mode 100644 che/b_chiefboard.php delete mode 100644 che/b_chiefcenter.php delete mode 100644 che/b_currentCity.php delete mode 100644 che/b_dipcenter.php delete mode 100644 che/b_diplomacy.php delete mode 100644 che/b_genList.php delete mode 100644 che/b_myBossInfo.php delete mode 100644 che/b_myCityInfo.php delete mode 100644 che/b_myGenInfo.php delete mode 100644 che/b_myKingdomInfo.php delete mode 100644 che/b_myPage.php delete mode 100644 che/b_nationboard.php delete mode 100644 che/b_nationrule.php delete mode 100644 che/b_tournament.php delete mode 100644 che/b_troop.php delete mode 100644 che/c_auction.php delete mode 100644 che/c_betting.php delete mode 100644 che/c_chiefboard.php delete mode 100644 che/c_dipcenter.php delete mode 100644 che/c_double.php delete mode 100644 che/c_msgsubmit.php delete mode 100644 che/c_myBossInfo.php delete mode 100644 che/c_nationboard.php delete mode 100644 che/c_nationrule.php delete mode 100644 che/c_tournament.php delete mode 100644 che/c_troop.php delete mode 100644 che/c_vacation.php delete mode 100644 che/c_vote.php delete mode 100644 che/commandlist.php delete mode 100644 che/confirm.png delete mode 100644 che/d_ally.php delete mode 100644 che/d_cancel.php delete mode 100644 che/d_cease.php delete mode 100644 che/d_merge.php delete mode 100644 che/d_scout.php delete mode 100644 che/d_setting/.htaccess delete mode 100644 che/d_setting/_common.php delete mode 100644 che/d_surrender.php delete mode 100644 che/data/.htaccess delete mode 100644 che/error.php delete mode 100644 che/event_1.php delete mode 100644 che/event_2.php delete mode 100644 che/event_3.php delete mode 100644 che/event_4.php delete mode 100644 che/func.php delete mode 100644 che/func_auction.php delete mode 100644 che/func_history.php delete mode 100644 che/func_http.php delete mode 100644 che/func_npc.php delete mode 100644 che/func_process.php delete mode 100644 che/func_string.php delete mode 100644 che/func_tournament.php delete mode 100644 che/gen.xlsx delete mode 100644 che/genDatabase.txt delete mode 100644 che/index.php delete mode 100644 che/install.php delete mode 100644 che/install1.php delete mode 100644 che/install2.php delete mode 100644 che/install2_ok.php delete mode 100644 che/install3_ok.php delete mode 100644 che/install_ok.php delete mode 100644 che/join.php delete mode 100644 che/join_post.php delete mode 100644 che/join_post.php.orig delete mode 100644 che/join_token.php delete mode 100644 che/jquery-1.11.0.min.js delete mode 100644 che/lib.php delete mode 100644 che/license.txt delete mode 100644 che/lock.txt delete mode 100644 che/login_process.php delete mode 100644 che/logout_process.php delete mode 100644 che/main.php delete mode 100644 che/map.php delete mode 100644 che/map_history.php delete mode 100644 che/msglist.php delete mode 100644 che/mysql_opt.txt delete mode 100644 che/new_lib.php delete mode 100644 che/npc_login.php delete mode 100644 che/npc_login_process.php delete mode 100644 che/preprocessing.php delete mode 100644 che/proc.php delete mode 100644 che/proc.sh delete mode 100644 che/process_war.php delete mode 100644 che/processing.php delete mode 100644 che/queue.php delete mode 100644 che/reset.php delete mode 100644 che/scenario_1.php delete mode 100644 che/scenario_10.php delete mode 100644 che/scenario_11.php delete mode 100644 che/scenario_12.php delete mode 100644 che/scenario_2.php delete mode 100644 che/scenario_20.php delete mode 100644 che/scenario_21.php delete mode 100644 che/scenario_22.php delete mode 100644 che/scenario_23.php delete mode 100644 che/scenario_24.php delete mode 100644 che/scenario_25.php delete mode 100644 che/scenario_26.php delete mode 100644 che/scenario_27.php delete mode 100644 che/scenario_28.php delete mode 100644 che/scenario_3.php delete mode 100644 che/scenario_4.php delete mode 100644 che/scenario_5.php delete mode 100644 che/scenario_6.php delete mode 100644 che/scenario_7.php delete mode 100644 che/scenario_8.php delete mode 100644 che/scenario_9.php delete mode 100644 che/schema.php delete mode 100644 che/schema.sql.orig delete mode 100644 che/select_npc.php delete mode 100644 che/select_npc_post.php delete mode 100644 che/selection.php delete mode 100644 che/start.php delete mode 100644 che/stylesheet.php delete mode 100644 che/templates/.htaccess delete mode 100644 che/turn.php delete mode 100644 che/turn_pop_core.php delete mode 100644 che/turn_push_core.php diff --git a/.vscode/settings.json b/.vscode/settings.json index 803da7d5..cec74486 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,11 +7,9 @@ "**/.DS_Store": true, "**/logs/*.txt": true, "**/session/sess*":true, - "**/che": true, }, "search.exclude": { - "**/che": true, "e_lib/*":true, }, diff --git a/che/.htaccess b/che/.htaccess deleted file mode 100644 index d4841646..00000000 --- a/che/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -Deny from all -SetEnvIf X-Forwarded-For ^192\.168\.0\.1 env_allow_1 -Allow from env=env_allow_1 -Allow from 192.168.0.1 diff --git a/che/MYDB.php b/che/MYDB.php deleted file mode 100644 index 708a2533..00000000 --- a/che/MYDB.php +++ /dev/null @@ -1,40 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select turntime,tnmt_time from game"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$query = "select plock from plock"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$plock = MYDB_fetch_array($result); -?> - - - -삼국지 모의전투 PHP (유기체서버) - - - - -
- 시간조정 : 최종갱신 :
- 시간조정 : 토너먼트 :
- 봉급지급 :
- 락 풀 기 : 현재 : 0?"동결중":"가동중";?>
-
- - - diff --git a/che/_119_b.php b/che/_119_b.php deleted file mode 100644 index 9f3d1eb9..00000000 --- a/che/_119_b.php +++ /dev/null @@ -1,57 +0,0 @@ -location.replace('_119.php');"; -} - -switch($btn) { -case "분당김": - $query = "update game set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE),starttime=DATE_SUB(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set turntime=DATE_SUB(turntime, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update auction set expire=DATE_SUB(expire, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case "분지연": - $query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case "토너분당김": - $query = "update game set tnmt_time=DATE_SUB(tnmt_time, INTERVAL $minute2 MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case "토너분지연": - $query = "update game set tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute2 MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case "금지급": - processGoldIncome($connect); - break; -case "쌀지급": - processRiceIncome($connect); - break; -case "락걸기": - $query = "update plock set plock=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case "락풀기": - $query = "update plock set plock=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -} - -//echo ""; -echo '_119.php';//TODO:replace diff --git a/che/_admin1.php b/che/_admin1.php deleted file mode 100644 index ae57c86f..00000000 --- a/che/_admin1.php +++ /dev/null @@ -1,223 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$admin = getAdmin($connect); -?> - - -게임관리 - - - - - - -
게 임 관 리
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
운영자메세지
중원정세추가
쿼리 요청
시작시간변경현재도시훈사
최대 장수>최대 국가>
기준 장수수>현재 수입률%
시작 년도최근 갱신 시간 
턴시간
- - - - - - - - - - - - - - - - - - - - "; - } - echo " - "; - - for($i=10; $i <= 14; $i++) { - $att = $admin["att{$i}"]; - $def = $admin["def{$i}"]; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $cst = $admin["cst{$i}"]; - $ric = $admin["ric{$i}"]; - echo " - - - - - - - - - "; - } - echo " - "; - - for($i=20; $i <= 27; $i++) { - $att = $admin["att{$i}"]; - $def = $admin["def{$i}"]; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $cst = $admin["cst{$i}"]; - $ric = $admin["ric{$i}"]; - echo " - - - - - - - - - "; - } - echo " - "; - - for($i=30; $i <= 38; $i++) { - $att = $admin["att{$i}"]; - $def = $admin["def{$i}"]; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $cst = $admin["cst{$i}"]; - $ric = $admin["ric{$i}"]; - echo " - - - - - - - - - "; - } - echo " - "; - - for($i=40; $i <= 43; $i++) { - $att = $admin["att{$i}"]; - $def = $admin["def{$i}"]; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $cst = $admin["cst{$i}"]; - $ric = $admin["ric{$i}"]; - echo " - - - - - - - - - "; - } - echo " - "; -?> -
공격방어기동회피가격군량
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
".getTypename($i)."
-
-
- - - - - - - - - - - - - -
리 셋 요 청
HOSTNAMEDB_IDPASSWORDDB_NAME
-
- - - -
- - diff --git a/che/_admin1_submit.php b/che/_admin1_submit.php deleted file mode 100644 index 1e0f67c0..00000000 --- a/che/_admin1_submit.php +++ /dev/null @@ -1,180 +0,0 @@ -location.replace('_admin1.php');"; -} - -switch($btn) { - case "변경": - $msg = addslashes(SQ2DQ($msg)); - $query = "update game set msg='$msg' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "요청": - $query = $q; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "로그쓰기": - $lognum = $admin[historyindex] + 1; - if($lognum >= 29) { $lognum = 0; } - $history[0] = "{$log}"; - pushHistory($connect, $history); - break; - case "변경1": - $query = "update game set starttime='$starttime' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "변경2": - $query = "update game set maxgeneral='$maxgeneral' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "변경3": - $query = "update game set maxnation='$maxnation' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "변경4": - $query = "update game set startyear='$startyear' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "변경5": - $query = "update game set normgeneral='$gen_rate' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "1분턴": - case "2분턴": - case "5분턴": - case "10분턴": - case "20분턴": - case "30분턴": - case "60분턴": - case "120분턴": - switch($btn) { - case "1분턴": $turnterm = 7; $unit = 60; break; - case "2분턴": $turnterm = 6; $unit = 120; break; - case "5분턴": $turnterm = 5; $unit = 300; break; - case "10분턴": $turnterm = 4; $unit = 600; break; - case "20분턴": $turnterm = 3; $unit = 1200; break; - case "30분턴": $turnterm = 2; $unit = 1800; break; - case "60분턴": $turnterm = 1; $unit = 3600; break; - case "120분턴": $turnterm = 0; $unit = 7200; break; - } - $turn = ($admin[year] - $admin[startyear]) * 12 + $admin[month] - 1; - $starttime = date("Y-m-d H:i:s", strtotime($admin[turntime]) - $turn * $unit); - $starttime = cutTurn($starttime, $turnterm); - $query = "update game set turnterm='$turnterm',starttime='$starttime' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 턴시간이 길어지는 경우 랜덤턴 배정 - 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 = floor((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),""); - } - } - } - $history[count($history)] = "★턴시간이 $btn으로 변경됩니다."; - pushHistory($connect, $history); - break; - case "변경6": - $query = "update game set att0='$att0',def0='$def0',spd0='$spd0',avd0='$avd0',ric0='$ric0',cst0='$cst0' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att1='$att1',def1='$def1',spd1='$spd1',avd1='$avd1',ric1='$ric1',cst1='$cst1' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att2='$att2',def2='$def2',spd2='$spd2',avd2='$avd2',ric2='$ric2',cst2='$cst2' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att3='$att3',def3='$def3',spd3='$spd3',avd3='$avd3',ric3='$ric3',cst3='$cst3' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att4='$att4',def4='$def4',spd4='$spd4',avd4='$avd4',ric4='$ric4',cst4='$cst4' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att5='$att5',def5='$def5',spd5='$spd5',avd5='$avd5',ric5='$ric5',cst5='$cst5' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update game set att10='$att10',def10='$def10',spd10='$spd10',avd10='$avd10',ric10='$ric10',cst10='$cst10' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att11='$att11',def11='$def11',spd11='$spd11',avd11='$avd11',ric11='$ric11',cst11='$cst11' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att12='$att12',def12='$def12',spd12='$spd12',avd12='$avd12',ric12='$ric12',cst12='$cst12' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att13='$att13',def13='$def13',spd13='$spd13',avd13='$avd13',ric13='$ric13',cst13='$cst13' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att14='$att14',def14='$def14',spd14='$spd14',avd14='$avd14',ric14='$ric14',cst14='$cst14' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update game set att20='$att20',def20='$def20',spd20='$spd20',avd20='$avd20',ric20='$ric20',cst20='$cst20' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att21='$att21',def21='$def21',spd21='$spd21',avd21='$avd21',ric21='$ric21',cst21='$cst21' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att22='$att22',def22='$def22',spd22='$spd22',avd22='$avd22',ric22='$ric22',cst22='$cst22' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att23='$att23',def23='$def23',spd23='$spd23',avd23='$avd23',ric23='$ric23',cst23='$cst23' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att24='$att24',def24='$def24',spd24='$spd24',avd24='$avd24',ric24='$ric24',cst24='$cst24' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att25='$att25',def25='$def25',spd25='$spd25',avd25='$avd25',ric25='$ric25',cst25='$cst25' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att26='$att26',def26='$def26',spd26='$spd26',avd26='$avd26',ric26='$ric26',cst26='$cst26' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att27='$att27',def27='$def27',spd27='$spd27',avd27='$avd27',ric27='$ric27',cst27='$cst27' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update game set att30='$att30',def30='$def30',spd30='$spd30',avd30='$avd30',ric30='$ric30',cst30='$cst30' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att31='$att31',def31='$def31',spd31='$spd31',avd31='$avd31',ric31='$ric31',cst31='$cst31' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att32='$att32',def32='$def32',spd32='$spd32',avd32='$avd32',ric32='$ric32',cst32='$cst32' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att33='$att33',def33='$def33',spd33='$spd33',avd33='$avd33',ric33='$ric33',cst33='$cst33' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att34='$att34',def34='$def34',spd34='$spd34',avd34='$avd34',ric34='$ric34',cst34='$cst34' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att35='$att35',def35='$def35',spd35='$spd35',avd35='$avd35',ric35='$ric35',cst35='$cst35' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att36='$att36',def36='$def36',spd36='$spd36',avd36='$avd36',ric36='$ric36',cst36='$cst36' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att37='$att37',def37='$def37',spd37='$spd37',avd37='$avd37',ric37='$ric37',cst37='$cst37' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att38='$att38',def38='$def38',spd38='$spd38',avd38='$avd38',ric38='$ric38',cst38='$cst38' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update game set att40='$att40',def40='$def40',spd40='$spd40',avd40='$avd40',ric40='$ric40',cst40='$cst40' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att41='$att41',def41='$def41',spd41='$spd41',avd41='$avd41',ric41='$ric41',cst41='$cst41' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att42='$att42',def42='$def42',spd42='$spd42',avd42='$avd42',ric42='$ric42',cst42='$cst42' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set att43='$att43',def43='$def43',spd43='$spd43',avd43='$avd43',ric43='$ric43',cst43='$cst43' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -} - -//echo ""; -echo '_admin1.php';//TODO:replace - diff --git a/che/_admin2.php b/che/_admin2.php deleted file mode 100644 index 5cc7ca07..00000000 --- a/che/_admin2.php +++ /dev/null @@ -1,149 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select conlimit,conweight from game where no=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); -?> - - -회원관리 - - - - - - -
회 원 관 리
-
- - - - - - - - - -
접속제한
제한등급 - style=color:white;background-color:black;font-size:13;> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
-"; - -$query = "select no,name,npc,userlevel,block from general order by npc,binary(name)"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - $style = "style=;"; - if($general[block] > 0) { $style .= "background-color:red;"; } - if($general[npc] >= 2) { $style .= "color:cyan;"; } - elseif($general[npc] == 1) { $style .= "color:skyblue;"; } - if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } - if($general[userlevel] > 2) { $style .= "color:blue;"; } - - echo " - "; -} - -echo " - - 아이템 지급 - - - - - -
블럭 -
- 1단계:발언권, 2단계:턴블럭 -
강제 사망
이벤트
이벤트2
특별회원
접속제한
턴설정
NPC해제
메세지 전달
-
- - - -
- - diff --git a/che/_admin2_submit.php b/che/_admin2_submit.php deleted file mode 100644 index 37c04f3f..00000000 --- a/che/_admin2_submit.php +++ /dev/null @@ -1,432 +0,0 @@ -location.replace('_admin2.php');"; -} - -switch($btn) { - case "전체 접속허용": - $query = "update general set con=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "전체 접속제한": - $query = "update general set con=1000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "접속가중치": - $query = "update game set conweight='$conweight' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case "블럭 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=0 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "1단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "2단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set gold=0,rice=0,block=2,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "3단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set gold=0,rice=0,block=3,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "무한삭턴": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set killturn=8000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "강제 사망": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "특기 부여": - $query = "select year,month from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = $btn." 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select no,leader,power,intel,history from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel]); - - $query = "update general set specage2=age,special2='$special2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); - pushGenLog($general, $log); - } - break; - case "경험치1000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = $btn." 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set experience=experience+1000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "공헌치1000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = $btn." 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dedication=dedication+1000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "보숙10000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = "보병숙련도+10000 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dex0=dex0+10000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "궁숙10000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = "궁병숙련도+10000 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dex10=dex10+10000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "기숙10000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = "기병숙련도+10000 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dex20=dex20+10000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "귀숙10000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = "귀병숙련도+10000 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dex30=dex30+10000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "차숙10000": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - $msg = "차병숙련도+10000 지급!"; - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set dex40=dex40+10000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "특별회원 임명": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set userlevel=3 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "특별회원 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set userlevel=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "접속 허용": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set con=0 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "접속 제한": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set con=1000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "메세지 전달": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "무기지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "무기 회수!"; } - else { $msg = getWeapName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set weap='0' where no='$genlist[$i]'"; - } else { - $query = "update general set weap='$weap' where no='$genlist[$i]' and weap<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "책지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "서적 회수!"; } - else { $msg = getBookName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set book='0' where no='$genlist[$i]'"; - } else { - $query = "update general set book='$weap' where no='$genlist[$i]' and book<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "말지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "말 회수!"; } - else { $msg = getHorseName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set horse='0' where no='$genlist[$i]'"; - } else { - $query = "update general set horse='$weap' where no='$genlist[$i]' and horse<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "도구지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "특수도구 회수!"; } - else { $msg = getItemName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set item='0' where no='$genlist[$i]'"; - } else { - $query = "update general set item='$weap' where no='$genlist[$i]' and item<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "NPC해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set npc=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "하야입력": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0='00000000000045' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "방랑해산": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0='00000000000047',turn1='00000000000056' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "NPC설정": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set npc=2 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "00턴": - $query = "select turnterm from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - for($i=0; $i < sizeof($genlist); $i++) { - $turntime = getRandTurn($admin[turnterm]); - $cutTurn = cutTurn($turntime, $admin[turnterm]); - $query = "update general set turntime='$cutTurn' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "랜덤턴": - $query = "select turnterm from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - for($i=0; $i < sizeof($genlist); $i++) { - $turntime = getRandTurn($admin[turnterm]); - $query = "update general set turntime='$turntime' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; -} - -//echo ""; -echo '_admin2.php';//TODO:replace - diff --git a/che/_admin3.php b/che/_admin3.php deleted file mode 100644 index 6849cfee..00000000 --- a/che/_admin3.php +++ /dev/null @@ -1,100 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} -//$admin = getAdmin($connect); -?> - - -특별회원 - - - - - - -
특 별 회 원
-
- - - - - - - - - - - - - - - -
회원선택

무장
지장
-"; - -$query = "select no,name,power,intel from general where userlevel>2 order by npc,binary(name)"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - if($general[power] >= $general[intel]) { - echo " - "; - } else { - echo " - "; - } -} - -echo " - - 아이템 지급 - - - - - -
특별회원
메세지 전달
-
- - - -
- - diff --git a/che/_admin3_submit.php b/che/_admin3_submit.php deleted file mode 100644 index 10a09171..00000000 --- a/che/_admin3_submit.php +++ /dev/null @@ -1,134 +0,0 @@ -location.replace('_admin3.php');"; -} - -switch($btn) { - case "무기지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "무기 회수!"; } - else { $msg = getWeapName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set weap='0' where no='$genlist[$i]'"; - } else { - $query = "update general set weap='$weap' where no='$genlist[$i]' and weap<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "책지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "서적 회수!"; } - else { $msg = getBookName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set book='0' where no='$genlist[$i]'"; - } else { - $query = "update general set book='$weap' where no='$genlist[$i]' and book<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "말지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "말 회수!"; } - else { $msg = getHorseName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set horse='0' where no='$genlist[$i]'"; - } else { - $query = "update general set horse='$weap' where no='$genlist[$i]' and horse<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "도구지급": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - if($weap == 0) { $msg = "특수도구 회수!"; } - else { $msg = getItemName($weap)." 지급!"; } - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - for($i=0; $i < sizeof($genlist); $i++) { - if($weap == 0) { - $query = "update general set item='0' where no='$genlist[$i]'"; - } else { - $query = "update general set item='$weap' where no='$genlist[$i]' and item<'$weap'"; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "특별회원 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set userlevel=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "메세지 전달": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; -} - -//echo ""; -echo '_admin3.php';//TODO:replace - diff --git a/che/_admin4.php b/che/_admin4.php deleted file mode 100644 index 20a2588b..00000000 --- a/che/_admin4.php +++ /dev/null @@ -1,193 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select conlimit from game where no=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); -?> - - -멀티관리 - - - - - - -
멀 티 관 리
-
- - - - - - - - - - - - - - - -
회원선택

NPC
NPC유저
특별회원
접속제한
블럭회원
-"; - -$query = "select no,name,npc,userlevel,block from general where ip!='' order by npc,ip"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - $style = "style=;"; - if($general[block] > 0) { $style .= "background-color:red;"; } - if($general[npc] >= 2) { $style .= "color:cyan;"; } - elseif($general[npc] == 1) { $style .= "color:skyblue;"; } - if($general[con] > $admin[conlimit]) { $style .= "color:red;"; } - if($general[userlevel] > 2) { $style .= "color:blue;"; } - - echo " - "; -} - -echo " - "; -?> - 블럭 -
- 1단계:발언권, 2단계:턴블럭 -
강제 사망
메세지 전달
- - - - - - - - - -1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$ipCount = MYDB_num_rows($result); -$genName = ""; -$genDate = ""; -$genIP = ""; -$genID = ""; -$conMsg = ""; -for($i=0; $i < $ipCount; $i++) { - $ip = MYDB_fetch_array($result); - - $query = "select name,ip,lastconnect,user_id,block,conmsg 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 .= "{$gen[name]}
"; - else $genName .= $gen[name]."
"; - $genDate .= $gen[lastconnect]."
"; - $genIP .= $gen[ip]."
"; - $genID .= $gen[user_id]."
"; - $conMsg .= $gen[conmsg]."
"; - } - $genName .= "
"; - $genDate .= "
"; - $genIP .= "
"; - $genID .= "
"; - $conMsg .= "
"; -} -echo " - - - - - "; -?> - -
장수명최근로그인IPID-
$genName$genDate$genIP$genID$conMsg
- - - - - - - - - -1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$ipCount = MYDB_num_rows($result); -$genName = ""; -$genDate = ""; -$genIP = ""; -$genID = ""; -$conMsg = ""; -for($i=0; $i < $ipCount; $i++) { - $ip = MYDB_fetch_array($result); - - $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='$ip[password]' and npc<2"; - $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 .= "{$gen[name]}
"; - else $genName .= $gen[name]."
"; - $genDate .= $gen[lastconnect]."
"; - $genIP .= substr($gen[password],0,10)." ...
"; - $genID .= $gen[user_id]."
"; - $conMsg .= $gen[conmsg]."
"; - } - $genName .= "
"; - $genDate .= "
"; - $genIP .= "
"; - $genID .= "
"; - $conMsg .= "
"; -} -echo " - - - - - "; -?> - -
장수명최근로그인PasswordID-
$genName$genDate$genIP$genID$conMsg
-
- - - -
- - diff --git a/che/_admin4_submit.php b/che/_admin4_submit.php deleted file mode 100644 index b9cd07b5..00000000 --- a/che/_admin4_submit.php +++ /dev/null @@ -1,107 +0,0 @@ -location.replace('_admin4.php');"; -} - -switch($btn) { - case "블럭 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=0 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "1단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "2단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=2,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "3단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=3,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen[user_id]; - } - $connect = dbConn("sammo"); - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "무한삭턴": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set killturn=8000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "강제 사망": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; - case "메세지 전달": - $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "select msgindex from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}_type=10,msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_who='$genlist[$i]'+10000,msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; -} - -//echo ""; -echo '_admin4.php'; //TODO:replace - diff --git a/che/_admin5.php b/che/_admin5.php deleted file mode 100644 index d1e021ab..00000000 --- a/che/_admin5.php +++ /dev/null @@ -1,313 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -if($type == 0) { - $type = 0; -} -if($type2 == 0) { - $type2 = 0; -} -$sel[$type] = "selected"; -$sel2[$type2] = "selected"; - -$query = "select conlimit from game where no=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); -?> - - -일제정보 - - - - - - - -
일 제 정 보
-
정렬순서 : - - - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"; -} - -?> -
국명접률단접국력단합장수속령기술전략국고병량평금평쌀평통평무평지평Lv보숙궁숙기숙귀숙차숙총병인구인구율농업상업치안성벽수비국명
$nation[name] {$nation[connect]}  {$nation[con]}  {$nation[power]}  {$nation[chemi]}  {$gen[cnt]}  {$city[cnt]}  {$nation[tech]}  {$nation[tricklimit]}  {$nation[gold]}  {$nation[rice]}  {$gen[avgg]}  {$gen[avgr]}  {$gen[avgl]}  {$gen[avgp]}  {$gen[avgi]}  {$gen[avge]}  {$nation[dex0]}  {$nation[dex10]}  {$nation[dex20]}  {$nation[dex30]}  {$nation[dex40]}  {$gen[crew]}/{$gen[leader]}00  {$city[pop]}/{$city[pop2]}  {$city[rate]}%  {$city[agri]}%  {$city[comm]}%  {$city[secu]}%  {$city[wall]}%  {$city[def]}% $nation[name]
- - -
- - - - - - - -국력(국력,장수수,도시수,인구/100,최대인구/100,국가자원/100,장수자원/100,능력치,숙련/1000,경험공헌/100)"; break; -case 1: echo ""; break; -case 2: echo ""; break; -case 3: echo ""; break; -case 4: echo ""; break; -case 5: echo ""; break; -case 6: echo ""; break; -} -?> - - - - - - -"; - switch($type2) { - default: - case 0: echo ""; break; - case 1: echo ""; break; - case 2: echo ""; break; - case 3: echo ""; break; - case 4: echo ""; break; - case 5: echo ""; break; - case 6: echo ""; break; - } - - echo " - -"; -} -?> -
국가수장수수국가별성향국가성향장수성격장수특기병종수기타
{$stat[year]}{$stat[month]}{$stat[nation_count]}{$stat[gen_count]}{$stat[power_hist]}{$stat[nation_name]}{$stat[nation_hist]}{$stat[personal_hist]}{$stat[special_hist]}{$stat[crewtype]}{$stat[etc]}
- - - - -
- - diff --git a/che/_admin5_submit.php b/che/_admin5_submit.php deleted file mode 100644 index 129ad500..00000000 --- a/che/_admin5_submit.php +++ /dev/null @@ -1,31 +0,0 @@ -location.replace('_admin5.php');"; -} - -switch($btn) { - case "국가변경": - if($nation == 0) { - $query = "update general set nation=0,level=0 where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set nation='{$nation}',level=1 where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - break; -} - -//echo ""; -echo '_admin5.php';//TODO:replace - - diff --git a/che/_admin6.php b/che/_admin6.php deleted file mode 100644 index 8b003b99..00000000 --- a/che/_admin6.php +++ /dev/null @@ -1,101 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -if($type == 0) { - $type = 0; -} -$sel[$type] = "selected"; - -?> - - -접속정보 - - - - - - - -
접 속 정 보
정렬순서 : - -
-
- - - - - - - - - - - - - - - - - - - - - "; -} - -?> -
장수명접속률시작연령연령총갱신갱신/턴총로그인갱신/로그인
$gen[name]$gen[connect]$gen[startage]$gen[age]".round($gen[refcnt]/2, 1)."".round($gen[ref]/2,1)."$gen[logcnt]".round($gen[log]/2,1)."
- - - -
- - diff --git a/che/_admin7.php b/che/_admin7.php deleted file mode 100644 index c2013275..00000000 --- a/che/_admin7.php +++ /dev/null @@ -1,133 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -if($btn == '정렬하기') { - $gen = 0; -} - -if($type == 0) { - $type = 0; -} -$sel[$type] = "selected"; -?> - - -로그정보 - - - - - - - -
로 그 정 보
-
- 정렬순서 : - - - 대상장수 : - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
장 수 정 보-
- -   -
개인 기록전투 기록
- - - -
장수 열전전투 결과
- - - -
- - - -
- - diff --git a/che/_admin8.php b/che/_admin8.php deleted file mode 100644 index 3bc04662..00000000 --- a/che/_admin8.php +++ /dev/null @@ -1,156 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -if($btn == '정렬하기') { - $gen = 0; -} - -if($type == 0) { - $type = 0; -} -$sel[$type] = "selected"; -?> - - -외교정보 - - - - - - - -
외 교 정 보
-
- 정렬순서 : - - -
-
- - - - - - - - - -교 전"; break; - case 1: $state = "선포중"; break; - case 2: $state = "통 상"; break; - case 3: $state = "통합수락중"; break; - case 4: $state = "통합제의중"; break; - case 5: $state = "합병수락중"; break; - case 6: $state = "합병제의중"; break; - case 7: $state = "불가침"; break; - } - - $date = date('Y-m-d H:i:s'); - $note = ""; - if($dip[fixed] != "") { - if($dip[state] == 7) { - $note .= $dip[fixed]; - } else { - $note .= "{$dip[fixed]}"; - } - if($dip[reserved] != "" || $dip2[reserved] != "") { - $note .= "
"; - } - } - if($dip[reserved] != "") { - if($dip[showing] >= $date) { - $note .= "아국측 제의: {$dip[reserved]}"; - } else { - $note .= "아국측 제의: {$dip[reserved]}"; - } - if($dip2[reserved] != "") { - $note .= "
"; - } - } - if($dip2[reserved] != "") { - if($dip2[showing] >= $date) { - $note .= "상대측 제의: {$dip2[reserved]}"; - } else { - $note .= "상대측 제의: {$dip2[reserved]}"; - } - } - if($note == "") { $note = " "; } - - echo " - - - - - - - "; -} -?> -
외 교 관 계
국 가 명국 가 명상 태기 간비 고
$nationName[$me]$nationName[$you]$state$dip[term] 개월{$note}
- - - -
- - diff --git a/che/_simul.php b/che/_simul.php deleted file mode 100644 index 5f3b4120..00000000 --- a/che/_simul.php +++ /dev/null @@ -1,1562 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -if($me[userlevel] < 3) { - echo "특별회원이 아닙니다."; - exit(); -} - -$mydeathnumSum = 0; -$mykillnumSum = 0; -$expSum = 0; -$ricingSum = 0; -$expSum2 = 0; -$ricingSum2 = 0; - -if($isgen == "장수평균" || $isgen == "성벽평균") { - $simulCount = 1000; -} else { - $simulCount = 1; -} - -if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평균" || $isgen == "성벽평균") { - $msg2 = ""; - for($i=0; $i < $simulCount; $i++) { - $general[leader] = $leader1; - $general[power] = $power1; - $general[intel] = $intel1; - $general[crewtype] = $type1; - $general[crew] = $crew1; - $general[train] = $train1; - $general[atmos] = $atmos1; - $general[level] = $level1; - $general[explevel] = $explevel1; - $general[dex0] = $dex10; - $general[dex10] = $dex110; - $general[dex20] = $dex120; - $general[dex30] = $dex130; - $general[dex40] = $dex140; - - $oppose[leader] = $leader2; - $oppose[power] = $power2; - $oppose[intel] = $intel2; - $oppose[crewtype] = $type2; - $oppose[crew] = $crew2; - $oppose[train] = $train2; - $oppose[atmos] = $atmos2; - $oppose[level] = $level2; - $oppose[explevel] = $explevel2; - $oppose[dex0] = $dex20; - $oppose[dex10] = $dex210; - $oppose[dex20] = $dex220; - $oppose[dex30] = $dex230; - $oppose[dex40] = $dex240; - - $city[def] = $def; - $city[wall] = $wall; - - if($isgen == "장수공격" || $isgen == "장수평균") { - $opposecount = 1; - } else { - $opposecount = 0; - } - - $warphase = getRate($game, $general[crewtype], "spd"); //병종간 페이즈 수 얻기 - - // 우선 스케일링 - $city[def] *= 10; - $city[wall] *= 10; - - $msg = ""; - $msg .= "●1월:공격장수가 공격합니다.
"; - - $exp = 0; //병사 소진 시킨 만큼 - $opexp = 0; - $exp2 = 1; //능력경험치 - $phase = 0; - while($phase < $warphase) { - // 장수가 없어서 도시 공격 - if($opposecount == 0) { - $msg .= "●".getTypename($general[crewtype])."(으)로 성을 공격합니다.
"; - - $mykillnum = 0; $mydeathnum = 0; - while($phase < $warphase) { - $phase++; - $myAtt = getAtt($game, $general, $tech1); - $myDef = getDef($game, $general, $tech1); - $cityAtt = getCityAtt($city); - $cityDef = getCityDef($city); - - // 감소할 병사 수 - $cityCrew = $_armperphase + $myAtt - $cityDef; - $myCrew = $_armperphase + $cityAtt - $myDef; - $cityweight = $myAtt - $cityDef; - $myweight = $cityAtt - $myDef; - - //훈련 사기따라 - $myCrew = getCrew($myCrew, $atmos3, $general[train]); - $cityCrew = getCrew($cityCrew, $general[atmos], $train3); - //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, 40); - $cityCrew *= getDexLog($genDexAtt, ($train3-60)*7200); - $myCrew *= getDexLog(($atmos3-60)*7200, $genDexDef); - - $avoid = 1; - // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = $general[intel] + getBookEff($general[book]); - if($general[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; // 0~99 - if($ratio >= 30) { - $type = rand() % 3; - switch($type) { - case 0: - $msg .= "급습을 성공했다!
"; - $cityCrew *= 1.2; - break; - case 1: - $msg .= "위보를 성공했다!
"; - $cityCrew *= 1.4; - break; - case 2: - $msg .= "혼란을 성공했다!
"; - $cityCrew *= 1.6; - break; - } - } else { - $type = rand() % 3; - switch($type) { - case 0: - $msg .= "급습을 실패했다!
"; - $cityCrew /= 1.2; - $myCrew *= 1.2; - break; - case 1: - $msg .= "위보를 실패했다!
"; - $cityCrew /= 1.4; - $myCrew *= 1.4; - break; - case 2: - $msg .= "혼란을 실패했다!
"; - $cityCrew /= 1.6; - $myCrew *= 1.6; - break; - } - } - } - } elseif($general[crewtype] == 40) { // 정란 - $cityCrew = $cityCrew * 1.5; - } elseif($general[crewtype] == 41) { // 충차 - $cityCrew = $cityCrew * 2.0; - } elseif($general[crewtype] == 42) { // 벽력거 - $cityCrew = $cityCrew * 1.5; - } - //군주, 참모, 장군 공격 보정 5% - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { - $cityCrew = $cityCrew * 1.05; - } - //레벨 보정 - $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; - - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); - if($ratio >= $rd && $avoid == 1) { - $msg .= "필살공격!
"; - $cityCrew = CriticalScore2($cityCrew); - $avoid = 0; - } - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 - if($ratio < $ratio2 && $avoid == 1) { - $msg .= "회피했다!
"; - $myCrew /= 10; // 10%만 소모 - $avoid = 0; - } - - //랜타추가 - $cityCrew *= (rand() % 21 + 90)/100; // 90~110% - $myCrew *= (rand() % 21 + 90)/100; // 90~110% - - $general[crew] -= round($myCrew); - $city[def] -= round($cityCrew); - $city[wall] -= round($cityCrew); - - $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; - $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; - - if($city[wall] <= 0) { $city[wall] = 0; } - - if($city[def] < 0) { - $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $cityCrew += $tempCityDef; - $city[def] = 0; - } - if($general[crew] < 0) { - $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); - $cityCrew += $offset; - $city[def] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - - $exp += $cityCrew; - $opexp += $myCrew; - $general[crew] = round($general[crew]); - $cityCrew = round($cityCrew); - $myCrew = round($myCrew); - $myAtt = round($myAtt, 2); - $myDef = round($myDef, 2); - $cityAtt = round($cityAtt, 2); - $cityDef = round($cityDef, 2); - $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【성벽】
"; - - $mykillnum += $cityCrew; $mydeathnum += $myCrew; - - if($city[def] <= 0) { break; } - if($general[crew] <= 0) { break; } - } - - // 도시쌀 소모 계산 - $opexp = round($opexp / 50); - $rice = round($opexp * 4 * getCrewtypeRice($game, 0, 0) * ($train3/100 - 0.2)); - - //원래대로 스케일링 - $city[def] = round($city[def] / 10); - $city[wall] = round($city[wall] / 10); - //내정 감소 - $dec = round($cityCrew / 10); - $city[agri] -= $dec; - $city[comm] -= $dec; - $city[secu] -= $dec; - if($city[agri] < 0) { $city[agri] = 0; } - if($city[comm] < 0) { $city[comm] = 0; } - if($city[secu] < 0) { $city[secu] = 0; } - $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; - $msg .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; - -// $msg2 .= "★병사수 변화 : -$mydeathnum vs -$mykillnum   "; -// $msg2 .= "★【성벽】내정 감소량 : $dec 【성벽】쌀 소모 : $rice
"; - - if($city[def] == 0 || $general[crew] == 0) { - break; - } - // 장수 대결 - } else { - $msg .= "●".getTypename($general[crewtype])."(으)로 수비장수의 ".getTypename($oppose[crewtype])."(을)를 공격합니다.
"; - - $mykillnum = 0; $mydeathnum = 0; - while($phase < $warphase) { - $phase++; - - $myAtt = getAtt($game, $general, $tech1); - $myDef = getDef($game, $general, $tech1); - $opAtt = getAtt($game, $oppose, $tech2); - $opDef = getDef($game, $oppose, $tech2); - // 감소할 병사 수 - $myCrew = $_armperphase + $opAtt - $myDef; - $opCrew = $_armperphase + $myAtt - $opDef; - //훈련 사기따라 - $myCrew = getCrew($myCrew, $oppose[atmos], $general[train]); - $opCrew = getCrew($opCrew, $general[atmos], $oppose[train]); - //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, $oppose[crewtype]); - $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); - $oppDexDef = getGenDex($oppose, $general[crewtype]); - $opCrew *= getDexLog($genDexAtt, $oppDexDef); - $myCrew *= getDexLog($oppDexAtt, $genDexDef); - - $myAvoid = 1; - $opAvoid = 1; - // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = $general[intel] + getBookEff($general[book]); - if($general[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; - if($ratio >= 30) { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $msg .= "위보를 성공했다!
"; - $opCrew *= 1.2; - break; - case 1: - $msg .= "매복을 성공했다!
"; - $opCrew *= 1.4; - break; - case 2: - $msg .= "반목을 성공했다!
"; - $opCrew *= 1.6; - break; - case 3: - $msg .= "화계를 성공했다!
"; - $opCrew *= 1.8; - break; - case 4: - $msg .= "혼란을 성공했다!
"; - $opCrew *= 2.0; - break; - } - } else { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $msg .= "위보를 실패했다!
"; - $opCrew /= 1.1; - $myCrew *= 1.1; - break; - case 1: - $msg .= "매복을 실패했다!
"; - $opCrew /= 1.2; - $myCrew *= 1.2; - break; - case 2: - $msg .= "반목을 실패했다!
"; - $opCrew /= 1.3; - $myCrew *= 1.3; - break; - case 3: - $msg .= "화계를 실패했다!
"; - $opCrew /= 1.4; - $myCrew *= 1.4; - break; - case 4: - $msg .= "혼란을 실패했다!
"; - $opCrew /= 1.5; - $myCrew *= 1.5; - break; - } - } - } - } - - // 상대 장수 병종간 특성 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $int = $oppose[intel] + getBookEff($oppose[book]); - if($oppose[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($oppose[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; - if($ratio >= 30) { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $msg .= "위보에 당했다!
"; - $myCrew *= 1.2; - break; - case 1: - $msg .= "매복에 당했다!
"; - $myCrew *= 1.4; - break; - case 2: - $msg .= "반목에 당했다!
"; - $myCrew *= 1.6; - break; - case 3: - $msg .= "화계에 당했다!
"; - $myCrew *= 1.8; - break; - case 4: - $msg .= "혼란에 당했다!
"; - $myCrew *= 2.0; - break; - } - } else { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $msg .= "위보를 간파했다!
"; - $myCrew /= 1.1; - $opCrew *= 1.1; - break; - case 1: - $msg .= "매복을 간파했다!
"; - $myCrew /= 1.2; - $opCrew *= 1.2; - break; - case 2: - $msg .= "반목을 간파했다!
"; - $myCrew /= 1.3; - $opCrew *= 1.3; - break; - case 3: - $msg .= "화계를 간파했다!
"; - $myCrew /= 1.4; - $opCrew *= 1.4; - break; - case 4: - $msg .= "혼란을 간파했다!
"; - $myCrew /= 1.5; - $opCrew *= 1.5; - break; - } - } - } - } - - if($oppose[crewtype] == 43) { // 목우 - $r = 0; - $r += $oppose[atmos]; - $r += $oppose[train]; - $ratio = rand() % 400; // 최대 50% 저지 - if($ratio < $r && $opAvoid == 1) { - $msg .= "저지당했다!
"; - $opAvoid = 0; - continue; - } - } - - // my 입장 상성 - // 보병계열 > 궁병계열 - if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 궁병계열 > 기병계열 - if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 기병계열 > 보병계열 - if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 차병계열 - if(floor($general[crewtype]/10) == 4) { - $myCrew *= 1.2; - $opCrew *= 0.8; - } - - // op 입장 상성 - // 보병계열 > 궁병계열 - if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 궁병계열 > 기병계열 - if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 기병계열 > 보병계열 - if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 차병계열 - if(floor($oppose[crewtype]/10) == 4) { - $opCrew *= 1.2; - $myCrew *= 0.8; - } - - //군주, 참모, 장군 공격 보정 5% - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { - $opCrew = $opCrew * 1.05; - } - //상대장수 관직 보정 - //군주, 참모, 모사 방어 보정 5% - if($oppose[level] == 12 || $oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 - $opCrew = $opCrew * 0.95; - } - - //레벨 보정 - $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); - $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); - $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); - $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); - - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader], $general[power], $general[intel]); - if($ratio >= $rd && $myAvoid == 1) { - $msg .= "필살공격!
"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - } - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader], $oppose[power], $oppose[intel]); - if($ratio >= $rd && $opAvoid == 1) { - $msg .= "●상대의 필살공격!
"; - $myCrew = CriticalScore2($myCrew); - $opAvoid = 0; - } - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 - if($ratio < $ratio2 && $myAvoid == 1) { - $msg .= "회피했다!
"; - $myCrew /= 10; // 10%만 소모 - $myAvoid = 0; - } - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 - if($ratio < $ratio2 && $opAvoid == 1) { - $msg .= "●상대가 회피했다!
"; - $opCrew /= 10; // 10%만 소모 - $opAvoid = 0; - } - - //랜타추가 - $opCrew *= (rand() % 21 + 90)/100; // 90~110% - $myCrew *= (rand() % 21 + 90)/100; // 90~110% - - $general[crew] -= round($myCrew); - $oppose[crew] -= round($opCrew); - $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; - $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; - if($general[crew] <= 0 && $oppose[crew] <= 0) { - $r1 = $tempGeneralCrew / $tempMyCrew; - $r2 = $tempOpposeCrew / $tempOpCrew; - - if($r1 > $r2) { - $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; - } else { - $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); - $opCrew += $offset; - $oppose[crew] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } elseif($general[crew] * $oppose[crew] <= 0) { - if($oppose[crew] < 0) { - $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; - } - if($general[crew] < 0) { - $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); - $opCrew += $offset; - $oppose[crew] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } - - $exp += $opCrew; - $opexp += $myCrew; - $general[crew] = round($general[crew]); - $oppose[crew] = round($oppose[crew]); - $myCrew = round($myCrew); - $opCrew = round($opCrew); - $myAtt = round($myAtt, 2); - $myDef = round($myDef, 2); - $opAtt = round($opAtt, 2); - $opDef = round($opDef, 2); - $msg .= "● $phase : 【공격장수】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【수비장수】
"; - - $mykillnum += $opCrew; $mydeathnum += $myCrew; - - if($oppose[crew] <= 0) { break; } - if($general[crew] <= 0) { break; } - } - - $msg .= "★병사수 변화 : -$mydeathnum vs -$mykillnum
"; -// $msg2 .= "★병사수 변화 : -$mydeathnum vs -$mykillnum   "; - } - } - - // 공헌, 명성 상승 - $exp = round($exp / 50); - $ricing = ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $tech1)); - $msg .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; -// $msg2 .= "★ 【공격장수】공헌 상승 : $exp 쌀 소비 : {$exp}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricing
"; - - $msg = ConvertLog($msg, 1); - - $mydeathnumSum += $mydeathnum; - $mykillnumSum += $mykillnum; - $expSum += $exp; - $ricingSum += $ricing; - $expSum2 += $dec; - $ricingSum2 += $rice; - } - - $mydeathnumSum /= $simulCount; - $mykillnumSum /= $simulCount; - $expSum /= $simulCount; - $ricingSum /= $simulCount; - $expSum2 /= $simulCount; - $ricingSum2 /= $simulCount; - if($isgen == "성벽평균") { - $msg2 .= "{$simulCount}회 평균
"; - $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; - $msg2 .= "★【성벽】내정 감소량 : $expSum2 【성벽】쌀 소모 : $ricingSum2
"; - $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; - } elseif($isgen == "장수평균") { - $msg2 .= "{$simulCount}회 평균
"; - $msg2 .= "★병사수 변화 : -$mydeathnumSum vs -$mykillnumSum   "; - $msg2 .= "★ 【공격장수】공헌 상승 : $expSum 쌀 소비 : {$expSum}x5x".getCrewtypeRice($game, $general[crewtype], $tech1)." = $ricingSum
"; - } - - $msg2 = ConvertLog($msg2, 1); -} else { - $leader1 = 70; - $power1 = 70; - $intel1 = 10; - $type1 = 0; - $crew1 = 7000; - $train1 = 100; - $atmos1 = 100; - $level1 = 1; - $explevel1 = 20; - - $leader2 = 70; - $power2 = 70; - $intel2 = 10; - $type2 = 0; - $crew2 = 7000; - $train2 = 100; - $atmos2 = 100; - $level2 = 1; - $explevel2 = 20; - - $def = 7000; - $wall = 7000; - $train3 = $game[city_rate]; - $atmos3 = $game[city_rate]; -} - -switch($level1) { - case 12: $sellevel1[12] = "selected"; break; - case 11: $sellevel1[11] = "selected"; break; - case 10: $sellevel1[10] = "selected"; break; - case 9: $sellevel1[9] = "selected"; break; - case 8: $sellevel1[8] = "selected"; break; - case 7: $sellevel1[7] = "selected"; break; - case 6: $sellevel1[6] = "selected"; break; - case 5: $sellevel1[5] = "selected"; break; - case 1: $sellevel1[1] = "selected"; break; -} -switch($level2) { - case 12: $sellevel2[12] = "selected"; break; - case 11: $sellevel2[11] = "selected"; break; - case 10: $sellevel2[10] = "selected"; break; - case 9: $sellevel2[9] = "selected"; break; - case 8: $sellevel2[8] = "selected"; break; - case 7: $sellevel2[7] = "selected"; break; - case 6: $sellevel2[6] = "selected"; break; - case 5: $sellevel2[5] = "selected"; break; - case 1: $sellevel2[1] = "selected"; break; -} - -switch($type1) { - case 0: $sel1[0] = "selected"; break; - case 1: $sel1[1] = "selected"; break; - case 2: $sel1[2] = "selected"; break; - case 3: $sel1[3] = "selected"; break; - case 4: $sel1[4] = "selected"; break; - case 5: $sel1[5] = "selected"; break; - case 10: $sel1[10] = "selected"; break; - case 11: $sel1[11] = "selected"; break; - case 12: $sel1[12] = "selected"; break; - case 13: $sel1[13] = "selected"; break; - case 14: $sel1[14] = "selected"; break; - case 20: $sel1[20] = "selected"; break; - case 21: $sel1[21] = "selected"; break; - case 22: $sel1[22] = "selected"; break; - case 23: $sel1[23] = "selected"; break; - case 24: $sel1[24] = "selected"; break; - case 25: $sel1[25] = "selected"; break; - case 26: $sel1[26] = "selected"; break; - case 27: $sel1[27] = "selected"; break; - case 30: $sel1[30] = "selected"; break; - case 31: $sel1[31] = "selected"; break; - case 32: $sel1[32] = "selected"; break; - case 33: $sel1[33] = "selected"; break; - case 34: $sel1[34] = "selected"; break; - case 35: $sel1[35] = "selected"; break; - case 36: $sel1[36] = "selected"; break; - case 37: $sel1[37] = "selected"; break; - case 38: $sel1[38] = "selected"; break; - case 40: $sel1[40] = "selected"; break; - case 41: $sel1[41] = "selected"; break; - case 42: $sel1[42] = "selected"; break; - case 43: $sel1[43] = "selected"; break; -} -switch($type2) { - case 0: $sel2[0] = "selected"; break; - case 1: $sel2[1] = "selected"; break; - case 2: $sel2[2] = "selected"; break; - case 3: $sel2[3] = "selected"; break; - case 4: $sel2[4] = "selected"; break; - case 5: $sel2[5] = "selected"; break; - case 10: $sel2[10] = "selected"; break; - case 11: $sel2[11] = "selected"; break; - case 12: $sel2[12] = "selected"; break; - case 13: $sel2[13] = "selected"; break; - case 14: $sel2[14] = "selected"; break; - case 20: $sel2[20] = "selected"; break; - case 21: $sel2[21] = "selected"; break; - case 22: $sel2[22] = "selected"; break; - case 23: $sel2[23] = "selected"; break; - case 24: $sel2[24] = "selected"; break; - case 25: $sel2[25] = "selected"; break; - case 26: $sel2[26] = "selected"; break; - case 27: $sel2[27] = "selected"; break; - case 30: $sel2[30] = "selected"; break; - case 31: $sel2[31] = "selected"; break; - case 32: $sel2[32] = "selected"; break; - case 33: $sel2[33] = "selected"; break; - case 34: $sel2[34] = "selected"; break; - case 35: $sel2[35] = "selected"; break; - case 36: $sel2[36] = "selected"; break; - case 37: $sel2[37] = "selected"; break; - case 38: $sel2[38] = "selected"; break; - case 40: $sel2[40] = "selected"; break; - case 41: $sel2[41] = "selected"; break; - case 42: $sel2[42] = "selected"; break; - case 43: $sel2[43] = "selected"; break; -} -switch($tech1) { - case 0: $tch1[0] = "selected"; break; - case 1000: $tch1[1] = "selected"; break; - case 2000: $tch1[2] = "selected"; break; - case 3000: $tch1[3] = "selected"; break; - case 4000: $tch1[4] = "selected"; break; - case 5000: $tch1[5] = "selected"; break; - case 6000: $tch1[6] = "selected"; break; - case 7000: $tch1[7] = "selected"; break; - case 8000: $tch1[8] = "selected"; break; - case 9000: $tch1[9] = "selected"; break; - case 10000: $tch1[10] = "selected"; break; -} -switch($tech2) { - case 0: $tch2[0] = "selected"; break; - case 1000: $tch2[1] = "selected"; break; - case 2000: $tch2[2] = "selected"; break; - case 3000: $tch2[3] = "selected"; break; - case 4000: $tch2[4] = "selected"; break; - case 5000: $tch2[5] = "selected"; break; - case 6000: $tch2[6] = "selected"; break; - case 7000: $tch2[7] = "selected"; break; - case 8000: $tch2[8] = "selected"; break; - case 9000: $tch2[9] = "selected"; break; - case 10000: $tch2[10] = "selected"; break; -} -switch($dex10) { - case 0: $dx10[0] = "selected"; break; - case 2500: $dx10[1] = "selected"; break; - case 7500: $dx10[2] = "selected"; break; - case 15000: $dx10[3] = "selected"; break; - case 25000: $dx10[4] = "selected"; break; - case 37500: $dx10[5] = "selected"; break; - case 52500: $dx10[6] = "selected"; break; - case 70000: $dx10[7] = "selected"; break; - case 90000: $dx10[8] = "selected"; break; - case 112500: $dx10[9] = "selected"; break; - case 137500: $dx10[10] = "selected"; break; - case 165000: $dx10[11] = "selected"; break; - case 195000: $dx10[12] = "selected"; break; - case 227500: $dx10[13] = "selected"; break; - case 262500: $dx10[14] = "selected"; break; - case 300000: $dx10[15] = "selected"; break; - case 340000: $dx10[16] = "selected"; break; - case 382500: $dx10[17] = "selected"; break; - case 427500: $dx10[18] = "selected"; break; -} -switch($dex110) { - case 0: $dx110[0] = "selected"; break; - case 2500: $dx110[1] = "selected"; break; - case 7500: $dx110[2] = "selected"; break; - case 15000: $dx110[3] = "selected"; break; - case 25000: $dx110[4] = "selected"; break; - case 37500: $dx110[5] = "selected"; break; - case 52500: $dx110[6] = "selected"; break; - case 70000: $dx110[7] = "selected"; break; - case 90000: $dx110[8] = "selected"; break; - case 112500: $dx110[9] = "selected"; break; - case 137500: $dx110[10] = "selected"; break; - case 165000: $dx110[11] = "selected"; break; - case 195000: $dx110[12] = "selected"; break; - case 227500: $dx110[13] = "selected"; break; - case 262500: $dx110[14] = "selected"; break; - case 300000: $dx110[15] = "selected"; break; - case 340000: $dx110[16] = "selected"; break; - case 382500: $dx110[17] = "selected"; break; - case 427500: $dx110[18] = "selected"; break; -} -switch($dex120) { - case 0: $dx120[0] = "selected"; break; - case 2500: $dx120[1] = "selected"; break; - case 7500: $dx120[2] = "selected"; break; - case 15000: $dx120[3] = "selected"; break; - case 25000: $dx120[4] = "selected"; break; - case 37500: $dx120[5] = "selected"; break; - case 52500: $dx120[6] = "selected"; break; - case 70000: $dx120[7] = "selected"; break; - case 90000: $dx120[8] = "selected"; break; - case 112500: $dx120[9] = "selected"; break; - case 137500: $dx120[10] = "selected"; break; - case 165000: $dx120[11] = "selected"; break; - case 195000: $dx120[12] = "selected"; break; - case 227500: $dx120[13] = "selected"; break; - case 262500: $dx120[14] = "selected"; break; - case 300000: $dx120[15] = "selected"; break; - case 340000: $dx120[16] = "selected"; break; - case 382500: $dx120[17] = "selected"; break; - case 427500: $dx120[18] = "selected"; break; -} -switch($dex130) { - case 0: $dx130[0] = "selected"; break; - case 2500: $dx130[1] = "selected"; break; - case 7500: $dx130[2] = "selected"; break; - case 15000: $dx130[3] = "selected"; break; - case 25000: $dx130[4] = "selected"; break; - case 37500: $dx130[5] = "selected"; break; - case 52500: $dx130[6] = "selected"; break; - case 70000: $dx130[7] = "selected"; break; - case 90000: $dx130[8] = "selected"; break; - case 112500: $dx130[9] = "selected"; break; - case 137500: $dx130[10] = "selected"; break; - case 165000: $dx130[11] = "selected"; break; - case 195000: $dx130[12] = "selected"; break; - case 227500: $dx130[13] = "selected"; break; - case 262500: $dx130[14] = "selected"; break; - case 300000: $dx130[15] = "selected"; break; - case 340000: $dx130[16] = "selected"; break; - case 382500: $dx130[17] = "selected"; break; - case 427500: $dx130[18] = "selected"; break; -} -switch($dex140) { - case 0: $dx140[0] = "selected"; break; - case 2500: $dx140[1] = "selected"; break; - case 7500: $dx140[2] = "selected"; break; - case 15000: $dx140[3] = "selected"; break; - case 25000: $dx140[4] = "selected"; break; - case 37500: $dx140[5] = "selected"; break; - case 52500: $dx140[6] = "selected"; break; - case 70000: $dx140[7] = "selected"; break; - case 90000: $dx140[8] = "selected"; break; - case 112500: $dx140[9] = "selected"; break; - case 137500: $dx140[10] = "selected"; break; - case 165000: $dx140[11] = "selected"; break; - case 195000: $dx140[12] = "selected"; break; - case 227500: $dx140[13] = "selected"; break; - case 262500: $dx140[14] = "selected"; break; - case 300000: $dx140[15] = "selected"; break; - case 340000: $dx140[16] = "selected"; break; - case 382500: $dx140[17] = "selected"; break; - case 427500: $dx140[18] = "selected"; break; -} -switch($dex20) { - case 0: $dx20[0] = "selected"; break; - case 2500: $dx20[1] = "selected"; break; - case 7500: $dx20[2] = "selected"; break; - case 15000: $dx20[3] = "selected"; break; - case 25000: $dx20[4] = "selected"; break; - case 37500: $dx20[5] = "selected"; break; - case 52500: $dx20[6] = "selected"; break; - case 70000: $dx20[7] = "selected"; break; - case 90000: $dx20[8] = "selected"; break; - case 112500: $dx20[9] = "selected"; break; - case 137500: $dx20[10] = "selected"; break; - case 165000: $dx20[11] = "selected"; break; - case 195000: $dx20[12] = "selected"; break; - case 227500: $dx20[13] = "selected"; break; - case 262500: $dx20[14] = "selected"; break; - case 300000: $dx20[15] = "selected"; break; - case 340000: $dx20[16] = "selected"; break; - case 382500: $dx20[17] = "selected"; break; - case 427500: $dx20[18] = "selected"; break; -} -switch($dex210) { - case 0: $dx210[0] = "selected"; break; - case 2500: $dx210[1] = "selected"; break; - case 7500: $dx210[2] = "selected"; break; - case 15000: $dx210[3] = "selected"; break; - case 25000: $dx210[4] = "selected"; break; - case 37500: $dx210[5] = "selected"; break; - case 52500: $dx210[6] = "selected"; break; - case 70000: $dx210[7] = "selected"; break; - case 90000: $dx210[8] = "selected"; break; - case 112500: $dx210[9] = "selected"; break; - case 137500: $dx210[10] = "selected"; break; - case 165000: $dx210[11] = "selected"; break; - case 195000: $dx210[12] = "selected"; break; - case 227500: $dx210[13] = "selected"; break; - case 262500: $dx210[14] = "selected"; break; - case 300000: $dx210[15] = "selected"; break; - case 340000: $dx210[16] = "selected"; break; - case 382500: $dx210[17] = "selected"; break; - case 427500: $dx210[18] = "selected"; break; -} -switch($dex220) { - case 0: $dx220[0] = "selected"; break; - case 2500: $dx220[1] = "selected"; break; - case 7500: $dx220[2] = "selected"; break; - case 15000: $dx220[3] = "selected"; break; - case 25000: $dx220[4] = "selected"; break; - case 37500: $dx220[5] = "selected"; break; - case 52500: $dx220[6] = "selected"; break; - case 70000: $dx220[7] = "selected"; break; - case 90000: $dx220[8] = "selected"; break; - case 112500: $dx220[9] = "selected"; break; - case 137500: $dx220[10] = "selected"; break; - case 165000: $dx220[11] = "selected"; break; - case 195000: $dx220[12] = "selected"; break; - case 227500: $dx220[13] = "selected"; break; - case 262500: $dx220[14] = "selected"; break; - case 300000: $dx220[15] = "selected"; break; - case 340000: $dx220[16] = "selected"; break; - case 382500: $dx220[17] = "selected"; break; - case 427500: $dx220[18] = "selected"; break; -} -switch($dex230) { - case 0: $dx230[0] = "selected"; break; - case 2500: $dx230[1] = "selected"; break; - case 7500: $dx230[2] = "selected"; break; - case 15000: $dx230[3] = "selected"; break; - case 25000: $dx230[4] = "selected"; break; - case 37500: $dx230[5] = "selected"; break; - case 52500: $dx230[6] = "selected"; break; - case 70000: $dx230[7] = "selected"; break; - case 90000: $dx230[8] = "selected"; break; - case 112500: $dx230[9] = "selected"; break; - case 137500: $dx230[10] = "selected"; break; - case 165000: $dx230[11] = "selected"; break; - case 195000: $dx230[12] = "selected"; break; - case 227500: $dx230[13] = "selected"; break; - case 262500: $dx230[14] = "selected"; break; - case 300000: $dx230[15] = "selected"; break; - case 340000: $dx230[16] = "selected"; break; - case 382500: $dx230[17] = "selected"; break; - case 427500: $dx230[18] = "selected"; break; -} -switch($dex240) { - case 0: $dx240[0] = "selected"; break; - case 2500: $dx240[1] = "selected"; break; - case 7500: $dx240[2] = "selected"; break; - case 15000: $dx240[3] = "selected"; break; - case 25000: $dx240[4] = "selected"; break; - case 37500: $dx240[5] = "selected"; break; - case 52500: $dx240[6] = "selected"; break; - case 70000: $dx240[7] = "selected"; break; - case 90000: $dx240[8] = "selected"; break; - case 112500: $dx240[9] = "selected"; break; - case 137500: $dx240[10] = "selected"; break; - case 165000: $dx240[11] = "selected"; break; - case 195000: $dx240[12] = "selected"; break; - case 227500: $dx240[13] = "selected"; break; - case 262500: $dx240[14] = "selected"; break; - case 300000: $dx240[15] = "selected"; break; - case 340000: $dx240[16] = "selected"; break; - case 382500: $dx240[17] = "selected"; break; - case 427500: $dx240[18] = "selected"; break; -} - -?> - - - - -전투시뮬레이션 - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
공격장수상대장수상대성벽
관직 - - 관직 - - -
Lv >Lv >-
통솔 >통솔 >-
무력 >무력 >-
지력 >지력 >-
병종 - - 병종 - - 성벽 >
병력 >병력 >수비 >
훈련 >훈련 >훈련 >
사기 >사기 >사기 >
기술 - - 기술 - - -
보 - - 궁 - - 기 - - 귀 - - 차 - - 보 - - 궁 - - 기 - - 귀 - - 차 - - -
- - - ';?> - - - ';?> -
- -
- - - - - - - - - - - - -"; - - for($i=10; $i <= 14; $i++) { - printSimul($game, $i); - } - echo " - "; - - for($i=20; $i <= 27; $i++) { - printSimul($game, $i); - } - echo " - "; - - for($i=30; $i <= 38; $i++) { - printSimul($game, $i); - } - echo " - "; - - for($i=40; $i <= 43; $i++) { - printSimul($game, $i); - } - echo " - "; -?> -
공격방어기동회피가격군량-
-
- - - - - ".getTypename($i)." - $att - $def - $spd - $avd - $cst - $ric - - - "; -} - - diff --git a/che/a_bestGeneral.php b/che/a_bestGeneral.php deleted file mode 100644 index 718d1b91..00000000 --- a/che/a_bestGeneral.php +++ /dev/null @@ -1,279 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } -?> - - - - -명장일람 - - - - - - - -
명 장 일 람
- - - - -
- - -
- -=2"; } -else { $sel = "npc<2"; } - -$query = "select nation,name,color from nation"; -$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); - $nationName[$nation[nation]] = $nation[name]; - $nationColor[$nation[nation]] = $nation[color]; -} - -$type = array( - "명 성", - "계 급", - "계 략 성 공", - "전 투 횟 수", - "승 리", - "승 률", - "사 살", - "살 상 률", - "보 병 숙 련 도", - "궁 병 숙 련 도", - "기 병 숙 련 도", - "귀 병 숙 련 도", - "차 병 숙 련 도", - "전 력 전 승 률", - "통 솔 전 승 률", - "일 기 토 승 률", - "설 전 승 률", - "베 팅 투 자 액", - "베 팅 당 첨", - "베 팅 수 익 금", - "베 팅 수 익 률" -); -for($i=0; $i < 21; $i++) { - switch($i) { - case 0: $query = "select nation,no,name,picture,imgsvr,experience as data from general where $sel order by data desc limit 0,10"; break; - case 1: $query = "select nation,no,name,picture,imgsvr,dedication as data from general where $sel order by data desc limit 0,10"; break; - case 2: $query = "select nation,no,name,picture,imgsvr,firenum as data from general where $sel order by data desc limit 0,10"; break; - case 3: $query = "select nation,no,name,picture,imgsvr,warnum as data from general where $sel order by data desc limit 0,10"; break; - case 4: $query = "select nation,no,name,picture,imgsvr,killnum as data from general where $sel order by data desc limit 0,10"; break; - case 5: $query = "select nation,no,name,picture,imgsvr,killnum/warnum*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break; - case 6: $query = "select nation,no,name,picture,imgsvr,killcrew as data from general where $sel order by data desc limit 0,10"; break; - case 7: $query = "select nation,no,name,picture,imgsvr,killcrew/deathcrew*10000 as data from general where warnum>=10 and $sel order by data desc limit 0,10"; break; - case 8: $query = "select nation,no,name,picture,imgsvr,dex0 as data from general where $sel order by data desc limit 0,10"; break; - case 9: $query = "select nation,no,name,picture,imgsvr,dex10 as data from general where $sel order by data desc limit 0,10"; break; - case 10: $query = "select nation,no,name,picture,imgsvr,dex20 as data from general where $sel order by data desc limit 0,10"; break; - case 11: $query = "select nation,no,name,picture,imgsvr,dex30 as data from general where $sel order by data desc limit 0,10"; break; - case 12: $query = "select nation,no,name,picture,imgsvr,dex40 as data from general where $sel order by data desc limit 0,10"; break; - case 13: $query = "select nation,no,name,picture,imgsvr,ttw/(ttw+ttd+ttl)*10000 as data from general where $sel and (ttw+ttd+ttl)>=50 order by data desc limit 0,10"; break; - case 14: $query = "select nation,no,name,picture,imgsvr,tlw/(tlw+tld+tll)*10000 as data from general where $sel and (tlw+tld+tll)>=50 order by data desc limit 0,10"; break; - case 15: $query = "select nation,no,name,picture,imgsvr,tpw/(tpw+tpd+tpl)*10000 as data from general where $sel and (tpw+tpd+tpl)>=50 order by data desc limit 0,10"; break; - case 16: $query = "select nation,no,name,picture,imgsvr,tiw/(tiw+tid+til)*10000 as data from general where $sel and (tiw+tid+til)>=50 order by data desc limit 0,10"; break; - case 17: $query = "select nation,no,name,picture,imgsvr,betgold as data from general where $sel order by data desc limit 0,10"; break; - case 18: $query = "select nation,no,name,picture,imgsvr,betwin as data from general where $sel order by data desc limit 0,10"; break; - case 19: $query = "select nation,no,name,picture,imgsvr,betwingold as data from general where $sel order by data desc limit 0,10"; break; - case 20: $query = "select nation,no,name,picture,imgsvr,betwingold/betgold*10000 as data from general where $sel and betgold >= 1000 order by data desc limit 0,10"; break; - } - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - echo " - - - "; - - for($k=0; $k < 10; $k++) { - $gen = MYDB_fetch_array($result); - if($i != 2) { - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $data[$k] = $gen[data]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; - } else { - $name[$k] = "???"; - $nation[$k] = "???"; - $data[$k] = $gen[data]; - $color[$k] = $_basecolor4; - $gen[imgsvr] = 0; - $pic[$k] = "9999.jpg"; - } - if($color[$k] == "") $color[$k] = $_basecolor4; - if($nation[$k] == "") $nation[$k] = " "; - if($pic[$k] == "") { - echo ""; - } else { - $imageTemp = GetImageURL($gen[imgsvr]); - echo ""; - } - } - - echo ""; - - for($k=0; $k < 10; $k++) { - echo ""; - } - - echo ""; - - for($k=0; $k < 10; $k++) { - echo ""; - } - - echo ""; - - for($k=0; $k < 10; $k++) { - if($i == 5 || $i == 7 || $i == 20) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } - if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } - echo ""; - } - echo ""; -} - -echo " -
$type[$i]
1위2위3위4위5위6위7위8위9위10위
 
{$nation[$k]}
{$name[$k]}
{$data[$k]}
-
- -"; - -$type = array( - "명 마", - "명 검", - "명 서", - "도 구" -); - -$call = array( - "horse", - "weap", - "book", - "item" -); - -$func = array( - "getHorseName", - "getWeapName", - "getBookName", - "getItemName" -); - -for($i=0; $i < 4; $i++) { - echo " - - "; - for($k=26; $k > 16; $k--) { - $str = $func[$i]($k); - echo ""; - } - - echo ""; - - for($k=26; $k > 16; $k--) { - $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; - if($color[$k] == "") $color[$k] = $_basecolor4; - if($nation[$k] == "") $nation[$k] = " "; - if($pic[$k] == "") { - echo ""; - } else { - $imageTemp = GetImageURL($gen[imgsvr]); - echo ""; - } - } - - echo ""; - - for($k=26; $k > 16; $k--) { - echo ""; - } - - echo ""; - - for($k=26; $k > 16; $k--) { - echo ""; - } - - echo ""; - - echo " - "; - for($k=16; $k > 6; $k--) { - $str = $func[$i]($k); - echo ""; - } - - echo ""; - - for($k=16; $k > 6; $k--) { - $query = "select nation,no,name,picture,imgsvr from general where {$call[$i]}={$k}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $nationName[$gen[nation]]; - $color[$k] = $nationColor[$gen[nation]]; - $pic[$k] = $gen[picture]; - if($color[$k] == "") $color[$k] = $_basecolor4; - if($nation[$k] == "") $nation[$k] = " "; - if($pic[$k] == "") { - echo ""; - } else { - $imageTemp = GetImageURL($gen[imgsvr]); - echo ""; - } - } - - echo ""; - - for($k=16; $k > 6; $k--) { - echo ""; - } - - echo ""; - - for($k=16; $k > 6; $k--) { - echo ""; - } - - echo ""; -} - -?> -
$type[$i]
".$str."
 
{$nation[$k]}
{$name[$k]}
".$str."
 
{$nation[$k]}
{$name[$k]}
- - - -
- - - - diff --git a/che/a_emperior.php b/che/a_emperior.php deleted file mode 100644 index 6159ac2e..00000000 --- a/che/a_emperior.php +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -왕조일람 - - - - - - - -
역 대 왕 조
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- $emperior[phase] - - -
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) -
국 력$emperior[power]장 수$emperior[gennum]속 령$emperior[citynum]성 향$emperior[type]
황 제$emperior[l12name]승 상$emperior[l11name]위 장 군$emperior[l10name]사 공$emperior[l9name]
-"; - } -} else { - $query = "select * from emperior where no='$select'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $emperior = MYDB_fetch_array($result); - -//background={$image}/{$emperior[l12pic]} - - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- $emperior[phase] - - -
국 가 수
(최종 / 최대)
$emperior[nation_count]장 수 수
(최종 / 최대)
$emperior[gen_count]
등 장 국 가$emperior[nation_name]
국가별 성향$emperior[nation_hist]
장 수 성 격$emperior[personal_hist]
장 수 특 기$emperior[special_hist]
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) -
국 력$emperior[power]성 향$emperior[type]
장 수$emperior[gennum]속 령$emperior[citynum]
총 인 구$emperior[pop]인 구 율$emperior[poprate]
국 고$emperior[gold]병 량$emperior[rice]
황 제 $emperior[l12name]승 상 $emperior[l11name]
위 장 군 $emperior[l10name]사 공 $emperior[l9name]
표 기 장 군 $emperior[l8name]태 위 $emperior[l7name]
거 기 장 군 $emperior[l6name]사 도 $emperior[l5name]
오 호 장 군$emperior[tiger]
건 안 칠 자$emperior[eagle]
장 수 들
(공헌도 순서)
$emperior[gen]
역 사 기 록".ConvertLog($emperior[history], 1)."
-"; -} -?> - - - - -
- - - - diff --git a/che/a_emperior2.php b/che/a_emperior2.php deleted file mode 100644 index c3d9e8c5..00000000 --- a/che/a_emperior2.php +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - -왕조일람 - - - - - - - -
역 대 왕 조
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- $emperior[phase] - - -
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) -
국 력$emperior[power]장 수$emperior[gennum]속 령$emperior[citynum]성 향$emperior[type]
황 제$emperior[l12name]승 상$emperior[l11name]위 장 군$emperior[l10name]사 공$emperior[l9name]
-"; - } -} 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); - -//background={$image}/{$emperior[l12pic]} - - echo " -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- $emperior[phase] - - -
국 가 수
(최종 / 최대)
$emperior[nation_count]장 수 수
(최종 / 최대)
$emperior[gen_count]
등 장 국 가$emperior[nation_name]
국가별 성향$emperior[nation_hist]
장 수 성 격$emperior[personal_hist]
장 수 특 기$emperior[special_hist]
- $emperior[name] ({$emperior[year]}年 {$emperior[month]}月) -
국 력$emperior[power]성 향$emperior[type]
장 수$emperior[gennum]속 령$emperior[citynum]
총 인 구$emperior[pop]인 구 율$emperior[poprate]
국 고$emperior[gold]병 량$emperior[rice]
황 제 $emperior[l12name]승 상 $emperior[l11name]
위 장 군 $emperior[l10name]사 공 $emperior[l9name]
표 기 장 군 $emperior[l8name]태 위 $emperior[l7name]
거 기 장 군 $emperior[l6name]사 도 $emperior[l5name]
오 호 장 군$emperior[tiger]
건 안 칠 자$emperior[eagle]
장 수 들
(공헌도 순서)
$emperior[gen]
역 사 기 록".ConvertLog($emperior[history], 1)."
-
"; -} -?> - - - - -
- - - - diff --git a/che/a_genList.php b/che/a_genList.php deleted file mode 100644 index 21c54ed7..00000000 --- a/che/a_genList.php +++ /dev/null @@ -1,182 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -if($type == 0) { - $type = 9; -} -$sel[$type] = "selected"; - -?> - - - - -장수일람 - - - - - - - - -
장 수 일 람
정렬순서 : - -
-
- - - 얼 굴 - 이 름 - 연령 - 성격 - 특기 - 레 벨 - 국 가 - 명 성 - 계 급 - 관 직 - 통솔 - 무력 - 지력 - 삭턴 - 벌점 - "; -for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $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) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; - } - - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); - $leader = "{$leader}{$lbonus}"; - $power = "{$power}"; - $intel = "{$intel}"; - } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; - } - - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } - - $general[connect] = round($general[connect] / 10, 0) * 10; - - $imageTemp = GetImageURL($general[imgsvr]); - echo " - - - $name - $general[age]세 - ".getGenChar($general[personal])." - ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." - Lv ".getExpLevel($general[experience])." - {$nation} - ".getHonor($general[experience])." - ".getDed($general[dedication])." - "; echo getLevel($general[level]); echo " - $leader - $power - $intel - $general[killturn] - $general[connect]"; echo "
【".getConnect($general[connect])."】 - "; -} -echo " - -"; - -MYDB_close($connect); -?> - - - - -
- - - - diff --git a/che/a_hallOfFame.php b/che/a_hallOfFame.php deleted file mode 100644 index 3eecaadd..00000000 --- a/che/a_hallOfFame.php +++ /dev/null @@ -1,103 +0,0 @@ - - - - - -명예의 전당 - - - - - - - -
명 예 의 전 당
- - - - "; - - for($k=0; $k < 10; $k++) { - $gen = MYDB_fetch_array($result); - $name[$k] = $gen[name]; - $nation[$k] = $gen[nation]; - $data[$k] = $gen[data]; - $color[$k] = $gen[color]; - $pic[$k] = $gen[picture]; - if($color[$k] == "") $color[$k] = $_basecolor4; - if($nation[$k] == "") $nation[$k] = " "; -/* - if($pic[$k] == "") { - echo ""; - } else { - $imageTemp = GetImageURL($gen[imgsvr]); - echo ""; - } -*/ - } - -// echo ""; - - for($k=0; $k < 10; $k++) { - echo ""; - } - - echo ""; - - for($k=0; $k < 10; $k++) { - echo ""; - } - - echo ""; - - for($k=0; $k < 10; $k++) { - if($i == 5 || $i == 7 || $i == 20) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } - if($i >= 13 && $i <= 16) { $data[$k] = floor($data[$k]/100).".".($data[$k]%100)." %"; } - echo ""; - } - echo ""; -} -?> -
$type[$i]
1위2위3위4위5위6위7위8위9위10위
 
{$nation[$k]}
{$name[$k]}
{$data[$k]}
- - - -
- - - - diff --git a/che/a_history.php b/che/a_history.php deleted file mode 100644 index 83cfe509..00000000 --- a/che/a_history.php +++ /dev/null @@ -1,137 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -$query = "select year,month from history order by no limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$history = MYDB_fetch_array($result); -$s = ($history[year]*12) + $history[month]; - -$query = "select year,month from history order by no desc limit 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$history = MYDB_fetch_array($result); -$e = ($history[year]*12) + $history[month]; - -if(!$yearmonth) { - $year = $admin['year']; - $month = $admin['month'] - 1; -} else { - $year = substr($yearmonth, 0, 3) - 0; - $month = substr($yearmonth, 3, 2) - 0; - - if($btn == "◀◀ 이전달") { - $month -= 1; - } elseif($btn == "다음달 ▶▶") { - $month += 1; - } -} -$now = ($year*12) + $month; - -if($now < $s) { $now = $s; } -if($now > $e) { $now = $e; } - -$year = floor($now / 12); -$month = $now % 12; -if($month <= 0) { - $year -= 1; - $month += 12; -} - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - - -연감 - - - - - - - - -
연 감
-
- 년월 선택 : - - - - -
-
- - - - - - - - - - - - - - - - - -
중 원 지 도
- -
중 원 정 세
- -
장 수 동 향
- -
- - - -
- - - - diff --git a/che/a_kingdomList.php b/che/a_kingdomList.php deleted file mode 100644 index 108b78cf..00000000 --- a/che/a_kingdomList.php +++ /dev/null @@ -1,246 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } -?> - - - - -세력일람 - - - - - - - -
세 력 일 람
-= 2) { $l12 = "$level12[name]"; } - elseif($level12[npc] == 1) { $l12 = "$level12[name]"; } - else { $l12 = $level12[name]; } - - if($level11[name] == "") { $l11 = "-"; } - elseif($level11[npc] >= 2) { $l11 = "$level11[name]"; } - elseif($level11[npc] == 1) { $l11 = "$level11[name]"; } - else { $l11 = $level11[name]; } - - if($level10[name] == "") { $l10 = "-"; } - elseif($level10[npc] >= 2) { $l10 = "$level10[name]"; } - elseif($level10[npc] == 1) { $l10 = "$level10[name]"; } - else { $l10 = $level10[name]; } - - if($level9[name] == "") { $l9 = "-"; } - elseif($level9[npc] >= 2) { $l9 = "$level9[name]"; } - elseif($level9[npc] == 1) { $l9 = "$level9[name]"; } - else { $l9 = $level9[name]; } - - if($level8[name] == "") { $l8 = "-"; } - elseif($level8[npc] >= 2) { $l8 = "$level8[name]"; } - elseif($level8[npc] == 1) { $l8 = "$level8[name]"; } - else { $l8 = $level8[name]; } - - if($level7[name] == "") { $l7 = "-"; } - elseif($level7[npc] >= 2) { $l7 = "$level7[name]"; } - elseif($level7[npc] == 1) { $l7 = "$level7[name]"; } - else { $l7 = $level7[name]; } - - if($level6[name] == "") { $l6 = "-"; } - elseif($level6[npc] >= 2) { $l6 = "$level6[name]"; } - elseif($level6[npc] == 1) { $l6 = "$level6[name]"; } - else { $l6 = $level6[name]; } - - if($level5[name] == "") { $l5 = "-"; } - elseif($level5[npc] >= 2) { $l5 = "$level5[name]"; } - elseif($level5[npc] == 1) { $l5 = "$level5[name]"; } - else { $l5 = $level5[name]; } - - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
【 {$nation[name]} 】
성 향".getNationType($nation[type])."작 위".getNationLevel($nation[level])."국 력{$nation[power]}장수 / 속령{$gencount} / {$citycount}
".getLevel(12, $nation[level])."$l12".getLevel(11, $nation[level])."$l11".getLevel(10, $nation[level])."$l10".getLevel( 9, $nation[level])."$l9
".getLevel( 8, $nation[level])."$l8".getLevel( 7, $nation[level])."$l7".getLevel( 6, $nation[level])."$l6".getLevel( 5, $nation[level])."$l5
"; - if($nation[level] > 0) { - echo "속령 일람 : "; - - for($j=0; $j < $citycount; $j++) { - $city = MYDB_fetch_array($cityresult); - if($city[city] == $nation[capital]) { - echo "[{$city[name]}], "; - } else { - echo "$city[name], "; - } - } - } 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 "현재 위치 : $city[name]"; - } - echo" -
장수 일람 : "; - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "$general[name], "; } - elseif($general[npc] == 1) { echo "$general[name], "; } - else { echo "$general[name], "; } - } - 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 " - - - - - - - - - - - - - - - - - -
【 재 야 】
 장 수{$gencount}속 령{$citycount}
속령 일람 : "; -for($j=0; $j < $citycount; $j++) { - $city = MYDB_fetch_array($cityresult); - echo "$city[name], "; -} -echo" -
장수 일람 : "; - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "$general[name], "; } - elseif($general[npc] == 1) { echo "$general[name], "; } - else { echo "$general[name], "; } - } - echo" -
"; - -?> - - - - -
- - - - diff --git a/che/a_npcList.php b/che/a_npcList.php deleted file mode 100644 index 2a94a39d..00000000 --- a/che/a_npcList.php +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -빙의일람 - - - - - - - - -
빙 의 일 람
정렬순서 : - -
-
- - - 희생된 장수 - 악령 이름 - 레벨 - 국가 - 성격 - 특기 - 종능 - 통솔 - 무력 - 지력 - 명성 - 계급 - "; -for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $nation = $nationname[$general[nation]]; - - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } - - echo " - - {$name} - {$general[name2]} - Lv {$general[explevel]} - {$nation} - ".getGenChar($general[personal])." - ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." - $general[sum] - $general[leader] - $general[power] - $general[intel] - {$general[experience]} - {$general[dedication]} - "; -} -echo " - -"; - -MYDB_close($connect); -?> - - - - -
- - - - diff --git a/che/a_status.php b/che/a_status.php deleted file mode 100644 index c9dafa4c..00000000 --- a/che/a_status.php +++ /dev/null @@ -1,58 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } -?> - - - - -세력도 - - - - - - - -
세 력 도
- - - - - - - - -
- - - -
- -
- - - -
- - - - - diff --git a/che/a_traffic.php b/che/a_traffic.php deleted file mode 100644 index ac80e299..00000000 --- a/che/a_traffic.php +++ /dev/null @@ -1,257 +0,0 @@ -"; } -echo $str; - -$curonline = onlinenum($connect); -for($i=0; $i < 11; $i++) { - $parse = explode("|", $log[count($log)-12+$i]); - $date[$i] = trim($parse[0]); - $year[$i] = trim($parse[1]); - $month[$i] = trim($parse[2]); - $refresh[$i] = trim($parse[3]); - $online[$i] = trim($parse[4]); -} -if($game[maxrefresh] == 0) { $game[maxrefresh] = 1; } -if($game[maxrefresh] < $game[refresh]) { $game[maxrefresh] = $game[refresh]; } -if($game[maxonline] == 0) { $game[maxonline] = 1; } -if($game[maxonline] < $curonline) { $game[maxonline] = $curonline; } -?> - - -트래픽정보 - - - - - - - -
트 래 픽 정 보
-
- - - -
- - -= 100) { $w -= 0.1; } - if($refresh[$i] < 10 && $w < 3) { $w = 3; } - elseif($refresh[$i] < 100 && $w < 6) { $w = 6; } - elseif($refresh[$i] < 1000 && $w < 9) { $w = 9; } - $w2 = round(100 - $w, 1); - $color = getColor($w); - $dt = substr($date[$i], 11, 5); - echo " - - - - - - - "; -} -$w = round($game[refresh] / $game[maxrefresh] * 100, 1); -if($w >= 100) { $w -= 0.1; } -if($game[refresh] < 10 && $w < 3) { $w = 3; } -elseif($game[refresh] < 100 && $w < 6) { $w = 6; } -elseif($game[refresh] < 1000 && $w < 9) { $w = 9; } -$w2 = round(100 - $w, 1); -$color = getColor($w); -$dt = date('H:i'); -echo " - - - - - - - - - - -"; -?> -
접 속 량
{$year[$i]}년 {$month[$i]}월{$dt} - - - - - -
{$refresh[$i]}  
-
{$game[year]}년 {$game[month]}월{$dt} - - - - - -
{$game[refresh]}  
-
최고기록: {$game[maxrefresh]}
-
- - -= 100) { $w -= 0.1; } - if($online[$i] < 10 && $w < 3) { $w = 3; } - elseif($online[$i] < 100 && $w < 6) { $w = 6; } - elseif($online[$i] < 1000 && $w < 9) { $w = 9; } - $w2 = round(100 - $w, 1); - $color = getColor($w); - $dt = substr($date[$i], 11, 5); - echo " - - - - - - - "; -} -$w = round($curonline / $game[maxonline] * 100, 1); -if($w >= 100) { $w -= 0.1; } -if($curonline < 10 && $w < 3) { $w = 3; } -elseif($curonline < 100 && $w < 6) { $w = 6; } -elseif($curonline < 1000 && $w < 9) { $w = 9; } -$w2 = round(100 - $w, 1); -$color = getColor($w); -$dt = date('H:i'); -echo " - - - - - - - - - - -"; -?> -
접 속 자
{$year[$i]}년 {$month[$i]}월{$dt} - - - - - -
{$online[$i]}  
-
{$game[year]}년 {$game[month]}월{$dt} - - - - - -
{$curonline}  
-
최고기록: {$game[maxonline]}
-
-
- - - - - - - - - - - - -"; - -$query = "select name,refresh,connect from general order by refresh desc limit 0,5"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $user = MYDB_fetch_array($result); - - $w = round($user[refresh] / $maxrefresh * 100, 1); - $w2 = round(100 - $w, 1); - $color = getColor($w); - echo " - - - - - - "; -} -?> -
주 의 대 상 자 (순간과도갱신)
주의대상자벌점(순간갱신)전체 대비
접속자 총합{$user[connect]}({$maxrefresh}) - - - - - -
  
-
{$user[name]}{$user[connect]}({$user[refresh]}) - - - - - -
  
-
-
- - - -
- - - - - - - -설문조사 - - - - - - - - -
설 문 조 사
- - - -= 5) { - echo " - - - - - - "; -} - -$vote[0] = Tag2Code($vote[0]); -echo " - - - - -"; - -$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); - -$query = "select no from general where npc<2"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$allCount = MYDB_num_rows($result); - -$percentage = round($voteCount / $allCount * 100, 1); - -$voteTypeCount = count($vote); -for($i=1; $i < $voteTypeCount; $i++) { - echo " - - - - - - "; -} - -echo " - -"; -if($me[vote] == 0 && $me[no] > 0) { - echo " - - - "; -} else { - echo " - - "; -} -echo " - - -"; - -if($me[userlevel] >= 5) { - echo " - - - - - - "; -} - -if($admin[votecomment] != "") { - $comment = explode("|", $admin[votecomment]); - $commentCount = count($comment); -} else { - $commentCount = 0; -} -echo " -
설 문 조 사 (금과 추첨으로 유니크템 증정!)
제 목 {$vote[0]}
{$i}. - "; - if($me[vote] == 0 && $me[no] > 0) { - echo " - - "; - } elseif($admin[voteopen] >= 1 || $me[userlevel] >= 5) { - $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 " -  {$vote[$i]}
투표결산 투표율 : {$voteCount} / {$allCount} ({$percentage} %)
- - - - -"; -for($i=0; $i < $commentCount; $i++) { - $cmt = explode(":", $comment[$i]); - $cmt[2] = Tag2Code($cmt[2]); - $j = $i+1; - echo " - - - - - - - "; -} -if($me[no] > 0) { - echo " - - - - - - "; -} -?> -
댓 글
{$j}.{$cmt[0]}{$cmt[1]} {$cmt[2]}
-
-
- - "; - -if($admin[voteopen] >= 1 || $me[userlevel] >= 5) { - echo " - - - - - - "; -} - -if($admin[voteopen] >= 2 || $me[userlevel] >= 5) { - $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(!$nationVoteCount[0]) { $nationVoteCount[0] = 0; } - $percentage = @round($nationVoteCount[0] / $memCount * 100, 1); - - echo " - - - - - - "; - - $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); - - if(!$nationVoteCount[$nation[nation]]) { $nationVoteCount[$nation[nation]] = 0; } - $percentage = @round($nationVoteCount[$nation[nation]] / $memCount * 100, 1); - - echo " - - - - - - "; - } -} -?> - -
- 전 체 통 계 -= 5) { - echo " - - - "; -} -echo " -
전 체{$voteCount} / {$allCount} ({$percentage} %) - - - "; - - $query = "select no from general where npc<2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $memCount = MYDB_num_rows($result); - - $query = "select nation,vote from general where npc<2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $vote = MYDB_fetch_array($result); - - $totalVote[$vote[vote]]++; - if($vote[vote] > 0) { $nationVoteCount[$vote[nation]]++; } - $nationVote[$vote[nation]][$vote[vote]]++; - } - - for($i=0; $i < $voteTypeCount; $i++) { - $per = @round($totalVote[$i] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } - echo " - - "; - } - - echo " - -
{$totalVote[$i]}
-
재 야{$nationVoteCount[0]} / {$memCount} ({$percentage} %) - - - "; - - for($i=0; $i < $voteTypeCount; $i++) { - $per = @round($nationVote[0][$i] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } - echo " - - "; - } - - echo " - -
{$nationVote[0][$i]}
-
{$nation[name]}{$nationVoteCount[$nation[nation]]} / {$memCount} ({$percentage} %) - - - "; - - for($k=0; $k < $voteTypeCount; $k++) { - $per = @round($nationVote[$nation[nation]][$k] / $memCount * 100, 1); -// if($per < 5) { $vote[cnt] = " "; } - echo " - - "; - } - - echo " - -
{$nationVote[$nation[nation]][$k]}
-
- - - -
- - - - - 0) { - $type = (($type - 1) % 7) + 1; - } - - switch($type) { - 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; -} - -function getNewColor($type) { - if($type > 0) { - $type = (($type - 1) % 7) + 1; - } - - switch($type) { - case 2: $color = "black"; break; - case 3: $color = "black"; break; - default:$color = "white"; break; - } - - return $color; -} - - diff --git a/che/analytics.php b/che/analytics.php deleted file mode 100644 index f0e83ec9..00000000 --- a/che/analytics.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/che/b_auction.php b/che/b_auction.php deleted file mode 100644 index 57ef9961..00000000 --- a/che/b_auction.php +++ /dev/null @@ -1,260 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -$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($me[userlevel] >= 5 || ($me[special] != 30 && $btCount < 1) || ($me[special] == 30 && $btCount < 3)) { - $btn = "submit"; -} else { - $btn = "hidden"; -} - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} - -if($msg == "") $msg = "-"; -if($msg2 == "") $msg2 = "-"; -?> - - -거래장 - - - - - - - - -
거 래 장
거 래 장
- - - - - - - - - - - - - - - - - 0 && $auction[amount] * 2 <= $auction[value] && $auction[stuff] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } - elseif($auction[no2] > 0 && $auction[topv] <= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } - elseif($chk == 0) { $radio = " checked"; $chk = 1; } - $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; - $pv = substr($pv, 0, 4); - if($auction[stuff] != 0) { $pv = '-'; } - echo " - - - - - - - - - - - - - - "; -} -?> - - - - - - - - - - - - - - - - -
팝 니 다
거래번호선택판매자물품수량시작판매가현재판매가즉시판매가단가구매 예정자거래종료
{$auction[no]}{$auction[name1]}{$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$alert}{$pv}{$alert2}{$alert}{$auction[name2]}{$alert2}{$auction[expire]}
등록결과
입찰등록 -  지불할 금액: - name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'> -
거래등록 -  종료: 턴 후 -  물품: -  판매량: -  시작가: -  즉구가: - name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'> -
- ㆍHint) 거래자가 판매(물품 판매, 금 수령), 입찰자가 구매(물품 구입, 금 지불).
- ㆍHint) 단가가 1.00보다 높을수록 판매자 유리.
- ㆍHint) 단가가 1.00보다 낮을수록 입찰자 유리.
-
-
- - - - - - - - - - - - - - - - - 0 && $auction[amount] >= $auction[value] * 2 && $auction[stuff] == 0) { $radio = " disabled"; $alert = ""; $alert2 = ""; } - elseif($auction[no2] > 0 && $auction[topv] >= $auction[value]) { $radio = " disabled"; $alert = ""; $alert2 = ""; } - elseif($chk == 0) { $radio = " checked"; $chk = 1; } - $pv = round($auction[value] * 100 / $auction[amount]) / 100 + 0.001; - $pv = substr($pv, 0, 4); - if($auction[stuff] != 0) { $pv = '-'; } - echo " - - - - - - - - - - - - - - "; -} -?> - - - - - - - - - - - - - - - - -
삽 니 다
거래번호선택구매자물품수량시작구매가현재구매가즉시구매가단가판매 예정자거래종료
{$auction[no]}{$auction[name1]}{$itemname}{$auction[amount]}금 {$auction[cost]}{$alert}금 {$auction[value]}{$alert2}{$alert}금 {$auction[topv]}{$alert2}{$alert}{$pv}{$alert2}{$alert}{$auction[name2]}{$alert2}{$auction[expire]}
등록결과
입찰등록 -  수령할 금액: - name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'> -
거래등록 -  종료: 턴 후 -  물품: -  구입량: -  시작가: -  즉구가: - name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'> -
- ㆍHint) 거래자가 구매(물품 구매, 금 지불), 입찰자가 판매(물품 판매, 금 수령).
- ㆍHint) 단가가 1.00보다 낮을수록 구매자 유리.
- ㆍHint) 단가가 1.00보다 높을수록 입찰자 유리.
-
-
- - - - - - - -
최 근 기 록
- -
도 움 말
- -ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.
-ㆍHint) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)
-ㆍHint) 쌀이 흔한 경우는 초기 가격을 낮게 책정해야 판매가 가능할 겁니다.
-ㆍ구매거래는 거래자가 구입할 물품을 거래하면, 판매를 희망하는 사람이 현재가보다 낮게 입찰하여 판매하는 방식입니다.
-ㆍHint) 쌀이 흔한 경우는 입찰자가 많아서 자연스레 단가가 내리게 됩니다. (해당 물품을 팔려는 가격이 내림)
-ㆍHint) 쌀이 귀한 경우는 초기 가격을 높게 책정해야 구입이 가능할 겁니다.
-ㆍ마감임박때 입찰하는 경우 입찰후 1턴 후로 종료시간이 연장됩니다.
-ㆍ즉시구매가로 입찰하는 경우 입찰후 1턴 후로 종료시간이 결정됩니다.
-ㆍ악용 방지를 위해 50% ~ 200%의 가격에서 거래시작이 가능합니다.
-ㆍ악용 방지를 위해 즉시판매가는 110% 이상, 즉시구매가는 90% 이하의 시세로 가능합니다.
-ㆍ악용 방지를 위해 즉시판매가는 시작판매가의 110% 이상, 즉시구매가는 시작구매가의 90% 이하로 가능합니다.
-ㆍ1인당 도합 1건의 거래와 입찰이 가능합니다. 거상 특기 소유자는 1인당 도합 3건입니다.
-ㆍ기본금쌀 1000은 거래에 사용되지 못합니다.
-ㆍ유찰될 때는 거래 과실자에게 거래금의 1%가 벌금으로 부과됩니다.
-ㆍ10단위로 거래가 가능합니다. 1자리는 반올림 처리 됩니다.
-ㆍ★ 최고가 거래 ★ 혹은 ★ 최저가 거래 ★ 는 암거래 및 악용의 가능성이니 감시 부탁드립니다.
-ㆍ거래와 입찰은 취소가 불가능하니 주의하세요!
-ㆍHint) 단가는 금/쌀로 쌀1을 거래하기 위한 금의 양입니다.
-ㆍHint) 단가가 높으면(>1.00) 쌀이 비싸므로 판매가 이득입니다.
-ㆍHint) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.
-ㆍ즐거운 거래! -
-
- - - diff --git a/che/b_battleCenter.php b/che/b_battleCenter.php deleted file mode 100644 index f61d9645..00000000 --- a/che/b_battleCenter.php +++ /dev/null @@ -1,142 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -//재야인 경우 -$meLevel = $me[level]; -if($meLevel == 0 || ($meLevel == 1 && $me[belong] < $nation[secretlimit])) { - echo "수뇌부가 아니거나 사관년도가 부족합니다."; - exit(); -} - -//잘못된 접근 -if($general[nation] != $me[nation]) { - $gen = 0; -} - -if($btn == '정렬하기') { - $gen = 0; -} - -if($type == 0) { - $type = 0; -} -$sel[$type] = "selected"; - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - -감찰부 - - - - - - - - - -
감 찰 부
-
- 정렬순서 : - - - 대상장수 : - - -
-
- - - - - - - - - - - - - - - - - -
장 수 정 보장 수 열 전
- - - -
전투 기록전투 결과
- - - -
- - - -
- - - diff --git a/che/b_betting.php b/che/b_betting.php deleted file mode 100644 index 0e4963d9..00000000 --- a/che/b_betting.php +++ /dev/null @@ -1,339 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -switch($admin[tnmt_type]) { -case 0: $tnmt_type = "전력전"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break; -case 1: $tnmt_type = "통솔전"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break; -case 2: $tnmt_type = "일기토"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break; -case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break; -} - -$str1 = getTournament($admin[tournament]); -$str2 = getTournamentTime($connect); -$str3 = getTournamentTerm($connect); - -?> - - - - -베팅장 - - - - - - - -
베 팅 장
- - - - -
()
16강 상황
(전체 금액 : / 내 투자 금액 : )
- - - -=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); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - echo ""; -} - -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),""); -for($i=0; $i < 1; $i++) { $cent[$i] = ""; } -for($i=0; $i < 2; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 1; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 2; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 4; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 2; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 4; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 8; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 4; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 8; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 16; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 8; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 16; $i++) { - echo ""; -} - -$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='$_SESSION[p_id]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); -for($i=0; $i < 16; $i++) { - $myBet[$i] = $me["bet{$i}"]; -} - -for($i=0; $i < 16; $i++) { - $bet[$i] = @round($admin[bet] / $admin["bet{$i}"], 2); - if($bet[$i] == 0) { $bet[$i] = "∞"; } -} - -for($i=0; $i < 16; $i++) { - $gold[$i] = round($myBet[$i] * $bet[$i]); -} -?> - -
{$general[name]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
- - -"; - -for($i=0; $i < 16; $i++) { - echo ""; -} -?> - - - - - - -{$myBet[$i]}"; -} -?> - - - - - - -{$gold[$i]}"; -} - -echo " - - "; - -if($admin[tournament] == 6) { - echo " - - "; - - for($i=0; $i < 16; $i++) { - echo " - "; - } - - echo " - - "; - - for($i=0; $i < 16; $i++) { - echo " - "; - } - - echo " - -"; -} - -?> - - - - -
{$bet[$i]}
××××××××××××××××
- -
- 배당률 × 베팅금 = 적중시 환수금
- ( 베팅후 500원 이하일땐 베팅이 불가능합니다. ) -
- - - - - -
토너먼트 랭킹
순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수
- - "; - - $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 " -
{$type1[$i]}
장수{$type2[$i]}
- "; -} - -?> - - - -ㆍ토너먼트의 16강 대진표가 완성되면, 베팅 기간이 주어집니다.
-ㆍ유저들의 베팅 상황에 따라 배당률이 실시간 결정되며, 자신의 베팅금에 따른 예상 환급금을 알 수 있습니다.
-ㆍ베팅은 16슬롯에 각각 베팅 가능하며, 도합 최대 금 1000씩 베팅 가능합니다.
-ㆍ소지금 500원 이하일땐 베팅이 불가능합니다. -ㆍ삼모와 더불어 토너먼트, 베팅기능으로 즐거운 삼모 되세요!
- - - - - - -
- - - diff --git a/che/b_chiefboard.php b/che/b_chiefboard.php deleted file mode 100644 index 9e783b9d..00000000 --- a/che/b_chiefboard.php +++ /dev/null @@ -1,71 +0,0 @@ - - - -기밀실 - - - - - - - - - - - - - -
기 밀 실
- 제목 -
-
- - -
-
- - - - - -
- - - - diff --git a/che/b_chiefcenter.php b/che/b_chiefcenter.php deleted file mode 100644 index 0cc44cb3..00000000 --- a/che/b_chiefcenter.php +++ /dev/null @@ -1,175 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { - echo "수뇌부가 아니거나 사관년도가 부족합니다."; - exit(); -} - -if($me[level] >= 5) { $btn = "submit"; $btn2 = "button"; } -else { $btn = "hidden"; $btn2 = "hidden"; } - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} - -$date = date('Y-m-d H:i:s'); - -// 명령 목록 -$query = "select year,month,turnterm from game where no='1'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$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]); -for($i=12; $i >= $lv; $i--) { - $turn[$i] = getCoreTurn($connect, $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); -} - -?> - - - -사령부 - - - - - - - - -
사 령 부
- - - - - - - - - - - "; - - 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] == "") ? "-" : $turndate[$l4]; - $td3 = ($turndate[$l3] == "") ? "-" : $turndate[$l3]; - $td2 = ($turndate[$l2] == "") ? "-" : $turndate[$l2]; - $td1 = ($turndate[$l1] == "") ? "-" : $turndate[$l1]; - $tn4 = ($turn[$l4][$i] == "") ? "-" : $turn[$l4][$i]; - $tn3 = ($turn[$l3][$i] == "") ? "-" : $turn[$l3][$i]; - $tn2 = ($turn[$l2][$i] == "") ? "-" : $turn[$l2][$i]; - $tn1 = ($turn[$l1][$i] == "") ? "-" : $turn[$l1][$i]; - echo " - - - - - - - - - - - - - "; - 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 ""; - } -} - -?> -
수뇌부 일정
-= $lv; $i--) { - $totaldate[$i] = $gen[$i][turntime]; - $turntime[$i] = substr($gen[$i][turntime], 14); -} - -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] = "".$gen[$l4][name].""; } - elseif($gen[$l4][npc] == 1) { $gen[$l4][name] = "".$gen[$l4][name].""; } - if ($gen[$l3][npc] >= 2) { $gen[$l3][name] = "".$gen[$l3][name].""; } - elseif($gen[$l3][npc] == 1) { $gen[$l3][name] = "".$gen[$l3][name].""; } - if ($gen[$l2][npc] >= 2) { $gen[$l2][name] = "".$gen[$l2][name].""; } - elseif($gen[$l2][npc] == 1) { $gen[$l2][name] = "".$gen[$l2][name].""; } - if ($gen[$l1][npc] >= 2) { $gen[$l1][name] = "".$gen[$l1][name].""; } - elseif($gen[$l1][npc] == 1) { $gen[$l1][name] = "".$gen[$l1][name].""; } - - echo " -
.".getLevel($l4, $nation[level])." : {$gen[$l4][name]}".getLevel($l3, $nation[level])." : {$gen[$l3][name]}".getLevel($l2, $nation[level])." : {$gen[$l2][name]}".getLevel($l1, $nation[level])." : {$gen[$l1][name]}.
$j$td4$tn4$td3$tn3$td2$tn2$td1$tn1$j
"; - CoreTurnTable(); - echo " - - -
"; - CoreCommandTable($connect); - echo "
- - - -
- - - - diff --git a/che/b_currentCity.php b/che/b_currentCity.php deleted file mode 100644 index 40ab67c5..00000000 --- a/che/b_currentCity.php +++ /dev/null @@ -1,352 +0,0 @@ - - - - -도시정보 - - - - - - - - -
도 시 정 보
- - - - - -
-
도시선택 : - - -

명령 화면에서 도시를 클릭하셔도 됩니다.

-
-
-
"; - -// 첩보된 도시까지만 허용 -if($valid == 0 && $me[userlevel] < 5) { - $_POST[citylist] = $me[city]; -} - -$query = "select * from city where city='$_POST[citylist]'"; // 도시 이름 목록 -$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$city = MYDB_fetch_array($cityresult); - -$query = "select nation,name,color from nation where nation='$city[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$nation = MYDB_fetch_array($result); - -$query = "select name from general where no='$city[gen1]'"; // 태수 이름 -$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gen1 = MYDB_fetch_array($genresult); - -$query = "select name from general where no='$city[gen2]'"; // 군사 이름 -$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gen2 = MYDB_fetch_array($genresult); - -$query = "select name from general where no='$city[gen3]'"; // 시중 이름 -$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$gen3 = MYDB_fetch_array($genresult); - -if($city[trade] == 0) { - $city[trade] = "- "; -} -?> - - - -
- - - - 【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name] - - - 주민 - $city[pop]/$city[pop2] - 농업 - $city[agri]/$city[agri2] - 상업 - $city[comm]/$city[comm2] - 치안 - $city[secu]/$city[secu2] - 수비 - $city[def]/$city[def2] - 성벽 - $city[wall]/$city[wall2] - - - 민심 - $city[rate] - 시세 - {$city[trade]}% - 인구 - ".round($city[pop]/$city[pop2]*100, 2)." % - 태수 - ";echo $gen1[name]==''?"-":"$gen1[name]";echo " - 군사 - ";echo $gen2[name]==''?"-":"$gen2[name]";echo " - 시중 - ";echo $gen3[name]==''?"-":"$gen3[name]";echo " - - - 장수 - "; - $query = "select name from general where city='$city[city]' and nation='$city[nation]'"; // 장수 목록 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - if($gencount == 0) echo "-"; - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($genresult); - echo "$general[name], "; - } - echo " - - -"; - -$query = "select npc,mode,no,picture,imgsvr,name,injury,leader,power,intel,level,nation,crewtype,crew,train,atmos,term,turn0,turn1,turn2,turn3,turn4 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); - -$query = "select nation,level,name from nation"; // 국가 이름 목록 -$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); - $nationname[$nation[nation]] = $nation[name]; - $nationlevel[$nation[nation]] = $nation[level]; -} - -if($gencount != 0) { - echo " -
- - - - - - - - - - - - - - - "; -} - -for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - - if($general[level] == 12) { - $lbonus = $nationlevel[$general[nation]] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nationlevel[$general[nation]]; - } else { - $lbonus = 0; - } - if($lbonus > 0) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; - } - - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); - $leader = "{$leader}{$lbonus}"; - $power = "{$power}"; - $intel = "{$intel}"; - } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; - } - - if($general[npc] >= 2) { $general[name] = "{$general[name]}"; } - elseif($general[npc] == 1) { $general[name] = "{$general[name]}"; } - $imageTemp = GetImageURL($general[imgsvr]); - echo " - - - - - - - "; - //아국장수이거나 보는 사람이 운영자일때 보여줌 - if(($general[nation] != 0 && $general[nation] == $myNation[nation]) || $me[userlevel] >= 5) { - switch($general[mode]) { - case 0: $mode = "×"; break; - case 1: $mode = "○"; break; - case 2: $mode = "◎"; break; - } - - echo " - - - - - "; - if($general[npc] >= 2) { - echo " - - - - - - - - - - - - "; -} -?> -
얼 굴이 름통솔무력지력관 직병 종병 사훈련사기명 령
$general[name]$leader$power$intel".getLevel($general[level])."$mode".getTypename($general[crewtype])."$general[crew]$general[train]$general[atmos]NPC 장수"; - } else { - echo " - - "; - $turn = getTurn($connect, $general, 1); - - for($i=0; $i < 5; $i++) { - $k = $i+1; - echo " -   $k : $turn[$i]
"; - } - echo " -
"; - } - } elseif($general[nation] != 0) { - echo " -
??$general[crew]??【{$nationname[$general[nation]]}】 장수"; - } else { - echo " - ??$general[crew]??  재 야"; - } - - echo " -
- - - - -
- - - - diff --git a/che/b_dipcenter.php b/che/b_dipcenter.php deleted file mode 100644 index 4b08eeb7..00000000 --- a/che/b_dipcenter.php +++ /dev/null @@ -1,298 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { - echo "수뇌부가 아니거나 사관년도가 부족합니다."; - exit(); -} - -if($me[level] >= 5) { $btn = "submit"; $read = ""; } -else { $btn = "hidden"; $read = "readonly"; } - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - -내무부 - - - - - - - -
내 무 부
- - - - - - - - - - - - - - - - - - - - - - "; - - continue; - } - - $query = "select state,term,fixed,reserved,showing from diplomacy where me='$me[nation]' and you='$nation[nation]'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result2); - - $query = "select reserved,showing from diplomacy where you='$me[nation]' and me='$nation[nation]'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip2 = MYDB_fetch_array($result2); - //속령수 - $query = "select city from city where nation='$nation[nation]'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result2); - switch($dip[state]) { - case 0: $state = "교 전"; break; - case 1: $state = "선포중"; break; - case 2: $state = "통 상"; break; - case 3: $state = "통합수락중"; break; - case 4: $state = "통합제의중"; break; - case 5: $state = "합병수락중"; break; - case 6: $state = "합병제의중"; break; - case 7: $state = "불가침"; break; - } - - $term = $admin[year] * 12 + $admin[month] + $dip[term]; - $year = floor($term / 12); - $month = $term % 12; - - if($month == 0) { - $month = 12; - $year--; - } - - $date = date('Y-m-d H:i:s'); - $note = ""; - if($dip[fixed] != "") { - if($dip[state] == 7) { - $note .= $dip[fixed]; - } else { - $note .= "{$dip[fixed]}"; - } - if($dip[reserved] != "" || $dip2[reserved] != "") { - $note .= "
"; - } - } - if($dip[showing] >= $date) { - if($dip[reserved] != "") { - $note .= "아국측 제의: ".$dip[reserved]; - if($dip2[reserved] != "") { - $note .= "
"; - } - } - } - if($dip2[showing] >= $date) { - if($dip2[reserved] != "") { - $note .= "상대측 제의: ".$dip2[reserved]; - } - } - if($note == "") { $note = " "; } - - echo " - - - - - - "; - if($dip[term] != 0) { - echo" - - "; - } else { - echo" - - "; - } - echo " - - "; -} -echo " -
외 교 관 계
국 가 명국력장수속령상태기간종 료 시 점비 고
$nation[name]$nation[power]$nation[gennum]$citycount----
$nation[name]$nation[power]$nation[gennum]$citycount$state$dip[term] 개월{$year}年 {$month}月--{$note}
-"; - -$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='$me[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$nation = MYDB_fetch_array($result); - -$query = "select gold_rate,rice_rate from game where no='1'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); -// 금 수지 -$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); - -$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); -$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; -$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); -$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); -$riceincome = $riceincomeList[0] + $riceincomeList[1]; -$riceoutcome = getRiceOutcome($connect, $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"; } - -?> - - - - - - - - - - - - - -
국 가 방 침 & 임관 권유 메세지
국가 방침 maxlength=500 style=color:white;background-color:black;width:830; name=msg value=''> name=btn value=국가방침>
임관 권유 maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value=''> name=btn value=임관권유>
900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.
예 산 & 정 책
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "; -?> - - - - - - - - - - - - - - - -
자금 예산병량 예산
현 재   $nation[gold]현 재   $nation[rice]
단기수입   +$deadIncome둔전수입   +$riceincomeList[1]
세 금   +$goldincomeList[0]세 곡   +$riceincomeList[0]
수입 / 지출   +$goldincome / -$goldoutcome수입 / 지출   +$riceincome / -$riceoutcome
국고 예산   {$budgetgold} ({$budgetgolddiff})병량 예산   {$budgetrice} ({$budgetricediff})
세율 (5 ~ 30%)    name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율>봉급 지급율 (20 ~ 200%)    name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급율>
기밀 권한 (1 ~ 99년)    name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한>임관&전쟁 변경 가능
- 0) { - if($nation[scout] == 0) { - echo " - "; - } else { - echo " - "; - } - - if($nation[war] == 0) { - echo " - "; - } else { - echo " - "; - } -} -?> -
-
기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.
- - - -
- - - diff --git a/che/b_diplomacy.php b/che/b_diplomacy.php deleted file mode 100644 index 6d134326..00000000 --- a/che/b_diplomacy.php +++ /dev/null @@ -1,222 +0,0 @@ -0 order by power desc"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$nationcount = MYDB_num_rows($result); - -$nationStr = ""; -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[count($nationnum)] = $nation[nation]; - $nationname[$nation[nation]] = $nation[name]; - $nationcolor[$nation[nation]] = $nation[color]; - - $nationStr .= " $nation[name]
"; - $powerStr .= "국력 $nation[power]
"; - $genStr .= "장수 $nation[gennum]
"; - $cityStr .= "속령 $citycount
"; -} - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - - -중원정보 - - - - - - - -
중 원 정 보
-
- - - - "; - -if($nationcount != 0) { - $width = floor(888 / $nationcount); -} - -for($i=0; $i < $nationcount; $i++) { - echo " - "; -} -echo " - "; - -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 " - - "; - - for($k=0; $k < $nationcount; $k++) { - if($i == $k) { - $str = "\"; - } else { - switch($state[$nationnum[$k]]) { - case 0: $str = ""; break; - case 1: $str = ""; break; - case 2: - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "ㆍ"; } - else { $str = "?"; } -// $str = "ㆍ"; - break; - case 3: $str = ""; break; - case 4: $str = ""; break; - case 5: $str = ""; break; - case 6: $str = ""; break; - case 7: - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation] || $me[userlevel] >= 4) { $str = "@"; } - else { $str = "?"; } -// $str = "@"; - break; - } - } - - if($nationnum[$i] == $me[nation] || $nationnum[$k] == $me[nation]) { $backcolor = "style=background-color:$_basecolor3;"; } - else { $backcolor = ""; } - - echo " - "; - } - echo " - -"; -} -?> - -
align=center bgcolor=blue>외 교 현 황
 {$nationname[$nationnum[$i]]}
{$nationname[$nationnum[$i]]}$str
align=center>불가침 : @, 통합 : , 합병 : , 통상 : ㆍ, 선포 : , 교전 :
- - - "; -} - -for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($result); - - if($city[conflict] != "") { - $nation = explode("|", $city[conflict]); - $killnum = explode("|", $city[conflict2]); - - $seq = mySort($killnum); // 큰 순서대로 순서를 구한다. - - $sum = 0; - for($k=0; $k < count($killnum); $k++) { - $sum += $killnum[$k]; - } - echo " - - - - - "; - } -} - -function mySort($killnum) { - for($i=0; $i < count($killnum); $i++) { - $seq[$i] = $i; - } - for($i=0; $i < count($killnum); $i++) { - $max = 0; - for($k=0; $k < count($killnum); $k++) { - if($max < $killnum[$k]) { - $max = $killnum[$k]; - $index = $k; - } - } - $seq[$i] = $index; - $killnum[$index] = 0; - } - return $seq; -} - -echo " -
분 쟁 현 황
$city[name]"; - for($k=0; $k < count($nation); $k++) { - $per = 100*$killnum[$seq[$k]] / $sum; - $graph1 = $per / 100 * 798; - $per = round($per, 1); - echo " - - - - - - - -
{$nationname[$nation[$seq[$k]]]} {$per}% 
"; - } - echo " -
-
"; - -echo " - - - - - - - - - - - -
중 원 지 도
- - $nationStr$powerStr$genStr$cityStr
-
"; -?> - - - - -
- - - diff --git a/che/b_genList.php b/che/b_genList.php deleted file mode 100644 index afe6f440..00000000 --- a/che/b_genList.php +++ /dev/null @@ -1,199 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -if($me[level] == 0 || ($me[level] == 1 && $me[belong] < $nation[secretlimit])) { - echo "수뇌부가 아니거나 사관년도가 부족합니다."; - exit(); -} - -if($type == 0) { - $type = 7; -} -$sel[$type] = "selected"; - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - - -암행부 - - - - - - - - -
암 행 부
정렬순서 : - -
-
- - - 이 름 - 통무지 - 부 대 - 자 금 - 군 량 - 도시 - 守 - 병 종 - 병 사 - 훈련 - 사기 - 명 령 - 삭턴 - 턴 - "; -for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $city = $cityname[$general[city]]; - $troop = $troopName[$general[troop]] == "" ? "-" : $troopName[$general[troop]]; - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - if($lbonus > 0) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; - } - - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); - $leader = "{$leader}{$lbonus}"; - $power = "{$power}"; - $intel = "{$intel}"; - } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; - } - - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } - - switch($general[mode]) { - case 0: $mode = "×"; break; - case 1: $mode = "○"; break; - case 2: $mode = "◎"; break; - } - - echo " - - $name
Lv ".getExpLevel($general[experience])." - {$leader}∥{$power}∥{$intel} - $troop - $general[gold] - $general[rice] - $city - $mode - ".getTypename($general[crewtype])." - $general[crew] - $general[train] - $general[atmos]"; - if($general[npc] >= 2) { - echo " - - NPC 장수"; - } else { - echo " - - "; - $turn = getTurn($connect, $general, 1, 0); - - for($i=0; $i < 5; $i++) { - $turn[$i] = _String::SubStrForWidth($turn[$i], 0, 20); - $k = $i+1; - echo " -  $k : $turn[$i]
"; - } - } - echo " -
- - $general[killturn] - ".substr($general[turntime],14,5)." - "; -} -echo " - -"; - -MYDB_close($connect); -?> - - - - -
- - - diff --git a/che/b_myBossInfo.php b/che/b_myBossInfo.php deleted file mode 100644 index acd0eea9..00000000 --- a/che/b_myBossInfo.php +++ /dev/null @@ -1,503 +0,0 @@ - - - - - -인사부 - - - - - - - - -
인 사 부
-
- -= 5) { $btn = "submit"; } -else { $btn = "hidden"; } - -$query = "select name,level,picture,imgsvr,belong from general where nation='$nation[nation]' and level>={$lv} order by level desc"; -$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -for($i=12; $i >= $lv; $i--) { - $levels = MYDB_fetch_array($genresult); - $level[$levels[level]] = $levels; -} - -$query = "select name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 -$tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -$query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 -$eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -echo " - - - - -"; -for($i=12; $i >= $lv; $i-=2) { - $i1 = $i; $i2 = $i - 1; - $imageTemp1 = GetImageURL($level[$i1][imgsvr]); - $imageTemp2 = GetImageURL($level[$i2][imgsvr]); - echo " - - - - - - - - - "; -} - -echo " - - - - - - - - -
- 【 $nation[name] 】 -
".getLevel($i1, $nation[level])." ";echo $level[$i1][name]==''?"-":$level[$i1][name]; echo " ({$level[$i1][belong]}년)".getLevel($i2, $nation[level])." ";echo $level[$i2][name]==''?"-":$level[$i2][name]; echo " ({$level[$i2][belong]}년)
오호장군【승전】 -"; - -$tigernum = MYDB_num_rows($tigerresult); -for($i=0; $i < $tigernum; $i++) { - $tiger = MYDB_fetch_array($tigerresult); - - if($tiger[killnum] > 0) { - echo "{$tiger[name]}【{$tiger[killnum]}】, "; - } -} - -echo " -
건안칠자【계략】 -"; - -$eaglenum = MYDB_num_rows($eagleresult); -for($i=0; $i < $eaglenum; $i++) { - $eagle = MYDB_fetch_array($eagleresult); - - if($eagle[firenum] > 0) { - echo "{$eagle[name]}【{$eagle[firenum]}】, "; - } -} - -echo " -
- - - - - - - - - -
추 방
대상 장수 -"; - -if($meLevel >= 5 && $nation["l{$meLevel}set"] == 0) { - echo " - - "; -} - -$query = "select name,city from general where nation='$me[nation]' and level=12"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$general = MYDB_fetch_array($result); -echo " -
- - - - - - - - - - - -"; - -$querys[10] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[9] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[8] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[7] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; -$querys[6] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and power>='$_goodgenpower' order by npc,binary(name)"; -$querys[5] = "select no,name,level,city from general where nation='$me[nation]' and level!='12' and intel>='$_goodgenintel' order by npc,binary(name)"; - -for($i=10; $i >= $lv; $i--) { - if($i % 2 == 0) { echo ""; } - echo " - - - "; - if($i % 2 == 1) { echo ""; } -} -echo " - -
수 뇌 부 임 명
".getLevel(12, $nation[level])."{$general[name]} 【{$cityNames[$general[city]]}】".getLevel(11, $nation[level])."
-"; - -if($meLevel >= 5 && $nation[l11set] == 0) { - echo " - - - "; -} else { - $query = "select name,city from general where nation='$me[nation]' and level='11'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - echo "{$general[name]} 【{$cityNames[$general[city]]}】"; -} -echo " -
".getLevel($i, $nation[level])."
- "; - - if($meLevel >= 5 && $nation["l{$i}set"] == 0) { - echo " - - - "; - } else { - $query = "select name,city from general where nation='$me[nation]' and level={$i}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - echo "{$general[name]} 【{$cityNames[$general[city]]}】"; - } - echo "
빨간색은 현재 임명중인 장수, 노란색은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.
- - -"; -if($meLevel >= 5) { - echo " - - - - - - - - - - - - - - - - - - - - - "; -} -echo " - - - - - - -"; - -$citylevel[1] = "수"; -$citylevel[2] = "진"; -$citylevel[3] = "관"; -$citylevel[4] = "이"; -$citylevel[5] = "소"; -$citylevel[6] = "중"; -$citylevel[7] = "대"; -$citylevel[8] = "특"; - -$query = "select city,name,gen1,gen2,gen3,level,region,gen1set,gen2set,gen3set from city where nation='$nation[nation]' order by region,level desc,binary(name)"; // 도시 이름 목록 -$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$citycount = MYDB_num_rows($cityresult); - -$region = 0; -for($j=0; $j < $citycount; $j++) { - $city = MYDB_fetch_array($cityresult); - - $query = "select name,belong,city from general where no='$city[gen1]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($genresult); - $query = "select name,belong,city from general where no='$city[gen2]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($genresult); - $query = "select name,belong,city from general where no='$city[gen3]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen3 = MYDB_fetch_array($genresult); - - if($region != $city[region]) { - echo " - - "; - $region = $city[region]; - } - - $gen1[name] = $gen1[name]==""?"-":$gen1[name]." ({$gen1[belong]}년) 【{$cityNames[$gen1[city]]}】"; - $gen2[name] = $gen2[name]==""?"-":$gen2[name]." ({$gen2[belong]}년) 【{$cityNames[$gen2[city]]}】"; - $gen3[name] = $gen3[name]==""?"-":$gen3[name]." ({$gen3[belong]}년) 【{$cityNames[$gen3[city]]}】"; - if($city[gen1set] == 1) { $gen1[name] = "".$gen1[name].""; } - if($city[gen2set] == 1) { $gen2[name] = "".$gen2[name].""; } - if($city[gen3set] == 1) { $gen3[name] = "".$gen3[name].""; } - echo " - - - - - - - - "; -} -?> - -
도 시 관 직 임 명
태 수 임 명 - - - - -
군 사 임 명 - - - - -
시 중 임 명 - - - - -
빨간색은 현재 임명중인 장수, 노란색은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.
도 시태 수 (사관) 【현재도시】군 사 (사관) 【현재도시】시 중 (사관) 【현재도시】
【 ".getRegion($city[region])." 】
【{$citylevel[$city[level]]}】$city[name]  $gen1[name]$gen2[name]$gen3[name]
노란색은 변경 불가능, 하얀색은 변경 가능 관직입니다.
-
- - - -
- - - diff --git a/che/b_myCityInfo.php b/che/b_myCityInfo.php deleted file mode 100644 index 618d7898..00000000 --- a/che/b_myCityInfo.php +++ /dev/null @@ -1,173 +0,0 @@ - - - - - -세력도시 - - - - - - - - -
세 력 도 시
정렬순서 : - -
-
-[{$city[name]}]
"; } - $query = "select name from general where no='$city[gen1]'"; // 태수 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($genresult); - - $query = "select name from general where no='$city[gen2]'"; // 군사 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($genresult); - - $query = "select name from general where no='$city[gen3]'"; // 시중 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen3 = MYDB_fetch_array($genresult); - - if($type == 10 && $city[region] != $region) { - echo "
"; - $region = $city[region]; - } elseif($type == 11 && $city[level] != $level) { - echo "
"; - $level = $city[level]; - } - - if($city[trade] == 0) { - $city[trade] = "- "; - } - - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 {$city[name]}
주민$city[pop]/$city[pop2]농업$city[agri]/$city[agri2]상업$city[comm]/$city[comm2]치안$city[secu]/$city[secu2]수비$city[def]/$city[def2]성벽$city[wall]/$city[wall2]
민심$city[rate]시세{$city[trade]}%인구".round($city[pop]/$city[pop2]*100, 2)." %태수";echo $gen1[name]==''?"-":"$gen1[name]";echo "군사";echo $gen2[name]==''?"-":"$gen2[name]";echo "시중";echo $gen3[name]==''?"-":"$gen3[name]";echo "
장수"; - $query = "select npc,name from general where city='$city[city]' and nation='$me[nation]'"; // 장수 목록 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - if($gencount == 0) echo "-"; - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($genresult); - if($general[npc] >= 2) { echo "{$general[name]}, "; } - elseif($general[npc] == 1) { echo "{$general[name]}, "; } - else { echo "$general[name], "; } - } - echo " -
-"; -} -?> - - - - -
- - - - - diff --git a/che/b_myGenInfo.php b/che/b_myGenInfo.php deleted file mode 100644 index a0912ef1..00000000 --- a/che/b_myGenInfo.php +++ /dev/null @@ -1,173 +0,0 @@ - - - - - -세력장수 - - - - - - - - -
세 력 장 수
정렬순서 : - -
-
- - - 얼 굴 - 이 름 - 관 직 - 계 급 - 명 성 - 봉 록 - 통솔 - 무력 - 지력 - 자 금 - 군 량 - 성 격 - 특 기 - 사 관 - 벌점 - "; -for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - if($lbonus > 0) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; - } - - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); - $leader = "{$leader}{$lbonus}"; - $power = "{$power}"; - $intel = "{$intel}"; - } else { - $leader = "{$general[leader]}{$lbonus}"; - $power = "{$general[power]}"; - $intel = "{$general[intel]}"; - } - - if($general[npc] >= 2) { $name = "$general[name]"; } - elseif($general[npc] == 1) { $name = "$general[name]"; } - else { $name = "$general[name]"; } - - $imageTemp = GetImageURL($general[imgsvr]); - echo " - - 0?" background={$imageTemp}/{$general[picture]}":""; echo " height=64> - $name - "; echo getLevel($general[level], $nation[level]); echo " - ".getDed($general[dedication])." - ".getHonor($general[experience])." - ".getBill($general[dedication])." - $leader - $power - $intel - $general[gold] - $general[rice] - ".getGenChar($general[personal])." - ".getGenSpecial($general[special])." / ".getGenSpecial($general[special2])." - $general[belong] - $general[connect]"; echo "
(".getConnect($general[connect]).") - "; -} - echo " - -"; - -?> - - - - -
- - - - - diff --git a/che/b_myKingdomInfo.php b/che/b_myKingdomInfo.php deleted file mode 100644 index 50e11922..00000000 --- a/che/b_myKingdomInfo.php +++ /dev/null @@ -1,156 +0,0 @@ - - - - - -세력정보 - - - - - - - -
세 력 정 보
-
-[{$city[name]}]
"; } - else { $cityname[$j] = $city[name]; } - $totalpop += $city[pop]; - $maxpop += $city[pop2]; -} - -$query = "select sum(crew) as totcrew,sum(leader)*100 as maxcrew from general where nation='$nation[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$general = MYDB_fetch_array($result); - -$query = "select gold_rate,rice_rate from game where no='1'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); -// 금 수지 -$deadIncome = getDeadIncome($connect, $nation[nation], $nation[type], $admin[gold_rate]); - -$goldincomeList = getGoldIncome($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type]); -$goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; -$goldoutcome = getGoldOutcome($connect, $nation[nation], $nation[bill]); -$riceincomeList = getRiceIncome($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type]); -$riceincome = $riceincomeList[0] + $riceincomeList[1]; -$riceoutcome = getRiceOutcome($connect, $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"; } - -echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
【 ";echo $me[nation]==0?"공 백 지":"$nation[name]";echo " 】
총주민{$totalpop}/{$maxpop}총병사{$general[totcrew]}/{$general[maxcrew]}국 력$nation[power]
국 고"; echo $nation[gold]==0?"-":"$nation[gold]"; echo "병 량"; echo $nation[rice]==0?"-":"$nation[rice]"; echo "세 율"; echo $me[nation]==0?"해당 없음":"$nation[rate] %"; echo "
세금/단기+$goldincomeList[0] / +$deadIncome세곡/둔전+$riceincomeList[0] / +$riceincomeList[1]지급율"; echo $me[nation]==0?"해당 없음":"$nation[bill] %"; echo "
수입/지출+$goldincome / -$goldoutcome수입/지출+$riceincome / -$riceoutcome속 령$citycount장 수$nation[gennum]
국고 예산{$budgetgold} ({$budgetgolddiff})병량 예산{$budgetrice} ({$budgetricediff})기술력$nation[tech]작 위".getNationLevel($nation[level])."
속령일람 :"; -for($j=0; $j < $citycount; $j++) { - echo "$cityname[$j], "; -} -echo" -
국가열전".ConvertLog($nation[history], $me[skin])."
-
"; - -?> - - - - -
- - - - - diff --git a/che/b_myPage.php b/che/b_myPage.php deleted file mode 100644 index 494d8519..00000000 --- a/che/b_myPage.php +++ /dev/null @@ -1,139 +0,0 @@ - 0) { - $submit = 'submit'; -} else { - $submit = 'hidden'; -} - -if($btn == "설정저장" && $me['myset'] > 0) { - if($me['myset'] > 1) { - $submit = 'submit'; - } else { - $submit = 'hidden'; - } - - $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -$query = "select no,skin,map,mode,tnmt,myset from general where user_id='$_SESSION[p_id]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - -if($me[skin] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} -?> - - - -내정보 - type=text/css> - - - - - - - -
내 정 보
- - - - - - - - - - - - - - - - - - - - - -
- - - -
-     스킨 【 -

-     지도수준 【 - >상세 - >간단 - >생략 - 】

-     토너먼트 【 - >수동참여 - >자동참여 - 】
-     ∞개막직전 남는자리가 있을경우 랜덤하게 참여합니다.

-     수비 【 - >◎(훈사80) - >○(훈사60) - >× - 】

-      name=btn style=background-color:;color:white;width:160;height:30;font-size:13; value=설정저장>
-     ∞설정저장은 이달중 회 남았습니다.

-
-     휴 가 신 청
-     ;color:white;width:160;height:30;font-size:13; value=휴가신청 onclick='go(0)'> -
개인 기록전투 기록
- - - -
장수 열전전투 결과
- - - -
- - - -
- - - - diff --git a/che/b_nationboard.php b/che/b_nationboard.php deleted file mode 100644 index 7f69c734..00000000 --- a/che/b_nationboard.php +++ /dev/null @@ -1,66 +0,0 @@ - - - -회의실 - - - - - - - - - - - - - -
회 의 실
- 제목 -
-
- - -
-
- - - - - -
- - - - diff --git a/che/b_nationrule.php b/che/b_nationrule.php deleted file mode 100644 index e5124562..00000000 --- a/che/b_nationrule.php +++ /dev/null @@ -1,50 +0,0 @@ - - - -국법 - - - - - - - - - - - -
국 법
- -= 5) { - echo " -
-
- -
"; -} else { - echo " -
"; -} - -?> -
- - - - diff --git a/che/b_tournament.php b/che/b_tournament.php deleted file mode 100644 index e98a210f..00000000 --- a/che/b_tournament.php +++ /dev/null @@ -1,405 +0,0 @@ -= 2) { printLimitMsg($me[turntime]); exit(); } - -switch($admin[tnmt_type]) { -case 0: $tnmt_type = "전력전"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break; -case 1: $tnmt_type = "통솔전"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break; -case 2: $tnmt_type = "일기토"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break; -case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = "지력"; $tp3 = "intel"; break; -} - -?> - - - - -토너먼트 - - - - - - - -
삼모전 토너먼트
- -= 5) { - echo " - - - -"; -} elseif($me[no] > 0 && $me[tournament] == 0 && $admin[tournament] == 1) { - echo ""; -} else { - echo ""; -} - -$str1 = getTournament($admin[tournament]); -$str2 = getTournamentTime($connect); -$str3 = getTournamentTerm($connect); -?> - - - - - - - "; - -if($admin[tournament] >= 7 || $admin[tournament] == 0) { printFighting($admin[tournament], $admin[phase]); } -echo " - - - "; - -$num = Array("一", "二", "三", "四", "五", "六", "七", "八"); - -for($i=0; $i < 8; $i++) { - $grp = $i + 10; - echo " - "; -} -echo ""; -if($admin[tournament] == 4 || $admin[tournament] == 5) { printFighting($admin[tournament], $admin[phase]); } -echo " - - "; - -for($i=0; $i < 8; $i++) { - $grp = $i; - echo " - "; -} - -if($admin[tournament] == 2 || $admin[tournament] == 3) { printFighting($admin[tournament], $admin[phase]); } - -?> - - -
- "; - - switch($admin[tnmt_trig]) { - case 0: $sel[0] = "selected"; break; - case 1: $sel[1] = "selected"; break; - case 2: $sel[2] = "selected"; break; - case 3: $sel[3] = "selected"; break; - case 4: $sel[4] = "selected"; break; - case 5: $sel[5] = "selected"; break; - case 6: $sel[6] = "selected"; break; - case 7: $sel[7] = "selected"; break; - } - - if($admin[tournament] == 0) { - echo " - - - - - - - "; } - else { - echo ""; - } - - switch($admin[tournament]) { - case 1: - echo " - - - - - - - - - - - "; - break; - case 2: echo ""; break; - case 3: echo ""; break; - case 4: echo ""; break; - case 5: echo ""; break; - case 6: echo ""; break; - case 7: echo ""; break; - case 8: echo ""; break; - case 9: echo ""; break; - case 10: echo ""; break; - } - - echo " -
운영자 메세지 :
()
16강 승자전
- - "; - -$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); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - echo ""; -} - -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),""); -for($i=0; $i < 1; $i++) { $cent[$i] = ""; } -for($i=0; $i < 2; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 1; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 2; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 4; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 2; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 4; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 8; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 4; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━━━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 8; $i++) { - echo ""; -} - -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] = ""; } -for($i=0; $i < 16; $i++) { - $general = MYDB_fetch_array($result); - if($general[name] == "") { $general[name] = "-"; } - if($general[npc] >= 2) { $general[name] = "".$general[name].""; } - elseif($general[npc] == 1) { $general[name] = "".$general[name].""; } - if($general[win] > 0) { $line[$i] = ""; $cent[floor($i/2)] = ""; } - else { $line[$i] = ""; } - $gen[$i] = $general[name]; -} -for($i=0; $i < 8; $i++) { - $cent[$i] = $cent[$i]."┻".""; - $line[$i*2] = $line[$i*2]."┏━━━━".""; - $line[$i*2+1] = $line[$i*2+1]."━━━━┓".""; - echo ""; -} -echo " - - "; - -for($i=0; $i < 16; $i++) { - echo ""; -} - -echo" - "; - -$query = "select tournament,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game where no=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$betting = MYDB_fetch_array($result); -for($i=0; $i < 16; $i++) { - $bet[$i] = @round($betting[bet] / $betting["bet{$i}"], 2); - if($bet[$i] == 0) { $bet[$i] = "∞"; } -} - -echo " - "; - -for($i=0; $i < 16; $i++) { - echo ""; -} - -echo " - - - -
{$general[name]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}
{$gen[$i]}
{$bet[$i]}
배당률이 낮을수록 베팅된 금액이 많고 유저들이 우승후보로 많이 선택한 장수입니다.
-
조별 본선 순위
- - - "; - - $query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($k=1; $k <= 4; $k++) { - $general = MYDB_fetch_array($result); - printRow($k, $general[npc], $general[name], $general[$tp], $general[game], $general[win], $general[draw], $general[lose], $general[gd], $general[gl], $general[prmt]); - } - echo " -
{$num[$i]}조
장수{$tp2}
-
조별 예선 순위
- - - "; - - $query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($k=1; $k <= 8; $k++) { - $general = MYDB_fetch_array($result); - printRow($k, $general[npc], $general[name], $general[$tp], $general[game], $general[win], $general[draw], $general[lose], $general[gd], $general[gl], $general[prmt]); - } - echo " -
{$num[$i]}조
장수{$tp2}
-
- -ㆍ예선은 홈&어웨이 풀리그로 진행됩니다. (총 14경기)
-ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.
-ㆍ각 조1위가 시드1로 랜덤하게 조에 배정되며, 역시 각 조2위가 시드2로 랜덤하게 조에 배정됩니다.
-ㆍ그후 남은 3, 4위는 완전 랜덤하게 모든 조에 랜덤하게 배정됩니다.
-ㆍ본선은 개인당 3경기를 치르게 되며 승점(승3, 무1, 패0), 득실, 참가순서(시드)에 따라 순위를 매깁니다.
-ㆍ각 조 1, 2위는 16강에 지정된 위치에 배정됩니다.
-ㆍ16강부터는 1경기 토너먼트로 진행됩니다.
-ㆍ참가비는 금20~140이며, 성적에 따라 금과 약간의 명성이 포상으로 주어집니다.
-ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)
-ㆍ즐거운 삼토! -
-
- - - -
- - - diff --git a/che/b_troop.php b/che/b_troop.php deleted file mode 100644 index 9807b772..00000000 --- a/che/b_troop.php +++ /dev/null @@ -1,161 +0,0 @@ - - - - -부대편성 - - - - - - - -
부 대 편 성
-
- - - - - - - - -"; - } else { - $turn .= " $m : ∼
"; - } - } - } - } - $genlist .= "({$gencount}명)"; - - if($me[troop] == 0) { - echo " - - - - - - - - - - - - - - - - - -
선 택부 대 정 보부 대 장장 수부대장행동
$troop[name]
【 $cityname 】
 $genlist$turn
【턴】".substr($turntime, 14)."$name
"; - } else { - echo " -
 $troop[name]
【 $cityname 】
 $genlist"; - - if($troop[no] == $me[no]) { - $query = "select no,name from general where troop='$troop[troop]' and no!='$me[no]' order by binary(name)"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($genresult); - echo " -
- "; - } else { - echo $turn; - } - - echo " -
【턴】".substr($turntime, 14)."$name
"; - } -} - -if($me[troop] == 0) { - echo" -"; -} else { - echo" -"; -} - -echo " -
-
"; - -echo " - - - - "; -if($me[troop] == 0) { - echo " - "; -} else { - echo " - "; -} -echo " - -
부 대 명
"; - -MYDB_close($connect); -?> - - - -
-
- - - - diff --git a/che/c_auction.php b/che/c_auction.php deleted file mode 100644 index 8fc8f1d4..00000000 --- a/che/c_auction.php +++ /dev/null @@ -1,216 +0,0 @@ - 24) $term = 24; - -$valid = 1; -if($me[userlevel] >= 5 || ($me[special] != 30 && $btCount < 1) || ($me[special] == 30 && $btCount < 3)) { -} else { - $msg = "ㆍ더이상 등록할 수 없습니다."; - $msg2 = "ㆍ더이상 등록할 수 없습니다."; - $valid = 0; - $btn = "hidden"; -} - -if($btn == "판매") { - if($stuff != 0) { - $msg = "ㆍ현재 쌀만 거래 가능합니다."; - $valid = 0; - } - if($term < 0 || $term > 24) { - $msg = "ㆍ종료기한은 1 ~ 24 턴 이어야 합니다."; - $valid = 0; - } - if($amount < 100 || $amount > 10000) { - $msg = "ㆍ거래량은 100 ~ 10000 이어야 합니다."; - $valid = 0; - } - if($cost > $amount * 2 || $cost * 2 < $amount) { - $msg = "ㆍ시작판매가는 50% ~ 200% 이어야 합니다."; - $valid = 0; - } - if($topv < $amount*1.1 || $topv > $amount * 2) { - $msg = "ㆍ즉시판매가는 110% ~ 200% 이어야 합니다."; - $valid = 0; - } - if($topv < $cost*1.1) { - $msg = "ㆍ즉시판매가는 시작판매가의 110% 이상이어야 합니다."; - $valid = 0; - } - if($amount > $me[rice] - 1000) { - $msg = "ㆍ기본 군량 1000은 거래할 수 없습니다."; - $valid = 0; - } - if($valid == 1) { - $msg = "ㆍ등록 성공."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '$me[no]', '$me[name]', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif($btn == "구매시도") { - $query = "select no2,value,topv,expire,amount from auction where no='$sel'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $auction = MYDB_fetch_array($result); - - if($value == $auction[topv]) { - $valid = 2; - } - if(!$auction) { - $msg = "ㆍ종료된 거래입니다."; - $valid = 0; - } -/* - if($stuff != 0) { - $msg = "ㆍ현재 쌀만 거래 가능합니다."; - $valid = 0; - } -*/ - if($auction[no2] > 0 && $value <= $auction[value]) { - $msg = "ㆍ현재판매가보다 높게 입찰해야 합니다."; - $valid = 0; - } - if($value < $auction[value]) { - $msg = "ㆍ현재판매가보다 높게 입찰해야 합니다."; - $valid = 0; - } - if($value > $auction[topv]) { - $msg = "ㆍ즉시판매가보다 높을 수 없습니다."; - $valid = 0; - } - if($value > $me[gold] - 1000) { - $msg = "ㆍ기본 자금 1000은 거래할 수 없습니다."; - $valid = 0; - } - if($valid == 1) { - $msg = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - if($auction[expire] > $date) $date = $auction[expire]; - $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($valid == 2) { - $msg = "ㆍ즉시판매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif($btn == "구매") { - if($stuff != 0) { - $msg2 = "ㆍ현재 쌀만 거래 가능합니다."; - $valid = 0; - } - if($term < 0 || $term > 24) { - $msg2 = "ㆍ종료기한은 1 ~ 24 턴 이어야 합니다."; - $valid = 0; - } - if($amount < 100 || $amount > 10000) { - $msg2 = "ㆍ거래량은 100 ~ 10000 이어야 합니다."; - $valid = 0; - } - if($cost > $amount * 2 || $cost * 2 < $amount) { - $msg2 = "ㆍ시작구매가는 50% ~ 200% 이어야 합니다."; - $valid = 0; - } - if($topv < $amount * 0.5 || $topv > $amount * 0.9) { - $msg2 = "ㆍ즉시구매가는 50% ~ 90% 이어야 합니다."; - $valid = 0; - } - if($topv > $cost * 0.9) { - $msg2 = "ㆍ즉시구매가는 시작구매가의 90% 이하이어야 합니다."; - $valid = 0; - } - if($cost > $me[gold] - 1000) { - $msg2 = "ㆍ기본 자금 1000은 거래할 수 없습니다."; - $valid = 0; - } - if($valid == 1) { - $msg2 = "ㆍ등록 성공."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '$me[no]', '$me[name]', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif($btn == "판매시도") { - $query = "select no2,value,topv,expire,amount from auction where no='$sel'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $auction = MYDB_fetch_array($result); - - if($value == $auction[topv]) { - $valid = 2; - } - if(!$auction) { - $msg2 = "ㆍ종료된 거래입니다."; - $valid = 0; - } - if($stuff != 0) { - $msg2 = "ㆍ현재 쌀만 거래 가능합니다."; - $valid = 0; - } - if($auction[no2] > 0 && $value >= $auction[value]) { - $msg2 = "ㆍ현재구매가보다 낮게 입찰해야 합니다."; - $valid = 0; - } - if($value > $auction[value]) { - $msg2 = "ㆍ현재구매가보다 낮게 입찰해야 합니다."; - $valid = 0; - } - if($value < $auction[topv]) { - $msg2 = "ㆍ즉시구매가보다 낮을 수 없습니다."; - $valid = 0; - } - if($value > $me[rice] - 1000) { - $msg2 = "ㆍ기본 군량 1000은 거래할 수 없습니다."; - $valid = 0; - } - if($valid == 1) { - $msg2 = "ㆍ입찰 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - if($auction[expire] > $date) $date = $auction[expire]; - $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($valid == 2) { - $msg2 = "ㆍ즉시구매 성공. 거래완료는 빨라도 현재로부터 1턴 뒤입니다."; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit); - $query = "update auction set value='$value',no2='$me[no]',name2='$me[name]',expire='$date' where no='$sel'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -Submit("b_auction.php", $msg, $msg2); - diff --git a/che/c_betting.php b/che/c_betting.php deleted file mode 100644 index c2b12b04..00000000 --- a/che/c_betting.php +++ /dev/null @@ -1,42 +0,0 @@ -location.replace('b_betting.php');"; - exit(); -} - -$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where user_id='$_SESSION[p_id]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - -for($i=0; $i < 16; $i++) { - if(${"btn{$i}"} == "베팅!") { - $gold = ${"gold{$i}"}; - $mebet = $me["bet{$i}"]; - if($gold >= 10 && $gold <= 1000) { - if($gold + 500 <= $me[gold] && $gold + $mebet <= 1000 && $gold + $me[bet] <= 1000) { - $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update game set bet{$i}=bet{$i}+'$gold' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } -} - -?> - - -b_betting.php diff --git a/che/c_chiefboard.php b/che/c_chiefboard.php deleted file mode 100644 index 00e01c6b..00000000 --- a/che/c_chiefboard.php +++ /dev/null @@ -1,51 +0,0 @@ -= 20) { $num = 0; } - $msg = $title."|".$msg; - $msg = addslashes(SQ2DQ($msg)); - $date = date('Y-m-d H:i:s'); - $query = "update nation set coreboard{$num}='$msg',coreboard{$num}_who='$me[no]',coreboard{$num}_when='$date' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set coreindex='$num' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //$num에 댓글시 - } elseif($num >= 0 && $reply != "") { - $newmsg = $nation["coreboard{$num}"]."|".$me[no]."|".$reply; - $newmsg = addslashes(SQ2DQ($newmsg)); - - $query = "update nation set coreboard{$num}='$newmsg' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -//echo ""; -echo 'b_chiefboard.php';//TODO:replace -?> - - - - diff --git a/che/c_dipcenter.php b/che/c_dipcenter.php deleted file mode 100644 index 4cf79a5c..00000000 --- a/che/c_dipcenter.php +++ /dev/null @@ -1,62 +0,0 @@ -location.replace('b_myBossInfo.php');"; - exit(); -} - -if($btn == "국가방침") { - $msg = BadTag2Code(addslashes(SQ2DQ($msg))); - $query = "update nation set msg='$msg' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "임관권유") { - $scoutmsg = BadTag2Code(addslashes(SQ2DQ($scoutmsg))); - $query = "update nation set scoutmsg='$scoutmsg' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "세율") { - if($rate < 5) { $rate = 5; } - if($rate > 30) { $rate = 30; } - $query = "update nation set rate='$rate' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "지급율") { - if($bill < 20) { $bill = 20; } - if($bill > 200) { $bill = 200; } - $query = "update nation set bill='$bill' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "기밀권한") { - if($secretlimit < 1) { $secretlimit = 1; } - if($secretlimit > 99) { $secretlimit = 99; } - $query = "update nation set secretlimit='$secretlimit' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "임관 금지") { - $query = "update nation set myset=myset-1,scout='1' where nation='$me[nation]' and myset>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "임관 허가") { - $query = "update nation set myset=myset-1,scout='0' where nation='$me[nation]' and myset>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전쟁 금지") { - $query = "update nation set myset=myset-1,war='1' where nation='$me[nation]' and myset>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전쟁 허가") { - $query = "update nation set myset=myset-1,war='0' where nation='$me[nation]' and myset>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -//echo ""; -echo 'b_dipcenter.php';//TODO:replace - - diff --git a/che/c_double.php b/che/c_double.php deleted file mode 100644 index 8a000e70..00000000 --- a/che/c_double.php +++ /dev/null @@ -1,127 +0,0 @@ - 99) { $command = 0; } -if($double > 9999) { $double = 9999; } -if($third > 9999) { $third = 9999; } -if($fourth > 9999) { $fourth = 9999; } - -$comStr = EncodeCommand($fourth, $third, $double, $command); - -// 건국 -if($command == 46) { - $name = addslashes(SQ2DQ($name)); - $name = str_replace("|", "", $name); - $name = str_replace(" ", "", $name); - $name = str_replace(" ", "뷁", $name); - if($name == "") { $name = "무명"; } - $name = _String::SubStrForWidth($name, 0, 12); - - $query = "update general set makenation='{$name}' where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $count = sizeof($turn); - $str = "con=con"; - for($i=0; $i < $count; $i++) { - $str .= ",turn{$turn[$i]}='{$comStr}'"; - } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; -//통합제의 -} elseif($command == 53) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[level] >= 5) { - $nationname = addslashes(SQ2DQ($nationname)); - $nationname = str_replace("|", "", $nationname); - $nationname = str_replace(" ", "", $nationname); - $nationname = str_replace(" ", "뷁", $nationname); - if($nationname == "") { $nationname = "무명"; } - $nationname = _String::SubStrForWidth($nationname, 0, 12); - - $query = "update general set makenation='{$nationname}' where level>=5 and nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $count = sizeof($turn); - $str = "type=type"; - for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; - } - $query = "update nation set {$str} where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - echo ""; -//불가침 -} elseif($command == 61) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[level] >= 5) { - $note = addslashes(SQ2DQ($note)); - $note = str_replace("|", "", $note); - $note = str_replace(" ", "", $note); - $note = str_replace(" ", "뷁", $note); - $note = _String::SubStrForWidth($note, 0, 90); - - $query = "update diplomacy set reserved='{$note}' where me='$me[nation]' and you='$double'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $count = sizeof($turn); - $str = "type=type"; - for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; - } - $query = "update nation set {$str} where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - echo ""; -//포상, 몰수, 발령, 항복권고, 원조 -//선전포고, 종전, 파기, 초토화, 천도, 증축, 감축 -//백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 -//국기변경 -} elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) { - $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if(($command == 23 || $command == 24 || $command == 27) && $me[no] == $third) { - // 자기자신에게 악용 금지 - } elseif($me[level] >= 5) { - $count = sizeof($turn); - $str = "type=type"; - for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'"; - } - $query = "update nation set {$str} where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - echo ""; -} else { - $count = sizeof($turn); - $str = "con=con"; - for($i=0; $i < $count; $i++) { - $str .= ",turn{$turn[$i]}='{$comStr}'"; - } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; -} - - diff --git a/che/c_msgsubmit.php b/che/c_msgsubmit.php deleted file mode 100644 index 2cfcd684..00000000 --- a/che/c_msgsubmit.php +++ /dev/null @@ -1,118 +0,0 @@ -= 2) { echo ""; exit(); } - -$msg = str_replace("|", "", $msg); -$msg = trim($msg); - -$msg = _String::SubStrForWidth($msg, $s, 198); - -$date = date('Y-m-d H:i:s'); - -// 전체 메세지 -if($genlist == 9999 && str_replace(" ", "", $msg) != "") { - if($me[nation] == 0) { - $nation[name] = '재야'; - $nation[color] = 'FFFFFF'; - } else { - $query = "select nation,name,color from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - PushMsg(1, 0, $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $nation[name], $nation[color], $msg); -// 국가 메세지 -} elseif($genlist >= 9000 && $msg != "") { - if($me[nation] == 0) { - $nation[name] = '재야'; - $nation[color] = 'FFFFFF'; - } else { - $query = "select nation,name,color from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - - $genlist -= 9000; - $query = "select nation,name,color from nation where nation='$genlist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dest = MYDB_fetch_array($result); - - if($nation[nation] == $dest[nation]) { - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:", $nation[color], $dest[name], $dest[color], $msg); - } else { - //타국에 보내는 경우 - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); - // 수뇌이면 발송, 아니면 자국으로 돌림 - if($me[level] >= 5) { - PushMsg(3, $dest[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], $msg); - } else { - PushMsg(2, $nation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$nation[name]}▶", $nation[color], $dest[name], $dest[color], "반송"); - } - } -// 개인 메세지 -} elseif($genlist > 0 && $msg != "") { - $query = "select name,msgindex from general where no='$genlist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - //발신, 수신인 코딩 - $who = $me[no] * 10000 + $genlist; - - $msg = addslashes(SQ2DQ($msg)); - - $query = "select msg{$me[msgindex]}_when as priv_when from general where no='$me[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $prev_msg = MYDB_fetch_array($result); - $diff_second = strtotime($date) - strtotime($prev_msg[priv_when]); - - if($diff_second < 3) { - $who = 1 * 10000 + $me[no]; // 운영자가 본인에게 - $msg = "개인메세지는 3초당 1건만 보낼 수 있습니다!"; - //자신에게 표시 - $me[msgindex]++; - if($me[msgindex] >= 10) { $me[msgindex] = 0; } - $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='10',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date',newmsg=1 where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //자신에게 표시 - $me[msgindex]++; - if($me[msgindex] >= 10) { $me[msgindex] = 0; } - $query = "update general set msgindex='$me[msgindex]',msg{$me[msgindex]}='$msg',msg{$me[msgindex]}_type='9',msg{$me[msgindex]}_who='$who',msg{$me[msgindex]}_when='$date' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 상대에게 발송 - $you[msgindex]++; - if($you[msgindex] >= 10) { $you[msgindex] = 0; } - $query = "update general set msgindex='$you[msgindex]',msg{$you[msgindex]}='$msg',msg{$you[msgindex]}_type='10',msg{$you[msgindex]}_who='$who',msg{$you[msgindex]}_when='$date',newmsg=1 where no='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $fp = fopen("logs/_gen_msg.txt", "a"); - //로그 파일에 기록 - fwrite($fp, _String::Fill($me[name],12," ")." > "._String::Fill($you[name],12," ")." | {$msg}\r\n"); - fclose($fp); -} - -//echo ""; -echo 'msglist.php';//TODO:replace - diff --git a/che/c_myBossInfo.php b/che/c_myBossInfo.php deleted file mode 100644 index 7b96765c..00000000 --- a/che/c_myBossInfo.php +++ /dev/null @@ -1,256 +0,0 @@ -location.replace('b_myBossInfo.php');"; - exit(); - } -} elseif($btn == "추방") { - $query = "select no,name,gold,rice,nation,troop,level,history,npc,picture,imgsvr from general where no='$outlist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - //추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 - if($general[level] == 12 || $meLevel < 5 || ($general[nation] != $me[nation] && $outlist != 0)) { - echo ""; - exit(); - } -} - -if($btn == "추방") { - $query = "select name,l{$meLevel}set,chemi from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - //이미 지정했다면 무시 - if($nation["l{$meLevel}set"] == 0 && $general[level] > 0 && $general[level] < 12) { - $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount1 = MYDB_num_rows($dipresult); - - $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount2 = MYDB_num_rows($dipresult); - - $gold = 0; - $rice = 0; - // 금쌀1000이상은 남김 - if($general[gold] > 1000) { - $gold = $general[gold] - 1000; - $general[gold] = 1000; - } - if($general[rice] > 1000) { - $rice = $general[rice] - 1000; - $general[rice] = 1000; - } - - if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:통합에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; - $log[count($log)] = "●통합에 반대하다가 $nation[name]에서 숙청당했습니다."; - - // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:합병에 반대하던 $general[name](이)가 $nation[name]에서 숙청당했습니다."; - $log[count($log)] = "●합병에 반대하다가 $nation[name]에서 숙청당했습니다."; - - // 재야로, 국가 무소속으로 - $query = "update general set level=0,nation=0,belong=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 추방당하였습니다."; - $log[count($log)] = "$nation[name]에서 추방당하였습니다."; - - // 재야로, 국가 무소속으로, 명성/공헌 N*10%감소 - $query = "update general set level=0,nation=0,belong=0,betray=betray+1,makelimit='12',gold='$general[gold]',rice='$general[rice]',dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - // 부대 처리 - $query = "select no from troop where troop='$general[troop]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $troop = MYDB_fetch_array($result); - - //부대장일 경우 - if($troop[no] == $general[no]) { - // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set troop='0' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 도시관직해제 - $query = "update city set gen1='0' where gen1='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general[npc] >= 2 && ($admin[scenario] == 0 || rand()%100 == 0)) { - switch(rand()%5) { - case 0: $str = "날 버리다니... 곧 전장에서 복수해주겠다..."; break; - case 1: $str = "추방이라... 내가 무얼 잘못했단 말인가..."; break; - case 2: $str = "어디 추방해가면서 잘되나 보자... 꼭 복수하겠다..."; break; - case 3: $str = "인덕이 제일이거늘... 추방이 웬말인가... 저주한다!"; break; - case 4: $str = "날 추방했으니 그 복수로 적국에 정보를 팔아 넘겨야겠군요. 그럼 이만."; break; - } - - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $str); - } - - //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } - - if($admin[year] < $admin[startyear]+3) { - //초반엔 군주 부상 증가(엔장 임관지양) - $query = "update general set injury=injury+1 where no='$ruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //이번분기는 추방불가(초반 제외) - $query = "update nation set l{$meLevel}set=1,totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 추방됨"); - - pushGenLog($general, $log); - pushAllLog($alllog); - } -} elseif($btn == "임명" && $level >= 5 && $level <= 11) { - $query = "select l{$level}set,level,chemi from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - // 임명가능 레벨 - $lv = getNationChiefLevel($nation[level]); - - //이미 지정했다면 무시 - if($nation["l{$level}set"] == 0 && $lv <= $level) { - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } - - $query = "update nation set chemi='$nation[chemi]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //기존 장수 일반으로 - $query = "update general set level=1 where nation='$me[nation]' and level='$level'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($genlist != 0) { - $valid = 0; - switch($level) { - case 10: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 9: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - case 8: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 7: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - case 6: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 5: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - default: $valid = 1; break; - } - if($valid == 1) { - // 신임 장수의 원래 자리 해제 - $query = "update city set gen1=0 where gen1='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2=0 where gen2='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3=0 where gen3='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //신임 장수 - $query = "update general set level='$level' where no='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //이번분기는 불가 - $query = "update nation set l{$level}set=1 where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } -} elseif($btn == "임명" && $level >= 2 && $level <= 4 && $citylist > 0) { - switch($level) { - case 4: $lv = 1; break; - case 3: $lv = 2; break; - case 2: $lv = 3; break; - } - - $query = "select gen{$lv} from city where city='$citylist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - $oldlist = $city["gen{$lv}"]; - if($oldlist != 0) { - //기존 장수 일반으로 - $query = "update general set level=1 where no='$oldlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //기존 자리 공석으로 - $query = "update city set gen{$lv}=0 where city='$citylist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - if($genlist != 0) { - $valid = 0; - switch($level) { - case 4: if($general[power] >= $_goodgenpower) { $valid = 1; } break; - case 3: if($general[intel] >= $_goodgenintel) { $valid = 1; } break; - default: $valid = 1; break; - } - if($valid == 1) { - // 신임 장수의 원래 자리 해제 - $query = "update city set gen1=0 where gen1='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2=0 where gen2='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3=0 where gen3='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //신임 장수 - $query = "update general set level='$level' where no='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen{$lv}='$genlist',gen{$lv}set='1' where city='$citylist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } -} - -//echo ""; -echo 'b_myBossInfo.php'//TODO:replace - - diff --git a/che/c_nationboard.php b/che/c_nationboard.php deleted file mode 100644 index 78e31361..00000000 --- a/che/c_nationboard.php +++ /dev/null @@ -1,52 +0,0 @@ -= 20) { $num = 0; } - $msg = $title."|".$msg; - $msg = addslashes(SQ2DQ($msg)); - $date = date('Y-m-d H:i:s'); - $query = "update nation set board{$num}='$msg',board{$num}_who='$me[no]',board{$num}_when='$date' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set boardindex='$num' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //$num에 댓글시 - } elseif($num >= 0 && $reply != "") { - $newmsg = $nation["board{$num}"]."|".$me[no]."|".$reply; - $newmsg = addslashes(SQ2DQ($newmsg)); - - $query = "update nation set board{$num}='$newmsg' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -//echo ""; -echo 'b_nationboard.php';//TODO:replace - -?> - - - - diff --git a/che/c_nationrule.php b/che/c_nationrule.php deleted file mode 100644 index 08563c1a..00000000 --- a/che/c_nationrule.php +++ /dev/null @@ -1,21 +0,0 @@ -location.replace('b_nationrule.php');"; -echo 'b_nationrule.php';//TODO:replace - diff --git a/che/c_tournament.php b/che/c_tournament.php deleted file mode 100644 index 666531a9..00000000 --- a/che/c_tournament.php +++ /dev/null @@ -1,206 +0,0 @@ -location.replace('b_tournament.php');"; exit(); } - -if($btn == "자동개최설정" && $me[userlevel] >= 5) { - $query = "update game set tnmt_trig={$trig}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "개최" && $me[userlevel] >= 5) { - startTournament($connect, $auto, $type); -} elseif($btn == "중단" && $me[userlevel] >= 5) { - $query = "update game set tnmt_auto=0, tournament=0, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif((($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") && $me[userlevel] >= 5) || $btn == "참가") { - if($btn == "투입") { - $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$gen'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; - } elseif($btn == "무명투입") { - $general[no] = 0; - $general[name] = "무명장수"; - $general[npc] = 2; - $general[leader] = 10; - $general[power] = 10; - $general[intel] = 10; - $general[explevel] = 10; - $general[gold] = 0; - } elseif($btn == "쪼렙투입") { - $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; - } elseif($btn == "일반투입") { - //참가한 사람 평균치 - $query = "select AVG({$tp3}) as av from general where tournament=1"; - $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $avgGen = MYDB_fetch_array($genResult); - - //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; - $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($genResult); - - $sel = rand() % 32 + $genCount - 8; - - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; - } elseif($btn == "굇수투입") { - $sel = rand() % 32; - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; - } elseif($btn == "랜덤투입") { - $query = "select no,name,npc,leader,power,intel,explevel,gold,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[gold] -= $admin[develcost]; - //참가 - } else { - $query = "select no,name,npc,leader,power,intel,explevel,gold,horse,weap,book from general where no='$me[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - //$admin[develcost]원 참가비 - if($general[gold] < $admin[develcost]) { echo ""; exit(1); } - $general[gold] -= $admin[develcost]; - } - - $query = "select grp from tournament where grp<10 group by grp having count(*)=8"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $grpCount = MYDB_num_rows($result); - for($i=0; $i < $grpCount; $i++) { - $grp = MYDB_fetch_array($result); - $occupied[$grp[grp]] = 1; - } - for($i=0; $i < 8; $i++) { - if($occupied[$i] == 0) { - $map[count($map)] = $i; - } - } - - if($grpCount < 8) { - $grp = $map[rand() % count($map)]; - $query = "select grp from tournament where grp='$grp'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $grpCount = MYDB_num_rows($result); - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grpCount', '$general[horse]', '$general[weap]', '$general[book]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold='$general[gold]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $query = "select grp from tournament where grp<10 group by grp having count(*)=8"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $grpCount = MYDB_num_rows($result); - if($grpCount >= 8) { - $query = "update game set tournament=2, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif(($btn == "쪼렙전부투입" || $btn == "일반전부투입" || $btn == "굇수전부투입" || $btn == "랜덤전부투입") && $me[userlevel] >= 5) { - $z = 0; - for($i=0; $i < 8; $i++) { - $query = "select grp from tournament where grp='$i'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $grpCount = MYDB_num_rows($result); - for($k=$grpCount; $k < 8; $k++) { - $code[$z++] = $i * 10 + $k; - } - } - //섞기 - for($i=0; $i < $z; $i++) { - $index = rand() % $z; - $temp = $code[$i]; - $code[$i] = $code[$index]; - $code[$index] = $temp; - } - - for($i=0; $i < $z; $i++) { - $sel = rand() % 32; - if($btn == "쪼렙전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} limit {$sel},1"; - } elseif($btn == "일반전부투입") { - //참가한 사람 평균치 - $query = "select AVG({$tp3}) as av from general where tournament=1"; - $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $avgGen = MYDB_fetch_array($genResult); - - //그 장수보다 높은장수 수 - $query = "select no from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 and {$tp3}>{$avgGen[av]}"; - $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($genResult); - - $sel += $genCount - 8; - - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; - } elseif($btn == "굇수전부투입") { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by {$tp} desc limit {$sel},1"; - } else { - $query = "select no,name,npc,leader,power,intel,explevel,leader+power+intel as total,horse,weap,book from general where tournament=0 and gold>='$admin[develcost]' and npc>=2 order by rand() limit 0,1"; - } - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $grp = floor($code[$i] / 10); - $grp_no = $code[$i] % 10; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$grp', '$grp_no', '$general[horse]', '$general[weap]', '$general[book]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=1,gold=gold-'$admin[develcost]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $query = "update game set tournament=2, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "무명전부투입" && $me[userlevel] >= 5) { fillLowGenAll($connect); -} elseif($btn == "예선" && $me[userlevel] >= 5) { qualify($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "예선전부" && $me[userlevel] >= 5) { qualifyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "추첨" && $me[userlevel] >= 5) { selection($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "추첨전부" && $me[userlevel] >= 5) { selectionAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "본선" && $me[userlevel] >= 5) { finallySingle($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "본선전부" && $me[userlevel] >= 5) { finallyAll($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "배정" && $me[userlevel] >= 5) { final16set($connect); -} elseif($btn == "베팅마감" && $me[userlevel] >= 5) { - $dt = date("Y-m-d H:i:s", time() + 60); - $query = "update game set tournament='7',phase='0',tnmt_time='$dt' where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "16강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 16); -} elseif($btn == "8강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 8); -} elseif($btn == "4강" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 4); -} elseif($btn == "결승" && $me[userlevel] >= 5) { finalFight($connect, $admin[tnmt_type], $admin[tournament], $admin[phase], 2); -} elseif($btn == "포상" && $me[userlevel] >= 5) { setGift($connect, $admin[tnmt_type], $admin[tournament], $admin[phase]); -} elseif($btn == "회수" && $me[userlevel] >= 5) { setRefund($connect); -} elseif($btn == "메시지" && $me[userlevel] >= 5) { - $msg = addslashes(SQ2DQ($msg)); - $query = "update game set tnmt_msg='$msg'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} -?> - - -b_tournament.php diff --git a/che/c_troop.php b/che/c_troop.php deleted file mode 100644 index 0da27a5f..00000000 --- a/che/c_troop.php +++ /dev/null @@ -1,56 +0,0 @@ -location.replace('b_troop.php');"; - -MYDB_close($connect); diff --git a/che/c_vacation.php b/che/c_vacation.php deleted file mode 100644 index 8101f999..00000000 --- a/che/c_vacation.php +++ /dev/null @@ -1,19 +0,0 @@ -location.replace('b_myPage.php');"; -echo 'b_myPage.php'; //TODO:replace - diff --git a/che/c_vote.php b/che/c_vote.php deleted file mode 100644 index 67798485..00000000 --- a/che/c_vote.php +++ /dev/null @@ -1,77 +0,0 @@ -= 5) { - if($title != "") { - $vote = explode("|", $admin[vote]); - $vote[0] = addslashes(SQ2DQ($title)); - $admin[vote] = implode("|", $vote); - $query = "update game set vote='{$admin[vote]}' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif($btn == "추가" && $me[userlevel] >= 5) { - if($str != "") { - $str = addslashes(SQ2DQ($str)); - $admin[vote] .= "|{$str}"; - $query = "update game set vote='{$admin[vote]}' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} elseif($btn == "리셋" && $me[userlevel] >= 5) { - $query = "update game set voteopen=1,vote='',votecomment='' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set vote='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "알림" && $me[userlevel] >= 5) { - $query = "update general set newvote='1' where vote=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "숨김" && $me[userlevel] >= 5) { - $query = "update game set voteopen=0 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전체통계만" && $me[userlevel] >= 5) { - $query = "update game set voteopen=1 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "전부" && $me[userlevel] >= 5) { - $query = "update game set voteopen=2 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($btn == "투표" && $me[vote] == 0 && $sel > 0) { - $develcost = $admin[develcost] * 5; - $query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = array(); - $log = uniqueItem($connect, $me, $log, 1); - pushGenLog($me, $log); -} elseif($btn == "댓글" && $comment != "") { - $comment = str_replace("|", " ", $comment); - $comment = str_replace(":", " ", $comment); - $comment = trim($comment); - $comment = addslashes(SQ2DQ($comment)); - - $query = "select name from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - if($nation[name] == "") { $nation[name] = "재야"; } - - if($admin[votecomment] != "") { $admin[votecomment] .= "|"; } - $admin[votecomment] .= "{$nation[name]}:{$me[name]}:{$comment}"; - - $query = "update game set votecomment='{$admin[votecomment]}' where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} -?> - - -a_vote.php diff --git a/che/commandlist.php b/che/commandlist.php deleted file mode 100644 index 2239349c..00000000 --- a/che/commandlist.php +++ /dev/null @@ -1,113 +0,0 @@ - - - - -커맨드리스트 - - - - - - - -
- - - 명령 목록 - - "; - - $year = $admin[year]; - $month = $admin[month]; - // 실행된 턴시간이면 +1 - $cutTurn = cutTurn($me[turntime], $admin[turnterm]); - if($date <= $cutTurn) { $month++; } - - $totaldate = $me[turntime]; - - for($i=0; $i < 24; $i++) { - if($month == 13) { - $month = 1; - $year++; - } - $j = $i + 1; - $turndate = substr($totaldate,11, 5); - echo " - - $j - {$year}年 {$month}月 - $turndate - $turn[$i] - "; - $month++; - $totaldate = addTurn($totaldate, $admin[turnterm]); - } - - echo " -
- -"; -} -?> - - - diff --git a/che/confirm.png b/che/confirm.png deleted file mode 100644 index 073c46422f3f23a6deceb6b691d29ec5b1b51a70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 582 zcmeAS@N?(olHy`uVBq!ia0vp^{2&ni9{gXR(7=$ypvlAatNzoI zdNwv7ui-`03N{V}wh0C9>;V!WZEgRrumA7w&0H7}$;i~f=)(BZ%E}>?fsy6fVTLds z5hf*tW=0hb0SASt0kKb?{*R4WFbk|wFy-Fw?>wQQJm23LE?I8O!DS>N!Qk1zz$DGe z;_$jLD)Aiy6OiYaV|A96XL6aG zxgn9lX%w-A!$nJ*nMI&&cVk{F1IOW;k~i-%FuFv|U|^A8NIRLc*nC=R6fhw$c)I$z JtaD0e0ssqy$vyx8 diff --git a/che/d_ally.php b/che/d_ally.php deleted file mode 100644 index 21c29d87..00000000 --- a/che/d_ally.php +++ /dev/null @@ -1,118 +0,0 @@ -●수뇌부가 아니므로 불가능합니다. 불가침 실패."; - } elseif($dip[term] == $when*12 && $dip[state] == 7) { - $mylog[count($mylog)] = "●이미 수락했습니다. 불가침 실패."; - } elseif($losecitynum == 0) { - $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 불가침 실패."; - } elseif($wincitynum == 0) { - $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 불가침 실패."; - } elseif($dip[state] == 0) { - $mylog[count($mylog)] = "●아국과 교전중입니다. 불가침 실패."; - } elseif($dip[state] == 1) { - $mylog[count($mylog)] = "●아국과 선포중입니다. 불가침 실패."; - } elseif($dip[state] == 3 || $dip[state] == 4) { - $mylog[count($mylog)] = "●아국과 합병중입니다. 불가침 실패."; - } elseif($mynation[dipmsg] == "") { - $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; - } else { -// $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 불가침에 합의."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【불가침】$mynation[name](이)가 $younation[name](와)과 불가침 조약을 체결했습니다."; - - $youlog[count($youlog)] = "$mynation[name](와)과 $when년 불가침에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 $when년 불가침에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 수락"); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 {$when}년 불가침 합의, 비고: {$dip2[reserved]}"; - - PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); - - $when = $when * 12; - //외교 변경 - $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$me[nation]' and you='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='7',term='$when',fixed='$dip2[reserved]' where me='$you[nation]' and you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //조건 지움 - $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$mynation[name](이)가 불가침을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 불가침을 거부했습니다."; - - //조건 지움 - $query = "update diplomacy set reserved='' where me='$you[nation]' and you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -//pushAllLog($alllog); -//pushHistory($connect, $history); - -echo ""; - diff --git a/che/d_cancel.php b/che/d_cancel.php deleted file mode 100644 index 7dd03327..00000000 --- a/che/d_cancel.php +++ /dev/null @@ -1,97 +0,0 @@ -●수뇌부가 아니므로 불가능합니다. 파기 실패."; - } elseif($losecitynum == 0) { - $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 파기 실패."; - } elseif($wincitynum == 0) { - $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 파기 실패."; - } elseif($dip[state] != 7) { - $mylog[count($mylog)] = "●아국과 불가침중이 아닙니다. 파기 실패."; - } elseif($mynation[dipmsg] == "") { - $mylog[count($mylog)] = "●이미 거절했습니다. 파기 실패."; - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 조약 파기에 합의."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【파기】$mynation[name](이)가 $younation[name](와)과 불가침을 파기 하였습니다."; - $youlog[count($youlog)] = "$mynation[name](와)과 파기에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 파기에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 파기 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 파기 수락"); - - //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$me[nation]' and you='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$you[nation]' and you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 불가침 파기 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 불가침 파기 동의"; - - PushMsg(2, $me[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $you[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); - } - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$mynation[name](이)가 파기를 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 파기를 거부했습니다."; - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -pushAllLog($alllog); -pushHistory($connect, $history); - -echo ""; - diff --git a/che/d_cease.php b/che/d_cease.php deleted file mode 100644 index 88dfd30c..00000000 --- a/che/d_cease.php +++ /dev/null @@ -1,102 +0,0 @@ -●수뇌부가 아니므로 불가능합니다. 종전 실패."; - } elseif($losecitynum == 0) { - $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 종전 실패."; - } elseif($wincitynum == 0) { - $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 종전 실패."; - } elseif($dip[state] != 0 && $dip[state] != 1) { - $mylog[count($mylog)] = "●아국과 교전중이 아닙니다. 종전 실패."; - } elseif($mynation[dipmsg] == "") { - $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【종전】$mynation[name](이)가 $younation[name](와)과 종전 합의 하였습니다."; - $youlog[count($youlog)] = "$mynation[name](와)과 종전에 성공했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 종전에 합의했습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 종전 수락"); - - //외교 변경 - $query = "update diplomacy set state='2',term='0' where me='$mynation[nation]' and you='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='2',term='0' where me='$younation[nation]' and you='$mynation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //외교제한 - $query = "update nation set surlimit=24 where nation='$mynation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set surlimit=24 where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 종전 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 종전 동의"; - - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); - } - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$mynation[name](이)가 종전을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](와)과 종전을 거부했습니다."; - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -pushAllLog($alllog); -pushHistory($connect, $history); - -echo ""; - diff --git a/che/d_merge.php b/che/d_merge.php deleted file mode 100644 index 9a202e95..00000000 --- a/che/d_merge.php +++ /dev/null @@ -1,136 +0,0 @@ -=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$avgnation = MYDB_fetch_array($result); - -$query = "select round(std(power)) as power,round(std(gennum)) as gennum from nation where level>=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$stdnation = MYDB_fetch_array($result); - -$query = "select nation,name,gennum,power,surlimit,history,color from nation where nation='$you[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$younation = MYDB_fetch_array($result); - -$query = "select nation,name,gennum,power,gold,rice,surlimit,color,dip{$num} as dipmsg from nation where nation='$me[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$mynation = MYDB_fetch_array($result); - -$query = "select city from city where nation='$me[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$losecitynum = MYDB_num_rows($result); - -$query = "select city from city where nation='$you[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$wincitynum = MYDB_num_rows($result); - -//아국과의 관계 -$query = "select state from diplomacy where me='$me[nation]' and you='$you[nation]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$dip = MYDB_fetch_array($result); -//대상국이 외교 진행중(선포중,교전중,합병수락중,통합수락중)일때 -$query = "select state from diplomacy where me='$you[nation]' and (state='0' or state='1' or state='3' or state='5')"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$dipcount = MYDB_num_rows($result); -//대상국B이 아국C과 교전중인 국가A와 불가침중일때 불가(A=B 불가침, A=C(아국) 교전, B<-C(아국) 항복) -$query = "select you,state from diplomacy where me='$me[nation]' and (state='0' or state='1')"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$warcount = MYDB_num_rows($result); -// 아국과 교전중인 국가 골라냄 -$valid = 1; -for($i=0; $i < $warcount; $i++) { - $acdip = MYDB_fetch_array($result); - //교전중 국가A와 대상국B 외교 확인 - $query = "select state from diplomacy where me='$acdip[you]' and you='$you[nation]'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $abdip = MYDB_fetch_array($dipresult); - - if($abdip[state] == 7) { - $valid = 0; - } -} - -if($ok == "수락") { - // 서신 보낸 후 멸망 했을때. - if($me[level] < 5) { - $mylog[count($mylog)] = "●수뇌부가 아니므로 불가능합니다. 통합 실패."; - } elseif($mynation[surlimit] > 0) { - $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 통합 실패."; - } elseif($younation[surlimit] > 0) { - $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 통합 실패."; - } elseif($losecitynum == 0) { - $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 통합 실패."; - } elseif($wincitynum == 0) { - $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 통합 실패."; - } elseif($mynation[power]+$younation[power] > $avgnation[power]+$stdnation[power]) { - $mylog[count($mylog)] = "●양국 국력이 너무 높습니다. 통합 실패."; - } elseif($mynation[gennum]+$younation[gennum] > $avgnation[gennum]+$stdnation[gennum]) { - $mylog[count($mylog)] = "●양국 장수가 많습니다. 통합 실패."; - } elseif(!isClose($connect, $younation[nation], $mynation[nation])) { - $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 통합 실패."; - } elseif($dip[state] == 0) { - $mylog[count($mylog)] = "●아국과 교전중입니다. 통합 실패."; - } elseif($dipcount != 0) { - $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 통합 실패."; - } elseif($valid == 0) { - $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 통합 실패."; - } elseif($mynation[dipmsg] == "") { - $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; - } else { - $youlog[count($youlog)] = "$mynation[name](이)가 통합에 동의했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합시도】$mynation[name](와)과 $younation[name](이)가 통합을 시도합니다."; - $mylog[count($mylog)] = "$younation[name](와)과 통합에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 통합에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 통합 시도"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 통합 시도"); - - //외교 변경 - $query = "update diplomacy set state='3',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='4',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 통합에 합의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 통합에 합의"; - - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); - } - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -pushAllLog($alllog); -pushHistory($connect, $history); - -echo ""; - diff --git a/che/d_scout.php b/che/d_scout.php deleted file mode 100644 index 934a0503..00000000 --- a/che/d_scout.php +++ /dev/null @@ -1,162 +0,0 @@ - 0 && $nation[scout] == 0 && $me[nation] != $nation[nation] && $admin[year] >= $admin[startyear]+3 && strpos($me['nations'], ",{$nation['nation']},") === false) { - $youlog[count($youlog)] = "$me[name] 등용에 성공했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $nation[name](으)로 망명하였습니다."; - $mylog[count($mylog)] = "$nation[name](으)로 망명하여 수도로 이동합니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$me[name] 등용에 성공"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$nation[name](으)로 망명"); - - // 임관내역 추가 - $me['nations'] .= "{$nation['nation']},"; - - // 국가 변경, 도시 변경, 일반으로, 수도로 - $query = "update general set killturn='$admin[killturn]',belong=1,nation='$you[nation]',nations='{$me['nations']}',level=1,city='$nation[capital]' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 재야가 아니면 명성N*10% 공헌N*10%감소 - if($me[level] > 0) { - // 1000 1000 남기고 환수 - if($me[gold] > 1000) { $gold = $me[gold] - 1000; $me[gold] = 1000; } else { $gold = 0; } - if($me[rice] > 1000) { $rice = $me[rice] - 1000; $me[rice] = 1000; } else { $rice = 0; } - $query = "update general set gold='$me[gold]',rice='$me[rice]',betray=betray+1,dedication=dedication*(1-0.1*betray),experience=experience*(1-0.1*betray) where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //재야이면 100 100 증가 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //유저이면 삭턴 리셋 - if($me[npc] < 2) { - $query = "update general set killturn='$admin[killturn]' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //태수 군사 시중 해제 - switch($me[level]) { - case 4: - $query = "update city set gen1=0 where gen1='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 3: - $query = "update city set gen2=0 where gen2='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 2: - $query = "update city set gen3=0 where gen3='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } - - //등용자 명성, 공헌 상승 - $query = "update general set dedication=dedication+100,experience=experience+100 where no='$you[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 부대 처리 - $query = "select no from troop where troop='$me[troop]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $troop = MYDB_fetch_array($result); - - //부대장일 경우 - if($troop[no] == $me[no]) { - // 모두 탈퇴 - $query = "update general set troop='0' where troop='$me[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대 삭제 - $query = "delete from troop where troop='$me[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set troop='0' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //국가 기술력 그대로 - $query = "select no from general where nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //기존 국가 기술력 그대로 - $query = "select no from general where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //현 메세지 수정 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($me[level] == 12) { - $mylog[count($mylog)] = "●군주입니다. 등용 수락 불가."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($nation[level] == 0) { - $mylog[count($mylog)] = "●없는 국가이거나 방랑군입니다. 등용 수락 불가."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($nation[scout] != 0) { - $mylog[count($mylog)] = "●임관 금지중입니다. 등용 수락 불가."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif($admin[year] < $admin[startyear]+3) { - $mylog[count($mylog)] = "●초반 제한중입니다. 등용 수락 불가."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} elseif(strpos($me['nations'], ",{$nation['nation']},") > 0) { - $mylog[count($mylog)] = "●이미 임관했었던 국가입니다. 등용 수락 불가."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 수락 불가',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$me[name](이)가 등용을 거부했습니다."; - $mylog[count($mylog)] = "$nation[name](으)로 망명을 거부했습니다."; - - //현 메세지 지움 - $query = "update general set msg{$num}='$nation[name](으)로 등용 제의 거부',msg{$num}_type='10' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -pushAllLog($alllog); -pushHistory($connect, $history); - -echo ""; - diff --git a/che/d_setting/.htaccess b/che/d_setting/.htaccess deleted file mode 100644 index 698196ae..00000000 --- a/che/d_setting/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/che/d_setting/_common.php b/che/d_setting/_common.php deleted file mode 100644 index 57949e8d..00000000 --- a/che/d_setting/_common.php +++ /dev/null @@ -1,9 +0,0 @@ -●수뇌부가 아니므로 불가능합니다. 투항 실패."; - } elseif($mynation[surlimit] > 0) { - $mylog[count($mylog)] = "●본국이 외교제한이 지나지 않았습니다. 투항 실패."; - } elseif($younation[surlimit] > 0) { - $mylog[count($mylog)] = "●상대국이 외교제한이 지나지 않았습니다. 투항 실패."; -// } elseif($losecitynum == 0) { -// $mylog[count($mylog)] = "●방랑군이므로 불가능합니다. 투항 실패."; - } elseif($wincitynum == 0) { - $mylog[count($mylog)] = "●상대가 방랑군이므로 불가능합니다. 투항 실패."; - } elseif($younation[power] / $mynation[power] <= 3) { - $mylog[count($mylog)] = "●아국과 상대국의 국력차이가 크지 않습니다. 투항 실패."; - } elseif($losecitynum != 0 && !isClose($connect, $younation[nation], $mynation[nation])) { - $mylog[count($mylog)] = "●인접한 국가가 아니므로 불가능합니다. 투항 실패."; - } elseif($dip[state] == 0) { - $mylog[count($mylog)] = "●아국과 교전중입니다. 투항 실패."; - } elseif($dipcount != 0) { - $mylog[count($mylog)] = "●상대국이 외교 진행중입니다. 투항 실패."; - } elseif($valid == 0) { - $mylog[count($mylog)] = "●상대국이 아국의 교전국과 불가침중입니다. 투항 실패."; - } elseif($mynation[dipmsg] == "") { - $mylog[count($mylog)] = "●이미 거절했습니다. 불가침 실패."; - } else { - $youlog[count($youlog)] = "$mynation[name](이)가 합병에 동의했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【합병시도】$mynation[name](와)과 $younation[name](이)가 합병을 시도합니다."; - $mylog[count($mylog)] = "$younation[name](와)과 합병에 동의했습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$me[name](이)가 $younation[name](와)과 합병에 동의하였습니다."; - $you = addHistory($connect, $you, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병 시도"); - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$younation[name](와)과 합병 시도"); - - //외교 변경 - $query = "update diplomacy set state='5',term='24' where me='$mynation[nation]' and you='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update diplomacy set state='6',term='24' where me='$younation[nation]' and you='$mynation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name](와)과 합병에 동의"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$mynation[name](와)과 합병에 동의"; - - PushMsg(2, $mynation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $me[picture], $me[imgsvr], "{$me[name]}:{$mynation[name]}▶", $mynation[color], $younation[name], $younation[color], $youmsg); - } - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $youlog[count($youlog)] = "$mynation[name](이)가 항복을 거부했습니다."; - $mylog[count($mylog)] = "$younation[name](으)로 항복을 거부했습니다."; - - //현 메세지 지움 - $query = "update nation set dip{$num}='',dip{$num}_who='0',dip{$num}_when='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -pushGenLog($me, $mylog); -pushGenLog($you, $youlog); -pushAllLog($alllog); -pushHistory($connect, $history); - -echo ""; - diff --git a/che/data/.htaccess b/che/data/.htaccess deleted file mode 100644 index 698196ae..00000000 --- a/che/data/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/che/error.php b/che/error.php deleted file mode 100644 index e715fc70..00000000 --- a/che/error.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - -에러 - - - - -




- - - - - - - - -
서 버 에 러
- 두가지 중 한가지 이유일 수 있습니다.

- 1. 현재 서버가 처리중입니다. 몇초 후 아래 버튼을 눌러주세요.

- 2. 오랫동안 이 메세지가 뜰 경우는 서버에 에러가 발생하여 잠시 중단된 상태입니다.
-    운영자가 처리할 때까지 기다려주세요.
-
잠시 후 아래의 버튼을 눌러주세요.
- - - diff --git a/che/event_1.php b/che/event_1.php deleted file mode 100644 index 90623529..00000000 --- a/che/event_1.php +++ /dev/null @@ -1,246 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select year,month,turnterm,isUnited from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -if($admin[isUnited] == 0) { - $query = "select no from general where npc<2 and age>50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); - } -} - -// 수도가 이성인경우 옆으로 이전, 또는 랜덤 -$query = "select nation from nation where capital=63 or capital=64 or capital=65 or capital=66 or capital=67 or capital=68 or capital=69"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); - -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - - $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; - $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result2); - - $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -} - -//이벤트1 : 이민족침범 -$name = Array( "강족", "저족", "흉노족", "남만족", "산월족", "오환족", "왜족"); -$cap = Array( 63, 64, 65, 66, 67, 68, 69); - -$query = "select no from general where npc<5"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$eachCount = MYDB_num_rows($result); -$eachCount = round($eachCount / 7) * 2; - -for($i=0; $i < 7; $i++) { - RegNation($connect, $name[$i], "800000", 999999, 999999, "중원의 부패를 물리쳐라! 이민족 침범!", 15000, $eachCount, "병가", 0); -} - -//////////////////////////외교////////////////////////////////////////////////// -$query = "update game set isUnited=1"; -MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - -//-------------------------------------------------------------------- -for($i=0; $i < 7; $i++) { - $query = "select nation from nation where name='{$name[$i]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $nationNum[$i] = $nation[nation]; - - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - //태수,군사,시중 해제 - $query = "select gen1,gen2,gen3 from city where city='{$cap[$i]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - //태수 해제 - $query = "update general set level=1 where no='{$city[gen1]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - //군사 해제 - $query = "update general set level=1 where no='{$city[gen2]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - //시중 해제 - $query = "update general set level=1 where no='{$city[gen3]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - $query = "select nation,level from nation where nation!='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($k=0; $k < $count; $k++) { - $your = MYDB_fetch_array($result); - if($your[level] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } -} - -for($i=0; $i < 7; $i++) { - $query = "update nation set level=1 where nation='$nationNum[$i]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -} -//-------------------------------------------------------------------- - -//////////////////////////장수////////////////////////////////////////////////// -// 이름 통 무 지 꿈 특기 -$gencount = 2001; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%10 + 85; $p = rand()%10 + 85; $i = rand()%10 + 10; } - else { $l = rand()%10 + 85; $p = rand()%10 + 10; $i = rand()%10 + 85; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -//////////////////////////장수 끝/////////////////////////////////////////////// - -// 전장수 금쌀 999999 -$query = "update general set gold=999999,rice=999999"; -MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 이민족들이 궐기합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】이민족의 기세는 그 누구도 막을 수 없을듯 합니다!"; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓞ".$name; - $genid = "npc{$gencount}"; - $turntime = getRandTurn2($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%94 + 1; - $age = 15; - $specage = $age; - $specage2 = $age; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 5; - $npcmatch = 999; - $picture = 'default.jpg'; - $crew = $leader * 100; - $crewtype = rand() % 3; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos,tnmt, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', - '$leader','$power','$intel','$experience','$dedication', - '$level','99999','99999','$crew','$crewtype','100','100','0', - '6','6','6','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0', - 450000, 450000, 450000, 450000, 450000 - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/event_2.php b/che/event_2.php deleted file mode 100644 index b104b92b..00000000 --- a/che/event_2.php +++ /dev/null @@ -1,255 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select year,month,turnterm,isUnited from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -if($admin[isUnited] == 0) { - $query = "select no from general where npc<2 and age>50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); - } -} - -// 수도가 이성인경우 옆으로 이전, 또는 랜덤 -$query = "select nation from nation where capital=63 or capital=64 or capital=65 or capital=66 or capital=67 or capital=68 or capital=69"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); - -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - - $query = "select city,nation from city where nation='$nation[nation]' order by rand() limit 0,1"; - $result2 = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result2); - - $query = "update nation set capital='$city[city]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -} - -//이벤트2 : 오랑캐궐기 -$name = Array( "강족", "저족", "흉노족", "남만족", "산월족", "오환족", "왜족"); -$cap = Array( 63, 64, 65, 66, 67, 68, 69); - -$query = "select no from general where npc<5"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$eachCount = MYDB_num_rows($result); -$eachCount = round($eachCount / 7) * 2; - -$query = "select avg(tech) as tch from nation where level>0"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$info = MYDB_fetch_array($result); - -for($i=0; $i < 7; $i++) { - RegNation($connect, $name[$i], "800000", 99999, 99999, "오랑캐여 일어서라! 오랑캐 궐기!", $info[tch]+500, $eachCount, "병가", 0); -} - -//////////////////////////외교////////////////////////////////////////////////// -$query = "update game set isUnited=1"; -MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - -//-------------------------------------------------------------------- -for($i=0; $i < 7; $i++) { - $query = "select nation from nation where name='{$name[$i]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $nationNum[$i] = $nation[nation]; - - $query = "update nation set scout=1,capital={$cap[$i]} where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - //태수,군사,시중 해제 - $query = "select gen1,gen2,gen3 from city where city='{$cap[$i]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - //태수 해제 - $query = "update general set level=1 where no='{$city[gen1]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - //군사 해제 - $query = "update general set level=1 where no='{$city[gen2]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - //시중 해제 - $query = "update general set level=1 where no='{$city[gen3]}'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - $query = "update city set nation='$nation[nation]',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - - $query = "select nation,level from nation where nation!='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($k=0; $k < $count; $k++) { - $your = MYDB_fetch_array($result); - if($your[level] > 0) { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '1', '1')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '1', '1')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$your[nation]', '7', '999')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$your[nation]', '$nation[nation]', '7', '999')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } -} - -for($i=0; $i < 7; $i++) { - $query = "update nation set level=1 where nation='$nationNum[$i]'"; - MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -} -//-------------------------------------------------------------------- - -//////////////////////////장수////////////////////////////////////////////////// -// 이름 통 무 지 꿈 특기 -$gencount = 2001; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0],12, "강대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1],12, "저대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2],12, "흉노대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3],12, "남만대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4],12, "산월대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5],12, "오환대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6],12, "왜대왕", 95, 95, 75,"패권","돌격", ""); $gencount++; - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[0], 1, "강장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[1], 1, "저장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[2], 1,"흉노장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[3], 1,"남만장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[4], 1,"산월장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[5], 1,"오환장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -for($k=1; $k <= $eachCount; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount,$nationNum[6], 1, "왜장수{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -//////////////////////////장수 끝/////////////////////////////////////////////// - -// 전장수 금쌀 999999 -$query = "update general set gold=999999,rice=999999"; -MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지의 오랑캐들이 궐기합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원의 전 국가에 선전포고 합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】그러나 중원의 영웅들이라면 막아낼 수도 있을법 해 보입니다!"; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓞ".$name; - $genid = "npc{$gencount}"; - $turntime = getRandTurn2($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%94 + 1; - $age = 15; - $specage = $age; - $specage2 = $age; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 5; - $npcmatch = 999; - $picture = 'default.jpg'; - $crew = $leader * 100; - $crewtype = rand() % 3; - $dex0 = 0; - $dex10 = 0; - $dex20 = 0; - $dex30 = 0; - $dex40 = 0; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos,tnmt, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', - '$leader','$power','$intel','$experience','$dedication', - '$level','99999','99999','$crew','$crewtype','100','100','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0', - '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/event_3.php b/che/event_3.php deleted file mode 100644 index a613f347..00000000 --- a/che/event_3.php +++ /dev/null @@ -1,116 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select year,month,turnterm,isUnited from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -if($admin[isUnited] == 0) { - $query = "select no from general where npc<2 and age>50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); - } -} - -//이벤트3 : NPC추가 -//////////////////////////장수////////////////////////////////////////////////// -// 이름 통 무 지 꿈 특기 -$gencount = 2001; -for($k=1; $k <= 200; $k++) { - if(rand()%2) { $l = rand()%40 + 35; $p = rand()%40 + 35; $i = rand()%10 + 10; } - else { $l = rand()%40 + 35; $p = rand()%10 + 10; $i = rand()%40 + 35; } - RegGeneral3($connect,$admin[turnterm],$gencount, 0, 0, "무명장{$k}", $l, $p, $i,"패권","돌격", ""); $gencount++; -} - -//////////////////////////장수 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】각지에서 인재들이 등장합니다!"; -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】중원 통일에 보탬이 될듯 합니다!"; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓝ".$name; - $genid = "npc{$gencount}"; - $turntime = getRandTurn($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%94 + 1; - $age = 15; - $specage = $age; - $specage2 = $age; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 2; - $npcmatch = rand() % 150 + 1; - $picture = 'default.jpg'; - $crew = 0; - $crewtype = rand() % 3; - $dex0 = rand() % 18000; - $dex10 = rand() % 18000; - $dex20 = rand() % 18000; - $dex30 = rand() % 18000; - $dex40 = rand() % 18000; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos,tnmt, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', - '$leader','$power','$intel','$experience','$dedication', - '$level','1000','1000','$crew','$crewtype','100','100','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0', - '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/event_4.php b/che/event_4.php deleted file mode 100644 index 0b4ec99d..00000000 --- a/che/event_4.php +++ /dev/null @@ -1,145 +0,0 @@ - - -관리메뉴 - - - - -관리자가 아닙니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -//중복체크 -$query = "select no from general where user_id='jwh1807'"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$general = MYDB_fetch_array($result); - -if($general[no] > 0) { - echo " - - -관리메뉴 - - - - -이미 있습니다.
-"; - banner(); - echo " - -"; - - exit(); -} - -$query = "select year,month,turnterm,isUnited from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$query = "select round(avg(specage)) as specage,round(avg(specage2)) as specage2 from general where npc<2"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$general = MYDB_fetch_array($result); - -//이벤트4 : 유기체 추가 -//////////////////////////장수////////////////////////////////////////////////// -// 이름 통 무 지 꿈 특기 -$gencount = 2000; - -$personal = rand()%10; -$personal = getGenChar($personal); - -$leader = 65 + rand()%11; -if(rand()%2 == 0) { - $intel = 10 + rand()%6; - $power = 150 - $leader - $intel; -} else { - $power= 10 + rand()%6; - $intel = 150 - $leader - $power; -} - -RegGeneral4($connect,$admin[turnterm],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general[specage], $general[specage2], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; - -//////////////////////////장수 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$log[0] = "●{$admin[month]}월:ⓝ유기체가 천하에 이름을 알립니다."; -pushAllLog($log); - -$history[count($history)] = "●$admin[year]년 $admin[month]월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral4($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$specage,$specage2,$msg="") { - $name = "ⓝ".$name; - $genid = "jwh1807"; - $turntime = getRandTurn($turnterm); - $personal = CharCall($personal); - $city = rand()%94 + 1; - $age = 20; - - //전특 - $special2 = 0; - //내특 - $special = 0; - - $killturn = 720; - $experience = 0; - $dedication = 0; - $npc = 3; - $npcmatch = rand() % 150 + 1; - $picture = 'pic_3.jpg'; - $crew = 0; - $crewtype = rand() % 3; - $dex0 = 0; - $dex10 = 0; - $dex20 = 0; - $dex30 = 0; - $dex40 = 0; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', - '$leader','$power','$intel','$experience','$dedication', - '$level','1000','1000','$crew','$crewtype','100','100', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0', - '$dex0', '$dex10', '$dex20', '$dex30', '$dex40' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/func.php b/che/func.php deleted file mode 100644 index df78a67b..00000000 --- a/che/func.php +++ /dev/null @@ -1,7421 +0,0 @@ - $leader, 'power' => $power, 'intel' => $intel); -} - -// 14 ~ 75 -function abilityLeadpow() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 6.0; - $power = (rand()%100 + 1) / 100.0 + 6.0; - $intel = (rand()%100 + 1) / 100.0 + 1.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} - -function abilityLeadint() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 6.0; - $power = (rand()%100 + 1) / 100.0 + 1.0; - $intel = (rand()%100 + 1) / 100.0 + 6.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} - -function abilityPowint() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 1.0; - $power = (rand()%100 + 1) / 100.0 + 6.0; - $intel = (rand()%100 + 1) / 100.0 + 6.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} - -function delInDir($dir) { - $handle = opendir($dir); - while(false !== ($FolderOrFile = readdir($handle))) { - if($FolderOrFile == "." || $FolderOrFile == "..") { - continue; - } - - $filepath = sprintf('%s/%s', $dir, $FolderOrFile); - if(is_dir($filepath)) { - delInDir($filepath); - } // recursive - else { - @unlink($filepath); - } - } - closedir($handle); -// if(rmdir($dir)) { -// $success = true; -// } - return true; -} - -function GetImageURL($imgsvr) { - global $image, $image1; - if($imgsvr == 0) { - return $image; - } else { - return $image1; - } -} - -function CheckLogin($type=0) { - if($_SESSION[p_id] == "") { - if($type == 0) { echo ""; } - else { echo ""; } - exit(); - } -} - -function checkLimit($userlevel, $con, $conlimit) { - //운영자 - if($userlevel >= 5) { return 0; } - //특회이면 3배 - if($userlevel >= 3) { $conlimit *= 3; } - //접속률 이상이면 제한 - if($con > $conlimit) { - return 2; - //접속제한 90%이면 경고문구 - } elseif($con > $conlimit * 0.9) { - return 1; - } else { - return 0; - } -} - -function bar($per, $skin=1, $h=7) { - global $images; - if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } - else { $bd = 1; $h = 12; $h2 = 8; } - - $per = round($per, 1); - if($per < 1 || $per > 99) { $per = round($per); } - $str1 = " "; - $str2 = " "; - if($per <= 0) { $str1 = ""; } - elseif($per >= 100) { $str2 = ""; } - if($skin == 0) { - $str = "-"; - } else { - $str = " - - {$str1}{$str2} -
"; - } - return $str; -} - -function printLimitMsg($turntime) { - echo " - - -접속제한 - - -"; -require('analytics.php'); -echo " - - - -접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$turntime})
-(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)
-
- - -"; -} -// (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
- -function getScenario($connect) { - $query = "select scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($admin[scenario]) { - case 0: $str = "공백지모드"; break; - case 1: $str = "역사모드1 : 184년 황건적의 난"; break; - case 2: $str = "역사모드2 : 190년 반동탁연합"; break; - case 3: $str = "역사모드3 : 194년 군웅할거"; break; - case 4: $str = "역사모드4 : 196년 황제는 허도로"; break; - case 5: $str = "역사모드5 : 200년 관도대전"; break; - case 6: $str = "역사모드6 : 202년 원가의 분열"; break; - case 7: $str = "역사모드7 : 207년 적벽대전"; break; - case 8: $str = "역사모드8 : 213년 익주 공방전"; break; - case 9: $str = "역사모드9 : 219년 삼국정립"; break; - case 10: $str = "역사모드10 : 225년 칠종칠금"; break; - case 11: $str = "역사모드11 : 228년 출사표"; break; - - case 12: $str = "IF모드1 : 191년 백마장군의 위세"; break; - - case 20: $str = "가상모드1 : 180년 영웅 난무"; break; - case 21: $str = "가상모드1 : 180년 영웅 집결"; break; - case 22: $str = "가상모드2 : 179년 훼신 집결"; break; - case 23: $str = "가상모드3 : 180년 영웅 시대"; break; - case 24: $str = "가상모드4 : 180년 결사항전"; break; - case 25: $str = "가상모드5 : 180년 영웅독존"; break; - case 26: $str = "가상모드6 : 180년 무풍지대"; break; - case 27: $str = "가상모드7 : 180년 가요대잔치"; break; - case 28: $str = "가상모드8 : 180년 확산성 밀리언 아서"; break; - default: $str = "시나리오?"; break; - } - return $str; -} - -function CheckBlock($connect) { - $query = "select block from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - return $me[block]; -} - -function NationCharCall($call) { - switch($call) { - case "명가": $type =13; break; - case "음양가": $type =12; break; - case "종횡가": $type =11; break; - case "불가": $type =10; break; - case "도적": $type = 9; break; - case "오두미도":$type = 8; break; - case "태평도": $type = 7; break; - case "도가": $type = 6; break; - case "묵가": $type = 5; break; - case "덕가": $type = 4; break; - case "병가": $type = 3; break; - case "유가": $type = 2; break; - case "법가": $type = 1; break; - default: $type = 0; break; - } - return $type; -} - -function getRandGenName() { - $first = array('가', '간', '감', '강', '고', '공', '공손', '곽', '관', '괴', '교', '금', '노', '뇌', '능', '도', '동', '두', - '등', '마', '맹', '문', '미', '반', '방', '부', '비', '사', '사마', '서', '설', '성', '소', '손', '송', '순', '신', '심', - '악', '안', '양', '엄', '여', '염', '오', '왕', '요', '우', '원', '위', '유', '육', '윤', '이', '장', '저', '전', '정', - '제갈', '조', '종', '주', '진', '채', '태사', '하', '하후', '학', '한', '향', '허', '호', '화', '황', - '공손', '손', '왕', '유', '장', '조'); - $last = array('가', '간', '강', '거', '건', '검', '견', '경', '공', '광', '권', '규', '녕', '단', '대', '도', '등', '람', - '량', '례', '로', '료', '모', '민', '박', '범', '보', '비', '사', '상', '색', '서', '소', '속', '송', '수', '순', '습', - '승', '양', '연', '영', '온', '옹', '완', '우', '웅', '월', '위', '유', '윤', '융', '이', '익', '임', '정', '제', '조', - '주', '준', '지', '찬', '책', '충', '탁', '택', '통', '패', '평', '포', '합', '해', '혁', '현', '화', '환', '회', '횡', - '후', '훈', '휴', '흠', '흥'); - - $firstname = $first[rand()%count($first)]; - $lastname = $last[rand()%count($last)]; - - $fullname = "{$firstname}{$lastname}"; - return $fullname; -} - -function CityNameArray() { - $cityNames = array( - "","업","허창","낙양","장안","성도","양양","건업","북평","남피","완","수춘","서주","강릉","장사", - "시상","위례","계","복양","진류","여남","하비","서량","하내","한중","상용","덕양","강주","건녕", - "남해","계양","오","평양","사비","계림","진양","평원","북해","초","패","천수","안정","홍농", - "하변","자동","영안","귀양","주시","운남","남영","교지","신야","강하","무릉","영릉","상동","여강", - "회계","고창","대","안평","졸본","이도","강","저","흉노","남만","산월","오환","왜","호관", - "호로","사곡","함곡","사수","양평","가맹","역경","계교","동황","관도","정도","합비","광릉","적도", - "가정","기산","면죽","이릉","장판","백랑","적벽","파양","탐라","유구" - ); - return $cityNames; -} - -function CityCall($call) { - switch($call) { - case "업": $type = 1; break; case "허창": $type = 2; break; - case "낙양": $type = 3; break; case "장안": $type = 4; break; - case "성도": $type = 5; break; case "양양": $type = 6; break; - case "건업": $type = 7; break; case "북평": $type = 8; break; - case "남피": $type = 9; break; case "완": $type = 10; break; - case "수춘": $type = 11; break; case "서주": $type = 12; break; - case "강릉": $type = 13; break; case "장사": $type = 14; break; - case "시상": $type = 15; break; case "위례": $type = 16; break; - case "계": $type = 17; break; case "복양": $type = 18; break; - case "진류": $type = 19; break; case "여남": $type = 20; break; - case "하비": $type = 21; break; case "서량": $type = 22; break; - case "하내": $type = 23; break; case "한중": $type = 24; break; - case "상용": $type = 25; break; case "덕양": $type = 26; break; - case "강주": $type = 27; break; case "건녕": $type = 28; break; - case "남해": $type = 29; break; case "계양": $type = 30; break; - case "오": $type = 31; break; case "평양": $type = 32; break; - case "사비": $type = 33; break; case "계림": $type = 34; break; - case "진양": $type = 35; break; case "평원": $type = 36; break; - case "북해": $type = 37; break; case "초": $type = 38; break; - case "패": $type = 39; break; case "천수": $type = 40; break; - case "안정": $type = 41; break; case "홍농": $type = 42; break; - case "하변": $type = 43; break; case "자동": $type = 44; break; - case "영안": $type = 45; break; case "귀양": $type = 46; break; - case "주시": $type = 47; break; case "운남": $type = 48; break; - case "남영": $type = 49; break; case "교지": $type = 50; break; - case "신야": $type = 51; break; case "강하": $type = 52; break; - case "무릉": $type = 53; break; case "영릉": $type = 54; break; - case "상동": $type = 55; break; case "여강": $type = 56; break; - case "회계": $type = 57; break; case "고창": $type = 58; break; - case "대": $type = 59; break; case "안평": $type = 60; break; - case "졸본": $type = 61; break; case "이도": $type = 62; break; - case "강": $type = 63; break; case "저": $type = 64; break; - case "흉노": $type = 65; break; case "남만": $type = 66; break; - case "산월": $type = 67; break; case "오환": $type = 68; break; - case "왜": $type = 69; break; case "호관": $type = 70; break; - case "호로": $type = 71; break; case "사곡": $type = 72; break; - case "함곡": $type = 73; break; case "사수": $type = 74; break; - case "양평": $type = 75; break; case "가맹": $type = 76; break; - case "역경": $type = 77; break; case "계교": $type = 78; break; - case "동황": $type = 79; break; case "관도": $type = 80; break; - case "정도": $type = 81; break; case "합비": $type = 82; break; - case "광릉": $type = 83; break; case "적도": $type = 84; break; - case "가정": $type = 85; break; case "기산": $type = 86; break; - case "면죽": $type = 87; break; case "이릉": $type = 88; break; - case "장판": $type = 89; break; case "백랑": $type = 90; break; - case "적벽": $type = 91; break; case "파양": $type = 92; break; - case "탐라": $type = 93; break; case "유구": $type = 94; break; - } - return $type; -} - -function CityNum($num) { - switch($num) { - case 1: $call = "업" ; break; case 2: $call = "허창"; break; - case 3: $call = "낙양"; break; case 4: $call = "장안"; break; - case 5: $call = "성도"; break; case 6: $call = "양양"; break; - case 7: $call = "건업"; break; case 8: $call = "북평"; break; - case 9: $call = "남피"; break; case 10: $call = "완" ; break; - case 11: $call = "수춘"; break; case 12: $call = "서주"; break; - case 13: $call = "강릉"; break; case 14: $call = "장사"; break; - case 15: $call = "시상"; break; case 16: $call = "위례"; break; - case 17: $call = "계" ; break; case 18: $call = "복양"; break; - case 19: $call = "진류"; break; case 20: $call = "여남"; break; - case 21: $call = "하비"; break; case 22: $call = "서량"; break; - case 23: $call = "하내"; break; case 24: $call = "한중"; break; - case 25: $call = "상용"; break; case 26: $call = "덕양"; break; - case 27: $call = "강주"; break; case 28: $call = "건녕"; break; - case 29: $call = "남해"; break; case 30: $call = "계양"; break; - case 31: $call = "오" ; break; case 32: $call = "평양"; break; - case 33: $call = "사비"; break; case 34: $call = "계림"; break; - case 35: $call = "진양"; break; case 36: $call = "평원"; break; - case 37: $call = "북해"; break; case 38: $call = "초" ; break; - case 39: $call = "패" ; break; case 40: $call = "천수"; break; - case 41: $call = "안정"; break; case 42: $call = "홍농"; break; - case 43: $call = "하변"; break; case 44: $call = "자동"; break; - case 45: $call = "영안"; break; case 46: $call = "귀양"; break; - case 47: $call = "주시"; break; case 48: $call = "운남"; break; - case 49: $call = "남영"; break; case 50: $call = "교지"; break; - case 51: $call = "신야"; break; case 52: $call = "강하"; break; - case 53: $call = "무릉"; break; case 54: $call = "영릉"; break; - case 55: $call = "상동"; break; case 56: $call = "여강"; break; - case 57: $call = "회계"; break; case 58: $call = "고창"; break; - case 59: $call = "대" ; break; case 60: $call = "안평"; break; - case 61: $call = "졸본"; break; case 62: $call = "이도"; break; - case 63: $call = "강" ; break; case 64: $call = "저" ; break; - case 65: $call = "흉노"; break; case 66: $call = "남만"; break; - case 67: $call = "산월"; break; case 68: $call = "오환"; break; - case 69: $call = "왜" ; break; case 70: $call = "호관"; break; - case 71: $call = "호로"; break; case 72: $call = "사곡"; break; - case 73: $call = "함곡"; break; case 74: $call = "사수"; break; - case 75: $call = "양평"; break; case 76: $call = "가맹"; break; - case 77: $call = "역경"; break; case 78: $call = "계교"; break; - case 79: $call = "동황"; break; case 80: $call = "관도"; break; - case 81: $call = "정도"; break; case 82: $call = "합비"; break; - case 83: $call = "광릉"; break; case 84: $call = "적도"; break; - case 85: $call = "가정"; break; case 86: $call = "기산"; break; - case 87: $call = "면죽"; break; case 88: $call = "이릉"; break; - case 89: $call = "장판"; break; case 90: $call = "백랑"; break; - case 91: $call = "적벽"; break; case 92: $call = "파양"; break; - case 93: $call = "탐라"; break; case 94: $call = "유구"; break; - } - return $call; -} - -function CharCall($call) { - switch($call) { - case "은둔": $type =10; break; - case "안전"; $type = 9; break; - case "유지"; $type = 8; break; - case "재간"; $type = 7; break; - case "출세"; $type = 6; break; - case "할거"; $type = 5; break; - case "정복"; $type = 4; break; - case "패권"; $type = 3; break; - case "의협"; $type = 2; break; - case "대의"; $type = 1; break; - case "왕좌"; $type = 0; break; - } - return $type; -} - -function SpecCall($call) { - switch($call) { - case "-": $type = 0; break; - case "경작": $type = 1; break; - case "상재": $type = 2; break; - case "발명": $type = 3; break; - - case "축성": $type = 10; break; - case "수비": $type = 11; break; - case "통찰": $type = 12; break; - - case "인덕": $type = 20; break; - - case "거상": $type = 30; break; - case "귀모": $type = 31; break; - - case "귀병": $type = 40; break; - case "신산": $type = 41; break; - case "환술": $type = 42; break; - case "집중": $type = 43; break; - case "신중": $type = 44; break; - case "반계": $type = 45; break; - - case "보병": $type = 50; break; - case "궁병": $type = 51; break; - case "기병": $type = 52; break; - case "공성": $type = 53; break; - - case "돌격": $type = 60; break; - case "무쌍": $type = 61; break; - case "견고": $type = 62; break; - case "위압": $type = 63; break; - - case "저격": $type = 70; break; - case "필살": $type = 71; break; - case "징병": $type = 72; break; - case "의술": $type = 73; break; - case "격노": $type = 74; break; - case "척사": $type = 75; break; - } - return $type; -} - -// 0 1 2 3 4 5 6 7 -// 0 -, 경작, 상재, 발명 = 3 지력내정 -// 10 축성, 수비, 통찰 = 3 무력내정 -// 20 인덕 = 1 통솔내정 -// 30 거상, 귀모 = 2 공통내정 - -function getSpecial($connect, $leader, $power, $intel) { - //통장 - if($leader*0.9 > $power && $leader*0.9 > $intel) { - $type = array(20, 30, 31); - $special = $type[rand()%3]; - // 거상, 귀모는 33% * 6% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 6) { - $type = array(20, 20); - $special = $type[rand()%2]; - } - //무장 - } elseif($power >= $intel) { - $type = array(10, 11, 12, 30, 31); - $special = $type[rand()%5]; - // 거상, 귀모는 그중에 20% * 10% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 10) { - $type = array(10, 11, 12); - $special = $type[rand()%3]; - } - //지장 - } elseif($intel > $power) { - $type = array(1, 2, 3, 30, 31); - $special = $type[rand()%5]; - // 거상, 귀모는 그중에 20% * 10% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 10) { - $type = array(1, 2, 3); - $special = $type[rand()%3]; - } - } else { - $type = array(30, 31); - $special = $type[rand()%2]; - } - return $special; -} - -// 0 1 2 3 4 5 6 7 -// 40 귀병, 신산, 환술, 집중, 신중, 반계 = 6 지력전투 -// 50 보병, 궁병, 기병, 공성 = 4 무력전투 -// 60 돌격, 무쌍, 견고, 위압 = 4 무장전투 -// 70 저격, 필살, 징병, 의술, 격노, 척사 = 6 공통전투 - -function getSpecial2($connect, $leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex20=0, $dex30=0, $dex40=0) { - $special2 = 70; - // 숙련 10,000: 25%, 40,000: 50%, 100,000: 79%, 160,000: 100% - $dex = sqrt($dex0 + $dex10 + $dex20 + $dex30 + $dex40); - $dex = round($dex / 4); - // 숙련 10,000: 75%, 40,000: 50%, 100,000: 21%, 160,000: 0% - // 그중 20%만 - if($nodex == 0 && rand()%100 < 20 && rand()%100 > $dex) { - if(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex0) { - $special2 = 50; - // 숙련이 아얘 없을시 재분배 - if($dex0 <= 0) { - if($power >= $intel) { - $special2 = 50 + rand()%4; - } else { - $special2 = 40; - } - } - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex10) { - $special2 = 51; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex20) { - $special2 = 52; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex30) { - $special2 = 40; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex40) { - $special2 = 53; - } - //무장 - } elseif($power >= $intel) { - $type = array(60, 61, 62, 63, 70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%10]; - // 의술은 그중에 10% * 20% = 2% - if(($special2 == 73) && rand()%100 > 20) { - $type = array(60, 61, 62, 63, 70, 71, 72, 74, 75); - $special2 = $type[rand()%9]; - } - //지장 - } elseif($intel > $power) { - $type = array(41, 42, 43, 44, 45, 70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%11]; - // 환술은 그중에 9% * 50% = 4.5% - if(($special2 == 42) && rand()%100 > 50) { - $type = array(41, 43, 44, 45, 70, 71, 72, 74, 75); - $special2 = $type[rand()%9]; - } - // 의술은 그중에 9% * 20% = 1.8% - if(($special2 == 73) && rand()%100 > 20) { - $type = array(41, 42, 43, 44, 45, 70, 71, 72, 74, 75); - $special2 = $type[rand()%10]; - } - } else { - $type = array(70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%6]; - } - return $special2; -} - -function getConnect($con) { - if($con < 50) $conname = "안함"; - elseif($con < 100) $conname = "무관심"; - elseif($con < 200) $conname = "가끔"; - elseif($con < 400) $conname = "보통"; - elseif($con < 800) $conname = "자주"; - elseif($con < 1600) $conname = "열심"; - elseif($con < 3200) $conname = "중독"; - elseif($con < 6400) $conname = "폐인"; - elseif($con < 12800) $conname = "경고"; - else $conname = "헐..."; - - return $conname; -} - -function getCityLevel($level) { - switch($level) { - case 8: $call = "특"; break; - case 7: $call = "대"; break; - case 6: $call = "중"; break; - case 5: $call = "소"; break; - case 4: $call = "이"; break; - case 3: $call = "관"; break; - case 2: $call = "진"; break; - case 1: $call = "수"; break; - default:$call = "?"; break; - } - return $call; -} - -function getRegion($region) { - switch($region) { - case 8: $call = "동이"; break; - case 7: $call = "오월"; break; - case 6: $call = "초"; break; - case 5: $call = "남중"; break; - case 4: $call = "서촉"; break; - case 3: $call = "서북"; break; - case 2: $call = "중원"; break; - case 1: $call = "하북"; break; - default:$call = "?"; break; - } - return $call; -} - -function getNationChiefLevel($level) { - switch($level) { - case 7: $lv = 5; break; - case 6: $lv = 5; break; - case 5: $lv = 7; break; - case 4: $lv = 7; break; - case 3: $lv = 9; break; - case 2: $lv = 9; break; - case 1: $lv = 11; break; - case 0: $lv = 11; break; - } - return $lv; -} - -function getNationLevel($level) { - switch($level) { - case 7: $call = "황제"; break; - case 6: $call = "왕"; break; - case 5: $call = "공"; break; - case 4: $call = "주목"; break; - case 3: $call = "주자사"; break; - case 2: $call = "군벌"; break; - case 1: $call = "호족"; break; - case 0: $call = "방랑군"; break; - } - return $call; -} - -function getGenChar($type) { - switch($type) { - case 10: $call = "은둔"; break; - case 9: $call = "안전"; break; - case 8: $call = "유지"; break; - case 7: $call = "재간"; break; - case 6: $call = "출세"; break; - case 5: $call = "할거"; break; - case 4: $call = "정복"; break; - case 3: $call = "패권"; break; - case 2: $call = "의협"; break; - case 1: $call = "대의"; break; - case 0: $call = "왕좌"; break; - } - return $call; -} - -function getGenSpecial($type) { - switch($type) { - case 0: $call = "-"; break; - case 1: $call = "경작"; break; - case 2: $call = "상재"; break; - case 3: $call = "발명"; break; - - case 10: $call = "축성"; break; - case 11: $call = "수비"; break; - case 12: $call = "통찰"; break; - - case 20: $call = "인덕"; break; - - case 30: $call = "거상"; break; - case 31: $call = "귀모"; break; - - case 40: $call = "귀병"; break; - case 41: $call = "신산"; break; - case 42: $call = "환술"; break; - case 43: $call = "집중"; break; - case 44: $call = "신중"; break; - case 45: $call = "반계"; break; - - case 50: $call = "보병"; break; - case 51: $call = "궁병"; break; - case 52: $call = "기병"; break; - case 53: $call = "공성"; break; - - case 60: $call = "돌격"; break; - case 61: $call = "무쌍"; break; - case 62: $call = "견고"; break; - case 63: $call = "위압"; break; - - case 70: $call = "저격"; break; - case 71: $call = "필살"; break; - case 72: $call = "징병"; break; - case 73: $call = "의술"; break; - case 74: $call = "격노"; break; - case 75: $call = "척사"; break; - } - return $call; -} - -function getNationType($type) { - switch($type) { - case 13: $call = "명 가"; break; - case 12: $call = "음 양 가"; break; - case 11: $call = "종 횡 가"; break; - case 10: $call = "불 가"; break; - case 9: $call = "도 적"; break; - case 8: $call = "오 두 미 도"; break; - case 7: $call = "태 평 도"; break; - case 6: $call = "도 가"; break; - case 5: $call = "묵 가"; break; - case 4: $call = "덕 가"; break; - case 3: $call = "병 가"; break; - case 2: $call = "유 가"; break; - case 1: $call = "법 가"; break; - case 0: $call = "-"; break; - } - return $call; -} - -function getNationType2($type, $skin) { - switch($type) { - case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; - case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; - case 11: $call = "전략↑ 수성↑ 금수입↓ 내정↓"; break; - case 10: $call = "민심↑ 수성↑ 금수입↓"; break; - case 9: $call = "계략↑ 금수입↓ 치안↓ 민심↓"; break; - case 8: $call = "쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓"; break; - case 7: $call = "인구↑ 민심↑ 기술↓ 수성↓"; break; - case 6: $call = "인구↑ 기술↓ 치안↓"; break; - case 5: $call = "수성↑ 기술↓"; break; - case 4: $call = "치안↑인구↑ 민심↑ 쌀수입↓ 수성↓"; break; - case 3: $call = "기술↑ 수성↑ 인구↓ 민심↓"; break; - case 2: $call = "내정↑ 민심↑ 쌀수입↓"; break; - case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; - case 0: $call = "-"; break; - } - if($skin == 0) { - $call = str_replace("","", $call); - $call = str_replace("","", $call); - $call = str_replace("","", $call); - } - return $call; -} - -function getLevel($level, $nlevel=8) { - if($level >= 0 && $level <= 4) { $nlevel = 0; } - $code = $nlevel * 100 + $level; - switch($code) { - case 812: $call = "군주"; break; - case 811: $call = "참모"; break; - case 810: $call = "제1장군"; break; - case 809: $call = "제1모사"; break; - case 808: $call = "제2장군"; break; - case 807: $call = "제2모사"; break; - case 806: $call = "제3장군"; break; - case 805: $call = "제3모사"; break; - - case 712: $call = "황제"; break; case 612: $call = "왕"; break; - case 711: $call = "승상"; break; case 611: $call = "광록훈"; break; - case 710: $call = "위장군"; break; case 610: $call = "전장군"; break; - case 709: $call = "사공"; break; case 609: $call = "상서령"; break; - case 708: $call = "표기장군"; break; case 608: $call = "좌장군"; break; - case 707: $call = "태위"; break; case 607: $call = "중서령"; break; - case 706: $call = "거기장군"; break; case 606: $call = "우장군"; break; - case 705: $call = "사도"; break; case 605: $call = "비서령"; break; - - case 512: $call = "공"; break; case 412: $call = "주목"; break; - case 511: $call = "광록대부"; break; case 411: $call = "태사령"; break; - case 510: $call = "안국장군"; break; case 410: $call = "아문장군"; break; - case 509: $call = "집금오"; break; case 409: $call = "낭중"; break; - case 508: $call = "파로장군"; break; case 408: $call = "호군"; break; - case 507: $call = "소부"; break; case 407: $call = "종사중랑"; break; - - case 312: $call = "주자사"; break; case 212: $call = "군벌"; break; - case 311: $call = "주부"; break; case 211: $call = "참모"; break; - case 310: $call = "편장군"; break; case 210: $call = "비장군"; break; - case 309: $call = "간의대부"; break; case 209: $call = "부참모"; break; - - case 112: $call = "영주"; break; case 12: $call = "두목"; break; - case 111: $call = "참모"; break; case 11: $call = "부두목"; break; - - case 4: $call = "태수"; break; - case 3: $call = "군사"; break; - case 2: $call = "시중"; break; - case 1: $call = "일반"; break; - case 0: $call = "재야"; break; - default: $call = "-"; break; - } - return $call; -} - -function getCall($leader, $power, $intel) { - global $_goodgenleader, $_goodgenpower, $_goodgenintel; - - $call = "평범"; - if($leader >= $_goodgenleader && $power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "만능"; - } elseif($leader >= $_goodgenleader && $power >= $_goodgenpower) { - $call = "용장"; - } elseif($leader >= $_goodgenleader && $intel >= $_goodgenintel) { - $call = "지장"; - } elseif($power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "명장"; - } elseif($leader >= $_goodgenleader) { - $call = "명사"; - } elseif($power >= $_goodgenpower) { - $call = "용맹"; - } elseif($intel >= $_goodgenintel) { - $call = "현명"; - } - return $call; -} - -function getDed($dedication) { - if($dedication < 1 ) $level2 = "무품관"; - elseif($dedication < 10*10) $level2 = "30품관"; - elseif($dedication < 20*20) $level2 = "29품관"; - elseif($dedication < 30*30) $level2 = "28품관"; - elseif($dedication < 40*40) $level2 = "27품관"; - elseif($dedication < 50*50) $level2 = "26품관"; - elseif($dedication < 60*60) $level2 = "25품관"; - elseif($dedication < 70*70) $level2 = "24품관"; - elseif($dedication < 80*80) $level2 = "23품관"; - elseif($dedication < 90*90) $level2 = "22품관"; - elseif($dedication < 100*100) $level2 = "21품관"; - elseif($dedication < 110*110) $level2 = "20품관"; - elseif($dedication < 120*120) $level2 = "19품관"; - elseif($dedication < 130*130) $level2 = "18품관"; - elseif($dedication < 140*140) $level2 = "17품관"; - elseif($dedication < 150*150) $level2 = "16품관"; - elseif($dedication < 160*160) $level2 = "15품관"; - elseif($dedication < 170*170) $level2 = "14품관"; - elseif($dedication < 180*180) $level2 = "13품관"; - elseif($dedication < 190*190) $level2 = "12품관"; - elseif($dedication < 200*200) $level2 = "11품관"; // 40000 - elseif($dedication < 210*210) $level2 = "10품관"; // 44100 - elseif($dedication < 220*220) $level2 = "9품관"; // 48400 - elseif($dedication < 230*230) $level2 = "8품관"; // 52900 - elseif($dedication < 240*240) $level2 = "7품관"; // 57600 - elseif($dedication < 250*250) $level2 = "6품관"; // 62500 - elseif($dedication < 260*260) $level2 = "5품관"; // 67600 - elseif($dedication < 270*270) $level2 = "4품관"; // 72900 - elseif($dedication < 280*280) $level2 = "3품관"; // 78400 - elseif($dedication < 290*290) $level2 = "2품관"; // 84100 - else { - $level2 = "1품관"; - } - - return $level2; -} - -function getExpLevel($experience) { - if($experience < 1000) { - $level = floor($experience / 100); - } else { - for($level = 0; $experience > (($level+1)*($level+1)*10); $level++) { - } - } - - return $level; -} - -function getDedLevel($dedication) { - for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { - } - - return $level; -} - -function expStatus($exp) { - global $_upgradeLimit; - return $exp / $_upgradeLimit * 100; -} - -function getLevelPer($exp, $level) { - if($exp < 100) { $per = $exp; } - elseif($exp < 1000) { $per = $exp - ($level)*100; } - else { $per = ($exp - 10*$level*$level) / (2*$level+1) * 10; } - return $per; -} - -function getBill($dedication) { - for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { - } - - return ($level * 200 + 400); -} - -function getHonor($experience) { - if($experience < 640 ) $honor = "전무"; - elseif($experience < 2560) $honor = "무명"; - elseif($experience < 5760) $honor = "신동"; - elseif($experience < 10240) $honor = "약간"; - elseif($experience < 16000) $honor = "평범"; - elseif($experience < 23040) $honor = "지역적"; - elseif($experience < 31360) $honor = "전국적"; - elseif($experience < 40960) $honor = "세계적"; - elseif($experience < 45000) $honor = "유명"; - elseif($experience < 51840) $honor = "명사"; - elseif($experience < 55000) $honor = "호걸"; - elseif($experience < 64000) $honor = "효웅"; - elseif($experience < 77440) $honor = "영웅"; - else $honor = "구세주"; - - return $honor; -} - -function getTypename($type) { - switch($type) { - case 0: $typename = "보병"; break; - case 1: $typename = "청주병"; break; - case 2: $typename = "수병"; break; - case 3: $typename = "자객병"; break; - case 4: $typename = "근위병"; break; - case 5: $typename = "등갑병"; break; - - case 10: $typename = "궁병"; break; - case 11: $typename = "궁기병"; break; - case 12: $typename = "연노병"; break; - case 13: $typename = "강궁병"; break; - case 14: $typename = "석궁병"; break; - - case 20: $typename = "기병"; break; - case 21: $typename = "백마병"; break; - case 22: $typename = "중장기병"; break; - case 23: $typename = "돌격기병"; break; - case 24: $typename = "철기병"; break; - case 25: $typename = "수렵기병"; break; - case 26: $typename = "맹수병"; break; - case 27: $typename = "호표기병"; break; - - case 30: $typename = "귀병"; break; - case 31: $typename = "신귀병"; break; - case 32: $typename = "백귀병"; break; - case 33: $typename = "흑귀병"; break; - case 34: $typename = "악귀병"; break; - case 35: $typename = "남귀병"; break; - case 36: $typename = "황귀병"; break; - case 37: $typename = "천귀병"; break; - case 38: $typename = "마귀병"; break; - - case 40: $typename = "정란"; break; - case 41: $typename = "충차"; break; - case 42: $typename = "벽력거"; break; - case 43: $typename = "목우"; break; - } - return $typename; -} - -function getCost($connect, $armtype) { - $query = "select cst{$armtype} from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - return $admin["cst{$armtype}"]; -} - -function TechLimit($startyear, $year, $tech) { - $limit = 0; - if($year < $startyear+ 5 && $tech >= 1000) { $limit = 1; } - if($year < $startyear+10 && $tech >= 2000) { $limit = 1; } - if($year < $startyear+15 && $tech >= 3000) { $limit = 1; } - if($year < $startyear+20 && $tech >= 4000) { $limit = 1; } - if($year < $startyear+25 && $tech >= 5000) { $limit = 1; } - if($year < $startyear+30 && $tech >= 6000) { $limit = 1; } - if($year < $startyear+35 && $tech >= 7000) { $limit = 1; } - if($year < $startyear+40 && $tech >= 8000) { $limit = 1; } - if($year < $startyear+45 && $tech >= 9000) { $limit = 1; } - if($year < $startyear+50 && $tech >= 10000) { $limit = 1; } - if($year < $startyear+55 && $tech >= 11000) { $limit = 1; } - if($year < $startyear+60 && $tech >= 12000) { $limit = 1; } - return $limit; -} - -function getTechAbil($tech) { - if($tech < 1000) { $abil = 0; } - elseif($tech < 2000) { $abil = 25; } - elseif($tech < 3000) { $abil = 50; } - elseif($tech < 4000) { $abil = 75; } - elseif($tech < 5000) { $abil = 100; } - elseif($tech < 6000) { $abil = 125; } - elseif($tech < 7000) { $abil = 150; } - elseif($tech < 8000) { $abil = 175; } - elseif($tech < 9000) { $abil = 200; } - elseif($tech < 10000) { $abil = 225; } - elseif($tech < 11000) { $abil = 250; } - elseif($tech < 12000) { $abil = 275; } - else { $abil = 300; } - return $abil; -} - -function getTechCost($tech) { - if($tech < 1000) { $cost = 1.00; } - elseif($tech < 2000) { $cost = 1.15; } - elseif($tech < 3000) { $cost = 1.30; } - elseif($tech < 4000) { $cost = 1.45; } - elseif($tech < 5000) { $cost = 1.60; } - elseif($tech < 6000) { $cost = 1.75; } - elseif($tech < 7000) { $cost = 1.90; } - elseif($tech < 8000) { $cost = 2.05; } - elseif($tech < 9000) { $cost = 2.20; } - elseif($tech < 10000) { $cost = 2.35; } - elseif($tech < 11000) { $cost = 2.50; } - elseif($tech < 12000) { $cost = 2.65; } - else { $cost = 2.80; } - return $cost; -} - -function getTechCall($tech) { - if($tech < 1000) { $str = "0등급"; } - elseif($tech < 2000) { $str = "1등급"; } - elseif($tech < 3000) { $str = "2등급"; } - elseif($tech < 4000) { $str = "3등급"; } - elseif($tech < 5000) { $str = "4등급"; } - elseif($tech < 6000) { $str = "5등급"; } - elseif($tech < 7000) { $str = "6등급"; } - elseif($tech < 8000) { $str = "7등급"; } - elseif($tech < 9000) { $str = "8등급"; } - elseif($tech < 10000) { $str = "9등급"; } - elseif($tech < 11000) { $str = "10등급"; } - elseif($tech < 12000) { $str = "11등급"; } - else { $str = "12등급"; } - return $str; -} - -function getDexCall($dex) { - if($dex < 2500) { $str = "F-"; } - elseif($dex < 7500) { $str = "F"; } - elseif($dex < 15000) { $str = "F+"; } - elseif($dex < 25000) { $str = "E-"; } - elseif($dex < 37500) { $str = "E"; } - elseif($dex < 52500) { $str = "E+"; } - elseif($dex < 70000) { $str = "D-"; } - elseif($dex < 90000) { $str = "D"; } - elseif($dex < 112500) { $str = "D+"; } - elseif($dex < 137500) { $str = "C-"; } - elseif($dex < 165000) { $str = "C"; } - elseif($dex < 195000) { $str = "C+"; } - elseif($dex < 227500) { $str = "B-"; } - elseif($dex < 262500) { $str = "B"; } - elseif($dex < 300000) { $str = "B+"; } - elseif($dex < 340000) { $str = "A-"; } - elseif($dex < 382500) { $str = "A"; } - elseif($dex < 427500) { $str = "A+"; } - elseif($dex < 475000) { $str = "S-"; } - elseif($dex < 525000) { $str = "S"; } - elseif($dex < 577500) { $str = "S+"; } - elseif($dex < 632500) { $str = "SS-"; } - elseif($dex < 690000) { $str = "SS"; } - elseif($dex < 750000) { $str = "SS+"; } - elseif($dex < 812500) { $str = "SSS-"; } - elseif($dex < 877500) { $str = "SSS"; } - elseif($dex < 945000) { $str = "SSS+"; } - elseif($dex < 1015000) { $str = "Z-"; } - elseif($dex < 1087500) { $str = "Z"; } - elseif($dex < 1162500) { $str = "Z+"; } - else { $str = "?"; } - return $str; -} - -function getDexLevel($dex) { - if($dex < 2500) { $lvl = 0; } - elseif($dex < 7500) { $lvl = 1; } - elseif($dex < 15000) { $lvl = 2; } - elseif($dex < 25000) { $lvl = 3; } - elseif($dex < 37500) { $lvl = 4; } - elseif($dex < 52500) { $lvl = 5; } - elseif($dex < 70000) { $lvl = 6; } - elseif($dex < 90000) { $lvl = 7; } - elseif($dex < 112500) { $lvl = 8; } - elseif($dex < 137500) { $lvl = 9; } - elseif($dex < 165000) { $lvl = 10; } - elseif($dex < 195000) { $lvl = 11; } - elseif($dex < 227500) { $lvl = 12; } - elseif($dex < 262500) { $lvl = 13; } - elseif($dex < 300000) { $lvl = 14; } - elseif($dex < 340000) { $lvl = 15; } - elseif($dex < 382500) { $lvl = 16; } - elseif($dex < 427500) { $lvl = 17; } - elseif($dex < 475000) { $lvl = 18; } - elseif($dex < 525000) { $lvl = 19; } - elseif($dex < 577500) { $lvl = 20; } - elseif($dex < 632500) { $lvl = 21; } - elseif($dex < 690000) { $lvl = 22; } - elseif($dex < 750000) { $lvl = 23; } - elseif($dex < 812500) { $lvl = 24; } - elseif($dex < 877500) { $lvl = 25; } - elseif($dex < 945000) { $lvl = 26; } - elseif($dex < 1015000) { $lvl = 27; } - elseif($dex < 1087500) { $lvl = 28; } - elseif($dex < 1162500) { $lvl = 29; } - else { $lvl = 30; } - return $lvl; -} - -function getDexLog($dex1, $dex2) { - $ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1; - return $ratio; -} - -function getGenDex($general, $type) { - $type = floor($type / 10) * 10; - return $general["dex{$type}"]; -} - -function addGenDex($connect, $no, $type, $exp) { - $type = floor($type / 10) * 10; - $dexType = "dex{$type}"; - if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율 - elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율 - - $query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function getWeapName($weap) { - switch($weap) { - case 0: $weapname = "-"; break; - case 1: $weapname = "단도(+1)"; break; - case 2: $weapname = "단궁(+2)"; break; - case 3: $weapname = "단극(+3)"; break; - case 4: $weapname = "목검(+4)"; break; - case 5: $weapname = "죽창(+5)"; break; - case 6: $weapname = "소부(+6)"; break; - - case 7: $weapname = "동추(+7)"; break; - case 8: $weapname = "철편(+7)"; break; - case 9: $weapname = "철쇄(+7)"; break; - case 10: $weapname = "맥궁(+7)"; break; - case 11: $weapname = "유성추(+8)"; break; - case 12: $weapname = "철질여골(+8)"; break; - case 13: $weapname = "쌍철극(+9)"; break; - case 14: $weapname = "동호비궁(+9)"; break; - case 15: $weapname = "삼첨도(+10)"; break; - case 16: $weapname = "대부(+10)"; break; - case 17: $weapname = "고정도(+11)"; break; - case 18: $weapname = "이광궁(+11)"; break; - case 19: $weapname = "철척사모(+12)"; break; - case 20: $weapname = "칠성검(+12)"; break; - case 21: $weapname = "사모(+13)"; break; - case 22: $weapname = "양유기궁(+13)"; break; - case 23: $weapname = "언월도(+14)"; break; - case 24: $weapname = "방천화극(+14)"; break; - case 25: $weapname = "청홍검(+15)"; break; - case 26: $weapname = "의천검(+15)"; break; - } - return $weapname; -} - -function getWeapEff($weap) { - switch($weap) { - case 7: $weap = 7; break; - case 8: $weap = 7; break; - case 9: $weap = 7; break; - case 10: $weap = 7; break; - case 11: $weap = 8; break; - case 12: $weap = 8; break; - case 13: $weap = 9; break; - case 14: $weap = 9; break; - case 15: $weap = 10; break; - case 16: $weap = 10; break; - case 17: $weap = 11; break; - case 18: $weap = 11; break; - case 19: $weap = 12; break; - case 20: $weap = 12; break; - case 21: $weap = 13; break; - case 22: $weap = 13; break; - case 23: $weap = 14; break; - case 24: $weap = 14; break; - case 25: $weap = 15; break; - case 26: $weap = 15; break; - default: break; - } - return $weap; -} - -function getBookName($book) { - switch($book) { - case 0: $bookname = "-"; break; - case 1: $bookname = "효경전(+1)"; break; - case 2: $bookname = "회남자(+2)"; break; - case 3: $bookname = "변도론(+3)"; break; - case 4: $bookname = "건상역주(+4)"; break; - case 5: $bookname = "여씨춘추(+5)"; break; - case 6: $bookname = "사민월령(+6)"; break; - - case 7: $bookname = "위료자(+7)"; break; - case 8: $bookname = "사마법(+7)"; break; - case 9: $bookname = "한서(+7)"; break; - case 10: $bookname = "논어(+7)"; break; - case 11: $bookname = "전론(+8)"; break; - case 12: $bookname = "사기(+8)"; break; - case 13: $bookname = "장자(+9)"; break; - case 14: $bookname = "역경(+9)"; break; - case 15: $bookname = "시경(+10)"; break; - case 16: $bookname = "구국론(+10)"; break; - case 17: $bookname = "상군서(+11)"; break; - case 18: $bookname = "춘추전(+11)"; break; - case 19: $bookname = "산해경(+12)"; break; - case 20: $bookname = "맹덕신서(+12)"; break; - case 21: $bookname = "관자(+13)"; break; - case 22: $bookname = "병법24편(+13)"; break; - case 23: $bookname = "한비자(+14)"; break; - case 24: $bookname = "오자병법(+14)"; break; - case 25: $bookname = "노자(+15)"; break; - case 26: $bookname = "손자병법(+15)"; break; - } - return $bookname; -} - -function getBookEff($book) { - switch($book) { - case 7: $book = 7; break; - case 8: $book = 7; break; - case 9: $book = 7; break; - case 10: $book = 7; break; - case 11: $book = 8; break; - case 12: $book = 8; break; - case 13: $book = 9; break; - case 14: $book = 9; break; - case 15: $book = 10; break; - case 16: $book = 10; break; - case 17: $book = 11; break; - case 18: $book = 11; break; - case 19: $book = 12; break; - case 20: $book = 12; break; - case 21: $book = 13; break; - case 22: $book = 13; break; - case 23: $book = 14; break; - case 24: $book = 14; break; - case 25: $book = 15; break; - case 26: $book = 15; break; - default: break; - } - return $book; -} - -function getHorseName($horse) { - switch($horse) { - case 0: $horsename = "-"; break; - case 1: $horsename = "노기(+1)"; break; - case 2: $horsename = "조랑(+2)"; break; - case 3: $horsename = "노새(+3)"; break; - case 4: $horsename = "나귀(+4)"; break; - case 5: $horsename = "갈색마(+5)"; break; - case 6: $horsename = "흑색마(+6)"; break; - - case 7: $horsename = "백마(+7)"; break; - case 8: $horsename = "백마(+7)"; break; - case 9: $horsename = "기주마(+7)"; break; - case 10: $horsename = "기주마(+7)"; break; - case 11: $horsename = "양주마(+8)"; break; - case 12: $horsename = "양주마(+8)"; break; - case 13: $horsename = "과하마(+9)"; break; - case 14: $horsename = "과하마(+9)"; break; - case 15: $horsename = "대완마(+10)"; break; - case 16: $horsename = "대완마(+10)"; break; - case 17: $horsename = "서량마(+11)"; break; - case 18: $horsename = "서량마(+11)"; break; - case 19: $horsename = "사륜거(+12)"; break; - case 20: $horsename = "사륜거(+12)"; break; - case 21: $horsename = "절영(+13)"; break; - case 22: $horsename = "적로(+13)"; break; - case 23: $horsename = "적란마(+14)"; break; - case 24: $horsename = "조황비전(+14)"; break; - case 25: $horsename = "한혈마(+15)"; break; - case 26: $horsename = "적토마(+15)"; break; - } - return $horsename; -} - -function getHorseEff($horse) { - switch($horse) { - case 7: $horse = 7; break; - case 8: $horse = 7; break; - case 9: $horse = 7; break; - case 10: $horse = 7; break; - case 11: $horse = 8; break; - case 12: $horse = 8; break; - case 13: $horse = 9; break; - case 14: $horse = 9; break; - case 15: $horse = 10; break; - case 16: $horse = 10; break; - case 17: $horse = 11; break; - case 18: $horse = 11; break; - case 19: $horse = 12; break; - case 20: $horse = 12; break; - case 21: $horse = 13; break; - case 22: $horse = 13; break; - case 23: $horse = 14; break; - case 24: $horse = 14; break; - case 25: $horse = 15; break; - case 26: $horse = 15; break; - default: break; - } - return $horse; -} - -function getItemName($item) { - switch($item) { - case 0: $itemname = "-"; break; - case 1: $itemname = "환약(치료)"; break; - case 2: $itemname = "수극(저격)"; break; - case 3: $itemname = "탁주(사기)"; break; - case 4: $itemname = "청주(훈련)"; break; - case 5: $itemname = "이추(계략)"; break; - case 6: $itemname = "향낭(계략)"; break; - - case 7: $itemname = "오석산(치료)"; break; - case 8: $itemname = "무후행군(치료)"; break; - case 9: $itemname = "도소연명(치료)"; break; - case 10: $itemname = "칠엽청점(치료)"; break; - case 11: $itemname = "정력견혈(치료)"; break; - case 12: $itemname = "과실주(훈련)"; break; - case 13: $itemname = "이강주(훈련)"; break; - case 14: $itemname = "의적주(사기)"; break; - case 15: $itemname = "두강주(사기)"; break; - case 16: $itemname = "보령압주(사기)"; break; - case 17: $itemname = "철벽서(훈련)"; break; - case 18: $itemname = "단결도(훈련)"; break; - case 19: $itemname = "춘화첩(사기)"; break; - case 20: $itemname = "초선화(사기)"; break; - case 21: $itemname = "육도(계략)"; break; - case 22: $itemname = "삼략(계략)"; break; - case 23: $itemname = "청낭서(의술)"; break; - case 24: $itemname = "태평청령(의술)"; break; - case 25: $itemname = "태평요술(회피)"; break; - case 26: $itemname = "둔갑천서(회피)"; break; - } - return $itemname; -} - -function getItemCost2($weap) { - switch($weap) { - case 0: $weapcost = 0; break; - case 1: $weapcost = 100; break; - case 2: $weapcost = 1000; break; - case 3: $weapcost = 1000; break; - case 4: $weapcost = 1000; break; - case 5: $weapcost = 1000; break; - case 6: $weapcost = 3000; break; - default: $weapcost = 200; break; - } - return $weapcost; -} - -function getItemCost($weap) { - switch($weap) { - case 0: $weapcost = 0; break; - case 1: $weapcost = 1000; break; - case 2: $weapcost = 3000; break; - case 3: $weapcost = 6000; break; - case 4: $weapcost = 10000; break; - case 5: $weapcost = 15000; break; - case 6: $weapcost = 21000; break; - default: $weapcost = 200; break; - } - return $weapcost; -} - -function getTurn($connect, $general, $type, $font=1) { - $turn[0] = $general[turn0]; - - if($type >= 1) { - $turn[1] = $general[turn1]; - $turn[2] = $general[turn2]; - $turn[3] = $general[turn3]; - $turn[4] = $general[turn4]; - $turn[5] = $general[turn5]; - } - if($type >= 2) { - $turn[6] = $general[turn6]; - $turn[7] = $general[turn7]; - $turn[8] = $general[turn8]; - $turn[9] = $general[turn9]; - $turn[10] = $general[turn10]; - $turn[11] = $general[turn11]; - $turn[12] = $general[turn12]; - $turn[13] = $general[turn13]; - $turn[14] = $general[turn14]; - $turn[15] = $general[turn15]; - $turn[16] = $general[turn16]; - $turn[17] = $general[turn17]; - $turn[18] = $general[turn18]; - $turn[19] = $general[turn19]; - $turn[20] = $general[turn20]; - $turn[21] = $general[turn21]; - $turn[22] = $general[turn22]; - $turn[23] = $general[turn23]; - } - - if($type == 0) { $count = 1; } - elseif($type == 1) { $count = 5; } - elseif($type == 2) { $count = 24; } - - for($i=0; $i < $count; $i++) { - $command = DecodeCommand($turn[$i]); - - switch($command[0]) { - case 0: $str[$i] = "휴식"; break; //휴식 - case 1: $str[$i] = "농지 개간"; break; //농업 - case 2: $str[$i] = "상업 투자"; break; //상업 - case 3: $str[$i] = "기술 연구"; break; //기술 - case 4: $str[$i] = "주민 선정"; break; //선정 - case 5: $str[$i] = "수비 강화"; break; //수비 - case 6: $str[$i] = "성벽 보수"; break; //성벽 - case 7: $str[$i] = "정착 장려"; break; //정착 장려 - case 8: $str[$i] = "치안 강화"; break; //치안 - case 9: $str[$i] = "물자 조달"; break; //조달 - - case 11: //징병 - $third = getTypename($command[2]); - $double = $command[1]; - $str[$i] = "【{$third}】 {$double}00명 징병"; - break; - case 12: //모병 - $third = getTypename($command[2]); - $double = $command[1]; - $str[$i] = "【{$third}】 {$double}00명 모병"; - break; - case 13: //훈련 - $str[$i] = "훈련"; - break; - case 14: //사기진작 - $str[$i] = "사기진작"; - break; - case 15: //전투태세 - $str[$i] = "전투태세"; - break; - case 16: //전쟁 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 출병"; - break; - case 17: //소집해제 - $str[$i] = "소집 해제"; - break; - - case 21: //이동 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 이동"; - break; - case 22: //등용 - $double = $command[1]; - - $query = "select name from general where no='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $str[$i] = "【{$general[name]}】(을)를 등용"; - break; - case 25: //임관 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if(!$nation[name]) { $nation[name] = '????'; } - - $str[$i] = "【{$nation[name]}】(으)로 임관"; - break; - case 26: //집합 - $str[$i] = "집합"; - break; - case 28: //귀환 - $str[$i] = "담당 도시로 귀환"; - break; - case 29: //인재탐색 - $str[$i] = "인재 탐색"; - break; - case 30: //강행 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 강행"; - break; - - case 31: //첩보 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 첩보 실행"; - break; - case 32: //화계 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 화계 실행"; - break; - case 33: //탈취 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 탈취 실행"; - break; - case 34: //파괴 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 파괴 실행"; - break; - case 35: //선동 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 선동 실행"; - break; - case 36: //기습 - $double = $command[1]; - $city= getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 기습 실행"; - break; - - case 41: //단련 - $str[$i] = "숙련도를 단련"; - break; - case 42: //견문 - $str[$i] = "견문"; - break; - case 43: //증여 - $fourth = $command[3]; - $third = $command[2]; - $double = $command[1]; - - $query = "select name from general where no='$third'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 증여"; } - else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 증여"; } - break; - case 44: //헌납 - $third = $command[2]; - $double = $command[1]; - - if($third == 1) { $str[$i] = "금 {$double}00을 헌납"; } - else { $str[$i] = "쌀 {$double}00을 헌납"; } - break; - case 45: //하야 - $str[$i] = "하야"; - break; - case 46: //건국 - $query = "select makenation from general where no='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $str[$i] = "【{$general[makenation]}】(을)를 건국"; - break; - case 47: //방랑 - $str[$i] = "방랑"; - break; - case 48: //장비 구입 - $double = $command[1]; - if($double == 0) { - $str[$i] = "무기를 판매"; - } elseif($double == 100) { - $str[$i] = "서적을 판매"; - } elseif($double == 200) { - $str[$i] = "명마를 판매"; - } elseif($double == 300) { - $str[$i] = "도구를 판매"; - } elseif($double < 100) { - $str[$i] = "【".getWeapName($double)."】(을)를 구입"; - } elseif($double < 200) { - $str[$i] = "【".getBookName($double-100)."】(을)를 구입"; - } elseif($double < 300) { - $str[$i] = "【".getHorseName($double-200)."】(을)를 구입"; - } elseif($double < 400) { - $str[$i] = "【".getItemName($double-300)."】(을)를 구입"; - } - break; - case 49: //군량 매매 - $third = $command[2]; - $double = $command[1]; - - if($third == 1) { $str[$i] = "군량 {$double}00을 판매"; } - else { $str[$i] = "군량 {$double}00을 구입"; } - break; - case 50: //요양 - $str[$i] = "요양"; - break; - - case 54: //선양 - $double = $command[1]; - - $query = "select name from general where no='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $str[$i] = "【{$general[name]}】에게 선양"; - break; - case 55: //거병 - $str[$i] = "방랑군 결성"; - break; - case 56: //해산 - $str[$i] = "방랑군 해산"; - break; - case 57: //모반 시도 - $str[$i] = "모반 시도"; - break; - - default: - $str[$i] = "????"; - break; - } - } - - if($font == 1) { - for($i=0; $i < count($str); $i++) { - $str[$i] = getFont($str[$i]); - } - } - return $str; -} - -function getCoreTurn($connect, $nation, $level) { - $turn[0] = $nation["l{$level}turn0"]; - $turn[1] = $nation["l{$level}turn1"]; - $turn[2] = $nation["l{$level}turn2"]; - $turn[3] = $nation["l{$level}turn3"]; - $turn[4] = $nation["l{$level}turn4"]; - $turn[5] = $nation["l{$level}turn5"]; - $turn[6] = $nation["l{$level}turn6"]; - $turn[7] = $nation["l{$level}turn7"]; - $turn[8] = $nation["l{$level}turn8"]; - $turn[9] = $nation["l{$level}turn9"]; - $turn[10] = $nation["l{$level}turn10"]; - $turn[11] = $nation["l{$level}turn11"]; - - $count = 12; - for($i=0; $i < $count; $i++) { - $command = DecodeCommand($turn[$i]); - - switch($command[0]) { - case 99: //휴식 - $str[$i] = "휴식"; - break; - case 23: //포상 - $fourth = $command[3]; - $third = $command[2]; - $double = $command[1]; - - $query = "select name from general where no='$third'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게 금 {$double}00을 포상"; } - else { $str[$i] = "【{$general[name]}】에게 쌀 {$double}00을 포상"; } - break; - case 24: //몰수 - $fourth = $command[3]; - $third = $command[2]; - $double = $command[1]; - - $query = "select name from general where no='$third'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($fourth == 1) { $str[$i] = "【{$general[name]}】에게서 금 {$double}00을 몰수"; } - else { $str[$i] = "【{$general[name]}】에게서 쌀 {$double}00을 몰수"; } - break; - case 27: //발령 - $third = $command[2]; - $double = $command[1]; - - $query = "select name from general where no='$third'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $city = getCity($connect, $double, "name"); - - $str[$i] = "【{$general[name]}】【{$city[name]}】(으)로 발령"; - break; - case 51: //항복권고 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에게 항복 권고"; - break; - case 52: //원조 - $fourth = $command[3]; - $third = $command[2]; - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $fourth *= 1000; - $third *= 1000; - $str[$i] = "【{$nation[name]}】에게 국고 {$third} 병량 {$fourth} 원조"; - break; - case 53: //통합제의 - $query = "select makenation from general where level='$level' and nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 【{$general[makenation]}】(으)로 통합 제의"; - break; - case 61: //불가침제의 - $third = $command[2]; - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 {$third}년 불가침 제의"; - break; - case 62: //선전 포고 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 선전 포고"; - break; - case 63: //종전 제의 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 종전 제의"; - break; - case 64: //파기 제의 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 파기 제의"; - break; - case 65: //초토 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 초토화"; - break; - case 66: //천도 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(으)로 천도"; - break; - case 67: //증축 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 증축"; - break; - case 68: //감축 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 감축"; - break; - case 71: //필사즉생 - $str[$i] = "필사즉생"; - break; - case 72: //백성동원 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 백성동원"; - break; - case 73: //수몰 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】(을)를 수몰"; - break; - case 74: //허보 - $double = $command[1]; - $city = getCity($connect, $double, "name"); - $str[$i] = "【{$city[name]}】에 허보"; - break; - case 75: //피장파장 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 피장파장"; - break; - case 76: //의병모집 - $str[$i] = "의병모집"; - break; - case 77: //이호경식 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 이호경식"; - break; - case 78: //급습 - $double = $command[1]; - - $query = "select name from nation where nation='$double'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $str[$i] = "【{$nation[name]}】에 급습"; - break; - case 81: //국기변경 - $double = $command[1]; - $colors = GetNationColors(); - $color = $colors[$double]; - - $str[$i] = "【국기】를 변경"; - break; - default: - $str[$i] = "????"; - break; - } - } - - for($i=0; $i < count($str); $i++) { - $str[$i] = getFont($str[$i]); - } - - return $str; -} - -function turnTable() { - echo " - -"; -} - -function CoreTurnTable() { - echo " - -"; -} - -function cityInfo($connect) { - global $_basecolor, $_basecolor2, $images; - - $query = "select no,city,skin from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - // 도시 정보 - $city = getCity($connect, $me[city]); - - $query = "select name,color from nation where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $pop = $city[pop] / $city[pop2] * 100; - $rate = $city[rate]; - $agri = $city[agri] / $city[agri2] * 100; - $comm = $city[comm] / $city[comm2] * 100; - $secu = $city[secu] / $city[secu2] * 100; - $def = $city[def] / $city[def2] * 100; - $wall = $city[wall] / $city[wall2] * 100; - if($city[trade] == 0) { - $trade = 0; - $tradeStr = "상인없음"; - } else { - $trade = ($city[trade]-95) * 10; - $tradeStr = $city[trade] . "%"; - } - - if($nation[color] == "" || $me[skin] < 1) { $nation[color] = "000000"; } - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
【 ".getRegion($city[region])." | ".getCityLevel($city[level])." 】 $city[name]
"; - - if($city[nation] == 0) { - echo "공 백 지"; - } else { - echo "지배 국가 【 {$nation[name]} 】"; - } - - if($city[gen1] > 0) { - $query = "select name from general where no='$city[gen1]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($result); - } else { - $gen1[name] = '-'; - } - - if($city[gen2] > 0) { - $query = "select name from general where no='$city[gen2]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($result); - } else { - $gen2[name] = '-'; - } - - if($city[gen3] > 0) { - $query = "select name from general where no='$city[gen3]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen3 = MYDB_fetch_array($result); - } else { - $gen3[name] = '-'; - } - - echo " -
주민".bar($pop, $me[skin])."민심".bar($rate, $me[skin])."태수{$gen1[name]}
{$city[pop]}/{$city[pop2]}{$city[rate]}
농업".bar($agri, $me[skin])."상업".bar($comm, $me[skin])."치안".bar($secu, $me[skin])."군사{$gen2[name]}
{$city[agri]}/{$city[agri2]}{$city[comm]}/{$city[comm2]}{$city[secu]}/{$city[secu2]}
수비".bar($def, $me[skin])."성벽".bar($wall, $me[skin])."시세".bar($trade, $me[skin])."시중{$gen3[name]}
{$city[def]}/{$city[def2]}{$city[wall]}/{$city[wall2]}{$tradeStr}
-"; -} - -function myNationInfo($connect) { - global $_basecolor, $_basecolor2, $images; - - $query = "select startyear,year from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select skin,no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,tricklimit,surlimit,tech,totaltech,level,type from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select COUNT(*) as cnt, SUM(pop) as totpop, SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select COUNT(*) as cnt, SUM(crew) as totcrew,SUM(leader)*100 as maxcrew from general where nation='$nation[nation]'"; // 장수 목록 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name from general where nation='$nation[nation]' and level='12'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $level12 = MYDB_fetch_array($genresult); - - $query = "select name from general where nation='$nation[nation]' and level='11'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $level11 = MYDB_fetch_array($genresult); - - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
【재 야】"; } - else { echo "style=font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } - } else { - if($me[nation] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13;>【재 야】"; } - else { echo "style=color:".newColor($nation[color]).";background-color:{$nation[color]};font-weight:bold;font-size:13;>국가【 {$nation[name]} 】"; } - } - - echo " -
성 향".getNationType($nation[type])." (".getNationType2($nation[type], $me[skin]).")
".getLevel(12, $nation[level])."";echo $level12==''?"-":"$level12[name]"; echo "".getLevel(11, $nation[level])."";echo $level11==''?"-":"$level11[name]"; echo "
총주민";echo $me[nation]==0?"해당 없음":"$city[totpop]/$city[maxpop]";echo "총병사";echo $me[nation]==0?"해당 없음":"$general[totcrew]/$general[maxcrew]"; echo "
국 고";echo $me[nation]==0?"해당 없음":"$nation[gold]";echo "병 량";echo $me[nation]==0?"해당 없음":"$nation[rice]";echo "
지급율"; - if($me[nation] == 0) { - echo "해당 없음"; - } else { - echo $nation[bill]==0?"0 %":"$nation[bill] %"; - } - echo " - 세 율"; - if($me[nation] == 0) { - echo "해당 없음"; - } else { - echo $nation[rate]==0?"0 %":"$nation[rate] %"; - } - - $techCall = getTechCall($nation[tech]); - - if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $nation[tech] = "{$nation[tech]}"; } - else { $nation[tech] = "{$nation[tech]}"; } - - $nation[tech] = "$techCall / $nation[tech]"; - - if($nation[tricklimit] != 0) { $nation[tricklimit] = "$nation[tricklimit]턴"; } - else { $nation[tricklimit] = "가 능"; } - - if($nation[surlimit] != 0) { $nation[surlimit] = "$nation[surlimit]턴"; } - else { $nation[surlimit] = "가 능"; } - - if($nation[scout] != 0) { $nation[scout] = "금 지"; } - else { $nation[scout] = "허 가"; } - - if($nation[war] != 0) { $nation[war] = "금 지"; } - else { $nation[war] = "허 가"; } - - if($me[skin] == 0) { - $nation[tech] = unfont($nation[tech]); - $nation[tricklimit] = unfont($nation[tricklimit]); - $nation[surlimit] = unfont($nation[surlimit]); - $nation[scout] = unfont($nation[scout]); - $nation[war] = unfont($nation[war]); - } - - echo " -
속 령";echo $me[nation]==0?"-":"$city[cnt]"; echo "장 수";echo $me[nation]==0?"-":"$general[cnt]"; echo "
국 력$nation[power]기술력";echo $me[nation]==0?"-":"$nation[tech]"; echo "
전 략$nation[tricklimit]외 교$nation[surlimit]
임 관$nation[scout]전 쟁$nation[war]
-"; -} - -function addCommand($typename, $value, $valid = 1, $color=0) { - if($valid == 1) { - switch($color) { - case 0: - echo " - "; - break; - case 1: - echo " - "; - break; - case 2: - echo " - "; - break; - } - } else { - echo " - "; - } -} - -function commandGroup($typename, $type=0) { - if($type == 0) { - echo " - "; - } else { - echo " - "; - } -} - -function commandTable($connect) { - $query = "select startyear,year,develcost,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $troop = getTroop($connect, $me[troop]); - $city = getCity($connect, $me[city]); - - $query = "select nation from nation"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - $query = "select city from city where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - $query = "select no from general where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - $query = "select type,level from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $develcost = $admin[develcost]; - $develcostA = $admin[develcost]; $colorA = 0; - $develcostB = $admin[develcost]; $colorB = 0; - $develcostC = $admin[develcost]; $colorC = 0; - $develcostD = $admin[develcost]; $colorD = 0; - $develcostE = $admin[develcost]*2; $colorE = 0; - $develcost3 = $admin[develcost]*3; - $develcost5 = $admin[develcost]*5; - - // 농상 국가보정 - if($nation[type] == 2 || $nation[type] == 12) { $develcostA *= 0.8; $colorA = 1; } - if($nation[type] == 8 || $nation[type] == 11) { $develcostA *= 1.2; $colorA = 2; } - // 기술 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $develcostB *= 0.8; $colorB = 1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $develcostB *= 1.2; $colorB = 2; } - // 수성 국가보정 - if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $develcostC *= 0.8; $colorC = 1; } - if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $develcostC *= 1.2; $colorC = 2; } - // 치안 국가보정 - if($nation[type] == 1 || $nation[type] == 4) { $develcostD *= 0.8; $colorD = 1; } - if($nation[type] == 6 || $nation[type] == 9) { $develcostD *= 1.2; $colorD = 2; } - // 민심,정착장려 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $develcostE *= 0.8; $colorE = 1; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $develcostE *= 1.2; $colorE = 2; } - - $develcostA = round($develcostA); - $develcostB = round($develcostB); - $develcostC = round($develcostC); - $develcostD = round($develcostD); - $develcostE = round($develcostE); - - echo " - -"; -} - -function CoreCommandTable($connect) { - $query = "select develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,nation,city,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select level,colset from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select no from general where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $query = "select supply from city where city='$me[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - if($nation[level] > 0) { $valid = 1; } - else { $valid = 0; } - if($city[supply] == 0) { $valid = 0; } - - echo " - -"; -} - -function commandButton($connect) { - global $_basecolor, $_basecolor2; - - $query = "select skin,no,nation,level,belong from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,color,secretlimit from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[color] == "" || $me[skin] < 1) { $nation[color] = "000000"; } - - echo " - - "; - - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 5) { echo ""; } - else { echo ""; } - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } - else { echo ""; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } - else { echo ""; } - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - echo " - -
【회 의 실】【기 밀 실】【부대 편성】【인 사 부】【내 무 부】【사 령 부】【암 행 부】
"; - - echo " - - "; - - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 1) { echo ""; } - else { echo ""; } - if($me[level] >= 1) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - if($me[level] >= 2 || ($me[level] == 1 && $me[belong] >= $nation[secretlimit])) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - echo " - -
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; -} - -function myInfo($connect) { - $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - generalInfo($connect, $me[no], $me[skin]); -} - -function generalInfo($connect, $no, $skin) { - global $_basecolor, $_basecolor2, $image, $images; - - $query = "select img from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select skin from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select block,userlevel,no,name,picture,imgsvr,injury,nation,city,troop,leader,leader2,power,power2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select nation,level,color from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - if($lbonus > 0) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; - } - - $troop = getTroop($connect, $general[troop]); - - $level = getLevel($general[level], $nation[level]); - if($general[level] == 2) { - $query = "select name from city where gen3='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; - } elseif($general[level] == 3) { - $query = "select name from city where gen2='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; - } elseif($general[level] == 4) { - $query = "select name from city where gen1='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - $level = $city[name]." ".$level; - } - $call = getCall($general[leader], $general[power], $general[intel]); - $typename = getTypename($general[crewtype]); - $weapname = getWeapName($general[weap]); - $bookname = getBookName($general[book]); - $horsename = getHorseName($general[horse]); - $itemname = getItemName($general[item]); - if($general[injury] > 0) { - $leader = floor($general[leader] * (100 - $general[injury])/100); - $power = floor($general[power] * (100 - $general[injury])/100); - $intel = floor($general[intel] * (100 - $general[injury])/100); - } else { - $leader = $general[leader]; - $power = $general[power]; - $intel = $general[intel]; - } - if($general[injury] > 60) { $color = ""; $injury = "위독"; } - elseif($general[injury] > 40) { $color = ""; $injury = "심각"; } - elseif($general[injury] > 20) { $color = ""; $injury = "중상"; } - elseif($general[injury] > 0) { $color = ""; $injury = "경상"; } - else { $color = ""; $injury = "건강"; } - - $remaining = substr($general[turntime], 14, 2) - date('i'); - if($remaining < 0) { $remaining = 60 + $remaining; } - - if($general[userlevel] > 2) { $specUser = "특별"; } - else { $specUser = "일반"; } - if($general[block] > 0) { $specUser = "블럭"; } - $specUser = ''; - - if($nation[color] == "" || $skin < 1) { $nation[color] = "000000"; } - - if($general[age] < 60) { $general[age] = "$general[age] 세"; } - elseif($general[age] < 80) { $general[age] = "$general[age] 세"; } - else { $general[age] = "$general[age] 세"; } - - $general[connect] = round($general[connect] / 10, 0) * 10; - $special = $general[special] == 0 ? "{$general[specage]}세" : "".getGenSpecial($general[special]).""; - $special2 = $general[special2] == 0 ? "{$general[specage2]}세" : "".getGenSpecial($general[special2]).""; - - switch($general[personal]) { - case 2: case 4: - $atmos = "{$general[atmos]} (+5)"; break; - case 0: case 9: case 10: - $atmos = "{$general[atmos]} (-5)"; break; - default: - $atmos = "$general[atmos]"; break; - } - switch($general[personal]) { - case 3: case 5: - $train = "{$general[train]} (+5)"; break; - case 1: case 8: case 10: - $train = "{$general[train]} (-5)"; break; - default: - $train = "$general[train]"; break; - } - if($general[troop] == 0) { $troop[name] = "-"; } - if($general[mode] == 2) { $general[mode] = "수비 함(훈사80)"; } - elseif($general[mode] == 1) { $general[mode] = "수비 함(훈사60)"; } - else { $general[mode] = "수비 안함"; } - - if($skin == 0) { - $general[age] = unfont($general[age]); - $special = unfont($special); - $special2 = unfont($special2); - $atmos = unfont($atmos); - $train = unfont($train); - $general[mode] = unfont($general[mode]); - } - - $weapImage = "{$images}/weap{$general[crewtype]}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; }; - $imageTemp = GetImageURL($general[imgsvr]); - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0?" background={$imageTemp}/{$general[picture]}":""; echo "> {$specUser} {$general[name]} 【 {$level} | {$call} | {$color}{$injury} 】 ".substr($general[turntime], 11)."
통솔 {$color}{$leader}{$lbonus} ".bar(expStatus($general[leader2]), $skin, 20)."무력 {$color}{$power} ".bar(expStatus($general[power2]), $skin, 20)."지력 {$color}{$intel} ".bar(expStatus($general[intel2]), $skin, 20)."
명마$horsename무기$weapname서적$bookname
0?" background={$weapImage}":""; echo "> 자금$general[gold]군량$general[rice]도구$itemname
병종$typename병사$general[crew]성격".getGenChar($general[personal])."
훈련$train사기$atmos특기$special / $special2
Lv {$general[explevel]} ".bar(getLevelPer($general[experience], $general[explevel]), $skin, 20)."연령$general[age]
수비$general[mode]삭턴$general[killturn] 턴실행$remaining 분 남음
부대$troop[name]벌점".getConnect($general[connect])." $general[connect]($general[con])
"; -} - -function myInfo2($connect) { - $query = "select no,skin from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - generalInfo2($connect, $me[no], $me[skin]); -} - -function generalInfo2($connect, $no, $skin) { - global $_basecolor, $_basecolor2, $image, $images, $_dexLimit; - - $query = "select personal,experience,dedication,firenum,warnum,killnum,deathnum,killcrew,deathcrew,belong,killnum*100/warnum as winrate,killcrew/deathcrew*100 as killrate,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $general[winrate] = round($general[winrate], 2); - $general[killrate] = round($general[killrate], 2); - - switch($general[personal]) { - case 0: case 1; case 6: - $experience = "".getHonor($general[experience])." ($general[experience])"; break; - case 4: case 5: case 7: case 10: - $experience = "".getHonor($general[experience])." ($general[experience])"; break; - default: - $experience = getHonor($general[experience])." ($general[experience])"; break; - } - switch($general[personal]) { - case 10: - $dedication = "".getDed($general[dedication])." ($general[dedication])"; break; - default: - $dedication = getDed($general[dedication])." ($general[dedication])"; break; - } - - if($skin == 0) { - $experience = unfont($experience); - $dedication = unfont($dedication); - } - - $dex0 = $general[dex0] / $_dexLimit * 100; - $dex10 = $general[dex10] / $_dexLimit * 100; - $dex20 = $general[dex20] / $_dexLimit * 100; - $dex30 = $general[dex30] / $_dexLimit * 100; - $dex40 = $general[dex40] / $_dexLimit * 100; - - if($dex0 > 100) { $dex0 = 100; } - if($dex10 > 100) { $dex10 = 100; } - if($dex20 > 100) { $dex20 = 100; } - if($dex30 > 100) { $dex30 = 100; } - if($dex40 > 100) { $dex40 = 100; } - - $general[dex0] = getDexCall($general[dex0]); - $general[dex10] = getDexCall($general[dex10]); - $general[dex20] = getDexCall($general[dex20]); - $general[dex30] = getDexCall($general[dex30]); - $general[dex40] = getDexCall($general[dex40]); - - echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
추 가 정 보
명성$experience계급$dedication
전투$general[warnum]계략$general[firenum]사관$general[belong]년
승률$general[winrate] %승리$general[killnum]패배$general[deathnum]
살상률$general[killrate] %사살$general[killcrew]피살$general[deathcrew]
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
숙 련 도
보병  $general[dex0]".bar($dex0, $skin, 16)."
궁병  $general[dex10]".bar($dex10, $skin, 16)."
기병  $general[dex20]".bar($dex20, $skin, 16)."
귀병  $general[dex30]".bar($dex30, $skin, 16)."
차병  $general[dex40]".bar($dex40, $skin, 16)."
"; -} - -function pushTrickLog($connect, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/_tricklog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushProcessLog($connect, $log) { - $size = count($log); - if($size > 0) { - $date = date('Y_m_d'); - $fp = fopen("logs/_{$date}_processlog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function delStepLog() { - $date = date('Y_m_d'); - @unlink("logs/_{$date}_steplog.txt"); -} - -function pushStepLog($log) { - $date = date('Y_m_d'); - $fp = fopen("logs/_{$date}_steplog.txt", "a"); - fwrite($fp, $log."\r\n"); - fclose($fp); -} - -function pushLockLog($connect, $log) { - $size = count($log); - if($size > 0) { - $date = date('Y_m_d'); - $fp = fopen("logs/_{$date}_locklog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushAdminLog($connect, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/_adminlog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushAuctionLog($connect, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/_auctionlog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushGenLog($general, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/gen{$general[no]}.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushBatRes($general, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/batres{$general[no]}.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushBatLog($general, $log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/batlog{$general[no]}.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushAllLog($log) { - $size = count($log); - if($size > 0) { - $fp = fopen("logs/_alllog.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); - } -} - -function pushHistory($connect, $history) { - $size = count($history); - if($size > 0) { - $fp = fopen("logs/_history.txt", "a"); - for($i=0; $i < $size; $i++) { - fwrite($fp, $history[$i]."\r\n"); - } - fclose($fp); - } -} - -function TrickLog($count, $skin) { - $fp = @fopen("logs/_tricklog.txt", "r"); - @fseek($fp, -$count*150, SEEK_END); - $file = @fread($fp, $count*150); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function AllLog($count, $skin) { - $fp = @fopen("logs/_alllog.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function AuctionLog($count, $skin) { - $fp = @fopen("logs/_auctionlog.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function History($count, $skin) { - $fp = @fopen("logs/_history.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function MyLog($no, $count, $skin) { - $fp = @fopen("logs/gen{$no}.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function MyBatRes($no, $count, $skin) { - $fp = @fopen("logs/batres{$no}.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function MyBatLog($no, $count, $skin) { - $fp = @fopen("logs/batlog{$no}.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } - echo $str; -} - -function MyHistory($connect, $no, $skin) { - $query = "select history from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - echo ConvertLog($general[history], $skin); -} - -function addHistory($connect, $me, $history) { - $me[history] = "{$history}
{$me[history]}"; - $query = "update general set history='$me[history]' where no='$me[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - return $me; -} - -function addNationHistory($connect, $nation, $history) { - $nation[history] = "{$nation[history]}{$history}
"; - $query = "update nation set history='$nation[history]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - return $nation; -} - -function adminMsg($connect, $skin=1) { - $query = "select msg from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - echo "운영자 메세지 : "; - echo $admin[msg].""; -} - -function allButton($connect) { - global $_basecolor2; - $query = "select npcmode from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - if($admin[npcmode] == 1) { - $site = "a_npcList.php"; - $call = "빙의일람"; - } else { - $site = "a_vote.php"; - $call = "설문조사"; - } - - echo " - - - - - - - - - - - - - - - - - - - - - -
"; -} - -function onlinenum($connect) { - $query = "select online from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - return $game[online]; -} - -function onlinegen($connect) { - $onlinegen = ""; - if($_SESSION[p_nation] == 0) { - $query = "select onlinegen from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - - $onlinegen = $game[onlinegen]; - } else { - $query = "select onlinegen from nation where nation='$_SESSION[p_nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $onlinegen = $nation[onlinegen]; - } - return $onlinegen; -} - -function onlineNation($connect) { - $query = "select onlinenation from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - return $game[onlinenation]; -} - -function nationMsg($connect) { - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select msg from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - echo "".$nation[msg].""; -} - -function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select msg{$me[msgindex]}_who as reply,msg{$me[msgindex]}_type as type from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $reply = MYDB_fetch_array($result); - if($reply[type] % 100 == 9) { - $reply[reply] %= 10000; - $query = "select no,name from general where no={$reply[reply]}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } elseif($reply[type] % 100 == 10) { - $reply[reply] = floor($reply[reply]/10000); - $query = "select no,name from general where no={$reply[reply]}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } - - $query = "select nation,color,name from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - echo " - -"; -} - -function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { - $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function MsgMe($connect, $bg) { - $query = "select no,nation,msgindex, - msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, - msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, - msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, - msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when - from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $index = $me[msgindex]; - for($i=0; $i < 10; $i++) { - if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } - $index--; - if($index < 0) { $index = 9; } - } -} - -function MsgDip($connect, $bg) { - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[dip0]) { echo "\n"; DecodeMsg($connect, $nation[dip0], $nation[dip0_type], $nation[dip0_who], $nation[dip0_when], $bg, 0); } - if($nation[dip1]) { echo "\n"; DecodeMsg($connect, $nation[dip1], $nation[dip1_type], $nation[dip1_who], $nation[dip1_when], $bg, 1); } - if($nation[dip2]) { echo "\n"; DecodeMsg($connect, $nation[dip2], $nation[dip2_type], $nation[dip2_who], $nation[dip2_when], $bg, 2); } - if($nation[dip3]) { echo "\n"; DecodeMsg($connect, $nation[dip3], $nation[dip3_type], $nation[dip3_who], $nation[dip3_when], $bg, 3); } - if($nation[dip4]) { echo "\n"; DecodeMsg($connect, $nation[dip4], $nation[dip4_type], $nation[dip4_who], $nation[dip4_when], $bg, 4); } -} - -// type : xx,xx(불가침기간,타입) -// who : xxxx,xxxx(발신인, 수신인) -function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { - $query = "select skin,no,nation,name,picture,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 - // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 - // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 - $category = $type % 100; - $term = floor($type / 100); - $from = floor($who / 10000); - $to = $who % 10000; - - $query = "select name,picture,imgsvr,nation from general where no='$from'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndr = MYDB_fetch_array($result); - - if($sndr[nation] == 0) { - $sndrnation[name] = '재야'; - $sndrnation[color] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='$sndr[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndrnation = MYDB_fetch_array($result); - } - - switch($bg) { - case 2: - case 4: $bgcolor = "CC6600"; break; - } - - if($category == 6) { - $query = "select reserved from diplomacy where me='$sndr[nation]' and you='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], $sndr[name], $sndrnation[color], $msg, $date, $num, $from, $term, $me[level], $dip[reserved]); - } elseif($category <= 8) { - $query = "select name,color from nation where nation='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - - ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], $rcvrnation[name], $rcvrnation[color], $msg, $date, $num, $from, $term, $me[level]); - } elseif($category <= 11) { - $query = "select name,picture,nation from general where no='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvr = MYDB_fetch_array($result); - - if($rcvr[nation] == 0) { - $rcvrnation[name] = '재야'; - $rcvrnation[color] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='$rcvr[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - } - ShowMsg($me[skin], $bgcolor, $category, $sndr[picture], $sndr[imgsvr], "{$sndr[name]}:{$sndrnation[name]}▶", $sndrnation[color], "{$rcvr[name]}:{$rcvrnation[name]}", $rcvrnation[color], $msg, $date, $num, $from, $term); - } -} - -function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) { - if($nation == 0) { $nation = 0; } - if($fromcolor == "") { $fromcolor = "FFFFFF"; } - if($to == "") { $to = "재야"; } - if($tocolor == "") { $tocolor = "FFFFFF"; } - - $date = date('Y-m-d H:i:s'); - if($type == 1) { $file = "_all_msg.txt"; } - else { $file = "_nation_msg{$nation}.txt"; } - $fp = fopen("logs/{$file}", "a"); - //로그 파일에 기록 - $str = "{$type}|"._String::Fill($from,12," ")."|"._String::Fill($to,12," ")."|".$date."|".$msg."|".$fromcolor."|".$tocolor."|".$picture."|".$imgsvr; - fwrite($fp, "{$str}\r\n"); - fclose($fp); -} - -function MsgFile($skin, $bg, $nation=0, $level=0) { - switch($bg) { - case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; - case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; - } - - $fp = @fopen("logs/{$fl}", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $code = explode("\r\n",$file); - for($i=0; $i < $count; $i++) { - $msg = explode("|", $code[count($code)-2-$i]); - - $cnt = count($msg); - for($k=0; $k < $cnt; $k++) { $msg[$k] = trim($msg[$k]); } - - ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); - } -} - -function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { - if($msg == "") return; - - $msg = Tag2Code($msg); - - $site = ""; $form = ""; $form2 = ""; - if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { - $corebutton = " "; - } else { - $corebutton = " 【수락】【거절】"; - } - if($type == 6) { - $corebutton .= "
비고: {$note}"; - } - switch($type) { - case 1: $sign = ""; $corebutton = ""; break; - case 2: $sign = ""; $corebutton = ""; break; - case 3: $sign = ""; $corebutton = ""; break; - case 4: $sign = ""; $site = "d_surrender.php"; break; - case 5: $sign = ""; $site = "d_merge.php"; break; - case 6: $sign = ""; $site = "d_ally.php"; break; - case 7: $sign = ""; $site = "d_cease.php"; break; - case 8: $sign = ""; $site = "d_cancel.php"; break; - case 9: $sign = ""; $corebutton = ""; break; - case 10: $sign = ""; $corebutton = ""; break; - case 11: $sign = ""; $site = "d_scout.php"; break; - } - if($skin == 0) { - $bgcolor = "000000"; $picture = ""; - $naming = "[{$me}{$sign}{$you}]"; - } else { - $imageTemp = GetImageURL($imgsvr); - $naming = "[$me{$sign}$you]"; - $picture = ""; - } - if($site != "") { - $form = "
"; - $form2 = "
"; - } - if($num >= 0) { $num = ""; } - else { $num = ""; } - if($who > 0) { $who = ""; } - else { $who = ""; } - if($when > 0) { $when = ""; } - else { $when = ""; } - echo " - - - - $form - - $num - $who - $when - $form2 - -
$picture$naming<$date>
{$msg}{$corebutton}
- "; -} - -function msgprint($connect, $msg, $name, $picture, $imgsvr, $when, $num, $type) { - global $_basecolor2, $_basecolor4, $images; - - $message = explode("|", $msg); - $count = (count($message) - 2)/2; - $message[0] = Tag2Code($message[0]); - $message[1] = Tag2Code($message[1]); -// $message[0] = str_replace("\n", "
", $message[0]); -// $message[1] = str_replace("\n", "
", $message[1]); - - if($type == 0) { $board = "c_nationboard.php"; } - else { $board = "c_chiefboard.php"; } - - $imageTemp = GetImageURL($imgsvr); - echo " - - - - - - - - - - "; - for($i=0; $i < $count; $i++) { - $who = Tag2Code($message[2+$i*2]); - $reply = Tag2Code($message[3+$i*2]); - $query = "select name from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $regen = MYDB_fetch_array($result); - echo " - - - - "; - } - echo " - - - - - - -
$name$message[0]$when
$message[1]
$regen[name]$reply
댓글달기 - - - -
-
"; -} - -function banner() { - global $_version, $_banner, $_helper; - echo "$_version / $_banner
$_helper
"; -} - -function addTurn($date, $turnterm=1) { - $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); - - $year = $date[0].$date[1].$date[2].$date[3]; - $month = floor($date[5].$date[6]); - $day = $date[8].$date[9]; - $hour = $date[11].$date[12]; - $min = $date[14].$date[15]; - $sec = $date[17].$date[18]; - - //윤년계산 - if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } - - if($turnterm == 0) { $hour += 2; } - elseif($turnterm == 1) { $hour += 1; } - elseif($turnterm == 2) { $min += 30; } - elseif($turnterm == 3) { $min += 20; } - elseif($turnterm == 4) { $min += 10; } - elseif($turnterm == 5) { $min += 5; } - elseif($turnterm == 6) { $min += 2; } - elseif($turnterm == 7) { $min += 1; } - - if($min >= 60) { $min %= 60; $hour++; } - if($hour >= 24) { $hour %= 24; $day++; } - if($day > $lastday[$month]) { $month++; $day = 1; } - if($month >= 13) { $year++; $month = 1; } - - $month = _String::Fill2($month, 2, "0"); - $day = _String::Fill2($day, 2, "0"); - $hour = _String::Fill2($hour, 2, "0"); - $min = _String::Fill2($min, 2, "0"); - $sec = _String::Fill2($sec, 2, "0"); - - return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; -} - -function add12Turn($date, $turnterm=1) { - $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); - - $year = $date[0].$date[1].$date[2].$date[3]; - $month = floor($date[5].$date[6]); - $day = $date[8].$date[9]; - $hour = $date[11].$date[12]; - $min = $date[14].$date[15]; - $sec = $date[17].$date[18]; - - //윤년계산 - if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } - - if($turnterm == 0) { $day += 1; } - elseif($turnterm == 1) { $hour += 12; } - elseif($turnterm == 2) { $hour += 6; } - elseif($turnterm == 3) { $hour += 4; } - elseif($turnterm == 4) { $hour += 2; } - elseif($turnterm == 5) { $hour += 1; } - elseif($turnterm == 6) { $min += 24; } - elseif($turnterm == 7) { $min += 12; } - - if($min >= 60) { $min %= 60; $hour++; } - if($hour >= 24) { $hour %= 24; $day++; } - if($day > $lastday[$month]) { $month++; $day = 1; } - if($month >= 13) { $year++; $month = 1; } - - $month = _String::Fill2($month, 2, "0"); - $day = _String::Fill2($day, 2, "0"); - $hour = _String::Fill2($hour, 2, "0"); - $min = _String::Fill2($min, 2, "0"); - $sec = _String::Fill2($sec, 2, "0"); - - return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; -} - -function subTurn($date, $turnterm=1) { - $lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31); - - $year = $date[0].$date[1].$date[2].$date[3]; - $month = floor($date[5].$date[6]); - $day = $date[8].$date[9]; - $hour = $date[11].$date[12]; - $min = $date[14].$date[15]; - $sec = $date[17].$date[18]; - - if($turnterm == 0) { $hour -= 2; } - elseif($turnterm == 1) { $hour -= 1; } - elseif($turnterm == 2) { $min -= 30; } - elseif($turnterm == 3) { $min -= 20; } - elseif($turnterm == 4) { $min -= 10; } - elseif($turnterm == 5) { $min -= 5; } - elseif($turnterm == 6) { $min -= 2; } - elseif($turnterm == 7) { $min -= 1; } - - //윤년계산 - if((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) { $lastday[2] = 29; } - - if($min < 0) { $min = 60 + $min; $hour--; } - if($hour < 0) { $hour = 24 + $hour; $day--; } - if($day <= 0) { $month--; $day = $lastday[$month]; } - if($month <= 0) { $year--; $month = 12; } - - $year = _String::Fill2($year, 2, "0"); - $month = _String::Fill2($month, 2, "0"); - $day = _String::Fill2($day, 2, "0"); - $hour = _String::Fill2($hour, 2, "0"); - $min = _String::Fill2($min, 2, "0"); - $sec = _String::Fill2($sec, 2, "0"); - - return "{$year}-{$month}-{$day} {$hour}:{$min}:{$sec}"; -} - -function cutTurn($date, $turnterm=1) { - // 0123456789012345678 - // $date = "2000-01-01 00:00:00"; - // 0 : 120분, 1 : 60분, 2 : 30분, 3 : 10분, 4 : 5분 - switch($turnterm) { - case 0: - $hour = $date[11].$date[12]; - if($hour % 2 == 1) { $hour--; } - $date[11] = floor($hour / 10); - $date[12] = $hour % 10; - $date[14] = "0"; - $date[15] = "0"; - $date[17] = "0"; - $date[18] = "0"; - break; - case 1: - $date[14] = "0"; - $date[15] = "0"; - $date[17] = "0"; - $date[18] = "0"; - break; - case 2: - $min = $date[14].$date[15]; - if($min < 30) { $min = 0; } - else { $min = 30; } - $date[14] = floor($min / 10); - $date[15] = $min % 10; - $date[17] = "0"; - $date[18] = "0"; - break; - case 3: - $min = $date[14].$date[15]; - if($min < 20) { $min = 0; } - elseif($min < 40) { $min = 20; } - else { $min = 40; } - $date[14] = floor($min / 10); - $date[15] = $min % 10; - $date[17] = "0"; - $date[18] = "0"; - break; - case 4: - $min = $date[14].$date[15]; - if($min < 10) { $min = 0; } - elseif($min < 20) { $min = 10; } - elseif($min < 30) { $min = 20; } - elseif($min < 40) { $min = 30; } - elseif($min < 50) { $min = 40; } - else { $min = 50; } - $date[14] = floor($min / 10); - $date[15] = $min % 10; - $date[17] = "0"; - $date[18] = "0"; - break; - case 5: - $min = $date[14].$date[15]; - if($min < 5) { $min = 0; } - elseif($min < 10) { $min = 5; } - elseif($min < 15) { $min = 10; } - elseif($min < 20) { $min = 15; } - elseif($min < 25) { $min = 20; } - elseif($min < 30) { $min = 25; } - elseif($min < 35) { $min = 30; } - elseif($min < 40) { $min = 35; } - elseif($min < 45) { $min = 40; } - elseif($min < 50) { $min = 45; } - elseif($min < 55) { $min = 50; } - else { $min = 55; } - $date[14] = floor($min / 10); - $date[15] = $min % 10; - $date[17] = "0"; - $date[18] = "0"; - break; - case 6: - $min = $date[14].$date[15]; - $min = floor($min / 2) * 2; - $date[14] = floor($min / 10); - $date[15] = $min % 10; - $date[17] = "0"; - $date[18] = "0"; - break; - case 7: - $date[17] = "0"; - $date[18] = "0"; - break; - } - - return $date; -} - -function CutDay($date) { - $hour = $date[11].$date[12]; - if($hour >= 19) { - $date[11] = "0"; - $date[12] = "1"; - - $date = add12Turn($date, 1); - $date = add12Turn($date, 1); - } elseif($hour < 07) { - $date[11] = "0"; - $date[12] = "1"; - } else { - $date[11] = "1"; - $date[12] = "3"; - } - $date[14] = "0"; - $date[15] = "0"; - $date[17] = "0"; - $date[18] = "0"; - return $date; -} - -function increaseRefresh($connect, $type="", $cnt=1) { - $date = date('Y-m-d H:i:s'); - - $query = "update game set refresh=refresh+'$cnt' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($_SESSION[p_id] != "") { - $query = "update general set lastrefresh='$date',con=con+'$cnt',connect=connect+'$cnt',refcnt=refcnt+'$cnt',refresh=refresh+'$cnt' where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $date = date('Y_m_d H:i:s'); - $date2 = substr($date, 0, 10); - $online = onlinenum($connect); - $fp = fopen("logs/_{$date2}_refresh.txt", "a"); - $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION[p_id],13," ")._String::Fill2($_SESSION[p_name],13," ")._String::Fill2($_SESSION[p_ip],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; - fwrite($fp, $msg."\r\n"); - fclose($fp); - - $proxy_headers = array( - 'HTTP_VIA', - 'HTTP_X_FORWARDED_FOR', - 'HTTP_FORWARDED_FOR', - 'HTTP_X_FORWARDED', - 'HTTP_FORWARDED', - 'HTTP_CLIENT_IP', - 'HTTP_FORWARDED_FOR_IP', - 'VIA', - 'X_FORWARDED_FOR', - 'FORWARDED_FOR', - 'X_FORWARDED', - 'FORWARDED', - 'CLIENT_IP', - 'FORWARDED_FOR_IP', - 'HTTP_PROXY_CONNECTION' - ); - - $str = ""; - foreach($proxy_headers as $x) { - if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}"; - } - if($str != "") { - $fp2 = fopen("logs/_{$date2}_ipcheck.txt", "a"); - $str = "ID:{$_SESSION[p_id]}//name:{$_SESSION[p_name]}//REMOTE_ADDR:{$_SERVER[REMOTE_ADDR]}" . $str; - fwrite($fp2, $str."\r\n"); - fclose($fp2); - } -} - -function updateTraffic($connect) { - $online = onlinenum($connect); - - $query = "select year,month,refresh,maxonline,maxrefresh from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - - //최다갱신자 - $query = "select name,refresh from general order by refresh desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $user = MYDB_fetch_array($result); - - if($game[maxrefresh] < $game[refresh]) { - $game[maxrefresh] = $game[refresh]; - } - if($game[maxonline] < $online) { - $game[maxonline] = $online; - } - $query = "update game set refresh=0,maxrefresh={$game[maxrefresh]},maxonline={$game[maxonline]} where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set refresh=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $date = date('Y-m-d H:i:s'); - $fp = fopen("logs/_traffic.txt", "a"); - //일시|년|월|총갱신|접속자|최다갱신자 - $msg = _String::Fill2($date,20," ")."|"._String::Fill2($game[year],3," ")."|"._String::Fill2($game[month],2," ")."|"._String::Fill2($game[refresh],8," ")."|"._String::Fill2($online,5," ")."|"._String::Fill2($user[name]."(".$user[refresh].")",20," "); - fwrite($fp, $msg."\r\n"); - fclose($fp); -} - -function CheckOverhead($connect) { - //서버정보 - $query = "select conweight,turnterm,conlimit from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $onlineNumber = onlinenum($connect); - switch($admin[turnterm]) { - case 0: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 120분턴 - case 1: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 60분턴 - case 2: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 360; $con2 = 240; $con3 = 120; $con4 = 60; break; // 30분턴 - case 3: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 240; $con2 = 180; $con3 = 120; $con4 = 60; break; // 20분턴 - case 4: $thr1 = 10; $thr2 = 20; $thr3 = 30; $con1 = 240; $con2 = 180; $con3 = 120; $con4 = 60; break; // 10분턴 - case 5: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 120; $con2 = 90; $con3 = 60; $con4 = 30; break; // 5분턴 - case 6: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 90; $con2 = 60; $con3 = 40; $con4 = 30; break; // 2분턴 - case 7: $thr1 = 5; $thr2 = 10; $thr3 = 20; $con1 = 90; $con2 = 60; $con3 = 40; $con4 = 30; break; // 1분턴 - } - - $thr1 *= $admin[conweight] / 100; - $thr2 *= $admin[conweight] / 100; - $thr3 *= $admin[conweight] / 100; - $con1 *= $admin[conweight] / 100; - $con2 *= $admin[conweight] / 100; - $con3 *= $admin[conweight] / 100; - $con4 *= $admin[conweight] / 100; - - //if($onlineNumber > $thr2) { $me[map] = 1; } - if ($onlineNumber > $thr3 && $admin[conlimit] != $con4) { - $query = "update game set conlimit='$con4' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber > $thr2 && $admin[conlimit] != $con3) { - $query = "update game set conlimit='$con3' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber > $thr1 && $admin[conlimit] != $con2) { - $query = "update game set conlimit='$con2' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($onlineNumber <= $thr1 && $admin[conlimit] != $con1) { - $query = "update game set conlimit='$con1' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - } -} - -function isLock($connect) { - $query = "select plock from plock where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $plock = MYDB_fetch_array($result); - - if($plock[plock] == 0) { return 0; } // 열려있음 - else { return 1; } // 사용중 -} - -function lock($connect) { - //테이블 락 - $query = "lock tables plock write"; - @MYDB_query($query, $connect); - // 잠금 - $query = "update plock set plock=1 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //테이블 언락 - $query = "unlock tables"; - @MYDB_query($query, $connect); -} - -function unlock($connect) { - // 풀림 - $query = "update plock set plock=0 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function timeover($connect) { - $query = "select turnterm,TIMESTAMPDIFF(SECOND,turntime,now()) as diff from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($admin[turnterm]) { - case 0: $t = 20; break; // 120분턴 - case 1: $t = 10; break; // 60분턴 - case 2: $t = 10; break; // 30분턴 - case 3: $t = 10; break; // 20분턴 - case 4: $t = 10; break; // 10분턴 - case 5: $t = 5; break; // 5분턴 - case 6: $t = 2; break; // 2분턴 - case 7: $t = 1; break; // 1분턴 - } - - $term = $admin[diff]; - if($term >= $t || $term < 0) { return 1; } - else { return 0; } -} - -function checkDelay($connect) { - //서버정보 - $query = "select turnterm,now() as now,TIMESTAMPDIFF(MINUTE,turntime,now()) as offset from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - // 1턴이상 갱신 없었으면 서버 지연 - switch($admin[turnterm]) { - case 0: $term = 120; $threshold = 1; break; - case 1: $term = 60; $threshold = 1; break; - case 2: $term = 30; $threshold = 1; break; - case 3: $term = 20; $threshold = 1; break; - case 4: $term = 10; $threshold = 2; break; - case 5: $term = 5; $threshold = 3; break; - case 6: $term = 2; $threshold = 3; break; - case 7: $term = 1; $threshold = 3; break; - } - //지연 해야할 밀린 턴 횟수 - $iter = floor($admin[offset] / $term); - if($iter > $threshold) { - $minute = $iter * $term; - $query = "update game set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE),starttime=DATE_ADD(starttime, INTERVAL $minute MINUTE),tnmt_time=DATE_ADD(tnmt_time, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set turntime=DATE_ADD(turntime, INTERVAL $minute MINUTE) where turntime<=DATE_ADD(turntime, INTERVAL $term MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update auction set expire=DATE_ADD(expire, INTERVAL $minute MINUTE)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function updateOnline($connect) { - $query = "select nation,name from nation"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - //국가별 이름 매핑 - for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - $nationname[$nation[nation]] = $nation[name]; - } - $nationname[0] = "재야"; - - //동접수 - $query = "select no,name,nation from general where lastrefresh > DATE_SUB(NOW(), INTERVAL 5 MINUTE)"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $onlinenum = MYDB_num_rows($result); - - //국가별 접속중인 장수 - for($i=0; $i < $onlinenum; $i++) { - $general = MYDB_fetch_array($result); - $onnation[$general[nation]] .= $general[name].', '; - } - - foreach($onnation as $key => $val) { - $onnationstr .= "【{$nationname[$key]}】, "; - - if($key == 0) { - $query = "update game set onlinegen='$onnation[0]' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update nation set onlinegen='$onnation[$key]' where nation='$key'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - - //접속중인 국가 - $query = "update game set online='$onlinenum',onlinenation='$onnationstr' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function checkTurn($connect) { - // 잦은 갱신 금지 현재 10초당 1회 - if(!timeover($connect)) { return; } - // 현재 처리중이면 접근 불가 - if(isLock($connect)) { return; } - - $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; - pushLockLog($connect, $locklog); - - // 파일락 획득 - $fp = fopen('lock.txt', 'r'); - if(!flock($fp, LOCK_EX)) { return; } - // 세마포어 획득(윈도우서버 불가) - //$sema = @sem_get(fileinode('stylesheet.php')); - //if(!@sem_acquire($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } - - // 현재 처리중이면 접근 불가 - if(isLock($connect)) { return; } - // 락 걸고 처리 - lock($connect); - - // 파일락 해제 - if(!flock($fp, LOCK_UN)) { return; } - // 세마포어 해제 - //if(!@sem_release($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } - - $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; - pushLockLog($connect, $locklog); - - //if(STEP_LOG) delStepLog(); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', 진입'); - - //천통시에는 동결 - $query = "select turntime from game where isUnited=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $down = MYDB_num_rows($result); - if($down > 0) { - $query = "update plock set plock=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; - } - // 1턴이상 갱신 없었으면 서버 지연 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay'); - checkDelay($connect); - // 접속자수, 접속국가, 국가별 접속장수 갱신 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', checkDelay'); - updateOnline($connect); - //접속자 수 따라서 갱신제한 변경 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', CheckOverhead'); - CheckOverhead($connect); - //서버정보 - $query = "select startyear,year,month,turntime,turnterm,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $date = date('Y-m-d H:i:s'); - // 최종 처리 월턴의 다음 월턴시간 구함 - $prevTurn = cutTurn($admin[turntime], $admin[turnterm]); - $nextTurn = addTurn($prevTurn, $admin[turnterm]); - // 현재 턴 이전 월턴까지 모두처리. - //최종 처리 이후 다음 월턴이 현재 시간보다 전이라면 - while($nextTurn <= $date) { - // 월턴이전 장수 모두 처리 - $query = "select no,name,turntime,turn0,npc from general where turntime < '$nextTurn' order by turntime"; - $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(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; - //if(PROCESS_LOG) pushProcessLog($connect, $processlog); - - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); - if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); - PreprocessCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); - processCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); - updateCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); - updateTurntime($connect, $general[no]); - - } - - // 트래픽 업데이트 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTraffic'); - updateTraffic($connect); - // 1달마다 처리하는 것들, 벌점 감소 및 건국,전턴,합병 -1, 군량 소모 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', preUpdateMonthly'); - $result = preUpdateMonthly($connect); - if($result == false) { - $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; - pushLockLog($connect, $locklog); - - // 잡금 해제 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); - unlock($connect); - return false; - } - - // 그 시각 년도,월 저장 - $dt = turnDate($connect, $nextTurn); - $admin[year] = $dt[0]; $admin[month] = $dt[1]; - - $locklog[0] = "-- checkTurn() ".$admin[month]."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; - pushLockLog($connect, $locklog); - // 분기계산. 장수들 턴보다 먼저 있다면 먼저처리 - if($admin[month] == 1) { - // NPC 등장 - if($admin[scenario] > 0 && $admin[scenario] < 20) { RegNPC($connect); } - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processGoldIncome'); - processGoldIncome($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processSpring'); - processSpring($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateYearly'); - updateYearly($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); - updateQuaterly($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); - disaster($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate'); - tradeRate($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', addAge'); - addAge($connect); - // 새해 알림 - $alllog[count($alllog)] = "◆{$admin[month]}월:$admin[year]년이 되었습니다."; - pushAllLog($alllog); - } elseif($admin[month] == 4) { - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); - updateQuaterly($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); - disaster($connect); - } elseif($admin[month] == 7) { - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processRiceIncome'); - processRiceIncome($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processFall'); - processFall($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); - updateQuaterly($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); - disaster($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', tradeRate'); - tradeRate($connect); - } elseif($admin[month] == 10) { - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateQuaterly'); - updateQuaterly($connect); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', disaster'); - disaster($connect); - } - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', postUpdateMonthly'); - postUpdateMonthly($connect); - - // 다음달로 넘김 - $prevTurn = $nextTurn; - $nextTurn = addTurn($prevTurn, $admin[turnterm]); - } - - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); - - // 이시각 정각 시까지 업데이트 완료했음 - $query = "update game set turntime='$prevTurn' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 그 시각 년도,월 저장 - $dt = turnDate($connect, $prevTurn); - $admin[year] = $dt[0]; $admin[month] = $dt[1]; - // 현재시간의 월턴시간 이후 분단위 장수 처리 - do { - $query = "select no,name,turntime,turn0,npc from general where turntime<='$date' order by turntime"; - $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(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general[name]}), no({$general[no]}), turntime({$general[turntime]}), turn0({$general[turn0]})"; - //if(PROCESS_LOG) pushProcessLog($connect, $processlog); - - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); - if($general[npc] >= 2) { processAI($connect, $general[no]); } // npc AI 처리 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', PreprocessCommand'); - PreprocessCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processCommand'); - processCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateCommand'); - updateCommand($connect, $general[no]); - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', updateTurntime'); - updateTurntime($connect, $general[no]); - } - } while($gencount > 0); - - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); - - $query = "update game set turntime='$date' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 3턴 전 시간 - $letterdate = $date; - $letterdate = subTurn($letterdate, $admin[turnterm]); - $letterdate = subTurn($letterdate, $admin[turnterm]); - $letterdate = subTurn($letterdate, $admin[turnterm]); - //기한 지난 외교 메세지 지움(3개월 유지) - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', '.__LINE__); - for($i=0; $i < 5; $i++) { - $query = "update nation set dip{$i}='',dip{$i}_who='0',dip{$i}_type='0',dip{$i}_when='' where dip{$i}_when < '$letterdate'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - // 부상 과도 제한 - $query = "update general set injury='80' where injury>'80'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //토너먼트 처리 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processTournament'); - processTournament($connect); - //거래 처리 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAuction'); - processAuction($connect); - // 잡금 해제 - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); - unlock($connect); - - $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION[p_id]; - pushLockLog($connect, $locklog); - - //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', finish'); - - return true; -} - -function addAge($connect) { - //나이와 호봉 증가 - $query = "update general set age=age+1,belong=belong+1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - if($admin[year] >= $admin[startyear]+3) { - $query = "select no,name,nation,leader,power,intel,history from general where specage<=age and special='0'"; - $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); - $special = getSpecial($connect, $general[leader], $general[power], $general[intel]); - $query = "update general set special='$special' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●특기 【".getGenSpecial($special)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special)."】(을)를 습득"); - pushGenLog($general, $log); - } - - $query = "select no,name,nation,leader,power,intel,history,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'"; - $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); - $special2 = getSpecial2($connect, $general[leader], $general[power], $general[intel], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); - - $query = "update general set special2='$special2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●특기 【".getGenSpecial($special2)."】(을)를 익혔습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:특기 【".getGenSpecial($special2)."】(을)를 습득"); - pushGenLog($general, $log); - } - } -} - -function turnDate($connect, $curtime) { - $query = "select startyear,starttime,turnterm,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $turn = $admin[starttime]; - $curturn = cutTurn($curtime, $admin[turnterm]); - $num = 0; - switch($admin[turnterm]) { - case 0: $term = 7200; break; - case 1: $term = 3600; break; - case 2: $term = 1800; break; - case 3: $term = 1200; break; - case 4: $term = 600; break; - case 5: $term = 300; break; - case 6: $term = 120; break; - case 7: $term = 60; break; - } - $num = floor((strtotime($curturn) - strtotime($turn)) / $term); - - $year = $admin[startyear] + floor($num / 12); - $month = 1 + (12+$num) % 12; - - // 바뀐 경우만 업데이트 - if($admin[month] != $month || $admin[year] != $year) { - $query = "update game set year='$year',month='$month' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $value[0] = $year; - $value[1] = $month; - return $value; -} - -//한국가의 전체 전방 설정 -function SetNationFront($connect, $nationNo) { - if(!$nationNo) { return; } - // 도시소유 국가와 선포,교전중인 국가 - $query = "select me,you from diplomacy where me={$nationNo} and (state=0 or (state=1 and term<=3))"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipNum = MYDB_num_rows($result); - if($dipNum > 0) { - for($i=0; $i < $dipNum; $i++) { - $dip = MYDB_fetch_array($result); - - $query = "select city,path from city where nation={$dip[you]}"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result2); - for($k=0; $k < $cityNum; $k++) { - $city = MYDB_fetch_array($result2); - $path = explode("|", $city[path]); - $cnt = count($path); - for($j=0; $j < $cnt; $j++) { - $adj[$path[$j]] = 1; - } - } - } - } else { - //평시이면 공백지 - $query = "select city,path from city where nation=0"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result2); - for($k=0; $k < $cityNum; $k++) { - $city = MYDB_fetch_array($result2); - $path = explode("|", $city[path]); - $cnt = count($path); - for($j=0; $j < $cnt; $j++) { - $adj[$path[$j]] = 1; - } - } - } - $str = "city=0"; $valid = 0; - $query = "select city from city where nation={$nationNo}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - for($i=0; $i < $cityNum; $i++) { - $city = MYDB_fetch_array($result); - if($adj[$city[city]] == 1) { $str .= " or city={$city[city]}"; $valid = 1; } - } - $query = "update city set front=0 where nation={$nationNo}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($valid == 1) { - $query = "update city set front=1 where {$str}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function checkSupply($connect) { - include_once("queue.php"); - - $query = "select city,nation,path from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - for($i=0; $i < $cityNum; $i++) { - $city = MYDB_fetch_array($result); - $cityPath[$city[city]] = $city[path]; - $cityNation[$city[city]] = $city[nation]; - $label[$city[city]] = 0; - } - - $select = 0; - $queue = new Queue(20); - $queue2 = new Queue(20); - $labelling = 0; - $marked = 0; - - //모든 도시 마크할 때까지 - while($marked < $cityNum) { - $queue->clear(); $queue2->clear(); - $q = $queue; $q2 = $queue2; - - $labelling++; - //마크 되지 않은 도시부터 라벨링 시작 - for($i=1; $i <= $cityNum; $i++) { - if($label[$i] == 0) { - $label[$i] = $labelling; - $labelMapping[$labelling] = $cityNation[$i]; - $comCount[$cityNation[$i]]++; - $q->push($i); - $marked++; - break; - } - } - - while($q->getSize() > 0 || $q2->getSize() > 0) { - while($q->getSize() > 0) { - $city = $q->pop(); - unset($path); - $path = explode("|", $cityPath[$city]); - for($i=0; $i < count($path); $i++) { - if($label[$path[$i]] == 0 && $cityNation[$path[$i]] == $cityNation[$city]) { - $label[$path[$i]] = $labelling; - $q2->push($path[$i]); - $marked++; - } - } - } - if($select == 0) { - $q2 = $queue; - $q = $queue2; - } else { - $q = $queue; - $q2 = $queue2; - } - $select = 1 - $select; - } - } - - //공백지는 다 보급상태 - $query = "update city set supply='1' where nation='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //우선 다 미보급 상태로 - $query = "update city set supply='0' where nation!='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //도시 있는 국가들 - $query = "select nation,capital from nation where level>'0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationNum = MYDB_num_rows($result); - - $str = "city='0'"; - for($i=0; $i < $nationNum; $i++) { - $nation = MYDB_fetch_array($result); - //수도 있는 덩어리 도시들 1로 세팅 - $lbl = $label[$nation[capital]]; - - for($k=1; $k <= $cityNum; $k++) { - if($lbl == $label[$k]) { - $str .= " or city='{$k}'"; - } - } - } - $query = "update city set supply='1' where {$str}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function updateYearly($connect) { - //통계 - checkStatistic($connect); -} - -//관직 변경 해제 -function updateQuaterly($connect) { - //천도 제한 해제, 관직 변경 제한 해제 - $query = "update nation set capset='0',l12set='0',l11set='0',l10set='0',l9set='0',l8set='0',l7set='0',l6set='0',l5set='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //관직 변경 제한 해제 - $query = "update city set gen1set='0',gen2set='0',gen3set='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정 -function preUpdateMonthly($connect) { - //연감 월결산 - $result = LogHistory($connect); - if($result == false) { return false; } - - $query = "select startyear,year,month,normgeneral from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //배신 횟수 최대 10회 미만 - $query = "update general set betray=9 where betray>9"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //보급선 체크 - checkSupply($connect); - //미보급도시 10% 감소 - $query = "update city set pop=pop*0.9,rate=rate*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,def=def*0.9,wall=wall*0.9 where supply='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //미보급도시 장수 5% 감소 - $query = "select city,nation from city where supply='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - for($i=0; $i < $cityCount; $i++) { - $city = MYDB_fetch_array($result); - //병 훈 사 5%감소 - $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='$city[city]' and nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //민심30이하 공백지 처리 - $query = "select city,name,gen1,gen2,gen3 from city where rate<='30' and supply='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - for($i=0; $i < $cityCount; $i++) { - $city = MYDB_fetch_array($result); - - $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【고립】$city[name](이)가 보급이 끊겨 미지배 도시가 되었습니다."; - } - pushHistory($connect, $history); - //민심30이하 공백지 처리 - $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 우선 병사수/100 만큼 소비 - $query = "update general set rice=rice-round(crew/100) where crew>=100"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 쌀이 마이너스인 장수들 소집해제 - $query = "select no,name,rice,crew,city from general where rice<0"; - $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); - - // 주민으로 돌아감 - $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set crew=0,rice=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; - pushGenLog($general, $log); - } - - //접률감소 - $query = "update general set connect=floor(connect*0.99)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //건국제한, 전략제한, 외교제한-1 - $query = "update general set makelimit=makelimit-1 where makelimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set tricklimit=tricklimit-1 where tricklimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set surlimit=surlimit-1 where surlimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //세율 동기화 목적 - $query = "update nation set rate_tmp=rate"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //도시훈사 180년 60, 220년 87, 240년 100 - $rate = round(($admin[year] - $admin[startyear]) / 1.5) + 60; - if($rate > 100) $rate = 100; - - //금률 쌀률, 내정비용 -// $query = "select count(*) as cnt from general"; -// $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $gencount = MYDB_fetch_array($result); // 전체 등록자 수 -// $ratio = 50 + round($gencount[cnt] / $admin[normgeneral] * 100 / 2); // 300명 등록시에 100% 지급 - $ratio = 100; - // 20 ~ 140원 - $develcost = ($admin[year] - $admin[startyear] + 10) * 2; - $query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //매달 사망자 수입 결산 - processDeadIncome($connect, $ratio); - - //계략, 전쟁표시 해제 - $query = "update city set state=0 where state=31 or state=33"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=state-1 where state=32 or state=34"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set term=term-1 where term>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set conflict='',conflict2='' where term=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=0 where state=41"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=41 where state=42"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=42 where state=43"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 계급 검사 및 승,강급 - $query = "select no,name,dedication,dedlevel,experience,explevel from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - - unset($log); - $log = checkDedication($connect, $general, $log); - $log = checkExperience($connect, $general, $log); - pushGenLog($general, $log); - } - - //첩보-1 - $query = "select nation,spy from nation where spy!=''"; - $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); - $spy = ""; $k = 0; unset($citys); - if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } - while(count($citys)) { - $citys[$k]--; - if($citys[$k]%10 != 0) { $spy .= "$citys[$k]"; } - $k++; - if($k >= count($citys)) { break; } - if($citys[$k-1]%10 != 0) { $spy .= "|"; } - } - $query = "update nation set spy='$spy' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - return true; -} - -// 외교 로그처리, 외교 상태 처리 -function postUpdateMonthly($connect) { - $query = "select startyear,year,month,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //각 국가 전월 장수수 대비 당월 장수수로 단합도 산정 - //각 국가 장수수를 구하고 국력 산정 -// $query = "select nation,gennum from nation where level>0"; -// 국력= -// 자원(국가/장수의 금,쌀) -// 기술력 -// 인구수*내정% -// 장수능력 -// 접속률 -// 숙련도 -// 명성,공헌 - $query = " -select -A.nation, -A.gennum, A.gennum2, A.chemi, -round(( - round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100) - +A.tech - +if(A.level=0,0,( - select round( - sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100 - ) from city where nation=A.nation and supply=1 - )) - +(select sum(leader+power+intel) from general where nation=A.nation) - +(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation) - +(select round(sum(experience+dedication)/100) from general where nation=A.nation) - +(select round(avg(connect)) from general where nation=A.nation) -)/10) -as power -from nation A -group by A.nation -"; - $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); - $genNum[$nation[nation]] = $nation[gennum]; - - if($nation[gennum] > $nation[gennum2]) { - // 장수가 증가했을때 - $nation[chemi] -= ceil(($nation[gennum] - $nation[gennum2]) / $nation[gennum] * 100); - } else { - // 장수가 감소했을때 - $nation[chemi] -= ceil(($nation[gennum2] - $nation[gennum]) / $nation[gennum2] * 100); - } - // 매달 2씩 증가 - $nation[chemi] += 2; - if($nation[chemi] < 0) { $nation[chemi] = 0; } - if($nation[chemi] > 100) { $nation[chemi] = 100; } - - //약간의 랜덤치 부여 (95% ~ 105%) - $nation[power] = round($nation[power] * (rand()%101 + 950) / 1000); - $query = "update nation set power='$nation[power]',gennum2='$nation[gennum]',chemi='$nation[chemi]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 전쟁기한 세팅 - $query = "select me,you,dead,term from diplomacy where state='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - for($i=0; $i < $dipCount; $i++) { - $dip = MYDB_fetch_array($result); - $genCount = $genNum[$dip[me]]; - // 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산 - // 4000 / 10 * 0.25 = 100 - $term = round($dip[dead] / 100 / $genCount) + 1; - if($dip[term] > $term) { $term = $dip[term]; } - if($term > 13) { $term = 13; } - $query = "update diplomacy set term='{$term}' where (me='$dip[me]' and you='$dip[you]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //개전국 로그 - $query = "select me,you from diplomacy where state='1' and term<='1' and me= $admin[startyear]+3) { - checkWander($connect); - } - // 작위 업데이트 - updateNationState($connect); - // 천통여부 검사 - checkEmperior($connect); - //토너먼트 개시 - triggerTournament($connect); - // 시스템 거래건 등록 - registerAuction($connect); - //전방설정 - $query = "select nation from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); - } -} - -function triggerTournament($connect) { - $query = "select tournament,tnmt_trig from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //현재 토너먼트 없고, 자동개시 걸려있을때, 40%확률 - if($admin[tournament] == 0 && $admin[tnmt_trig] > 0 && rand() % 100 < 40) { - $type = rand() % 6; // 0 : 전력전, 1 : 통솔전, 2 : 일기토, 3 : 설전 - //전력전 50%, 통, 일, 설 각 17% - if($type > 3) { $type = 0; } - startTournament($connect, $admin[tnmt_trig], $type); - } -} - -function checkWander($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - // 국가정보, 장수수 - $query = "select nation from nation where level=0"; - $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); - - $query = "select no,name,nation,level,history,turntime from general where nation='$nation[nation]' and level=12"; - $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($kingResult); - - $log[0] = "●초반 제한후 방랑군은 자동 해산됩니다."; - pushGenLog($king, $log); - - process_56($connect, $king); - } -} - -function checkMerge($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from diplomacy where state='3' and term='0'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($dipresult); - - for($i=0; $i < $dipcount; $i++) { - $dip = MYDB_fetch_array($dipresult); - - // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - //양국 NPC수 - $query = "select no from general where nation='$you[nation]' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - //양국 NPC수 - $query = "select no from general where nation='$me[nation]' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount2 = MYDB_num_rows($result); - - //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation[name](와)과 통합에 성공했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합에 성공"); - } - //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation[name](와)과 통합에 성공했습니다."; - for($i=0; $i < $gencount2; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$younation[name]$you[makenation]로 통합에 성공"); - } - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통합】$mynation[name](와)과 $younation[name](이)가 $you[makenation](으)로 통합하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $you[makenation]에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name]$you[makenation]로 통합"); - - $newGenCount = $gencount + $gencount2; - if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation[totaltech] + $mynation[totaltech]; - $newTech = round($newTotalTech / $newGenCount); - // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set name='$you[makenation]',gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //국가 삭제 - $query = "delete from nation where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 - $query = "update general set belong=1,level=1,nation='$you[nation]' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 공헌도0.9, 명성0.9 - $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 통합국 모든 도시 5% 감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) - $resignCount = 0; - if($npccount >= $npccount2) { - $resignCount = round($npccount*(rand()%21+90)/100); - } else { - $resignCount = round($npccount2*(rand()%21+90)/100); - } - $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($me, $mylog); - pushGenLog($you, $youlog); - pushHistory($connect, $history); - unset($mylog); - unset($youlog); - unset($history); - } -} - -function checkSurrender($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from diplomacy where state='5' and term='0'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($dipresult); - - for($i=0; $i < $dipcount; $i++) { - $dip = MYDB_fetch_array($dipresult); - - // 아국군주 - $query = "select no,name,history,nation from general where nation='$dip[me]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='$dip[you]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='$you[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - //양국 NPC수 - $query = "select no from general where nation='$you[nation]' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - //양국 NPC수 - $query = "select no from general where nation='$me[nation]' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount2 = MYDB_num_rows($result); - - //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$you[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "$mynation[name] 합병에 성공했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name] 합병에 성공"); - } - //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount2 = MYDB_num_rows($result); - $genlog[0] = "$younation[name](으)로 항복하여 수도로 이동합니다."; - for($i=0; $i < $gencount2; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●$admin[year]년 $admin[month]월:$mynation[name]$younation[name](으)로 항복"); - } - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【투항】$mynation[name] (이)가 $younation[name](으)로 항복하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【혼란】통합에 반대하는 세력들로 인해 $younation[name]에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$mynation[name](와)과 합병"); - - $newGenCount = $gencount + $gencount2; - if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation[totaltech] + $mynation[totaltech]; - $newTech = round($newTotalTech / $newGenCount); - // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set gold=gold+'$mynation[gold]',rice=rice+'$mynation[rice]',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //합병 당한국 모든 도시 10%감소 - $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //합병 시도국 모든 도시 5%감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //국가 삭제 - $query = "delete from nation where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 군주가 있는 위치 구함 - $query = "select city from general where nation='$you[nation]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($result); - // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='$you[nation]',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 제의국 모든 장수들 공헌도0.95, 명성0.95 - $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='$you[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 - $query = "update general set belong=1,level=1,nation='$you[nation]',city='$king[city]',dedication=dedication*1.1,experience=experience*0.9 where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='$you[nation]' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='$me[nation]' or you='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) - $resignCount = 0; - if($npccount >= $npccount2) { - $resignCount = round($npccount*(rand()%21+90)/100); - } else { - $resignCount = round($npccount2*(rand()%21+90)/100); - } - $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='$you[nation]' and npc>=2 order by rand() limit {$resignCount}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($me, $mylog); - pushGenLog($you, $youlog); - pushHistory($connect, $history); - unset($mylog); - unset($youlog); - unset($history); - } -} - -function updateNationState($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,level,history from nation"; - $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 city,level,secu from city where nation='$nation[nation]' and level>=4"; - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - $query = "select no from general where nation='$nation[nation]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - if($citycount == 0) { - $nationlevel = 0; // 방랑군 - } elseif($citycount == 1) { - $nationlevel = 1; // 호족 - } elseif($citycount <= 4) { - $nationlevel = 2; // 군벌 - } elseif($citycount <= 7) { - $nationlevel = 3; // 주자사 - } elseif($citycount <= 10) { - $nationlevel = 4; // 주목 - } elseif($citycount <= 15) { - $nationlevel = 5; // 공 - } elseif($citycount <= 20) { - $nationlevel = 6; // 왕 - } else { - $nationlevel = 7; // 황제 - } - - if($nationlevel > $nation[level]) { - $nation[level] = $nationlevel; - - switch($nationlevel) { - case 7: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); - break; - case 6: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 등극"); - break; - case 5: - case 4: - case 3: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); - break; - case 2: - $history[count($history)] = "●$admin[year]년 $admin[month]월:【작위】$nation[name]의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name]의 군주가 ".getNationLevel($nationlevel)."로 나서다"); - break; - } - - //작위 상승 - $query = "update nation set level='$nation[level]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - //기술 및 변경횟수 업데이트 - $myset = $nation[level] + 1; - $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushHistory($connect, $history); -} - -function checkStatistic($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $etc = ''; - - $query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general[avggold] = round($general[avggold]); - $general[avgrice] = round($general[avgrice]); - $general[avgdex] = round($general[avgdex]); - $general[avgexpded] = round($general[avgexpded]); - $etc .= "평균 금/쌀 ({$general[avggold]}/{$general[avgrice]}), 평균/최고 숙련({$general[avgdex]}/{$general[maxdex]}), 평균/최고 경험공헌({$general[avgexpded]}/{$general[maxexpded]}), "; - - $query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - $nation[avgtech] = round($nation[avgtech]); - $nation[avgpower] = round($nation[avgpower]); - $etc .= "최저/평균/최고 기술({$nation[mintech]}/{$nation[avgtech]}/{$nation[maxtech]}), "; - $etc .= "최저/평균/최고 국력({$nation[minpower]}/{$nation[avgpower]}/{$nation[maxpower]}), "; - - $nationName = ''; - $power_hist = ''; - - $query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice 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); - for($i=0; $i < $nationCount; $i++) { - $nation = MYDB_fetch_array($result); - - $query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result2); - - $query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result2); - - $nationName .= $nation['name'].'('.getNationType($nation['type']).'), '; - $power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), "; - $nationHists[$nation['type']]++; - } - - $nationHist = ''; - for($i=1; $i <= 13; $i++) { - if(!$nationHists[$i]) { $nationHists[$i] = '-'; } - $nationHist .= getNationType($i)."({$nationHists[$i]}), "; - } - - $query = "select no from general where npc <= 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $query = "select no from general where npc > 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npcCount = MYDB_num_rows($result); - - $query = "select personal,special,special2 from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $generalCount = MYDB_num_rows($result); - for($i=0; $i < $generalCount; $i++) { - $general = MYDB_fetch_array($result); - - $personalHists[$general['personal']]++; - $specialHists[$general['special']]++; - $specialHists2[$general['special2']]++; - } - - $generalCountStr = "{$generalCount}({$genCount}+{$npcCount})"; - - $personalHist = ''; - for($i=0; $i < 11; $i++) { - if(!$personalHists[$i]) { $personalHists[$i] = '-'; } - $personalHist .= getGenChar($i)."({$personalHists[$i]}), "; - } - $specialHist = ''; - for($i=0; $i < 40; $i++) { - $call = getGenSpecial($i); - if($call) { - if(!$specialHists[$i]) { $specialHists[$i] = '-'; } - - $specialHist .= $call."({$specialHists[$i]}), "; - } - } - $specialHist .= '// '; - $specialHist .= "-({$specialHists2[0]}), "; - for($i=40; $i < 80; $i++) { - $call = getGenSpecial($i); - if($call) { - if(!$specialHists2[$i]) { $specialHists2[$i] = '-'; } - - $specialHist .= $call."({$specialHists2[$i]}), "; - } - } - - $crewtype = ''; - $types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43); - $count = count($types); - for($i=0; $i < $count; $i++) { - $query = "select count(*) as type from general where crewtype={$types[$i]} and crew>=100"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $crewtype .= getTypeName($types[$i])."({$general[type]}), "; - } - - $query = " - insert into statistic ( - year, month, - nation_count, nation_name, nation_hist, - gen_count, personal_hist, special_hist, power_hist, - crewtype, etc - ) values ( - '$admin[year]', '$admin[month]', - '$nationCount', '$nationName', '$nationHist', - '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', - '$crewtype', '$etc' - )"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function checkEmperior($connect) { - $query = "select year,month,isUnited from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - if($count == 1 && $admin[isUnited] == 0) { - $nation = MYDB_fetch_array($result); - - $query = "select city from city where nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - $query = "select city from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $allcount = MYDB_num_rows($result); - - if($count == $allcount) { - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$nation[name](이)가 전토를 통일"); - - $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no from general where npc<2 and age>50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($connect, $general[no]); - } - - $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='$nation[nation]'"; // 도시 이름 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($cityresult); - $pop = "{$city[totalpop]} / {$city[maxpop]}"; - $poprate = round($city[totalpop]/$city[maxpop]*100, 2); - $poprate .= " %"; - - $query = "select name,picture,belong from general where nation='$nation[nation]' and level='12'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $level12 = MYDB_fetch_array($genresult); - - $query = "select name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,killnum from general where nation='$nation[nation]' order by killnum desc limit 5"; // 오호장군 - $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $tigernum = MYDB_num_rows($tigerresult); - for($i=0; $i < $tigernum; $i++) { - $tiger = MYDB_fetch_array($tigerresult); - if($tiger[killnum] > 0) { - $tigerstr .= "{$tiger[name]}【{$tiger[killnum]}】, "; - } - } - - $query = "select name,picture,firenum from general where nation='$nation[nation]' order by firenum desc limit 7"; // 건안칠자 - $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $eaglenum = MYDB_num_rows($eagleresult); - for($i=0; $i < $eaglenum; $i++) { - $eagle = MYDB_fetch_array($eagleresult); - if($eagle[firenum] > 0) { - $eaglestr .= "{$eagle[name]}【{$eagle[firenum]}】, "; - } - } - - $log[0] = "●$admin[year]년 $admin[month]월: $nation[name](이)가 전토를 통일하였습니다."; - - $query = "select no,name from general where nation='$nation[nation]' order by dedication desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - $gen .= "{$general[name]}, "; - - pushGenLog($general, $log); - } - - $nation[type] = getNationType($nation[type]); - - $query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $stat = MYDB_fetch_array($result); - - $query = "select count(*) as cnt from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_fetch_array($result); - - $statNC = "1 / {$stat[nc]}"; - $statGC = "{$gencount[cnt]} / {$stat[gc]}"; - - $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='$stat[nc]' limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $statNation = MYDB_fetch_array($result); - - $query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $statGeneral = MYDB_fetch_array($result); - - $query = " - insert into emperior ( - phase, - nation_count, nation_name, nation_hist, - gen_count, personal_hist, special_hist, - name, type, color, year, month, power, gennum, citynum, - pop, poprate, gold, rice, - l12name, l12pic, l11name, l11pic, - l10name, l10pic, l9name, l9pic, - l8name, l8pic, l7name, l7pic, - l6name, l6pic, l5name, l5pic, - tiger, eagle, gen, history - ) values ( - '-', - '$statNC', '$statNation[nation_name]', '$statNation[nation_hist]', - '$statGC', '$statGeneral[personal_hist]', '$statGeneral[special_hist]', - '$nation[name]', '$nation[type]', '$nation[color]', '$admin[year]', '$admin[month]', '$nation[power]', '$nation[gennum]', '$allcount', - '$pop', '$poprate', '$nation[gold]', '$nation[rice]', - '$level12[name]', '$level12[picture]', '$level11[name]', '$level11[picture]', - '$level10[name]', '$level10[picture]', '$level9[name]', '$level9[picture]', - '$level8[name]', '$level8[picture]', '$level7[name]', '$level7[picture]', - '$level6[name]', '$level6[picture]', '$level5[name]', '$level5[picture]', - '$tigerstr', '$eaglestr', '$gen', '$nation[history]' - )"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【통일】$nation[name](이)가 전토를 통일하였습니다."; - pushHistory($connect, $history); - - //연감 월결산 - LogHistory($connect); - } - } -} - -function PreprocessCommand($connect, $no) { - $query = "select no,name,city,injury,special2,item,turn0 from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) { - //특기보정 : 의술 - //의서 사용 - if($general[injury] > 0) { - $general[injury] = 0; - $query = "update general set injury=0 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "의술을 펼쳐 스스로 치료합니다!"; - pushGenLog($general, $log); - } - - $query = "select no,name,injury from general where city='$general[city]' and injury>10 order by rand()"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $patientCount = MYDB_num_rows($result); - - if($patientCount > 0) { - // 50% 확률로 치료 - $patientCount = round($patientCount * 0.5); - - $patientName = ""; - for($i=0; $i < $patientCount; $i++) { - $patient = MYDB_fetch_array($result); - - //부상 치료 - $query = "update general set injury=0 where no='$patient[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "{$general['name']}(이)가 의술로써 치료해줍니다!"; - pushGenLog($patient, $log); - - if($patientName == "") { - $patientName = $patient['name']; - } - } - - if($patientCount == 1) { - $log[0] = "의술을 펼쳐 도시의 장수 {$patientName}(을)를 치료합니다!"; - } else { - $patientCount -= 1; - $log[0] = "의술을 펼쳐 도시의 장수들 {$patientName} 외 {$patientCount}명을 치료합니다!"; - } - pushGenLog($general, $log); - } - } - - if($general[injury] > 0) { - if($general[item] >=7 && $general[item] <= 11) { - //영구약 사용 - $query = "update general set injury=0 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "".getItemName($general[item])."(을)를 사용하여 치료합니다!"; - pushGenLog($general, $log); - } elseif($general[injury] > 10 && $general[item] == 1 && $general[turn0] != EncodeCommand(0, 0, 0, 50)) { - //환약 사용 - $query = "update general set injury=0,item=0 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "환약을 사용하여 치료합니다!"; - pushGenLog($general, $log); - } elseif($general[injury] > 10) { - //부상 감소 - $query = "update general set injury=injury-10 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //부상 감소 - $query = "update general set injury=0 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } -} - -function processCommand($connect, $no) { - $query = "select npc,no,name,userlevel,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,history,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select month,killturn from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - // 블럭자는 미실행. 삭턴 감소 - if($general[block] == 2) { - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:현재 멀티, 또는 비매너로 인한블럭 대상자입니다. <1>$date"; - pushGenLog($general, $log); - - $query = "update general set recturn='',resturn='BLOCK_2',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($general[block] == 3) { - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:현재 악성유저로 분류되어 블럭, 발언권 무효 대상자입니다. <1>$date"; - pushGenLog($general, $log); - - $query = "update general set recturn='',resturn='BLOCK_3',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - if($general[level] >= 5 && $general[level] <= 12) { - $query = "select l{$general[level]}turn0,l{$general[level]}term from nation where nation='$general[nation]'"; - $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $core = MYDB_fetch_array($coreresult); - $corecommand = DecodeCommand($core["l{$general[level]}turn0"]); - //연속턴 아닌경우 텀 리셋 - if($core["l{$general[level]}term"]%100 != $corecommand[0]) { - $query = "update nation set l{$general[level]}term=0 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - switch($corecommand[0]) { - case 23: process_23($connect, $general); break; //포상 - case 24: process_24($connect, $general); break; //몰수 - case 27: process_27($connect, $general); break; //발령 - case 51: process_51($connect, $general); break; //항복권고 - case 52: process_52($connect, $general); break; //원조 - case 53: process_53($connect, $general); break; //통합제의 - case 61: process_61($connect, $general); break; //불가침제의 - case 62: process_62($connect, $general); break; //선전 포고 - case 63: process_63($connect, $general); break; //종전 제의 - case 64: process_64($connect, $general); break; //파기 제의 - case 65: process_65($connect, $general); break; //초토화 - case 66: process_66($connect, $general); break; //천도 - case 67: process_67($connect, $general); break; //증축 - case 68: process_68($connect, $general); break; //감축 - case 71: process_71($connect, $general); break; //필사즉생 - case 72: process_72($connect, $general); break; //백성동원 - case 73: process_73($connect, $general); break; //수몰 - case 74: process_74($connect, $general); break; //허보 - case 75: process_75($connect, $general); break; //피장파장 - case 76: process_76($connect, $general); break; //의병모집 - case 77: process_77($connect, $general); break; //이호경식 - case 78: process_78($connect, $general); break; //급습 - case 81: process_81($connect, $general); break; //국기변경 - case 99: break; //수뇌부휴식 - } - - //장수정보 재로드 - $query = "select npc,no,name,userlevel,picture,imgsvr,nation,nations,city,troop,injury,leader,leader2,power,power2,intel,intel2,experience,dedication,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,makenation,makelimit,killturn,block,dedlevel,explevel,age,history,belong,personal,special,special2,term,turn0,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - } - - $command = DecodeCommand($general[turn0]); - //삭턴 처리 - if($general[npc] >= 2 || $general[killturn] > $admin[killturn]) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif(floor($command[0]) == 0 && $general[userlevel] < 5) { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn='$admin[killturn]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //연속턴 아닌경우 텀 리셋 - if($general[term]%100 != $command[0]) { - $query = "update general set term=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //턴 처리 - switch($command[0]) { - case 0: //휴식 - $date = substr($general[turntime],11,5); - $log[count($log)] = "●{$admin[month]}월:아무것도 실행하지 않았습니다. <1>$date"; - pushGenLog($general, $log); - break; - case 1: process_1($connect, $general, 1); break; //농업 - case 2: process_1($connect, $general, 2); break; //상업 - case 3: process_3($connect, $general); break; //기술 - case 4: process_4($connect, $general); break; //선정 - case 5: process_5($connect, $general, 1); break; //수비 - case 6: process_5($connect, $general, 2); break; //성벽 - case 7: process_7($connect, $general); break; //정착 장려 - case 8: process_8($connect, $general); break; //치안 - case 9: process_9($connect, $general); break; //조달 - - case 11: process_11($connect, $general, 1); break; //징병 - case 12: process_11($connect, $general, 2); break; //모병 - case 13: process_13($connect, $general); break; //훈련 - case 14: process_14($connect, $general); break; //사기진작 - case 15: process_15($connect, $general); break; //전투태세 - case 16: process_16($connect, $general); break; //전쟁 - case 17: process_17($connect, $general); break; //소집해제 - - case 21: process_21($connect, $general); break; //이동 - case 22: process_22($connect, $general); break; //등용 - case 25: process_25($connect, $general); break; //임관 - case 26: process_26($connect, $general); break; //집합 - case 28: process_28($connect, $general); break; //귀환 - case 29: process_29($connect, $general); break; //인재탐색 - case 30: process_30($connect, $general); break; //강행 - - case 31: process_31($connect, $general); break; //첩보 - case 32: process_32($connect, $general); break; //화계 - case 33: process_33($connect, $general); break; //탈취 - case 34: process_34($connect, $general); break; //파괴 - case 35: process_35($connect, $general); break; //선동 - case 36: process_36($connect, $general); break; //기습 - - case 41: process_41($connect, $general); break; //단련 - case 42: process_42($connect, $general); break; //견문 - case 43: process_43($connect, $general); break; //증여 - case 44: process_44($connect, $general); break; //헌납 - case 45: process_45($connect, $general); break; //하야 - case 46: process_46($connect, $general); break; //건국 - case 47: process_47($connect, $general); break; //방랑 - case 48: process_48($connect, $general); break; //장비매매 - case 49: process_49($connect, $general); break; //군량매매 - case 50: process_50($connect, $general); break; //요양 - - case 54: process_54($connect, $general); break; //선양 - case 55: process_55($connect, $general); break; //거병 - case 56: process_56($connect, $general); break; //해산 - case 57: process_57($connect, $general); break; //모반 시도 - } - } -} - -function updateCommand($connect, $no, $type=0) { - $query = "select no,nation,level from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($type == 0 || $type == 1) { // 턴처리후, 당기기 - $query = " -update general set -turn0=turn1,turn1=turn2,turn2=turn3,turn3=turn4,turn4=turn5,turn5=turn6,turn6=turn7,turn7=turn8,turn8=turn9, -turn9=turn10,turn10=turn11,turn11=turn12,turn12=turn13,turn13=turn14,turn14=turn15,turn15=turn16,turn16=turn17, -turn17=turn18,turn18=turn19,turn19=turn20,turn20=turn21,turn21=turn22,turn22=turn23,turn23='00000000000000' -where no='$general[no]' -"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - if($type == 2 || ($general[level] >= 5 && $general[level] <= 12 && $type == 0)) { // 턴 처리후 수뇌부, 수뇌부 당기기 - $turn = "l{$general[level]}turn"; - $query = " -update nation set -{$turn}0={$turn}1,{$turn}1={$turn}2, -{$turn}2={$turn}3,{$turn}3={$turn}4, -{$turn}4={$turn}5,{$turn}5={$turn}6, -{$turn}6={$turn}7,{$turn}7={$turn}8, -{$turn}8={$turn}9,{$turn}9={$turn}10, -{$turn}10={$turn}11,{$turn}11='00000000000099' -where nation='$general[nation]' -"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function backupdateCommand($connect, $no, $type=0) { - $query = "select no,nation,level from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($type == 1) { // 미루기 - $query = " -update general set -turn23=turn22,turn22=turn21, -turn21=turn20,turn20=turn19, -turn19=turn18,turn18=turn17, -turn17=turn16,turn16=turn15, -turn15=turn14,turn14=turn13, -turn13=turn12,turn12=turn11, -turn11=turn10,turn10=turn9, -turn9=turn8,turn8=turn7, -turn7=turn6,turn6=turn5, -turn5=turn4,turn4=turn3, -turn3=turn2,turn2=turn1, -turn1=turn0,turn0='00000000000000' -where no='$no' -"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($type == 2) { // 수뇌부 미루기 - $turn = "l{$general[level]}turn"; - $query = " -update nation set -{$turn}11={$turn}10,{$turn}10={$turn}9, -{$turn}9={$turn}8,{$turn}8={$turn}7, -{$turn}7={$turn}6,{$turn}6={$turn}5, -{$turn}5={$turn}4,{$turn}4={$turn}3, -{$turn}3={$turn}2,{$turn}2={$turn}1, -{$turn}1={$turn}0,{$turn}0='00000000000099' -where nation='$general[nation]' -"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function updateTurntime($connect, $no) { - $query = "select year,month,isUnited,turnterm from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,name,name2,nation,troop,age,turntime,history,killturn,level,deadyear,npc,npc_org,npcmatch,npcid from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - // 삭턴장수 삭제처리 - if($general[killturn] <= 0) { - // npc유저 삭턴시 npc로 전환 - if($general[npc] == 1 && $general[deadyear] > $admin[year]) { - $npcid = "gen" . $general[npcid]; - $pw = md5("18071807"); - $general[killturn] = ($general[deadyear] - $admin[year]) * 12; - $general[npc] = $general[npc_org]; - $query = "update general set user_id='$npcid',password='$pw',npc='$general[npc]',killturn='$general[killturn]',mode=2 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[0] = "●{$admin[month]}월:$general[name2](이)가 $general[name]의 육체에서 유체이탈합니다!"; - pushAllLog($alllog); - - if($admin[isUnited] == 0) { - CheckHall($connect, $no); - } - } else { - // 군주였으면 유지 이음 - if($general[level] == 12) { - nextRuler($connect, $general); - } - - //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 부대 처리 - $query = "select no from troop where troop='$general[troop]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $troop = MYDB_fetch_array($result); - - //부대장일 경우 - if($troop[no] == $general[no]) { - // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set troop='0' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - // 장수 삭제 - $query = "delete from general where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //기존 국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 병, 요절, 객사, 번개, 사채, 일확천금, 호랑이, 곰, 수영, 처형, 발견 - switch(rand()%42) { - case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 역병에 걸려 죽고 말았습니다."; break; - case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 요절하고 말았습니다."; break; - case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 거리에서 갑자기 객사하고 말았습니다."; break; - case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 안타깝게도 번개에 맞아 죽고 말았습니다."; break; - case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 고리대금에 시달리다가 자살하고 말았습니다."; break; - case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 일확천금에 놀라 심장마비로 죽고 말았습니다."; break; - case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산속에서 호랑이에게 물려 죽고 말았습니다."; break; - case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 산책중 곰에게 할퀴어 죽고 말았습니다."; break; - case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 수영을 하다 익사하고 말았습니다."; break; - case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 황제를 모독하다가 처형당하고 말았습니다."; break; - case 10: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 이튿날 침실에서 죽은채로발견되었습니다."; break; - case 11: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 색에 빠져 기력이 쇠진해 죽고말았습니다."; break; - case 12: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 미녀를 보고 심장마비로 죽고말았습니다."; break; - case 13: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 우울증에 걸려 자살하고 말았습니다."; break; - case 14: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 천하 정세를 비관하며 분신하고 말았습니다."; break; - case 15: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 어떤 관심도 못받고 쓸쓸히 죽고말았습니다."; break; - case 16: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 유산 상속 문제로 다투다가 살해당했습니다."; break; - case 17: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 누군가의 사주로 자객에게 암살당했습니다."; break; - case 18: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 바람난 배우자에게 독살당하고 말았습니다."; break; - case 19: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농약을 술인줄 알고 마셔 죽고말았습니다."; break; - case 20: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 죽고말았습니다."; break; - case 21: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 전재산을 잃고 화병으로 죽고말았습니다."; break; - case 22: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 단식운동을 하다가 굶어 죽고말았습니다."; break; - case 23: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 귀신에게 홀려 시름 앓다가 죽고말았습니다."; break; - case 24: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사람들에게 집단으로 맞아서 죽고말았습니다."; break; - case 25: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 성벽에서 뛰어내려 죽고말았습니다."; break; - case 26: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 농사중 호미에 머리를 맞아 죽고말았습니다."; break; - case 27: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 저세상이 궁금하다며 자살하고 말았습니다."; break; - case 28: $alllog[0] = "●{$admin[month]}월:운좋기로 소문난 $general[name](이)가 불운하게도 죽고말았습니다."; break; - case 29: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 무리하게 단련을 하다가 죽고말았습니다."; break; - case 30: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고를 비관하며 자살하고 말았습니다."; break; - case 31: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 평생 결혼도 못해보고 죽고 말았습니다."; break; - case 32: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 과식하다 배가 터져 죽고 말았습니다."; break; - case 33: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 웃다가 숨이 넘어가 죽고 말았습니다."; break; - case 34: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 추녀를 보고 놀라서 죽고 말았습니다."; break; - case 35: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 물에 빠진 사람을 구하려다 같이 죽고 말았습니다."; break; - case 36: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 독살을 준비하다 독에 걸려 죽고 말았습니다."; break; - case 37: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 뒷간에서 너무 힘을 주다가 죽고 말았습니다."; break; - case 38: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 돌팔이 의사에게 치료받다가 죽고 말았습니다."; break; - case 39: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 남의 보약을 훔쳐먹다 부작용으로 죽고 말았습니다."; break; - case 40: $alllog[0] = "●{$admin[month]}월:희대의 사기꾼 $general[name](이)가 사망했습니다."; break; - case 41: $alllog[0] = "●{$admin[month]}월:희대의 호색한 $general[name](이)가 사망했습니다."; break; - default: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; break; - } - // 엔피씨,엠피씨,의병 사망로그 - if($general[npc] == 2) { - $alllog[0] = "●{$admin[month]}월:$general[name](이)가 사망했습니다."; - } elseif($general[npc] >= 3) { - switch(rand()%10) { - case 0: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 푸대접에 실망하여 떠났습니다."; break; - case 1: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 갑자기 화를 내며 떠났습니다."; break; - case 2: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 의견차이를 좁히지 못하고 떠났습니다."; break; - case 3: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 판단 착오였다며 떠났습니다."; break; - case 4: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 생활고가 나아지지 않는다며 떠났습니다."; break; - case 5: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 기대가 너무 컸다며 떠났습니다."; break; - case 6: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 아무 이유 없이 떠났습니다."; break; - case 7: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기 목적은 달성했다며 떠났습니다."; break; - case 8: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 자기가 없어도 될것 같다며 떠났습니다."; break; - case 9: $alllog[0] = "●{$admin[month]}월:$general[name](이)가 처자식이 그립다며 떠났습니다."; break; - } - } - - pushAllLog($alllog); - - return; - } - } - - if($general[age] >= 80 && $general[npc] == 0) { - if($admin[isUnited] == 0) { - CheckHall($connect, $no); - } - - $query = "update general set leader=leader*0.85,power=power*0.85,intel=intel*0.85,injury=0,experience=experience*0.5,dedication=dedication*0.5,firenum=0,warnum=0,killnum=0,deathnum=0,killcrew=0,deathcrew=0,age=20,specage=0,specage2=0,crew=crew*0.85,dex0=dex0*0.5,dex10=dex10*0.5,dex20=dex20*0.5,dex30=dex30*0.5,dex40=dex40*0.5 where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[0] = "●{$admin[month]}월:$general[name](이)가 은퇴하고 그 자손이 유지를 이어받았습니다."; - pushAllLog($alllog); - - $log[0] = "●나이가 들어 은퇴하고 자손에게 자리를 물려줍니다."; - pushGenLog($general, $log); - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:나이가 들어 은퇴하고, 자손에게 관직을 물려줌"); - } - - $turntime = addTurn($general[turntime], $admin[turnterm]); - - $query = "update general set turntime='$turntime' where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function CheckHall($connect, $no) { - $type = array( - "experience", - "dedication", - "firenum", - "warnum", - "killnum", - "winrate", - "killcrew", - "killrate", - "dex0", - "dex10", - "dex20", - "dex30", - "dex40", - "ttrate", - "tlrate", - "tprate", - "tirate", - "betgold", - "betwin", - "betwingold", - "betrate" - ); - - $query = "select name,nation,picture, - experience,dedication,warnum,firenum,killnum, - killnum/warnum*10000 as winrate,killcrew,killcrew/deathcrew*10000 as killrate, - dex0,dex10,dex20,dex30,dex40, - ttw/(ttw+ttd+ttl)*10000 as ttrate, ttw+ttd+ttl as tt, - tlw/(tlw+tld+tll)*10000 as tlrate, tlw+tld+tll as tl, - tpw/(tpw+tpd+tpl)*10000 as tprate, tpw+tpd+tpl as tp, - tiw/(tiw+tid+til)*10000 as tirate, tiw+tid+til as ti, - betgold, betwin, betwingold, betwingold/betgold*10000 as betrate - from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select nation,name,color from nation where nation='$general[nation]'"; - $nationresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($nationresult); - - for($k=0; $k < 21; $k++) { - $query = "select * from hall where type='$k' order by data desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - //승률,살상률인데 10회 미만 전투시 스킵 - if(($k == 5 || $k == 7) && $general[warnum]<10) { continue; } - //토너승률인데 50회 미만시 스킵 - if($k == 13 && $general[tt] < 50) { continue; } - //토너승률인데 50회 미만시 스킵 - if($k == 14 && $general[tl] < 50) { continue; } - //토너승률인데 50회 미만시 스킵 - if($k == 15 && $general[tp] < 50) { continue; } - //토너승률인데 50회 미만시 스킵 - if($k == 16 && $general[ti] < 50) { continue; } - //수익률인데 1000미만시 스킵 - if($k == 20 && $general[betgold] < 1000) { continue; } - - $rank = 10; - for($i=0; $i < $count; $i++) { - $ranker = MYDB_fetch_array($result); - - if($general[$type[$k]] >= $ranker[data]) { - $rank = $i; - break; - } - } - for($i=8; $i >= $rank; $i--) { - $j = $i + 1; - $query = "select * from hall where type='$k' and rank='$i'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $ranker = MYDB_fetch_array($result); - - $query = "update hall set name='$ranker[name]', nation='$ranker[nation]', data='$ranker[data]', color='$ranker[color]', picture='$ranker[picture]' where type='$k' and rank='$j'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $query = "update hall set name='$general[name]', nation='{$nation[name]}', data='{$general[$type[$k]]}', color='{$nation[color]}', picture='$general[picture]' where type='$k' and rank='$rank'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function info($connect, $type=0, $skin=1) { - $query = "select year,month,turnterm,maxgeneral from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($admin[turnterm]) { - case 0: $termtype="120분 턴"; break; - case 1: $termtype="60분 턴"; break; - case 2: $termtype="30분 턴"; break; - case 3: $termtype="20분 턴"; break; - case 4: $termtype="10분 턴"; break; - case 5: $termtype="5분 턴"; break; - case 6: $termtype="2분 턴"; break; - case 7: $termtype="1분 턴"; break; - } - - $query = "select no from general where npc<2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - $query = "select no from general where npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - - switch($type) { - case 0: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; - break; - case 1: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; - break; - case 2: - echo "현재 : {$admin[year]}年 {$admin[month]}月 ($termtype 서버)"; - break; - case 3: - echo "등록 장수 : 유저 {$gencount} / {$admin[maxgeneral]} 명 + NPC {$npccount} 명"; - break; - } -} - -function uniqueItem($connect, $general, $log, $vote=0) { - if($general[npc] >= 2 || $general[betray] > 1) { return $log; } - if($general[weap] > 6 || $general[book] > 6 || $general[horse] > 6 || $general[item] > 6) { return $log; } - - $query = "select year,month,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - - $query = "select count(*) as cnt from general where npc<2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - if($game[scenario] == 0) { $prob = $gen[cnt] * 5; } // 5~6개월에 하나씩 등장 - else { $prob = $gen[cnt]; } // 1~2개월에 하나씩 등장 - - if($vote == 1) { $prob = round($gen[cnt] * 0.7 / 3); } // 투표율 70%, 투표 한번에 2~3개 등장 - elseif($vote == 2) { $prob = round($gen[cnt] / 10 / 2); } // 랜임시 2개(10%) 등장(200명중 20명 랜임시도?) - elseif($vote == 3) { $prob = round($gen[cnt] / 10 / 4); } // 건국시 4개(20%) 등장(200명시 20국 정도 됨) - - if($prob < 3) { $prob = 3; } - //아이템 습득 상황 - if(rand() % $prob == 0) { - //셋중 선택 - $sel = rand() % 4; - switch($sel) { - case 0: $type = "weap"; break; - case 1: $type = "book"; break; - case 2: $type = "horse"; break; - case 3: $type = "item"; break; - } - $query = "select no,{$type} from general where {$type}>6"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - if($count < 20) { - for($i=0; $i < $count; $i++) { - $gen = MYDB_fetch_array($result); - $occupied[$gen[$type]] = 1; - } - for($i=7; $i <= 26; $i++) { - if($occupied[$i] == 0) { - $item[count($item)] = $i; - } - } - $it = $item[rand() % count($item)]; - - $query = "update general set {$type}='$it' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select name from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[name] == "") { - $nation[name] = "재야"; - } - - switch($sel) { - case 0: - $log[count($log)] = "".getWeapName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getWeapName($it)."(을)를 습득"); - if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getWeapName($it)."(을)를 습득했습니다!"; - } - break; - case 1: - $log[count($log)] = "".getBookName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getBookName($it)."(을)를 습득"); - if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getBookName($it)."(을)를 습득했습니다!"; - } - break; - case 2: - $log[count($log)] = "".getHorseName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getHorseName($it)."(을)를 습득"); - if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getHorseName($it)."(을)를 습득했습니다!"; - } - break; - case 3: - $log[count($log)] = "".getItemName($it)."(을)를 습득했습니다!"; - $alllog[0] = "●{$game[month]}월:$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:".getItemName($it)."(을)를 습득"); - if($vote == 0) { - $history[0] = "●$game[year]년 $game[month]월:【아이템】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - } elseif($vote == 1) { - $history[0] = "●$game[year]년 $game[month]월:【설문상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - } elseif($vote == 2) { - $history[0] = "●$game[year]년 $game[month]월:【랜덤임관상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - } elseif($vote == 3) { - $history[0] = "●$game[year]년 $game[month]월:【건국상품】$nation[name]$general[name](이)가 ".getItemName($it)."(을)를 습득했습니다!"; - } - break; - } - pushAllLog($alllog); - pushHistory($connect, $history); - } - } - return $log; -} - -function checkAbility($connect, $general, $log) { - global $_upgradeLimit; - - $limit = $_upgradeLimit; - - $query = "select no,leader,leader2,power,power2,intel,intel2 from general where no='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - if($general[leader2] < 0) { - $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "통솔이 1 떨어졌습니다!"; - } elseif($general[leader2] >= $limit) { - $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "통솔이 1 올랐습니다!"; - } - - if($general[power2] < 0) { - $query = "update general set power2='$limit'+power2,power=power-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "무력이 1 떨어졌습니다!"; - } elseif($general[power2] >= $limit) { - $query = "update general set power2=power2-'$limit',power=power+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "무력이 1 올랐습니다!"; - } - - if($general[intel2] < 0) { - $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "지력이 1 떨어졌습니다!"; - } elseif($general[intel2] >= $limit) { - $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "지력이 1 올랐습니다!"; - } - - return $log; -} - -function checkDedication($connect, $general, $log) { - $dedlevel = getDedLevel($general[dedication]); - - $query = "update general set dedlevel='$dedlevel' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 승급했다면 - if($general[dedlevel] < $dedlevel) { - $log[count($log)] = "".getDed($general[dedication])."(으)로 승급하여 봉록이 ".getBill($general[dedication])."(으)로 상승했습니다!"; - // 강등했다면 - } elseif($general[dedlevel] > $dedlevel) { - $log[count($log)] = "".getDed($general[dedication])."(으)로 강등되어 봉록이 ".getBill($general[dedication])."(으)로 하락했습니다!"; - } - - return $log; -} - -function checkExperience($connect, $general, $log) { - $explevel = getExpLevel($general[experience]); - - $query = "update general set explevel='$explevel' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 승급했다면 - if($general[explevel] < $explevel) { - $log[count($log)] = "Lv $explevel로 레벨업!"; - // 강등했다면 - } elseif($general[explevel] > $explevel) { - $log[count($log)] = "Lv $explevel로 레벨다운!"; - } - - return $log; -} - -//1월마다 실행 -function processSpring($connect) { - //인구 증가 - popIncrease($connect); - // 1월엔 무조건 내정 1% 감소 - $query = "update city set dead=0,agri=agri*0.99,comm=comm*0.99,secu=secu*0.99,def=def*0.99,wall=wall*0.99"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 유지비 3% 거상 1.5% - $query = "update general set gold=gold*0.97 where gold>10000 and special!=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold*0.985 where gold>10000 and special=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 1% 거상 0.5% - $query = "update general set gold=gold*0.99 where gold>1000 and gold<=10000 and special!=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold*0.995 where gold>1000 and gold<=10000 and special=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 5% - $query = "update nation set gold=gold*0.95 where gold>100000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 3% - $query = "update nation set gold=gold*0.97 where gold>10000 and gold<=100000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 1% - $query = "update nation set gold=gold*0.99 where gold>1000 and gold<=10000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $history[0] = "★{$admin['year']}년 {$admin['month']}월: 모두들 즐거운 게임 하고 계신가요? ^^ 삼국일보 애독해 주시고, 훼접은 삼가주세요~"; - pushHistory($connect, $history); -} - -function processGoldIncome($connect) { - global $_basegold; - - $query = "select year,month,gold_rate from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name,nation,gold,rate_tmp,bill,type from nation"; - $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); - - $incomeList = getGoldIncome($connect, $nation[nation], $nation[rate_tmp], $admin[gold_rate], $nation[type]); - $income = $incomeList[0] + $incomeList[1]; - $originoutcome = getGoldOutcome($connect, $nation[nation], 100); // 100%의 지급량 - $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 - // 실제 지급량 계산 - $nation[gold] += $income; - // 기본량도 안될경우 - if($nation[gold] < $_basegold) { - $realoutcome = 0; - // 실지급율 - $ratio = 0; - //기본량은 넘지만 요구량이 안될경우 - } elseif($nation[gold] - $_basegold < $outcome) { - $realoutcome = $nation[gold] - $_basegold; - $nation[gold] = $_basegold; - // 실지급율 - $ratio = $realoutcome / $originoutcome; - } else { - $realoutcome = $outcome; - $nation[gold] -= $realoutcome; - // 실지급율 - $ratio = $realoutcome / $originoutcome; - } - $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세금 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과금 : ".tab2($nation[gold],6," "); - - $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; - $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $corecount = MYDB_num_rows($coreresult); - $corelog[0] = "●이번 수입은 금 $income입니다."; - for($j=0; $j < $corecount; $j++) { - $coregen = MYDB_fetch_array($coreresult); - pushGenLog($coregen, $corelog); - } - - $query = "update nation set gold='$nation[gold]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name,nation,dedication,gold from general where nation='$nation[nation]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - // 각 장수들에게 지급 - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $gold = round(getBill($general[dedication])*$ratio); - $general[gold] += $gold; - - $query = "update general set gold='$general[gold]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●봉급으로 금 $gold을 받았습니다."; - pushGenLog($general, $log); - } - } - - $history[0] = "●$admin[year]년 $admin[month]월:【지급】봄이 되어 봉록에 따라 자금이 지급됩니다."; - pushHistory($connect, $history); - pushAdminLog($connect, $adminLog); -} - -function popIncrease($connect) { - $query = "select nation,rate_tmp,type from nation"; - $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); - $rate[$nation[nation]] = $nation[rate_tmp]; - $type[$nation[nation]] = $nation[type]; - } - - $query = "select * from city where supply='1'"; // 도시 목록 - $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); - - $pop = $city[pop]; - if($city[nation] == 0) { - $pop = $city[pop]; // 공백지는 증가하지 않게 - $cityrate = 50; - - $ratio = 0.99; // 공백지는 수비 빼고 약간씩 감소 - $agri = floor($city[agri] * $ratio); - $comm = floor($city[comm] * $ratio); - $secu = floor($city[secu] * $ratio); - $def = $city[def]; - $wall = $city[wall]; - } else { - $ratio = (20 - $rate[$city[nation]])/200; // 20일때 0% 0일때 10% 100일때 -40% - $agri = $city[agri] + floor($city[agri] * $ratio); //내정도 증감 - $comm = $city[comm] + floor($city[comm] * $ratio); - $secu = $city[secu] + floor($city[secu] * $ratio); - $def = $city[def] + floor($city[def] * $ratio); - $wall = $city[wall] + floor($city[wall] * $ratio); - $ratio = (30 - $rate[$city[nation]])/200; // 20일때 5% 5일때 12.5% 50일때 -10% - if($ratio >= 0) { - // 국가보정 - if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 1.2; } - if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 0.8; } - $ratio *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 - } else { - // 국가보정 - if($type[$city[nation]] == 4 || $type[$city[nation]] == 6 || $type[$city[nation]] == 7 || $type[$city[nation]] == 8 || $type[$city[nation]] == 12 || $type[$city[nation]] == 13) { $ratio *= 0.8; } - if($type[$city[nation]] == 1 || $type[$city[nation]] == 3) { $ratio *= 1.2; } - $ratio *= (1 - $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 경감 - } - - $pop = $city[pop] + floor($city[pop] * $ratio) + 5000; // 기본 5000명은 증가 - - $ratio = round($ratio*100, 2); - $cityrate = $city[rate]; - $cityrate = $cityrate + (20 - $rate[$city[nation]]); - if($cityrate > 100) { $cityrate = 100; } - if($cityrate < 0) { $cityrate = 0; } - } - if($pop > $city[pop2]) { $pop = $city[pop2]; } - if($pop < 0) { $pop = 0; } - if($agri > $city[agri2]) { $agri = $city[agri2]; } - if($comm > $city[comm2]) { $comm = $city[comm2]; } - if($secu > $city[secu2]) { $secu = $city[secu2]; } - if($def > $city[def2]) { $def= $city[def2]; } - if($wall > $city[wall2]) { $wall = $city[wall2]; } - - //시세 - $query = "update city set pop='$pop',rate='$cityrate',agri='$agri',comm='$comm',secu='$secu',def='$def',wall='$wall' where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function getGoldIncome($connect, $nationNo, $rate, $admin_rate, $type) { - $query = "select no,city from general where nation='$nationNo' and level=4"; // 태수 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level4[$gen[no]] = $gen[city]; - } - $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level3[$gen[no]] = $gen[city]; - } - $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level2[$gen[no]] = $gen[city]; - } - - $query = "select capital,level from nation where nation='$nationNo'"; // 수도 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($cityresult); - - $query = "select * from city where nation='$nationNo' and supply='1'"; // 도시 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - //총 수입 구함 - $income[0] = 0; $income[1] = 0; // income[0] : 세수, income[1] : 수비병 세수 - for($j=0; $j < $citycount; $j++) { - $city = MYDB_fetch_array($cityresult); - - //민충 0~100 : 50~100 수입 - $ratio = $city[rate] / 2 + 50; - $tax1 = ($city[pop] * $city[comm] / $city[comm2] * $ratio / 1000) / 3; -// $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; - $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 -// $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 - //도시 관직 추가 세수 - if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - //수도 추가 세수 130%~105% - if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } - - $income[0] += $tax1; -// $income[1] += $tax2; - } - $income[0] *= ($rate / 20); - - // 국가보정 - if($type == 1) { $income[0] *= 1.1; $income[1] *= 1.1; } - if($type == 9 || $type == 10 || $type == 11) { $income[0] *= 0.9; $income[1] *= 0.9; } - - $income[0] = round($income[0] * ($admin_rate/100)); - $income[1] = round($income[1] * ($admin_rate/100)); - - return $income; -} - -function processDeadIncome($connect, $admin_rate) { - $query = "select nation,type from nation where level>0"; // 도시 가진 국가 - $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); - - $income = getDeadIncome($connect, $nation[nation], $nation[type], $admin_rate); - -// 단기수입 금만적용 -// $query = "update nation set gold=gold+'$income',rice=rice+'$income' where nation='$nation[nation]'"; - $query = "update nation set gold=gold+'$income' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - // 10%수입, 20%부상병 - $query = "update city set pop=pop+dead*0.2,dead='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function getDeadIncome($connect, $nation, $type, $admin_rate) { - $query = "select dead from city where nation='$nation' and dead>'0' and supply='1'"; // 도시 목록 - $cityResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($cityResult); - - $income = 0; // 단기수입 - if($cityCount > 0) { - for($k=0; $k < $cityCount; $k++) { - $city = MYDB_fetch_array($cityResult); - - $income += $city[dead]; - } - $income /= 10; - - // 국가보정 - if($type == 1) { $income *= 1.1; } - if($type == 9 || $type == 10) { $income *= 0.9; } - - $income = round($income * $admin_rate / 100); - } - return $income; -} - -function getGoldOutcome($connect, $nation, $bill) { - $query = "select dedication from general where nation='$nation'"; // 장수 목록 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - //총 지출 구함 - $outcome = 0; - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $outcome += getBill($general[dedication]); - } - - $outcome = round($outcome * $bill / 100); - - return $outcome; -} - -//7월마다 실행 -function processFall($connect) { - //인구 증가 - popIncrease($connect); - // 7월엔 무조건 내정 1% 감소 - $query = "update city set dead=0,agri=agri*0.99,comm=comm*0.99,secu=secu*0.99,def=def*0.99,wall=wall*0.99"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 유지비 3% 거상 1.5% - $query = "update general set rice=rice*0.97 where rice>10000 and special!=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=rice*0.985 where rice>10000 and special=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 1% 거상 0.5% - $query = "update general set rice=rice*0.99 where rice>1000 and rice<=10000 and special!=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=rice*0.995 where rice>1000 and rice<=10000 and special=30"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 5% - $query = "update nation set rice=rice*0.95 where rice>100000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 3% - $query = "update nation set rice=rice*0.97 where rice>10000 and rice<=100000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 유지비 1% - $query = "update nation set rice=rice*0.99 where rice>2000 and rice<=10000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function processRiceIncome($connect) { - global $_baserice; - - $query = "select year,month,rice_rate from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name,nation,rice,rate_tmp,bill,type from nation"; - $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); - - $incomeList = getRiceIncome($connect, $nation[nation], $nation[rate_tmp], $admin[rice_rate], $nation[type]); - $income = $incomeList[0] + $incomeList[1]; - $originoutcome = getRiceOutcome($connect, $nation[nation], 100); // 100%의 지급량 - $outcome = round($originoutcome * $nation[bill] / 100); // 지급량에 따른 요구량 - - // 실제 지급량 계산 - $nation[rice] += $income; - // 기본량도 안될경우 - if($nation[rice] < $_baserice) { - $realoutcome = 0; - // 실지급율 - $ratio = 0; - //기본량은 넘지만 요구량이 안될경우 - } elseif($nation[rice] - $_baserice < $outcome) { - $realoutcome = $nation[rice] - $_baserice; - $nation[rice] = $_baserice; - // 실지급율 - $ratio = $realoutcome / $originoutcome; - } else { - $realoutcome = $outcome; - $nation[rice] -= $realoutcome; - // 실지급율 - $ratio = $realoutcome / $originoutcome; - } - $adminLog[count($adminLog)] = _String::Fill2($nation[name],12," ")." // 세곡 : "._String::Fill2($income,6," ")." // 세출 : "._String::Fill2($originoutcome,6," ")." // 실제 : ".tab2($realoutcome,6," ")." // 지급율 : ".tab2(round($ratio*100,2),5," ")." % // 결과곡 : ".tab2($nation[rice],6," "); - - $query = "select no,name,nation from general where nation='$nation[nation]' and level>='9'"; - $coreresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $corecount = MYDB_num_rows($coreresult); - $corelog[0] = "●이번 수입은 쌀 $income입니다."; - for($j=0; $j < $corecount; $j++) { - $coregen = MYDB_fetch_array($coreresult); - pushGenLog($coregen, $corelog); - } - - $query = "update nation set rice='$nation[rice]' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name,nation,dedication,rice from general where nation='$nation[nation]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - // 각 장수들에게 지급 - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $rice = round(getBill($general[dedication])*$ratio); - $general[rice] += $rice; - - $query = "update general set rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●봉급으로 쌀 $rice을 받았습니다."; - pushGenLog($general, $log); - } - } - - $history[0] = "●$admin[year]년 $admin[month]월:【지급】가을이 되어 봉록에 따라 군량이 지급됩니다."; - pushHistory($connect, $history); - pushAdminLog($connect, $adminLog); -} - -function getRiceIncome($connect, $nationNo, $rate, $admin_rate, $type) { - $query = "select no,city from general where nation='$nationNo' and level=4"; // 태수 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level4[$gen[no]] = $gen[city]; - } - $query = "select no,city from general where nation='$nationNo' and level=3"; // 군사 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level3[$gen[no]] = $gen[city]; - } - $query = "select no,city from general where nation='$nationNo' and level=2"; // 시중 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($j=0; $j < $count; $j++) { - $gen = MYDB_fetch_array($result); - $level2[$gen[no]] = $gen[city]; - } - - $query = "select capital,level from nation where nation='$nationNo'"; // 수도 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($cityresult); - - $query = "select * from city where nation='$nationNo' and supply='1'"; // 도시 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - //총 수입 구함 - $income[0] = 0; $income[1] = 0; // income[0] : 세수, income[1] : 수비병 세수 - for($j=0; $j < $citycount; $j++) { - $city = MYDB_fetch_array($cityresult); - - //민충 0~100 : 50~100 수입 - $ratio = $city[rate] / 2 + 50; - $tax1 = ($city[pop] * $city[agri] / $city[agri2] * $ratio / 1000) / 3; - $tax2 = $city[def] * $city[wall] / $city[wall2] / 3; - $tax1 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 - $tax2 *= (1 + $city[secu]/$city[secu2]/10); //치안에 따라 최대 10% 추가 - //도시 관직 추가 세수 - if($level4[$city[gen1]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level3[$city[gen2]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - if($level2[$city[gen3]] == $city[city]) { $tax1 *= 1.05; $tax2 *= 1.05; } - //수도 추가 세수 130%~105% - if($city[city] == $nation[capital]) { $tax1 *= 1+(1/3/$nation[level]); $tax2 *= 1+(1/3/$nation[level]); } - $income[0] += $tax1; - $income[1] += $tax2; - } - $income[0] *= ($rate / 20); - - // 국가보정 - if($type == 8) { $income[0] *= 1.1; $income[1] *= 1.1; } - if($type == 2 || $type == 4 || $type == 13) { $income[0] *= 0.9; $income[1] *= 0.9; } - - $income[0] = round($income[0] * ($admin_rate/100)); - $income[1] = round($income[1] * ($admin_rate/100)); - - return $income; -} - -function getRiceOutcome($connect, $nation, $bill) { - $query = "select dedication from general where nation='$nation'"; // 장수 목록 - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - //총 지출 구함 - $outcome = 0; - for($j=0; $j < $gencount; $j++) { - $general = MYDB_fetch_array($genresult); - $outcome += getBill($general[dedication]); - } - - $outcome = round($outcome * $bill / 100); - - return $outcome; -} - -function tradeRate($connect) { - $query = "select city,level,trade from city"; // 도시 목록 - $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); - //시세 - switch($city[level]) { - case 1: $per = 0; break; - case 2: $per = 0; break; - case 3: $per = 0; break; - case 4: $per = 20; break; - case 5: $per = 40; break; - case 6: $per = 60; break; - case 7: $per = 80; break; - case 8: $per = 100; break; - default:$per = 0; break; - } - if($per > rand()%100) { - $trade = rand() % 11 + 95; - } else { - $trade = 0; - } - $query = "update city set trade='$trade' where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function disaster($connect) { - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //재난표시 초기화 - $query = "update city set state=0 where state<=10"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 초반 3년은 스킵 - if($admin[startyear] + 3 > $admin[year]) return; - - $query = "select city,name,secu,secu2 from city"; // 도시 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - $disastertype = rand() % 4; - $isgood = 0; - if($admin[month] == 4 && $disastertype == 3) { $isgood = 1; } - if($admin[month] == 7 && $disastertype == 3) { $isgood = 1; } - - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($cityresult); - //호황 발생 도시 선택 ( 기본 3% 이므로 약 3개 도시 ) - //재해 발생 도시 선택 ( 기본 6% 이므로 약 6개 도시 ) - if($isgood == 1) { $ratio = 3 + round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% - else { $ratio = 6 - round(1.0*$city[secu]/$city[secu2]*3); } // 3 ~ 6% - - if(rand()%100+1 < $ratio) { - $disastercity[count($disastercity)] = $city[city]; - $disasterratio[count($disastercity)] = 1.0 * $city[secu] / $city[secu2]; - $disastername .= $city[name]." "; - } - } - - $disastername = "{$disastername}"; - - //재해 처리 - if(count($disastercity)) { - $state = 0; - switch($admin[month]) { - //봄 - case 1: - switch($disastertype) { - case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 역병이 발생하여 도시가 황폐해지고 있습니다."; - $state = 4; - break; - case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; - $state = 5; - break; - case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 추위가 풀리지 않아 얼어죽는 백성들이 늘어나고 있습니다."; - $state = 3; - break; - case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; - $state = 9; - break; - } - break; - //여름 - case 4: - switch($disastertype) { - case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 홍수로 인해 피해가 급증하고 있습니다."; - $state = 7; - break; - case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; - $state = 5; - break; - case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 태풍으로 인해 피해가 속출하고 있습니다."; - $state = 6; - break; - case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【호황】{$disastername}에 호황으로 도시가 번창하고 있습니다."; - $state = 2; - $isGood = 1; - break; - } - break; - //가을 - case 7: - switch($disastertype) { - case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 메뚜기 떼가 발생하여 도시가 황폐해지고 있습니다."; - $state = 8; - break; - case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; - $state = 5; - break; - case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 흉년이 들어 굶어죽는 백성들이 늘어나고 있습니다."; - $state = 8; - break; - case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【풍작】{$disastername}에 풍작으로 도시가 번창하고 있습니다."; - $state = 1; - $isGood = 1; - break; - } - break; - //겨울 - case 10: - switch($disastertype) { - case 0: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 혹한으로 도시가 황폐해지고 있습니다."; - $state = 3; - break; - case 1: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 지진으로 피해가 속출하고 있습니다."; - $state = 5; - break; - case 2: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 눈이 많이 쌓여 도시가 황폐해지고 있습니다."; - $state = 3; - break; - case 3: - $disaster[count($disaster)] = "●$admin[year]년 $admin[month]월:【재난】{$disastername}에 황건적이 출현해 도시를 습격하고 있습니다."; - $state = 9; - break; - } - break; - } - - if($isgood == 0) { - for($i=0; $i < count($disastercity); $i++) { - $ratio = 15 * $disasterratio[$i]; - $ratio = (80 + $ratio) / 100.0; // 치안률 따라서 80~95% - - $query = "update city set state='$state',pop=pop*{$ratio},rate=rate*{$ratio},agri=agri*{$ratio},comm=comm*{$ratio},secu=secu*{$ratio},def=def*{$ratio},wall=wall*{$ratio} where city='$disastercity[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - TrickInjury($connect, $disastercity[$i], 1); - } - } else { - for($i=0; $i < count($disastercity); $i++) { - $ratio = 4 * $disasterratio[$i]; - $ratio = (101 + $ratio) / 100.0; // 치안률 따라서 101~105% - - $city = getCity($connect, $disastercity[$i]); - $city[pop] *= $ratio; $city[rate] *= $ratio; $city[agri] *= $ratio; - $city[comm] *= $ratio; $city[secu] *= $ratio; $city[def] *= $ratio; - $city[wall] *= $ratio; - - if($city[pop] > $city[pop2]) { $city[pop] = $city[pop2]; } - if($city[rate] > 100) { $city[rate] = 100; } - if($city[agri] > $city[agri2]) { $city[agri] = $city[agri2]; } - if($city[comm] > $city[comm2]) { $city[comm] = $city[comm2]; } - if($city[secu] > $city[secu2]) { $city[secu] = $city[secu2]; } - if($city[def] > $city[def2]) { $city[def] = $city[def2]; } - if($city[wall] > $city[wall2]) { $city[wall] = $city[wall2]; } - - $query = "update city set state='$state',pop='$city[pop]',rate='$city[rate]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]',def='$city[def]',wall='$city[wall]' where city='$disastercity[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } - - pushHistory($connect, $disaster); -} - -function getAdmin($connect) { - $query = "select * from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - return $admin; -} - -function getMe($connect) { - $query = "select * from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - return $me; -} - -function getTroop($connect, $troop) { - $query = "select * from troop where troop='$troop'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $troop = MYDB_fetch_array($result); - - return $troop; -} - -function getCity($connect, $city, $sel="*") { - $query = "select {$sel} from city where city='$city'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - return $city; -} - -function getNation($connect, $nation) { - $query = "select * from nation where nation='$nation'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - return $nation; -} - -function newColor($color) { - switch($color) { - case "": - case "330000": - case "FF0000": - case "800000": - case "A0522D": - case "FF6347": - case "808000": - case "008000": - case "2E8B57": - case "008080": - case "6495ED": - case "0000FF": - case "000080": - case "483D8B": - case "7B68EE": - case "800080": - case "A9A9A9": - case "000000": - $color = "FFFFFF"; break; - default: - $color = "000000"; break; - } - return $color; -} - -function backColor($color) { - return newColor($color); -} - -function ConvertLog($str, $type=1) { - if($type > 0) { - $str = str_replace("<1>", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - //$str = str_replace("", "", $str); - //$str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - } else { - $str = str_replace("<1>", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - } - - return $str; -} - -function deleteNation($connect, $general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【멸망】$nation[name]은(는) 멸망했습니다."; - - // 전 장수 재야로 // 전 장수 소속 무소속으로 - $query = "update general set belong=0,troop=0,level=0,nation=0,makelimit=12 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 도시 공백지로 - $query = "update city set nation=0,front=0,gen1=0,gen2=0,gen3=0 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대 삭제 - $query = "delete from troop where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 국가 삭제 - $query = "delete from nation where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='$general[nation]' or you='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushHistory($connect, $history); -} - -function nextRuler($connect, $general) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select no,name from general where nation='$general[nation]' and level!='12' and level>='9' order by level desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $corecount = MYDB_num_rows($result); - - //npc or npc유저인 경우 후계 찾기 - if($general[npc] > 0) { - $query = "select no,name,nation,IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]')) as npcmatch2 from general where nation='$general[nation]' and level!=12 and npc>0 order by npcmatch2,rand() limit 0,1"; - $npcresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($npcresult); - } else { - $npccount = 0; - } - - // 수뇌부가 없으면 공헌도 최고 장수 - if($npccount > 0) { - $nextruler = MYDB_fetch_array($npcresult); - //국명 교체 - //$query = "update nation set name='$nextruler[name]' where nation='$general[nation]'"; - //MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($corecount == 0) { - $query = "select no,name from general where nation='$general[nation]' and level!='12' order by dedication desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $corecount = MYDB_num_rows($result); - - // 아무도 없으면 국가 삭제 - if($corecount == 0) { - //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); - deleteNation($connect, $general); - return; - } else { - $nextruler = MYDB_fetch_array($result); - } - } else { - $nextruler = MYDB_fetch_array($result); - } - - //군주 교체 - $query = "update general set level='12' where no='$nextruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //도시관직해제 - $query = "update city set gen1=0 where gen1='$nextruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //도시관직해제 - $query = "update city set gen2=0 where gen2='$nextruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //도시관직해제 - $query = "update city set gen3=0 where gen3='$nextruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받았습니다"; - - pushHistory($connect, $history); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:【유지】$nextruler[name](이)가 $nation[name]의 유지를 이어 받음."); - // 장수 삭제 및 부대처리는 checkTurn에서 -} - -function printCitysName($connect, $cityNo, $distance=1) { - $dist = distance($connect, $cityNo, $distance); - - $citynames = CityNameArray(); - $citynum = 94; - - $citystr = ""; - for($i=1; $i <= $citynum; $i++) { - - if($dist[$i] == $distance) { - $citystr = $citystr.$citynames[$i].", "; - } - } - - switch($distance) { - case 1: $color = "magenta"; break; - case 2: $color = "orange"; break; - default: $color = "yellow"; break; - } - echo "{$distance}칸 떨어진 도시 : {$citystr}
"; -} - -function backButton() { - echo " -
-"; -} - -function CoreBackButton() { - echo " -
-"; -} - -function closeButton() { - echo " -
-"; -} - -function distance($connect, $from, $maxDist=99) { - include_once("queue.php"); - - $query = "select city,path from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - for($i=0; $i < $cityNum; $i++) { - $city = MYDB_fetch_array($result); - $cityPath[$city[city]] = $city[path]; - $dist[$city[city]] = 99; - } - - $select = 0; - $queue = new Queue(20); - $queue2 = new Queue(20); - $q = $queue; - $q2 = $queue2; - $distance = $dist[$from] = 0; - $q->push($from); - while($q->getSize() > 0 || $q2->getSize() > 0) { - $distance++; - if($distance > $maxDist) return $dist; - while($q->getSize() > 0) { - $city = $q->pop(); - unset($path); - $path = explode("|", $cityPath[$city]); - for($i=0; $i < count($path); $i++) { - if($dist[$path[$i]] > $distance) { - $dist[$path[$i]] = $distance; - $q2->push($path[$i]); - } - } - } - if($select == 0) { - $q2 = $queue; - $q = $queue2; - } else { - $q = $queue; - $q2 = $queue2; - } - $select = 1 - $select; - } - - return $dist; -} - -function isClose($connect, $nation1, $nation2) { - $isClose = 0; - // $nation1의 모든 도시 - $query = "select path from city where nation='$nation1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - // 국가의 모든 도시 검색 - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($result); - - // 각 도시당 모든 인접 도시 플래그 세팅 - $path = explode("|", $city[path]); - for($j=0; $j < count($path); $j++) { - $barrier[$path[$j]] = 1; - } - } - - // $nation2의 모든 도시 선택 - $query = "select city from city where nation='$nation2'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($result); - - if($barrier[$city[city]] == 1) { - $isClose = 1; - } - } - - return $isClose; -} - -function CharExperience($exp, $personal) { - switch($personal) { - case 0: case 1; case 6: - $exp *= 1.1; break; - case 4: case 5: case 7: case 10: - $exp *= 0.9; break; - } - $exp = round($exp); - - return $exp; -} - -function CharDedication($ded, $personal) { - switch($personal) { - case 10: - $ded *= 0.9; break; - } - $ded = round($ded); - - return $ded; -} - -function CharAtmos($atmos, $personal) { - switch($personal) { - case 2: case 4: - $atmos += 5; break; - case 0: case 9: case 10: - $atmos -= 5; break; - } - - return $atmos; -} - -function CharTrain($train, $personal) { - switch($personal) { - case 3: case 5: - $train += 5; break; - case 1: case 8: case 10: - $train -= 5; break; - } - - return $train; -} - -function CharCost($cost, $personal) { - switch($personal) { - case 7: case 8: case 9: - $cost *= 0.8; break; - case 2: case 3: case 6: - $cost *= 1.2; break; - } - - return $cost; -} - -function CharCritical($rate, $personal) { - switch($personal) { - case 10: - $rate += 10; break; - } - - return $rate; -} - -function TrickInjury($connect, $city, $type=0) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,name,nation from general where city='$city'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - if($type == 0) { - $log[0] = "●{$admin[month]}월:계략으로 인해 부상을 당했습니다."; - } else { - $log[0] = "●{$admin[month]}월:재난으로 인해 부상을 당했습니다."; - } - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - - $injury = rand() % 100; - if($injury < 30) { // 부상률 30% - $injury = floor($injury / 2) + 1; // 부상 1~16 - - $query = "update general set crew=crew*0.98,atmos=atmos*0.98,train=train*0.98,injury=injury+'$injury' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($general, $log); - } - } -} - -function getRandTurn($term) { - switch($term) { - case 0: $randtime = rand() % 7200; break; - case 1: $randtime = rand() % 3600; break; - case 2: $randtime = rand() % 1800; break; - case 3: $randtime = rand() % 1200; break; - case 4: $randtime = rand() % 600; break; - case 5: $randtime = rand() % 300; break; - case 6: $randtime = rand() % 120; break; - case 7: $randtime = rand() % 60; break; - default:$randtime = rand() % 3600; break; - } - - $turntime = date('Y-m-d H:i:s', strtotime('now') + $randtime); - - return $turntime; -} - -function getRandTurn2($term) { - switch($term) { - case 0: $randtime = rand() % 7200; break; - case 1: $randtime = rand() % 3600; break; - case 2: $randtime = rand() % 1800; break; - case 3: $randtime = rand() % 1200; break; - case 4: $randtime = rand() % 600; break; - case 5: $randtime = rand() % 300; break; - case 6: $randtime = rand() % 120; break; - case 7: $randtime = rand() % 60; break; - default:$randtime = rand() % 3600; break; - } - - $turntime = date('Y-m-d H:i:s', strtotime('now') - $randtime); - - return $turntime; -} - -function ScoutMsg($connect, $genNum, $nationName, $who, $msgIndex) { - // 상대에게 발송 - $msgIndex++; - if($msgIndex >= 10) { $msgIndex = 0; } - - $date = date('Y-m-d H:i:s'); - //등용 서신시 장수번호/내 번호 - $me = $genNum * 10000 + $who; - $query = "update general set msgindex='$msgIndex',msg{$msgIndex}='{$nationName}(으)로 망명 권유 서신',msg{$msgIndex}_who='$me',msg{$msgIndex}_when='$date',msg{$msgIndex}_type='11' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function command_Single($connect, $turn, $command) { - $command = EncodeCommand(0, 0, 0, $command); - - $count = sizeof($turn); - $str = "con=con"; - for($i=0; $i < $count; $i++) { - $str .= ",turn{$turn[$i]}='{$command}'"; - } - $query = "update general set {$str} where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; - -} - -function command_Chief($connect, $turn, $command) { - $command = EncodeCommand(0, 0, 0, $command); - - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[level] >= 5) { - $count = sizeof($turn); - $str = "type=type"; - for($i=0; $i < $count; $i++) { - $str .= ",l{$me[level]}turn{$turn[$i]}='{$command}'"; - } - $query = "update nation set {$str} where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - echo ""; -} - -function command_Other($connect, $turn, $commandtype) { - echo "
"; - $count = sizeof($turn); - for($i=0; $i < $count; $i++) { - echo ""; - } - echo ""; - echo "
"; - echo "a"; // 없으면 파폭에서 아래 스크립트 실행 안됨 - echo ""; -} - -function GetNationColors() { - $colors = array("FF0000", "800000", "A0522D", "FF6347", "FFA500", "FFDAB9", "FFD700", "FFFF00", - "7CFC00", "00FF00", "808000", "008000", "2E8B57", "008080", "20B2AA", "6495ED", "7FFFD4", - "AFEEEE", "87CEEB", "00FFFF", "00BFFF", "0000FF", "000080", "483D8B", "7B68EE", "BA55D3", - "800080", "FF00FF", "FFC0CB", "F5F5DC", "E0FFFF", "FFFFFF", "A9A9A9"); - return $colors; -} - -function EncodeCommand($fourth, $third, $double, $command) { - $str = _String::Fill2($fourth, 4, "0"); - $str .= _String::Fill2($third, 4, "0"); - $str .= _String::Fill2($double, 4, "0"); - $str .= _String::Fill2($command, 2, "0"); - return $str; -} - -function DecodeCommand($str) { - $command[3] = floor(substr($str, 0, 4)); - $command[2] = floor(substr($str, 4, 4)); - $command[1] = floor(substr($str, 8, 4)); - $command[0] = floor(substr($str, 12, 2)); - return $command; -} - -function OptionsForCitys() { - $citynames = CityNameArray(); - - for($i=1; $i <= 94; $i++) { - echo " - "; - } -} - -function Submit($url, $msg="", $msg2="") { - echo "a"; // 파폭 버그 때문 - echo " -
- - -
- - "; -} - diff --git a/che/func_auction.php b/che/func_auction.php deleted file mode 100644 index 065d6919..00000000 --- a/che/func_auction.php +++ /dev/null @@ -1,347 +0,0 @@ - 20000) { $general[gold] = 20000; } - if($general[rice] < 1000) { $general[rice] = 1000; } - if($general[rice] > 20000) { $general[rice] = 20000; } - -/* - // 유닉템 등록 - $query = "select * from auction where stuff!='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - // 유닉템 거래가 없을 경우 1% 확률로 등장 - if($count == 0 && rand()%100 < 1) { - // 유닉템 선택 - $sel = rand() % 4 + 1; - switch($sel) { - case 1: $type = "weap"; break; - case 2: $type = "book"; break; - case 3: $type = "horse"; break; - case 4: $type = "item"; break; - } - $query = "select no,{$type} from general where {$type}>6"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - if($count < 20) { - for($i=0; $i < $count; $i++) { - $gen = MYDB_fetch_array($result); - $occupied[$gen[$type]] = 1; - } - for($i=7; $i <= 26; $i++) { - if($occupied[$i] == 0) { - $item[count($item)] = $i; - } - } - $it = $item[rand() % count($item)]; - $stuff = $it * 10 + $sel; - - //평균 금의 100% - $amount = 1; - $cost = $general[gold]; - $topv = $general[maxgold] * 10; - if($cost < 5000) { $cost = 5000; } - if($topv < 10000) { $topv = 10000; } - - $cost = round($cost / 10) * 10; - $topv = round($topv / 10) * 10; - - $term = 12; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ암시장상인', '$stuff', '$amount', '$cost', '$cost', '$topv', '$date')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[0] = "●{$admin[month]}월:".GetStuffName($stuff)."(이)가 거래장에 등장했습니다!"; - $history[0] = "●$admin[year]년 $admin[month]월:【암시장】ⓝ암시장상인(이)가 ".GetStuffName($stuff)."(을)를 판다는 소문이 돌고 있습니다!"; - pushAllLog($alllog); - pushHistory($connect, $history); - } - } -*/ - - $query = "select * from auction where type='0' and stuff='0' and no1='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - $count += 5; - // 판매건 등록 - if(rand()%$count == 0) { - //평균 쌀의 5% ~ 25% - $mul = rand() % 5 + 1; - $amount = $general[rice] / 20 * $mul; - $cost = $general[gold] / 20 * 0.9 * $mul; - $topv = $amount * 2; - if($cost <= $amount*0.8) { $cost = $amount*0.8; } - if($cost >= $amount*1.2) { $cost = $amount*1.2; } - - $amount = round($amount / 10) * 10; - $cost = round($cost / 10) * 10; - $topv = round($topv / 10) * 10; - - $term = 3 + rand() % 10; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (0, '0', 'ⓝ상인', '0', '$amount', '$cost', '$cost', '$topv', '$date')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $query = "select * from auction where type='1' and stuff='0' and no1='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - $count += 5; - // 구매건 등록 - if(rand()%$count == 0) { - //평균 쌀의 5% ~ 25% - $mul = rand() % 5 + 1; - $amount = $general[rice] / 20 * $mul; - $cost = $general[gold] / 20 * 1.1 * $mul; - $topv = $amount * 0.5; - if($cost <= $amount*0.8) { $cost = $amount*0.8; } - if($cost >= $amount*1.2) { $cost = $amount*1.2; } - - $amount = round($amount / 10) * 10; - $cost = round($cost / 10) * 10; - $topv = round($topv / 10) * 10; - - $term = 3 + rand() % 10; - $date = date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s")) + $unit * $term); - $query = "insert into auction (type, no1, name1, stuff, amount, cost, value, topv, expire) values (1, '0', 'ⓝ상인', '0', '$amount', '$cost', '$cost', '$topv', '$date')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function processAuction($connect) { - $date = date("Y-m-d H:i:s"); - - $query = "select year,month from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from auction where expire<='$date'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count2 = MYDB_num_rows($result2); - - for($i=0; $i < $count2; $i++) { - $auction = MYDB_fetch_array($result2); - - // 유닉템 처리 - if($auction[stuff] != 0) { - if($auction[no2] == 0) { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, 그러나 입찰자 부재"; - pushAuctionLog($connect, $auctionLog); - } else { - $trader[no] = 0; - $trader[name] = 'ⓝ암시장상인'; - $trader[gold] = 99999999; - $trader[rice] = 99999999; - - $query = "select no,name,gold,rice from general where no='$auction[no2]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $bidder = MYDB_fetch_array($result); - - $sel1 = $auction[stuff] % 10; - $sel2 = floor($auction[stuff] / 10); - switch($sel1) { - case 1: $type = "weap"; break; - case 2: $type = "book"; break; - case 3: $type = "horse"; break; - case 4: $type = "item"; break; - } - // 이미 유닉템이 풀렸는지 검사 - $query = "select no from general where {$type}='$sel2'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - // 판매거래만 존재 - if($count > 0) { - $traderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 아이템 이미 매진!"; - } elseif($auction[value] > $bidder[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 ".GetStuffName($auction[stuff])." 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; - } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 ".GetStuffName($auction[stuff])."(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, ".GetStuffName($auction[stuff])." 구입!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction[stuff])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; - $auctionLog[0] .= " ★ 아이템 거래 ★"; - - $query = "update general set gold=gold-'$auction[value]',{$type}='$sel2' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[0] = "●{$admin[month]}월:$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; - $history[0] = "●$admin[year]년 $admin[month]월:【암시장】$auction[name2](이)가 ".GetStuffName($auction[stuff])."(을)를 구매했습니다!"; - pushAllLog($alllog); - pushHistory($connect, $history); - } - pushGenLog($trader, $traderLog); - pushGenLog($bidder, $bidderLog); - pushAuctionLog($connect, $auctionLog); - } - } else { - // 쌀 처리 - if($auction[no2] == 0) { - // 상인건수가 아닌것만 출력 - if($auction[no1] != 0) { - $query = "select no from general where no='$auction[no1]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $trader = MYDB_fetch_array($result); - - $traderLog[0] = "◆입찰자 부재로 {$auction[no]}번 거래 유찰!"; - if($auction[type] == 0) { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, 그러나 입찰자 부재"; - } else { - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, 그러나 입찰자 부재"; - } - pushGenLog($trader, $traderLog); - pushAuctionLog($connect, $auctionLog); - } - } else { - if($auction[no1] == 0) { - $trader[no] = 0; - $trader[name] = 'ⓝ상인'; - $trader[gold] = 99999; - $trader[rice] = 99999; - } else { - $query = "select no,name,gold,rice from general where no='$auction[no1]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $trader = MYDB_fetch_array($result); - } - - $query = "select no,name,gold,rice from general where no='$auction[no2]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $bidder = MYDB_fetch_array($result); - //판매거래 - if($auction[type] == 0) { - if($auction[amount] > $trader[rice] - 1000) { - $gold = round($auction[value] * 0.01); - $trader[gold] -= $gold; - if($trader[gold] < 0) $trader[gold] = 0; - $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $traderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; - } elseif($auction[value] > $bidder[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; - } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 판매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 구매"; - if($auction[value] >= $auction[amount] * 2) { - $auctionLog[0] .= " ★ 최고가 거래 ★"; - } elseif($auction[value] >= $auction[topv]) { - $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; - } elseif($auction[value] * 2 <= $auction[amount]) { - $auctionLog[0] .= " ★ 최저가 거래 ★"; - } - $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no1]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushGenLog($trader, $traderLog); - pushGenLog($bidder, $bidderLog); - pushAuctionLog($connect, $auctionLog); - //구매거래 - } else { - if($auction[amount] > $bidder[rice] - 1000) { - $gold = round($auction[value] * 0.01); - $bidder[gold] -= $gold; - if($bidder[gold] < 0) $bidder[gold] = 0; - $query = "update general set gold='$bidder[gold]' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰!"; - $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; - } elseif($auction[value] > $trader[gold] - 1000) { - $gold = round($auction[value] * 0.01); - $trader[gold] -= $gold; - if($trader[gold] < 0) $trader[gold] = 0; - $query = "update general set gold='$trader[gold]' where no='$auction[no1]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $traderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰! 벌금 {$gold}"; - $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction[no]}번 거래 유찰!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; - } else { - $traderLog[0] = "◆{$auction[no]}번 거래 성사로 금 {$auction[value]}(을)를 지불, 쌀 {$auction[amount]}(을)를 구입!"; - $bidderLog[0] = "◆{$auction[no]}번 거래 성사로 쌀 {$auction[amount]}(을)를 판매, 금 {$auction[value]}(을)를 획득!"; - $auctionLog[0] = "◆$admin[year]년 $admin[month]월, {$auction[no]}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction[amount]}(을)를 구매, {$auction[name2]}(이)가 금 {$auction[value]}(으)로 판매"; - if($auction[value] >= $auction[amount] * 2) { - $auctionLog[0] .= " ★ 최고가 거래 ★"; - } elseif($auction[value] * 2 <= $auction[amount]) { - $auctionLog[0] .= " ★ 최저가 거래 ★"; - } elseif($auction[value] <= $auction[topv]) { - $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; - } - - $query = "update general set gold=gold-'$auction[value]',rice=rice+'$auction[amount]' where no='$auction[no1]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold+'$auction[value]',rice=rice-'$auction[amount]' where no='$auction[no2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushGenLog($trader, $traderLog); - pushGenLog($bidder, $bidderLog); - pushAuctionLog($connect, $auctionLog); - } - } - } - } - - $query = "delete from auction where expire<='$date'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/func_history.php b/che/func_history.php deleted file mode 100644 index 210eca7c..00000000 --- a/che/func_history.php +++ /dev/null @@ -1,130 +0,0 @@ -{$year}년 {$month}월:"; - for($i=0; $i < $count; $i++) { - $line = $log[count($log)-2-$i]; - if($line == "") { - continue; - } - - if(strpos($line, $prefix) || $isFirst == 1) { - $str = ConvertLog($line).'
'.$str; - } else { - break; - } - } - if($str == "") { - $str = "●{$year}년 {$month}월: 기록 없음"; - $str = ConvertLog($str); - } - return $str; -} - -function getGenHistory($count, $year, $month, $isFirst=0) { - $fp = @fopen("logs/_alllog.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $log = explode("\r\n",$file); - - $str = ""; - $prefix = "{$month}월:"; - $year -= 1; - $prefixYear = "{$month}월:{$year}"; - for($i=0; $i < $count; $i++) { - $line = $log[count($log)-2-$i]; - if($line == "") { - continue; - } - - if(strpos($line, $prefixYear)) { - break; - } elseif(strpos($line, $prefix) || $isFirst == 1) { - $str = ConvertLog($line).'
'.$str; - } else { - break; - } - } - if($str == "") { - $str = "●{$month}월: 기록 없음"; - $str = ConvertLog($str); - } - return $str; -} - -function LogHistory($connect, $isFirst=0) { - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Start'); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - if($isFirst == 1) { - $admin['year'] -= 1; - $admin['month'] = 12; - } - - $file = explode('/', __FILE__); - $url = '/'.$file[count($file)-3].'/'.$file[count($file)-2].'/map.php?type=2&graphic=0'; - - /* 소켓 통신을 통하여 필요한 html정보를 가져옴 */ - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Start HTTP'); - $http = new HTTP("62che.com", 80, 10); - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Connect end, '.$http->GetError()); - if($http->GetErr() == true) { return false; } - $http->setHttpVersion("1.1"); - $cookie = ""; - $http->Get($url, $cookie); - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Response end, '.$http->GetError()); - if($http->GetErr() == true) { return false; } - $map = $http->Response["body"]; - $map = str_replace("'", '<_quot_>', $map); - $map = str_replace('"', '<_dquot_>', $map); - $http->Close(); - if($http->GetErr() == true) { return false; } - - $log = getHistory(20, $admin['year'], $admin['month'], $isFirst); - $genlog = getGenHistory(50, $admin['year'], $admin['month'], $isFirst); - - $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); - - $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); - - $nationStr .= " $nation[name]
"; - $powerStr .= "국력 $nation[power]
"; - $genStr .= "장수 $nation[gennum]
"; - $cityStr .= "속령 $citycount
"; - } - - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', contents collected'); - - @MYDB_query(" - insert into history ( - year, month, map, log, genlog, nation, power, gen, city - ) values ( - '$admin[year]', '$admin[month]', '$map', '$log', '$genlog', '$nationStr', '$powerStr', '$genStr', '$cityStr' - )", - $connect) or Error(__LINE__.MYDB_error($connect),""); - - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', LogHistory Finish'); - return true; -} diff --git a/che/func_http.php b/che/func_http.php deleted file mode 100644 index c809b579..00000000 --- a/che/func_http.php +++ /dev/null @@ -1,287 +0,0 @@ -Server = $Server; - $this->Port = $Port; - $this->Timeout = $Timeout; - - $this->Socket = @fsockopen ($this->Server, $this->Port, $errno, $errstr, $this->Timeout); - if(!$this->Socket){ - $this->Error(0, "Socket Connection Fail"); - } - } - - function setTimeout($Timeout){ - $this->Timeout = $Timeout; - } - - function setHttpVersion($HttpVersion){ - $this->HttpVersion = $HttpVersion; - } - - function Head($Url = "/") { - $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - - return $this->Read(); - } - - function isHead($Url = "/"){ - $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - - return $this->isOK(); - } - - function GetHead($Url = "/") { - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - $out = $this->ReadHeader(); - return $out; - } - - function Get($Url = "/", $Cookie="") { - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - return $this->Read(); - } - - function isGet($Url = "/", $Cookie=""){ - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - return $this->isOK(); - } - - function isGetAll($Url = "/", $Cookie=""){ - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\n\n"; - fputs($this->Socket, $msg); - - $data = $this->Read(); - $this->Length = strlen($data); - return $this->isOK($data); - } - - function Post($Url, $Data, $Cookie = ""){ - $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); - if($Cookie != ""){ - $this->PutCookie($Cookie); - } - $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); - $out = ""; - while (list ($k, $v) = each ($Data)) { - if(strlen($out) != 0) $out .= "&"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); - fputs ($this->Socket, "$out"); - fputs ($this->Socket, "\n"); - return $this->Read(); - } - - function IsPost($Url, $Data, $Cookie = ""){ - $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); - if($Cookie != ""){ - $this->PutCookie($Cookie); - } - $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); - $out = ""; - while (list ($k, $v) = each ($Data)) { - if(strlen($out) != 0) $out .= "&"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); - fputs ($this->Socket, "$out"); - fputs ($this->Socket, "\n"); - return $this->isOk(); - } - - function PutHead(){ - $msg = ""; - $msg .= "Accept: */*\r\n"; - $msg .= "Accept-Language: ko\r\n"; - $msg .= "Accept-Encoding: gzip, deflate\r\n"; - $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\r\n"; - while (list($name, $value) = each ($this->headers)) { - $msg .= "$name: $value\r\n"; - } - $msg .= "Host: ".$this->Server.":".$this->Port."\r\n"; - $msg .= "Connection: close\r\n"; - return $msg; - } - - function AddHeader($name, $value){ - $this->headers[$name] = $value; - } - - function PutCookie($cookie){ - $msg = ""; - if(is_array($cookie)){ - $out = ""; - while (list ($k, $v) = each ($cookie)) { - if(strlen($out) != 0) $out .= ";"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - $msg = "Cookie: $out\n"; - } else { - $msg = "Cookie: $cookie\n"; - } - return $msg; - } - - function Read(){ - $out = $this->ReadHeader(); - $chunked = isset($this->Response['transfer-encoding']) && ('chunked' == $this->Response['transfer-encoding']); - $gzipped = isset($this->Response['content-encoding']) && ('gzip' == $this->Response['content-encoding']); - $body = ''; - while(!feof($this->Socket)){ - if ($chunked) { - $buf = $this->_readChunked(); - } else { - $buf = fread($this->Socket, 4096); - } - $body .= $buf; - } - if($gzipped){ - $body = gzinflate(substr($body, 10)); - } - $this->Response['body'] = $body; - $out .= $body; - return $out; - } - - function ReadHeader(){ - $out = ''; - $buf = $this->_readLine(); - if (sscanf($buf, 'HTTP/%s %s', $http_version, $returncode) != 2) { - $this->Error(0,"Malformed response"); - return false; - } else { - $this->Response["protocol"] = 'HTTP/' . $http_version; - $this->Response["code"] = intval($returncode); - } - $out .= $buf; - while(!feof($this->Socket)){ - $buf = $this->_readLine(); - $out .= $buf; - - if($buf == "\n" || $buf == "\r\n"){ - break; - } - - list($name,$value) = split(":",rtrim($buf,"\r\n"),2); - $this->Response[strtolower($name)] = trim($value); - } - $this->Response["header"] = $out; - return $out; - } - - function isOk($buffer = ""){ - if($buffer == "") $buffer .= fgets($this->Socket, 128); - if(preg_match('/^HTTP\/.* (2\d{2}|3\d{2}).*/', $buffer)){ - return true; - } - return false; - } - - function _readLine(){ - $line = ''; - while(!feof($this->Socket)){ - $line .= fgets($this->Socket, 4096); - if (substr($line, -2) == "\r\n" || substr($line, -1) == "\n") { - return $line; - } - } - return $line; - } - - function _readAll(){ - $data = ''; - while(!feof($this->Socket)){ - $data .= fread($this->Socket, 4096); - } - return $data; - } - - function _readChunked(){ - // at start of the next chunk? - if (0 == $this->_chunkLength) { - $line = $this->_readLine(); - if (preg_match('/^([0-9a-f]+)/i', $line, $matches)) { - $this->_chunkLength = hexdec($matches[1]); - // Chunk with zero length indicates the end - if (0 == $this->_chunkLength) { - $this->_readAll(); // make this an eof() - return ''; - } - } - } - $data = fread($this->Socket, $this->_chunkLength); - $this->_chunkLength -= strlen($data); - if (0 == $this->_chunkLength) { - $this->_readLine(); // Trailing CRLF - } - return $data; - } - - function Close(){ - fclose($this->Socket); - } - - function Error($errnum, $errmsg){ - $this->Err = true; - $this->ErrNum = $errnum; - $this->ErrMsg = $errmsg; - } - - function GetErr() { - return $this->Err; - } - - function GetError() { - if($this->Err == true) { - return "{$this->ErrNum}, {$this->ErrMsg}"; - } else { - return "No Err"; - } - } -} diff --git a/che/func_npc.php b/che/func_npc.php deleted file mode 100644 index c1444023..00000000 --- a/che/func_npc.php +++ /dev/null @@ -1,1863 +0,0 @@ - 0) { - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1492, 123, "가화",$img,1492, 0, "-", 50, 66, 40, 0, 176, 224, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1493, 999, "건석",$img,1493, 0, "-", 21, 12, 61, 0, 155, 189, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1494, 999, "견씨",$img,1494, 0, "-", 35, 24, 58, 0, 182, 221, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1495, 40, "견홍",$img,1495, 0, "-", 76, 72, 66, 0, 224, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1496, 120, "고담",$img,1496, 0, "-", 33, 21, 69, 0, 203, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1497, 101, "고유",$img,1497, 0, "-", 56, 44, 73, 0, 174, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1498, 132, "곽마",$img,1498, 0, "-", 68, 71, 49, 0, 239, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1499, 39, "관구수",$img,1499, 0, "-", 58, 63, 35, 0, 206, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1500, 39, "관구전",$img,1500, 0, "-", 63, 58, 68, 0, 224, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1501, 999, "관로",$img,1501, 0, "-", 62, 21, 75, 0, 191, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1502, 65, "관정",$img,1502, 0, "-", 35, 50, 73, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1503, 137, "교수",$img,1503, 0, "-", 67, 69, 39, 0, 143, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1504, 33, "구건",$img,1504, 0, "-", 43, 56, 69, 0, 239, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1505, 41, "구본",$img,1505, 0, "-", 52, 41, 70, 0, 232, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1506, 12, "구성",$img,1506, 0, "-", 56, 71, 31, 0, 157, 187, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1507, 21, "국연",$img,1507, 0, "-", 52, 21, 71, 0, 160, 219, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1508, 99, "국의",$img,1508, 0, "-", 83, 79, 50, 0, 146, 191, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1509, 34, "금의",$img,1509, 0, "-", 18, 40, 63, 0, 177, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1510, 76, "나헌",$img,1510, 0, "-", 86, 67, 75, 0, 218, 270, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1511, 999, "남두",$img,1511, 0, "-", 35, 25, 54, 0, 130, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1512, 54, "냉포",$img,1512, 0, "-", 70, 82, 69, 0, 176, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1513, 124, "노숙2",$img,1513, 0, "-", 70, 55, 76, 0, 208, 274, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1514, 42, "누규",$img,1514, 0, "-", 54, 19, 88, 0, 143, 212, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1515, 6, "누반",$img,1515, 0, "-", 65, 76, 39, 0, 178, 207, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1516, 130, "누현",$img,1516, 0, "-", 23, 20, 68, 0, 223, 275, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1517, 40, "당균",$img,1517, 0, "-", 33, 19, 81, 0, 229, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1518, 32, "당빈",$img,1518, 0, "-", 70, 74, 62, 0, 235, 294, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1519, 999, "대교",$img,1519, 0, "-", 42, 10, 54, 0, 177, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1520, 28, "대릉",$img,1520, 0, "-", 64, 75, 45, 0, 199, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1521, 129, "동조",$img,1521, 0, "-", 16, 15, 51, 0, 221, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1522, 114, "등수",$img,1522, 0, "-", 35, 20, 44, 0, 228, 288, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1523, 50, "마막",$img,1523, 0, "-", 22, 17, 5, 0, 221, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1524, 116, "만욱",$img,1524, 0, "-", 20, 18, 66, 0, 240, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1525, 120, "맹종",$img,1525, 0, "-", 48, 48, 67, 0, 216, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1526, 38, "문호",$img,1526, 0, "-", 65, 74, 45, 0, 227, 279, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1527, 999, "미씨",$img,1527, 0, "-", 59, 15, 68, 0, 176, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1528, 39, "반림",$img,1528, 0, "-", 66, 79, 8, 0, 168, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1529, 129, "반장",$img,1529, 0, "-", 77, 78, 69, 0, 177, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1530, 94, "방열",$img,1530, 0, "-", 58, 82, 28, 0, 153, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1531, 55, "방희",$img,1531, 0, "-", 59, 38, 69, 0, 153, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1532, 30, "배수",$img,1532, 0, "-", 10, 11, 77, 0, 223, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1533, 8, "번능",$img,1533, 0, "-", 70, 61, 47, 0, 158, 194, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1534, 999, "번씨",$img,1534, 0, "-", 32, 17, 45, 0, 176, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1535, 49, "보도근",$img,1535, 0, "-", 64, 73, 50, 0, 170, 233, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1536, 129, "보천",$img,1536, 0, "-", 68, 60, 72, 0, 222, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1537, 121, "보협",$img,1537, 0, "-", 73, 53, 75, 0, 216, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1538, 28, "부하",$img,1538, 0, "-", 44, 36, 85, 0, 209, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1539, 26, "비요",$img,1539, 0, "-", 70, 65, 73, 0, 192, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1540, 31, "사마주",$img,1540, 0, "-", 63, 53, 62, 0, 227, 283, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1541, 41, "사찬",$img,1541, 0, "-", 61, 71, 54, 0, 215, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1542, 128, "설후",$img,1542, 0, "-", 16, 14, 71, 0, 221, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1543, 36, "성공영",$img,1543, 0, "-", 73, 58, 80, 0, 172, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1544, 126, "성만",$img,1544, 0, "-", 61, 69, 66, 0, 225, 276, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1545, 999, "소교",$img,1545, 0, "-", 57, 23, 66, 0, 178, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1546, 46, "소유",$img,1546, 0, "-", 51, 61, 48, 0, 164, 210, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1547, 31, "소제2",$img,1547, 0, "-", 22, 16, 78, 0, 224, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1548, 126, "손교",$img,1548, 0, "-", 77, 60, 69, 0, 181, 219, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1549, 116, "손기",$img,1549, 0, "-", 62, 65, 52, 0, 227, 276, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1550, 999, "손상향",$img,1550, 0, "-", 72, 62, 42, 0, 193, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1551, 125, "손익",$img,1551, 0, "-", 69, 75, 26, 0, 184, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1552, 125, "손진",$img,1552, 0, "-", 64, 71, 48, 0, 234, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1553, 123, "송겸",$img,1553, 0, "-", 61, 48, 44, 0, 175, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1554, 85, "순심",$img,1554, 0, "-", 20, 21, 79, 0, 164, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1555, 31, "순욱2",$img,1555, 0, "-", 10, 16, 77, 0, 225, 289, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1556, 31, "순의",$img,1556, 0, "-", 16, 11, 73, 0, 207, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1557, 129, "시삭",$img,1557, 0, "-", 36, 66, 44, 0, 226, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1558, 29, "신창",$img,1558, 0, "-", 51, 29, 46, 0, 210, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1559, 999, "악신",$img,1559, 0, "-", 53, 12, 46, 0, 175, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1560, 138, "악취",$img,1560, 0, "-", 56, 68, 58, 0, 157, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1561, 138, "양강",$img,1561, 0, "-", 62, 70, 42, 0, 160, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1562, 21, "양부",$img,1562, 0, "-", 68, 55, 85, 0, 178, 239, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1563, 72, "양서",$img,1563, 0, "-", 56, 62, 66, 0, 198, 260, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1564, 34, "양습",$img,1564, 0, "-", 67, 49, 73, 0, 168, 230, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1565, 16, "양앙",$img,1565, 0, "-", 65, 70, 39, 0, 172, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1566, 17, "양임",$img,1566, 0, "-", 71, 78, 56, 0, 170, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1567, 32, "양제",$img,1567, 0, "-", 69, 63, 71, 0, 226, 291, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1568, 33, "양조2",$img,1568, 0, "-", 65, 61, 67, 0, 223, 286, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1569, 48, "양추2",$img,1569, 0, "-", 66, 67, 61, 0, 172, 238, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1570, 140, "양홍",$img,1570, 0, "-", 19, 17, 76, 0, 152, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1571, 31, "양혼",$img,1571, 0, "-", 60, 67, 63, 0, 220, 278, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1572, 123, "여거",$img,1572, 0, "-", 71, 58, 69, 0, 196, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1573, 130, "여대",$img,1573, 0, "-", 83, 72, 70, 0, 161, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1574, 136, "염상",$img,1574, 0, "-", 29, 27, 69, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1575, 36, "염행",$img,1575, 0, "-", 70, 86, 38, 0, 159, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1576, 73, "영수",$img,1576, 0, "-", 69, 70, 74, 0, 234, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1577, 39, "오거",$img,1577, 0, "-", 49, 63, 32, 0, 151, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1578, 126, "오경",$img,1578, 0, "-", 73, 60, 57, 0, 159, 203, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1579, 999, "오국태",$img,1579, 0, "-", 31, 11, 60, 0, 161, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1580, 126, "오찬",$img,1580, 0, "-", 69, 41, 78, 0, 181, 245, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1581, 23, "온회",$img,1581, 0, "-", 42, 40, 78, 0, 178, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1582, 21, "왕기2",$img,1582, 0, "-", 70, 66, 63, 0, 217, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1583, 32, "왕도",$img,1583, 0, "-", 48, 44, 70, 0, 210, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1584, 123, "왕돈",$img,1584, 0, "-", 60, 65, 41, 0, 198, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1585, 34, "왕릉",$img,1585, 0, "-", 73, 60, 71, 0, 172, 251, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1586, 63, "왕문",$img,1586, 0, "-", 64, 67, 32, 0, 162, 205, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1587, 32, "왕상",$img,1587, 0, "-", 25, 19, 65, 0, 180, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1588, 34, "왕숙",$img,1588, 0, "-", 35, 21, 80, 0, 195, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1589, 33, "왕업",$img,1589, 0, "-", 32, 6, 46, 0, 220, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1590, 35, "왕충",$img,1590, 0, "-", 42, 58, 21, 0, 152, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1591, 1, "우보",$img,1591, 0, "-", 43, 63, 12, 0, 159, 192, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1592, 122, "우사",$img,1592, 0, "-", 70, 33, 79, 0, 217, 273, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1593, 138, "원요",$img,1593, 0, "-", 44, 42, 45, 0, 177, 206, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1594, 95, "원유",$img,1594, 0, "-", 57, 38, 73, 0, 150, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1595, 31, "위관",$img,1595, 0, "-", 69, 45, 81, 0, 220, 291, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1596, 129, "위막",$img,1596, 0, "-", 58, 62, 60, 0, 221, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1597, 55, "유괴",$img,1597, 0, "-", 75, 72, 66, 0, 165, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1598, 129, "유략",$img,1598, 0, "-", 72, 68, 59, 0, 206, 260, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1599, 45, "유반",$img,1599, 0, "-", 74, 79, 48, 0, 168, 210, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1600, 29, "유복",$img,1600, 0, "-", 54, 50, 73, 0, 164, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1601, 78, "유선2",$img,1601, 0, "-", 9, 21, 39, 0, 224, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1602, 139, "유섭",$img,1602, 0, "-", 62, 79, 26, 0, 158, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1603, 28, "유소",$img,1603, 0, "-", 66, 51, 73, 0, 195, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1604, 128, "유승",$img,1604, 0, "-", 46, 69, 29, 0, 215, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1605, 129, "유찬",$img,1605, 0, "-", 74, 75, 66, 0, 172, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1606, 129, "유평",$img,1606, 0, "-", 65, 70, 67, 0, 218, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1607, 138, "유훈",$img,1607, 0, "-", 51, 64, 50, 0, 163, 216, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1608, 48, "이감",$img,1608, 0, "-", 59, 67, 33, 0, 176, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1609, 19, "이승",$img,1609, 0, "-", 13, 26, 32, 0, 201, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1610, 22, "이통",$img,1610, 0, "-", 75, 84, 52, 0, 168, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1611, 138, "이풍2",$img,1611, 0, "-", 72, 77, 50, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1612, 20, "이풍3",$img,1612, 0, "-", 23, 25, 71, 0, 204, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1613, 29, "장구",$img,1613, 0, "-", 69, 71, 47, 0, 201, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1614, 21, "장기",$img,1614, 0, "-", 77, 35, 79, 0, 170, 223, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1615, 74, "장남",$img,1615, 0, "-", 71, 64, 38, 0, 187, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1616, 100, "장막",$img,1616, 0, "-", 53, 52, 70, 0, 155, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1617, 7, "장만성",$img,1617, 0, "-", 73, 83, 47, 0, 143, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1618, 135, "장반",$img,1618, 0, "-", 56, 73, 66, 0, 227, 282, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1619, 78, "장빈",$img,1619, 0, "-", 30, 28, 67, 0, 216, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1620, 124, "장승",$img,1620, 0, "-", 75, 68, 75, 0, 178, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1621, 999, "장양2",$img,1621, 0, "-", 58, 50, 47, 0, 130, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1622, 68, "장억",$img,1622, 0, "-", 82, 80, 54, 0, 190, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1623, 75, "장준",$img,1623, 0, "-", 65, 67, 66, 0, 224, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1624, 20, "장집",$img,1624, 0, "-", 31, 27, 74, 0, 196, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1625, 39, "장특",$img,1625, 0, "-", 71, 53, 74, 0, 209, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1626, 96, "저곡",$img,1626, 0, "-", 57, 53, 67, 0, 184, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1627, 128, "전기",$img,1627, 0, "-", 51, 69, 55, 0, 231, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1628, 23, "전만",$img,1628, 0, "-", 52, 74, 38, 0, 181, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1629, 128, "전상",$img,1629, 0, "-", 5, 6, 11, 0, 208, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1630, 130, "전역",$img,1630, 0, "-", 60, 62, 37, 0, 212, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1631, 75, "전예",$img,1631, 0, "-", 80, 62, 83, 0, 171, 252, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1632, 64, "전해",$img,1632, 0, "-", 71, 63, 57, 0, 154, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1633, 123, "정봉2",$img,1633, 0, "-", 67, 68, 52, 0, 198, 266, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1634, 22, "정의",$img,1634, 0, "-", 17, 3, 66, 0, 184, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1635, 81, "제갈교",$img,1635, 0, "-", 55, 17, 77, 0, 204, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1636, 40, "제갈서",$img,1636, 0, "-", 45, 43, 27, 0, 218, 286, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1637, 25, "조충",$img,1637, 0, "-", 14, 7, 80, 0, 196, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1638, 121, "종리목",$img,1638, 0, "-", 84, 68, 75, 0, 214, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1639, 22, "종육",$img,1639, 0, "-", 27, 11, 71, 0, 223, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1640, 122, "좌혁",$img,1640, 0, "-", 60, 66, 51, 0, 232, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1641, 36, "주령",$img,1641, 0, "-", 77, 70, 69, 0, 170, 236, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1642, 115, "주앙",$img,1642, 0, "-", 75, 64, 64, 0, 162, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1643, 52, "주포",$img,1643, 0, "-", 59, 72, 12, 0, 191, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1644, 11, "주흔",$img,1644, 0, "-", 67, 53, 77, 0, 159, 196, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1645, 140, "진기",$img,1645, 0, "-", 58, 67, 46, 0, 165, 198, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1646, 142, "진란",$img,1646, 0, "-", 65, 70, 43, 0, 157, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1647, 25, "진랑",$img,1647, 0, "-", 57, 70, 38, 0, 192, 234, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1648, 12, "진응",$img,1648, 0, "-", 62, 69, 49, 0, 172, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1649, 124, "진표",$img,1649, 0, "-", 62, 49, 74, 0, 204, 237, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1650, 999, "채염",$img,1650, 0, "-", 40, 22, 64, 0, 168, 237, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1651, 999, "초선",$img,1651, 0, "-", 66, 15, 72, 0, 176, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1652, 135, "초이",$img,1652, 0, "-", 54, 65, 55, 0, 219, 266, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1653, 65, "추단",$img,1653, 0, "-", 63, 71, 36, 0, 148, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1654, 999, "추씨",$img,1654, 0, "-", 36, 13, 54, 0, 165, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1655, 71, "추정",$img,1655, 0, "-", 67, 65, 66, 0, 144, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1656, 145, "파재",$img,1656, 0, "-", 69, 75, 52, 0, 145, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1657, 22, "포신",$img,1657, 0, "-", 78, 60, 83, 0, 152, 192, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1658, 114, "하식",$img,1658, 0, "-", 18, 38, 29, 0, 230, 284, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1659, 36, "하안",$img,1659, 0, "-", 6, 27, 72, 0, 190, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1660, 999, "하후씨",$img,1660, 0, "-", 29, 16, 47, 0, 186, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1661, 5, "학맹",$img,1661, 0, "-", 57, 66, 41, 0, 156, 197, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1662, 98, "한거자",$img,1662, 0, "-", 53, 59, 30, 0, 158, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1663, 19, "한덕",$img,1663, 0, "-", 62, 79, 24, 0, 171, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1664, 140, "한윤",$img,1664, 0, "-", 27, 24, 68, 0, 155, 197, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1665, 999, "허소",$img,1665, 0, "-", 53, 27, 60, 0, 150, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1666, 30, "호열",$img,1666, 0, "-", 77, 69, 76, 0, 225, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1667, 76, "호제",$img,1667, 0, "-", 58, 42, 68, 0, 207, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1668, 149, "호진",$img,1668, 0, "-", 65, 77, 13, 0, 146, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1669, 29, "호질",$img,1669, 0, "-", 73, 50, 75, 0, 192, 250, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1670, 7, "환계",$img,1670, 0, "-", 12, 25, 67, 0, 156, 221, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1671, 56, "황숭",$img,1671, 0, "-", 68, 64, 74, 0, 208, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1672, 999, "황승언",$img,1672, 0, "-", 68, 17, 81, 0, 165, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1673, 999, "황월영",$img,1673, 0, "-", 58, 14, 75, 0, 186, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1674, 45, "황조",$img,1674, 0, "-", 74, 65, 57, 0, 148, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1675, 48, "후선",$img,1675, 0, "-", 56, 66, 35, 0, 175, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1676, 8, "휴고",$img,1676, 0, "-", 61, 72, 40, 0, 151, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1677, 98, "휴원진",$img,1677, 0, "-", 53, 63, 38, 0, 155, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1678, 22, "희지재",$img,1678, 0, "-", 24, 5, 86, 0, 157, 194, "-", "-"); - } -} - -function RegGeneral($connect,$init,$life,$fiction,$turnterm,$startyear,$year,$gencount,$npcmatch,$name,$img,$picture,$nation, - $city,$leader,$power,$intel,$level, - $bornyear,$deadyear,$personal,$special, - $msg="") { - $name = "ⓝ".$name; - $npc = 2; - if($city == "-") { - $city = rand() % 94 + 1; - } else { - $city = CityCall($city); - } - if($npcmatch == 0 || $fiction == 1) { $npcmatch = rand() % 150 + 1; } - if($life == 1) { $bornyear = 160; $deadyear = 300; } - if($init != 0 && $startyear > $bornyear+14 && $startyear <= $deadyear) { - if($deadyear <= $startyear+3) $deadyear += 5; - - $genid = "gen{$gencount}"; - $turntime = getRandTurn($turnterm); - if($personal != "-") { $personal = CharCall($personal); } - else { $personal = rand() % 10; } - if($fiction == 1) { $special = SpecCall("-"); } - else { $special = SpecCall($special); } - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - if($picture == 0) { $picture = 1001 + rand() % 400; } - if($picture == -1) { $picture = 'default'; } - $picture = "{$picture}.jpg"; - if($img < 3) { $picture = 'default.jpg'; } - $age = $startyear - $bornyear; - $specage = $age + 1; - $specage2 = $age + 1; - $killturn = ($deadyear - $startyear) * 12 + (rand() % 12); - $experience = $age * 100; - $dedication = $age * 100; - if($nation != 0 && $level == 0) $level = 1; - $pw = md5("18071807"); - - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city,leader,power,intel, - experience,dedication,level,gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit,bornyear,deadyear - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation', - '$city','$leader','$power','$intel','$experience','$dedication', - '$level','1000','1000','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0','$bornyear','$deadyear' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); - } elseif($year == $bornyear+14 && $year < $deadyear) { - $genid = "gen{$gencount}"; - - $query = "select no from general where npcid='$gencount'"; - $result = MYDB_query($query, $connect) or Error("func_npc ".MYDB_error($connect),""); - $count = MYDB_num_rows($result); - if($count == 0) { - $turntime = getRandTurn($turnterm); - if($personal != "-") { $personal = CharCall($personal); } - else { $personal = rand() % 10; } - if($fiction == 1) { $special = SpecCall("-"); } - else { $special = SpecCall($special); } - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - if($picture == 0) { $picture = 1001 + rand() % 400; } - $picture = "{$picture}.jpg"; - if($img < 3) { $picture = 'default.jpg'; } - $age = $year - $bornyear; - $specage = $age + 1; - $specage2 = $age + 1; - $killturn = ($deadyear - $year) * 12 + (rand() % 12); - $experience = $age * 100; - $dedication = $age * 100; - $pw = md5("18071807"); - - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city,leader,power,intel, - experience,dedication,level,gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit,bornyear,deadyear - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', - '$city','$leader','$power','$intel','$experience','$dedication', - '0','1000','1000','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0','$bornyear','$deadyear' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[0] = "●1월:$name(이)가 성인이 되어 등장했습니다."; - pushAllLog($alllog); - } - } -} - -function SetDevelop($connect, $genType, $no, $city, $tech) { - $query = "select rate,pop/pop2*100 as po,comm/comm2*100 as co,def/def2*100 as de,wall/wall2*100 as wa,secu/secu2*100 as se,agri/agri2*100 as ag from city where city='$city'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - // 우선 선정 - if($city[rate] < 95) { - $command = EncodeCommand(0, 0, 0, 4); // 우선 선정 - - $query = "update general set turn0='$command' where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; - } - - $prob = rand() % 100; - $command = EncodeCommand(0, 0, 0, 9); //조달 - switch($genType) { - case 0: //무장 - case 2: //무내정장 - if($prob < 30) { - if($city[de] < 99) { $command = EncodeCommand(0, 0, 0, 5); } //수비 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } elseif($prob < 60) { - if($city[wa] < 99) { $command = EncodeCommand(0, 0, 0, 6); } //성벽 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } elseif($prob < 90) { - if($city[se] < 99) { $command = EncodeCommand(0, 0, 0, 8); } //치안 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } else { - $command = EncodeCommand(0, 0, 0, 29); - } - break; - case 1: //지장 - case 3: //지내정장 - if($prob < 40) { - if($city[ag] < 99) { $command = EncodeCommand(0, 0, 0, 1); } //농업 - elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } elseif($prob < 80) { - if($city[co] < 99) { $command = EncodeCommand(0, 0, 0, 2); } //상업 - elseif($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } elseif($prob < 90) { - if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3); } //기술 - elseif($city[po] < 99) { $command = EncodeCommand(0, 0, 0, 7); } //정장 - else { $command = EncodeCommand(0, 0, 0, 9); } //조달 - } else { - if($tech < 10000) { $command = EncodeCommand(0, 0, 0, 3 + (rand() % 2) * 6); } //기술, 조달 - else { $command = EncodeCommand(0, 0, 0, 29); } - } - break; - } - - // 장수수가 너무 많으면 탐색 확률 감소 - if($command == EncodeCommand(0, 0, 0, 29)) { - $query = "select no from general"; - $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $ratio = round($genCount / 600 * 100); - - if(rand() % 100 < $ratio) { - $command = EncodeCommand(0, 0, 0, 9); - } - } - - $query = "update general set turn0='$command' where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; -} - -function SetCrew($connect, $no, $personal, $gold, $leader, $genType, $tech, $region, $city, $dex0, $dex10, $dex20, $dex30, $dex40) { - switch($genType) { - case 0: //무장 - case 2: //무내정장 - $dex0 = $dex0 + rand()%1000; - $dex10 = $dex10 + rand()%1000; - $dex20 = $dex20 + rand()%1000; - $sel = 0; - // 보궁기 선택 - if($dex0 > $dex10) { - if($dex0 > $dex20) { - $sel = 0; - } else { - $sel = 2; - } - } else { - if($dex10 > $dex20) { - $sel = 1; - } else { - $sel = 2; - } - } - - switch($sel) { - case 0: - $type = 0; //보병 - if($tech >= 3000 && $city == 3) { $type = 4; } //근위병 - elseif($tech >= 2000 && $city == 64) { $type = 3; } //자객병 - elseif($tech >= 1000 && $region == 2) { $type = 1; } //청주병 - elseif($tech >= 1000 && $region == 5) { $type = 5; } //등갑병 - elseif($tech >= 1000 && $region == 7) { $type = 2; } //수병 - break; - case 1: - $type = 10; //궁병 - if($tech >= 3000 && $city == 7) { $type = 14; } //석궁병 - elseif($tech >= 3000 && $city == 6) { $type = 13; } //강궁병 - elseif($tech >= 1000 && $region == 4) { $type = 12; } //연노병 - elseif($tech >= 1000 && $region == 8) { $type = 11; } //궁기병 - break; - case 2: - $type = 20; //기병 - if($tech >= 3000 && $city == 2) { $type = 27; } //호표기병 - elseif($tech >= 2000 && $city == 63) { $type = 24; } //철기병 - elseif($tech >= 2000 && $city == 67) { $type = 25; } //수렵기병 - elseif($tech >= 2000 && $city == 65) { $type = 23; } //돌격기병 - elseif($tech >= 2000 && $city == 66) { $type = 26; } //맹수병 - elseif($tech >= 1000 && $region == 1) { $type = 21; } //백마병 - elseif($tech >= 1000 && $region == 3) { $type = 22; } //중장기병 - break; - } - break; - case 1: //지장 - case 3: //지내정장 - $type = 30; //귀병 - if($tech >= 3000 && $city == 4) { $type = 34; } //악귀병 - elseif($tech >= 3000 && $city == 5) { $type = 37; } //천귀병 - elseif($tech >= 3000 && $city == 1) { $type = 38; } //마귀병 - elseif($tech >= 2000 && $city == 69) { $type = 33; } //흑귀병 - elseif($tech >= 2000 && $city == 68) { $type = 32; } //백귀병 - elseif($tech >= 1000 && $region == 6) { $type = 31; } //신귀병 - elseif($tech >= 3000 && $city == 3) { $type = 36; } //황귀병 - elseif($tech >= 1000 && rand()%100 < 50) { $type = 35; } //남귀병 - break; - } - - $gold -= 200; // 사기비용 - - $cost = getCost($connect, $type) * getTechCost($tech); - $cost = CharCost($cost, $personal); - - $crew = floor($gold / $cost); - if($leader < $crew) { $crew = $leader; } - $command = EncodeCommand(0, $type, $crew, 11); - - $query = "update general set turn0='$command' where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; -} - -function processAI($connect, $no) { - global $_baserice; - - $query = "select startyear,year,month,turnterm,scenario,gold_rate,rice_rate from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("processAI00 ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - // 초반 여부 - if($admin[startyear]+2 > $admin[year] || ($admin[startyear]+2 == $admin[year] && $admin[month] < 5)) { - $isStart = 1; - } else { - $isStart = 0; - } - - $query = "select no,turn0,npcid,name,nation,nations,city,level,npcmsg,personal,leader,intel,power,gold,rice,crew,train,atmos,npc,npcmatch,mode,injury,picture,imgsvr,killturn,makelimit,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; - $result = MYDB_query($query, $connect) or Error("processAI01 ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - // 입력된 턴이 있으면 그것 실행 - if($general[turn0] != "00000000000000") { - return; - } - - $query = "select city,region,nation,level,path,rate,gen1,gen2,gen3,pop,supply,front from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,level,tech,gold,rice,rate,type,color,name,war from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] >= 5) { - $query = "select l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); - $coreCommand = MYDB_fetch_array($result); - } - - $attackable = 0; - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - // 공격가능도시 있으면 1 - if($cityCount > 0) { $attackable = 1; } - - $dipState = 0; - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term>8"; - $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - // 선포중이면 1상태 - if($dipCount > 0) { $dipState = 1; } - - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=8"; - $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - // 전쟁준비 선포중이면 2상태 - if($dipCount > 0) { $dipState = 2; } - - $query = "select no from diplomacy where me='$general[nation]' and state=1 and term<=3"; - $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - // 교전 직전이면 3상태 - if($dipCount > 0) { $dipState = 3; } - - $query = "select no from diplomacy where me='$general[nation]' and state=0"; - $result = MYDB_query($query, $connect) or Error("processAI04 ".MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - // 교전중이면 4상태 - if($dipCount > 0) { $dipState = 4; } - - //무장 - if($general[power] >= $general[intel]) { - $genType = 0; - if($general[intel] >= $general[power] * 0.8) { //무지장 - switch(rand() % 5) { - case 0: case 1: case 2: case 3: $genType = 0; break; - case 4: $genType = 1; break; - } - } - //지장 - } else { - $genType = 1; - if($general[power] >= $general[intel] * 0.8) { //지무장 - switch(rand() % 5) { - case 0: $genType = 0; break; - case 1: case 2: case 3: case 4: $genType = 1; break; - } - } - } - - //내정장 - if($general[leader] < 40) { - $genType += 2; - //$genType = 2; // 무내정장 - //$genType = 3; // 지내정장 - } - - $tech = getTechCost($nation[tech]); - - if($general[atmos] >= 90 && $general[train] >= 90) { - if($general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - } else { - if($general[mode] == 1) { - $query = "update general set mode=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - } - - //유기체메시지 출력 하루 6번 - //특별 메세지 있는 경우 출력 하루 4번 - switch($admin[turnterm]) { - case 0: $term = 1; break; - case 1: $term = 1; break; - case 2: $term = 2; break; - case 3: $term = 3; break; - case 4: $term = 6; break; - case 5: $term = 12; break; - case 6: $term = 30; break; - case 7: $term = 60; break; - } - if($general[npcid] == 2000 && rand()%(24*$term) < 6) { - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); - } elseif($general[npcmsg] != "" && rand()%(24*$term) < 3) { - PushMsg(1, 0, $general[picture], $general[imgsvr], "{$general[name]}:", $nation[color], $nation[name], $nation[color], $general[npcmsg]); - } - - //재야인경우 - if($general[npc] == 5 && $general[level] == 0) { - // 오랑캐는 바로 임관 - $query = "select nation from general where level=12 and npc=5 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $rulerCount = MYDB_num_rows($result); - if($rulerCount > 0) { - $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 - } else { - $command = EncodeCommand(0, 0, 0, 42); //견문 - } - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); - return; - } elseif($general[npc] < 5 && $general[level] == 0) { - switch(rand()%5) { - //임관 40% - case 0: case 1: - if($admin[scenario] == 0 || $admin[scenario] >= 20) { - // 가상모드엔 랜덤임관, 초반엔 부상 적은 군주 우선 70% - if($admin[startyear]+3 > $admin[year] && rand()%100 < 70) { - $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by injury,rand() limit 0,1"; - } else { - $query = "select nation from general where level=12 and nation not in (0{$general['nations']}0) order by rand() limit 0,1"; - } - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $rulerCount = MYDB_num_rows($result); - if($rulerCount > 0 && $general[npcmatch] != 999 && $general[makelimit] == 0) { - $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 - } else { - $command = EncodeCommand(0, 0, 0, 42); //견문 - } - } else { - $query = "select nation from general where level=12 and npc=0"; - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $nonCount = MYDB_num_rows($result); - $query = "select nation from general where level=12 and npc>0"; - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $npcCount = MYDB_num_rows($result); - $ratio = round($npcCount / ($nonCount + $npcCount) * 100); - $ratio = round($ratio * 1.0); - //NPC우선임관 - $query = "select nation,ABS(IF(ABS(npcmatch-'$general[npcmatch]')>75,150-ABS(npcmatch-'$general[npcmatch]'),ABS(npcmatch-'$general[npcmatch]'))) as npcmatch2 from general where level=12 and npc>0 and nation not in (0{$general['nations']}0) order by npcmatch2,rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $rulerCount = MYDB_num_rows($result); - if($rulerCount > 0 && $general[npcmatch] != 999 && rand()%100 < $ratio && $general[makelimit] == 0) { // 엔국 비율대로 임관(50% : 50%) - $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 - } elseif($general[npcmatch] != 999 && $general[makelimit] == 0) { // NPC국가 없으면 유저국 임관 - $query = "select nation from general where level=12 and npc=0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI06 ".MYDB_error($connect),""); - $ruler = MYDB_fetch_array($result); - $command = EncodeCommand(0, 0, $ruler[nation], 25); //임관 - } else { - $command = EncodeCommand(0, 0, 0, 42); //견문 - } - } - break; - case 2: case 3: //거병이나 견문 40% - // 초반이면서 능력이 좋은놈 위주로 1%확률로 거병 (300명 재야시 2년간 약 10개 거병 예상) - $prop = rand() % 100; - $ratio = round(($general[leader] + $general[power] + $general[intel]) / 3); - if($admin[startyear]+2 > $admin[year] && $prop < $ratio && rand()%100 < 1 && $general[makelimit] == 0) { - //거병 - $command = EncodeCommand(0, 0, 0, 55); - } else { - //견문 - $command = EncodeCommand(0, 0, 0, 42); - } - break; - case 4: //이동 20% - $paths = explode("|", $city[path]); - $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); - break; - } - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI07 ".MYDB_error($connect),""); - return; - } - - $rulerCommand = 0; - //군주가 할일 - if($general[level] == 12) { - //오랑캐인데 공격 못하면 바로 방랑/해산 - if($general[npc] == 5 && $dipState == 0 && $attackable == 0) { - //방랑군이냐 아니냐 - if($nation[level] == 0) { - // 해산 - $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - return; - } else { - // 방랑 - $command = EncodeCommand(0, 0, 0, 47); - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - return; - } - } - //분기마다 - if($admin[month] == 1 || $admin[month] == 4 || $admin[month] == 7 || $admin[month] == 10) { - //관직임명 - Promotion($connect, $general[nation], $nation[level]); - } elseif($admin[month] == 12) { - //세율 - $nation[rate] = TaxRate($connect, $general[nation]); - //지급율 - GoldBillRate($connect, $nation[nation], $nation[rate], $admin[gold_rate], $nation[type], $nation[gold]); - } elseif($admin[month] == 6) { - //세율 - $nation[rate] = TaxRate($connect, $general[nation]); - //지급율 - RiceBillRate($connect, $nation[nation], $nation[rate], $admin[rice_rate], $nation[type], $nation[rice]); - } - - //방랑군이냐 아니냐 - if($nation[level] == 0) { - if($admin[startyear]+2 <= $admin[year]) { - // 해산 - $command = EncodeCommand(0, 0, 0, 56); - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - return; - } elseif($city[nation] == 0 && ($city[level] == 5 || $city[level] == 6)) { - $type = rand()%9 + 1; - $colors = GetNationColors(); - $color = rand() % count($colors); - $command = EncodeCommand(0, $type, $color, 46); - $nationName = "㉿"._String::SubStr($general[name], 1); - //건국 - $query = "update general set turn0='$command',makenation='$nationName' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI08 ".MYDB_error($connect),""); - return; - } elseif(rand()%4 > 0) { - //이동 - $paths = explode("|", $city[path]); - $command = EncodeCommand(0, 0, $paths[rand()%count($paths)], 21); - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - return; - } else { - //조달 - $command = EncodeCommand(0, 0, 0, 9); - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - return; - } - } else { - //외교 평시에 선포 - if($dipState == 0 && $attackable == 0) { - //전방 체크 먼저 - SetNationFront($connect, $nation[nation]); - - $query = "select city from city where nation='$general[nation]' and front=1 limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI02 ".MYDB_error($connect),""); - $frontCount = MYDB_num_rows($result); - //근접 공백지 없을때 - if($frontCount == 0) { - $query = "select (sum(pop/10)+sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(pop2/10)+sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $devRate = MYDB_fetch_array($result); - //내정이 80% 이상일때 - if($devRate[dev] > 80) { - $query = "select nation from nation where level>0 order by rand()"; - $result = MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - $nationCount = MYDB_num_rows($result); - for($i=0; $i < $nationCount; $i++) { - $youNation = MYDB_fetch_array($result); - - if(isClose($connect, $general[nation], $youNation[nation])) { - $command = EncodeCommand(0, 0, $youNation[nation], 62); - $query = "update nation set l12turn0='$command' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - $rulerCommand = 1; - break; - } - } - } - } - } - } - } - - // 입력된 턴이 있으면 - if($coreCommand["l{$general[level]}turn0"] != EncodeCommand(0, 0, 0, 99)) { - $rulerCommand = 1; - } - - //방랑군 아니고, 입력된 턴이 없을때 수뇌부가 할일 - if($nation[level] != 0 && $general[level] >= 5 && $rulerCommand == 0) { - $query = "select A.no,A.name,A.nation,B.nation from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation!='$general[nation]' and A.no!='$general[no]' order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); - $curGen = MYDB_fetch_array($result); - - if($curGen[no] != 0) { // 타도시에 있는 경우 국내로 발령 - if($dipState >= 3) { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - if($selCity[city] > 0) { - // 발령 - $command = EncodeCommand(0, $curGen[no], $selCity[city], 27); - } else { - // 발령 - $command = EncodeCommand(0, $curGen[no], $city[city], 27); - } - } else { - // 발령 - $command = EncodeCommand(0, $curGen[no], $city[city], 27); - } - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - } elseif($dipState <= 1) { // 평시엔 균등 발령만 - //발령, 최소장수 도시 선택, 최다장수도시의 장수 선택 - $query = "select B.city,count(*) as cnt,((B.agri+B.comm+B.secu+B.def+B.wall)/(B.agri2+B.comm2+B.secu2+B.def2+B.wall2)+(B.pop/B.pop2))/2*100 as dev from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.supply=1 group by A.city"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - //도시 2개 이상일때만 - if($cityCount > 1) { - $min = 500; $minCity = 0; - $max = 0; $maxCity = 0; - $devCity = 0; - for($i=0; $i < $cityCount; $i++) { - $curCity = MYDB_fetch_array($result); - if($curCity[cnt] >= $max) { $max = $curCity[cnt]; $maxCity = $curCity[city]; } - if($curCity[cnt] <= $min) { $min = $curCity[cnt]; $minCity = $curCity[city]; } - if($curCity[dev] < 70) { $devCity = $curCity[city]; } // 개발이 안된 곳 우선 - } - if($devCity != 0) { $minCity = $devCity; } - if($maxCity != $minCity) { - $query = "select no from general where city='$maxCity' and nation='$general[nation]' and no!='$general[no]' and npc>=2 limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI11 ".MYDB_error($connect),""); - $curGen = MYDB_fetch_array($result); - - if($curGen[no] != 0) { - // 발령 - $command = EncodeCommand(0, $curGen[no], $minCity, 27); - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - } - //계속 진행 - } - } - } else { - // 병사있고 쌀있고 후방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.front=0 and A.crew>700 and A.rice>700*{$tech} order by A.npc,A.crew desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selGen = MYDB_fetch_array($result); - // 전방 도시, 30% 확률로 태수 있는 전방으로 발령 - if(rand()%100 < 30) { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by gen1 desc,rand() limit 0,1"; - } else { - $query = "select city from city where nation='$general[nation]' and front=1 and supply=1 order by rand() limit 0,1"; - } - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 - // 발령 - $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); - } else { - //병사 없고 인구없는 전방에 있는 장수 - $query = "select A.no from general A, city B where A.city=B.city and A.nation='$general[nation]' and B.nation='$general[nation]' and B.pop<40000 and B.front=1 and A.crew<700 order by A.npc,A.crew limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selGen = MYDB_fetch_array($result); - // 인구많은도시 - $query = "select city from city where nation='$general[nation]' and supply=1 order by pop desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - if($selGen[no] > 0 && $selCity[city] > 0 && rand() % 100 < 80) { // 80% 확률 - // 발령 - $command = EncodeCommand(0, $selGen[no], $selCity[city], 27); - } else { - // 발령할 장수 없으면 몰포 - if(rand() % 2 == 0) { $type = "gold"; $type2 = 1; } - else { $type = "rice"; $type2 = 2; } - - if($nation[$type] < 1000) { // 몰수 - // 몰수 대상 - $query = "select no,{$type} from general where nation='$general[nation]' and no!='$general[no]' and {$type}>3000 order by {$type} desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $SelGen = MYDB_fetch_array($result); - if($SelGen[no] != 0) { - $amount = floor($SelGen[$type] / 5000)*10 + 10; - if($amount > 100) $amount = 100; - // 몰수 - $command = EncodeCommand($type2, $SelGen[no], $amount, 24); // 금,쌀 1000단위 몰수 - } - } else { // 포상 - // 포상 대상 - $query = "select no from general where nation='$general[nation]' and no!='$general[no]' and killturn>=5 order by {$type} limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $SelGen = MYDB_fetch_array($result); - if($SelGen[no] != 0) { - $amount = floor(($nation[$type]-$_baserice) / 5000)*10 + 10; - if($amount > 100) $amount = 100; - // 포상 - $command = EncodeCommand($type2, $SelGen[no], $amount, 23); // 금 1000단위 포상 - } - } - } - } - $query = "update nation set l{$general[level]}turn0='$command' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error("processAI09 ".MYDB_error($connect),""); - } - } - - $command = EncodeCommand(0, 0, 0, 1); - //일반 할일 - if($general[killturn] < 5) { - if($general[gold] + $general[rice] == 0) { - $command = EncodeCommand(0, 0, 0, 9); //조달 - } elseif($general[gold] > $general[rice]) { - $command = EncodeCommand(0, 1, 100, 44); //헌납 - } else { - $command = EncodeCommand(0, 2, 100, 44); //헌납 - } - } elseif($general[injury] > 10) { - // 부상 2달 이상이면 요양 - $command = EncodeCommand(0, 0, 0, 50); //요양 - } elseif($nation[level] == 0) { - //방랑군일때 - if($admin[startyear]+3 <= $admin[year]) { - $command = EncodeCommand(0, 0, 0, 45); //하야 - } else { - switch(rand()%5) { - case 0: - $command = EncodeCommand(0, 0, 0, 42); break; //견문 20% - case 1: case 2: case 3: case 4: - $command = EncodeCommand(0, 0, 0, 9); break; //조달 80% - } - } - } else { - //국가일때 - //아국땅 아니면 귀환 - if($general[nation] != $city[nation] || $city[supply] == 0) { - $command = EncodeCommand(0, 0, 0, 28); //귀환 - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } - //국가 병량이 없을때 바로 헌납 - if($nation[rice] < 2000 && $general[rice] > 200) { - $amount = floor(($general[rice] - 200)/100) + 1; - if($amount > 20) { $amount = 20; } - $command = EncodeCommand(0, 2, $amount, 44); //헌납 - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } - -// R -// ┃ ┃ 공격/내정 -// 700┃쌀┣━━━━┓ -// ┃팜┃ ┃ -// 100┣━┫ 내정 ┣━━━ -// ┃조┃ ┃쌀삼 -// 0┗━┻━━━━┻━━━> G -// 100 700 - $resrc = $tech * 700; - // 평시거나 초반아니면서 공격가능 없으면서 병사 있으면 해제(25%) - if($dipState == 0 && $isStart == 0 && $attackable == 0 && $general[crew] > 0 && rand()% 100 < 25) { - $command = EncodeCommand(0, 0, 0, 17); //소집해제 - } elseif($dipState <= 1 || $isStart == 1) { - //평시이거나 선포있어도 초반이면 - if($general[gold] + $general[rice] < 200) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달9 - elseif($general[rice] > 100 && $city[rate] < 95) { $command = EncodeCommand(0, 0, 0, 4); } //우선 선정 - elseif($general[gold] < 100) { //금없으면 쌀팜 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 - $command = EncodeCommand(0, 1, $amount, 49); //팜 - } elseif($general[gold] < 700 && $general[rice] < 700) { $command = EncodeCommand(0, 0, 0, 1); } //금쌀되면 내정 - elseif($general[rice] < 100) { //쌀없으면 쌀삼 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 - $command = EncodeCommand(0, 2, $amount, 49); //삼 - } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 - else { - //현도시가 전방이면 공격 가능성 체크 - if($city[front] > 0) { - //주변도시 체크 - $paths = explode("|", $city[path]); - for($i=0; $i < count($paths); $i++) { - $query = "select city,nation from city where city='$paths[$i]'"; - $result = MYDB_query($query, $connect) or Error("processAI20 ".MYDB_error($connect),""); - $targetCity = MYDB_fetch_array($result); - //공백지이면 타겟에 포함 - if($targetCity[nation] == 0) { $target[count($target)] = $targetCity[city]; } - } - if(count($target) == 0 || $isStart == 1 || $nation[war] == 1) { $command = EncodeCommand(0, 0, 0, 1); } //공격 가능도시가 없으면 내정 - else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 - } else { - //전방 아니면 내정 - $command = EncodeCommand(0, 0, 0, 1); - } - - if($command == EncodeCommand(0, 0, 0, 1)) { // 공격아닌 경우 - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("processAI19 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - - $sel = rand() % 10; - if($selCity[dev] > 95) { $sel = 9; } - elseif($selCity[dev] < 70) { $sel = 0; } - switch($sel) { - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: // 그대로 내정 80 % - $command = EncodeCommand(0, 0, 0, 1); - break; - case 8: case 9: // 저개발 도시로 워프 20% - //도시 선택, 30% 확률로 군사 있는 곳으로 워프 - if(rand()%100 < 30) { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by gen2 desc,dev limit 0,1"; - } else { - $query = "select city,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev from city where nation='$general[nation]' and supply='1' order by dev limit 0,1"; - } - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - //이미 그 도시이거나, 그 도시도 고개발이면 내정 - if($selCity[city] == $general[city] || $selCity[dev] > 95) { - $command = EncodeCommand(0, 0, 0, 1); - } else { - //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); - - $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } - break; - } - -// ┃ ┃ -// ┃ 쌀팜 ┃ 공격 -// ┃ ┃ -// 700t┣━━━━╋━━━━━━━━━ -// ┃내조 ↗┃ -// ┃ ↗ ┃ -// ┣━┓내조┃ 쌀삼 -// ┃**┃ ┃ -// 0 ┗━┻━━━━━━━> G -// 700t - - } else { // 공격인 경우 - if($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { //자원되고, 병사없을때 - if($city[pop] > 40000) { $command = EncodeCommand(0, 0, 0, 11); } - else { $command = EncodeCommand(0, 0, 0, 1); } - } elseif($general[rice] < $resrc && $general[rice] <= $general[gold]) { - //금이 더 많으면 매매 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 - if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }//삼 - else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 - } elseif($general[gold] < $resrc && $general[rice] > $general[gold]) { - //쌀이 더 많으면 매매 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 - if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }//팜 - else { $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); } // 내정, 조달 - //자원, 병사 모두 충족 - } elseif($general[crew] >= 700 && $general[train] < 90) { - $command = EncodeCommand(0, 0, 0, 13); //훈련 - } elseif($general[crew] >= 700 && $general[atmos] < 90) { - $command = EncodeCommand(0, 0, 0, 14); //사기진작 - } else { - //공격 - //$command = $target[rand()%count($target)] * 100 + 16; //있으면 공격 - } - } - } - } else { -// R -// ┃ ┃ -// ┃쌀┃ -// ┃팜┃ 공격 -// 700t┣━╋━━━━━ -// ┃조┃ 쌀삼 -// 0┗━┻━━━━━> G -// 700t - - //전시일때 - if($general[gold] + $general[rice] < $resrc*2) { $command = EncodeCommand(0, 0, 0, 9); } //금쌀없으면 조달 - elseif($general[rice] > $resrc && $city[rate] < 95 && $city[front] == 0) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 - elseif($general[rice] > $resrc && $city[rate] < 50 && $city[front] == 1) { $command = EncodeCommand(0, 0, 0, 4); } // 우선 선정 - elseif($general[gold] < $resrc) { // 금없으면 쌀팜 - $amount = floor(($general[rice] - $general[gold]) / 100 / 2); // 100단위 - if($amount > 0) { $command = EncodeCommand(0, 1, $amount, 49); }// 팜 - else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 - } elseif($general[rice] < $resrc) { // 쌀없으면 쌀삼 - $amount = floor(($general[gold] - $general[rice]) / 100 / 2); // 100단위 - if($amount > 0) { $command = EncodeCommand(0, 2, $amount, 49); }// 팜 - else { $command = EncodeCommand(0, 0, 0, 9); } // 조달 - } elseif($genType >= 2) { $command = EncodeCommand(0, 0, 0, 1); } //내정장일때 내정 - elseif($general[crew] < 700 && $general[gold] >= $resrc && $general[rice] >= $resrc) { - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $query = "select no from general where nation='$general[nation]' and city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $genCount2 = MYDB_num_rows($result); - - $query = "select sum(pop) as sum from city where nation='$general[nation]' and supply='1'"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $sumCity = MYDB_fetch_array($result); - // 현도시 인구 비율 - $ratio = round($city[pop] / $sumCity[sum] * 100); - // 현도시 장수 비율 - $ratio2 = round($genCount2 / $genCount * 100); - $ratio3 = rand() % 100; - // 전체 인구 대비 확률로 현지에서 징병 - if($city[pop] > 40000 && 100 + $ratio - $ratio2 > $ratio3) { - $command = EncodeCommand(0, 0, 0, 11); //인구 되면 징병 - } else { - // 인구 안되면 4만 이상인 도시로 워프 - $query = "select city from city where nation='$general[nation]' and pop>40000 and supply='1' order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - if($cityCount > 0) { - $selCity = MYDB_fetch_array($result); - //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); - - $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } else { - $command = EncodeCommand(0, 0, 0, 7); //인구 안되면 정장 - } - } - } elseif($general[crew] >= 700 && $general[train] < 90) { - if($general[atmos] >= 90 && $general[train] >= 60 && $general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - $command = EncodeCommand(0, 0, 0, 13); //훈련 - } elseif($general[crew] >= 700 && $general[atmos] < 90) { - if($general[atmos] >= 60 && $general[train] >= 90 && $general[mode] == 0) { - $query = "update general set mode=1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI05 ".MYDB_error($connect),""); - } - $command = EncodeCommand(0, 0, 0, 14); //사기진작 - } elseif($dipState <= 3) { - $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); // 준비는 됐으나 아직 선포중이면 내정, 조달 - } else { - //공격 & 내정 - $paths = explode("|", $city[path]); - for($i=0; $i < count($paths); $i++) { - $query = "select city,nation from city where city='$paths[$i]'"; - $result = MYDB_query($query, $connect) or Error("processAI21 ".MYDB_error($connect),""); - $targetCity = MYDB_fetch_array($result); - //소유국이 있는 경우 - if($targetCity[nation] != 0 && $targetCity[nation] != $general[nation]) { - $query = "select state from diplomacy where me='$general[nation]' and you='$targetCity[nation]'"; - $dipResult = MYDB_query($query, $connect) or Error("processAI22 ".MYDB_error($connect),""); - $dip = MYDB_fetch_array($dipResult); - //전쟁중인 국가이면 타겟에 포함 - if($dip[state] == 0) $target[count($target)] = $targetCity[city]; - } - } - if(count($target) == 0) { - //전방 도시 선택, 30% 확률로 태수 있는 전방으로 워프 - if(rand()%100 < 30) { - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by gen1 desc,rand() limit 0,1"; - } else { - $query = "select city from city where nation='$general[nation]' and supply='1' and front=1 order by rand() limit 0,1"; - } - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - if($cityCount == 0) { - //도시 수, 랜덤(상위 20%) 선택, 저개발 도시 선택 - $query = "select city from city where nation='$general[nation]' and supply='1'"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - $citySelect = rand() % (round($cityCount/5) + 1); - - $query = "select city,(def+wall)/(def2+wall2) as dev from city where nation='$general[nation]' and supply='1' order by dev limit {$citySelect},1"; - $result = MYDB_query($query, $connect) or Error("processAI10 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - } else { - $selCity = MYDB_fetch_array($result); - } - - if($general[city] != $selCity[city]) { - //워프 - $query = "update general set city='$selCity[city]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI18 ".MYDB_error($connect),""); - - $command = EncodeCommand(0, 0, 0, 50); //요양 - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } else { - $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //공격 가능도시가 없고 워프도 안되면 내정, 조달 - } - } elseif($nation[war] == 1) { - //전금이면 내정, 조달 - $command = EncodeCommand(0, 0, 0, (rand()%2)*8 + 1); //내정, 조달 - } else { $command = EncodeCommand(0, 0, $target[rand()%count($target)], 16); } //있으면 공격 - } - } - } - - switch($command) { - case "00000000000001": //내정 - SetDevelop($connect, $genType, $general[no], $general[city], $nation[tech]); - return; - case "00000000000011": //징병 - $query = "select region from city where nation='$general[nation]' order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $selRegion = MYDB_fetch_array($result); - - $selCity[city] = 0; - // 90% 확률로 이민족 또는 특성병 - if(rand()%100 < 90) { - $query = "select city from city where nation='$general[nation]' and (level='4' or level='8') order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("processAI16 ".MYDB_error($connect),""); - $selCity = MYDB_fetch_array($result); - } - // 특병 없으면 원래대로 - if($selCity[city] == 0) { - $selCity[city] = $general[city]; - } - SetCrew($connect, $general[no], $general[personal], $general[gold], $general[leader], $genType, $nation[tech], $selRegion[region], $selCity[city], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); - return; - default: - $query = "update general set turn0='$command' where no='$general[no]'"; - MYDB_query($query, $connect) or Error("processAI23 ".MYDB_error($connect),""); - return; - } -} -//종전하기, 지급율 -//$command = $fourth * 100000000 + $type * 100000 + $crew * 100 + 11; - -function RegNation($connect, - $name, $color, $gold, $rice, $scoutmsg, $tech, $gencount, $type, $level) { - $type = NationCharCall($type); - $totaltech = $tech * $gencount; - - @MYDB_query(" - insert into nation ( - name,color,gold,rice,bill,rate,scout,war,tricklimit,surlimit, - scoutmsg,tech,totaltech,type,level,gennum - ) values ( - '$name','$color','$gold','$rice','100','15','0','0','24','72', - '$scoutmsg','$tech','$totaltech','$type','$level','$gencount' - )", $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - -function RegCity($connect, $nation, $name, $cap=0) { - $city = CityCall($name); - @MYDB_query("update city set nation='$nation' where city='$city'",$connect) or Error(__LINE__.MYDB_error($connect),""); - if($cap > 0) { - @MYDB_query("update nation set capital='$city' where nation='$nation'",$connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function Promotion($connect, $nation, $level) { - $lv = getNationChiefLevel($level); - - $query = "select scenario,killturn from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("processAI00 ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //우선 수뇌 해제 (승상 뺴고) - $query = "update general set level=1 where level<11 and level>4 and nation='$nation'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - - //유저 후보 선택 - $query = "select no from general where nation='$nation' and npc<2 and level=1 and belong>=3 and killturn>='$admin[killturn]' order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); - $userCandidate = MYDB_fetch_array($result); - // 유저수뇌 안함 - //$userCandidate[no] = 0; - - //NPC 후보 선택 - $query = "select no from general where nation='$nation' and npc>=2 and level=1 order by intel desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); - $npcCandidate = MYDB_fetch_array($result); - - //현재 참모 - $query = "select no,intel,npc,killturn from general where nation='$nation' and level=11"; - $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); - $level11 = MYDB_fetch_array($result); - - //공석이거나 삭턴 유저 참모인 경우 - if($level11[no] == 0 || ($level11[npc] < 2 && $level11[killturn] < $admin[killturn])) { - if($userCandidate[no] > 0) { - //기존 참모 해임 - $query = "update general set level=1 where nation='$nation' and level=11"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate[no]'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - } elseif($npcCandidate[no] > 0) { - //기존 참모 해임 - $query = "update general set level=1 where nation='$nation' and level=11"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - //NPC 후보 있으면 임명 - $query = "update general set level=11 where no='$npcCandidate[no]'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - } - } elseif($level11[npc] >= 2 && $userCandidate[no] > 0) { - //NPC 참모인데 삭턴 아닌 유저장이 있는 경우 - //기존 참모 해임 - $query = "update general set level=1 where nation='$nation' and level=11"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - //유저 후보 있으면 임명 - $query = "update general set level=11 where no='$userCandidate[no]'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - } - - for($i=10; $i >= $lv; $i-=2) { - $i1 = $i; $i2 = $i - 1; - //무관임명 - $query = "select no from general where nation='$nation' and level=1 order by power desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); - $level = MYDB_fetch_array($result); - $query = "update general set level={$i1} where no='$level[no]'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - //문관임명 - $query = "select no from general where nation='$nation' and level=1 order by intel desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error("Promotion_00 ".MYDB_error($connect),""); - $level = MYDB_fetch_array($result); - $query = "update general set level={$i2} where no='$level[no]'"; - MYDB_query($query, $connect) or Error("Promotion_02 ".MYDB_error($connect),""); - } -} - -function TaxRate($connect, $nation) { - //도시 - $query = "select city from city where nation='$nation'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - - if($cityCount == 0) { - $query = "update nation set war=0,rate=15 where nation='$nation'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return 15; - } else { - $query = "select sum(pop)/sum(pop2)*100 as rate,(sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2))*100 as dev from city where nation='$nation'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $devRate = MYDB_fetch_array($result); - - $avg = ($devRate[rate] + $devRate[dev]) / 2; - - if($avg > 95) $rate = 25; - elseif($avg > 70) $rate = 20; - elseif($avg > 50) $rate = 15; - else $rate = 10; - - $query = "update nation set war=0,rate='$rate' where nation='$nation'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return $rate; - } -} - -function GoldBillRate($connect, $nation, $rate, $gold_rate, $type, $gold) { - $incomeList = getGoldIncome($connect, $nation, $rate, $gold_rate, $type); - $income = $gold + $incomeList[0] + $incomeList[1]; - $outcome = getGoldOutcome($connect, $nation, 100); // 100%의 지급량 - $bill = floor($income / $outcome * 90); // 수입의 90% 만 지급 - - if($bill < 20) { $bill = 20; } - if($bill > 200) { $bill = 200; } - - $query = "update nation set bill='$bill' where nation='$nation'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function RiceBillRate($connect, $nation, $rate, $rice_rate, $type, $rice) { - $incomeList = getRiceIncome($connect, $nation, $rate, $rice_rate, $type); - $income = $rice + $incomeList[0] + $incomeList[1]; - $outcome = getRiceOutcome($connect, $nation, 100); // 100%의 지급량 - $bill = floor($income / $outcome * 90); // 수입의 90% 만 지급 - - if($bill < 20) { $bill = 20; } - if($bill > 200) { $bill = 200; } - - $query = "update nation set bill='$bill' where nation='$nation'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/func_process.php b/che/func_process.php deleted file mode 100644 index 9e9d6a43..00000000 --- a/che/func_process.php +++ /dev/null @@ -1,6147 +0,0 @@ - 1) $ratio = 1; - - $r[fail] = (0.2 / $ratio - 0.1) * 100; - $r[succ] = ($ratio - 0.5) * 100; - - if($r[fail] < 0) { $r[fail] = 0; } - $r[succ] += $r[fail]; - if($r[succ] > 100) { $r[succ] = 100; } - - return $r; -} - -function CriticalScore($score, $type) { - switch($type) { - case 0: - $ratio = (rand()%9 + 20)/10; // 2.0~2.8 - break; - case 1: - $ratio = (rand()%3 + 2)/10; // 0.2~0.4 - break; - } - return round($score * $ratio); -} - -function process_1($connect, &$general, $type) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - if($type == 1) { $dtype = "농지 개간"; $atype = "을"; $btype = "은"; $stype = "agri"; } - elseif($type == 2) { $dtype = "상업 투자"; $atype = "를"; $btype = "는"; $stype = "comm"; } - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($city["$stype"] >= $city["$stype"."2"]) { - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$btype} 충분합니다. $dtype 실패. <1>$date"; - } else { - // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; - - $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 2 || $nation[type] == 12) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 8 || $nation[type] == 11) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모, 모사 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } - // 군사 보정 - if($general[level] == 3 && $general[no] == $city[gen2]) { $score *= 1.05; } - - $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 2); - - // 특기보정 : 경작, 상재 - if($type == 1 && $general[special] == 1) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - if($type == 2 && $general[special] == 2) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 성공하여 $score 상승했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}{$atype} 하여 $score 상승했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $score += $city["$stype"]; - if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } - // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 하락, 경험치 상승 - $general[gold] -= $admin[develcost]; - $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_3($connect, &$general) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dtype = "기술 연구"; - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type,tech from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; - } else { - $score = ($general[intel] * (100 - $general[injury])/100 + getBookEff($general[book])); - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모, 모사 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 9 || $general[level] == 7 || $general[level] == 5) { $score *= 1.05; } - - $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); - // 특기보정 : 발명 - if($general[special] == 3) { $score *= 1.1; $admin[develcost] *= 0.8; $r[succ] += 10; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 부드러운 기술 제한 - if(TechLimit($admin[startyear], $admin[year], $nation[tech])) { $score = floor($score/4); } - - //장수수 구함 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - if($gencount < 10) $gencount = 10; - // 내정 상승 - $query = "update nation set totaltech=totaltech+'$score',tech=totaltech/'$gencount' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 하락, 경험치 상승 // 공헌도, 명성 상승 = $score * 10 - $general[gold] -= $admin[develcost]; - - $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_4($connect, &$general) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 주민 선정 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 주민 선정 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 주민 선정 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 주민 선정 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*2) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 주민 선정 실패. <1>$date"; - } elseif($city[rate] >= 100) { - $log[count($log)] = "●{$admin[month]}월:민심은 충분합니다. 주민 선정 실패. <1>$date"; - } else { - $score = ($general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus) / 10; - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모 보정 - if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } - // 시중 보정 - if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } - - $rd = rand() % 100; - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); - // 특기보정 : 인덕 - if($general[special] == 20) { $r[succ] += 10; $admin[develcost] *= 0.8; $score *= 1.1; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:선정을 실패하여 민심이 $score 상승했습니다. <1>$date"; - } elseif($r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:선정을 성공하여 민심이 $score 상승했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:민심이 $score 상승했습니다. <1>$date"; - } - - $exp = $score * 7; - $ded = $score * 10; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $score += $city[rate]; - if($score > 100) { $score = 100; } - // 민심 상승 - $query = "update city set rate='$score' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 - $general[rice] -= $admin[develcost] * 2; - $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_5($connect, &$general, $type) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - if($type == 1) { $dtype = "수비 강화"; $stype = "def"; } - elseif($type == 2) { $dtype = "성벽 보수"; $stype = "wall"; } - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($city["$stype"] >= $city["$stype"."2"]) { - $log[count($log)] = "●{$admin[month]}월:{$dtype}는 충분합니다. $dtype 실패. <1>$date"; - } else { - // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; - - $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 3 || $nation[type] == 5 || $nation[type] == 10 || $nation[type] == 11) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 4 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 13) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모, 장군 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } - // 태수 보정 - if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } - - $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); - // 특기보정 : 수비, 축성 - if($type == 1 && $general[special] == 11) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - if($type == 2 && $general[special] == 10) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 실패하여 $score 상승했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 성공하여 $score 상승했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}를 하여 $score 상승했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $score += $city["$stype"]; - if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } - // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 하락, 무력 경험 경험, 공헌 상승 - $general[gold] -= $admin[develcost]; - $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_7($connect, &$general) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 정착 장려 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. 정착 장려 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 정착 장려 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 정착 장려 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost] * 2) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 정착 장려 실패. <1>$date"; - } elseif($city[pop] >= $city[pop2]) { - $log[count($log)] = "●{$admin[month]}월:이미 포화상태입니다. 정착 장려 실패. <1>$date"; - } else { - $score = $general[leader] * (100 - $general[injury])/100 + getHorseEff($general[horse]) + $lbonus; - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 2 || $nation[type] == 4 || $nation[type] == 7 || $nation[type] == 10) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 1 || $nation[type] == 3 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모 보정 - if($general[level] == 12 || $general[level] == 11) { $score *= 1.05; } - // 시중 보정 - if($general[level] == 2 && $general[no] == $city[gen3]) { $score *= 1.05; } - - $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); - // 특기보정 : 인덕 - if($general[special] == 20) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:장려를 실패하여 주민이 {$score}0명 증가했습니다. <1>$date"; - } elseif($r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:장려를 성공하여 주민이 {$score}0명 증가했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:주민이 {$score}0명 증가했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $score = $city[pop] + ($score * 10); - if($score > $city[pop2]) { $score = $city[pop2]; } - // 민심 상승 - $query = "update city set pop='$score' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 - $general[rice] -= $admin[develcost] * 2; - $general[leader2]++; - $query = "update general set resturn='SUCCESS',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_8($connect, &$general) { - global $_develrate; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dtype = "치안"; $stype = "secu"; - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 강화 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 방랑군은 불가능합니다. $dtype 강화 실패. <1>$date"; - } elseif($city[nation] != $general[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 강화 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 강화 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 강화 실패. <1>$date"; - } elseif($city[secu] >= $city[secu2]) { - $log[count($log)] = "●{$admin[month]}월:치안은 충분합니다. $dtype 강화 실패. <1>$date"; - } else { - // 민심 50 이하이면 50과 같게 - if($city[rate] < $_develrate) { $city[rate] = $_develrate; } - $rate = $city[rate] / 100; - - $score = ($general[power] * (100 - $general[injury])/100 + getWeapEff($general[weap])) * $rate; - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - // 국가보정 - if($nation[type] == 1 || $nation[type] == 4) { $score *= 1.1; $admin[develcost] *= 0.8; } - if($nation[type] == 6 || $nation[type] == 9) { $score *= 0.9; $admin[develcost] *= 1.2; } - - // 군주, 참모, 장군 보정 - if($general[level] == 12 || $general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { $score *= 1.05; } - // 태수 보정 - if($general[level] == 4 && $general[no] == $city[gen1]) { $score *= 1.05; } - - $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book]), 0); - // 특기보정 : 통찰 - if($general[special] == 12) { $r[succ] += 10; $score *= 1.1; $admin[develcost] *= 0.8; } - - //버그방지 - if($score < 1) $score = 1; - - if($r[fail] > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 실패하여 $score 강화했습니다. <1>$date"; - } elseif($city[rate] >= 80 && $r[succ] > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 성공하여 $score 강화했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$dtype}을 $score 강화했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $score += $city["$stype"]; - if($score > $city["{$stype}2"]) { $score = $city["{$stype}2"]; } - // 내정 상승 - $query = "update city set {$stype}='$score' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 하락, 무력 경험 경험, 공헌 상승 - $general[gold] -= $admin[develcost]; - $general[power2]++; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_9($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 물자 조달 실패. <1>$date"; - } elseif($nation[level] > 0 && $city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 물자 조달 실패. <1>$date"; - } elseif($city[supply] == 0 && $city[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 물자 조달 실패. <1>$date"; - } else { - if(rand() % 2 == 0) { $dtype = 0; $stype = "금"; } - else { $dtype = 1; $stype = "쌀"; } - - $score = (($general[leader]+$general[power]+$general[intel]) * (100 - $general[injury])/100 + getHorseEff($general[horse])+$lbonus+getWeapEff($general[weap])+getBookEff($general[book])); - $score = $score * (100 + $general[explevel]/5)/100; - $score = $score * (80 + rand() % 41)/100; // 80 ~ 120% - - $rd = rand() % 100; // 현재 20% - - //버그방지 - if($score < 1) $score = 1; - - if(30 > $rd) { - $score = CriticalScore($score, 1); - $log[count($log)] = "●{$admin[month]}월:조달을 실패하여 {$stype}을 $score 조달했습니다. <1>$date"; - } elseif(40 > $rd) { - $score = CriticalScore($score, 0); - $log[count($log)] = "●{$admin[month]}월:조달을 성공하여 {$stype}을 $score 조달했습니다. <1>$date"; - } else { - $score = round($score); - $log[count($log)] = "●{$admin[month]}월:{$stype}을 $score 조달했습니다. <1>$date"; - } - - $exp = $score * 0.7; - $ded = $score * 1.0; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 물자 상승 - if($dtype == 0) { - $query = "update nation set gold=gold+'$score' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update nation set rice=rice+'$score' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - switch(rand()%3) { - case 0: - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - break; - case 1: - $general[power2]++; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - break; - case 2: - $general[intel2]++; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - break; - } - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_11($connect, &$general, $type) { - global $_defaultatmos, $_defaulttrain, $_defaultatmos2, $_defaulttrain2; - $date = substr($general[turntime],11,5); - - if($type == 1) { $defaultatmos = $_defaultatmos; $defaulttrain = $_defaulttrain; } - else { $defaultatmos = $_defaultatmos2; $defaulttrain = $_defaulttrain2; } - - $query = "select year,month,startyear from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select level,tech from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $armtype = $command[2]; - $crew = $command[1]; - - if($armtype != $general[crewtype]) { $general[crew] = 0; $general[train] = $defaulttrain; $general[atmos] = $defaultatmos; } - - if($crew*100 + $general[crew] > (floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100) { $crew = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 - $general[crew])/100, 0); } - if($crew < 0) { $crew = 0; } - $cost = $crew * getCost($connect, $armtype); - //기술로 가격 - $cost *= getTechCost($nation[tech]); - //성격 보정 - $cost = CharCost($cost, $general[personal]); - $cost = round($cost); - - //특기 보정 : 보병, 궁병, 기병, 귀병, 공성, 징병 - if(floor($armtype/10) == 0 && $general[special2] == 50) { $cost *= 0.9; } - if(floor($armtype/10) == 1 && $general[special2] == 51) { $cost *= 0.9; } - if(floor($armtype/10) == 2 && $general[special2] == 52) { $cost *= 0.9; } - if(floor($armtype/10) == 3 && $general[special2] == 40) { $cost *= 0.9; } - if(floor($armtype/10) == 4 && $general[special2] == 43) { $cost *= 0.9; } - if($general[special2] == 72) { $cost *= 0.5; } - - if($type == 1) { $dtype = "징병"; } - elseif($type == 2) { $dtype = "모병"; $cost *= 2; } - if($general[crew] != 0) { $dtype = "추가".$dtype; } - - //현재 가능한지 검사 - switch($armtype) { - case 0: case 10: case 20: case 30: case 35: // 보병 궁병 기병 귀병 남귀병 - $sel = 0; break; - - case 1: $sel = 1; $rg = 2; break; // 청주병(중원) - case 2: $sel = 1; $rg = 7; break; // 수병(오월) - case 3: $sel = 2; $ct = 64; break; // 자객병(저) - case 4: $sel = 2; $ct = 3; break; // 근위병(낙양) - case 5: $sel = 1; $rg = 5; break; // 등갑병(남중) - - case 11: $sel = 1; $rg = 8; break; // 궁기병(동이) - case 12: $sel = 1; $rg = 4; break; // 연노병(서촉) - case 13: $sel = 2; $ct = 6; break; // 강궁병(양양) - case 14: $sel = 2; $ct = 7; break; // 석궁병(건업) - - case 21: $sel = 1; $rg = 1; break; // 백마병(하북) - case 22: $sel = 1; $rg = 3; break; // 중장기병(서북) - case 23: $sel = 2; $ct = 65; break; // 돌격기병(흉노) - case 24: $sel = 2; $ct = 63; break; // 철기병(강) - case 25: $sel = 2; $ct = 67; break; // 수렵기병(산월) - case 26: $sel = 2; $ct = 66; break; // 맹수병(남만) - case 27: $sel = 2; $ct = 2; break; // 호표기병(허창) - - case 31: $sel = 1; $rg = 6; break; // 신귀병(초) - case 32: $sel = 2; $ct = 68; break; // 백귀병(오환) - case 33: $sel = 2; $ct = 69; break; // 흑귀병(왜) - case 34: $sel = 2; $ct = 4; break; // 악귀병(장안) - case 36: $sel = 2; $ct = 3; break; // 황귀병(낙양) - case 37: $sel = 2; $ct = 5; break; // 천귀병(성도) - case 38: $sel = 2; $ct = 1; break; // 마귀병(업) - - case 40: $sel = 0; break; // 정란 - case 41: $sel = 0; break; // 충차 - case 42: $sel = 2; $ct = 1; break; // 벽력거(업) - case 43: $sel = 2; $ct = 5; break; // 목우(성도) - - default: $sel = 0; $armtype = 0; break; - } - if($sel == 0) { - // 남귀병은 기술1등급부터 - // 충차는 기술1등급부터 - if($armtype == 35 && $nation[tech] < 1000) { - $cnt = 0; - } elseif($armtype == 41 && $nation[tech] < 1000) { - $cnt = 0; - } else { - $cnt = 1; - } - } elseif($sel == 1) { - $query = "select city,level from city where nation='$general[nation]' and region='$rg'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $rgcity = MYDB_fetch_array($result); - // 기술 1000 이상부터 지역병 - if($cnt > 0 && $nation[tech] < 1000) { - $cnt = 0; - } - } else { - $query = "select city,level from city where nation='$general[nation]' and city='$ct'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $ctcity = MYDB_fetch_array($result); - // 기술 2000 이상부터 이민족병 - if($cnt > 0 && $ctcity[level] == 4 && $nation[tech] < 2000) { - $cnt = 0; - } - // 기술 3000 이상부터 특수병 - if($cnt > 0 && $ctcity[level] == 8 && $nation[tech] < 3000) { - $cnt = 0; - } - } - if($cnt > 0) { $valid = 1; } - else { $valid = 0; } - - // 초반 제한중 차병 불가 - if($admin[year] < $admin[startyear]+3 && floor($armtype/10) == 4) { - $valid = 0; - } - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $dtype 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($crew <= 0) { - $log[count($log)] = "●{$admin[month]}월:더이상 $dtype 할 수 없습니다. $dtype 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($general[rice] < $crew) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($valid == 0) { - $log[count($log)] = "●{$admin[month]}월:현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date"; - } elseif($city[pop]-30000 < $crew*100) { // 주민 30000명 이상만 가능 - $log[count($log)] = "●{$admin[month]}월:주민이 모자랍니다. $dtype 실패. <1>$date"; - } elseif($city[rate] < 20) { - $log[count($log)] = "●{$admin[month]}월:민심이 낮아 주민들이 도망갑니다. $dtype 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:".getTypename($armtype)."을(를) {$crew}00명 {$dtype}했습니다. <1>$date"; - $exp = $crew; - $ded = $crew; - // 숙련도 증가 - addGenDex($connect, $general[no], $armtype, $crew); - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $atmos = round(($general[atmos] * $general[crew] + $defaultatmos * $crew*100) / ($general[crew] + $crew*100)); - $train = round(($general[train] * $general[crew] + $defaulttrain * $crew*100) / ($general[crew] + $crew*100)); - $general[crew] += $crew*100; - $general[gold] -= $cost; - // 주민수 감소 // 민심 김소 - if($type == 1) { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*100); } - else { $city[rate] = $city[rate] - round(($crew*100 / $city[pop])*50); } - if($city[rate] < 0) { $city[rate] = 0; } - $query = "update city set pop=pop-({$crew}*100),rate='$city[rate]' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='$general[crew]',train='$train',atmos='$atmos',gold='$general[gold]',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_13($connect, &$general) { - global $_maxtrain, $_training, $_atmosing; - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 훈련 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 훈련 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 훈련 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 훈련 실패. <1>$date"; - } elseif($general[train] >= $_maxtrain) { - $log[count($log)] = "●{$admin[month]}월:병사들은 이미 정예병사들입니다. <1>$date"; -// } elseif(floor($general[crewtype]/10) == 4) { -// $log[count($log)] = "●{$admin[month]}월:병기는 훈련이 불가능합니다. <1>$date"; - } else { - // 훈련시 - $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); - - $log[count($log)] = "●{$admin[month]}월:훈련치가 $score 상승했습니다. <1>$date"; - $exp = 100; - $ded = 70; - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 훈련치 변경 - $score += $general[train]; - if($score > $_maxtrain) { $score = $_maxtrain; } - $query = "update general set train='$score' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 사기 약간 감소 - $score = floor($general[atmos] * $_atmosing); - if($score < 0 ) { $score = 0; } - $query = "update general set atmos='$score' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_14($connect, &$general) { - global $_maxatmos, $_training; - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 사기진작 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 사기진작 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 사기진작 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 사기진작 실패. <1>$date"; - } elseif($general[gold] < $general[crew]/100) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 사기진작 실패. <1>$date"; - } elseif($general[atmos] >= $_maxatmos) { - $log[count($log)] = "●{$admin[month]}월:이미 사기는 하늘을 찌를듯 합니다. <1>$date"; -// } elseif(floor($general[crewtype]/10) == 4) { -// $log[count($log)] = "●{$admin[month]}월:병기는 사기 진작이 불가능합니다. <1>$date"; - } else { - $score = round((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus)*100 / $general[crew] * $_training); - $gold = $general[gold] - round($general[crew]/100); - - $log[count($log)] = "●{$admin[month]}월:사기치가 $score 상승했습니다. <1>$date"; - $exp = 100; - $ded = 70; - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $score += $general[atmos]; - if($score > $_maxatmos) { $score = $_maxatmos; } - $general[leader2]++; - $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_15($connect, &$general) { - global $_maxatmos, $_maxtrain; - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,tech from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - if($general[term]%100 == 15) { - $term = floor($general[term]/100) + 1; - $code = $term * 100 + 15; - } else { - $term = 1; - $code = 100 + 15; - } - - $cost = round($general[crew]/100 * 3 * getTechCost($nation[tech])); - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 전투태세 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 전투태세 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 전투태세 실패. <1>$date"; - } elseif($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 전투태세 실패. <1>$date"; - } elseif($general[atmos] >= 90 && $general[train] >= 90) { - $log[count($log)] = "●{$admin[month]}월:이미 병사들은 날쌔고 용맹합니다. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 전투태세 실패. <1>$date"; - } elseif($term < 3) { - $log[count($log)] = "●{$admin[month]}월:병사들을 열심히 훈련중... ({$term}/3) <1>$date"; - - $query = "update general set resturn='ONGOING',term={$code} where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //기술로 가격 - $gold = $general[gold] - $cost; - - $log[count($log)] = "●{$admin[month]}월:전투태세 완료! <1>$date"; - $exp = 100 * 3; - $ded = 70 * 3; - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100 * 3)); - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]+=3; - $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_16($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,war,tricklimit,tech from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select path,nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $path = explode("|", $city[path]); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select * from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select nation,tricklimit,tech from nation where nation='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dnation = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - for($i=0; $i < count($path); $i++) { - if($path[$i] == $destination) { $valid = 1; } - } - - if($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. $destcity[name](으)로 출병 실패. <1>$date"; -// } elseif($city[supply] == 0) { -// $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif(!$valid) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[crew] <= 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[rice] <= round($general[crew]/100)) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($dip[state] != 0) { - $log[count($log)] = "●{$admin[month]}월:교전중인 국가가 아닙니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:본국에서만 출병가능합니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($nation[war] == 1) { - $log[count($log)] = "●{$admin[month]}월:현재 전쟁 금지입니다. $destcity[name](으)로 출병 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:본국입니다. $destcity[name](으)로 출병 실패. <1>$date"; - pushGenLog($general, $log); - process_21($connect, $general); - return; - } else { - // 전쟁 표시 - $query = "update city set state=43,term=3 where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], round($general[crew]/100)); - // 전투 처리 - $dead = processWar($connect, $general, $destcity); - - // 기술력 따라서 보정 - $dead[att] = round($dead[att] * getTechCost($nation[tech])); - $dead[def] = round($dead[def] * getTechCost($dnation[tech])); - - // 사상자 누적 - if($nation[nation] > 0 && $dnation[nation] > 0) { - $query = "update diplomacy set dead=dead+'$dead[att]' where me='$nation[nation]' and you='$dnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update diplomacy set dead=dead+'$dead[def]' where you='$nation[nation]' and me='$dnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $log = uniqueItem($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_17($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - if($general[crew] == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 없습니다. 소집해제 실패. <1>$date"; - } else { - // 주민으로 돌아감 - $query = "update city set pop=pop+'$general[crew]' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set crew='0' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●{$admin[month]}월:병사들을 소집해제하였습니다. <1>$date"; - - // 경험, 공헌 상승 - $exp = 70; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_21($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $path = explode("|", $city[path]); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select name from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - for($i=0; $i < count($path); $i++) { - if($path[$i] == $destination) { $valid = 1; } - } - - if(!$valid) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. $destcity[name](으)로 이동 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 이동 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 이동했습니다. <1>$date"; - $exp = 50; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - - // 이동, 경험치 상승, 명성 상승, 사기 감소 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general[level] == 12) { - $query = "select level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[level] == 0) { - $query = "update general set city='$destination' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name from general where nation='$general[nation]' and level<'12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 이동했습니다."; - for($j=0; $j < $gencount; $j++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - } - } - } - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_22($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select name from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $who = $command[1]; - - $query = "select * from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - - $cost = round($admin[develcost] + ($you[experience] + $you[dedication])/1000) * 10; - - if(!$you) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 등용 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반 제한중입니다. 등용 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 등용 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 등용 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 등용 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$you[name]에게 등용 권유 서신을 보냈습니다. <1>$date"; - $exp = 100; - $ded = 200; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - ScoutMsg($connect, $general[no], $nation[name], $who, $you[msgindex]); - - $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_23($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $what = $command[3]; - $who = $command[2]; - $amount = $command[1]; - $amount *= 100; // 100~10000까지 - - if($amount > 10000) { $amount = 10000; } - if($amount < 100) { $amount = 100; } - if($what == 1) { - $dtype = "금"; - if($nation[gold]-$_basegold < $amount) { $amount = $nation[gold] - $_basegold; } - } elseif($what == 2) { - $dtype = "쌀"; - if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } - } else { - $what = 2; - $dtype = "쌀"; - if($nation[rice]-$_baserice < $amount) { $amount = $nation[rice] - $_baserice; } - } - - $query = "select no,nation,level,name,gold,rice from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 포상 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 포상 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 포상 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 포상 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 포상 실패. <1>$date"; - } elseif($what == 1 && $amount <= 0) { - $log[count($log)] = "●{$admin[month]}월:국고가 부족합니다. 포상 실패. <1>$date"; - } elseif($what == 2 && $amount <= 0) { - $log[count($log)] = "●{$admin[month]}월:병량이 부족합니다. 포상 실패. <1>$date"; - } elseif($gen[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 포상 실패. <1>$date"; - } else { - $genlog[count($genlog)] = "●$dtype $amount을 포상으로 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 수여했습니다. <1>$date"; - $exp = 1; - $ded = 1; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - if($what == 1) { - $gen[gold] += $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[gold] -= $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($what == 2) { - $gen[rice] += $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[rice] -= $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); - pushGenLog($gen, $genlog); -} - -function process_24($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,scenario,startyear from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,color,gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $what = $command[3]; - $who = $command[2]; - $amount = $command[1]; - $amount *= 100; // 100~10000까지 - - $query = "select no,nation,level,name,gold,rice,npc,picture,imgsvr from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - if($amount > 10000) { $amount = 10000; } - if($amount < 100) { $amount = 100; } - if($what == 1) { - $dtype = "금"; - if($gen[gold] < $amount) { $amount = $gen[gold]; } - } elseif($what == 2) { - $dtype = "쌀"; - if($gen[rice] < $amount) { $amount = $gen[rice]; } - } else { - $what = 2; - $dtype = "쌀"; - if($gen[rice] < $amount) { $amount = $gen[rice]; } - } - - if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 몰수 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 몰수 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. 몰수 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 몰수 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 몰수 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 몰수 실패. <1>$date"; - } elseif($gen[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 몰수 실패. <1>$date"; - } else { - if($gen[npc] >= 2 && rand()%100 == 0) { - switch(rand()%5) { - case 0: $str = "몰수를 하다니... 이것이 윗사람이 할 짓이란 말입니까..."; break; - case 1: $str = "사유재산까지 몰수해가면서 이 나라가 잘 될거라 믿습니까? 정말 이해할 수가 없군요..."; break; - case 2: $str = "내 돈 내놔라! 내 돈! 몰수가 왠 말이냐!"; break; - case 3: $str = "몰수해간 내 자금... 언젠가 몰래 다시 빼내올 것이다..."; break; - case 4: $str = "몰수로 인한 사기 저하는 몰수로 얻은 물자보다 더 손해란걸 모른단 말인가!"; break; - } - - PushMsg(1, 0, $gen[picture], $gen[imgsvr], "{$gen[name]}:", $nation[color], $nation[name], $nation[color], $str); - } - - $genlog[count($genlog)] = "●$dtype {$amount}을 몰수 당했습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게서 $dtype $amount을 몰수했습니다. <1>$date"; - $exp = 1; - $ded = 1; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - if($what == 1) { - $gen[gold] -= $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[gold] += $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($what == 2) { - $gen[rice] -= $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[rice] += $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 경험치 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); - pushGenLog($gen, $genlog); -} - -function process_25($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $where = $command[1]; - - // 랜덤임관인 경우 - if($where == 99) { - // 초반시 10명이하, 임관금지없음 국가 - if($admin[year] < $admin[startyear]+3) { - $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } else { - $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and scout=0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - } elseif($where == 98) { - // 초반시 10명이하, 임관금지없음 국가, 방랑군 제외 - if($admin[year] < $admin[startyear]+3) { - $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and gennum<10 and scout=0 and level>0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } else { - $query = "select name,nation,scout,level from nation where nation not in (0{$general['nations']}0) and scout=0 and level>0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - } else { - $query = "select name,nation,scout,level from nation where nation='$where'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - $query = "select no from general where nation='$nation[nation]'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - if(!$nation) { - $log[count($log)] = "●{$admin[month]}월:임관할 국가가 없습니다. 임관 실패. <1>$date"; - } elseif($general[nation] != 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 임관 실패. <1>$date"; - } elseif($nation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 임관 실패. <1>$date"; - } elseif($nation[level] == 0 && $gencount >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; - } elseif($admin[year] < $admin[startyear]+3 && $gencount >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 제한되고 있습니다. 임관 실패."; - } elseif($nation[scout] == 1 && $general[npc] < 5) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 임관이 금지되어 있습니다. 임관 실패."; - } elseif($general[makelimit] > 0 && $general[npc] < 5) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12턴이 지나야 합니다. 임관 실패. <1>$date"; - } elseif(strpos($general['nations'], ",{$nation['nation']},") > 0) { - $log[count($log)] = "●{$admin[month]}월:이미 임관했었던 국가입니다. 임관 실패. <1>$date"; - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]임관했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nation[name]에 임관했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에 임관"); - - if($gencount < 10) { $exp = 700; } - else { $exp = 100; } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 군주가 있는 곳으로 이동 - $query = "select city from general where nation='$nation[nation]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($result); - - // NPC초반시 임관기록 추가 안함 - if($general[npc] > 1 && $admin[year] < $admin[startyear]+3) { - } else { - $general['nations'] .= "{$nation['nation']},"; - } - - // 국적 바꾸고 등급 일반으로 // 명성 상승 - $query = "update general set resturn='SUCCESS',nation='$nation[nation]',nations='{$general['nations']}',level='1',experience=experience+'$exp',city='$king[city]',belong=1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국가 기술력 그대로 - $query = "select no from general where nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($where < 99) { - $log = uniqueItem($connect, $general, $log); - } else { - $log = uniqueItem($connect, $general, $log, 2); - } - } - - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_26($connect, &$general) { - $date = substr($general[turntime],11,5); - - $troop = getTroop($connect, $general[troop]); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select no,name,nation,city from general where troop='$general[troop]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - if($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 집합 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 집합 실패. <1>$date"; - } elseif($general[no] != $troop[no]) { - $log[count($log)] = "●{$admin[month]}월:부대장이 아닙니다. 집합 실패. <1>$date"; - } elseif($gencount == 0) { - $log[count($log)] = "●{$admin[month]}월:집합 가능한 부대원이 없습니다. 집합 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$city[name]에서 집합을 실시했습니다. <1>$date"; - $exp = 70; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - //부대원에게 로그 전달 - $genlog[count($genlog)] = "$troop[name]의 부대원들은 $city[name](으)로 집합되었습니다."; - - for($i=0; $i < $gencount; $i++) { - $troopgen = MYDB_fetch_array($result); - if($general[city] != $troopgen[city]) { - pushGenLog($troopgen, $genlog); - } - } - - // 같은 부대원 모두 집합 - $query = "update general set city='$general[city]' where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 경험치 명성 공헌 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_27($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select gold,rice,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $who = $command[2]; - $where = $command[1]; - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select no,name,nation,level from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - - $query = "select name,nation,supply from city where city='$where'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - if(!$you) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 발령 실패. <1>$date"; - } elseif($general[no] == $who) { - $log[count($log)] = "●{$admin[month]}월:자기 자신입니다. $you[name] 발령 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($destcity[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $you[name] 발령 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 도시가 아닙니다. $you[name] 발령 실패. <1>$date"; - } elseif($general[nation] != $you[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. $you[name] 발령 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$you[name](을)를 $destcity[name](으)로 발령했습니다. <1>$date"; - $youlog[count($youlog)] = "$general[name]에 의해 $destcity[name](으)로 발령됐습니다. <1>$date"; - $exp = 1; - $ded = 1; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 발령 - $query = "update general set city='$where' where no='$you[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 경험치 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -// $log = checkAbility($connect, $general, $log); - } - - pushGenLog($general, $log); - pushGenLog($you, $youlog); -} - -function process_28($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select level,capital from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 귀환 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 귀환 실패. <1>$date"; - } elseif(($general[level] == 1 || $general[level] >= 5) && $general[city] == $nation[capital]) { - $log[count($log)] = "●{$admin[month]}월:이미 수도입니다. 귀환 실패. <1>$date"; - } else { - if($general[level] == 2) { - $query = "select city,name from city where gen3='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } elseif($general[level] == 3) { - $query = "select city,name from city where gen2='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } elseif($general[level] == 4) { - $query = "select city,name from city where gen1='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } else { - $query = "select city,name from city where city='$nation[capital]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } - - $log[count($log)] = "●{$admin[month]}월:$city[name](으)로 귀환했습니다. <1>$date"; - $exp = 70; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 귀환 - $query = "update general set city='$city[city]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 경험치 상승 // 명성,공헌 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - - pushGenLog($general, $log); - pushGenLog($you, $youlog); -} - -function process_29($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost,npccount,turnterm,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,level,gennum,scout from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 인재탐색 실패. <1>$date"; - } elseif($nation[level] <= 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군입니다. 인재탐색 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3 && $nation[gennum] >= 10) { - $log[count($log)] = "●{$admin[month]}월:현재 $nation[name]은(는) 탐색이 제한되고 있습니다. 인재탐색 실패."; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 인재탐색 실패. <1>$date"; - } else { - $query = "select no from general where nation='$general[nation]' and npc<2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - $query = "select no from general where nation='$general[nation]' and npc=3"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - - $query = "select no from general where nation!='$general[nation]' and npc=3"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $otherNpccount = MYDB_num_rows($result); - $otherNpccount = round(sqrt($otherNpccount + 1)) - 1; - - if($gencount <= 0) { $gencount = 1; } - if($npccount <= 0) { $npccount = 1; } - $criteria = $gencount * $npccount + $otherNpccount; - - // 탐색 실패 - if(rand() % $criteria > 0) { - $exp = 100; - $ded = 70; - switch(rand()%3) { - case 0: $general[leader2] += 1; break; - case 1: $general[power2] += 1; break; - case 2: $general[intel2] += 1; break; - } - $log[count($log)] = "●{$admin[month]}월:인재를 찾을 수 없었습니다. <1>$date"; - } else { - // 탐색 성공 - $exp = 200; - $ded = 300; - switch(rand()%3) { - case 0: $general[leader2] += 3; break; - case 1: $general[power2] += 3; break; - case 2: $general[intel2] += 3; break; - } - - $name = getRandGenName(); - $name = 'ⓜ'.$name; - //중복장수 처리 - $query = "select no from general where name like '{$name}%'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - $count++; - if($count > 1) { - $name = "{$name}{$count}"; - } - - if($nation[scout] != 0) { - $scoutType = "발견"; - $scoutLevel = 0; - $scoutNation = 0; - } else { - $scoutType = "영입"; - $scoutLevel = 1; - $scoutNation = $nation[nation]; - } - - $log[count($log)] = "●{$admin[month]}월:$name(이)라는 인재를 {$scoutType}하였습니다! <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $name(이)라는 인재를 {$scoutType}하였습니다!"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$name(이)라는 인재를 {$scoutType}"); - - $query = "select max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $avgGen = MYDB_fetch_array($result); - - // 체섭시 무장 20%, 지장 20%, 무지장 60% - // 마이너 무장 40%, 지장 40%, 무지장 20% - $type = rand() % 10; - if($admin[scenario] == 0) { - switch($type) { - case 0: case 1: - $leader = 65 + rand()%11; - $intel = 10 + rand()%6; - $power = 150 - $leader - $intel; - break; - case 2: case 3: - $leader = 65 + rand()%11; - $power = 10 + rand()%6; - $intel = 150 - $leader - $power; - break; - case 4: case 5: case 6: case 7: case 8: case 9: - $leader = 10 + rand()%6; - $power = 65 + rand()%11; - $intel = 150 - $leader - $power; - break; - } - } else { - switch($type) { - case 0: case 1: case 2: case 3: - $leader = 65 + rand()%11; - $intel = 10 + rand()%6; - $power = 150 - $leader - $intel; - break; - case 4: case 5: case 6: case 7: - $leader = 65 + rand()%11; - $power = 10 + rand()%6; - $intel = 150 - $leader - $power; - break; - case 8: case 9: - $leader = 10 + rand()%6; - $power = 65 + rand()%11; - $intel = 150 - $leader - $power; - break; - } - } - // 국내 최고능치 기준으로 랜덤성 스케일링 - if($avgGen[lpi] > 210) { - $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); - } elseif($avgGen[lpi] > 180) { - $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); - } else { - $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); - } - $over1 = 0; - $over2 = 0; - $over3 = 0; - // 너무 높은 능치는 다른 능치로 분산 - if($leader > 90) { - $over1 = rand() % ($leader - 90) + 5; - $leader -= $over1; - } - if($power > 90) { - $over2 = rand() % ($power - 90) + 5; - $power -= $over2; - } - if($intel > 90) { - $over3 = rand() % ($intel - 90) + 5; - $intel -= $over3; - } - // 낮은 능치쪽으로 합산 - if($type == 0) { - $intel = $intel + $over1 + $over2 + $over3; - } else { - $power = $power + $over1 + $over2 + $over3; - } - // 너무 높은 능치는 제한 - if($leader > 95) { - $leader = 95; - } - if($power > 95) { - $power = 95; - } - if($intel > 95) { - $intel = 95; - } - - //인재추가 - $npc = 3; - $npcid = $admin[npccount]; - $npccount = 10000 + $npcid; - $npcmatch = rand() % 150 + 1; - $genid = "gen{$npccount}"; - $pw = md5("18071807"); - $picture = 'default.jpg'; - $turntime = getRandTurn($admin[turnterm]); - $personal = rand() % 10; - $bornyear = $admin[year]; - $deadyear = $admin[year] + 3; - $age = 20; - $specage = round((80 - $age)/12) + $age; - $specage2 = round((80 - $age)/3) + $age; - //$specage = $age + 1 + rand() % 3; - //$specage2 = $age + 5 + rand() % 5; - // 10년 ~ 50년 - $killturn = rand()%480 + 120; - - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, - city,leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos,tnmt, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit,bornyear,deadyear, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$scoutNation', - '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', - '$scoutLevel','100','100','0','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', - '0','$bornyear','$deadyear', - '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); - - $npcid++; - - //npccount - $query = "update game set npccount={$npcid} where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //국가 기술력 그대로 - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - } - - //기술로 가격 - $gold = $general[gold] - $admin[develcost]; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - $log = uniqueItem($connect, $general, $log); - } - - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_30($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 3); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select name from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $cost = $admin[develcost] * 5; - - if($dist[$destination] > 3) { - $log[count($log)] = "●{$admin[month]}월:거리가 멉니다. $destcity[name](으)로 강행 실패. <1>$date"; - } elseif($general[gold] < $cost) { - $log[count($log)] = "●{$admin[month]}월:자금이 부족합니다. $destcity[name](으)로 강행 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 강행했습니다. <1>$date"; - $exp = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - - // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general[level] == 12) { - $query = "select level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation[level] == 0) { - $query = "update general set city='$destination' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name from general where nation='$general[nation]' and level<'12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "●방랑군 세력이 $destcity[name](으)로 강행했습니다."; - for($j=0; $j < $gencount; $j++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - } - } - } - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_31($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 2); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select * from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - if(!$city) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 첩보 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*3) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*3) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $city[name]에 첩보 실패. <1>$date"; - } elseif($general[nation] == $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $city[name]에 첩보 실패. <1>$date"; -// } elseif($dist[$destination] > 3) { -// $log[count($log)] = "●{$admin[month]}월:너무 멉니다. $city[name]에 첩보 실패. <1>$date"; - } else { - $query = "select crew,crewtype from general where city='$destination' and nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $crew = 0; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - if($gen[crew] != 0) { $typecount[$gen[crewtype]]++; $crew += $gen[crew]; } - } - if($dist[$destination] > 2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 소문만 들을 수 있었습니다. <1>$date"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; - } elseif($dist[$destination] == 2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 어느정도 정보를 얻었습니다. <1>$date"; - $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $city[name](을)를 살피는 것 같습니다."; - $log[count($log)] = "●{$admin[month]}월:$city[name]의 많은 정보를 얻었습니다. <1>$date"; - $msg[count($msg)] = "【병종】"; - for($i=0; $i <= 5; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } - for($i=10; $i <= 14; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } - for($i=20; $i <= 27; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } - for($i=30; $i <= 38; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } - for($i=40; $i <= 43; $i++) { if($typecount[$i] != 0) { $msg[count($msg)] = _String::SubStr(getTypename($i), 0, 2).":$typecount[$i]"; } } - - $count = ceil(count($msg) / 8) * 8; - for($i=$count; $i > 0; $i-=8) { - $log[count($log)] = "{$msg[$i-8]} {$msg[$i-7]} {$msg[$i-6]} {$msg[$i-5]} {$msg[$i-4]} {$msg[$i-3]} {$msg[$i-2]} {$msg[$i-1]}"; - } - $log[count($log)] = "【첩보】농업:$city[agri], 상업:$city[comm], 치안:$city[secu], 수비:$city[def], 성벽:$city[wall]"; - $log[count($log)] = "【$city[name]】주민:$city[pop], 민심:$city[rate], 장수:$gencount, 병력:$crew"; - - if($general[nation] != 0 && $city[nation] != 0) { - $query = "select name,tech from nation where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $yourTech = MYDB_fetch_array($result); - - $query = "select tech from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $myTech = MYDB_fetch_array($result); - - $diff = $yourTech[tech] - $myTech[tech]; // 차이 - if($diff >= 1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↑압도"; } - elseif($diff >= 250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▲우위"; } - elseif($diff >= -250) { $log[count($log)] = "【$yourTech[name]】아국대비기술:↕대등"; } - elseif($diff >= -1000) { $log[count($log)] = "【$yourTech[name]】아국대비기술:▼열위"; } - else { $log[count($log)] = "【$yourTech[name]】아국대비기술:↓미미"; } - } - } - - // 자금 하락 // 경험치 상승 // 공헌도, 명성 상승 - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[leader2]++; - $general[gold] -= $admin[develcost]*3; - $general[rice] -= $admin[develcost]*3; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select spy from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - if($nation[spy] != "") { $citys = explode("|", $nation[spy]); } - for($i=0; $i < count($citys); $i++) { - if(floor($citys[$i]/10) == $destination) { - $exist = 1; - break; - } - } - // 기존 첩보 목록에 없으면 새로 등록, 있으면 갱신 - if($exist == 0) { - $citys[count($citys)] = $destination * 10 + 3; - } else { - $citys[$i] = $destination * 10 + 3; - } - $spy = implode("|", $citys); - $query = "update nation set spy='$spy' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_32($connect, &$general) { - global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 5); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select * from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 화계 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($city[supply] == 0 && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 화계 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 화계 실패. <1>$date"; - } else { - $query = "select intel,book from general where city='$destination' and nation='$destcity[nation]' order by intel desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $intelgen = MYDB_fetch_array($result); - - $ratio = round((($general[intel]+getBookEff($general[book]) - $intelgen[intel]-getBookEff($intelgen[book])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); - $ratio2 = rand() % 100; - - if($general[item] == 5) { - // 이추 사용 - $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { - // 향낭 사용 - $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { - // 육도, 삼략 사용 - $ratio += 20; - } - - // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } - - // 국가보정 - if($nation[type] == 9) { $ratio += 10; } - - // 거리보정 - $ratio /= $dist[$destination]; - - if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 불타고 있습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 성공했습니다. <1>$date"; - - $destcity[agri] -= rand() % $_firingpower + $_firingbase; - $destcity[comm] -= rand() % $_firingpower + $_firingbase; - if($destcity[agri] < 0) { $destcity[agri] = 0; } - if($destcity[comm] < 0) { $destcity[comm] = 0; } - $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]' where city='$destination'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - TrickInjury($connect, $destination); - $exp = rand() % 100 + 201; - $ded = rand() % 70 + 141; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 화계가 실패했습니다. <1>$date"; - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[intel2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_33($connect, &$general) { - global $_firing, $_basefiring, $_firingpower; - //global $_basegold, $_baserice; //TODO : 버그로 보여서 지웠는데, 진짜로 지워도 되는지 확인 - //탈취는 0까지 무제한 - $_basegold = 0; $_baserice = 0; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 5); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select name,level,nation,secu,secu2 from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select gold,rice from nation where nation='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 탈취 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 탈취 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 탈취 실패. <1>$date"; - } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $powergen = MYDB_fetch_array($result); - - $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); - $ratio2 = rand() % 100; - - if($general[item] == 5) { - // 이추 사용 - $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { - // 향낭 사용 - $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { - // 육도, 삼략 사용 - $ratio += 20; - } - - // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } - - // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } - - // 거리보정 - $ratio /= $dist[$destination]; - - if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]에서 금과 쌀을 도둑맞았습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 성공했습니다. <1>$date"; - - // 탈취 최대 400 * 8 - $gold = (rand() % $_firingpower + $_firingbase) * $destcity[level]; - $rice = (rand() % $_firingpower + $_firingbase) * $destcity[level]; - - $nation[gold] -= $gold; - $nation[rice] -= $rice; - if($nation[gold] < $_basegold) { $gold += ($nation[gold] - $_basegold); $nation[gold] = $_basegold; } - if($nation[rice] < $_baserice) { $rice += ($nation[rice] - $_baserice); $nation[rice] = $_baserice; } - $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$destcity[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=34 where city='$destination'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 본국으로 회수, 재야이면 본인이 소유 - if($general[nation] != 0) { - $query = "select gold,rice from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - $nation[gold] += $gold; - $nation[rice] += $rice; - $query = "update nation set gold='$nation[gold]',rice='$nation[rice]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $general[gold] += $gold; - $general[rice] += $rice; - $query = "update general set gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $log[count($log)] = "●금$gold 쌀$rice을 획득했습니다."; - -// TrickInjury($connect, $destination); - $exp = rand() % 100 + 201; - $ded = rand() % 70 + 141; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 탈취가 실패했습니다. <1>$date"; - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_34($connect, &$general) { - global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 5); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select name,nation,def,wall,secu,secu2 from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 파괴 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 파괴 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 파괴 실패. <1>$date"; - } else { - $query = "select power,weap from general where city='$destination' and nation='$destcity[nation]' order by power desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $powergen = MYDB_fetch_array($result); - - $ratio = round((($general[power]+getWeapEff($general[weap]) - $powergen[power]-getWeapEff($powergen[weap])) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); - $ratio2 = rand() % 100; - - if($general[item] == 5) { - // 이추 사용 - $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { - // 향낭 사용 - $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { - // 육도, 삼략 사용 - $ratio += 20; - } - - // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } - - // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } - - // 거리보정 - $ratio /= $dist[$destination]; - - if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:누군가가 $destcity[name]의 성벽을 허물었습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 성공했습니다. <1>$date"; - - // 파괴 - $destcity[def] -= rand() % $_firingpower + $_firingbase; - $destcity[wall] -= rand() % $_firingpower + $_firingbase; - if($destcity[def] < 100) { $destcity[def] = 100; } - if($destcity[wall] < 100) { $destcity[wall] = 100; } - $query = "update city set state=34,def='$destcity[def]',wall='$destcity[wall]' where city='$destination'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - TrickInjury($connect, $destination); - $exp = rand() % 100 + 201; - $ded = rand() % 70 + 141; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 파괴가 실패했습니다. <1>$date"; - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_35($connect, &$general) { - global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 5); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select name,nation,rate,secu,secu2 from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $mynation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $mynation[level]; - } else { - $lbonus = 0; - } - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 선동 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 선동 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 선동 실패. <1>$date"; - } else { - $query = "select ROUND(leader*(100-injury)/100)+horse as sum,horse from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - $ratio = round(((floor($general[leader] * (100 - $general[injury])/100)+getHorseEff($general[horse])+$lbonus - ($gen[sum]-$gen[horse]+getHorseEff($gen[horse]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); - $ratio2 = rand() % 100; - - if($general[item] == 5) { - // 이추 사용 - $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { - // 향낭 사용 - $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { - // 육도, 삼략 사용 - $ratio += 20; - } - - // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } - - // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } - - // 거리보정 - $ratio /= $dist[$destination]; - - if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name]의 백성들이 동요하고 있습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 성공했습니다. <1>$date"; - - // 선동 최대 10 - $destcity[secu] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; - if($destcity[secu] < 0) { $destcity[secu] = 0; } - if($destcity[rate] < 0) { $destcity[rate] = 0; } - $query = "update city set state=32,rate='$destcity[rate]',secu='$destcity[secu]' where city='$destination'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - TrickInjury($connect, $destination); - $exp = rand() % 100 + 201; - $ded = rand() % 70 + 141; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 선동이 실패했습니다. <1>$date"; - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[leader2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_36($connect, &$general) { - global $_firing, $_basefiring, $_firingpower; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $dist = distance($connect, $general[city], 5); - $command = DecodeCommand($general[turn0]); - $destination = $command[1]; - - $query = "select * from city where city='$destination'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select level,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - if($general[level] == 12) { - $lbonus = $mynation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $mynation[level]; - } else { - $lbonus = 0; - } - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - if(!$destcity) { - $log[count($log)] = "●{$admin[month]}월:없는 도시입니다. 기습 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($city[supply] == 0 && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]*5) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($general[nation] == $destcity[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국입니다. $destcity[name]에 기습 실패. <1>$date"; - } elseif($dip[state] >= 7) { - $log[count($log)] = "●{$admin[month]}월:불가침국입니다. $destcity[name]에 기습 실패. <1>$date"; - } else { - $query = "select ROUND((leader+intel+power)*(100-injury)/100)+weap+horse+book as sum,weap,horse,book from general where city='$destination' and nation='$destcity[nation]' order by sum desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - $ratio = round(((floor(($general[leader]+$general[intel]+$general[power]) * (100 - $general[injury])/100)+getWeapEff($general[weap])+getHorseEff($general[horse])+$lbonus+getBookEff($general[book]) - ($gen[sum]-$gen[weap]-$gen[horse]-$gen[book]+getWeapEff($gen[weap])+getHorseEff($gen[horse])+getBookEff($gen[book]))) / $_firing - ($destcity[secu]/$destcity[secu2])/5 + $_basefiring)*100); - $ratio2 = rand() % 100; - - if($general[item] == 5) { - // 이추 사용 - $ratio += 10; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] == 6) { - // 향낭 사용 - $ratio += 20; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 21 && $general[item] <= 22) { - // 육도, 삼략 사용 - $ratio += 20; - } - - // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } - if($general[special] == 31) { $ratio += 20; } - - // 국가보정 - if($mynation[type] == 9) { $ratio += 10; } - - // 거리보정 - $ratio /= $dist[$destination]; - - if($ratio > $ratio2) { - $alllog[count($alllog)] = "●{$admin[month]}월:$destcity[name](이)가 누군가에게 공격 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 성공했습니다. <1>$date"; - - // 기습 - $destcity[agri] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[comm] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[secu] -= rand() % round($_firingpower/4) + $_firingbase; - $destcity[def] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[wall] -= rand() % round($_firingpower/2) + $_firingbase; - $destcity[rate] -= rand() % round($_firingpower/50) + $_firingbase/50; - if($destcity[agri] < 0) { $destcity[agri] = 0; } - if($destcity[comm] < 0) { $destcity[comm] = 0; } - if($destcity[secu] < 0) { $destcity[secu] = 0; } - if($destcity[def] < 0) { $destcity[def] = 0; } - if($destcity[wall] < 0) { $destcity[wall] = 0; } - if($destcity[rate] < 0) { $destcity[rate] = 0; } - $query = "update city set state=32,agri='$destcity[agri]',comm='$destcity[comm]',secu='$destcity[secu]',def='$destcity[def]',wall='$destcity[wall]',rate='$destcity[rate]' where city='$destination'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set firenum=firenum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - TrickInjury($connect, $destination); - $exp = rand() % 100 + 201; - $ded = rand() % 70 + 141; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name]에 기습이 실패했습니다. <1>$date"; - $exp = rand() % 100 + 1; - $ded = rand() % 70 + 1; - } - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $general[leader2]++; - $general[intel2]++; - $general[power2]++; - $general[gold] -= $admin[develcost]*5; - $general[rice] -= $admin[develcost]*5; - $query = "update general set resturn='SUCCESS',gold='$general[gold]',rice='$general[rice]',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_41($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $ratio = rand() % 100; - $exp = $general[crew] / 400; - $crewexp = $general[crew] * $general[train] * $general[atmos] / 20 / 10000; - // 랜덤치 - $exp = round($exp * (80 + rand() % 41)/100); // 80 ~ 120% - $crewexp = round($crewexp * (80 + rand() % 41)/100); // 80 ~ 120% - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ratio = CharCritical($ratio, $general[personal]); - - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 단련 실패. <1>$date"; - } elseif($general[gold] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 단련 실패. <1>$date"; - } elseif($general[rice] < $admin[develcost]) { - $log[count($log)] = "●{$admin[month]}월:군량이 모자랍니다. 단련 실패. <1>$date"; - } elseif($general[train] < 40) { - $log[count($log)] = "●{$admin[month]}월:훈련이 너무 낮습니다. 단련 실패. <1>$date"; - } elseif($general[atmos] < 40) { - $log[count($log)] = "●{$admin[month]}월:사기가 너무 낮습니다. 단련 실패. <1>$date"; - } elseif($crewexp == 0) { - $log[count($log)] = "●{$admin[month]}월:병사가 모자랍니다. 단련 실패. <1>$date"; - } else { - $type = floor($general[crewtype] / 10) * 10; - switch($type) { - case 0: $crewstr = '보병'; break; - case 1: $crewstr = '궁병'; break; - case 2: $crewstr = '기병'; break; - case 3: $crewstr = '귀병'; break; - case 4: $crewstr = '차병'; break; - } - - if($ratio < 33) { - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도 향상이 지지부진했습니다. <1>$date"; - } elseif($ratio < 66) { - $exp = $exp * 2; - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp * 2); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 향상되었습니다. <1>$date"; - } else { - $exp = $exp * 3; - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $crewexp * 3); - $log[count($log)] = "●{$admin[month]}월:$crewstr 숙련도가 일취월장했습니다. <1>$date"; - } - - // 경험치 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold-'$admin[develcost]',rice=rice-'$admin[develcost]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushGenLog($general, $log); -} - -function process_42($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $type = rand() % 27 + 1; - $exp = 30; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $exp2 = $exp * 2; - - switch($type) { - case 1: - $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 금을 300 받았습니다. <1>$date"; - // 자금 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',gold=gold+300,experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 2: - $log[count($log)] = "●{$admin[month]}월:지나가는 행인에게서 쌀을 300 받았습니다. <1>$date"; - // 군량 상승 // 명성 상승 - $query = "update general set resturn='SUCCESS',rice=rice+300,experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 3: - $log[count($log)] = "●{$admin[month]}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 4: - $log[count($log)] = "●{$admin[month]}월:명사와 설전을 벌였으나 망신만 당했습니다. <1>$date"; - // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 5: - $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 6: - $log[count($log)] = "●{$admin[month]}월:동네 장사와 힘겨루기를 했지만 망신만 당했습니다. <1>$date"; - // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 7: - $log[count($log)] = "●{$admin[month]}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; - // 자금 상승 // 경험치 상승 // 명성 상승 - $general[power2] += 2; - $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 8: - $log[count($log)] = "●{$admin[month]}월:산적을 만나 금 200을 빼앗겼습니다. <1>$date"; - $general[gold] -= 200; - if($general[gold] <= 0) { $general[gold] = 0; } - // 자금 하락 // 경험 상승 - $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 9: - $log[count($log)] = "●{$admin[month]}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; - // 군량 상승 // 경험치 상승 - $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 10: - $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 다쳤습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 10 + 10; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 11: - $log[count($log)] = "●{$admin[month]}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; - // 군량 상승 // 경험치 상승 // 명성 상승 - $general[power2] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 12: - $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 다쳤습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 10 + 10; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 13: - $log[count($log)] = "●{$admin[month]}월:주점에서 사람들과 어울려 술을 마셨습니다. <1>$date"; - // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 14: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주었습니다. <1>$date"; - // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 15: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구해주다가 다쳤습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 10 + 10; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 16: - $log[count($log)] = "●{$admin[month]}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[intel2]++; - $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 17: - $log[count($log)] = "●{$admin[month]}월:돈을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; - $general[gold] -= 200; - if($general[gold] <= 0) { $general[gold] = 0; } - // 명성 상승 - $query = "update general set resturn='SUCCESS',gold='$general[gold]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 18: - $log[count($log)] = "●{$admin[month]}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[intel2]++; - $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 19: - $log[count($log)] = "●{$admin[month]}월:쌀을 200 빌려주었다가 떼어먹혔습니다. <1>$date"; - $general[rice] -= 200; - if($general[rice] <= 0) { $general[rice] = 0; } - // 명성 상승 - $query = "update general set resturn='SUCCESS',rice='$general[rice]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 20: - $log[count($log)] = "●{$admin[month]}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[intel2] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 21: - $log[count($log)] = "●{$admin[month]}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 22: - $log[count($log)] = "●{$admin[month]}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[power2] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 23: - $log[count($log)] = "●{$admin[month]}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; - // 경험치 상승 // 명성 상승 - $general[leader2] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 24: - $log[count($log)] = "●{$admin[month]}월:호랑이에게 물려 크게 다쳤습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 30 + 20; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 25: - $log[count($log)] = "●{$admin[month]}월:곰에게 할퀴어 크게 다쳤습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 30 + 20; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 26: - $log[count($log)] = "●{$admin[month]}월:위기에 빠진 사람을 구하다가 죽을뻔 했습니다. <1>$date"; - // 경험치 하락 // 명성 상승 - $injury = rand() % 50 + 30; - $general[power2]--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - default: - $log[count($log)] = "●{$admin[month]}월:아무일도 일어나지 않았습니다. <1>$date"; - // 명성 상승 - $query = "update general set resturn='SUCCESS',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } - - $log = checkAbility($connect, $general, $log); - pushGenLog($general, $log); -} - -function process_43($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $what = $command[3]; - $who = $command[2]; - $amount = $command[1]; - $amount *= 100; // 100~10000까지 - - if($amount > 10000) { $amount = 10000; } - if($amount < 100) { $amount = 100; } - if($what == 1) { $dtype = "금"; } - elseif($what == 2) { $dtype = "쌀"; } - else { $what = 2; $dtype = "쌀"; } - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select no,name,nation,gold,rice from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - - if($what == 1 && $general[gold] < $amount) { $amount = $general[gold]; } - if($what == 2 && $general[rice] < $amount) { $amount = $general[rice]; } - - if(!$gen) { - $log[count($log)] = "●{$admin[month]}월:없는 장수입니다. 증여 실패. <1>$date"; - } elseif($what == 1 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 증여 실패. <1>$date"; - } elseif($what == 2 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 증여 실패. <1>$date"; - } elseif($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야는 불가능합니다. 증여 실패. <1>$date"; - } elseif($general[nation] != $city[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; - } elseif($general[nation] != $gen[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 장수가 아닙니다. 증여 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; - } else { - $genlog[count($genlog)] = "●{$admin[month]}월:$general[name]에게서 $dtype $amount을 증여 받았습니다."; - $log[count($log)] = "●{$admin[month]}월:$gen[name]에게 $dtype $amount을 증여했습니다. <1>$date"; - - if($what == 1) { - $gen[gold] += $amount; - $query = "update general set gold='$gen[gold]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $general[gold] -= $amount; - $query = "update general set gold='$general[gold]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($what == 2) { - $gen[rice] += $amount; - $query = "update general set rice='$gen[rice]' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $general[rice] -= $amount; - $query = "update general set rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $exp = 70; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); - pushGenLog($gen, $genlog); -} - -function process_44($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name,gold,rice from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $what = $command[2]; - $amount = $command[1]; - $amount *= 100; // 100~10000까지 - - if($amount > 10000) { $amount = 10000; } - if($amount < 100) { $amount = 100; } - if($what == 1) { - $dtype = "금"; - if($general[gold] < $amount) { $amount = $general[gold]; } - } elseif($what == 2) { - $dtype = "쌀"; - if($general[rice] < $amount) { $amount = $general[rice]; } - } else { - $what = 2; - $dtype = "쌀"; - if($general[rice] < $amount) { $amount = $general[rice]; } - } - - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 헌납 실패. <1>$date"; - } elseif($what == 1 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. 헌납 실패. <1>$date"; - } elseif($what == 2 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. 헌납 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $mynation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 증여 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 증여 실패. <1>$date"; - } else { -// $alllog[count($alllog)] = "●{$admin[month]}월:$nation[name]에서 장수들이 재산을 헌납 하고 있습니다."; - $log[count($log)] = "●{$admin[month]}월: $dtype $amount을 헌납했습니다. <1>$date"; - - if($what == 1) { - $general[gold] -= $amount; - $query = "update general set gold='$general[gold]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[gold] += $amount; - $query = "update nation set gold='$nation[gold]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($what == 2) { - $general[rice] -= $amount; - $query = "update general set rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $nation[rice] += $amount; - $query = "update nation set rice='$nation[rice]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - $exp = 70; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_45($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name,chemi from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($general[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야입니다. 하야 실패. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반제한중 하야는 불가능합니다. 하야 실패. <1>$date"; - } elseif($general[level] == 12) { - $log[count($log)] = "●{$admin[month]}월:군주입니다. 하야 실패. <1>$date"; - } else { - $exp = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no from diplomacy where me='$general[nation]' and state>='3' and state<='4'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount1 = MYDB_num_rows($dipresult); - - $query = "select no from diplomacy where me='$general[nation]' and state>='5' and state<='6'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount2 = MYDB_num_rows($dipresult); - - $gold = 0; - $rice = 0; - // 금쌀1000이상은 남김 - if($general[gold] > 1000) { - $gold = $general[gold] - 1000; - $general[gold] = 1000; - } - if($general[rice] > 1000) { - $rice = $general[rice] - 1000; - $general[rice] = 1000; - } - - if($dipcount1 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 통합에 반대하며 $nation[name](을)를 떠났습니다."; - $log[count($log)] = "●{$admin[month]}월:통합에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:통합에 반대하며 $nation[name](을)를 떠남"); - - // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } elseif($dipcount2 > 0) { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 합병에 반대하며 $nation[name](을)를 떠났습니다."; - $log[count($log)] = "●{$admin[month]}월:합병에 반대하며 $nation[name]에서 떠났습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:합병에 반대하며 $nation[name](을)를 떠남"); - - // 국적 바꾸고 등급 재야로 - $query = "update general set resturn='SUCCESS',belong=0,nation=0,level=0,makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $nation[name]에서 하야했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nation[name]에서 하야했습니다. <1>$date"; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]에서 하야"); - - // 국적 바꾸고 등급 재야로 // 명성/공헌 N*10% 감소 - $query = "update general set resturn='SUCCESS',belong=0,betray=betray+1,nation=0,level=0,experience=experience*(1-0.1*betray),dedication=dedication*(1-0.1*betray),makelimit='12',gold='$general[gold]',rice='$general[rice]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //도시의 태수, 군사, 시중직도 초기화 - $query = "update city set gen1='0' where gen1='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no from troop where troop='$general[troop]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $troop = MYDB_fetch_array($result); - - //부대장일 경우 - if($troop[no] == $general[no]) { - // 모두 탈퇴 - $query = "update general set troop='0' where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대 삭제 - $query = "delete from troop where troop='$general[troop]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update general set troop='0' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - $nation[chemi] -= 1; - if($nation[chemi] < 0) { $nation[chemi] = 0; } - - $query = "update nation set totaltech=tech*'$gencount',gennum='$gennum',chemi='$nation[chemi]',gold=gold+'$gold',rice=rice+'$rice' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_46($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - $query = "select nation from nation where name='$general[makenation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - $command = DecodeCommand($general[turn0]); - $color = $command[1]; - $type = $command[2]; // 1 ~ 13 - - $colors = GetNationColors(); - if($color >= count($colors)) { $color = 0; } - $color = $colors[$color]; - - if($type < 1) { $type = 9; } - elseif($type > 13) { $type = 9; } - - if($gencount < 2) { - $log[count($log)] = "●{$admin[month]}월:수하 장수가 부족합니다. 건국 실패. <1>$date"; - } elseif($admin[year] >= $admin[startyear]+2) { - $log[count($log)] = "●{$admin[month]}월:건국 기간이 지났습니다. 건국 실패. <1>$date"; - } elseif($city[nation] != 0) { - $log[count($log)] = "●{$admin[month]}월:공백지가 아닙니다. 건국 실패. <1>$date"; - } elseif($nationcount > 0) { - $log[count($log)] = "●{$admin[month]}월:존재하는 국가명입니다. 건국 실패. <1>$date"; - } elseif($general[makelimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 건국 실패. <1>$date"; - } elseif($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 건국 실패. <1>$date"; - } elseif($city[level] != 5 && $city[level] != 6) { - $log[count($log)] = "●{$admin[month]}월:중, 소 도시에서만 가능합니다. 건국 실패. <1>$date"; - } else { - $query = "update nation set name='$general[makenation]',color='$color',level=1,type='$type',capital='$general[city]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select nation,name,history from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - // 현 도시 소속지로 - $query = "update city set nation='$nation[nation]',conflict='',conflict2='' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "●{$admin[month]}월:$nation[name](을)를 건국하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에 국가를 건설하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【건국】".getNationType($type)." $nation[name](이)가 새로이 등장하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 건국"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nation[name](을)를 건국"); - - $exp = 1000; - $ded = 1000; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = uniqueItem($connect, $general, $log, 3); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_47($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name,level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - //현재 외교 진행중(평시, 불가침만 제외)일때 - $query = "select state from diplomacy where me='$general[nation]' and state!='2' and state!='7'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($result); - - - if($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; - } elseif($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:초반제한중에는 방랑이 불가능합니다. 방랑 실패."; - } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:방랑할 수 없는 외교상태입니다. 방랑 실패."; - } elseif($nation[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:이미 방랑군입니다. 방랑 실패."; - } else { - $log[count($log)] = "●{$admin[month]}월:영토를 버리고 방랑의 길을 떠납니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 방랑의 길을 떠납니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 버리고 방랑"); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【방랑】$general[name]은(는) 방랑의 길을 떠납니다."; - - //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); - // 국명, 색깔 바꿈 국가 레벨 0, 성향리셋, 기술0 - $query = "update nation set name='$general[name]',color='330000',level='0',type='0',tech='0',totaltech='0',capital='0' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 본인 빼고 건국/임관제한 - $query = "update general set makelimit='12' where no!='$general[no]' and nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 건국/임관제한 - $query = "update general set resturn='SUCCESS',makelimit='12' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 관직장수 일반으로 - $query = "update general set level=1 where nation='$general[nation]' and level <= 11"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 전 도시 공백지로 - $query = "update city set nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 리셋 - $query = "update diplomacy set state='2',term='0' where me='$general[nation]' or you='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushHistory($connect, $history); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_48($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $city = getCity($connect, $general[city]); - - $command = DecodeCommand($general[turn0]); - $type = $command[1]; - - if($type < 100) { $isweap = 0; } - elseif($type < 200) { $type -= 100; $isweap = 1; } - elseif($type < 300) { $type -= 200; $isweap = 2; } - elseif($type < 400) { $type -= 300; $isweap = 3; } - else { $type = 7; } - - if($isweap == 3) { $cost = getItemCost2($type); } - else { $cost = getItemCost($type); } - - //특기 보정 : 거상 - if($general[special] == 30 && $type != 0) { $cost *= 0.5; } - - if($city[trade] == 0 && $general[special] != 30) { - $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. 장비매매 실패. <1>$date"; - } elseif($city[secu]/1000 < $type) { - $log[count($log)] = "●{$admin[month]}월:이 도시에서는 구할 수 없었습니다. 구입 실패. <1>$date"; - } elseif($type > 6 || $type < 0) { - $log[count($log)] = "●{$admin[month]}월:구입할 수 있는 물건이 아닙니다. 구입 실패. <1>$date"; - } elseif($general[gold] < $cost && $type != 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 모자랍니다. 구입 실패. <1>$date"; - } elseif($general[weap] == 0 && $isweap == 0 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:무기가 없습니다. 판매 실패. <1>$date"; - } elseif($general[book] == 0 && $isweap == 1 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:서적이 없습니다. 판매 실패. <1>$date"; - } elseif($general[horse] == 0 && $isweap == 2 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:명마가 없습니다. 판매 실패. <1>$date"; - } elseif($general[item] == 0 && $isweap == 3 && $type == 0) { - $log[count($log)] = "●{$admin[month]}월:도구가 없습니다. 판매 실패. <1>$date"; - } else { - if($isweap == 0) { - if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getWeapName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $cost = round(getItemCost($general[weap]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getWeapName($general[weap])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } elseif($isweap == 1) { - if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getBookName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='$type',gold=gold-'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $cost = round(getItemCost($general[book]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getBookName($general[book])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',book='0',gold=gold+'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } elseif($isweap == 2) { - if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getHorseName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='$type',gold=gold-'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $cost = round(getItemCost($general[horse]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getHorseName($general[horse])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',horse='0',gold=gold+'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } elseif($isweap == 3) { - if($type != 0) { - $log[count($log)] = "●{$admin[month]}월:".getItemName($type)."(을)를 구입했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='$type',gold=gold-'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $cost = round(getItemCost2($general[item]) / 2, 0); - $log[count($log)] = "●{$admin[month]}월:".getItemName($general[item])."(을)를 판매했습니다. <1>$date"; - $query = "update general set resturn='SUCCESS',item='0',gold=gold+'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } - - $exp = 10; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($general, $log); -} - -function process_49($connect, &$general) { - global $_taxrate; - - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select level from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $city = getCity($connect, $general[city]); - - $command = DecodeCommand($general[turn0]); - $type = $command[2]; - $amount = $command[1]; - $amount *= 100; - - if($type != 1 && $type != 2) { $type = 1; } - if($amount < 100) { $amount = 100; } - elseif($amount > 10000) { $amount = 10000; } - - if($city[trade] == 0 && ($general[special] == 30 || $general[npc] >= 2)) { - $city[trade] = 100; - } - - // 거상 f배 이득시 금 계산 - // a : 쌀, b : 물가, f : 배수, c : 금 - // (0.7 ~1.3) : c = a((1+f)b-f) - // (0.99~1.01) : c = a((1-f)b+f) - if($type == 1) { - $dtype = "군량 판매"; - if($general[rice] < $amount) { $amount = $general[rice]; } - $cost = $amount * $city[trade] / 100; - //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 - $tax = $cost * $_taxrate; - $cost = $cost - $tax; - } elseif($type == 2) { - $dtype = "군량 구입"; - $cost = $amount * $city[trade] / 100; - //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] < 100) { $cost = $amount * (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] > 100) { $cost = $amount * (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 - $tax = $cost * $_taxrate; - $cost = $cost + $tax; - if($general[gold] < $cost) { - $cost = $general[gold]; - $tax = $cost * $_taxrate; - $amount = ($cost-$tax) * 100 / $city[trade]; - //특기 보정 : 거상 - if($general[special] == 30 && $city[trade] < 100) { $amount = ($cost-$tax) / (6 * $city[trade]/100 - 5); } // 이익인 경우 5배 이득 - if($general[special] == 30 && $city[trade] > 100) { $amount = ($cost-$tax) / (0.2 * $city[trade]/100 + 0.8); } // 손해인 경우 1/5배 손해 - } - } - - $cost = round($cost); - $amount = round($amount); - $tax = round($tax); - - if($city[trade] == 0 && $general[special] != 30 && $general[npc] < 2) { - $log[count($log)] = "●{$admin[month]}월:도시에 상인이 없습니다. $dtype 실패. <1>$date"; - } elseif($general[nation] != $city[nation] && $nation[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. $dtype 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. $dtype 실패. <1>$date"; - } elseif($type == 1 && $general[rice] <= 0) { - $log[count($log)] = "●{$admin[month]}월:군량이 없습니다. $dtype 실패. <1>$date"; - } elseif($type == 2 && $general[gold] <= 0) { - $log[count($log)] = "●{$admin[month]}월:자금이 없습니다. $dtype 실패. <1>$date"; - } else { - // 판매 - if($type == 1) { - $log[count($log)] = "●{$admin[month]}월:군량 $amount을 팔아 자금 $cost을 얻었습니다. <1>$date"; - // 군량 감소 - $query = "update general set rice=rice-{$amount} where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 증가 - $query = "update general set gold=gold+{$cost} where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 구입 - } elseif($type == 2) { - $log[count($log)] = "●{$admin[month]}월:군량 $amount을 사서 자금 $cost을 썼습니다. <1>$date"; - // 군량 증가 - $query = "update general set rice=rice+{$amount} where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 자금 감소 - $query = "update general set gold=gold-{$cost} where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 세금 국고로 - $query = "update nation set gold=gold+'$tax' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $exp = 30; - $ded = 50; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 경험치 상승 - switch(rand()%3) { - case 0: - $general[leader2]++; - $query = "update general set leader2='$general[leader2]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 1: - $general[power2]++; - $query = "update general set power2='$general[power2]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 2: - $general[intel2]++; - $query = "update general set intel2='$general[intel2]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } - - $log = checkAbility($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_50($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $log[count($log)] = "●{$admin[month]}월:건강 회복을 위해 요양합니다. <1>$date"; - // 경험치 상승 // 공헌도, 명성 상승 - $exp = 10; - $ded = 7; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - $query = "update general set resturn='SUCCESS',injury='0',dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($general, $log); -} - -function process_51($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 권고 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 권고 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 권고 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 권고 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 항복 권고 서신을 보냈습니다.<1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 상대에게 발송 - //먼저 삭제된 칸 중 가장 오래된 칸 찾음 - $deleted = 4; - for($i=0; $i < 5; $i++) { - if($younation["dip{$i}"] == "") { $deleted = $i; } - } - //기존 메세지 한칸씩 뒤로 미룸 - for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); - } - //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; - $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 항복 권고 서신',dip0_type='4',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $log = checkAbility($connect, $general, $log); - } - - pushGenLog($general, $log); -} - -function process_52($connect, &$general) { - global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,level,gold,rice,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - $command = DecodeCommand($mynation["l{$general[level]}turn0"]); - $rice = $command[3]; - $gold = $command[2]; - $which = $command[1]; - $rice *= 1000; - $gold *= 1000; - $limit = $mynation[level] * 10000; - - if($gold < 0) { $gold = 0; } - if($rice < 0) { $rice = 0; } - - $query = "select nation,name,gold,rice,surlimit,history from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($gold > $mynation[gold]-$_basegold) { $gold = $mynation[gold] - $_basegold; } - if($rice > $mynation[rice]-$_baserice) { $rice = $mynation[rice] - $_baserice; } - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 원조 실패. <1>$date"; - } elseif($gold == 0 && $rice == 0) { - $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; - } elseif($gold < 0 || $rice < 0) { - $log[count($log)] = "●{$admin[month]}월:보낼 물자가 부족합니다. 원조 실패. <1>$date"; - } elseif($gold > $limit || $rice > $limit) { - $log[count($log)] = "●{$admin[month]}월:작위 제한량 이상은 보낼 수 없습니다. 원조 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 원조 실패. <1>$date"; - } elseif($mynation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:외교제한중입니다. 원조 실패. <1>$date"; - } elseif($younation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:상대국이 외교제한중입니다. 원조 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 원조 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 원조 실패. <1>$date"; - } else { - // 본국 자원 감소 - $query = "update nation set gold=gold-'$gold',rice=rice-'$rice',surlimit=surlimit+12 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 상대국 자원 증가 - $query = "update nation set gold=gold+'$gold',rice=rice+'$rice' where nation='$which'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - $genlog[0] = "$younation[name](으)로 금$gold 쌀$rice을 지원했습니다."; - pushGenLog($gen, $genlog); - } - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name](으)로 금$gold 쌀$rice을 지원"); - $mynation = addNationHistory($connect, $mynation, "●{$admin[year]}년 {$admin[month]}월:$younation[name](으)로 금$gold 쌀$rice을 지원"); - $younation = addNationHistory($connect, $younation, "●{$admin[year]}년 {$admin[month]}월:$mynation[name](으)로부터 금$gold 쌀$rice을 지원 받음"); - - //상대국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$which' and level>='9'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - $genlog[0] = "$mynation[name]에서 금$gold 쌀$rice을 원조 했습니다."; - pushGenLog($gen, $genlog); - } - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【원조】$mynation[name]에서 $younation[name](으)로 물자를 지원합니다."; - $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 물자를 지원합니다. <1>$date"; - - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -// $log = checkAbility($connect, $general, $log); - } - pushHistory($connect, $history); - pushGenLog($general, $log); -} - -function process_53($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name](으)로 통합 제의 서신을 보냈습니다.<1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 상대에게 발송 - //먼저 삭제된 칸 중 가장 오래된 칸 찾음 - $deleted = 4; - for($i=0; $i < 5; $i++) { - if($younation["dip{$i}"] == "") { $deleted = $i; } - } - //기존 메세지 한칸씩 뒤로 미룸 - for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); - } - //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; - $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 통합 제의 서신',dip0_type='5',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_54($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $command = DecodeCommand($general[turn0]); - $who = $command[1]; - - $query = "select no,name,nation,history from general where no='$who'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nextruler = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - //현재 외교 진행중(통합제의중)일때 - $query = "select state from diplomacy where me='$general[nation]' and state='4'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($result); - - if($nextruler[name] == "") { - $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; - } elseif($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. 선양 실패. <1>$date"; - } elseif($nextruler[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:잘못된 장수입니다. 선양 실패. <1>$date"; - } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:현재 통합 진행중입니다. 선양 실패."; - } else { - //군주 교체 - $query = "update general set level='12' where no='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 태수,군사,시중이었다면 해제 - $query = "update city set gen1='0' where gen1='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$who'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set resturn='SUCCESS',level='1',experience=experience*0.7 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●$admin[year]년 $admin[month]월:【선양】$general[name](이)가 $nation[name]의 군주 자리를 $nextruler[name]에게 선양했습니다."; - $log[count($log)] = "●{$admin[month]}월:$nextruler[name]에게 군주의 자리를 물려줍니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 물려받습니다."; - - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 $nextruler[name]에게 선양"); - $nextruler = addHistory($connect, $nextruler, "●$admin[year]년 $admin[month]월:$nation[name]의 군주자리를 물려 받음"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $nextruler[name]에게 선양"); - } - pushGenLog($general, $log); - pushGenLog($nextruler, $youlog); - pushHistory($connect, $history); -} - -function process_55($connect, &$general) { - global $_baserice; - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation from nation where name='$general[name]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - if($nationcount > 0) { $makename = _String::SubStr("$nationcount".$general[name], 0, 6); } - else { $makename = $general[name]; } - - if($general[level] != 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 아닙니다. 거병 실패. <1>$date"; - } elseif($admin[year] >= $admin[startyear]+2) { - $log[count($log)] = "●{$admin[month]}월:거병 기간이 지났습니다. 거병 실패. <1>$date"; - } elseif($general[makelimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:재야가 된지 12시간이 지나야 합니다. 거병 실패. <1>$date"; - } else { - $query = "insert into nation (name, color, gold, rice, rate, bill, tricklimit, surlimit, type, gennum) values ('$makename', '330000', '0', '$_baserice', '20' ,'100', '36', '72', '0', '1')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select nation,name,history from nation where name='$makename'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $exp = 100; - $ded = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 명성 상승 - // 군주로 - // 현 국가 소속으로 - $query = "update general set resturn='SUCCESS',belong=1,level=12,nation='$nation[nation]',dedication=dedication+'$ded', experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "●{$admin[month]}월:거병에 성공하였습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $city[name]에서 거병하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【거병】$general[name](이)가 세력을 결성하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$city[name]에서 거병"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $city[name]에서 거병"); - - // 외교테이블 추가 - $query = "select nation from nation where nation!='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - for($i=0; $i < $nationcount; $i++) { - $younation = MYDB_fetch_array($result); - $query = "insert into diplomacy (me, you, state, term) values ('$nation[nation]', '$younation[nation]', '2', '0')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "insert into diplomacy (me, you, state, term) values ('$younation[nation]', '$nation[nation]', '2', '0')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_56($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select name from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select city from city where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - if($general[level] != 12) { - $log[count($log)] = "●{$admin[month]}월:군주가 아닙니다. <1>$date"; - } elseif($citycount != 0) { - $log[count($log)] = "●{$admin[month]}월:방랑군이 아닙니다. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:세력을 해산했습니다. <1>$date"; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 세력을 해산했습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$nation[name](을)를 해산"); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - // 수동 해산인 국가 페널티, 자금, 군량 - if($genCount > 1) { - $query = "update general set resturn='SUCCESS' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=1000 where nation='$general[nation]' and gold>1000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set rice=1000 where nation='$general[nation]' and rice>1000"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //분쟁기록 모두 지움 - DeleteConflict($connect, $general[nation]); - deleteNation($connect, $general); - } - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_57($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month,killturn from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select npc,no,name,killturn,history from general where nation='$general[nation]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $ruler = MYDB_fetch_array($result); - - if($general[level] == 0) { - $log[count($log)] = "●{$admin[month]}월:재야 입니다. 모반 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부 이상만 가능합니다. 모반 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 모반 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 모반 실패. <1>$date"; - } elseif($general[level] == 12) { - $log[count($log)] = "●{$admin[month]}월:이미 군주 입니다. 모반 실패. <1>$date"; - } elseif($ruler[killturn] >= $admin[killturn]) { - $log[count($log)] = "●{$admin[month]}월:군주가 활동중입니다. 모반 실패. <1>$date"; - } elseif($ruler[npc] >= 2) { - $log[count($log)] = "●{$admin[month]}월:군주가 NPC입니다. 모반 실패. <1>$date"; - } else { - //군주 교체 - $query = "update general set resturn='SUCCESS',level='12' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 태수,군사,시중이었다면 해제 - $query = "update city set gen1='0' where gen1='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen2='0' where gen2='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set gen3='0' where gen3='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set level='1',experience=experience*0.7 where no='$ruler[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[count($log)] = "●{$admin[month]}월:모반에 성공했습니다. <1>$date"; - $youlog[count($youlog)] = "●{$admin[month]}월:$general[name]에게서 군주의 자리를 뺏겼습니다."; - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 모반에 성공했습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【모반】$general[name](이)가 $nation[name]의 군주 자리를 찬탈했습니다."; - - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:모반으로 $nation[name]의 군주자리를 찬탈"); - $ruler = addHistory($connect, $ruler, "●$admin[year]년 $admin[month]월:$general[name]의 모반으로 인해 $nation[name]의 군주자리를 박탈당함"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $ruler[name]에게서 군주자리를 찬탈"); - } - pushGenLog($general, $log); - pushGenLog($ruler, $youlog); - pushAllLog($alllog); - pushHistory($connect, $history); -} - -function process_61($connect, &$general) { - global $_basegold, $_baserice; - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost,turnterm from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select gold,rice,name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $when = $command[2]; - $which = $command[1]; - - if($when < 1) { $when = 1; } - elseif($when > 20) { $when = 20; } - - $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; -// } elseif($nation[gold]-$_basegold < $admin[develcost] || $nation[rice]-$_baserice < $admin[develcost]) { -// $log[count($log)] = "●{$admin[month]}월:증정할 물자가 부족합니다. 제의 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 불가침 제의 서신을 보냈습니다.<1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 상대에게 발송 - //먼저 삭제된 칸 중 가장 오래된 칸 찾음 - $deleted = 4; - for($i=0; $i < 5; $i++) { - if($younation["dip{$i}"] == "") { $deleted = $i; } - } - //기존 메세지 한칸씩 뒤로 미룸 - for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); - } - //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; - $type = $when * 100 + 6; - $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 {$when}년 불가침 제의 서신',dip0_type='$type',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 3턴후 - $date = addTurn($date, $admin[turnterm]); - $date = addTurn($date, $admin[turnterm]); - $date = addTurn($date, $admin[turnterm]); - //조건 표시기한 설정 - $query = "update diplomacy set showing='{$date}' where me='$general[nation]' and you='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // $admin[develcost]*10씩 차감 -// $amount = $admin[develcost]; -// $query = "update nation set gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; -// MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_62($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,history,l{$general[level]}turn0,color from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,color,history from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - $query = "select * from general where nation='$younation[nation]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($result); - - //아국과의 관계 - $query = "select state from diplomacy where me='$nation[nation]' and you='$younation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - //대상국이 외교 진행중(합병수락중,통합수락중)일때 - $query = "select state from diplomacy where me='$younation[nation]' and (state='3' or state='5')"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 선포 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 선포 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 선포 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 0) { - $log[count($log)] = "●{$admin[month]}월:아국과 이미 교전중입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 1) { - $log[count($log)] = "●{$admin[month]}월:아국과 이미 선포중입니다. 선포 실패. <1>$date"; - } elseif($dip[state] == 7) { - $log[count($log)] = "●{$admin[month]}월:아국과 불가침중입니다. 선포 실패. <1>$date"; - } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:상대국이 외교 진행중입니다. 선포 실패. <1>$date"; - } elseif(!isClose($connect, $nation[nation], $younation[nation])) { - $log[count($log)] = "●{$admin[month]}월:인접하지 않았습니다. 선포 실패. <1>$date"; - } elseif($admin['year'] <= $admin['startyear']) { - $log[count($log)] = "●{$admin[month]}월:초반제한 해제 2년전부터 가능합니다. 선포 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 선전 포고 했습니다.<1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $younation[name]선전 포고 하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【선포】$nation[name](이)가 $younation[name]에 선전 포고 하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$younation[name]에 선전 포고"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $younation[name]에 선전 포고"); - $younation = addNationHistory($connect, $younation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 선전 포고"); - - //외교 변경 - $query = "update diplomacy set state='1',term='24' where me='$nation[nation]' and you='$younation[nation]'"; - MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - $query = "update diplomacy set state='1',term='24' where me='$younation[nation]' and you='$nation[nation]'"; - MYDB_query($query, $connect) or Error("ally ".MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국메로 저장 - $msg = "【외교】$admin[year]년 $admin[month]월:$younation[name]에 선전포고"; - $youmsg = "【외교】$admin[year]년 $admin[month]월:$nation[name]에서 선전포고"; - - PushMsg(2, $nation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $msg); - PushMsg(3, $younation[nation], $general[picture], $general[imgsvr], "{$general[name]}:{$nation[name]}▶", $nation[color], $younation[name], $younation[color], $youmsg); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_63($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 종전 제의 서신을 보냈습니다. <1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 상대에게 발송 - //먼저 삭제된 칸 중 가장 오래된 칸 찾음 - $deleted = 4; - for($i=0; $i < 5; $i++) { - if($younation["dip{$i}"] == "") { $deleted = $i; } - } - //기존 메세지 한칸씩 뒤로 미룸 - for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); - } - //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; - $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 종전 제의 서신',dip0_type='7',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_64($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select name,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,dip0,dip0_type,dip0_who,dip0_when,dip1,dip1_type,dip1_who,dip1_when,dip2,dip2_type,dip2_who,dip2_when,dip3,dip3_type,dip3_who,dip3_when,dip4,dip4_type,dip4_who,dip4_when from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - - if($younation[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:멸망한 국가입니다. 제의 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 제의 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 제의 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 제의 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$younation[name]으로 파기 제의 서신을 보냈습니다. <1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 상대에게 발송 - //먼저 삭제된 칸 중 가장 오래된 칸 찾음 - $deleted = 4; - for($i=0; $i < 5; $i++) { - if($younation["dip{$i}"] == "") { $deleted = $i; } - } - //기존 메세지 한칸씩 뒤로 미룸 - for($i=$deleted-1; $i >=0; $i--) { - moveMsg($connect, "nation", "dip", $i+1, $younatin["dip{$i}"], $younation["dip{$i}_type"], $younation["dip{$i}_who"], $younation["dip{$i}_when"], "nation", $younation[nation]); - } - //권고 서신시 장수번호/상대국 번호 - $me = $general[no] * 10000 + $younation[nation]; - $date = date('Y-m-d H:i:s'); - $query = "update nation set dip0='{$nation[name]}의 불가침 파기 서신',dip0_type='8',dip0_who='$me',dip0_when='$date' where nation='$younation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $log = checkAbility($connect, $general, $log); - } - pushGenLog($general, $log); -} - -function process_65($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select city from city where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - $query = "select nation,capital,name,surlimit,history,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation,pop,gen1,gen2,gen3 from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - //아국이 외교중(교전, 선포, 합병, 통합 // 즉 !통상, !불가침)일때 - $query = "select state from diplomacy where me='$nation[nation]' and (state!='2' and state!='7')"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($result); - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 초토화 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 초토화 실패. <1>$date"; - } elseif($nation[capital] == $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도입니다. 초토화 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 초토화 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 초토화 실패. <1>$date"; - } elseif($citycount <= 4) { - $log[count($log)] = "●{$admin[month]}월:더이상 물러날 수 없습니다. 초토화 실패. <1>$date"; - } elseif($dipcount != 0) { - $log[count($log)] = "●{$admin[month]}월:평시에만 가능합니다. 초토화 실패. <1>$date"; - } elseif($nation[surlimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:제한 턴이 있습니다. 초토화 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 초토화했습니다. <1>$date"; - $exp = 5; - $ded = 5; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]초토화를 명령하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【초토화】$nation[name](이)가 $destcity[name](을)를 초토화하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]초토화를 명령"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]초토화를 명령"); - - //외교제한 24 - $amount = round($destcity[pop] * 0.1); - $query = "update nation set surlimit='24',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //직위해제 - $query = "update general set level=1 where no='$destcity[gen1]' or no='$destcity[gen2]' or no='$destcity[gen3]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //성 공백지로 - $query = "update city set pop=pop*0.1,rate=50,agri=agri*0.1,comm=comm*0.1,secu=secu*0.1,nation='0',front='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //전장수 10% 삭감 - $query = "update general set experience=experience*0.9,dedication=dedication*0.9 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_66($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $dist = distance($connect, $nation[capital], 1); - $amount = $admin[develcost] * 10; - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 66) { - $term = floor($code/100) + 1; - $code = $term * 100 + 66; - } else { - $term = 1; - $code = 100 + 66; - } - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 천도 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 천도 실패. <1>$date"; - } elseif($city[supply] == 0) { - $log[count($log)] = "●{$admin[month]}월:고립된 도시입니다. 천도 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 영토가 아닙니다. 천도 실패. <1>$date"; - } elseif($dist[$destcity[city]] != 1) { - $log[count($log)] = "●{$admin[month]}월:인접도시가 아닙니다. 천도 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 천도 실패. <1>$date"; - } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { - $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 천도 실패. <1>$date"; - } elseif($term < 3) { - $log[count($log)] = "●{$admin[month]}월:천도중... ({$term}/3) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](으)로 천도했습니다. <1>$date"; - $exp = 15; - $ded = 15; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](으)로 천도를 명령하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【천도】$nation[name](이)가 $destcity[name](으)로 천도하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](으)로 천도 명령"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](으)로 천도 명령"); - - //수도 변경 - $query = "update nation set l{$general[level]}term='0',capital='$destcity[city]',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_67($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation,level from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $amount = $admin[develcost] * 500 + 60000; // 7만~13만 - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 67) { - $term = floor($code/100) + 1; - $code = $term * 100 + 67; - } else { - $term = 1; - $code = 100 + 67; - } - - if($nation[capital] != $general[city]) { - $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 증축 실패. <1>$date"; - } elseif($nation[capital] != $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 증축 실패. <1>$date"; - } elseif($destcity[level] <= 3) { - $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 증축 실패. <1>$date"; - } elseif($destcity[level] >= 8) { - $log[count($log)] = "●{$admin[month]}월:더이상 증축할 수 없습니다. 증축 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 증축 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 증축 실패. <1>$date"; - } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { - $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 증축 실패. <1>$date"; - } elseif($term < 6) { - $log[count($log)] = "●{$admin[month]}월:증축중... ({$term}/6) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 증축했습니다. <1>$date"; - $exp = 5 * 6; - $ded = 5 * 6; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 증축하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【증축】$nation[name](이)가 $destcity[name](을)를 증축하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 증축"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 증축"); - - //물자 감소 - $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold-'$amount',rice=rice-'$amount' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //수도 증축 - $query = "update city set upgrading=upgrading+1,level=level+1,pop2=pop2+100000,agri2=agri2+2000,comm2=comm2+2000,def2=def2+2000,wall2=wall2+2000,secu2=secu2+2000 where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_68($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,gold,rice,surlimit,history,l{$general[level]}term,l{$general[level]}turn0,capital,capset from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation,level,pop,agri,comm,def,wall,secu,upgrading from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $amount = $admin[develcost] * 500 + 30000; // 4만~10만 - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 68) { - $term = floor($code/100) + 1; - $code = $term * 100 + 68; - } else { - $term = 1; - $code = 100 + 68; - } - - if($nation[capital] != $general[city]) { - $log[count($log)] = "●{$admin[month]}월:수도에서 실행해야 합니다. 감축 실패. <1>$date"; - } elseif($nation[capital] != $destcity[city]) { - $log[count($log)] = "●{$admin[month]}월:수도만 가능합니다. 감축 실패. <1>$date"; - } elseif($destcity[level] <= 3) { - $log[count($log)] = "●{$admin[month]}월:수진, 진, 관문은 불가능합니다. 감축 실패. <1>$date"; - } elseif($destcity[level] <= 6) { - $log[count($log)] = "●{$admin[month]}월:더이상 감축할 수 없습니다. 감축 실패. <1>$date"; - } elseif($destcity[upgrading] <= 0) { - $log[count($log)] = "●{$admin[month]}월:증축된 도시가 아닙니다. 감축 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 감축 실패. <1>$date"; - } elseif($nation[capset] == 1) { - $log[count($log)] = "●{$admin[month]}월:다음 분기에 가능합니다. 감축 실패. <1>$date"; -// } elseif($nation[gold]-$_basegold < $amount || $nation[rice]-$_baserice < $amount) { -// $log[count($log)] = "●{$admin[month]}월:물자가 부족합니다. 감축 실패. <1>$date"; - } elseif($term < 6) { - $log[count($log)] = "●{$admin[month]}월:감축중... ({$term}/6) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:$destcity[name](을)를 감축했습니다. <1>$date"; - $exp = 5 * 6; - $ded = 5 * 6; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name](을)를 감축하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【감축】$nation[name](이)가 $destcity[name](을)를 감축하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name](을)를 감축"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name](을)를 감축"); - - //물자 증가 - $query = "update nation set l{$general[level]}term='0',capset='1',gold=gold+'$amount',rice=rice+'$amount' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $pop = $destcity[pop] - 100000; - $agri = $destcity[agri] - 2000; - $comm = $destcity[comm] - 2000; - $def = $destcity[def] - 2000; - $wall = $destcity[wall] - 2000; - $secu = $destcity[secu] - 2000; - if($pop < 30000) { $pop = 30000; } - if($agri < 0) { $agri = 0; } - if($comm < 0) { $comm = 0; } - if($def < 0) { $def = 0; } - if($wall < 0) { $wall = 0; } - if($secu < 0) { $secu = 0; } - //수도 감축 - $query = "update city set upgrading=upgrading-1,level=level-1,pop2=pop2-100000,agri2=agri2-2000,comm2=comm2-2000,def2=def2-2000,wall2=wall2-2000,secu2=secu2-2000,pop='$pop',agri='$agri',comm='$comm',def='$def',wall='$wall',secu='$secu' where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_71($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select no from diplomacy where me='$general[nation]' and state=0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 10); - //if($term2 == 0) { $term2 = 1; } - $term2 = 3; - $term3 = round(sqrt($genCount*8)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 71) { - $term = floor($code/100) + 1; - $code = $term * 100 + 71; - } else { - $term = 1; - $code = 100 + 71; - } - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 필사즉생 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 필사즉생 실패. <1>$date"; - } elseif($dipCount == 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 필사즉생 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 필사즉생 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:필사즉생 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:필사즉생 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 필사즉생(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 필사즉생(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 필사즉생(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:필사즉생(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 필사즉생(을)를 발동"); - - //전장수 훈사100 - $query = "update general set atmos=100,train=100 where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_72($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select no from diplomacy where me='$general[nation]' and state=0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 20); - //if($term2 == 0) { $term2 = 1; } - $term2 = 1; - $term3 = round(sqrt($genCount*4)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 72) { - $term = floor($code/100) + 1; - $code = $term * 100 + 72; - } else { - $term = 1; - $code = 100 + 72; - } - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 백성동원 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 백성동원 실패. <1>$date"; - } elseif($dipCount == 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중이 아닙니다. 백성동원 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 백성동원 실패. <1>$date"; - } elseif($destcity[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국 도시만 가능합니다. 백성동원 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:백성동원 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:백성동원 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]백성동원(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]백성동원(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destcity[name]백성동원(을)를 발동"); - - //도시 성수 80% - $query = "update city set def=def2*0.8,wall=wall2*0.8 where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_73($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where nation='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 20); - //if($term2 == 0) { $term2 = 1; } - $term2 = 3; - $term3 = round(sqrt($genCount*4)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 73) { - $term = floor($code/100) + 1; - $code = $term * 100 + 73; - } else { - $term = 1; - $code = 100 + 73; - } - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 수몰 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 수몰 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. 수몰 실패. <1>$date"; - } elseif($destcity[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 수몰 실패. <1>$date"; - } elseif($dip[state] > 0) { - $log[count($log)] = "●{$admin[month]}월:전쟁중인 상대국에만 가능합니다. 수몰 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 수몰 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:수몰 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:수몰 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - - $query = "select no,name from general where nation='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$destcity[name]수몰이 발동되었습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]수몰(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]수몰(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]수몰(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]수몰(을)를 발동"); - - //도시 성수 80% 감소 - $query = "update city set def=def*0.2,wall=wall*0.2 where city='$destcity[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_74($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select city,name,nation from city where city='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destcity = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where nation='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destcity[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 20); - //if($term2 == 0) { $term2 = 1; } - $term2 = 2; - $term3 = round(sqrt($genCount*4)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 74) { - $term = floor($code/100) + 1; - $code = $term * 100 + 74; - } else { - $term = 1; - $code = 100 + 74; - } - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 허보 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 허보 실패. <1>$date"; - } elseif($destcity[nation] == 0) { - $log[count($log)] = "●{$admin[month]}월:공백지입니다. 허보 실패. <1>$date"; - } elseif($destcity[nation] == $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:대상도시가 아국입니다. 허보 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 허보 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 허보 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:허보 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:허보 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destcity[name]허보(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destcity[name]허보(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]$destcity[name]허보(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국의 $destcity[name]허보(을)를 발동"); - - //상대국 도시 전부 검색 - $query = "select city from city where nation='$destcity[nation]' and supply=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - for($i=0; $i < $cityCount; $i++) { - $dCity = MYDB_fetch_array($result); - $citys[$i] = $dCity[city]; - } - //상대국 유저 랜덤 배치 - $query = "select no,name from general where nation='$destcity[nation]' and city='$destcity[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - $opplog[0] = "●상대국의 허보에 당했다! <1>$date"; - for($i=0; $i < $count; $i++) { - $gen = MYDB_fetch_array($result); - $selCity = $citys[rand() % $cityCount]; - //현재도시이면 한번 다시 랜덤추첨 - if($selCity == $destcity[city]) { $selCity = $citys[rand() % $cityCount]; } - - $query = "update general set city={$selCity} where no='$gen[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($gen, $opplog); - } - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_75($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,history from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - $query = "select state from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 40); - //if($term2 == 0) { $term2 = 1; } - $term2 = 3; - $term3 = round(sqrt($genCount*2)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 75) { - $term = floor($code/100) + 1; - $code = $term * 100 + 75; - } else { - $term = 1; - $code = 100 + 75; - } - - if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 피장파장 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 피장파장 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 피장파장 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 피장파장 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 피장파장 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:피장파장 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:피장파장 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - - $query = "select no,name from general where nation='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "●아국에 피장파장이 발동되었습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]피장파장(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]피장파장(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]피장파장(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 피장파장(을)를 발동"); - - //전략기한+60 - $query = "update nation set tricklimit=tricklimit+60 where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한, 최소72 - if($term3 < 72) { $term3 = 72; } - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_76($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select startyear,year,month,develcost,npccount,turnterm from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - //$term2 = round($genCount / 10); - //if($term2 == 0) { $term2 = 1; } - $term2 = 3; - $term3 = round(sqrt($genCount*10)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 76) { - $term = floor($code/100) + 1; - $code = $term * 100 + 76; - } else { - $term = 1; - $code = 100 + 76; - } - - if($admin[year] < $admin[startyear]+3) { - $log[count($log)] = "●{$admin[month]}월:현재 초반 제한중입니다. 의병모집 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 의병모집 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 의병모집 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 의병모집 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:의병모집 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:의병모집 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 의병모집(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 의병모집(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 의병모집(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:의병모집(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 의병모집(을)를 발동"); - - $query = "select avg(gennum) as gennum from nation"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $avgNation = MYDB_fetch_array($result); - $gencount = 5 + round($avgNation[gennum] / 10); - - $query = "select avg(age) as age, max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp, avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40 from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $avgGen = MYDB_fetch_array($result); - - //의병추가 - $npc = 4; - $npcid = $admin[npccount]; - for($i=0; $i < $gencount; $i++) { - // 무장 40%, 지장 40%, 무지장 20% - $type = rand() % 10; - switch($type) { - case 0: case 1: case 2: case 3: - $leader = 65 + rand()%11; - $intel = 10 + rand()%6; - $power = 150 - $leader - $intel; - break; - case 4: case 5: case 6: case 7: - $leader = 65 + rand()%11; - $power = 10 + rand()%6; - $intel = 150 - $leader - $power; - break; - case 8: case 9: - $leader = 10 + rand()%6; - $power = 65 + rand()%11; - $intel = 150 - $leader - $power; - break; - } - // 국내 최고능치 기준으로 랜덤성 스케일링 - if($avgGen[lpi] > 210) { - $leader = round($leader * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $power = round($power * $avgGen[lpi] / 150 * (60+rand()%31)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (60+rand()%31)/100); - } elseif($avgGen[lpi] > 180) { - $leader = round($leader * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $power = round($power * $avgGen[lpi] / 150 * (75+rand()%21)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (75+rand()%21)/100); - } else { - $leader = round($leader * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $power = round($power * $avgGen[lpi] / 150 * (90+rand()%11)/100); - $intel = round($intel * $avgGen[lpi] / 150 * (90+rand()%11)/100); - } - $over1 = 0; - $over2 = 0; - $over3 = 0; - // 너무 높은 능치는 다른 능치로 분산 - if($leader > 90) { - $over1 = rand() % ($leader - 90) + 5; - $leader -= $over1; - } - if($power > 90) { - $over2 = rand() % ($power - 90) + 5; - $power -= $over2; - } - if($intel > 90) { - $over3 = rand() % ($intel - 90) + 5; - $intel -= $over3; - } - // 낮은 능치쪽으로 합산 - if($type == 0) { - $intel = $intel + $over1 + $over2 + $over3; - } else { - $power = $power + $over1 + $over2 + $over3; - } - // 너무 높은 능치는 제한 - if($leader > 95) { - $leader = 95; - } - if($power > 95) { - $power = 95; - } - if($intel > 95) { - $intel = 95; - } - - $npccount = 10000 + $npcid; - $npcmatch = rand() % 150 + 1; - $genid = "gen{$npccount}"; - $pw = md5("18071807"); - $name = "ⓖ의병장{$npcid}"; - $picture = 'default.jpg'; - $turntime = getRandTurn($admin[turnterm]); - $personal = rand() % 10; - $bornyear = $admin[year]; - $deadyear = $admin[year] + 3; - $killturn = 64 + rand()%7; - - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, - city,leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos,tnmt, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit,bornyear,deadyear, - dex0, dex10, dex20, dex30, dex40 - ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation[nation]', - '$general[city]','$leader','$power','$intel','$avgGen[exp]','$avgGen[ded]', - '1','100','100','0','0','0','0','0', - '0','0','0','$turntime','$killturn','$avgGen[age]','1','$personal','0','0','0','0','', - '0','$bornyear','$deadyear', - '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); - - $npcid++; - } - //npccount - $query = "update game set npccount={$npcid} where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //국가 기술력 그대로 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한, 국가 기술력 그대로 - $query = "update nation set tricklimit={$term3},totaltech=tech*'$gencount',gennum='$gennum' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_77($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,history from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - $term2 = 1; - $term3 = round(sqrt($genCount*16)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 77) { - $term = floor($code/100) + 1; - $code = $term * 100 + 77; - } else { - $term = 1; - $code = 100 + 77; - } - - if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 이호경식 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 이호경식 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 이호경식 실패. <1>$date"; - } elseif($dip[state] > 1) { - $log[count($log)] = "●{$admin[month]}월:선포,전쟁중인 상대국에만 가능합니다. 이호경식 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 이호경식 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:이호경식 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:이호경식 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - - $query = "select no,name from general where nation='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "●아국에 이호경식이 발동되었습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]이호경식(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]이호경식(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]이호경식(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 이호경식(을)를 발동"); - - //선포+3개월 - if($dip[state] == 0) { - $query = "update diplomacy set state=1,term=3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update diplomacy set term=term+3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_78($connect, &$general) { - global $_basegold, $_baserice; - - $date = substr($general[turntime],11,5); - - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,supply from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - - $query = "select nation,name,history from nation where nation='$which'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - $query = "select state,term from diplomacy where me='$general[nation]' and you='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - if($genCount < 10) { $genCount = 10; } - - $term2 = 1; - $term3 = round(sqrt($genCount*16)*10); - - $code = $nation["l{$general[level]}term"]; - if($code%100 == 78) { - $term = floor($code/100) + 1; - $code = $term * 100 + 78; - } else { - $term = 1; - $code = 100 + 78; - } - - if(!$destnation) { - $log[count($log)] = "●{$admin[month]}월:없는 국가입니다. 급습 실패. <1>$date"; - } elseif($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 급습 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 급습 실패. <1>$date"; - } elseif($dip[state] != 1) { - $log[count($log)] = "●{$admin[month]}월:선포중인 상대국에만 가능합니다. 급습 실패. <1>$date"; - } elseif($dip[term] < 12) { - $log[count($log)] = "●{$admin[month]}월:선포 12개월 이상인 상대국에만 가능합니다. 급습 실패. <1>$date"; - } elseif($nation[tricklimit] > 0) { - $log[count($log)] = "●{$admin[month]}월:전략기한이 남았습니다. 급습 실패. <1>$date"; - } elseif($term < $term2) { - $log[count($log)] = "●{$admin[month]}월:급습 수행중... ({$term}/{$term2}) <1>$date"; - - $query = "update nation set l{$general[level]}term={$code} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $log[count($log)] = "●{$admin[month]}월:급습 발동! <1>$date"; - $exp = 5 * $term2; - $ded = 5 * $term2; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - - $query = "select no,name from general where nation='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $alllog[0] = "●아국에 급습이 발동되었습니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $alllog); - } - -// $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; -// $history[count($history)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; - $tricklog[count($tricklog)] = "●$admin[year]년 $admin[month]월:【전략】$nation[name](이)가 $destnation[name]급습(을)를 발동하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:$destnation[name]급습(을)를 발동"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 $destnation[name]급습(을)를 발동"); - $destnation = addNationHistory($connect, $destnation, "●$admin[year]년 $admin[month]월:$nation[name]$general[name](이)가 아국에 급습(을)를 발동"); - - //선포-3개월 - $query = "update diplomacy set term=term-3 where (me='$general[nation]' and you='$destnation[nation]') or (you='$general[nation]' and me='$destnation[nation]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 국가보정 - if($nation[type] == 11) { $term3 = round($term3 / 2); } - if($nation[type] == 12) { $term3 = $term3 * 2; } - - //전략기한 - $query = "update nation set tricklimit={$term3} where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - -// pushHistory($connect, $history); -// pushAllLog($alllog); - pushTrickLog($connect, $tricklog); - pushGenLog($general, $log); -} - -function process_81($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - - $query = "select nation,colset,name,type,tricklimit,history,l{$general[level]}term,l{$general[level]}turn0 from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $command = DecodeCommand($nation["l{$general[level]}turn0"]); - $which = $command[1]; - $colors = GetNationColors(); - if($which >= count($colors)) { $which = 0; } - $color = $colors[$which]; - - if($city[nation] != $general[nation]) { - $log[count($log)] = "●{$admin[month]}월:아국이 아닙니다. 국기변경 실패. <1>$date"; - } elseif($general[level] < 5) { - $log[count($log)] = "●{$admin[month]}월:수뇌부가 아닙니다. 국기변경 실패. <1>$date"; - } elseif($nation[colset] <= 0) { - $log[count($log)] = "●{$admin[month]}월:더이상 변경이 불가능합니다. 국기변경 실패. <1>$date"; - } else { - $log[count($log)] = "●{$admin[month]}월:국기를 변경합니다. <1>$date"; - $exp = 10; - $ded = 10; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - $query = "select no,name from general where nation='$general[nation]' and no!='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cnt = MYDB_num_rows($result); - $genlog[0] = "$general[name](이)가 국기를 변경합니다."; - for($i=0; $i < $cnt; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - } - - $alllog[count($alllog)] = "●{$admin[month]}월:$general[name](이)가 국기를 변경하였습니다."; - $history[count($history)] = "●$admin[year]년 $admin[month]월:【국기변경】$nation[name](이)가 국기를 변경하였습니다."; - $general = addHistory($connect, $general, "●$admin[year]년 $admin[month]월:국기를 변경"); - $nation = addNationHistory($connect, $nation, "●$admin[year]년 $admin[month]월:$general[name](이)가 국기를 변경"); - - //국기변경 - $query = "update nation set color='$color',colset=colset-1 where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //경험치, 공헌치 - $query = "update general set dedication=dedication+'$ded',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - pushHistory($connect, $history); - pushAllLog($alllog); - pushGenLog($general, $log); -} - -function process_99($connect, &$general) { - $date = substr($general[turntime],11,5); - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $log[count($log)] = "●{$admin[month]}월:아직 구현되지 않았습니다. <1>$date"; - - $exp = 100; - - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - $ded = CharDedication($ded, $general[personal]); - - // 명성 상승 - $query = "update general set experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($general, $log); -} - diff --git a/che/func_string.php b/che/func_string.php deleted file mode 100644 index 4bc7aa2a..00000000 --- a/che/func_string.php +++ /dev/null @@ -1,303 +0,0 @@ -= 22) { $str = "{$str}"; } - - return $str; -} - -function unfont($str) { - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - return $str; -} - -function SQ2DQ($str) { - return str_replace("'", "'", $str); -} - -function Tag2Code($str) { -// return htmlspecialchars(nl2br(str_replace(" ", " ", $str))); -// $str = str_replace("&", "&", $str); - $str = str_replace("'", "'", $str); - $str = str_replace("\"", """, $str); - $str = str_replace("<", "<", $str); - $str = str_replace(">", ">", $str); -// $str = str_replace(" ", " ", $str); -// return htmlspecialchars(nl2br($str)); - return nl2br($str); -} - -function BadTag2Code($str) { - $str = str_replace("= 0xf0) { - $len++; - $i += 4; - } elseif($code >= 0xe0) { - $len++; - $i += 3; - } elseif($code >= 0xc2) { - $len++; - $i += 2; - } else { - $len++; - $i += 1; - } - } - return $len; - } - - public static function SubStr($str, $s, $l=1000) { - $count = strlen($str); - $startByte = 0; $isSet = 0; - $endByte = $count; - $len = 0; - for($i=0; $i < $count; ) { - $code = ord($str[$i]); - - if($isSet == 0 && $len >= $s) { - $startByte = $i; $isSet = 1; - } - if($isSet == 1 && $len-$s >= $l) { - $endByte = $i; - break; - } - - if($code >= 0xf0) { - $len++; - $i += 4; - } elseif($code >= 0xe0) { - $len++; - $i += 3; - } elseif($code >= 0xc2) { - $len++; - $i += 2; - } else { - $len++; - $i += 1; - } - } - $str = substr($str, $startByte, $endByte-$startByte); - return $str; - } - - public static function SubStrForWidth($str, $s, $w) { - $count = strlen($str); - $startByte = 0; $isSet = 0; - $endByte = $count; $last = 0; - $len = 0; - $width = 0; - for($i=0; $i < $count; ) { - $code = ord($str[$i]); - - if($isSet == 0 && $len >= $s) { - $startByte = $i; $isSet = 1; - $width = 0; - } - if($isSet == 1 && $width == $w) { - $endByte = $i; - break; - } - if($isSet == 1 && $width > $w) { - $endByte = $i - $last; - break; - } - - if($code >= 0xf0) { - $len++; - $width += 2; - $last = 4; - $i += 4; - } elseif($code >= 0xe0) { - $len++; - $width += 2; - $last = 3; - $i += 3; - } elseif($code >= 0xc2) { - $len++; - $width += 2; - $last = 2; - $i += 2; - } else { - $len++; - $width += 1; - $last = 1; - $i += 1; - } - } - $str = substr($str, $startByte, $endByte-$startByte); - return $str; - } - - public static function CutStrForWidth($str, $s, $w, $ch='..') { - $isCut = 0; - $count = strlen($str); - $startByte = 0; $isSet = 0; - $endByte = $count; $last = 0; - $len = 0; - $width = 0; - for($i=0; $i < $count; ) { - $code = ord($str[$i]); - - if($isSet == 0 && $len >= $s) { - $startByte = $i; $isSet = 1; - $width = 0; - } - if($isSet == 1 && $width >= $w) { - $endByte = $i - $last; - $isCut = 1; - break; - } - - if($code >= 0xf0) { - $len++; - $width += 2; - $last = 4; - $i += 4; - } elseif($code >= 0xe0) { - $len++; - $width += 2; - $last = 3; - $i += 3; - } elseif($code >= 0xc2) { - $len++; - $width += 2; - $last = 2; - $i += 2; - } else { - $len++; - $width += 1; - $last = 1; - $i += 1; - } - } - if($isCut != 0) { - $str = substr($str, $startByte, $endByte-$startByte) . $ch; - } - return $str; - } - - //중간정렬 - public static function staticFill($str, $maxsize, $ch) { - $size = strlen($str); - - $count = ($maxsize - $size) / 2; - - for($i=0; $i < $count; $i++) { - $string = $string.$ch; - } - $string = $string.$str; - for($i=0; $i < $count; $i++) { - $string = $string.$ch; - } - return $string; - } - - //우측정렬 - public static function Fill2($str, $maxsize, $ch='0') { - $size = strlen($str); - - $count = ($maxsize - $size); - $string = ''; - for($i=0; $i < $count; $i++) { - $string = $string.$ch; - } - $string = $string.$str; - - return $string; - } - - public static function EscapeTag($str) { - $str = htmlspecialchars($str); - $str = str_replace("\r\n", "
", $str); - $str = str_replace("\n", "
", $str); -// return nl2br(htmlspecialchars($str)); -// return htmlspecialchars($str); - return $str; - } - - public static function NoSpecialCharacter($str) { - $str = str_replace(" ", "", $str); - $str = str_replace("\"", "", $str); - $str = str_replace("'", "", $str); - $str = str_replace("ⓝ", "", $str); - $str = str_replace("ⓜ", "", $str); - $str = str_replace("ⓖ", "", $str); - $str = str_replace("\\", "", $str); - $str = str_replace("/", "", $str); - $str = str_replace("`", "", $str); - $str = str_replace("-", "", $str); - $str = str_replace("=", "", $str); - $str = str_replace("[", "", $str); - $str = str_replace("]", "", $str); - $str = str_replace(";", "", $str); - $str = str_replace(",", "", $str); - $str = str_replace(".", "", $str); - $str = str_replace("~", "", $str); - $str = str_replace("!", "", $str); - $str = str_replace("@", "", $str); - $str = str_replace("#", "", $str); - $str = str_replace("$", "", $str); - $str = str_replace("%", "", $str); - $str = str_replace("^", "", $str); - $str = str_replace("&", "", $str); - $str = str_replace("*", "", $str); - $str = str_replace("(", "", $str); - $str = str_replace(")", "", $str); - $str = str_replace("_", "", $str); - $str = str_replace("+", "", $str); - $str = str_replace("|", "", $str); - $str = str_replace("{", "", $str); - $str = str_replace("}", "", $str); - $str = str_replace(":", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("<", "", $str); - $str = str_replace(">", "", $str); - $str = str_replace("?", "", $str); - $str = str_replace(" ", "", $str); - return $str; - } -} - diff --git a/che/func_tournament.php b/che/func_tournament.php deleted file mode 100644 index 569fc988..00000000 --- a/che/func_tournament.php +++ /dev/null @@ -1,991 +0,0 @@ -= 0) { - switch($admin[tnmt_auto]) { - case 1: $unit = 720; break; - case 2: $unit = 420; break; - case 3: $unit = 180; break; - case 4: $unit = 60; break; - case 5: $unit = 30; break; - case 6: $unit = 15; break; - case 7: $unit = 5; break; - } - - //업데이트 횟수 - $iter = floor($admin[offset] / $unit) + 1; - - for($i=0; $i < $iter; $i++) { - switch($tnmt) { - case 1: //신청 마감 - fillLowGenAll($connect); - $tnmt = 2; $phase = 0; - break; - case 2: //예선중 - qualify($connect, $type, $tnmt, $phase); $phase++; - if($phase >= 56) { $tnmt = 3; $phase = 0; } - break; - case 3: //추첨중 - selectionAll($connect, $type, $tnmt, $phase); $phase+=8; - if($phase >= 32) { $tnmt = 4; $phase = 0; } - break; - case 4: //본선중 - finallySingle($connect, $type, $tnmt, $phase); $phase++; - if($phase >= 6) { $tnmt = 5; $phase = 0; } - break; - case 5: //배정중 - final16set($connect); - $tnmt = 6; $phase = 0; - break; - case 6: //베팅중 - $tnmt = 7; $phase = 0; - break; - case 7: //16강중 - finalFight($connect, $type, $tnmt, $phase, 16); $phase++; - if($phase >= 8) { $tnmt = 8; $phase = 0; } - break; - case 8: //8강중 - finalFight($connect, $type, $tnmt, $phase, 8); $phase++; - if($phase >= 4) { $tnmt = 9; $phase = 0; } - break; - case 9: //4강중 - finalFight($connect, $type, $tnmt, $phase, 4); $phase++; - if($phase >= 2) { $tnmt = 10; $phase = 0; } - break; - case 10: //결승중 - finalFight($connect, $type, $tnmt, $phase, 2); - $tnmt = 0; $phase = 0; - setGift($connect, $type, $tnmt, $phase); - $i = $iter; - break; - } - - //베팅은 무조건 60페이즈후 진행(최대 1시간) - if($tnmt == 6) { - $betTerm = $unit * 60; - if($betTerm > 3600) { $betTerm = 3600; } - //처리 초 더한 날짜 - $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i + $betTerm); - $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time='$dt' where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; - } - - if($admin[tnmt_auto] == 1) { - //처리 초 더한 날짜 - $dt = date("Y-m-d H:i:s", strtotime($admin[tnmt_time]) + $unit * $i); - $hr = substr($dt, 11, 2); - //지정시간대 넘어가면 중단 20~24시 - if($hr < 20) { - $dt = substr($dt, 0, 11)."20:00:00"; - $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time='$dt' where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - return; - } - } - } - - $second = $unit * $iter; - $query = "update game set tournament='$tnmt',phase='$phase',tnmt_time=DATE_ADD(tnmt_time, INTERVAL {$second} SECOND) where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function getTournamentTerm($connect) { - $query = "select tnmt_auto from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($admin[tnmt_auto]) { - case 1: $str = "경기당 12분"; break; - case 2: $str = "경기당 7분"; break; - case 3: $str = "경기당 3분"; break; - case 4: $str = "경기당 1분"; break; - case 5: $str = "경기당 30초"; break; - case 6: $str = "경기당 15초"; break; - case 7: $str = "경기당 5초"; break; - } - return $str; -} - -function getTournamentTime($connect) { - $query = "select tournament,tnmt_time from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $tnmt = $admin[tournament]; - $dt = substr($admin[tnmt_time], 11, 5); - switch($tnmt) { - case 1: $tnmt = "개막시간 {$dt}"; break; - case 2: $tnmt = "다음경기 {$dt}"; break; - case 3: $tnmt = "다음추첨 {$dt}"; break; - case 4: $tnmt = "다음경기 {$dt}"; break; - case 5: $tnmt = "16강배정 {$dt}"; break; - case 6: $tnmt = "베팅마감 {$dt}"; break; - case 7: case 8: case 9: case 10: - $tnmt = "다음경기 {$dt}"; break; - default: $tnmt = ""; break; - } - return $tnmt; -} - -function getTournament($tnmt) { - switch($tnmt) { - case 0: $tnmt = "경기 없음"; break; - case 1: $tnmt = "참가 모집중"; break; - case 2: $tnmt = "예선 진행중"; break; - case 3: $tnmt = "본선 추첨중"; break; - case 4: $tnmt = "본선 진행중"; break; - case 5: $tnmt = "16강 배정중"; break; - case 6: $tnmt = "베팅 진행중"; break; - case 7: $tnmt = "16강 진행중"; break; - case 8: $tnmt = "8강 진행중"; break; - case 9: $tnmt = "4강 진행중"; break; - case 10: $tnmt = "결승 진행중"; break; - } - return $tnmt; -} - -function printRow($k, $npc, $name, $abil, $game, $win, $draw, $lose, $gd, $gl, $prmt) { - if($prmt > 0) { $name = "".$name.""; } - elseif($npc >= 2) { $name = "".$name.""; } - elseif($npc == 1) { $name = "".$name.""; } - echo "$k$name$abil$game$win$draw$lose$gd$gl"; -} - -function printFightLog($group) { - $fp = @fopen("logs/fight{$group}.txt", "r"); - $file = @fread($fp, 3000); - @fclose($fp); - $log = explode("\r\n", $file); - $str = ""; - for($i=0; $i < count($log); $i++) { $str .= ConvertLog($log[$i], 1)."
"; } - return substr($str, 0, -4); -} - -function pushFightLog($group, $log) { - $fp = fopen("logs/fight{$group}.txt", "w"); - $size = count($log); - for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); - } - fclose($fp); -} - -function printFighting($tournament, $phase) { - $code = $tournament * 100 + $phase; - if($code == 0) { - echo ""; - echo " "; - echo " "; - echo " "; - echo "".printFightLog(50).""; - echo " "; - echo " "; - echo " "; - echo " "; - echo ""; - } elseif($code <= 300) { - echo ""; - for($i=0; $i < 8; $i++) { - echo "".printFightLog($i).""; - } - echo ""; - } elseif($code < 400) { - } elseif($code <= 500) { - echo ""; - for($i=10; $i < 18; $i++) { - echo "".printFightLog($i).""; - } - echo ""; - } elseif($code < 700) { - } elseif($code <= 800) { - echo ""; - for($i=20; $i < 28; $i++) { - echo "".printFightLog($i).""; - } - echo ""; - } elseif($code <= 900) { - echo ""; - for($i=30; $i < 34; $i++) { - echo " "; - echo "".printFightLog($i).""; - } - echo ""; - } elseif($code <= 1000) { - echo ""; - for($i=40; $i < 42; $i++) { - echo " "; - echo " "; - echo "".printFightLog($i).""; - echo " "; - } - echo ""; - } -} - -function startTournament($connect, $auto, $type) { - for($i=0; $i < 8; $i++) { - @unlink("logs/fight{$i}.txt"); - @unlink("logs/fight1{$i}.txt"); - @unlink("logs/fight2{$i}.txt"); - @unlink("logs/fight3{$i}.txt"); - @unlink("logs/fight4{$i}.txt"); - @unlink("logs/fight5{$i}.txt"); - } - - switch($auto) { - case 1: $unit = 60; break; - case 2: $unit = 60; break; - case 3: $unit = 60; break; - case 4: $unit = 60; break; - case 5: $unit = 30; break; - case 6: $unit = 15; break; - case 7: $unit = 5; break; - default:$unit = 60; break; - } - - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "update game set tnmt_auto='$auto',tnmt_time=DATE_ADD(now(), INTERVAL {$unit} MINUTE),tournament=1,tnmt_type='$type',phase=0,bet0=0,bet1=0,bet2=0,bet3=0,bet4=0,bet5=0,bet6=0,bet7=0,bet8=0,bet9=0,bet10=0,bet11=0,bet12=0,bet13=0,bet14=0,bet15=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set tournament=0,bet0=0,bet1=0,bet2=0,bet3=0,bet4=0,bet5=0,bet6=0,bet7=0,bet8=0,bet9=0,bet10=0,bet11=0,bet12=0,bet13=0,bet14=0,bet15=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "truncate tournament"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - switch($type) { - case 0: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 전력전 대회가 개최됩니다! 천하의 영웅들을 모집하고 있습니다!"; break; - case 1: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 통솔전 대회가 개최됩니다! 천하의 명사들을 모집하고 있습니다!"; break; - case 2: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 일기토 대회가 개최됩니다! 천하의 용사들을 모집하고 있습니다!"; break; - case 3: $history[0] = "◆{$admin['year']}년 {$admin['month']}월: 설전 대회가 개최됩니다! 천하의 책사들을 모집하고 있습니다!"; break; - } - pushHistory($connect, $history); -} - -function fillLowGenAll($connect) { - $query = "select develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $general[no] = 0; - $general[name] = "무명장수"; - $general[npc] = 2; - $general[leader] = 10; - $general[power] = 10; - $general[intel] = 10; - $general[explevel] = 10; - - for($i=0; $i < 8; $i++) { - $query = "select grp from tournament where grp='$i'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $grpCount[$i] = MYDB_num_rows($result); - } - - //자동신청하고, 돈 있고, 아직 참가 안한 장수 - $query = "select no,npc,name,leader,power,intel,explevel from general where tnmt='1' and tournament='0' and gold>='$admin[develcost]' order by rand() limit 0,64"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $valid = 1; - while($valid == 1) { - $valid = 0; - //조마다 돌아가며 - for($i=0; $i < 8; $i++) { - //비었으면 채우기 - if($grpCount[$i] < 8) { - //자동신청 장수 있으면 채우기 - if($genCount > 0) { - $genCount--; - $gen = MYDB_fetch_array($result); - $query = "update general set gold=gold-'$admin[develcost]',tournament='1' where no='$gen[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$gen[no]', '$gen[npc]', '$gen[name]', '$gen[leader]', '$gen[power]', '$gen[intel]', '$gen[explevel]', '$i', '$grpCount[$i]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //자동신청 장수 없으면 무명장수 - } else { - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no) values ('$general[no]', '$general[npc]', '$general[name]', '$general[leader]', '$general[power]', '$general[intel]', '$general[explevel]', '$i', '$grpCount[$i]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $grpCount[$i]++; - } - //덜 찼으면 루프 다시 - if($grpCount[$i] < 8) { - $valid = 1; - } - } - } - - $query = "update game set tournament=2, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -//0 경기없음 -//1 모집중 -//2 예선중 28페이즈 -//3 본선추첨중 -//4 본선중 6페이즈 -//5 16강 배정중 -//6 베팅 -//6 16강 -//7 8강 -//8 4강 -//9 결승 -function getTwo($tournament, $phase) { - switch($tournament) { - case 2: - //예선 - switch($phase%28) { - case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; case 2: $cand[0] = 4; $cand[1] = 5; break; case 3: $cand[0] = 6; $cand[1] = 7; break; - case 4: $cand[0] = 0; $cand[1] = 2; break; case 5: $cand[0] = 1; $cand[1] = 3; break; case 6: $cand[0] = 4; $cand[1] = 6; break; case 7: $cand[0] = 5; $cand[1] = 7; break; - case 8: $cand[0] = 0; $cand[1] = 3; break; case 9: $cand[0] = 1; $cand[1] = 6; break; case 10: $cand[0] = 2; $cand[1] = 5; break; case 11: $cand[0] = 4; $cand[1] = 7; break; - case 12: $cand[0] = 0; $cand[1] = 4; break; case 13: $cand[0] = 1; $cand[1] = 5; break; case 14: $cand[0] = 2; $cand[1] = 6; break; case 15: $cand[0] = 3; $cand[1] = 7; break; - case 16: $cand[0] = 0; $cand[1] = 5; break; case 17: $cand[0] = 1; $cand[1] = 4; break; case 18: $cand[0] = 2; $cand[1] = 7; break; case 19: $cand[0] = 3; $cand[1] = 6; break; - case 20: $cand[0] = 0; $cand[1] = 6; break; case 21: $cand[0] = 1; $cand[1] = 7; break; case 22: $cand[0] = 2; $cand[1] = 4; break; case 23: $cand[0] = 3; $cand[1] = 5; break; - case 24: $cand[0] = 0; $cand[1] = 7; break; case 25: $cand[0] = 1; $cand[1] = 2; break; case 26: $cand[0] = 3; $cand[1] = 4; break; case 27: $cand[0] = 5; $cand[1] = 6; break; - } - if($phase >= 28) { - $temp = $cand[0]; - $cand[0] = $cand[1]; - $cand[1] = $temp; - } - break; - case 4: - //본선 - switch($phase%6) { - case 0: $cand[0] = 0; $cand[1] = 1; break; case 1: $cand[0] = 2; $cand[1] = 3; break; - case 2: $cand[0] = 0; $cand[1] = 2; break; case 3: $cand[0] = 1; $cand[1] = 3; break; - case 4: $cand[0] = 0; $cand[1] = 3; break; case 5: $cand[0] = 1; $cand[1] = 2; break; - } - break; - } - return $cand; -} - -function qualify($connect, $tnmt_type, $tnmt, $phase) { - $cand = getTwo($tnmt, $phase); - - //각 그룹 페이즈 실행 - for($i=0; $i < 8; $i++) { - fight($connect, $tnmt_type, $tnmt, $phase, $i, $cand[0], $cand[1], 0); - } - if($phase < 55) { - $query = "update game set phase=phase+1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update game set tournament=3, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - for($i=0; $i < 8; $i++) { - $query = "select grp,grp_no,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$i' order by gd desc, gl desc, seq limit 0,4"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($k=1; $k <= 4; $k++) { - $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } -} - -function qualifyAll($connect, $tnmt_type, $tnmt, $phase) { - $start = $phase; - $end = $phase - ($phase % 4) + 4; - for($i=$start; $i < $end; $i++) { - qualify($connect, $tnmt_type, $tnmt, $i); - } -} - -function selection($connect, $tnmt_type, $tnmt, $phase) { - //시드1 배정 - if($phase < 8) { - $grp = $phase + 10; $grp_no = 0; - $query = "select * from tournament where prmt=1 order by rand() limit 0,1"; - //시드2 배정 - } elseif($phase < 16) { - $grp = $phase - 8 + 10; $grp_no = 1; - $query = "select * from tournament where prmt=2 order by rand() limit 0,1"; - } elseif($phase < 24) { - $grp = $phase - 16 + 10; $grp_no = 2; - $query = "select * from tournament where prmt>2 order by rand() limit 0,1"; - } else { - $grp = $phase - 24 + 10; $grp_no = 3; - $query = "select * from tournament where prmt>2 order by rand() limit 0,1"; - } - //해당 시드에서 랜덤 선택 - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - //본선에 추가 - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //시드 삭제 - $query = "update tournament set prmt=0 where grp='$general[grp]' and grp_no='$general[grp_no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($phase < 31) { - $query = "update game set phase=phase+1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update game set tournament=4, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function selectionAll($connect, $tnmt_type, $tnmt, $phase) { - $start = $phase; - $end = $phase - ($phase % 8) + 8; - for($i=$start; $i < $end; $i++) { - selection($connect, $tnmt_type, $tnmt, $i); - } -} - -function finallySingle($connect, $tnmt_type, $tnmt, $phase) { - $cand = getTwo($tnmt, $phase); - - //각 그룹 페이즈 실행 - for($i=10; $i < 18; $i++) { - fight($connect, $tnmt_type, $tnmt, $phase, $i, $cand[0], $cand[1], 0); - } - if($phase < 5) { - $query = "update game set phase=phase+1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - $query = "update game set tournament=5, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - for($i=10; $i < 18; $i++) { - $query = "select grp,grp_no,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$i' order by gd desc, gl desc, seq limit 0,2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($k=1; $k <= 2; $k++) { - $gen = MYDB_fetch_array($result); - $query = "update tournament set prmt='$k' where grp='$gen[grp]' and grp_no='$gen[grp_no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - } -} - -function finallyAll($connect, $tnmt_type, $tnmt, $phase) { - $start = $phase; - $end = $phase - ($phase % 2) + 2; - for($i=$start; $i < $end; $i++) { - finallySingle($connect, $tnmt_type, $tnmt, $i); - } -} - -function final16set($connect) { - //1조1-5조2, 2조1-6조2, 3조1-7조2, 4조1-8조2, 5조1-1조2, 6조1-2조2, 7조1-3조2, 8조1-4조2 - $grp = Array(10, 14, 11, 15, 12, 16, 13, 17, 14, 10, 15, 11, 16, 12, 17, 13); - $prmt = Array( 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2); - for($i=0; $i < 16; $i++) { - $query = "select * from tournament where grp='$grp[$i]' and prmt='$prmt[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - //16강에 추가 - $newGrp = 20 + floor($i / 2); - $newGrp_no = $i % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $query = "update tournament set prmt=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update game set tournament=6, phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function finalFight($connect, $tnmt_type, $tnmt, $phase, $type) { - switch($type) { - case 16: $offset = 20; $turn = 7; $next = 7; break; - case 8: $offset = 30; $turn = 3; $next = 8; break; - case 4: $offset = 40; $turn = 1; $next = 9; break; - case 2: $offset = 50; $turn = 0; $next = 0; break; - } - - $grp = $phase + $offset; - fight($connect, $tnmt_type, $tnmt, $phase, $grp, 0, 1, 1); - - $query = "update game set phase=phase+1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select * from tournament where grp='$grp' and win>0 and (grp_no=0 or grp_no=1)"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - //x강에 추가 - $newGrp = floor($phase / 2) + $offset + 10; - $newGrp_no = $phase % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('$general[no]', '$general[npc]', '$general[name]', '$general[ldr]', '$general[pwr]', '$general[itl]', '$general[lvl]', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($phase >= $turn) { - $query = "update game set tournament='$next', phase=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function setGift($connect, $tnmt_type, $tnmt, $phase) { - $query = "select year,month,develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($tnmt_type) { - case 0: $tp = "전력전"; $tp2 = "tt"; break; - case 1: $tp = "통솔전"; $tp2 = "tl"; break; - case 2: $tp = "일기토"; $tp2 = "tp"; break; - case 3: $tp = "설전"; $tp2 = "ti"; break; - } - - //16강자 명성 돈 - $cost = $admin[develcost]; - $query = "select no,name from tournament where grp>=20 and grp<30"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+25,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //포상 장수 이름, 금액 - $genNo[$i] = $general[no]; - $genName[$i] = $general[name]; - $genGold[$general[no]] = $cost; - $genCall[$general[no]] = "16강 진출"; - } - //8강자 명성 돈 - $cost = $admin[develcost] * 2; - $query = "select no from tournament where grp>=30 and grp<40"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+50,gold=gold+'$cost',{$tp2}g={$tp2}g+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "8강 진출"; - } - //4강자 명성 돈 - $cost = $admin[develcost] * 3; - $query = "select no from tournament where grp>=40 and grp<50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+75,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "4강 진출"; - } - //결승자 명성 돈 - $cost = $admin[develcost] * 6; - $query = "select no from tournament where grp>=50 and grp<60"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+150,gold=gold+'$cost',{$tp2}g={$tp2}g+2 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "준우승으"; - } - //우승자 명성 돈 - $cost = $admin[develcost] * 8; - $query = "select no from tournament where grp>=60"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set experience=experience+200,gold=gold+'$cost',{$tp2}g={$tp2}g+3,{$tp2}p={$tp2}p+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //포상 장수 이름, 금액 - $genGold[$general[no]] += $cost; - $genCall[$general[no]] = "우승으"; - } - //우승자 이름 - $query = "select no,name from tournament where grp=60"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - //준우승자 이름 - $query = "select no,name from tournament where grp=50 and lose=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general2 = MYDB_fetch_array($result); - - //자동진행 끝 - $query = "update game set tnmt_auto=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //장수열전 기록 - $query = "select no,history from general where no={$general[no]}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($result); - $query = "select no,history from general where no={$general2[no]}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($result); - $gen1 = addHistory($connect, $gen1, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 우승"); - $gen2 = addHistory($connect, $gen2, "●{$admin[year]}년 {$admin[month]}월:{$tp} 대회에서 준우승"); - - $cost = $admin[develcost] * 20; - $cost2 = $admin[develcost] * 12; - $history[0] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회에서 {$general[name]}(이)가 우승, {$general2[name]}(이)가 준우승을 차지하여 천하에 이름을 떨칩니다!"; - $history[1] = "◆{$admin['year']}년 {$admin['month']}월: {$tp} 대회의 우승자에게는 {$cost}, 준우승자에겐 {$cost2}의 상금과 약간의 명성이 주어집니다!"; - pushHistory($connect, $history); - - for($i=0; $i < count($genNo); $i++) { - $general[no] = $genNo[$i]; - $general[name] = $genName[$i]; - $log[0] = "{$tp} 대회의 {$genCall[$genNo[$i]]}로 {$genGold[$genNo[$i]]}의 상금, 약간의 명성 획득!"; - pushGenLog($general, $log); - } - - //우승자 번호 - $query = "select no from tournament where grp=60"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - //16강 목록에서 검색 - $query = "select grp,grp_no from tournament where grp>=20 and grp<30 and no='$general[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $no = ($general[grp] - 20) * 2 + $general[grp_no]; - - $query = "select bet{$no},bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - $bet = @round($admin[bet] / $admin["bet{$no}"], 2); - - //당첨칸에 베팅한 사람들만 - $query = "select no,name,gold,bet{$no} as bet from general where bet{$no}>0"; - $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); - $gold = round($gen[bet] * $bet); - //금 지급 - $query = "update general set gold=gold+'$gold',betwingold=betwingold+'$gold',betwin=betwin+1 where no='$gen[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //로그 - $log[0] = "{$tp} 대회의 베팅 당첨으로 {$gold}의 금 획득!"; - pushGenLog($gen, $log); - } -} - -function setRefund($connect) { - $query = "select develcost from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //16강자 명성 돈 - $cost = $admin[develcost]; - $query = "select no from tournament where grp<10"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - $query = "update general set gold=gold+'$cost' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //자동진행 끝 - $query = "update game set tnmt_auto=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //베팅금 환수 - $query = "update general set gold=gold+bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -//10차이 1.1, 50 차이 1.17, 100차이 1.2 -function getLog($lvl1, $lvl2) { - if($lvl1 >= $lvl2) { - $ratio = 1 + log(1+$lvl1-$lvl2, 10) / 10; - } else { - $ratio = 1 - log(1+$lvl2-$lvl1, 10) / 10; - } - return $ratio; -} - -//0 : 승무패, 1 : 승패 -function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { - $query = "select *,(ldr+pwr+itl)*7/15 as tot,h,w,b from tournament where grp='$group' and grp_no='$g1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($result); - - $query = "select *,(ldr+pwr+itl)*7/15 as tot,h,w,b from tournament where grp='$group' and grp_no='$g2'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($result); - - if($type == 0) { $turn = 10; } - else { $turn = 100; } - - if($tnmt_type == 0) { $tp = "tot"; $tp2 = "tt"; } - elseif($tnmt_type == 1) { $tp = "ldr"; $tp2 = "tl"; } - elseif($tnmt_type == 2) { $tp = "pwr"; $tp2 = "tp"; } - elseif($tnmt_type == 3) { $tp = "itl"; $tp2 = "ti"; } - - $e1 = $energy1 = round($gen1[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); - $e2 = $energy2 = round($gen2[$tp] * getLog($gen1[lvl], $gen2[lvl]) * 10); - - //아이템 로그 - if($gen1[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getHorseName($gen1[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 ".getHorseName($gen1[h])."(이)가 갈기를 휘날립니다!"; break; - } - } - if($gen1[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}의 ".getWeapName($gen1[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getWeapName($gen1[w])."(이)가 쥐어져 있습니다!"; break; - } - } - if($gen1[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen1[name]}(이)가 ".getBookName($gen1[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1[name]}의 손에는 ".getBookName($gen1[b])."(이)가 쥐어져 있습니다!"; break; - } - } - if($gen2[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getHorseName($gen2[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 ".getHorseName($gen2[h])."(이)가 갈기를 휘날립니다!"; break; - } - } - if($gen2[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}의 ".getWeapName($gen2[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getWeapName($gen2[w])."(이)가 쥐어져 있습니다!"; break; - } - } - if($gen2[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { - switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen2[name]}(이)가 ".getBookName($gen2[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2[name]}의 손에는 ".getBookName($gen2[b])."(이)가 쥐어져 있습니다!"; break; - } - } - - $log[count($log)] = "{$gen1[name]} ({$energy1}) vs ({$energy2}) {$gen2[name]}"; - - $gd1 = 0; $gd2 = 0; - $phase = 0; $sel = 2; - while($phase < $turn) { - $phase++; - //평타 - $damage1 = round($gen2[$tp] * (rand() % 21 + 90) / 130); // 90~110% - $damage2 = round($gen1[$tp] * (rand() % 21 + 90) / 130); // 90~110% - //보너스타 - $ratio = rand() % 100; - if($gen1[$tp] >= $ratio) { $damage2 += round($gen1[$tp] * (rand() % 41 + 10) / 130); } // 10~50 - $ratio = rand() % 100; - if($gen2[$tp] >= $ratio) { $damage1 += round($gen2[$tp] * (rand() % 41 + 10) / 130); } // 10~50 - $critical1 = 0; $critical2 = 0; - //막판 분노 - $ratio = rand() % 300; - if($e1 / 5 > $energy1 && $damage1 > $damage2 && $gen1[$tp] >= $ratio) { - $damage2 *= round((rand() % 301 + 200) / 100); // 200 ~ 500% - $critical1 = 1; - if ($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } - elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } - elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } - elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } - $log[count($log)] = "{$gen1[name]}의 분노의 {$str} 공격!"; - } - $ratio = rand() % 300; - if($e2 / 5 > $energy2 && $damage2 > $damage1 && $gen2[$tp] >= $ratio) { - $damage1 *= round((rand() % 301 + 200) / 100); // 200 ~ 500% - $critical2 = 1; - if($tnmt_type == 0) { switch(rand()%2) { case 0: $str = "전력"; break; case 1: $str = "집중"; break; } } - elseif($tnmt_type == 1) { switch(rand()%2) { case 0: $str = "봉시진"; break; case 1: $str = "어린진"; break; } } - elseif($tnmt_type == 2) { switch(rand()%2) { case 0: $str = "삼단"; break; case 1: $str = "나선"; break; } } - elseif($tnmt_type == 3) { switch(rand()%2) { case 0: $str = "독설"; break; case 1: $str = "논파"; break; } } - $log[count($log)] = "{$gen2[name]}의 분노의 {$str} 공격!"; - } - //1합 승부 - if($phase == 1) { - $ratio = rand() % 400; - if($gen1[$tp]*0.9 > $gen2[$tp] && $gen1[$tp] >= $ratio) { - $damage1 = 0; $damage2 = $e2; - if ($tnmt_type == 0) { $log[count($log)] = "{$gen1[name]}의 압도!"; } - elseif($tnmt_type == 1) { $log[count($log)] = "{$gen1[name]}의 팔문금쇄진!"; } - elseif($tnmt_type == 2) { $log[count($log)] = "{$gen1[name]}의 일격 필살!"; } - elseif($tnmt_type == 3) { $log[count($log)] = "{$gen1[name]}의 모독 욕설!"; } - } - if($gen2[$tp]*0.9 > $gen1[$tp] && $gen2[$tp] >= $ratio) { - $damage2 = 0; $damage1 = $e1; - if ($tnmt_type == 0) { $log[count($log)] = "{$gen2[name]}의 압도!"; } - elseif($tnmt_type == 1) { $log[count($log)] = "{$gen2[name]}의 팔문금쇄진!"; } - elseif($tnmt_type == 2) { $log[count($log)] = "{$gen2[name]}의 일격 필살!"; } - elseif($tnmt_type == 3) { $log[count($log)] = "{$gen2[name]}의 모독 욕설!"; } - } - } else { - $ratio = rand() % 1000; - if($critical1 == 0 && $gen1[$tp] >= $ratio) { - $damage2 *= round((rand() % 151 + 150) / 100); // 150 ~ 300% - $critical1 = 1; - if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } - elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } - elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } - elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } - $log[count($log)] = "{$gen1[name]}의 {$str}!"; - } - $ratio = rand() % 1000; - if($critical2 == 0 && $gen2[$tp] >= $ratio) { - $damage1 *= round((rand() % 151 + 150) / 100); // 150 ~ 300% - $critical2 = 1; - if ($tnmt_type == 0) { switch(rand()%6) { case 0: $str = "참격"; break; case 1: $str = "집중"; break; case 2: $str = "역공"; break; case 3: $str = "반격"; break; case 4: $str = "선제"; break; case 5: $str = "도발"; break; } } - elseif($tnmt_type == 1) { switch(rand()%6) { case 0: $str = "추행진"; break; case 1: $str = "학익진"; break; case 2: $str = "장사진"; break; case 3: $str = "형액진"; break; case 4: $str = "기형진"; break; case 5: $str = "구행진"; break; } } - elseif($tnmt_type == 2) { switch(rand()%6) { case 0: $str = "기합"; break; case 1: $str = "기염"; break; case 2: $str = "반격"; break; case 3: $str = "역공"; break; case 4: $str = "삼단"; break; case 5: $str = "나선"; break; } } - elseif($tnmt_type == 3) { switch(rand()%6) { case 0: $str = "논파"; break; case 1: $str = "항변"; break; case 2: $str = "반론"; break; case 3: $str = "반박"; break; case 4: $str = "도발"; break; case 5: $str = "면박"; break; } } - $log[count($log)] = "{$gen2[name]}의 {$str}!"; - } - } - - $energy1 -= $damage1; - $energy2 -= $damage2; - $tDamage1 = $damage1; $tDamage2 = $damage2; - $tEnergy1 = $energy1; $tEnergy2 = $energy2; - if($energy1 <= 0 && $energy2 <= 0) { - $r1 = $tEnergy1 / $tDamage1; - $r2 = $tEnergy2 / $tDamage2; - - if($r1 > $r2) { - $offset = round($tEnergy2*$tDamage1/$tDamage2); - $damage1 += $offset; $energy1 -= $offset; - $damage2 += $tEnergy2; $energy2 = 0; - } else { - $offset = round($tEnergy1*$tDamage2/$tDamage1); - $damage2 += $offset; $energy2 -= $offset; - $damage1 += $tEnergy1; $energy1 = 0; - } - } elseif($energy1 * $energy2 <= 0) { - if($energy2 < 0) { - $offset = round($tEnergy2*$tDamage1/$tDamage2); - $damage1 += $offset; $energy1 -= $offset; - $damage2 += $tEnergy2; $energy2 = 0; - } - if($energy1 < 0) { - $offset = round($tEnergy1*$tDamage2/$tDamage1); - $damage2 += $offset; $energy2 -= $offset; - $damage1 += $tEnergy1; $energy1 = 0; - } - } - $gd1 += $damage1; $gd2 += $damage2; - $energy1 = round($energy1); $energy2 = round($energy2); - $damage1 = round($damage1); $damage2 = round($damage2); - - $log[count($log)] = "● "._String::Fill2($phase, 2, "0")."合 : "._String::Fill2($energy1, 3, "0")." (-"._String::Fill2($damage1, 3, "0").") vs (-"._String::Fill2($damage2, 3, "0").") "._String::Fill2($energy2, 3, "0").""; - - if($energy1 <= 0 && $energy2 <= 0) { - if($type == 0) { $sel = 2; break; } - else { - $energy1 = round($e1 / 2); $energy2 = round($e2 / 2); - $log[count($log)] = "재대결!"; - } - } - if($energy1 <= 0) { $sel = 1; break; } - if($energy2 <= 0) { $sel = 0; break; } - } - - $query = "select {$tp2}g as gl from general where no='$gen1[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general1 = MYDB_fetch_array($result); - - $query = "select {$tp2}g as gl from general where no='$gen2[no]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general2 = MYDB_fetch_array($result); - - switch($sel) { - case 0: - $log[count($log)] = "{$gen1[name]} 승리!"; - - $gl = round(($gd2 - $gd1) / 50); - $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g2'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general1[gl] > $general2[gl]) { $gl1 = "+1"; $gl2 = "+0"; } - elseif($general1[gl] == $general2[gl]) { $gl1 = "+2"; $gl2 = "-1"; } - else { $gl1 = "+3"; $gl2 = "-2"; } - - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 1: - $log[count($log)] = "{$gen2[name]} 승리!"; - - $gl = round(($gd1 - $gd2) / 50); - $query = "update tournament set win=win+1,gl=gl+'$gl' where grp='$group' and grp_no='$g2'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update tournament set lose=lose+1,gl=gl-'$gl' where grp='$group' and grp_no='$g1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general2[gl] > $general1[gl]) { $gl2 = "+1"; $gl1 = "+0"; } - elseif($general2[gl] == $general1[gl]) { $gl2 = "+2"; $gl1 = "-1"; } - else { $gl2 = "+3"; $gl1 = "-2"; } - - $query = "update general set {$tp2}l={$tp2}l+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}w={$tp2}w+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - case 2: - $log[count($log)] = "● 무승부!"; - - $query = "update tournament set draw=draw+1 where grp='$group' and (grp_no='$g1' or grp_no='$g2')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - if($general1[gl] > $general2[gl]) { $gl2 = "-1"; $gl1 = "+1"; } - elseif($general1[gl] == $general2[gl]) { $gl2 = "+0"; $gl1 = "+0"; } - else { $gl2 = "+1"; $gl1 = "-1"; } - - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl1} where no='$gen1[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set {$tp2}d={$tp2}d+1,{$tp2}g={$tp2}g{$gl2} where no='$gen2[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } - - if(($tnmt == 2 && $phs < 55) || ($tnmt == 4 && $phs < 5)) { - $cand = getTwo($tnmt, $phs+1); - - $query = "select name from tournament where grp='$group' and grp_no='$cand[0]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen1 = MYDB_fetch_array($result); - - $query = "select name from tournament where grp='$group' and grp_no='$cand[1]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen2 = MYDB_fetch_array($result); - - $log[count($log)] = "--------------- 다음경기 ---------------
{$gen1[name]} vs {$gen2[name]}"; - } - - pushFightLog($group, $log); -} diff --git a/che/gen.xlsx b/che/gen.xlsx deleted file mode 100644 index fffcc37dd64f4fa17bcc503d679114895d095d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61653 zcmeEu^;cKjx-Z?G(jX<>EiK)kba!`2cS%Y&NQrcJcQ;6Pmq_G8F9i;P0RjaA0|Ej<0@CJ*VPOFZ0`d+L1Oy#q0aQcS#@f-y+EM58 zS6d?oEqYfgOX451pdYe8z<_`M|G)mPsz7m^jBFPpO5nBl63JgIa_c4m7`9`-O!Ch^ z@Y{dK_Wm-^AgrsdGxk7j zFIS5Jtf*c*$SH6dfR`8O^agNy659NKKOBrfEHCk*<}?Fv;LiH@^Ms4?abR%7r?1NQ)tqB3$TP;4$fR&&dmk zOS37t+e~TvF^(1&n;O2j=yaFeSwy!+ESNdFPG>j|u9^1wnI2dl7@!m0`?!7cwGRG96q~u= z`7x4*M9b$K+Mbig$*GUx&yIGgC%~=eXK)bt|HitSFN~y@0Fk>ax<9ZMhsn-sk``|w`ApbOc0yDWkwYeMeH8%i zCuy)aakV?fud#BnWA>Q{U!Os?tMP+i1&hA>oVjaBrZRGt{(BQMj6U2*d_9%r6-yo0 z+_+Tzx%;1$-@f5C#yybgvl7T*z@Hu2=fyB84C$t0lu5++A$!E%a?{EM7e3ALv88Kp$Yt|Jz^9-$%^584&_b16%zk zTI{|*$q#b7Qw6rvEy-$fdVK2{39M2(RJ!cv=zUR8wARu*Gq54pX z57D@gI$8s#eJ!VQO&n6g(s+%887^L4LeIcH_S-^M&ag?~eIci!ZgQ7@+-D7ZRwKSF zsl?tsK?hs|8vjz{MiI50+w|}@wyYGhuyh3!mmS=0FNA?x8>>}Tt%#^rFTC+H9Qc7y z_}HvSx=KH@2W>1hFvzbN*_yHIU47tcpZM(XRmcjY8X%M&ScdhP>nu8>XHZAr`#$q= z=doxokULaSBSd)~+*Q!9j__aED?cB=|8K~Fh_3G)2GF1YAO{(M1c03XikUQ}G3zPD zcWtC+NWBN~`LHtBzbMd6rH`0N6lyoOdUbFuA_?YCCR;!me7fnI?8G)IP5h1tuI9C4^Ve;-fu}>veNxH?Zg5eM@u5n)@WFTccJEDVXij$!Rc=#f2I~%hkMXcI1WA+}B zp7j%?uuA-gb@9YhsJKPnchSSy9va_fC-oIzVNH0%0&0$_Eab1172hX2oz~m7J8<_X zy8Kb;vRtUcBY8CAPM-MrJM}>qCOFJ0SK~(uA;Gz1z66@}-G@;K$E&euhJh>152ZW- z!;A}ut=!^N`<(*~Yo(&ODr(KAEzlLETC!7WLA=V`c92rFof_JoS=Zpq-kYd~!YO;N zcs^flo;+PGKJJ#?oO!HJ?os7;4?|iH!yv1{-Gf%;@Wd6 z{4sKUkk_@QT>|eqE_05|wDyM5A1QHG3FPmr-ILFVJ)}Te|EFY#vXZ0h1C3{b00BXK zYrKQwS4$&@7pbUL8VZ{hz*vTV5>{}hO!w&uCrj4y&mxwFw=RnPm77JFeULAqIl_Rj zC)*LY27RM4I?V4%6EEAy;TMv+)jHM?HE07>((lW|P(o$uR*@Z$IygJY3hCLl*joRi z8=QqrY4(p_aU1fWeZMViPrCH>w-{YKRAKJlDZ)mri49Rt(=u79AR=45iX>&c9Ca zIjUT-@LVD*dzc5RJ$?R%knvXzXHIB;i_qeN`skQTX3zK!tpryi?nR z7ep&9%#yp-A#7WnfDAZtFBC|D!3k2?fT-;=c?Z>;wZ>{euUe*C#|hs! zX!DiM-LvIWODr_JQm9|)-_-Ks3;V{n%aX*l|1~lh<_-QqMFjzAO9KJH_y-fFdiF+! zN{;qs)+VpeDApRW)|f+G!QSJ6ahVhO!3sG^Tplmt1Gelm!RMn#Q{k&>FGFtXT-B(M?N>(Dg zROv)?N*}H`TqN@%$aUu=U2=l)@Z?%mwdt3=>+f!~_ct#oi!5$3%jPoqTI+muGQFxa z-TpdWuJ})O&CEpftR{RKk|A3Vo(f%)b8!KYXYLcby~bm;%4mucIay~tqwv&%G;-8*HH}qW z{D-#Df=jYw84B}HTjo3mQ5EKuy$ZD@>GSw zWK)H1ydTMKviW4$Uct8DxTxMklh`bfW_qpTYZ@`_@S%!tVc59=7F4K2z^$~BdgRMt z+F{>^$7KBF7}9{K@R=K8&!Kd#P5O1Un&d8+4m$~DLJIR^ew!jU#x4PM!G|NzeDhEH z%n-&#K~c3_y4Aj%O6dZ{qHZ6Y)z8Zbj|TAUD?L{ThuVS0gLsqEhK%dM-)GaRpl4H< zp}Gh;%|yASz8OtH+Q|Kjx;@AX@5*xyMVHLQ@V2N?KJno@2qsC@vZI$MsW1_(OLQb(-Z^LkjM7sWqztgGR z@*&bZmtUeFZE`xZo;sp_XUpCDdrh@FnWT4eZoFAL2za8VV$S7Ix0XX}()84X!>@?k zQOUS1W={!wrvd7`0dga^0*MV-WYs`p`3x;PAyau{wqe2e>dwh^el}kC)V73#x`+iuXQjGaAsWfHdDCuzM zK{CAC{MZK4ki`8Ja$@qD%p@E`3uuZCNOs#0W(~7X2mEk}9YmjBc_Z zaY$1+en-eEq+gX|2c}sa+>adWIWCp(JuTuvC;QRM>xTx~d0yM478tkD!B52X->A)U ziumoZ4V-$81*@6z;)reIXQ*bRQPMK4B6WAuE=a}k%r$H(B)LPrE0uM_D6?vU<;r;? zZA9X;3h&`mN>f`YhrdUN{47mIq#cK?P5i4v^>%rU_!!e>=s75jx8h2AQShq zK)~2{fOlw3Nbqw$$EhCX9zpuSYT5RYs!mdw5l`z=BMr{z)1uWs-fe>TQL54-(w&Z*paGT#r~uNy|@_4R)jFRnxMNOf2HuKx-i}+>AEz95u_qYb{<spML~nRz@&B#V!~ok048|X>_dEMOI(j&e&PQGSH8f1sJUZCj{DVYRG+w9~A|ny{L%$Y2=8-BcNdH#Xy<1XHO1OEmO~HKm<>sw1

L78T0!YiR6 zW8{knLJm!6g|w&`IYQl;+}R)@aLACm@mk!HqcDpGvJiiWtFAycf1nS79n@(I%mdW+5*_+3!s!B4vl3iAa@3OD!(42&gjE(m{ob zeINBrIt1z$)vf-)dj?&aV8g!M;k&?78eVTP5-$%4EbbUvJ9%Nd4+C9Y4QH1$t*igEEvlIP{;qcmVAkx6c( z?)*{`{{AP1N)59awYaaDViwrMEDy!G7o);6>PBU@G4r*FkF;(BNoELc3HL#O{0?M_ zMA@YkjD~#1k^qC8VLix(CDRA?+%d?I;z2q(;`+nHVgtg5wuZ`JGVpo=Y7@ zB3JaDT{;|73}<7`2#sl2mdL&b5}!^;)L}{4-e5JnehlAMDBQpjd})Jl{PI98JlV~; zG*|El$NF+J1Xeg2%Cz35jlmhAu6qeTv#g`Gc&Nd6Y&LtLTY>$!3tKw^9BG65uc(K( z(wqK$;C^Otn;Q)*;1Qk3hFJ}^F=(Zfv1_r{i@fcE-muE75FuoDxxpKh&cW8 zT92=TRbFM88s1JCGad!_*%vD!BV1Vn^=?q;DFI01Qxmv+U-JQF87REc`W@sQaLjm5 zQ3K8hDHXi=YLrhPm>tsV9>m?_uExSj^ebuzJK%wdBM$H?C@c4_Z6O;l#*o%3r(7K4 zA2Jr<^X*zf7sWQwl6yri)ISi}U#{M>k#z{<|NMd~O?raGpdU0;@r!JwrYCAJA;zta)dTfp+&qL|B0>ezyYgB08$e z0y*O4HRFG5#MDf05(R)41?2|@so{IcvrTpemyzO#8o)-aJkOaN@Vk<{55Eg*9=E=N zAGOfI{lfm4m=f=%T7ZWwxS{Pw~K95IxzJe1jx=zghCmoHaZbFp8HrPsaB7}wYYpPLyE zC!H@VCWG$%o?jmZs|U!Bz#wEaw($>=HOZ!`h+r7_=a>4l9ybN@bgUj+a^Mj^Gz$WQ z7>ZD(h0U!9-d*FH%P03?u;o7p?*_GEh*0~PiT6+zeS}2R*_dk=I}7j)4D$Xl@X27z zqYqB3Su0LLg1U%0U{GKu4-U6gAWlzpx#H3lgoqDisZ-1*=7UL=uQ*{2j9~pzxj~+9 z5_J)I035%u3)8Q|q#4cepK4K3<9{HD{dTdOyniWwf%)R*F_Lb}Cx4P}twnT>#%V0~ z)ciei89f*b%@}-RM)nR0Sxgfb8mb08Wp?D+oPlL^CQDstky<=j&cIpr{q8FN9Cov= zV2+bv8ur#vDkQG`{39NEhbJoTtT5Q^2^~+w4?;;>ooJjBA~eK&-{I5W=7)YkWgV!) zeU}Ofk)r}#9@$YUal?Y4KjG;Hs44iN*y;X?hO3x`+y_S?u-XP%XW$y5 zZKk^)MzfOBbz{T8oGMg_`vEvVh=7_B@cT9M&F3AJgKG46xwZ~0;^E9?TF^xCAntiC z+2VJ429tk{Ke?%}uX-IaugH^x!hqeWTCXKwQ^#8t7mE`m zR5bUaqjfbgVWTSl`QR5H(;nQ;p-)p3FKIyD$$BLpPO9tf@G+lH(A(qB**7sFw^W>K zdT`W=?`|C?KgzzM2Y2g=#r_iQPd;MwMPju0N^IJV484`{7o|(F<6D9X6OoP4`Cqsd z@z5l7A&soVWI4%1v~Y?d(R`SohH>+<+2-o>a}JPvEW2gvx~Y<#2LzCNK2>uks=vjT zvqi_@CZL9G^nXu2AH=78WB8+^G2Sq5U3WP08GC5j=V)#L%&TScr&S5JD|qG29a!t^ z%7G&;(uxmlYlY9LmN~mQ{fdu}=;i>JI&}4%RKspGlL=4WA19wO6~!BT$oXiKL@cJA z3iSjF)Yc&pWDwl`@*hl!RRQ4@$Yx6&6Y}!KkZXv3@HR)^8L$(oX~{eV(P#dy$S}rr zr>zc|thRbwL9}>W-RwP0<=pe*^SatPKD!SMkt}uC$&-1U?Mp7M~`O)nX6DsvJuDTudi zq6KpHR@RMi=I z*FZm#Mypr#?owA_DjEI#0J4k(jLy`~$r_k1A|je*i`bXn$aY{X&NEZeV9Aw8WRmp( zRq1N<+a+g=1vKu=#fL2Z$Ixg+T6~p57H(WTxLcOP3Ft}ZCKRSJESx3fHBwYcjQ3vx zzSJldBq+1}N><(#ACd`rN1p=qt${-iPLQ$5ClSw9bneHxr5_HCS=%BaC;Ye2&aXk@ zL9U-B-LH9JKGzgc3N3>lV*Em;IwIsIFAyiD*^;tEix96%Xfo z>EvFFuck>WiHW`6nZV0?zYbX<@qo{ZszK~*!$qu+s>S4Lk1B_2v**n1#&@+o3HwmKiQ8a121 zWGF`%Ej368;Iyi1{8S}bYpc}PfV5MXMfh9!R}<68QGU{QeoCbOFDL7mxw|=VG)G6V=EpxN&tGu_r^`UZ>_$;APhMyb4$eVuUacs@6Xs~{2ONvsf zDW(=s)uS=ZH+l}EPO~ejA+YG!m~qR;|716zuR09<1A^W&`U(7=2$PSLBH}WLd+mN) z1NC7xD_L+sKv}2UA9@mTk{(IVw(=W$GAqsDf}`W4_7MA_Lx!V6Ltk168;?x$*xr!` zr$Y}{jcdlJEbr0HLMfdS+ovnn(9TItp8llvq|BNy{*PztS}+&vnrCv!-zk#UOvrup zE{;;UeKzXQ5chX7|5xL>_{--f#0&z0{S16i>CL!aei7(kYGmZ-!0`G9^NV|>rRz8> z^?u)8<h#$a+?=+uJ=le8N)pX+DhRn|A12#_g3m?$@w%r^k9{V-O>-}ZR5I9JeztT9=Zxmr6nx4fuB#P8Wq z3AgI~$ikMv@AYu;WajGie65q&+N>H=CYMR1GyZJT=5cqtI1|P1aRYJeAz;(W=jq{c zsdWCRlhV{wRLB2RUi0Y9$NP9T@_3z^*w^-SIJH}F%^*kQvvx2tbZ%2n5XBH&FqRqP zxv15`MRcT-nfdH2n|>xXXS%(ZU~j#B_Bd3qnt3!P=Z^Al^;{b?_8cL)+FE+$YleLK-brRj8Gc_y`u&(odDi+fkAcKg{^m2w<5N@9W9C?! z5#Q6Z#kn^ho_B*2;qx=wecSlgv~P5e9Wi=d_~E1BM1Sy-O_0(@O+>#)MJbru3#o_w{j& zX0yO{P@^Rr>{{?Dp@sT2p^i5zZ`6Wz9y6VGE{;^z_eR88> zZ>sE-?Y#*-YZ_uQfndUmhsoHDUG;8mX|r7wzr>1yQ0PU)koPz8&5Fa5k@ss&!hi5L zTIyGj#d7X4JUp>nPuEO;+edm@5V}QERRU_a)z441Vt$iT8FpMd;J-M1I?c+-K;q1E zU=@${zEKGbjl)~%t44a(mTND*E`8Ep9_<$HUo*4P5?EL1MaoVt;G3p7;A`5O+@TzWe6bNYfCaf}0w3 zDK=}V(d`?@oW1UUdqft5CzIJ;2eb2Jr=gxpwCH%JyIv(msutbC5ksyef_n2Y{TF6G zle*8U(#tVf(!?!2si{LDE9zWX;iMn3pp2JSq<~hC1E&xi+RGg`TyJ@}v|QI9@b58J z`BuyEcaF06lzw>_M&C&Ly{nv`Vo6;+yS)G=v^%+4JT!)MhSo1Jz`7hrpcPaRr7fJ* zZFAor<5#&2#&Ahm>T80I?VoN>(}znf(sZ3=e21u888Fj_)Xtrc&c_#DO+razN5PlX zdPEuqmjyn|5hKiPd`Y(J%atxoi@v#j(s}d5oL>vt#7J*dhQM(>c|tYg;$Rb`T;31^ILvk0u9WENv-_1F2u@G9by}myJ>8}#n z(#QCz;v1|Z`gbEkTIM;kN~YFZ3HF?)Vw`DUR^nfIv=qWWZ$(F{wfIam&Ph;G%uce6 z4%f@dOEnzFukR>FKE*-Q-Hq5OOApu5_-RF3s3BZnIKsMco{n&)Oh);dy-QQH%|$c4 zbMwu=h2vcatyzjUy(aFB|Ep;2Zp69L7b~w3$$=^CUymr8Y~co1XYUj2Kq97;g!s03 zSXNJ7vm;+Fo(3?A-Wms%O?NXxs=5~DrGv23I0zT@zZGhB91(Q;E{&3VRIK*I(A~T; zdhEH?@<7?4-G&b!Q;yPU^(bcH;H7(Qaz|fYT0cJ^Z7jkDn-F_Iv9&1}#PsW`ZT3Q~;PH@}QBf;V?%fGYi66o=DcwW9XmOZC$o4=&W7 zDj7$3_s`H*s)UnJw4g8u)tm2SE+*3L&b#YB4J7U5dAChL^SxeAen0e%iYufN> zcSjsqZ?8^X_tFs0WGCsT!L!ZE0=;Fr(CF<#M{tOTZf&Ulk@&<6uFBUe>z_?vo2pad zni=WSEw`rQ%w0ac9c3tqQ^8cL3ulDgK^QwF#Kt9CG_tZF3r_>6q6;=KJx`^iW8oKy z^Yj&GOd5`+ho^_yX>pB&2XFIiPF@X`2iHcN0U$W0El6%45sS6{83Vq*n1biGW_u9F z!idb7w;?Wqw4XE+n+ClTaLKb-vIJq$>tZiL_l6+867IaaQIcIw7LG03jAwLs*_N-@ zbddYMLG9#}BE5kM43-$=z87;GK9Hz^-l=D*M9c`aTfWY~aiK{)KE>|M15nh-g3ohP z+ko#W%i-kki*?%OW}GV(Ch@#7O$= zA3`P_`A?^)N}a~AYw7}_9`6N)uTqJBHybrTrCWc=}DOor8gX<{HXlfXNkcWod z0sgd-DdgO`X8&?I`T7^td86-UPiHk+EBX|Fyr3K$AG-0tCYb# za#w(HO*@=4UVA~kLUXX5Xj^+PjJ3yt%3oJc%zG3UIUuM41nW|E>@rS0W^rxUwSKxJ zoVDd|8N5O4NF#Iv*KinKWA>^%^1PDi1vQVrAJ)M6=)cbDcDe6^0jxu&%<>ZW10~D9 zOg{VbL-|E3l~w!-$fgOAmOme%Y&aJV-5ybO&((~^({sGnDnOvJDMrV`_nYN_8B|6c&lqkj`BKqF3<$om!>doDFc zElF2qk52)Dd9NHC?gRCrdjg7$ygZI<){!Bk=^*rn6LO*b<64}W)jzvVJIW~T0ZM&Q zYwb;RWb}egg*opZYc5IlX_&%}!os;6wHbcaq%ZFcoNs3xk5k}P1QfbOV9Kq4WxZS7 z`p9;~%$q@mVLN|rS|!jM=+Yki_pdS1w3cO`U+@*Qg^QmwdsMw9E@EbU8Asue zMpqFUdsYrUR|DtJ(+^J*l3dojpnC(+A`5mSBbH^_4$@)EaeCl)dwK10?9dvQI zKNyNqCq7xh0ubH$$Y?^j3wZMjq4g}8U%VCD6c_UugT4U3S6#Jmqu#XAIEk~s(p20g zQBn}n;GoyPG%fhE%=dhZ#I{VFxnw;(&B0=Xx&t;@iJx>a)-={Ic1@E;<<}U7Li}lm zn)Hq>(@@5s`O|oX{h$E8zyM!wBw}PL<=;=nX^Yp`?5wYDVaC__DD9WJ^EX?~PPood z_>Nvkj-)jDRR?tmZ3kl`W5Vz!nToJ&)vq1XEd?O>D5ibcUg?Sy|gp3Zu_|_E3i;sBTI~i-PCTP978TXAGhPq4O zHY<%W4F6Uwjh3vO90`5QDF37LT%!P<;>wBW8>JZ5a`C>yngGj1^o^Iej*hkKUKn{r zlYM+DCt({1AcezGsww*v?HU7j`5B-FfU-Ag{G%pvVgOPaYm;&2TDAZ}4%${9NZ6*% zaE$_#%EO!77L^mkwt4aK}z+C%hJFA0&FP4m205Pux7~CFfUW+Qt6t4qcZ%u`+UdEcIe;kZ%bweuz7i@%4O&q4g0PL6(fZ*_NfTr$CY;N!ut#P3;8R~fH4K&Sn?LMKipli@IPAFLDH&fy0@4DY_E4|b zvR--&@}F9;TK@LHH4;X&FoC?kBL$%Id$Z^KJ~a8u>hOX$qkG91o_~%_3#P-;Du7m7 z0L8kjY1Y&OA(LzV}ik<+Vkf zXe$dPDByhDn;y(Z^Qf*q2!0GAl}LFAiwf z#fC4}UAu|CW?i^(uai~Xo5#9vyX149m}~&lB0n$ zb|y}t1FgR3<*7(;pj{kD!NAVG_GeFVHcB z2N%tHVkFyvJd`%etA#96ocDVNBXOekwQi1anIBv!GdGJ}e?(@8yCAs1HJZ2r`uSO^ zn^ij9{?k91#!QCH3_!_L2F~1^;A^C@n@K)s$}|IXDB)+$t}R~f;+H8Um?GKNSkH*a zYUISPh|1Vktes`n;vltO;sBVeN_zNVrTNR2@ez&D%ynpvs3QUCMV07tgNw;``IPSE ztN)h8U&7D}DLi>>B}@8O0fV(3c+rvH&j;o_8URLSO!?SpB7f$PPL8o$U~GVMz}KVD|ww31V2eDqO4OZ zZ=fiVFd=}py*MULfYi$Ph5aOe>4e2{aU;rwH%Zy?q;WmAT$t-=E&!HG^g}}EI9BOC zj8tgJcF-5t1*d};nZZjC)1r)g8318)WTReCW==-gdl?^*e5T8YlUS<~w3%r7ea)*d zK58_KbYTkB446S1i+PB>xb9>r(|yfGWZ{A3A;A175E~>8wFoFbS}M+5;M@53G@Ro1 zT&*Hor5|#|`suE_reH095WW$kMrPuict-UWM%L zYz94Wc0}b>6Q+<0iB70~M)AHbeVKgK7Ng$mu6kvkK^4&c<+kLr@*Ucj;c*Yb1Cahi zH3uLd1bD-DQpi>?0I~Zc(de^l_cnX3&c!>$1=(xj*Xi#iR8`M*tJ|$qx6LKW0v)$F zDAx9&g!@v~S_UMPi2UMicep#@r>=(R94b;ji3@ ztv=$}fNKO_T?o4|U1D6cOuslZ!oIIr{iKl@|G&Hr+nGyEYIi5uF0bu{QIXCcU{6HC zA0*3uXY(Qk%M$QHUb}rb6d&zL|d#{sGz$gIi*(60x^-Lwr1KRDE-ntWEsGDdrr?|xL z3WwO7=gaN^xLVESNuy~9RmwsHLhGA|QNANoWHU38wCfqDch@p#`hf+w95C7xKmw6B z;nW3_BcOgg4t$>~z^cI^8(!vm;c@oV*R0$ExEpvI4uO|1HQHDhNuCKzMT$~RzuJxW zwP}&Jq+iq6wttm=(1~e~WBj;M$Qa8@8q)nILUMZY7GAaE^Rl6DHmU(r)%ja6n7F2s z#Za&N2#D9xIKgr>{a1Imvm7OqkFr|r1+R2?^(nJu2Zlm>M|DlP`C)d)3^kx$g;k9u zwm;-wMhll};k(1r456I+8fd`dT>Jkc1Yoj!L~u%!o9p@o-rw6^09lqE&(==`J5vbs z_GB;EF{i8m#mwz_a$oENRKDIp+{{~5WT$j!aKkW+W?#JI4zzi>-gfRQh_Tm%HTe|ni_TsQ$5EM5=Sr_{gHm$8+Dg1<6hE0@TYUoTf^cl9Qcc2q!GHe2ZE&n$a5 zzY*{kx~%omvHJw1pk@T~Nmi1NgxuJT;W8~S(6j%!Is-cPNtLW3!8&Z1iXMLbHL@1D zHvn!y5)(BNM$%Y7qBu06G|sd2a_RA!I=O!QJAW;Y0apd9CrLOecP~ZLdp`8F`jGy8 zEkEgX7@I=gU(DtW+?yr&&rJs`r)P^#?33tAV0|1*wo8{!e3|yo%J9a4L!(4jW;@C&|pAEWP8zPaKt z3-UM%_`M`IpiW$q|2izJC#E;xt6)~fnkGI#oq$=}{sg!fi86Yf#N_z5_@X3JD7tBu z7ZYXqg_z0-O>bwi}WL z9rWk&^-P1BPn^1f!QN3bWTBfxhL>1U$@#_QVRAyhL*@LCv>$Scdyv+2jAT3$&|M@Y zFNxec+PIIO^=8k}zT&O%r$Y+UKtojLi{l%z*yKj-2qb*vxejr&KrsA<1Zn6gVfKf_ zXkTvQENWSutHo+Vr^yIA0KFfJ2c%LOMkBKS1A< zW0ko}+>5-{$OZTH=aZ$&xlnJx+9O$2|oF?_9gX9XwP+`0 zMUv<&>e+Q zOurF;sDI-)m?(c>-X@}L13oF&kbgXRo#Q(jH(7ouTR3&9<@4X`d9e*$&ejp}la)Lv zYl!M?3nw-z8dT+Z8_o`fl0RL`cTy;ZTOi73Ab?^}ca>k(7EWo&y>3M92`C3@2?NfA zdP1uuXf;MI!7vPk>FQfST|LY`QkC3yh(^{H;xNPP;*fYqX4(7<(3wkzNCi|8@1*~b02Ebr6ZZG0T)Ft6bUWI)tyGPphOF-`Zagk-Yl7D%!H zq^n;kT-5>K;B6AH5YiL+;0$6)N63K|J2@L{H4?>U{E7QoD>fhjE3bXFsX&%L4YYO` zL8N0gm-7wgj@i()6hG5JfGvpn>b>BcnZyJB{EHp9dXUvfG~3Rn&H@-l@+3u7FF`vF z=9U(qt-=cBY*dx6EDN)MNSI<{_^mFgxsbpEQhQWIf5y0+GTE5<1#U5g)Z)8S%pszs z3{}PDRiT4b{(eI8at#KgM(leH9p*|S%AR)JrIai@1KlBnGrD(mJxD$!J&*jF6$FUC z744=2twv(lF6d7(A7mWBWWr8-bXzZ<3LWHF(H0GDsz3Zr!I;1M9s?k=8m^Y2zR>m% z3?Mr$*rGmk`|L)9HK>0H)zi1l&RXLETo(NF`&wyzi!k~Y-`T|iS)IgbOA*l!^3^H$}fvO10*$}i+%hN%UMjVH~ANWnn$ z0Uk3t^2cnN!X<}D7+O8{y}Azb4q!aUtX+gtr=ljb|dGL_X}j@H9zc4`y3t=6&wFX zS1y$p(m>ZL%j*1v(m8P}2ve=A7f06UfS8L_EFLUCT< zgtr8aX{^LR3EQ~a{d8dqG$5mfc!V(uVWyq~A+vA?PRP|1do<_*LkL_r0v3LbF97%c zn~Cx4Zy~7RU`SW;t?^?Pn}`+4xZCw~LsjyQdP=ISh5mF3nOKm*p_C{V70Ih%x} zA3#?aJEAJu-cDz&P{GIaN z88v6ty+AgT%Ga`zT^-F(Cd|-tKsbgg8mKn|g=m)XIndmAAh#IwZD5ar= zb8%jdUFP9xsYP_2@I*3#Wy{wCM?472$0S8dD>YIpoenKzqYlJK=sW-d2U z`9YF{LUg3eoFEB3ixJhv2iX1j?ug7tv>;=xy@0NTF8n1W#wV&RT>lwmhdAz)x^0 z@f_Z#<4OR~C=<@QJSkM-fT&J@skT@7H(7~{%mNgo1ZSB9qy(|z1pxIMS8txVMK&#* zHUYZX#6*e4*A7yhzZVW$4eX`S2CSNuBb(wMg9n6%#!Fy`UbLFx=O*YIvd=8&ByOQ| zYK{A?_slL5X$34KJxq~0miru!!GX2uvk?CXMGb8WAE4S!=}M)%u%$ln0B_q~XIGgnRh(6vxB1bA7S zfSCw`l^6)pUkR=V<6ryxW54=R+s8yKozK7guWEPth%FD*wP>zy>a%W{z95Q|C=6R}R1vr-~F?qLybL-a!}uakDmmPZO?s zg~#bm5pR5Q!I9ezv_!(*u&+7y0s_$d5>P<%dHw?Ol05uRp2!(Oc|p;X0w2lJ?9n?2 zVHy)c)53l@DAN{~g9{(ugxUNl=ve^^#ZNEtl8_gSSbg*Z1p;sl1<NKS7x0sVJE3*!L9g_+8?1lIcJ#KDV~ zCZO=+#>CB9DGt8SS_6mzPv-cRG7}{rSpXcAY>=xj*#8X&I(Ptv{R7Zy-*|9CEh{{u zjo_`ZgRYsVpRnbHYK{A>M}i%#ttw_9)RY|M{fe(;)2+|_i^(_0sT=bAizQ-;8E^*F z6G|1CO#csEZyguq8g+pVoq_@igHlqCD9C^!AT8aYAdL(q2!fP!qjYyFA(GO9w1jj> zmjcou-Eg0G@SN{_-@W&r(Vww>p1s#zd#ye5j-wIuc;F_RUIgioTCH@zCAfRFLW!*O zKEJ)}?0dR5*qW+472U!sHLBSQa8t9FeEEPz(2(dzX^Y3yB((mKkS2kT9-l0WC09Dj z)Fu`ruwQnCOeT!tr@n)Yp~M>1R`OM|rvouSbAOEP!~Q3LmkszO@(eh!X5b3VHB{i5 z_Z=-IEz;twgR6yM`SG8%UNa;gT?@+;>bvwZNYg5r&*4FZEIyD{0hs>^L|r<-_AcGR zB9tK)n(FJ|Fl&8G!0Um=^7$6au9vn|O*rK{48^yxG&hp?T%AZuW8Nx*2d+GZGTsgW z9WY7`PZsWoVZs9F)+xXMG%ei0V#|wNs`lx6d36GfchTKiTbZ>@=N0*eKt(>rq(B|o zUyBY#e#4y#fg#d_79|m)%M3>1{4q{+dF(ioea}=7OZ5pe`3232g#n4WTL#s+023`w zN$^2A6Z?MMaV$kXK%+`g1qj{$!KT&0Kra36JX2+^V`4rUoPaAmDS8w7`AED#Rqf{= z@SQqg_xAfQ@=NHibg5>OMgd@@18u}~ryktJ;;!t10+?6RGZ^E=uyVA(nr;268@5%C=AOP*IX6_!1wrci>u~bTV>uxFpK_r`#ol9f&O%LnzSw@tTXOOm4OGFHQE-8)NTrPPEz>y%I4~D?x8z?q^}*#^@r5X(8XRuBgAV2H=(0Q28Im>rlXzY_V}V z#?b2MU&(M5HYc2V)Khq+2o!-J?x4D#7NNXah zQOgd9MA>;`#}F;!nF4y^RyDO5NFss}E>e@Nkdsu^!b?!Ks1rd?qoMls4>|I|)X?bA zoo6N?j4r|;n~2X{kK&zc!$o~ zdE1Ny*y;ljaM*jP6~#8d8Iu)7$I;#GRk03q6agxi<}`$a0Ps0Cvm;(vT?__kc`0Y| zwSP=V*&Sw_atrA+Zy={IARSR36Fp&$_cdBM=XkQfxSf6^ik^~mB;mawX4BC1k2P*B zxTboi!9V^P!O^kuiNff1ErS8`Z|1!D0wg+t<7GJTKZ^W7#k?u*z9V_yfj!b6)OMA$bV_(_ zl68k%^C(g2LJ$FkT)g8i0(7xu3|2nD(FDBdV#!cWhNXGC8(az`(bU|Q2;0<5b*JIV zh!bAfFh{q(jK1-~ZJfUr>Ml{c4ldXaXc3jOEGD|5SraKTt}bTF8$CIdWZ!$6E4SY@K0mxandQ%n_Ii`krcB~#FRJhi9it03d#Lh9NmU2^u-2$%Im7V?%{iB*F(PUM)GZxr)lEyhIK!yDwJGQ+-9y23DN4D2UPPv|T#9(FMfQ z^WJs=49E;(K}N3Zj_XGc5m}LW8o++63Ta@0WO_GbvcRPuLsM0AfgjkP(6ug0pU@ky zm&luM424&^26TmZut2-t_xxv$Nb;(J!ql!30RuBc^A{UbU7^56eLC73t_2cjM4K(p zC=IB6dDf!cd9%XtD*eQ-!Rvya`O@LQclhsz74O*N026lw==~$VOMh(#R&srejH|@Q z!_TfZ>?-7-OC5D?S(Xomj(FU?D|cXv`L8*?nuSeH0j5$Prwm zqSgimBvO#C0dxh*T47l{-~s=$eLBjx1_q&P4wh;Bm9Lgxu!PMC+)6yg@ujV0c|m^} zI+tAk#fB$r9$;yRna`u>>oO8+e5Vv?ht5dqTQBrad|vIsPg080*w_%zb7hM0hD zaxm0e_vU%{YChG+C@{T;lBk!20X*P;JEWok6rwxq!b4u@{6D6#GAq=;?F6}VU8t-J{;mn$!yDPT?DcnNRJ{6@T_Q_O!Tq%WtB4-vGc;G;u%erbT|^+x z^ysb>194wmy9=9z%)QHG+FEO};qj5Puw9Qr zD4kPl?ySCTc-f-2J>Z6^JR+~QyP3Tj|7aJxDDw*eodWFNg$bipIg|P|P|Z4r26Q=} zAq36RRL--;bkM#FISZB^%;i&pYrDHHMVZx0w)WV6|8iMgrG(VoW@~eJl_JT75+LH| zR$CVGtIY+QjTWF#0Su=2v#>W(_KuLS-u^}(4%YwKyXpRnBa`d>>}LQF{R8_#<`R+8 z>Dgb$ER#=AvUH{K7?0*=dqyG(^sr=h&J&GM`p^IMd=OE%i zs*WuSHtKYRiWDic@kj!{WBf2|cgn2r8ZGKBsVp{vpqNFxxE96K!5#oBW_g(X%~hPR z3JbFsXqmj`%}=iMvduNUH@$%xS~u0U9lcbX1^xv7*#nkrIJ8Oqy@!bwml-!E#o7ZB z@$W3GPZ8voedw|OtEXmhFGU~K&ggW7h!lyid4qcO=eu*=?TR?hAxO_ygP4h;fo1X|cgrbEvc&I@yB}Lb-HMW(`-SOnOV|#O8 zAvU}4KMy11%~vcGa-1J+9c(>L-);PL*x|3pk(yHX)%eu5+v#|g)Jkvr&vfjv(Al4H zjvl=fUBQ}j=+Oc}_c!rEU#s~zw9mIIvK`d*Qk4JfXBSQ@ZEDX|w5Fz>9d54lq}IAP zZyzo(Ub7pXHo$j3-Pz_?s?$qxAAcVga(;BOwRK{Cq*wPyz|HZ<=}b>U&&9>9C4Kb# zp~E`#l*V|-S?f6mc&Oz6s$9%I$WA*nl#wQg%W;xWK64vA0>--H`2PQ+lusY2f{V-(hnpmVe zeXfAJGVXq~uXn!n%PQ6Fe5+$&y7qYF^w;{Vzhd3#!C|(Z+wryo-FeTs;A!YWC|#|~ z>92}Zw*&C!1YP$xg#=v>4-}`*_rW73(?aKGg?eshJ4-8gj}O*59O&H7j&=*(Pv#Rj zgw9TuhUscger@Xso#OshOm#os^)EbdcR%0e(K|aj&Zcv#;ypczwK}S*J-whQ#8$AU--2@Llo}R3nbA2(q{JJii|4eqj;JD{N zsF&{C)%=XkipKqoEbY1L_L(Bnxs=06?7E_RrTbB9qWk;vj>L1UqXW9NDw6%pyT|Kw zBl|kbC#UWwvFvHGlXd5$67~8{si!>lc$4cjoBoADF6V0-spn@Hj93osv2|xfp(X2~ z_-_*}D$ck%D}(nE&#b2DXxD2`=fPL5xM%P^EOXyl?#u1brKvfZ8T_6DKA-zx_jUjHmnRQEYjkowaQ zqv+SZ7(u!vYX{bJ7V^0sMWb7rj`u@#wT;W^-D~0wMUGJU52`s^KAh~v?@^j>LNLZSEy>rbnEJNs~+FzyiMu&_-%!5?6Gx5>twP|f?QY!Z*+P_yt-feu=Vv{ zTwVQtp3h4X6hBRzR56uau-H4J-vjT11${Qp`F&;n=*G5Ae$W216|3nEUt(j|H{U#yWS6FU22WL`}PgzcHmqI2uL+69q}l!rY<(6 zCd#b+pfW~t9WlJ3al^dEt#Y@j^nTp^JwC6myH2d94-?3%bl%Iew56tM-&y*u-a>W* zoXjXNKDGJl)A30aVzVs^dkg;4PItui4>yi7|Jb~$l-6t6L))PhDLsaB_Ijko!2+T5 zUlxoWz`Fc-TKnRR#*zr-GZU>TleW2?qP>uEGSBUNeI?cA@2r>d4T zU+5?d?edquEpv0P+N}=iYsmXNeT8YidSc`QZ~8Rz7|P4G<9l;Nfy;f$N#8CD(K9E` z?Z^py^Rmgi&0z|U5(TCxscd1 znl3yVjs_O;(pjB5Uw(DX($hQ|?gEFJlhDZRvNT>xVftP&dh86xr;N>ds3ZINOR~s) zwUvWdtyZG;hP=rd+x06VHa&p@QrXq~S3sBrojXf!wjWBRjdoTUXm{r2{?>eH&t+aX zUcj}s-~S~RDGyg2Rx!6f(N!99qTO>!ajvAFZJf8=_$ z;-dSQ-F+R?y4bU4X0hcw3H-?)x+#vF;Wm``hckBfEBVU0Fv^}ri#g1uIme`PRg*L` zu8OlGl_Z_)9H_0{-%Pf)`NcHG=4zWLFhF}vXDszMi!KOML6H?%C&c>e*;`$D3QCUU z!JLq5h_a5&(z1Go zedg~cqGy_VEY3GO*NAgD#yg}v{`30p2O6fN$GuMD*SjV^>@3EM7K*K7GU$DE)Jb-{ zMWXQt?}zCVl02;634Y^sdrTGc)2fe7j0{XDQg9%5M`q^=oukG##!vydoMN6tv9w zWzvr9)q66js9%@_vNOu;Z;bQs%)l+B=Znjx_9R|sn>WOZp40Cy;D}mpx>;GUi=s=VT z!ib$Jd>#6^z~TF6%Re6AtJyudoOi=00?t>m(oAd6^JVed{fk5~d)#W0_OI)g%ueGS zWgdxGMFQM_Ykl^S@?xijaBy{CFvoue)vqZ3aqAPk3L=NmYw!7|lI1UK9pXBYk{^$$ zNy(6A@@g5|3hdhS27R^~-9dI?4`NWU56x>p@!G?R?41Q%ztl5Eh7oKpf7^R2JgAOi za23TG+1dNKILch0F-5hn-z;^_Ip>uLgy%UjJWDsBJ?54r6b-&;`(6-`?jNV}!!?Eh&M=pHYS<_R+lupgHG z`Yyn><-4!y55;~pPb)8# zI#hA-u6rU0;zL^J?6aePJ{EU^07Vv)wC-ix(m&ZPdi-IP0-dSk_4aP*TeJitVIE3o zc)oC!;+9!SG0L!Q6s{&dXY3TeUCb0}yS(m1z@toXqy5#)woEGC7fzEgJI2qwQyr6^ zhsLK&*J(4vdZZn%{Q|&riAzWtqrDQ`UbXOA^~;Fop2Ef|qfb&$ihRiTHHCqskJw~J zmBNh?1LALt?_}2W7BHITSJd>~pj@HQ<7tHMvrAT}@G{c$$B?U2%f$cv1deE}V~r$;;%yo= zNF4g8pYbqq=PrFa~eT$mGd`pVMBg~OJ8up%;Qdq+>p()8GGTu79hBUXVIlR0g zDvwqnS@nhhXSHw}B}Zi2;JcS3(1l8#e))n6+It?~SwVc7?)nlA3Do?qfJ!j&=2=b! zxSnb=u5Q@1mP1(y@pq$`F;oIKnk~pt8>gp^w(Bt|wE2v+mRt}eiO&n4dBHH#p`^_IQ2X?fEV#eQ1@AOYwD>xi+88&koxEJ~WaA?Ww(X)-ki|YMo&0}h}n2ozNXv}Oq zeXGEr?(T5$ACgk@H?|YAU+)fU{t4b`L^5o$+$L;&yZZ#l}}Ed~lB@+@YK<26UWhkwvo^VP|aRm{`qA!8^TOG2ln}8C8rC9%BwP8$imCJA`kxRDyndRU`h=sfbrf)epoliGH z*(Q)#d(S67=5OS$|JZK^_tCTUsj=vy3l7@B#2DW4SyWG5gHZEKj_MaQscBfwd za<_CPkPe-f14{?8ooCIUYYvpO`O5_Er~k--pJ+x>++g2$Q940=S z^`Epf96iT-rSkw9$} zCN&tCNJYiJJcbF8nro_O(*{URxefai7ZNsp zQl8AYv~Rqzv-=&*C%mD6Pp}l!FyA4y=^Oerom`CX2r%fGy2o5_w?g5J9D{`g6sh$~ zj#{GFOuDjWlbaS(1_iBYEX{;9Y2+|IoP#m>-c6>7$Kt$|uln5!clz2LvIJhG>6pj; z1@GEAFF~^vcYd*77>8gGe&Mxl%g2w>R&#^#M;u6;vIKh1?u^pyKZN_p2{YDI@dxuL zhreQ_WcSb?$9_WsWXFXm88YnyN;VkyK~64%T$*F z!gY|Ra9Ud?@=3}kY0Fg|r&rp0BBHVT$#?vZzP)SFD<6S{_x@Pu!x&zurN+1VmNVR3 zF)4r8OIK{G(B~-?70Nzvig5?0(X|g!=XenNR>I&^-?uEqgtT+_|SE+&2a;Mc3QxL^gHqOOkRImJ9 zVCHQ~F+}?G>oSRDnojltLLFKC7ceER}4QIhJRyy}M{w~v&CSZh}vKhs)%)(FjyY8!NsF!4L&>%2I*Vrt30 z^wP%S2Qt32LOi1xHX*F3y=>$8hxV;9w%gw@{Qt4gxdr@^&0CJ*?Rk!|fc7|y#q*Z?t8C(v-#xS2Gj zeUl`(ih7U6=Pd3GL|3x1$wB|4ioJOCG{JE7l_xh`A};MMcrv1C1xVaEW_(GGAt(yq zbc>d=I)2IHec=PH1~)8*8T8zYoL9W4jmOo>5A|(G+!OU4N1rjNT_Ml_W9J$+2pN8tL7I5VILAMDSQAsIqxt z1-?2w216yL(e%4@Rxf2Dtuqrg!|PtvQP9?G_ixuOdlY%8;w`+oSG}`vWj-mO)`h2^ z;07xDzH&G_-P_=n$d!u|R4Q~U&!()BWibYs^8<$OMH-(DC zcv$D?%AS{ZryyfZy~z6DU(M^587jD!Vm3V8aHn*|dKJWwH3*occczcRcFmuKhEwNv zb=C*|O@<#b{7%dDB6uCsbV%1ioRhu^wwb~&bkzGB+ThV+IvsP+*R^_J?l?Y0JE%&% z_m`*Hyg^#rW9;o-fWe>PR$Ba|$J`G^xhgsGnq6}>?#9W4Eb|o1@Mk?B% zOiMkxT|->H2bnBDfrud%emr<9A$@AfT(*wH9piVMcku~}?EB2mQo(=ep)vte`zufE zY0Owp9k0GUZJw&FTCM=g`f~$W;&Ah^?fa`K+wgRNEu(g!`y>3UM$? zdrMIPi4*+a$rPZsz8U{{=WtrIdg$mvrw-3?`Re926ZyDoBDJ)WM`+1{-yii6stYvT zFx{}d{YbR!%c3Uu%nuc|-QVX?oK@h$<&!Z2O z^^AI7yT_oZP1k-b{$5!_sF*7Hs&$&cSqg=yg2Xf#UF3LjiWZpu=$ZXV54>rwVJ$T> z-THfMwSO-rVsLp|j=_za2x>~ALIn#Bvf##}aGcURZ?V>N96u0kblMljK~|-4|kPZ<_1XLNxVEYyK4O*Y!^Fi@-AU9cprFf)lDWR*`$Tj`UX8+sD4TxqgVF*jwoWfXM?vEPz6y%B zz$auD#32>m)M2FXQb9p6cp2hf_IJPvoFR8A@!FYC3fDnyaFaetStV&dTpCqBT5PI~ z-z(A`C@8GYE0rDBI@&g201|6uA&nhK8vos~9N-7Gj^16(gS^_*Rj3o32p|oTtayp=YO`{M)hCqOX9w@YO&* z4d|*2E`@swvPAS6+8vLe6eEb%4Dhs|SujvB3=*T$%5mAI9BHmsGr~vU{^CM(zG-~a zTY%>X`Pj~kCmT{6#Q1;t$`dP9BX9r+=@&-nIz3ny;B%YWKe;Ap=>eU_)0;f;hSL6E ziqy~4%&*pAAF(MYK>3msW4Q(ja)*Hu<}Co(x!z^a znHrhq&kSYxDwqlWGu9R3wSxC$K)vYa=BZ6X^`1^(8Id8;Hk4EnWav78PniBBhZ>j* zGC*RPq0mND@Vl*o*LpXk8)csYMI-t6L#bQwC)Ln>e^e|SZT(2uC7lc&x7FGMNn?8< zX>xZ!kH?>jR+ra69YI2e;$s!r$3z!hq*8U<+zyJe{Dj8~OsEuBNL?8^0FTgCZhxU7 z-nNLDxAePdnhpL#REo4z)=)C;HA_`Xuq`Go zNU2^q<)R{{0(f$IHPm?+XysvZLhQ97heEbCL+vQ?jD$`+` z`O4PsD}R|Bq&CW%DEr1DIc@ZVRiZUMA9XZZG@bxM{c9f*L#IovgSqmTgFhXOetIDw zaNRT%PyVtEQrx_P>oeF7nbp4w*a7PbBBndM$pIjxlC+>FV>QuJ(&^f3fLx)+Hjrvn z8&r7NE!PwLiF(gfYLPsJVf6Qq;JWozSQvq6hPp%cKh8_PnM1X=Q=`g<<2$>19hBAe zoqMNp3@33bkd$#`pM!Y(*{MZz?o%SHHNIgwXgTz&71Cy9M*nKFjT2BA*AZX)t~XG9 zCze!RDQw!Qd&*KN=`dRH7W)CDB9g9A_i@nQo;6@a|fN-x{2c?MS(92h3!S^d1bH=LC%X ziX4J-(}0cYa7%gy3|0tpbUl&)zGq}sSvvmhz?$A>Tk8i_|3pd9_rQ<=|8Ti19*k`< zh&;8{J~7V;R~NWIt$k3Gdl80f7roG#Jv0Tfo_y+J^JPPsSK5&Z6r;QOdJ=X`GN6b- z|JEze9z|`a=V{HdRU7VDCObcLIR_7y;b6#Ej-#7gFeP+PhVC@%n_P8@$=y=_>?>%t zd7W(3E!|ta1XAsat^Dcb<=}Quc=hCWcwuZ{EmM8MaMUfH4B^ZYX_VU6HsC5XpS@oO*; zM^ADlQ&|@nyP`~E0BbymmN7t}a7!w3u(Nzm@A3#kgf7_^s0tsKbRD*Kw6WtoBZ{Y( z5&8&S?;(N1i*2nB9KlD_d&xe6b8u7Ak^$OmdZ3}CD%R0l2;DEDXm025N2i8?{d=A1 zd9+>icPHFV^0~(^(xy(gY@YpK_+6}o>!sshpH&Iq;!WHpW+|9T>$9#)N!5cT&94~* zfvf_ZW;cQt?f`7zk`lCIRAB7~YQUifP{lIiJC&D_!n^8Pth#w`2g!`nbn4{o09SaC z?7Q;xU-HUJ0K1~b=IuV+r4Jh$UEkUF8$_Lxl2>n{?T-RCs2C3=RQna=uV(Nc0o^Ln zJD4hi4zv6794xIe2c}PgZL#nP9x8`-KRk3K^dcQJB20qIhB^UMJ33!9h*^ESC|w92 z{ah}oU9x)M%S^qZ>sR-P^uAuJ1)Lnx4@{lx!R=Kkp0F@zch%UeN_OYG+06LP?>}kY?OU)8RSgRh zq+Y@$LocZ-9c93NF%}0bJ0%kUmpw%fo6TxBMD2rDo?(T8At22hBf(_H%`&Uc-+Y;z zz*?(%^APM9mjYrXAF|xJA=Ne^$f=JmSYTF3D-bDiBhxF&hiKvDMwcXNWPiIP`f#7H zaN_>j_Z($|I*m(O6!X{(gj(eik|(Z~`2(%b7@IJBR$qWMl22eZ{T%{VZ!6;j*Jg+C)eQ6ax!!y_~DBYk$_zp`++-oZm&E2yNg!n%Qy>kVDclMcfc z_TybyQK2`KDdhTTq&~$wJNE!i;a^rv8cJs=hTC;;27}*rnx%1I&i=8Kz3t(b!f>lM zj!6KEn>|Aj$Fx({y%?LD0#$`cO};ZhX!?l&7Cbt;zYsx2YYhvQ)m-n*jZIwPPvI}^ z)hG*iSS#e=r3p)~tnz|LKHkP&pc}NK$H+Xc!r7k=z~XF zts-Y~#6)ZwVG`c`5(h>dd6SwFna0VXlj_-mt)q0$bdli$!Qab~@FF&+kz>&lq`%rG zJGw}Rf2rH%FLf@XzHOdjaAz$>d5EY!El#fWz(*3ppL+#KhX)ZYaW#Nw0&CcCa?xKA z*fr+DSqZSVxS9dR7poW}j<*;cGU*vRFs>!2xS8;Y)jXTV(wGba*%EG{IIUrCiz+ie zc#hw85A~J+$s&$q&*;HMb;|C)qc`-b-SFZRBVA$-%VB{bjYEa%6=fd17>)J{lH;RS zZSM*to`LHI%6)1#dX0h1TD(JoG~yiJEl%(t7Q4wa-AZq$!i3J40ZTtwTU^?}4e;Wu z^Ea4@zVy2uQs`*I*vQP2?l=)~O**c;^<8sAfEQo6XOn)R)&E9{(8hUS!k)2@3E%#t z#tlA+3=iWJai7OP4q^+ptd_kjLDbL+=)Zo-LZi_9)#X;VN+rCWp_D0-|O}%%#%!sf}23MBC@3M3zozlIAN14nJX3J3I8Pv1T@mCRfk(6BbC^;iHxyHn&{| zN&4+;DlZtqI1v%n3|Mg7s6ae8xveuklEtUOH-etPgE+C56`x*A+~Fk^mr=jJ;0!eNoTC8<IjJx0hVc#69t9DJ z0ia>tt&hsI%Kkv54+Xl%B7Tn@1vAvGO3(+OaNw$sOVh&j05H2}Ou7(5g;Z-~Yp9NB zPy9PAKoD*Mg{n7Zu=JH+B6x3HtlKLrQ@P$@ z9*-96Ngho3`xt4Q&M&Q6l#bG{SLEVtANAXAr7ud1Vx-aMe=yk8TBRYQR=w>FLN!T} z{7n~xS6t+LrlO*-pI7H5y`iYlgIqN93%zO(N6mKtSriaMebfu0L>g@7>TxyM8VAt2 z8+JxDzsxS|@{}XY;S_1fkZSQI23-`|3XpIrf!!8&nKW^Qz$1wFn|tSmd|$wIRC~rO zpX#R#4>KAJ+dS7@461siK2cg!`&h-m{*(wy^N+NP{(;Wpa2F)WhzPvU*)~}`m4~4^ zY2Awxql&OS!Oa{czjt(nzMY9=4(7yaxGkSE>_2IwZae$>Yjb;amRpgfT*$35runE0 zVPi!Oe>G(1WAiay-vOPr2yF3k77?=U3JbWD#wc*bv+S-rw$1E{LVF578<_IiRnNZ~g+gdWmNUTE`BC z`UH|S%72O=ZY#QUs)B5blJ@t9>E6|4+|(+e-8Hqtf;H5GhdAzKE&6ycs1B7UTTa6K z7{b47Jon&4cv&;lP}aw(Pb4V!rnbO{Ux$hT#Mj5wY)M7RoD6QPM_MT*4{*ju+iW)r z-59KBE7}{(z5{NW;^HCqY{D-!!u$VF7$?W+B{shxf+KU*FwXQ!WvghI-v#&o_T{?0 znL0n_ij1$sc(s*2lGPq3A_A!F>CAihG#%hFBQ!R8ev0@ph{;_vw<`;1BFzV0K?GG+ zpvQL>ZqciPs*d;wzHUWHh<9kq85{NYyHX()?yg_K7~sQPe0H?_1S<&Pq#4Md`n2}f zGyw*c-($<#K#Z0Q{1)FGUC>KMbA`wkdoyE zwGy}|KT0Wd=)1;JpfOMd#L^#|G)}~OYX;Zb!l1$X!0;}e0WY>a zxZH!-9xbbzlG0WIf_>oYxXg4e-7}Rrq~Xrz@<=HwoC+5<4CpST;x<|uU&^9JQIUN) z6vTx`-h@;3J9`GbS(40#h?N8b$+D=3EAn^Boze}#%hSu?03z!4Fa>ru;$M^r$3s_O z*yHy*Py#<4&$Fa9XdRq+Q7BG$BwfmZbQ?k%BZxFdKklui_&kMzFEat(l?&!C%;U27 zTHIZk(S%!{+jXhlbp-}kKalpW2hr8!%feZCF8r?8n8=-PzmK4UeRGQln_9X5rdgHC zZy=ojITX@ugDzxTiBnQ!|4Llts!Xj|rcJd|nLzAh1qqCv3Z7FS;ujzogB@SIwZ?52 z_GUZke;WM>gP6z|2FSVc^)@wf7`$Y^O4Eb*s=xwnJaS12JmSdUZBtr>QE9T2oBbQi z0X=t&_~P=lodpm2$Vc~YwZ&0Xu zo6``#=X(sSRi;Io#?&j$K;}~zJ>{Mq`E?Qh+ve!jY_u@ejpj7;ax*7KEn{Ast5t8E zHFJv?Civ!oY6g%38^qKU8M`8eSJ~0Py1ltc9F?S!T_}S2f8cPGPEJfsSUd=$CPemN zT#)q1o`T8?Q*fxD%V;oslv**>I9+~sqqit5B(bEpYHjBUW0--|-25>WN-hAUEwzCI zNHGv-oHXXE;Dwz2;#3Yt(a+^fvV016^!eB#WB9M@Cyh-dm370`^S_DTn5Kb&UVOl2 zKK&+TxAMDY{sgi1xr9~sym!dj z9+rK0XwaeV5W!TpyMqpf0gZmxfeR!L*woZ@amA;yCeYr$-?`>Q`Ml7p6rc zw%|X46KMsw)oBCBU$dA!)I(^YIc&ZfTeIDnwu{ za)>%HTcB?powJnA5je^k}xEw7wW0FSQa~+skqQmxF$v1llW>4 zhcLj$#j!v;q4HY9xgfzGMF<63fYUdHF|b_F1u#dP9Im23+b!AvW3w2_{+C#XryqL} zUv(A4LmKs81qz)6u9jhk%yZkNx{i{|2}9(LD^%nBzwa062uNr8CI+0a7zg9RY5fVc z0cUcZybLjq=4YPQHqOIAUZo0t&4q#{7+?&2XEH7+u3WRdjRA*-TIhv<+R+6=(rFCH z-^D!Wc$7CTjE#Ux6*cPPVz#SDmYila0ZQhJfH4WAF`o8F)d)g-|BbVxwY~8E$}PG` zMz@c*IJ22>kb)Tz1}x38Bo(d$NsVS#ikU@P;W}FvJx!S=tjmWBncb-nkkR>vb6IAqp0_uiGZH~ zV8tiG2Xk&=u8Vg2Y(M5L?1e=%le-|^9~SXL+ZubPRxe_x(G4%OKn*33=P?SvZdvwl zn##Q;HC={;qEE?dfTJxBT$y#}XZ^x}{NuZn!iK&V9Sr&}0q$qJ0LHoTwYFaJ@Be#F z3P8B;g#q)>>ca^Mi%#9c!8e4NR#$ZFQ{`Af;MwJ^#Dx8Pa5n3{fDMwc^!LYRP(lBM zfM8tMI2R)~8xyc>X!+q51x>Odb~pjaSz;5~P~# zCl~}VAzlo))Bnb6VS5~BI?{NNVE}PK*XnMUq%tKy4YTk%jlp*)TlfJ?w8&_G+nj{# z}LbN-b%@h~vl{3Y*!1q0VhVlXHl5|3 zd2*T?dc^T6mhM;ncsPNR-3BK+#Xzdfyql-JGtA}m0-t+_Sj4l1X-UQ+K}RZ;5D@l| zldz%Jlz_16J}lt{rm*3jLh4U+ww(2ZRax>^z?Y3}@q2@W(F8|VzMVbBGX1!ydMzjc zq^yn?huX<6P1sQ7F&Ii}9)Nceuz+^z#Q>`YqsJHYPs%DIEG8Z*=?T&nqZVfU;x*o% z5k4#r{oSA+D_9}>Rsm-tTa`q=L89AOk8(uoI4+tcf;r>+7|yMu_g`$VW6uMd#<76$d1h_C@In4 zPx0~$@*QyZxPp><>uW545oXZsG=z=JQWF#)VrHeGq-LcH=y`XL-4%LEDz^lV&B%Bx z8^$RfD+t)E@)8#pAZ+&bea;ICnj(T04lRHelR9rLrZvZ**9{xHO?m+5`)?qxt2ywz z6J*X14K;H;fi@iY?M*3inc8QKZn&n4@8(=svCvL%sRl~iJPy#C+J<04;r$W@4PZ(o zErxOF>M2h-n46mHS5Y#%7ko`!#?hwKM@M4N8#VayVG0faE${y#+5AQzgmo6dOTPSH zV%$=EptQ7`j|ECF3n5_kptJ!}Rd;3WBr&=?@QxfZ_zyx`hp8=oGor=bq{8TM7eRmL?*tDcQ88 zu4jTxty&s_6<_=n-JAcHW;LIA1`$M$c4AK|dS8sV%6Kp?bcF=oiKw#ZFwD-)1U@h3 z6%*HFZCX~hk^+=5-3Uv7qW!?6cDm^>{rv*CP8?ttb!yAqs}$DoP6YJAQ*{12X}hC5 z`~qtIVcbUjn{P@Y$LacA9z$oNR_8efke*(|O(?FtG>wDz|B5!L0t+T^`gDn#f(hfI z3kpv&(rS(!A*|sx^|NKXq>V%}ye`^1bjeH3&9jNDz+^r`Z+alV z8jzjPsoYZ?GnelF@n0p&FuKR^-&opJoxQ|K5O*=%OBa!lOdH;bl?&`p6l z*wur9F?2+a4`wHuH`vm|_b5dT^=U*y#tU{Sy4~gJ)5^(`i8x`gp34-basj5=7fhrp z(5r;cZ$juafwo;N_ZiYb0aCCr<>O0P{FTwzcmnc|slgKuP{S!crMughhG3ge=%D~k zH9YZu&8Me@^s1ELl5Hw@7j7cm5f`rNf>^5C0ofZz(FdgrEQn>90RHJZFfaK&yilS|r03w8XIeji zi|n_d^a@fP_r?_m^NC2mh5<}qBT}WOmB~*H=*1M77XBmK=QG*(z`4v}ZAxJ_l-{79 z+Tv)=cZ0oy5YgVSTW>hj;M`zKnPx_V{pfS&AOvPwlIOiqIIj+r@AdX_X|rCOs@4JU zkF5nj>`^C%=`!sF`lnh=Fr@o*$Z)}q_y)JaOHyiz%w3VDqy6)3JL6{sD}2Ps{eiDn z9@J%TEC?l4kSkp!Ogm+}(;rmMOk_juK8=CQB=*kYpGb5kpg~@hUUH@rlTe8mRasXK zQ;wP@@s=Za@Q{JAAzZ}x4h;DswE8nKHNyXV?H0FQF)P>(Dj(piR8HIpfx%%$$vF<*#~?x`Wc)B2u4+SIPI z-GYNzy*j$~Tsj-R@i`*yxPI&2lj@Vgt3=d@2iurg$KwZk*!s5_qc?PjsicR_n!(xh z)T1_*+_bzlaxf%XH+`A)TQFg&_mBNB^<_4LZ`JR(z5Q;XuE<*AZk@qJ`9?dW*a1&l zMmqOUYHuvntks2@woMJilyUkrta{uN6<}|2fm#eFw_s)4(T>2xM23X ztz|s-_2nMMKg_8@*_#|8wi1k?vMDt}fB^3$+BrLK$G#OVxha4!Wnxaa`&*aLl;XET z6BRd^3nM=FRRcWCE)AIJ54VF7(lkVKYKLL(&U-xW#EI^ouIk%*kCuXrNA+H>Lcev} zKyU?jf1b^?H&1GM11Feig>$|He65ReRL}3U@SomT++-72o}dKWcKCJDcnK;e`Pvu3 zTtaXa`93^58_tsHjf%+SiW-&*_9RIN$k?li6k$a4?LH*1m~)((e9NhrZp5@L6C!3G`Jwv;uR3f@2+VJrtpV7gFs_M zZEpL=CGlemq6Bumw1((zQeGG^}YRkXTqomzYbm%O?peR0Ki63S<*c&0K% zWWtOMsWUKi+6B`Q&A~8Jr#>unkeF`Mc8uf6YrRo3!#pgd>(-&?qwxe#qLO)_@}+<` zA=^3nE)sOrAV-+%8jQNERf|R2JmcH_tK2oFD>%4aS>^9+^wLfp%E>+cOc4C3zDqaq z+x@oXj*y^_pz$j8t{KkOaAbM)pEuGN#NcMHo_2i7OYIDs-|EoC6O!@2?b*=Y3ZzN zIb^^V5iRP|daNC%|d*fj1Z|)8`pI&lM6noy@d@&oGp>I z*?M1BOcsU$wMoe!1&kt;)oR_JE}bOPw5j=IdR=rR`8`wyF=C|-9*IIDvaRg}RMZ{+^+U9$yC^FAIG*W^@-!#I>7*X&F1e=gO^PS4n|(R|OC z>0lN=3{K<`H0JN$BTMia2Er6!E^gt#Z!F14tj9L3*5JphoSCT8_u4u;AH2umz6$>z zgib-&qNU(w9x=V(1;Ixyy6rw$lxylDStabL?leDzZY%{!(8fOU%!-;wd&A_MpLoiV zBCHx7PQe{PCa)L|=!J;BSL#(RRzg6LS{j@P7Ch#!VX4g>V*Qi2Woj_STfKV1Hc zUfp=($M6{wEbpxGaScV$EESdUkn6~Z2vGIO@6i&Tg9^z{Z6kbsP;Q=XA0~m~I7o+DUhR{~5monBBbX8<~DAM_ZBwW>M%llUPa( zC4*`}em28E*G8WL?xd}*XGPoL8)^GI4(E2J4>FA}3T!_Mlwj+1i%8_;L1(Mw-ZV!@ zI#-_`@-qw^H%R^fpU>N`dfE9?D*JoT%afairx@`n5poU{{yl|3@yH)P$_M;{m{zFT zcA~EB+KD%>l*<08z@g&eQ?Piz(Lm@SH@M2i&?d!u63^2HI2oxUSkrmqyeYgJ)joSf zMvPQ(VT|P*n0%Qe8-@^*UlNgsup>q}fwSGJpy)IvJITQU(CjJ=y2xBiWLS7aD!=Qk z!qHAer4~7G)t^!($luoICSq8~-+?vmA_Hq{eN*H*1JA@&w9~?)Or6>vfB0y?7x|N) z3ZUYA?Se-I=-R=uodqu5eAdYq5y}G2luUgA(ANtVh|jpbpo86R8yc%7vT@#f*bfhy;CQpAfE`3J zy@Cyrwb}hhzgziXD`HugIWPZhyy#wu`zWRZ zaz)~JG7CRXhz6D~*Pi(WMY*WYrhjc435S*BysRJ9_M=H|xU*nxOmk1=q=BN|*8KX$ z1DJ$oCA@=xN}2!=)4k~4ehdjOA#DOG0>KFkKuDmL zzBR#!)yFx}UTY$$U#6#vt)t^Cd_Q};Bxm9E=$Zu<>=!|cRWU5<(dX&!zH$z=pG`30 z12T4!AE20?9mk^SZUS3l$;RMm>n2aXTOK}ObiT(_MS2?nv;Lh^q{mjLB^{KeMIUA@ z?Ag4>EmegmY16`=F9_&Yl?2yu!{p-4WX1z=0Ng3-FW`PCPvsZXf0*gX0NVRK?ma^c zj~tl0Jl?&`0}^_Dr@l9*({n`kD*NDahgx;5m{bTsf3Yn7@dNyasCGG3r?Bv-3#`|f z3QLH7ohZegF7rpTu-k!T3B76n$2t8#;NF^}Unff{JIpe!FFq&;087^g0PB*M98dY? zR}NIWtfWHAKL9=afgMk_dejsb{hu~>WIV<6o`;-6`DPDq7=lZFiQnSiA+_F_ zN4A#X6?F6DT$mn!3SPE=m9P=8p(J9=HipY8h8{2tYYa_#)j?c zcvoho58GuMbn*o9kV<^?oi6}WhI@A9bBu3)$9!A5BZTcv$eS`U$bLVFzYfLCA#Uak zl%>6G4T(oa#?ZSosBwac~FPMvJI$B>u2+|AR=B%GD;_j^K@+u&hOHa$z`T9U0 z{{nXbIX$1s(4zTxN)mH<#W}GqTa{s>RjUHzDrDaOlKQ}Bd7}hgct;(<5luGt-xE>q zrleS)1?yChzMAsbmZaH<-d)?XU=@k7j6A&sm9J?>l#o&#$bR516G4hgu=lIw0O+P2 z5F@DZc)Xz0gY?LpnY$rpzxh+waWxXqRs>G$$Q9QcjI!yEFxzA;Z+#vQ49@oNtTg2^ z`)>n)yOE!7vaj3p#*V_xB(2g!cD7`bfhAP3tgI}#ti50D zs95$@q}w;5u2o>iZTHEl`xOb-g*r-dpN|vujU(;)<(m1&dP7%Z2Oc2&8{XXAeSxQW zmNazm2@NvFA<-PO_gKCA8|I{}yyEs01Q{Q+_w!<3ex%~sPciNp(-L+TOs&C!Dq9{8 zBtOtM5nvKJDqeVC@g7;FB5?^wyxpE~*7pCBsiJsD4fxIIz2){#ysDIs;&so83KqDd z6C8ka`_Iu=Qzlzl*4ry6Qf^@@Hq{o3s|p6VumO3G>EMDqT3N?;qzSjy!;80CtM)9mDWnN%}v=14p6t4K<ps$I0~eMqa>1pvkCTVS zG?v*puuk_8d}QvC2PRwju!5712|T45Oe)c$`+AS1Ni-4KzcO>TBHXWUAq+BxDi1^8 zYwoWVxDkc~gOx67-N7*W%|Rspk{am&GFWO9PDH*OVSDPJ*3klixrXIg&W z@fNj@Z~Q>NSinn?y>~WziM{yd;i~c9fdQ-X;s++Gck4YWm%Kav63UzArt(O;?D3|u zi~xU8x0;2e(@%J(ViixI^{o7ZE)!JhY!_qamyVp&8~K@jx&$DXbHeJ1o!tiZY`5pr z+wC=mhY$C$Bg89jz3PqJrT5HAm<@&nU*uC2q-U`)D?yskFzKrDG#yQOBs0>_q;RS3 zX!@}=ZRt0zMhh2yAh+k{m3@K`u(@SDUO|z1>*F0UY@~^vWk`2%Fz%*(ju9fkvf1dS z@5ph2yPg8xHf$rA=`zCJ**V*wRyEetSy9MweOBf)x7Ieht--kVvwzF`p4!(5PkN@_>~THI>XVhO z$#*xDHnLM}eL{wQa*B=o;4^Mb${a~sC8kn3#YypS7m)czQrRV?X-zq3qN?K*0=3Bo z6t{bWnM^C5g5K1!C$t2V=)Lbctohbc8h{%NZ3xPtl z;hsw4DUc%qL}?YfE+2#Mb&Rr_xf|6OHPffV0{B-?b?B`?Wr2XwqGuMNqH8wQCXoOd zV~32gO`dSBLR=0@bWr+en?;{W2EuBli<}B-JVz^66;rQhPcc?C?)cVb@-AA~PF$Zb zRpKEgYiXPO(YJ#fhj&Kf{Y;`3Ufl`cUnPEbYUe7v$&(>rR)0F5S(Gq$h!wv()vH;kruxCxZ)V52C4(p{Tx^V^mu*e?l)@s!?VrvS(u zRq76Oq$Tt%p(wV`wRvg4NwJmDfKXo-I1zOU_BLE5y;d%>T=K=}b2)jHn%@ZrL3_23 za5r7nK~1js6iWzMXQWka0>ot+Nu$@BE9(JLGW-ycvTgwL8&y^1R= zi12)7lwJ4dLQ2$!AC$Jy>e!%~wy>?-ktAwZOm`DPw}d2BQ~ZLcnw_Z2TLeZ^sz3_P zxA47jT`N<%h^AnhTM8<?w*Ym@N+be#S;z z?R2SZs1(SM1%#8*5`gw{Q(?1p)34%+hG;buWZRo)%O(M97uxLfDcYy;vY8SYrApN|shnv0;?!4p`Q-kHifxbp}Qdb>^E_#JJy#u z+i5cBnlNrU!4|Z&V)a~6hX65RxUKl(cHtN5oskXgZt-BBjH2kfkyBJ8A0qUGcN_?n!I9xT997CrSN1aI*3X91c=F* z!dwivXToJ;h6pvC<&(4Y(DE`gzLCZWg5uGQye+jcLcmR&&wxGH%)i3GprbtH=7b8+ zi(JjD046_$3NYD$#&&f|dx*0K`#3M_v3kGbRDK2R zfW214_8Cah+=nZ53A5Auz$SXN#rzo|2wpEA=JQ53A?) zj<#F$xeFl*GKo_E%FlqyNGo1NbTr9|mawH^kYL_%w=qxy|5e`I4*iGU?BtW+DJ7y| zXK0X^7%9!zULlwvT$XH*E$YrIM{_%8(=lpOPjmzq2wT?QzMl(B-N5|)j|P2TY;sqJnXxRAU4j|k_9hr9&HLNFzb&6WTAa_}; zLx01Eca6g;9A2kScC^o%&cbX{&UjGunujmL|+%_8e5@cM$D&svj@)ks^3&+vhIEJ=e~7nSsZfN^2TE6 z#5yGL37U#(&GS{%yHF~U2KV!5+ua${dOhb()T+bkrLKI*UhmkG>lw?gQA$lm70Na< z33n`6)P1-yZ_91Fj|Q1O^U=mULmJ>Q>O83R;Ba~Yrr0E2al%0Fw zkV`Dyz2$Q)hq_2j-fHz5xz76F3=4ya8oCxD8pp*&LHfqG_n9uLr!HrRaqam>24|P- zyCw$L&E05BLNj_yoYlR```i83sSm^~-5iS*7`RwhnTN`FKs&H-<={2&mefstj2{fn zepu*%j^Rjm1I4l$W#%-gM_@No@gT#Vv(lUE+S%kY&sN`ls9f(^c|VA+>w#Gz*)~0u zqHV~PR!bagRf}c?5Zp+L;VJ=dKzJ21S_zyR!>Ls63O-`%GBQG{%f8j<{Q2XRCK@_k z8GvqD)c#eK&hm?CD5|6X7FB|zP5FVj#&g`!9NmH}Djzg;`XtoCWm4!4&~a0uV0jY1 zkI1+I$q9Iz^wvkIijg3K?dp?ebWDmN9H;XT%PmI4h2&9ao>sE31-D48?7sKqroYNY z!s?DcPs<<=O;)*uZ%eC5_%Q7%gU@=2qIz5qARZ9J4m|wJz|C7!sh{G!u<<>X>dgL2 z4S*9c2gFM~LZCHyDcb|W!Fpo{yt^=pL?BTrmzZh;T=x7`w?^t&< z?2#*r33dlqKnPIbe&;ofZwm=g-U-ktzb`1Pp+0*zCaT{oHP%an-^LQzZ^bFWdTEi9 z{zo%FFJZuZ)n2z^q*phXUMp*M(CUmVXeJNkz8`d1*6CcOPrmz9rI)?)%wa_tkDz`( zO$lPb@8;G0hK~QiZ{rET@3wfr@03N*mWUb1PSu+Ga7!|;8eMQFrIA>>!c`!xTa!#2 z@T$pA?*_Wt_A6GP_adzl6GK+{wn0-)zUKP0(_v)Iv!$W^TCigk-}-2XqQp7*V$*I4 zGJGcdF@Cbm#X}){i9qI*+N`R{aai)u%*@2jE%;h<%Y~KKb{5G}qLfubNe1B;@Z^u!W`2ToVIDOHSb1R`$Z$6_hFh|)p zfP{OpxiPb%Jp@P@8Wiv*Pv37b$}a9KCfaWRvASXlK>n4$j?lPL9<1OOFcXpBU1qE) z*YRZ|82VZfI4ewf&wgjs$cM`ok=(FXo zn{Cw*6O+_ghIL-R$>3b-C~o<67ApTPpX#w|% zd|Y(UdkO~OJb8ZHjT_Z_@ZGGUoV;QlHuluGzuGLL{Td(D3#gqHuQ+7+10R-6kYbk^ z2*ZJ!0v$D(mG|ieT**%8Rg>71cV}vIJ``%Nv!oi_B%@}*q5~qxxIVj6XX-{8+QN6> zYt4Y@GYyqvlNa|DIgoH7p2K{!1LySwnEA}o_pWlv14nuz!T%i&**ybbHcLri)EGA_ zrrqI<{@S%2Ng!Uw@r!eQ-Spq+kKYe4Z$KEYkd;D(+>gzplmZFj9Ee%iK->sqAwkBo z(hUTJO+%>`7QiF&@WLa;3H_l91I6;>IC7!0$;2v_F&i|+{Ta5}Tr^kh0JBIxf1u*T zPub-fWeeNPK~DQ3jkbxr!%;|zsiYD4GEN3wXSZ5h?XUh75ZIOE^|Fglhxj|sP@h{0 z4xdR9|MG(`J30@;gO(ro&MQOnarK{-(tn5BXYoaM4NE1ork!#Y9*75#J{QJIMcf${ zx7Q(Az;`xb2P#v|bdeHI-kgs`!FC?&ln!?VZu6jBN-dP+i{hC1b1DlRZ4f8ES28$s+9y z34^xEf0OrOei(5WA`!0JH$`)jj7N8MU*L{OnA^GuntPBRDf_*r`@Of{)gT}R--6-R zl(5Z%cy4OM&KUNyZy7J|{|*D}umOq}g>q5ouT=9!XPB4Q?@G|OtbW<9vI>mV2IrKH zhL16PDK=`<2-%#o)k{wj0+c7HBLh2^B;(U<<4W5hjXXp+JcK`hnCoQXu67uSapk`5256%;l!CB%7Dj%upwTSi{Vjcq&?6WzX^mXMiUumrmv zik*e)v8Uio5+x=V1viMZFsrgr4W!=KDr}&rth8$ffYynRXSE!^4Qsm4VCVs~Ri-3@ z@Ih)@IH+DND}{CTX25B4-E@89p}xg@(|_9Ccpy4>`2A(mR>kqNx(RI*p1dMp`iCx| zKhJH(UixX2o%);yoUz%j(mG8#^&*!u3m}3@Xx0kf0lbfT?Axt1&~Pq@sR@43#1fce z0MNFg#Z`WtUc0hwkQ=*FN9*^ZEIAuxM_<@;cm9a2^7|!1LGXWR_NL8=s4Zz_fqWAC z-e!MiS@xqAOM5;*R>L5Dzx{f_fzp7u_Q___lV)jnwXin4*X6lR|28DxrNS%&clm2of8Q`*&6u)8w8!5&Yn5wfop zTbvTe09$fQnb&1A_Qqe7r(@cIp83uqGa?&UGa|QU8^E)@%~^l^xwRout#v&If$|jr zNwWxWT#N1M{_0t9ITUC8lg9IR9-s=5{J+*v1-FW@USNvn2341=eo1wKft@M*p@jHG zZhq*_^6~E-LU8TfCE#s#eGRPQfQAt#$khC2OKLiB=F2t0_NRa<(|8m!WP}&}ULB*cCe07G~Q%}VZ;Ozdzc7^Mm|J%U=ti(atP34F!q8M3o%1`}x1-)TijwwR&lWB#4Z<5`AM=?VO*t&E6nDcZ ze}MivOBNs=dsDS0p+_`he0Volhb$xU>v>xfHv#a;W1{Qt6EDq&)U_*>o57?4$j`ib z5%SRY*)jiHWb>YFh=7zDW_d0V?+R~jpHWZhIegp*>0-z7J>Sqzn$Yj5;R}MEbaNp3 zQL~fdWzEtJAhR_hD7ifEfv>kdKWNXj029d2SaZ}$A6nUckfLQtXmDGm)q(tZ{$M4D zjn3-bBE+@p5YH|xoRzv)^VTzO%Q&)I%%RT5*MIh&5KQ^rmxmAtOi66bQN@{Wa`F`n zeh#c)pLsbv9@$*KwCi<3Wmz=Lb3DH&WBL~h4|AiVMm#oj% zR#V0T$4foIh@~jSBy^9RVlb((MxPOn6cg;Tv?zF1kMgOsf z&>yIYBdJvVV*q-+I4?@p@)DxgnL-<<`240cKzfJ>Ao8FzBGw-m&241IUgTrETn%VE z%0WO}BpMJ0tk=ta9<0U4KO`_o#Cm6gMXC8!SsDj?#c%M_FrFqU}Dw> zt+pS;N^IQ+J^N4Z~QdiTXT&ks?}k=fL1Mqs#n##TZ4s5^jsm zHH%X>Lh2H+w4;i@6nabshx34@SGBBE_VTB8i|`aRn-3Zp%X|84OMDj0^=A$rGUj_D z6fMskE$kad8hSS~=6{Z)fyX?ia%XSng%7+Wvjn;|}3(yW+D;kOWIqeh9=;E>$uC}?Dcw-%N;gKno z`3MVCrjKUQ%^pWSW@eupcnwXl@Y-&4W!mU51(s_&c!2i({wnr*C1}g_9qZlrzy=&& zcH4%pHCf?6z|~FM&V@yD5WOOyG8e^JzD>PnKBVo-JIjr(#EHXR>F$_XtAU@mqb6Qt zvj(y63WV^l@=E*GK1ZK?yY zMeOBq4l`s@1+OvPQon%$P7duWIB8yeuJ6E2M?wtYNyMO>-fq)HcnMaSpN3^^P*w53t0i_a@XWnme(SRa)@xQYP4maC1y+*jsjc~uTro5(U5 zHp*9lQW?5)62`c$eSP`q^-KkrU6<$S11?;5ah}t^;qckJBxCc@%?s+1Pz3i7hIWy# z9i_hd<@}xAHj8lW`nRv&;kKhS=GpkK`@C-WGH^i!Cf$?t5^i5lU16Y> zH&2KG=D9$2N-Ro8Rvkt#c%PeU(s|BsfmsDizi=jDpmcZfH!$Lyk^&h~2J%(oK0%P8 zc@KX^rPsZS^(a{uKBW}sXr_NU2OuDc|=La@z97L!K&v6MFPpEinMnXsk? zksfMXTi@M=im@BRznf>BZe5`o2n_OTH@k;n4KE+b5XI z6gboplS9pN<6o7OEPfQm4*c8hHr1x5**DcGVqHw0%&(*rKDXoEq^FEYz4d90Di~IG zL{ci%EHyFYnW~*M;`;>j*uXq39$$ybru+1>uo!_n-UO0Lg&!xRf|@5*O!%~Xi^=9G zcqlgwKB}3AWPAZzIpPRIry@h|JS~6_{?c^L*AmE9>GXPY|6EHLGE;OH6?KoDu zy7YuOcDN}$RaU-2n;&?=dvCB8Wiv^Ym_o?(i5=|N5*e>L5bw$Pr%7eC`xiBMA=m8` zS%vMQe_gU3KRh0sQ2H%A+UsQXAHL!&LEDs83}YhaCF_8-!px|r?hZra+9y1ukME+l ztrde&P1#U+DU3SnwvaGpa0BALz?_CbHs8gSFa{YABJe_$e-i=^E|iBAH3a3HRf*_4 z{tmI<%AuBQ{O3LF*yvZ~A-h1x6g;9YhdvA)hW*a~Rre^j8Bak!cMOM~JBuX>#IkKw zOse1H-ZZkr4f7@}3ug>AFagr9vIkrgsBTY<&nyo0XHsBuQvJ<_@mY4`b=L)vPG!D0 z@f)Yo?A999u&BmS`m*Fj${h_tg9du}q=%*k+T_=MdszhStRRrlt8eT&Yeab7bIO@D zP&Kq#3T6O@^10U{s=jybJ87flbd2PfJtS8@va2{7-W_W zm4Wr{h4tQQ<)%|b0h&1G&G)b77$re+p@{}WUk7I6%B+0g<(}Mx%TL$CKzYh8n1r}j zn9|))fLeRY2Bm8mP=0UE&6L9#GBUNpA1}?uDiZx-!R4PFRJ4u=Y_~kAM?7s_`h-!y z(Y=XL%F*38|CD1(&)_+|0Ouu8q^4QS0j(=#S3rT(ceX2`-U!7=8aEv%8c-^iZy&zx z%^->J_VuhrnZ z$`IykB~(gpR%Z;2&5U)1Bg3&U%7$=-ZIK3{r znaZ*P5*eDn2ZgaVTbvcQa%Tb;Yk~LkNkE}Mk#w>E*&@D2mfx&*YH0H)TYhj>_@e_ zM>qh{pF2RR3Qk7^<0PC(*pH+u5bXr)Na;N|2q)v(Vt7O)ROs7U*Tk5^m%+hMgi zViI}{k!xY<$SQ}Wz-?ZMjde9Z$$VM^_S>F6V+_1UYA3d$YNP5@(=X1SX|e}rezGiK zJupS}1_~ms3sYcF^ADSX)=77_hL)G&11R-^srJsvlT`)O z5}O_ju1k*0q+x!ID88Wpy_^W$4-(O$d1Y|=N5{K-pXMQDmIZmQkZvzCC?AdRe!VOaJmA=hC-$ zt$45ZozAiNyb`rCY-skz`D5Ci%wsgjERm-L^yGhb>hm=4A?I<-7wheIfa6u!eE|RG zWY2du$sW(5Q)|Eka;ar>bi~70(sBlkq%Ev9Q3WlMf3PKN>aK^&6=t;`bM3x({Mj)8rA zLuf@i$S8*6R1S$lu6-)aebT15+8#dv9Ef#i_^i)37;5kwFU{l-tJ;Czs`&4gaRz(i z5*x_dybhMO9VG55+p;_-jO>^_4m?c*QHre1XL<|fV=(gIPtA$r#eeVSHqc? z?aokHIif5w75eGa1DKGtao&{o-o5h&vGy;Yg4Sh_9q_bFo+laZX-wjO={4^GI6XlC z=9xalnzsy^OaHD4lARmq)SZZS7;bcV0<&A~c56Vf&wUhvxx}wapAZ}GFYAOe0FU8T zVvoQnm-L-1Q1R3~i^!|4A)_n&5-H{|NT5Tso=VR*LvcJx1_onaKYi3glK>%U4ncW# zNC!kwM|zSlz97LM+vI{a-Tm%VeF@b1r}wN{U#z!YK3UtFRMahScRKVgWcHq;1wTsJ z=9t0jwRfUr8F76&4A?x80S-{KFf;e>G9T1#79vNi-& za;w|y{~XI^20*;$tP8S%;%eYfPfSJ}7C?P=OyFE__J)i7cnDtY(8;$xZk~U2ht8$p z@^G&WXGk`ODJN6P>)7syz^RPQL5M#yycYi|An5iy_kJx~m$m9HZdciQ{Q*VK0{K;@0vB1=8L$yet2&YW>o4Pf$t40=K!Bu^dy;d39j^IBl39ogF=>F>b zo#5{LwQh{K_w?~g9_bAaUwx91e~?)tHyRLPTtZJ2a4~$s$p=4v$*4QBWtjU*zR;I< zx_nf~Nm6Iz09obS!^=6$97;NA_aj0U-_H21(KH+H^03<;JJ9kELTlu-DYUm19MK#Y zrSiQ3YV0I&AvoyJxSXJ4Zzz6FNm-`_mnd+K;3?FjeC3p&3qBE3@H8Y@WvnfN(3E=% z4)EO2O5X4+(;Sm`sHu+4#ZZ-!0au9W=wzp6@KpH)1s94@-am5 zhAh5)@k^s=dc0iJCoNgF7vPYka=g(c?9YMX)nuOAv2dmYK8W^?0}fy16RAAd+kE>h zZxn10Yj_rLL>)QlM8{nCX$=GRWfKpmBc9{*f%UYoyB<5_ zK>TBP9R=KY-95Z(YbUalYBd`9DyKWtSVEhIjmZj~Wd#KQ!U*R^I^ z*p3D?+!tl(GI zJZo1OqV#^zWo#C@!E+Cd_sch&+RT2XRajX$Z26{5jQZhlG0SD^_hH4ISVg?N5OvOb z#M5ebng65*&+>f1tmzXD-Q1b{w(e?W_`dXED<^G%Ta|;GWytN!ky6F$qGp?PxRpk|-Fe0vuEhMxQZjhiX;EybgwwXn(7xbg!(?Y(Gg;6e>s>=ovk%UYs2WEdz| zCddwDv;_u6q!W^B4hry+w#wA0iG3_0;4f(6;5H~J!RG82K*c2#g3#8xX7{!eyW?t zINkphnMcp;=S?^!vr?Ir_DU6n?y^E5Y0k809({PS@uuyH{QG}xLe*+e`0=n+;D)HU zmrizzhDvpLr{~Buz{s!iTSJYXd)L~$a!=8I^BMcn~acb28C{4FPkM;|E{G683#%SU+N3 zZ5LM8+R)e}-TCoT4ZUyQF!(ozrUqNJpvYZ`uM0d8K=^sMaqsT#_Rwg*xjK%OyK|hX zzRTCx_|e(4BBpz)u5B}(^HA)fB zZ9R|ccNgBl3pe-&@-}@c(<*N$mz{;xinxe%?O4oZW*YA{fdPq&3 zCIL2dyIu~KOZx!l%=C4T<|J&kqcEscU+B`SD!h7p%ZGllRE*!e2`|{)XHkGv&qDrS zo>=V!S}Wm^%R)ykje83U#&|*OwMdAoRPM2?bN8c-7BocQ=7#?B8oSfMFSWCRa_EMM z7AADQHV~>+PaVkO###q0yA>aB+uhm8epxQc^jr)~&$}m@``KaYa#?*7ek12%CQ_f&A3Zi1WS*+SYfVY1&j;SE&bYtmsz!&Y;5A9R z`J;thBTSzb4Bbqt+P8E9b;9c9fuEUt|ucs z(Qg!$-Cd<#;-@q0&u6NM&fD~JG;Nm)7X73Z*hT zWyGwrp?HCsdBJVB6BH56(^*b8iuQE2qh7A|Qqy=VUF-d-Vd@=9UYaV!hOmyb?aj0Iqqe2!^g-52sEJ?c;0a@c<_xoEW& z_U+STYm?&JSE6pxKI<<}v^=c}tNT$V<4QYZToT~KM_ubyBmnKsZZe2xrrOY0s$;x9 zD8QnFzdq*%ZO-NR06P|f^=Q8B7bK`pN-ur4dn#-ye){8h&ZA_WU0r98Nk=hSKRK}` zs3UHe zq0HGRoR8Z|7arYXWL(mbQ*S!q&rUWMAZo$PBpca$QPchQmt_fB7#6VQmAkr~wuj=y zBWl``s3d2vQn*~!oM|z+=G|=Hd!lhZvh*v6Cxm|FCtkmCAAGBo#}>`Jtqpg!QIkHF z1{&A*XN|sDJ_VhM@}UUEd9O9YX-q1=YWrtf`bKu#Whige8zXzMlmW6-v|mvU8(5@V z{BXRZm`Bx-jb!f6s1H}J;$5$*IpmL2nsIb*V} z!`^ji*%H%QxPadi-&3crHj83CoJ^W^ZTr2W4}lWmcJ4b=y!E1J&+|e!kdb%x{kNpL zv0YA-bB`-D@`uV?=@TvSU$%?`kh_@B!j&w}+I=|D8(=!$CHT5}QSk(u%yECl_MZ5@ zoT^ z8-*lae0_Z0!w{V*9n^_pzQ4tq!1q9Y#&4jM(z(0OlW>W%5&6wuA>VyO2#Di^gY~*R z_{hcSML{ypelw4iE}Av%m+$wY{=4E_jyw5USuH_}werr4;6qTKuR5eZRukZZXpTvXS@@6WUi9Nr4Qf{r`G zTp)sHg$hUUG#$`fEQG`?Ub+cCZ|@#1554Z27bRQ?@^pDV=c=v+4|V*TBZY7#hDoHN z{rD^4X!bgGY7sX}C(N*;pe4w-h5=)N=F5%+?gLL1fdES0dZTQL4e_Bcw)dV5j&|TD z-ivlf3A-b>cPocv6y$>Ap@z&yl9@rZ?x26zN$byY@1?mUehO3_EZGLCwLTYXiw*uF zTt=P!xw-$!yYHnDpW;MFRRJYgT-jmIrx<|d*55`215yFZXOzkXw+0L3lrZ*ASTvMw zUG_OvFxBLlCNfW|`?|i|`fF0<<(e?BNtrKP(8iZnDZ3=5&tznXZ<_-~{^5R7BO11^ zb`ty;-}u@tWa&kQc|<(X@W;3K8yck^#g{T_1}j8ArRTg}R2h9QzF+G)VO8OsU)NIa z#Ptbu7-he-v3qR*+`Rud=qeVdw?^GD$E1Id725x-4{7e_43NiNSL3@!R{n0FEiYDc zC>Ug3BqH;+#=du8YAa#`FSea-OYah)A!>0&TTy9mIiM2m{gxHd`6G!UoV+&;>NaL< zSmSK1E1O@)b3Soi@rAK*?GZJ2b9*_c6HFLy=gA~^9bnh5zn|op2K>JGp{%^aeI^+z z(c^uYKrnm&?EZ)vTq9I5ZNFNP-I`{|0bH*ptIV{vc>rxSR*QmADGj#Gx?P}PQ$m(@@>ZFQins=sejxTn@>McF!f_W0 zm)%AGyC|?fw3qpu1p^*~jM8gd5sG)NInMEf;10fuubD)zi112;=&TKfOO&PtgT_d; z{!@>}C9faL2^rd@9-N3B(r3P(2i+OgCLK3Vz5ky2yT=7#;ikaC7m=lnB*I&(`nu4~ zMpbS3w?}G9xWLPa-EFQWNGCvkfGFtrvg!9ON=}!>);igw&i5r=13rl#o4JHui+34$ zzW@J(PyFZX&&G*Z^a*XDHX3RyB|y|oBsm5<&PFDHes<)kUWmo)>bL#T9OCA(m|K_T}dYUEIdQ;6s%Uq=Wmul^dA6SZT9)sg^ z;+jY~TX12kIv4UklX#|LSTr}N-z&i4%Hl6(#~ZdfZG;;+2RE{FC8N=o zm#^YHmwnlWK~_+u%FO;6_BxWQAgeRKJN^RaxC9q97C3Pd{*)!TFV zTzmvzS@o#{p*P@6I39l<(aWuEhve~*FQ(%-u)Wy`L_Z_vQoU)12m>c90kFyhAcJ1o zLDB?OSy>}0PLBIXv{-!T=K39AYqsXp%q7T1)#@LWy$jvnbAxM{dh$%Et%ba$ zp$0bYT3$KuhM;0bmta8p=n@m6m-;=|2A!&%_-K9b6$TYa-=nkhxG!qEKg|DvsEjo- zuGLr4?v7$m6!9&;-pU-qc)_jBRJ$&66~|x0;Ye_6!>g%394b{-mP)UP3#3&%X_L)I z-Ik!zOJDlgv2eAdiCVatQm$v2PUthKDX*vI(&``L`z0g}N|~)WTkdg1)>f#0@eBK+Y#sV>`L-kHhZwg7|k z9o{0}1e7x2A)Lqye+U+s#Pp;yUSIyUWb#`28m?oYnj~JN(=&5HJH|LGp51cfAyk7J z3>6@s@JdDc><-6lm9d#KQQWk>)&Eh0W!vTCZ+AEIRlt}y(`Hz*a!JB&O&Q7;F|*OI z+WG0lC%$k9jHcfIk`z-}wqjRG>5TFZkH`s1E2g;orAL{zW4WM~XBWil6)v-}OvVT+ z7bDF@+#8qUH^vm>k$PYmAGih=rK;})jD^?3S_+f=X zc#Z6ncQ}DMFmZa-3IcWO;?Zj(G5oUe@iQr5sPC7j77U8 zubhy2ARaaEcQ6LW(@xu~wCvH|Dbir)ex;DZSARUoo+seMXr+Jhu=*T!y!l1rCF$3n zb*-+C@BP0_0Qj8!cxxM^=r1Ep@&iwpWX;eu0=OGmCvYn&~D*n-URpEEE(52)r=L$%1 zEfxLb*5Ue}pSbf^4R(?fqOYqZAnbUfb9dVE%LE7Ca9x|4-!B0Axzt8}oWf#XDjaFt zh<~%tv9KCj)v>TkPgcm|KbW1<{W1D{sc|qkIgd0*bsx=5w+9Ws5 z0wf$&(~#9Su2roU9vmj>;NO_V+uVf@S+V#-5^*-7Vk<{6w1kkWD+a~P;R$olTt2n- ziSaYmtFYF(_r>WyPN_L0E|nt(OH{tLM%V#fDis5lSM2&)Xe1s<_conS>t6*y@hDXXV5BBM(?q{B zn0(!?5$0bp?XXwe*C@ia6?>8196sURECJYg%DARKEATSN8vzsMMAx+9Apr6mVPu^` zy~!*c|ECuSN#Hl`gU5s1xR+^p0R-!EVQ*hvGE!1@&sVp9=7-|i1(Tg+;OojeiM@}^ zpEl)Db)c?vHm2=~wgx*_do$^p^!GG0^L7fYcA$kKyXDciLmhc`G(5CfI7lr|G)*;D zO3nKusA!q`h>@@x{|5ITwmvPIBA;rt4Y=AMAFGZ=ujisc&DokY6Oz_zhlMfYGpooBzH_j8fCy!(N^)P~P8OykC#R z7Tv?#W~(%WLzOseBtxK@U?LUw$FyMCNNGbKr;(CQ`!g z)U?j_W$po=v5+DhgBV`VabI(7gA{0+Qbl35cCH`Aq_u%_$G=(7uiiV{raRQq*31oJ za(goI?e*(Zd?8@Lt|!HvnG!hlEWczfoafXVT>MG1_1kY~C2e@-ZH_5aIv>|l9c=nr zRUVbJ1N{>0)PMAJRYnJsAJ@LCstzc}&u5%D4@CuT6`&O5h!(ZaEiep7<*k$da?0?? zxE^2>VfLXLm>uepZCuVhG}a=#E!kWHTd8i@|2*HmneP(w4YKW2q=lWi7niKk+FG(< zx*^uiv7v&P|q#{lv<}+ z)xIDjAU2(e->Se23P2~TB%{Q5Y)t{h^ZsFj1y@Ccq=2GOBvFS`Rr74|<6euFrGrqI z-f<<0hrVsBN-R0A@~(CEbMKv?^H0g=<64S<0WMJK^7|y+dpA~yZijW^V&Cq_cHVrk zX1~wN+#?!Um0;)@$)0-VcLa0!12yW)whIzT6D3Nh?75Rff{5zRRbs=d#STh=kf?wJ zqzny1%jxhVy#vh@?z*oz;CC}7i94k@YEg2fNfnVWb?#A<8ywf?YlO0Ndz3CxeqY}H zKiy5Y7INK29eAom&Xw+lX?Wx~7bChEF-(@Nzba2P-&)+?o`}onQ+hQ0pI&b*B#J=1~53Z{p<^dUhh7zC`*{0;+9KfmC{zLRb-wm|F+(B zO^NV%uO5ORh=^Eb3+P+B{A2A-q3Ve{B+zZK1f&6c`GGT@Nd)2M5a3P;1xGl@ZZ-A; zxUVZt_s0D;k^06VN!#GI4)C#V=&~!}>ZD{7aChz92=9g*Kuug6A?^;5O9swO!rsHa zx%&Bje*cN8DvrW&g>Nu2JI+sH0Z}Sp)98A27vSCB^|S96+ogU7?H8&e@T_oO4@ zMY|Ti$E4orMYq8UOb=2>`Gwr)G2^DGe(OO>3h+?f0x_j(Yp73H2EtQmmfKAfhFjW0 zJMbg3Jr&Zy+u}>0BK59uQv;;wTN)7BMJ>@G`CBs=Jjhks{@HZNoH9QO@{+3@5Pimx zYUH-9GXdY6C=4!eDjNE?!zOrjP}!f^PMDN2VsDtdJN|@JGr4S|Hp@(`D(VI=m_X79 z-$#8mTk^6SZT4HC$VB9C{!P3q0LQ4y;lz0%8xnz=?VU7DPlf^iYZOQb3-4MV^Gzbm z&V4|>$%1v~l@%^4TTK~p#{^ZdDUGO8cd2Hw-y=ZQsKnOs0F6`dtVTzNG0~`RZD~D9 zOvSlOALQiNrED5^sCW?Ibp+zmWD(vhc3ca={VG_tmuB{(gy<|=tY(%J`NLN1Qx8bf zF(`$(Rc19z@~+I-tAy_pTQ-zO)SQ+o#c3J^h|MKGY?{iYgnJq*On&gSwLuhr$C($7 zF0@`vX2t0jb?^$8Cn5YS(_^J)ftNMp6MC;BY5H6(zq)nMtxIcv7PRXGfuMkEg&Rj= z4$4}VJW4x23rqPUFSp6=%(V5m0z22ro(zm)nFRv^h3ZD)9;vt8@C)1OH_8aZWVn(L zp?&ZIWJM!;4YK`gavXtleQ$gO-#|bD{!tPc8h0Tg42QTueaWMd-Xh$X!IXO>`{i-Unr9aU!eD@!niLn5k zdFxHF;>(>Yv8D2$UvSVVlg@&9CW6-pUtv_WuSA#2C*fPJb2)Tm;f?ud_vH_}cf#+b zfao$;PMf;QWq$~6mBtMKnDmvL*SSmwY>wBea+VE7iVN*6r?scp^t2ACtzvV$$FABN zxfH$)|E#EFPVF<A85a;F>8;SGHjf|zG;cuRd`K9-TdI5`*@6(BMNzHoQ3yfbF;=*E{ z9g#7)R7hmBc@pOahR3_Rm!=!_PGSCGEG{PLF(wwso{mSnJkNV$96i09wqJI4lfA=%-jsoYKl1yc(OjFmsq|{U#}*CZfjeELC1;C2)pE#qHx`xok15Xoluh};o161u^V)+J z!ohtfTh3W!B%PDO9O>U<8M5=FLGbmSriZUfYm085vbp@MgEYPKR2$ajN&M?`PHJic2Ktvwl&Emz5~aFWKJ_6z&LFOsqSr>)y=HQQbu1 z7?4upsnD|(IQ~jc($A?c;e}rElV+8%gl%)O*T+J0_B(bK988(sVHgzBtr6R}^zg!? zS2h>)own~DSWjsyaC^})yy5WXu4#$ybfpb`HlZ)IZTtDnaGmlIy$i#JC3IFdzedqeI;U$W6iG^|wR znlk)>iXP({;n-X9Jno3@`QyDAY}Z!}>TMo4_OAy?0*}^542v!@pbR z*)QB>+P8ZhKZ?=X*S5^QS|i>NMl~$`wMXRV7EMH5z$;?` zEShZ_>R*U03lw&Bg*q4GM4^QKeXT2hXJh2);p61-e^wG7Qdy8%91BYL0p6$vYz;L~ z{t8s?11zJtQ4A;pW}Wz=)SO~{JrIem(QD3ql?$x7 zxTG>CwHTYnQ9HlZXVH8)isOd4Wy!k15WO-@D(4C4QR5s2&phNUWSuNP;erj``zgDE3yrreA_ z{@ryVP`w~Cnklm3SWUs|7Sy^L*)cO-Ffd@$+~^U3THYdS7Y5!c3D*uSeFMB%f#C*9 PaNG>Q!wwmKz6J3BPQogi diff --git a/che/genDatabase.txt b/che/genDatabase.txt deleted file mode 100644 index 53d935c9..00000000 --- a/che/genDatabase.txt +++ /dev/null @@ -1,684 +0,0 @@ -상성 이름 사진 국가 도시 통 무 지 급 출생 사망 꿈 특기 - 1, "소제1",1001, 0, "낙양", 20, 11, 48, 0, 168, 190, "유지", "-"); $gencount++; - 1, "헌제",1002, 0, "낙양", 17, 13, 61, 0, 170, 250, "안전", "-", "한 왕조는 이대로 끝나는 것인가..."); $gencount++; -999, "사마휘",1003, 0, "양양", 71, 11, 96, 0, 173, 234, "은둔", "신산", "좋지, 좋아~"); $gencount++; -999, "우길",1004, 0, "업", 17, 13, 83, 0, 131, 200, "은둔", "신산"); $gencount++; -999, "화타",1005, 0, "낙양", 53, 25, 70, 0, 151, 220, "은둔", "의술", "아픈 사람들은 모두 내게 오시오. 껄껄껄."); $gencount++; -999, "길평",1006, 0, "허창", 27, 15, 72, 0, 158, 200, "은둔", "의술"); $gencount++; - - 29, "가규",1007, 0, "낙양", 55, 55, 74, 0, 177, 231, "재간", "-"); $gencount++; -136, "가범",1008, 0, "낙양", 58, 48, 73, 0, 202, 237, "유지", "-"); $gencount++; - 49, "가비능",1009, 0, "낙양", 58, 83, 32, 0, 172, 235, "정복", "-"); $gencount++; - 31, "가충",1010, 0, "낙양", 50, 25, 87, 0, 217, 282, "출세", "-"); $gencount++; - 20, "가후",1011, 0, "낙양", 69, 30, 94, 0, 147, 223, "할거", "귀병"); $gencount++; - 73, "간옹",1012, 0, "낙양", 31, 33, 70, 0, 164, 225, "안전", "경작"); $gencount++; -129, "감녕",1013, 0, "낙양", 78, 95, 71, 0, 174, 222, "출세", "무쌍"); $gencount++; -127, "감택",1014, 0, "낙양", 62, 44, 79, 0, 182, 243, "유지", "-"); $gencount++; - 60, "강단",1015, 0, "낙양", 41, 73, 43, 0, 168, 230, "재간", "-"); $gencount++; - 73, "강유",1016, 0, "낙양", 95, 90, 94, 0, 202, 264, "왕좌", "집중"); $gencount++; -102, "고간",1017, 0, "낙양", 60, 57, 51, 0, 168, 206, "유지", "-"); $gencount++; - 27, "고람",1018, 0, "낙양", 72, 67, 59, 0, 159, 201, "출세", "기병"); $gencount++; - 69, "고상",1019, 0, "낙양", 41, 40, 38, 0, 194, 252, "재간", "-"); $gencount++; -144, "고순",1020, 0, "낙양", 79, 82, 65, 0, 162, 198, "의협", "기병"); $gencount++; - 7, "고승",1021, 0, "낙양", 42, 73, 24, 0, 145, 185, "출세", "-"); $gencount++; -120, "고옹",1022, 0, "낙양", 57, 21, 79, 0, 168, 243, "출세", "-"); $gencount++; - 63, "고정",1023, 0, "낙양", 67, 65, 55, 0, 190, 251, "정복", "-"); $gencount++; - 53, "고패",1024, 0, "낙양", 53, 56, 28, 0, 170, 212, "유지", "-"); $gencount++; - 74, "공도",1025, 0, "낙양", 26, 73, 19, 0, 164, 200, "재간", "-"); $gencount++; -142, "공손강",1026, 0, "낙양", 64, 72, 61, 0, 172, 210, "정복", "-"); $gencount++; -142, "공손공",1027, 0, "낙양", 68, 41, 75, 0, 174, 238, "정복", "-"); $gencount++; -142, "공손도",1028, 0, "낙양", 62, 72, 41, 0, 154, 204, "정복", "기병"); $gencount++; - 65, "공손범",1029, 0, "낙양", 61, 67, 61, 0, 158, 199, "출세", "-"); $gencount++; - 65, "공손속",1030, 0, "낙양", 60, 76, 41, 0, 176, 199, "정복", "-"); $gencount++; - 10, "공손연",1031, 0, "낙양", 74, 79, 64, 0, 205, 238, "패권", "돌격"); $gencount++; - 65, "공손월",1032, 0, "낙양", 47, 63, 46, 0, 160, 192, "정복", "-"); $gencount++; - 65, "공손찬",1033, 0, "낙양", 61, 87, 67, 0, 152, 199, "패권", "기병"); $gencount++; - 43, "공융",1034, 0, "낙양", 63, 48, 85, 0, 153, 208, "왕좌", "경작"); $gencount++; - 35, "공주",1035, 0, "낙양", 64, 35, 78, 0, 151, 194, "재간", "-"); $gencount++; - 83, "공지",1036, 0, "낙양", 57, 54, 64, 0, 178, 242, "대의", "-"); $gencount++; - 26, "곽가",1037, 0, "낙양", 47, 23, 99, 0, 170, 207, "패권", "귀모"); $gencount++; -111, "곽도",1038, 0, "낙양", 63, 67, 81, 0, 155, 205, "재간", "-"); $gencount++; - 2, "곽사",1039, 0, "낙양", 58, 67, 31, 0, 146, 197, "패권", "-"); $gencount++; - 80, "곽유지",1040, 0, "낙양", 37, 22, 71, 0, 190, 259, "재간", "상재"); $gencount++; - 67, "곽익",1041, 0, "낙양", 67, 60, 67, 0, 207, 270, "재간", "-"); $gencount++; - 67, "곽준",1042, 0, "낙양", 76, 69, 73, 0, 178, 217, "출세", "-"); $gencount++; - 27, "곽혁",1043, 0, "낙양", 40, 29, 80, 0, 187, 228, "안전", "-"); $gencount++; - 20, "곽회",1044, 0, "낙양", 77, 75, 71, 0, 187, 255, "정복", "-"); $gencount++; - 39, "관구검",1045, 0, "낙양", 72, 68, 77, 0, 202, 255, "대의", "-"); $gencount++; - 76, "관색",1046, 0, "낙양", 69, 85, 67, 0, 200, 239, "의협", "징병"); $gencount++; - 76, "관우",1047, 0, "낙양", 96, 98, 80, 0, 162, 219, "의협", "위압"); $gencount++; - 76, "관이",1048, 0, "낙양", 48, 60, 58, 0, 219, 263, "안전", "-"); $gencount++; - 76, "관통",1049, 0, "낙양", 49, 63, 60, 0, 218, 259, "대의", "-"); $gencount++; - 76, "관평",1050, 0, "낙양", 77, 80, 70, 0, 186, 219, "의협", "보병"); $gencount++; - 7, "관해",1051, 0, "낙양", 66, 90, 35, 0, 160, 193, "출세", "-"); $gencount++; - 76, "관흥",1052, 0, "낙양", 69, 84, 72, 0, 199, 234, "의협", "돌격"); $gencount++; - 40, "괴량",1053, 0, "낙양", 41, 28, 81, 0, 155, 204, "안전", "신중"); $gencount++; - 40, "괴월",1054, 0, "낙양", 26, 30, 84, 0, 157, 214, "유지", "귀병"); $gencount++; - 98, "교모",1055, 0, "낙양", 59, 58, 61, 0, 150, 191, "안전", "-"); $gencount++; - 98, "교현",1056, 0, "낙양", 50, 18, 60, 0, 158, 210, "재간", "-"); $gencount++; - 6, "구역거",1057, 0, "낙양", 51, 72, 49, 0, 152, 193, "안전", "-"); $gencount++; - 80, "극정",1058, 0, "낙양", 38, 25, 75, 0, 208, 278, "유지", "-"); $gencount++; - 46, "금선",1059, 0, "낙양", 55, 49, 36, 0, 155, 208, "할거", "-"); $gencount++; - 62, "금환삼결",1060, 0, "낙양", 46, 76, 17, 0, 192, 225, "출세", "-"); $gencount++; -141, "기령",1061, 0, "낙양", 76, 81, 33, 0, 155, 199, "대의", "무쌍"); $gencount++; -122, "낙통",1062, 0, "낙양", 57, 44, 69, 0, 193, 228, "유지", "-"); $gencount++; -124, "노숙1",1063, 0, "낙양", 90, 42, 94, 0, 172, 217, "왕좌", "상재"); $gencount++; - 75, "노식",1064, 0, "낙양", 91, 54, 80, 0, 139, 192, "왕좌", "징병"); $gencount++; - 59, "뇌동",1065, 0, "낙양", 70, 77, 45, 0, 172, 218, "출세", "궁병"); $gencount++; -142, "뇌박",1066, 0, "낙양", 54, 54, 33, 0, 157, 206, "유지", "-"); $gencount++; -127, "능조",1067, 0, "낙양", 67, 80, 44, 0, 165, 203, "재간", "공성"); $gencount++; -127, "능통",1068, 0, "낙양", 71, 78, 58, 0, 189, 237, "의협", "궁병"); $gencount++; - 64, "단경",1069, 0, "낙양", 68, 61, 68, 0, 156, 199, "정복", "-"); $gencount++; -132, "담웅",1070, 0, "낙양", 52, 77, 19, 0, 188, 221, "출세", "-"); $gencount++; - 99, "답둔",1071, 0, "낙양", 59, 71, 31, 0, 158, 207, "유지", "-"); $gencount++; -132, "당자",1072, 0, "낙양", 59, 56, 45, 0, 196, 265, "안전", "-"); $gencount++; - 60, "대래동주",1073, 0, "낙양", 40, 65, 24, 0, 195, 249, "안전", "-"); $gencount++; - 82, "도겸",1074, 0, "낙양", 51, 32, 61, 0, 132, 194, "할거", "인덕"); $gencount++; -120, "도준",1075, 0, "낙양", 64, 57, 50, 0, 238, 285, "안전", "-"); $gencount++; - 73, "동궐",1076, 0, "낙양", 66, 50, 76, 0, 204, 271, "대의", "-"); $gencount++; - 62, "동다나",1077, 0, "낙양", 51, 71, 27, 0, 189, 225, "유지", "-"); $gencount++; - 2, "동민",1078, 0, "낙양", 52, 65, 49, 0, 149, 192, "안전", "-"); $gencount++; - 21, "동소",1079, 0, "낙양", 46, 46, 62, 0, 156, 236, "패권", "-"); $gencount++; -127, "동습",1080, 0, "낙양", 53, 64, 32, 0, 169, 215, "출세", "-"); $gencount++; - 89, "동승",1081, 0, "낙양", 75, 66, 65, 0, 154, 200, "왕좌", "-"); $gencount++; - 78, "동윤",1082, 0, "낙양", 64, 26, 78, 0, 192, 246, "왕좌", "-"); $gencount++; - 2, "동탁",1083, 0, "낙양", 87, 91, 54, 0, 139, 192, "패권", "기병"); $gencount++; - 66, "동화",1084, 0, "낙양", 48, 64, 53, 0, 168, 219, "대의", "-"); $gencount++; - 32, "두예",1085, 0, "낙양", 88, 80, 84, 0, 222, 284, "정복", "-"); $gencount++; - 7, "등무",1086, 0, "낙양", 43, 74, 19, 0, 147, 185, "정복", "-"); $gencount++; - 41, "등애",1087, 0, "낙양", 94, 82, 92, 0, 197, 264, "패권", "신산"); $gencount++; -116, "등윤",1088, 0, "낙양", 34, 42, 68, 0, 194, 256, "안전", "-"); $gencount++; - 73, "등지",1089, 0, "낙양", 74, 51, 80, 0, 182, 251, "할거", "경작"); $gencount++; - 41, "등충",1090, 0, "낙양", 60, 82, 55, 0, 230, 264, "출세", "-"); $gencount++; - 54, "등현",1091, 0, "낙양", 65, 59, 61, 0, 188, 248, "출세", "-"); $gencount++; - 29, "마균",1092, 0, "낙양", 33, 38, 80, 0, 200, 259, "안전", "-"); $gencount++; - 71, "마대",1093, 0, "낙양", 77, 79, 49, 0, 183, 246, "대의", "기병"); $gencount++; - 70, "마등",1094, 0, "낙양", 80, 87, 56, 0, 149, 211, "왕좌", "기병"); $gencount++; - 80, "마속",1095, 0, "낙양", 73, 64, 82, 0, 190, 228, "패권", "집중"); $gencount++; - 77, "마량",1096, 0, "낙양", 57, 25, 87, 0, 187, 225, "왕좌", "-"); $gencount++; - 48, "마완",1097, 0, "낙양", 49, 64, 26, 0, 170, 211, "안전", "기병"); $gencount++; - 19, "마준",1098, 0, "낙양", 45, 63, 62, 0, 196, 260, "안전", "-"); $gencount++; - 71, "마철",1099, 0, "낙양", 71, 60, 31, 0, 179, 211, "대의", "기병"); $gencount++; - 70, "마초",1100, 0, "낙양", 78, 97, 40, 0, 176, 226, "대의", "기병"); $gencount++; -131, "마충1",1101, 0, "낙양", 67, 62, 51, 0, 186, 222, "재간", "-"); $gencount++; - 69, "마충2",1102, 0, "낙양", 61, 68, 51, 0, 187, 249, "출세", "-"); $gencount++; - 71, "마휴",1103, 0, "낙양", 71, 60, 32, 0, 178, 211, "대의", "기병"); $gencount++; -116, "만총",1104, 0, "낙양", 79, 40, 78, 0, 170, 242, "할거", "신중"); $gencount++; - 51, "망아장",1105, 0, "낙양", 29, 64, 20, 0, 191, 225, "출세", "-"); $gencount++; - 44, "맹달",1106, 0, "낙양", 70, 66, 72, 0, 172, 228, "할거", "귀병"); $gencount++; - 60, "맹우",1107, 0, "낙양", 63, 79, 26, 0, 190, 251, "정복", "-"); $gencount++; - 60, "맹획",1108, 0, "낙양", 78, 92, 50, 0, 186, 245, "왕좌", "격노"); $gencount++; - 29, "모개",1109, 0, "낙양", 46, 56, 56, 0, 161, 216, "대의", "-"); $gencount++; - 51, "목록대왕",1110, 0, "낙양", 58, 71, 65, 0, 184, 225, "재간", "척사"); $gencount++; - 96, "목순",1111, 0, "낙양", 17, 21, 68, 0, 157, 191, "왕좌", "-"); $gencount++; - 43, "무안국",1112, 0, "낙양", 51, 73, 18, 0, 156, 191, "재간", "-"); $gencount++; - 28, "문빙",1113, 0, "낙양", 70, 77, 43, 0, 178, 237, "유지", "-"); $gencount++; - 38, "문앙",1114, 0, "낙양", 71, 91, 46, 0, 222, 285, "대의", "-"); $gencount++; -102, "문추",1115, 0, "낙양", 72, 94, 25, 0, 161, 200, "출세", "무쌍"); $gencount++; - 38, "문흠",1116, 0, "낙양", 76, 77, 43, 0, 200, 258, "대의", "-"); $gencount++; - 49, "미당대왕",1117, 0, "낙양", 64, 75, 32, 0, 202, 260, "유지", "-"); $gencount++; -108, "미방",1118, 0, "낙양", 58, 65, 37, 0, 169, 222, "패권", "징병"); $gencount++; - 77, "미축",1119, 0, "낙양", 26, 30, 65, 0, 165, 220, "왕좌", "상재"); $gencount++; - 94, "반봉",1120, 0, "낙양", 61, 75, 17, 0, 155, 191, "출세", "-"); $gencount++; - 44, "반준",1121, 0, "낙양", 41, 21, 67, 0, 174, 239, "안전", "-"); $gencount++; - 65, "방덕",1122, 0, "낙양", 76, 90, 67, 0, 170, 219, "의협", "기병"); $gencount++; - 73, "방통",1123, 0, "낙양", 86, 41, 97, 0, 179, 214, "패권", "반계"); $gencount++; - 65, "방회",1124, 0, "낙양", 25, 33, 59, 0, 205, 272, "안전", "-"); $gencount++; - 68, "배원소",1125, 0, "낙양", 45, 69, 33, 0, 169, 200, "재간", "-"); $gencount++; - 78, "번건",1126, 0, "낙양", 28, 31, 68, 0, 205, 270, "대의", "-"); $gencount++; -149, "번주",1127, 0, "낙양", 67, 77, 21, 0, 149, 192, "할거", "-"); $gencount++; - 72, "법정",1128, 0, "낙양", 81, 29, 93, 0, 176, 220, "패권", "신산"); $gencount++; - 8, "변희",1129, 0, "낙양", 65, 65, 27, 0, 169, 200, "안전", "-"); $gencount++; -121, "보질",1130, 0, "낙양", 58, 28, 77, 0, 177, 247, "유지", "-"); $gencount++; -113, "복양흥",1131, 0, "낙양", 58, 51, 71, 0, 224, 264, "유지", "-"); $gencount++; -110, "봉기",1132, 0, "낙양", 68, 52, 80, 0, 153, 202, "패권", "집중"); $gencount++; - 74, "부동",1133, 0, "낙양", 58, 69, 69, 0, 183, 222, "대의", "-"); $gencount++; -108, "부사인",1134, 0, "낙양", 54, 59, 51, 0, 182, 222, "출세", "-"); $gencount++; - 38, "부손",1135, 0, "낙양", 24, 43, 68, 0, 162, 230, "안전", "-"); $gencount++; - 74, "부첨",1136, 0, "낙양", 61, 74, 45, 0, 216, 263, "대의", "-"); $gencount++; - 66, "비시",1137, 0, "낙양", 18, 36, 61, 0, 176, 240, "재간", "-"); $gencount++; -141, "비연",1138, 0, "낙양", 66, 65, 53, 0, 196, 238, "출세", "-"); $gencount++; - 77, "비위",1139, 0, "낙양", 72, 26, 73, 0, 193, 253, "대의", "-"); $gencount++; -144, "사광",1140, 0, "낙양", 57, 49, 66, 0, 175, 235, "안전", "-"); $gencount++; - 71, "사마가",1141, 0, "낙양", 61, 85, 18, 0, 167, 222, "정복", "돌격"); $gencount++; - 20, "사마랑",1142, 0, "낙양", 25, 32, 63, 0, 171, 217, "대의", "-"); $gencount++; - 24, "사마망",1143, 0, "낙양", 71, 61, 65, 0, 205, 271, "정복", "-"); $gencount++; - 24, "사마부",1144, 0, "낙양", 55, 31, 73, 0, 180, 272, "대의", "-"); $gencount++; - 31, "사마사",1145, 0, "낙양", 87, 64, 91, 0, 208, 255, "정복", "-"); $gencount++; - 31, "사마소",1146, 0, "낙양", 93, 63, 84, 0, 211, 265, "정복", "-"); $gencount++; - 31, "사마염",1147, 0, "낙양", 92, 78, 72, 0, 236, 290, "패권", "-"); $gencount++; - 30, "사마유",1148, 0, "낙양", 62, 45, 79, 0, 248, 283, "왕좌", "-"); $gencount++; - 31, "사마의",1149, 0, "낙양", 98, 67, 98, 0, 179, 251, "패권", "반계"); $gencount++; -139, "사섭",1150, 0, "낙양", 63, 61, 71, 0, 137, 226, "안전", "-"); $gencount++; -139, "사일",1151, 0, "낙양", 59, 44, 68, 0, 153, 230, "유지", "-"); $gencount++; -132, "사정",1152, 0, "낙양", 67, 71, 20, 0, 178, 221, "안전", "-"); $gencount++; -146, "사지",1153, 0, "낙양", 61, 49, 70, 0, 163, 227, "안전", "-"); $gencount++; -144, "사휘",1154, 0, "낙양", 67, 71, 61, 0, 165, 227, "유지", "-"); $gencount++; - 35, "서막",1155, 0, "낙양", 56, 41, 72, 0, 171, 249, "유지", "-"); $gencount++; - 76, "서서",1156, 0, "낙양", 90, 70, 96, 0, 178, 232, "의협", "귀병"); $gencount++; -124, "서성",1157, 0, "낙양", 83, 76, 83, 0, 177, 234, "대의", "-"); $gencount++; -142, "서영",1158, 0, "낙양", 47, 63, 33, 0, 147, 191, "안전", "-"); $gencount++; - 23, "서질",1159, 0, "낙양", 55, 73, 34, 0, 207, 253, "재간", "-"); $gencount++; - 23, "서황",1160, 0, "낙양", 79, 89, 68, 0, 165, 228, "의협", "필살"); $gencount++; - 32, "석포",1161, 0, "낙양", 71, 63, 59, 0, 214, 272, "정복", "-"); $gencount++; -131, "설영",1162, 0, "낙양", 46, 23, 64, 0, 223, 282, "유지", "-"); $gencount++; -128, "설종",1163, 0, "낙양", 27, 33, 67, 0, 187, 243, "유지", "-"); $gencount++; - 69, "성의",1164, 0, "낙양", 45, 64, 22, 0, 168, 211, "재간", "-"); $gencount++; -129, "소비",1165, 0, "낙양", 67, 63, 49, 0, 172, 221, "대의", "-"); $gencount++; - 76, "손건",1166, 0, "낙양", 42, 33, 73, 0, 165, 215, "대의", "거상"); $gencount++; -125, "손견",1167, 0, "낙양", 96, 95, 76, 0, 156, 192, "왕좌", "무쌍"); $gencount++; -126, "손광",1168, 0, "낙양", 63, 54, 58, 0, 186, 207, "유지", "-"); $gencount++; -125, "손권",1169, 0, "낙양", 90, 77, 83, 0, 182, 252, "할거", "수비"); $gencount++; -126, "손랑",1170, 0, "낙양", 27, 54, 28, 0, 187, 226, "안전", "-"); $gencount++; -126, "손등",1171, 0, "낙양", 52, 39, 77, 0, 209, 241, "할거", "-"); $gencount++; -125, "손량",1172, 0, "낙양", 24, 23, 79, 0, 243, 260, "할거", "-"); $gencount++; - 20, "손례",1173, 0, "낙양", 64, 64, 69, 0, 180, 250, "안전", "-"); $gencount++; -124, "손소",1174, 0, "낙양", 76, 80, 68, 0, 188, 241, "정복", "-"); $gencount++; -130, "손수",1175, 0, "낙양", 67, 57, 59, 0, 235, 299, "안전", "-"); $gencount++; -126, "손유",1176, 0, "낙양", 77, 60, 67, 0, 177, 215, "정복", "-"); $gencount++; -122, "손이",1177, 0, "낙양", 57, 62, 57, 0, 223, 272, "안전", "-"); $gencount++; -126, "손정",1178, 0, "낙양", 59, 56, 62, 0, 160, 206, "유지", "-"); $gencount++; -115, "손준",1179, 0, "낙양", 59, 69, 51, 0, 219, 256, "정복", "-"); $gencount++; - 7, "손중",1180, 0, "낙양", 53, 63, 24, 0, 154, 185, "안전", "-"); $gencount++; -125, "손책",1181, 0, "낙양", 96, 96, 78, 0, 175, 200, "패권", "필살"); $gencount++; -115, "손침",1182, 0, "낙양", 49, 71, 40, 0, 231, 258, "패권", "-"); $gencount++; -114, "손호",1183, 0, "낙양", 20, 78, 67, 0, 242, 284, "패권", "-"); $gencount++; -126, "손화",1184, 0, "낙양", 35, 25, 71, 0, 224, 253, "왕좌", "-"); $gencount++; -127, "손환",1185, 0, "낙양", 79, 65, 70, 0, 197, 228, "정복", "-"); $gencount++; -126, "손휴",1186, 0, "낙양", 63, 43, 64, 0, 235, 264, "정복", "-"); $gencount++; -117, "손흠",1187, 0, "낙양", 66, 63, 33, 0, 235, 280, "정복", "-"); $gencount++; -147, "송헌",1188, 0, "낙양", 42, 63, 41, 0, 157, 200, "안전", "-"); $gencount++; - 95, "순우경",1189, 0, "낙양", 72, 67, 60, 0, 146, 200, "할거", "-"); $gencount++; - 22, "순욱1",1190, 0, "낙양", 54, 29, 97, 0, 163, 212, "왕좌", "집중"); $gencount++; - 22, "순유",1191, 0, "낙양", 73, 41, 90, 0, 157, 214, "대의", "신중"); $gencount++; - 29, "신비",1192, 0, "낙양", 47, 28, 74, 0, 171, 240, "재간", "-"); $gencount++; - 37, "신의",1193, 0, "낙양", 55, 61, 51, 0, 190, 252, "출세", "-"); $gencount++; - 37, "신탐",1194, 0, "낙양", 56, 58, 57, 0, 188, 254, "출세", "-"); $gencount++; - 85, "신평",1195, 0, "낙양", 68, 51, 75, 0, 165, 204, "왕좌", "-"); $gencount++; -102, "심배",1196, 0, "낙양", 75, 66, 68, 0, 156, 204, "패권", "귀병"); $gencount++; -126, "심영",1197, 0, "낙양", 53, 72, 51, 0, 235, 280, "재간", "-"); $gencount++; - 47, "아하소과",1198, 0, "낙양", 53, 75, 15, 0, 204, 253, "안전", "척사"); $gencount++; - 62, "아회남",1199, 0, "낙양", 50, 74, 30, 0, 190, 225, "출세", "척사"); $gencount++; - 23, "악진",1200, 0, "낙양", 73, 67, 56, 0, 159, 218, "대의", "돌격"); $gencount++; - 23, "악침",1201, 0, "낙양", 45, 52, 33, 0, 196, 257, "대의", "-"); $gencount++; - 63, "악환",1202, 0, "낙양", 54, 82, 55, 0, 196, 251, "재간", "-"); $gencount++; -102, "안량",1203, 0, "낙양", 73, 93, 36, 0, 160, 200, "출세", "위압"); $gencount++; - 14, "양백",1204, 0, "낙양", 55, 54, 53, 0, 171, 214, "안전", "-"); $gencount++; - 92, "양봉1",1205, 0, "낙양", 57, 64, 36, 0, 153, 197, "유지", "-"); $gencount++; - 91, "양봉2",1206, 0, "낙양", 62, 78, 61, 0, 191, 252, "정복", "-"); $gencount++; - 13, "양송",1207, 0, "낙양", 15, 35, 34, 0, 167, 215, "안전", "-"); $gencount++; - 43, "양수",1208, 0, "낙양", 18, 31, 91, 0, 175, 219, "재간", "귀병"); $gencount++; - 61, "양의",1209, 0, "낙양", 67, 56, 71, 0, 190, 235, "유지", "-"); $gencount++; -141, "양조1",1210, 0, "낙양", 68, 54, 60, 0, 202, 256, "출세", "-"); $gencount++; - 9, "양추1",1211, 0, "낙양", 51, 67, 16, 0, 159, 199, "정복", "-"); $gencount++; - 31, "양호",1212, 0, "낙양", 91, 69, 80, 0, 221, 278, "패권", "-"); $gencount++; - 53, "양회",1213, 0, "낙양", 60, 67, 40, 0, 167, 212, "출세", "-"); $gencount++; -141, "양흥",1214, 0, "낙양", 52, 68, 17, 0, 169, 211, "안전", "-"); $gencount++; - 6, "어부라",1215, 0, "낙양", 78, 80, 61, 0, 150, 195, "정복", "-"); $gencount++; - 64, "엄강",1216, 0, "낙양", 57, 65, 44, 0, 163, 192, "재간", "-"); $gencount++; - 10, "엄백호",1217, 0, "낙양", 48, 68, 30, 0, 150, 197, "할거", "-"); $gencount++; - 10, "엄여",1218, 0, "낙양", 35, 66, 24, 0, 153, 197, "할거", "-"); $gencount++; - 69, "엄안",1219, 0, "낙양", 72, 84, 67, 0, 151, 222, "왕좌", "-"); $gencount++; - 7, "엄정",1220, 0, "낙양", 31, 68, 49, 0, 151, 189, "출세", "-"); $gencount++; -121, "엄준",1221, 0, "낙양", 44, 24, 71, 0, 169, 246, "재간", "-"); $gencount++; - 71, "여개",1222, 0, "낙양", 51, 42, 67, 0, 194, 227, "유지", "-"); $gencount++; - 29, "여건",1223, 0, "낙양", 44, 68, 29, 0, 173, 238, "출세", "-"); $gencount++; -107, "여광",1224, 0, "낙양", 60, 67, 27, 0, 162, 207, "유지", "-"); $gencount++; -124, "여몽",1225, 0, "낙양", 92, 78, 93, 0, 178, 219, "패권", "궁병"); $gencount++; -123, "여범",1226, 0, "낙양", 43, 34, 71, 0, 169, 228, "할거", "-"); $gencount++; -107, "여상",1227, 0, "낙양", 62, 68, 26, 0, 164, 207, "유지", "-"); $gencount++; -105, "여위황",1228, 0, "낙양", 42, 62, 38, 0, 159, 200, "정복", "-"); $gencount++; -145, "여포",1229, 0, "낙양", 74,100, 29, 0, 156, 198, "패권", "돌격"); $gencount++; - 50, "염우",1230, 0, "낙양", 58, 51, 18, 0, 209, 264, "출세", "-"); $gencount++; - 40, "염유",1231, 0, "낙양", 59, 75, 51, 0, 168, 227, "출세", "-"); $gencount++; - 18, "염포",1232, 0, "낙양", 33, 35, 77, 0, 163, 231, "유지", "-"); $gencount++; - 40, "예형",1233, 0, "낙양", 77, 31, 95, 0, 173, 209, "은둔", "통찰"); $gencount++; -133, "오강",1234, 0, "낙양", 47, 37, 61, 0, 216, 275, "안전", "-"); $gencount++; - 59, "오란",1235, 0, "낙양", 67, 75, 42, 0, 170, 218, "재간", "-"); $gencount++; - 72, "오반",1236, 0, "낙양", 70, 66, 45, 0, 171, 234, "재간", "-"); $gencount++; -128, "오언",1237, 0, "낙양", 71, 60, 52, 0, 235, 297, "재간", "-"); $gencount++; -126, "오연",1238, 0, "낙양", 36, 70, 31, 0, 234, 280, "정복", "-"); $gencount++; - 69, "오의",1239, 0, "낙양", 75, 72, 74, 0, 165, 237, "유지", "-"); $gencount++; - 19, "오질",1240, 0, "낙양", 43, 37, 69, 0, 177, 230, "출세", "-"); $gencount++; - 51, "올돌골",1241, 0, "낙양", 77, 92, 15, 0, 186, 225, "출세", "척사"); $gencount++; - 52, "옹개",1242, 0, "낙양", 58, 67, 51, 0, 188, 225, "안전", "-"); $gencount++; - 20, "왕경",1243, 0, "낙양", 55, 47, 65, 0, 206, 260, "재간", "-"); $gencount++; - 97, "왕광",1244, 0, "낙양", 72, 67, 54, 0, 150, 190, "유지", "-"); $gencount++; - 30, "왕기1",1245, 0, "낙양", 76, 62, 70, 0, 190, 261, "유지", "-"); $gencount++; - 34, "왕랑",1246, 0, "낙양", 49, 29, 51, 0, 162, 228, "할거", "-"); $gencount++; - 57, "왕루",1247, 0, "낙양", 40, 28, 76, 0, 173, 211, "유지", "-"); $gencount++; - 76, "왕보",1248, 0, "낙양", 47, 34, 75, 0, 171, 219, "대의", "-"); $gencount++; - 86, "왕수",1249, 0, "낙양", 34, 34, 67, 0, 168, 218, "재간", "-"); $gencount++; - 26, "왕쌍",1250, 0, "낙양", 58, 89, 15, 0, 195, 228, "정복", "보병"); $gencount++; - 46, "왕위",1251, 0, "낙양", 59, 60, 68, 0, 163, 208, "안전", "-"); $gencount++; - 92, "왕윤",1252, 0, "낙양", 16, 18, 77, 0, 137, 192, "왕좌", "-"); $gencount++; - 40, "왕융",1253, 0, "낙양", 62, 41, 77, 0, 234, 305, "재간", "-"); $gencount++; - 32, "왕준",1254, 0, "낙양", 81, 83, 76, 0, 206, 285, "대의", "-"); $gencount++; - 30, "왕찬",1255, 0, "낙양", 28, 28, 78, 0, 177, 217, "안전", "-"); $gencount++; - 33, "왕창",1256, 0, "낙양", 74, 57, 52, 0, 188, 259, "정복", "-"); $gencount++; - 69, "왕평",1257, 0, "낙양", 77, 76, 71, 0, 192, 248, "재간", "-"); $gencount++; - 71, "왕항",1258, 0, "낙양", 51, 43, 60, 0, 184, 254, "대의", "-"); $gencount++; - 33, "왕혼",1259, 0, "낙양", 69, 32, 59, 0, 223, 297, "정복", "-"); $gencount++; - 71, "요립",1260, 0, "낙양", 65, 41, 84, 0, 181, 250, "출세", "-"); $gencount++; - 74, "요화",1261, 0, "낙양", 67, 58, 60, 0, 170, 264, "의협", "-"); $gencount++; - 22, "우금1",1262, 0, "낙양", 80, 74, 71, 0, 159, 221, "정복", "-"); $gencount++; - 27, "우금2",1263, 0, "낙양", 63, 77, 37, 0, 173, 226, "대의", "-"); $gencount++; -122, "우번",1264, 0, "낙양", 23, 42, 73, 0, 164, 233, "유지", "-"); $gencount++; -126, "우전",1265, 0, "낙양", 63, 55, 41, 0, 204, 258, "안전", "-"); $gencount++; - 86, "원담",1266, 0, "낙양", 67, 59, 55, 0, 173, 205, "왕좌", "-"); $gencount++; -101, "원상",1267, 0, "낙양", 54, 72, 68, 0, 179, 207, "패권", "-"); $gencount++; -101, "원소",1268, 0, "낙양", 85, 67, 76, 0, 154, 202, "패권", "위압"); $gencount++; -140, "원술",1269, 0, "낙양", 77, 59, 71, 0, 155, 199, "패권", "축성"); $gencount++; -140, "원윤",1270, 0, "낙양", 41, 34, 60, 0, 163, 199, "패권", "-"); $gencount++; -101, "원희",1271, 0, "낙양", 69, 57, 72, 0, 176, 207, "할거", "-"); $gencount++; -131, "위소",1272, 0, "낙양", 39, 24, 82, 0, 204, 273, "재간", "-"); $gencount++; -147, "위속",1273, 0, "낙양", 57, 59, 41, 0, 156, 200, "안전", "-"); $gencount++; - 81, "위연",1274, 0, "낙양", 78, 94, 62, 0, 175, 234, "패권", "보병"); $gencount++; - 96, "위유",1275, 0, "낙양", 53, 69, 71, 0, 151, 193, "재간", "-"); $gencount++; - 76, "유기",1276, 0, "낙양", 57, 19, 73, 0, 174, 209, "왕좌", "-"); $gencount++; - 36, "유대",1277, 0, "낙양", 61, 57, 62, 0, 147, 202, "재간", "-"); $gencount++; -134, "유도",1278, 0, "낙양", 35, 33, 68, 0, 168, 214, "재간", "-"); $gencount++; - 46, "유벽",1279, 0, "낙양", 63, 71, 23, 0, 168, 210, "출세", "-"); $gencount++; - 75, "유봉",1280, 0, "낙양", 60, 65, 62, 0, 188, 220, "출세", "-"); $gencount++; - 75, "유비",1281, 0, "낙양", 85, 75, 70, 0, 161, 223, "왕좌", "인덕"); $gencount++; - 75, "유선1",1282, 0, "낙양", 24, 17, 21, 0, 207, 271, "대의", "-"); $gencount++; - 55, "유순",1283, 0, "낙양", 67, 61, 54, 0, 184, 239, "출세", "-"); $gencount++; - 75, "유심",1284, 0, "낙양", 63, 46, 70, 0, 238, 263, "왕좌", "-"); $gencount++; -129, "유약",1285, 0, "낙양", 67, 63, 61, 0, 206, 260, "유지", "-"); $gencount++; - 55, "유언",1286, 0, "낙양", 60, 40, 74, 0, 132, 194, "할거", "-"); $gencount++; - 27, "유엽",1287, 0, "낙양", 40, 29, 79, 0, 176, 235, "유지", "-"); $gencount++; - 11, "유요",1288, 0, "낙양", 23, 22, 48, 0, 156, 195, "안전", "발명"); $gencount++; - 96, "유우",1289, 0, "낙양", 68, 34, 72, 0, 145, 193, "왕좌", "-"); $gencount++; - 55, "유장",1290, 0, "낙양", 38, 31, 63, 0, 162, 219, "할거", "수비"); $gencount++; - 45, "유종",1291, 0, "낙양", 22, 26, 61, 0, 191, 208, "할거", "-"); $gencount++; - 56, "유파",1292, 0, "낙양", 47, 32, 70, 0, 186, 222, "대의", "-"); $gencount++; - 45, "유표1",1293, 0, "낙양", 71, 57, 71, 0, 142, 208, "할거", "-"); $gencount++; - 27, "유표2",1294, 0, "낙양", 76, 55, 71, 0, 173, 229, "안전", "-"); $gencount++; -134, "유현",1295, 0, "낙양", 32, 56, 55, 0, 188, 252, "안전", "-"); $gencount++; -122, "육개",1296, 0, "낙양", 66, 30, 72, 0, 198, 269, "재간", "-"); $gencount++; -122, "육손",1297, 0, "낙양", 98, 68, 98, 0, 183, 245, "왕좌", "귀병"); $gencount++; -121, "육적",1298, 0, "낙양", 44, 29, 73, 0, 187, 219, "안전", "-"); $gencount++; -122, "육항",1299, 0, "낙양", 95, 69, 94, 0, 226, 274, "왕좌", "-"); $gencount++; - 38, "윤대목",1300, 0, "낙양", 62, 49, 69, 0, 211, 270, "재간", "-"); $gencount++; - 80, "윤묵",1301, 0, "낙양", 19, 28, 73, 0, 183, 239, "대의", "-"); $gencount++; - 72, "윤상",1302, 0, "낙양", 30, 32, 42, 0, 194, 260, "대의", "-"); $gencount++; -136, "윤직",1303, 0, "낙양", 44, 58, 63, 0, 197, 237, "재간", "-"); $gencount++; - 2, "이각",1304, 0, "낙양", 56, 77, 43, 0, 148, 198, "패권", "-"); $gencount++; -146, "이숙",1305, 0, "낙양", 27, 45, 67, 0, 156, 192, "재간", "-"); $gencount++; - 71, "이엄",1306, 0, "낙양", 80, 84, 81, 0, 172, 234, "패권", "-"); $gencount++; - 2, "이유",1307, 0, "낙양", 64, 22, 90, 0, 150, 192, "패권", "귀모"); $gencount++; -132, "이이",1308, 0, "낙양", 55, 75, 20, 0, 187, 222, "정복", "-"); $gencount++; - 77, "이적",1309, 0, "낙양", 55, 27, 77, 0, 162, 226, "할거", "-"); $gencount++; - 22, "이전",1310, 0, "낙양", 75, 68, 82, 0, 174, 216, "왕좌", "-"); $gencount++; - 71, "이풍1",1311, 0, "낙양", 59, 56, 62, 0, 206, 260, "재간", "-"); $gencount++; - 66, "이회",1312, 0, "낙양", 67, 50, 79, 0, 175, 231, "유지", "-"); $gencount++; -114, "잠혼",1313, 0, "낙양", 15, 16, 44, 0, 239, 280, "할거", "-"); $gencount++; - 7, "장각",1314, 0, "낙양", 93, 25, 93, 0, 140, 185, "패권", "환술"); $gencount++; - 34, "장간",1315, 0, "낙양", 19, 20, 70, 0, 175, 239, "재간", "-"); $gencount++; - 7, "장개",1316, 0, "낙양", 48, 69, 19, 0, 155, 202, "안전", "-"); $gencount++; -122, "장굉",1317, 0, "낙양", 25, 21, 85, 0, 153, 212, "왕좌", "-"); $gencount++; - 7, "장량",1318, 0, "낙양", 68, 81, 68, 0, 153, 185, "정복", "환술"); $gencount++; - 15, "장로",1319, 0, "낙양", 76, 44, 80, 0, 163, 237, "유지", "축성"); $gencount++; - 23, "장료",1320, 0, "낙양", 89, 93, 83, 0, 169, 222, "의협", "견고"); $gencount++; - 7, "장보",1321, 0, "낙양", 78, 81, 76, 0, 148, 185, "패권", "환술"); $gencount++; - 76, "장비",1322, 0, "낙양", 79, 99, 48, 0, 167, 221, "의협", "무쌍"); $gencount++; - 62, "장서",1323, 0, "낙양", 44, 48, 35, 0, 225, 290, "출세", "-"); $gencount++; -120, "장소1",1324, 0, "낙양", 42, 24, 91, 0, 156, 236, "안전", "-"); $gencount++; - 78, "장소2",1325, 0, "낙양", 51, 44, 71, 0, 202, 264, "재간", "-"); $gencount++; - 72, "장송",1326, 0, "낙양", 49, 28, 93, 0, 170, 212, "할거", "통찰"); $gencount++; -148, "장수",1327, 0, "낙양", 71, 72, 69, 0, 154, 207, "할거", "-"); $gencount++; -145, "장양1",1328, 0, "낙양", 62, 66, 65, 0, 150, 199, "출세", "-"); $gencount++; - 8, "장연",1329, 0, "낙양", 78, 66, 47, 0, 153, 210, "안전", "-"); $gencount++; - 11, "장영",1330, 0, "낙양", 55, 65, 40, 0, 154, 195, "재간", "-"); $gencount++; -118, "장온",1331, 0, "낙양", 21, 30, 69, 0, 193, 231, "할거", "-"); $gencount++; - 78, "장완",1332, 0, "낙양", 70, 55, 86, 0, 188, 246, "할거", "상재"); $gencount++; - 15, "장위",1333, 0, "낙양", 65, 70, 29, 0, 172, 215, "대의", "-"); $gencount++; - 36, "장윤",1334, 0, "낙양", 67, 59, 60, 0, 163, 208, "정복", "-"); $gencount++; -104, "장의거",1335, 0, "낙양", 68, 59, 34, 0, 159, 205, "대의", "-"); $gencount++; - 68, "장익",1336, 0, "낙양", 75, 68, 63, 0, 188, 264, "유지", "-"); $gencount++; - 56, "장임",1337, 0, "낙양", 83, 82, 74, 0, 169, 214, "대의", "견고"); $gencount++; -148, "장제1",1338, 0, "낙양", 70, 65, 59, 0, 144, 196, "할거", "-"); $gencount++; - 32, "장제2",1339, 0, "낙양", 30, 33, 84, 0, 188, 249, "유지", "-"); $gencount++; -126, "장제3",1340, 0, "낙양", 74, 49, 61, 0, 236, 280, "할거", "-"); $gencount++; - 17, "장패",1341, 0, "낙양", 44, 78, 43, 0, 165, 231, "할거", "-"); $gencount++; - 76, "장포1",1342, 0, "낙양", 69, 85, 49, 0, 198, 229, "재간", "징병"); $gencount++; -113, "장포2",1343, 0, "낙양", 63, 66, 51, 0, 225, 264, "유지", "-"); $gencount++; - 27, "장합",1344, 0, "낙양", 83, 91, 63, 0, 167, 231, "출세", "궁병"); $gencount++; - 23, "장호",1345, 0, "낙양", 56, 62, 54, 0, 195, 240, "정복", "-"); $gencount++; - 31, "장화",1346, 0, "낙양", 49, 24, 86, 0, 232, 300, "유지", "-"); $gencount++; - 48, "장횡",1347, 0, "낙양", 53, 67, 25, 0, 178, 211, "재간", "-"); $gencount++; -141, "장훈",1348, 0, "낙양", 67, 61, 60, 0, 156, 206, "안전", "-"); $gencount++; -120, "장휴",1349, 0, "낙양", 42, 35, 70, 0, 204, 244, "재간", "-"); $gencount++; -126, "장흠",1350, 0, "낙양", 64, 66, 67, 0, 168, 219, "대의", "저격"); $gencount++; - 96, "저수",1351, 0, "낙양", 82, 54, 88, 0, 156, 201, "할거", "반계"); $gencount++; -130, "전단",1352, 0, "낙양", 64, 73, 61, 0, 204, 261, "출세", "-"); $gencount++; - 42, "전속",1353, 0, "낙양", 66, 57, 49, 0, 218, 272, "안전", "-"); $gencount++; - 26, "전위1",1354, 0, "낙양", 61, 96, 34, 0, 160, 197, "의협", "필살"); $gencount++; -130, "전위2",1355, 0, "낙양", 74, 69, 62, 0, 230, 274, "출세", "-"); $gencount++; -128, "전종",1356, 0, "낙양", 79, 77, 74, 0, 183, 249, "패권", "-"); $gencount++; - 42, "전주",1357, 0, "낙양", 69, 67, 51, 0, 169, 214, "의협", "-"); $gencount++; - 96, "전풍",1358, 0, "낙양", 81, 41, 96, 0, 162, 200, "왕좌", "-"); $gencount++; - 24, "정무",1359, 0, "낙양", 54, 38, 74, 0, 201, 265, "출세", "-"); $gencount++; -119, "정병",1360, 0, "낙양", 22, 25, 67, 0, 172, 226, "유지", "-"); $gencount++; -126, "정보",1361, 0, "낙양", 81, 64, 76, 0, 151, 216, "패권", "-"); $gencount++; -123, "정봉1",1362, 0, "낙양", 70, 77, 64, 0, 190, 271, "패권", "-"); $gencount++; - 24, "정욱",1363, 0, "낙양", 80, 39, 90, 0, 141, 220, "패권", "신중"); $gencount++; - 88, "정원",1364, 0, "낙양", 64, 77, 58, 0, 137, 190, "왕좌", "기병"); $gencount++; - 7, "정원지",1365, 0, "낙양", 41, 74, 38, 0, 145, 185, "출세", "-"); $gencount++; - 69, "정은",1366, 0, "낙양", 53, 62, 26, 0, 169, 211, "재간", "-"); $gencount++; -121, "제갈각",1367, 0, "낙양", 61, 53, 92, 0, 203, 253, "왕좌", "-"); $gencount++; - 76, "제갈균",1368, 0, "낙양", 59, 45, 74, 0, 185, 252, "안전", "상재"); $gencount++; -121, "제갈근",1369, 0, "낙양", 60, 42, 88, 0, 174, 241, "왕좌", "경작"); $gencount++; - 76, "제갈량",1370, 0, "낙양", 97, 55,100, 0, 181, 234, "왕좌", "집중"); $gencount++; - 76, "제갈상",1371, 0, "낙양", 52, 75, 71, 0, 246, 263, "대의", "-"); $gencount++; -135, "제갈정",1372, 0, "낙양", 56, 57, 54, 0, 241, 300, "안전", "-"); $gencount++; - 76, "제갈첨",1373, 0, "낙양", 73, 52, 76, 0, 227, 263, "대의", "-"); $gencount++; -135, "제갈탄",1374, 0, "낙양", 79, 79, 73, 0, 206, 258, "패권", "-"); $gencount++; - 76, "조광",1375, 0, "낙양", 65, 67, 54, 0, 210, 263, "재간", "-"); $gencount++; - 74, "조루",1376, 0, "낙양", 49, 37, 60, 0, 183, 219, "대의", "-"); $gencount++; - 24, "조모",1377, 0, "낙양", 53, 32, 30, 0, 241, 260, "할거", "-"); $gencount++; -127, "조무",1378, 0, "낙양", 71, 68, 71, 0, 155, 191, "의협", "-"); $gencount++; - 26, "조방",1379, 0, "낙양", 50, 20, 31, 0, 232, 274, "정복", "-"); $gencount++; - 83, "조범",1380, 0, "낙양", 58, 40, 63, 0, 168, 218, "유지", "-"); $gencount++; - 26, "조비",1381, 0, "낙양", 72, 69, 75, 0, 187, 226, "패권", "징병"); $gencount++; - 19, "조상",1382, 0, "낙양", 68, 62, 31, 0, 207, 249, "패권", "-"); $gencount++; -147, "조성",1383, 0, "낙양", 44, 69, 51, 0, 163, 198, "안전", "-"); $gencount++; - 26, "조순",1384, 0, "낙양", 66, 57, 72, 0, 170, 210, "정복", "-"); $gencount++; - 25, "조식",1385, 0, "낙양", 19, 19, 90, 0, 192, 232, "왕좌", "귀모"); $gencount++; - 25, "조앙",1386, 0, "낙양", 44, 65, 62, 0, 175, 197, "왕좌", "-"); $gencount++; - 25, "조예",1387, 0, "낙양", 57, 55, 82, 0, 205, 239, "정복", "-"); $gencount++; - 26, "조우",1388, 0, "낙양", 67, 55, 67, 0, 199, 260, "대의", "-"); $gencount++; - 76, "조운",1389, 0, "낙양", 95, 98, 87, 0, 168, 229, "왕좌", "무쌍"); $gencount++; - 25, "조웅",1390, 0, "낙양", 59, 27, 44, 0, 194, 220, "안전", "-"); $gencount++; - 26, "조인",1391, 0, "낙양", 74, 79, 62, 0, 168, 223, "패권", "보병"); $gencount++; - 25, "조조",1392, 0, "낙양",100, 80, 95, 0, 155, 220, "패권", "반계"); $gencount++; - 26, "조진",1393, 0, "낙양", 82, 67, 65, 0, 185, 231, "정복", "-"); $gencount++; - 25, "조창",1394, 0, "낙양", 75, 88, 37, 0, 190, 223, "정복", "돌격"); $gencount++; - 76, "조통",1395, 0, "낙양", 65, 64, 55, 0, 209, 260, "재간", "-"); $gencount++; - 84, "조표",1396, 0, "낙양", 34, 70, 16, 0, 151, 196, "안전", "-"); $gencount++; - 7, "조홍1",1397, 0, "낙양", 52, 66, 42, 0, 156, 185, "유지", "-"); $gencount++; - 24, "조홍2",1398, 0, "낙양", 72, 69, 44, 0, 169, 232, "패권", "-"); $gencount++; - 26, "조환",1399, 0, "낙양", 34, 24, 42, 0, 246, 302, "정복", "-"); $gencount++; - 19, "조훈",1400, 0, "낙양", 67, 63, 30, 0, 212, 249, "출세", "-"); $gencount++; - 26, "조휴",1401, 0, "낙양", 75, 71, 70, 0, 174, 228, "패권", "-"); $gencount++; - 19, "조희",1402, 0, "낙양", 64, 57, 71, 0, 210, 249, "대의", "-"); $gencount++; - 22, "종요",1403, 0, "낙양", 16, 20, 74, 0, 151, 230, "유지", "-"); $gencount++; - 20, "종회",1404, 0, "낙양", 84, 58, 93, 0, 225, 264, "패권", "-"); $gencount++; -128, "주거",1405, 0, "낙양", 73, 71, 72, 0, 190, 246, "유지", "-"); $gencount++; -118, "주방",1406, 0, "낙양", 56, 36, 76, 0, 200, 240, "할거", "-"); $gencount++; -126, "주연",1407, 0, "낙양", 73, 72, 51, 0, 182, 249, "할거", "-"); $gencount++; -126, "주유",1408, 0, "낙양", 97, 73, 97, 0, 175, 210, "패권", "신산"); $gencount++; -128, "주이",1409, 0, "낙양", 61, 55, 61, 0, 201, 257, "안전", "-"); $gencount++; - 88, "주준",1410, 0, "낙양", 82, 75, 65, 0, 149, 195, "왕좌", "-"); $gencount++; - 32, "주지",1411, 0, "낙양", 52, 77, 47, 0, 233, 295, "안전", "-"); $gencount++; - 76, "주창",1412, 0, "낙양", 42, 79, 30, 0, 164, 219, "의협", "궁병"); $gencount++; -126, "주치",1413, 0, "낙양", 58, 55, 56, 0, 156, 224, "안전", "-"); $gencount++; - 41, "주태1",1414, 0, "낙양", 62, 55, 61, 0, 207, 261, "안전", "-"); $gencount++; -126, "주태2",1415, 0, "낙양", 74, 88, 60, 0, 171, 225, "정복", "필살"); $gencount++; -128, "주환",1416, 0, "낙양", 84, 86, 74, 0, 177, 238, "정복", "-"); $gencount++; - 29, "진건",1417, 0, "낙양", 62, 70, 62, 0, 214, 292, "정복", "-"); $gencount++; - 29, "진교",1418, 0, "낙양", 21, 25, 67, 0, 175, 237, "유지", "-"); $gencount++; - 28, "진군",1419, 0, "낙양", 60, 38, 87, 0, 167, 235, "대의", "-"); $gencount++; -143, "진궁",1420, 0, "낙양", 77, 51, 90, 0, 154, 198, "할거", "신중"); $gencount++; - 79, "진규",1421, 0, "낙양", 22, 19, 71, 0, 132, 206, "할거", "-"); $gencount++; - 72, "진도",1422, 0, "낙양", 71, 85, 70, 0, 171, 237, "대의", "-"); $gencount++; - 79, "진등",1423, 0, "낙양", 64, 62, 71, 0, 169, 207, "할거", "-"); $gencount++; - 37, "진림",1424, 0, "낙양", 50, 28, 82, 0, 160, 217, "재간", "-"); $gencount++; -124, "진무",1425, 0, "낙양", 62, 74, 59, 0, 176, 215, "재간", "-"); $gencount++; - 66, "진복",1426, 0, "낙양", 36, 27, 76, 0, 160, 226, "재간", "-"); $gencount++; - 50, "진수",1427, 0, "낙양", 25, 29, 83, 0, 233, 297, "대의", "-"); $gencount++; - 81, "진식",1428, 0, "낙양", 47, 68, 52, 0, 191, 230, "출세", "-"); $gencount++; - 79, "진진",1429, 0, "낙양", 58, 38, 64, 0, 170, 235, "재간", "-"); $gencount++; - 28, "진태",1430, 0, "낙양", 79, 76, 70, 0, 210, 260, "대의", "-"); $gencount++; - 11, "진횡",1431, 0, "낙양", 38, 58, 47, 0, 161, 195, "출세", "-"); $gencount++; - 21, "차주",1432, 0, "낙양", 55, 66, 62, 0, 164, 199, "안전", "-"); $gencount++; - 11, "착융",1433, 0, "낙양", 62, 59, 21, 0, 161, 194, "출세", "-"); $gencount++; - 36, "채모",1434, 0, "낙양", 79, 69, 68, 0, 155, 208, "정복", "궁병"); $gencount++; - 36, "채중",1435, 0, "낙양", 58, 43, 55, 0, 168, 208, "출세", "-"); $gencount++; - 36, "채화",1436, 0, "낙양", 56, 47, 49, 0, 166, 208, "안전", "-"); $gencount++; - 66, "초주",1437, 0, "낙양", 22, 26, 81, 0, 201, 270, "대의", "-"); $gencount++; - 20, "최염",1438, 0, "낙양", 43, 54, 67, 0, 162, 216, "대의", "-"); $gencount++; - 60, "축융",1439, 0, "낙양", 59, 87, 25, 0, 193, 246, "정복", "척사"); $gencount++; - 60, "타사대왕",1440, 0, "낙양", 61, 72, 67, 0, 186, 225, "출세", "척사"); $gencount++; -124, "태사자",1441, 0, "낙양", 71, 97, 65, 0, 166, 209, "대의", "무쌍"); $gencount++; -124, "태사향",1442, 0, "낙양", 51, 69, 50, 0, 189, 246, "재간", "-"); $gencount++; - 12, "포륭",1443, 0, "낙양", 53, 74, 20, 0, 174, 208, "안전", "-"); $gencount++; - 74, "풍습",1444, 0, "낙양", 36, 64, 44, 0, 182, 222, "재간", "-"); $gencount++; - 7, "하의",1445, 0, "낙양", 49, 68, 25, 0, 161, 195, "출세", "-"); $gencount++; -121, "하제",1446, 0, "낙양", 74, 73, 64, 0, 171, 227, "재간", "-"); $gencount++; - 90, "하진",1447, 0, "낙양", 49, 69, 37, 0, 135, 189, "왕좌", "-"); $gencount++; - 24, "하후덕",1448, 0, "낙양", 67, 64, 39, 0, 178, 218, "출세", "-"); $gencount++; - 26, "하후돈",1449, 0, "낙양", 88, 92, 71, 0, 156, 220, "의협", "돌격"); $gencount++; - 19, "하후무",1450, 0, "낙양", 38, 33, 37, 0, 201, 259, "안전", "-"); $gencount++; - 24, "하후상",1451, 0, "낙양", 67, 62, 71, 0, 181, 225, "출세", "-"); $gencount++; - 26, "하후연",1452, 0, "낙양", 79, 90, 58, 0, 162, 219, "패권", "궁병"); $gencount++; - 26, "하후위",1453, 0, "낙양", 73, 76, 71, 0, 204, 254, "정복", "-"); $gencount++; - 26, "하후은",1454, 0, "낙양", 49, 51, 39, 0, 180, 208, "안전", "-"); $gencount++; - 23, "하후패",1455, 0, "낙양", 78, 88, 69, 0, 202, 262, "대의", "-"); $gencount++; - 20, "하후현",1456, 0, "낙양", 57, 23, 75, 0, 208, 254, "유지", "-"); $gencount++; - 26, "하후혜",1457, 0, "낙양", 76, 66, 78, 0, 206, 242, "정복", "-"); $gencount++; - 26, "하후화",1458, 0, "낙양", 77, 61, 80, 0, 207, 265, "정복", "-"); $gencount++; - 22, "학소",1459, 0, "낙양", 89, 81, 86, 0, 185, 229, "대의", "견고"); $gencount++; -126, "한당",1460, 0, "낙양", 68, 67, 64, 0, 156, 225, "할거", "-"); $gencount++; - 93, "한복",1461, 0, "낙양", 66, 59, 42, 0, 149, 191, "안전", "-"); $gencount++; - 8, "한섬",1462, 0, "낙양", 39, 62, 35, 0, 159, 196, "출세", "-"); $gencount++; - 48, "한수",1463, 0, "낙양", 66, 76, 77, 0, 142, 215, "대의", "기병"); $gencount++; - 40, "한숭",1464, 0, "낙양", 21, 25, 70, 0, 154, 210, "재간", "-"); $gencount++; - 7, "한충",1465, 0, "낙양", 41, 66, 29, 0, 151, 185, "안전", "-"); $gencount++; - 9, "한현",1466, 0, "낙양", 43, 61, 20, 0, 163, 208, "유지", "-"); $gencount++; - 27, "한호",1467, 0, "낙양", 60, 73, 45, 0, 164, 218, "유지", "-"); $gencount++; - 79, "향랑",1468, 0, "낙양", 51, 21, 77, 0, 167, 247, "대의", "-"); $gencount++; - 79, "향총",1469, 0, "낙양", 76, 42, 73, 0, 195, 240, "왕좌", "-"); $gencount++; -139, "허공",1470, 0, "낙양", 65, 63, 59, 0, 155, 200, "유지", "-"); $gencount++; - 21, "허유",1471, 0, "낙양", 47, 47, 57, 0, 155, 204, "재간", "-"); $gencount++; - 23, "허의",1472, 0, "낙양", 31, 74, 47, 0, 213, 263, "출세", "-"); $gencount++; - 26, "허저",1473, 0, "낙양", 57, 98, 27, 0, 169, 226, "정복", "무쌍"); $gencount++; - 87, "허정",1474, 0, "낙양", 18, 29, 74, 0, 152, 222, "재간", "-"); $gencount++; - 12, "형도영",1475, 0, "낙양", 49, 78, 23, 0, 174, 208, "출세", "-"); $gencount++; -148, "호거아",1476, 0, "낙양", 35, 76, 61, 0, 164, 206, "안전", "-"); $gencount++; - 76, "호반",1477, 0, "낙양", 61, 58, 46, 0, 179, 233, "재간", "-"); $gencount++; - 20, "호분",1478, 0, "낙양", 71, 60, 61, 0, 222, 288, "할거", "-"); $gencount++; - 27, "호주천",1479, 0, "낙양", 77, 75, 65, 0, 169, 230, "정복", "-"); $gencount++; - 20, "호준",1480, 0, "낙양", 67, 60, 46, 0, 200, 256, "재간", "-"); $gencount++; - 2, "화웅",1481, 0, "낙양", 68, 88, 24, 0, 155, 191, "출세", "돌격"); $gencount++; -131, "화핵",1482, 0, "낙양", 37, 27, 75, 0, 217, 278, "안전", "-"); $gencount++; - 10, "화흠",1483, 0, "낙양", 18, 43, 75, 0, 157, 231, "출세", "-"); $gencount++; - 21, "환범",1484, 0, "낙양", 20, 25, 81, 0, 199, 249, "유지", "-"); $gencount++; -127, "황개",1485, 0, "낙양", 78, 85, 69, 0, 154, 218, "왕좌", "징병"); $gencount++; - 56, "황권",1486, 0, "낙양", 76, 46, 77, 0, 167, 240, "대의", "-"); $gencount++; - 41, "황란",1487, 0, "낙양", 29, 70, 25, 0, 200, 264, "재간", "-"); $gencount++; - 88, "황보숭",1488, 0, "낙양", 83, 63, 73, 0, 132, 195, "왕좌", "-"); $gencount++; - 72, "황충",1489, 0, "낙양", 84, 94, 67, 0, 148, 222, "왕좌", "궁병"); $gencount++; - 50, "황호",1490, 0, "낙양", 15, 17, 48, 0, 226, 263, "안전", "-"); $gencount++; -147, "후성",1491, 0, "낙양", 56, 62, 33, 0, 158, 199, "정복", "-"); $gencount++; - - - - -123, "가화",1492, 0, "낙양", 50, 66, 40, 0, 176, 224, "-", "-"); $gencount++; -999, "건석",1493, 0, "낙양", 21, 12, 61, 0, 155, 189, "-", "-"); $gencount++; -999, "견씨",1494, 0, "낙양", 35, 24, 58, 0, 182, 221, "-", "-"); $gencount++; - 40, "견홍",1495, 0, "낙양", 76, 72, 66, 0, 224, 272, "-", "-"); $gencount++; -120, "고담",1496, 0, "낙양", 33, 21, 69, 0, 203, 244, "-", "-"); $gencount++; -101, "고유",1497, 0, "낙양", 56, 44, 73, 0, 174, 263, "-", "-"); $gencount++; -132, "곽마",1498, 0, "낙양", 68, 71, 49, 0, 239, 280, "-", "-"); $gencount++; - 39, "관구수",1499, 0, "낙양", 58, 63, 35, 0, 206, 265, "-", "-"); $gencount++; - 39, "관구전",1500, 0, "낙양", 63, 58, 68, 0, 224, 255, "-", "-"); $gencount++; -999, "관로",1501, 0, "낙양", 62, 21, 75, 0, 191, 256, "-", "-"); $gencount++; - 65, "관정",1502, 0, "낙양", 35, 50, 73, 0, 158, 199, "-", "-"); $gencount++; -137, "교수",1503, 0, "낙양", 67, 69, 39, 0, 143, 195, "-", "-"); $gencount++; - 33, "구건",1504, 0, "낙양", 43, 56, 69, 0, 239, 272, "-", "-"); $gencount++; - 41, "구본",1505, 0, "낙양", 52, 41, 70, 0, 232, 269, "-", "-"); $gencount++; - 12, "구성",1506, 0, "낙양", 56, 71, 31, 0, 157, 187, "-", "-"); $gencount++; - 21, "국연",1507, 0, "낙양", 52, 21, 71, 0, 160, 219, "-", "-"); $gencount++; - 99, "국의",1508, 0, "낙양", 83, 79, 50, 0, 146, 191, "-", "-"); $gencount++; - 34, "금의",1509, 0, "낙양", 18, 40, 63, 0, 177, 218, "-", "-"); $gencount++; - 76, "나헌",1510, 0, "낙양", 86, 67, 75, 0, 218, 270, "-", "-"); $gencount++; -999, "남두",1511, 0, "낙양", 35, 25, 54, 0, 130, 200, "-", "-"); $gencount++; - 54, "냉포",1512, 0, "낙양", 70, 82, 69, 0, 176, 214, "-", "-"); $gencount++; -124, "노숙2",1513, 0, "낙양", 70, 55, 76, 0, 208, 274, "-", "-"); $gencount++; - 42, "누규",1514, 0, "낙양", 54, 19, 88, 0, 143, 212, "-", "-"); $gencount++; - 6, "누반",1515, 0, "낙양", 65, 76, 39, 0, 178, 207, "-", "-"); $gencount++; -130, "누현",1516, 0, "낙양", 23, 20, 68, 0, 223, 275, "-", "-"); $gencount++; - 40, "당균",1517, 0, "낙양", 33, 19, 81, 0, 229, 264, "-", "-"); $gencount++; - 32, "당빈",1518, 0, "낙양", 70, 74, 62, 0, 235, 294, "-", "-"); $gencount++; -999, "대교",1519, 0, "낙양", 42, 10, 54, 0, 177, 235, "-", "-"); $gencount++; - 28, "대릉",1520, 0, "낙양", 64, 75, 45, 0, 199, 258, "-", "-"); $gencount++; -129, "동조",1521, 0, "낙양", 16, 15, 51, 0, 221, 281, "-", "-"); $gencount++; -114, "등수",1522, 0, "낙양", 35, 20, 44, 0, 228, 288, "-", "-"); $gencount++; - 50, "마막",1523, 0, "낙양", 22, 17, 5, 0, 221, 265, "-", "-"); $gencount++; -116, "만욱",1524, 0, "낙양", 20, 18, 66, 0, 240, 272, "-", "-"); $gencount++; -120, "맹종",1525, 0, "낙양", 48, 48, 67, 0, 216, 271, "-", "-"); $gencount++; - 38, "문호",1526, 0, "낙양", 65, 74, 45, 0, 227, 279, "-", "-"); $gencount++; -999, "미씨",1527, 0, "낙양", 59, 15, 68, 0, 176, 208, "-", "-"); $gencount++; - 39, "반림",1528, 0, "낙양", 66, 79, 8, 0, 168, 225, "-", "-"); $gencount++; -129, "반장",1529, 0, "낙양", 77, 78, 69, 0, 177, 222, "-", "-"); $gencount++; - 94, "방열",1530, 0, "낙양", 58, 82, 28, 0, 153, 190, "-", "-"); $gencount++; - 55, "방희",1531, 0, "낙양", 59, 38, 69, 0, 153, 218, "-", "-"); $gencount++; - 30, "배수",1532, 0, "낙양", 10, 11, 77, 0, 223, 271, "-", "-"); $gencount++; - 8, "번능",1533, 0, "낙양", 70, 61, 47, 0, 158, 194, "-", "-"); $gencount++; -999, "번씨",1534, 0, "낙양", 32, 17, 45, 0, 176, 220, "-", "-"); $gencount++; - 49, "보도근",1535, 0, "낙양", 64, 73, 50, 0, 170, 233, "-", "-"); $gencount++; -129, "보천",1536, 0, "낙양", 68, 60, 72, 0, 222, 272, "-", "-"); $gencount++; -121, "보협",1537, 0, "낙양", 73, 53, 75, 0, 216, 264, "-", "-"); $gencount++; - 28, "부하",1538, 0, "낙양", 44, 36, 85, 0, 209, 255, "-", "-"); $gencount++; - 26, "비요",1539, 0, "낙양", 70, 65, 73, 0, 192, 228, "-", "-"); $gencount++; - 31, "사마주",1540, 0, "낙양", 63, 53, 62, 0, 227, 283, "-", "-"); $gencount++; - 41, "사찬",1541, 0, "낙양", 61, 71, 54, 0, 215, 264, "-", "-"); $gencount++; -128, "설후",1542, 0, "낙양", 16, 14, 71, 0, 221, 271, "-", "-"); $gencount++; - 36, "성공영",1543, 0, "낙양", 73, 58, 80, 0, 172, 220, "-", "-"); $gencount++; -126, "성만",1544, 0, "낙양", 61, 69, 66, 0, 225, 276, "-", "-"); $gencount++; -999, "소교",1545, 0, "낙양", 57, 23, 66, 0, 178, 218, "-", "-"); $gencount++; - 46, "소유",1546, 0, "낙양", 51, 61, 48, 0, 164, 210, "-", "-"); $gencount++; - 31, "소제2",1547, 0, "낙양", 22, 16, 78, 0, 224, 268, "-", "-"); $gencount++; -126, "손교",1548, 0, "낙양", 77, 60, 69, 0, 181, 219, "-", "-"); $gencount++; -116, "손기",1549, 0, "낙양", 62, 65, 52, 0, 227, 276, "-", "-"); $gencount++; -999, "손상향",1550, 0, "낙양", 72, 62, 42, 0, 193, 244, "-", "-"); $gencount++; -125, "손익",1551, 0, "낙양", 69, 75, 26, 0, 184, 204, "-", "-"); $gencount++; -125, "손진",1552, 0, "낙양", 64, 71, 48, 0, 234, 280, "-", "-"); $gencount++; -123, "송겸",1553, 0, "낙양", 61, 48, 44, 0, 175, 215, "-", "-"); $gencount++; - 85, "순심",1554, 0, "낙양", 20, 21, 79, 0, 164, 208, "-", "-"); $gencount++; - 31, "순욱2",1555, 0, "낙양", 10, 16, 77, 0, 225, 289, "-", "-"); $gencount++; - 31, "순의",1556, 0, "낙양", 16, 11, 73, 0, 207, 281, "-", "-"); $gencount++; -129, "시삭",1557, 0, "낙양", 36, 66, 44, 0, 226, 268, "-", "-"); $gencount++; - 29, "신창",1558, 0, "낙양", 51, 29, 46, 0, 210, 272, "-", "-"); $gencount++; -999, "악신",1559, 0, "낙양", 53, 12, 46, 0, 175, 228, "-", "-"); $gencount++; -138, "악취",1560, 0, "낙양", 56, 68, 58, 0, 157, 195, "-", "-"); $gencount++; -138, "양강",1561, 0, "낙양", 62, 70, 42, 0, 160, 199, "-", "-"); $gencount++; - 21, "양부",1562, 0, "낙양", 68, 55, 85, 0, 178, 239, "-", "-"); $gencount++; - 72, "양서",1563, 0, "낙양", 56, 62, 66, 0, 198, 260, "-", "-"); $gencount++; - 34, "양습",1564, 0, "낙양", 67, 49, 73, 0, 168, 230, "-", "-"); $gencount++; - 16, "양앙",1565, 0, "낙양", 65, 70, 39, 0, 172, 215, "-", "-"); $gencount++; - 17, "양임",1566, 0, "낙양", 71, 78, 56, 0, 170, 215, "-", "-"); $gencount++; - 32, "양제",1567, 0, "낙양", 69, 63, 71, 0, 226, 291, "-", "-"); $gencount++; - 33, "양조2",1568, 0, "낙양", 65, 61, 67, 0, 223, 286, "-", "-"); $gencount++; - 48, "양추2",1569, 0, "낙양", 66, 67, 61, 0, 172, 238, "-", "-"); $gencount++; -140, "양홍",1570, 0, "낙양", 19, 17, 76, 0, 152, 199, "-", "-"); $gencount++; - 31, "양혼",1571, 0, "낙양", 60, 67, 63, 0, 220, 278, "-", "-"); $gencount++; -123, "여거",1572, 0, "낙양", 71, 58, 69, 0, 196, 256, "-", "-"); $gencount++; -130, "여대",1573, 0, "낙양", 83, 72, 70, 0, 161, 256, "-", "-"); $gencount++; -136, "염상",1574, 0, "낙양", 29, 27, 69, 0, 158, 199, "-", "-"); $gencount++; - 36, "염행",1575, 0, "낙양", 70, 86, 38, 0, 159, 222, "-", "-"); $gencount++; - 73, "영수",1576, 0, "낙양", 69, 70, 74, 0, 234, 264, "-", "-"); $gencount++; - 39, "오거",1577, 0, "낙양", 49, 63, 32, 0, 151, 211, "-", "-"); $gencount++; -126, "오경",1578, 0, "낙양", 73, 60, 57, 0, 159, 203, "-", "-"); $gencount++; -999, "오국태",1579, 0, "낙양", 31, 11, 60, 0, 161, 222, "-", "-"); $gencount++; -126, "오찬",1580, 0, "낙양", 69, 41, 78, 0, 181, 245, "-", "-"); $gencount++; - 23, "온회",1581, 0, "낙양", 42, 40, 78, 0, 178, 222, "-", "-"); $gencount++; - 21, "왕기2",1582, 0, "낙양", 70, 66, 63, 0, 217, 281, "-", "-"); $gencount++; - 32, "왕도",1583, 0, "낙양", 48, 44, 70, 0, 210, 269, "-", "-"); $gencount++; -123, "왕돈",1584, 0, "낙양", 60, 65, 41, 0, 198, 256, "-", "-"); $gencount++; - 34, "왕릉",1585, 0, "낙양", 73, 60, 71, 0, 172, 251, "-", "-"); $gencount++; - 63, "왕문",1586, 0, "낙양", 64, 67, 32, 0, 162, 205, "-", "-"); $gencount++; - 32, "왕상",1587, 0, "낙양", 25, 19, 65, 0, 180, 268, "-", "-"); $gencount++; - 34, "왕숙",1588, 0, "낙양", 35, 21, 80, 0, 195, 256, "-", "-"); $gencount++; - 33, "왕업",1589, 0, "낙양", 32, 6, 46, 0, 220, 280, "-", "-"); $gencount++; - 35, "왕충",1590, 0, "낙양", 42, 58, 21, 0, 152, 214, "-", "-"); $gencount++; - 1, "우보",1591, 0, "낙양", 43, 63, 12, 0, 159, 192, "-", "-"); $gencount++; -122, "우사",1592, 0, "낙양", 70, 33, 79, 0, 217, 273, "-", "-"); $gencount++; -138, "원요",1593, 0, "낙양", 44, 42, 45, 0, 177, 206, "-", "-"); $gencount++; - 95, "원유",1594, 0, "낙양", 57, 38, 73, 0, 150, 193, "-", "-"); $gencount++; - 31, "위관",1595, 0, "낙양", 69, 45, 81, 0, 220, 291, "-", "-"); $gencount++; -129, "위막",1596, 0, "낙양", 58, 62, 60, 0, 221, 268, "-", "-"); $gencount++; - 55, "유괴",1597, 0, "낙양", 75, 72, 66, 0, 165, 214, "-", "-"); $gencount++; -129, "유략",1598, 0, "낙양", 72, 68, 59, 0, 206, 260, "-", "-"); $gencount++; - 45, "유반",1599, 0, "낙양", 74, 79, 48, 0, 168, 210, "-", "-"); $gencount++; - 29, "유복",1600, 0, "낙양", 54, 50, 73, 0, 164, 208, "-", "-"); $gencount++; - 78, "유선2",1601, 0, "낙양", 9, 21, 39, 0, 224, 264, "-", "-"); $gencount++; -139, "유섭",1602, 0, "낙양", 62, 79, 26, 0, 158, 190, "-", "-"); $gencount++; - 28, "유소",1603, 0, "낙양", 66, 51, 73, 0, 195, 264, "-", "-"); $gencount++; -128, "유승",1604, 0, "낙양", 46, 69, 29, 0, 215, 258, "-", "-"); $gencount++; -129, "유찬",1605, 0, "낙양", 74, 75, 66, 0, 172, 255, "-", "-"); $gencount++; -129, "유평",1606, 0, "낙양", 65, 70, 67, 0, 218, 272, "-", "-"); $gencount++; -138, "유훈",1607, 0, "낙양", 51, 64, 50, 0, 163, 216, "-", "-"); $gencount++; - 48, "이감",1608, 0, "낙양", 59, 67, 33, 0, 176, 211, "-", "-"); $gencount++; - 19, "이승",1609, 0, "낙양", 13, 26, 32, 0, 201, 249, "-", "-"); $gencount++; - 22, "이통",1610, 0, "낙양", 75, 84, 52, 0, 168, 211, "-", "-"); $gencount++; -138, "이풍2",1611, 0, "낙양", 72, 77, 50, 0, 158, 199, "-", "-"); $gencount++; - 20, "이풍3",1612, 0, "낙양", 23, 25, 71, 0, 204, 254, "-", "-"); $gencount++; - 29, "장구",1613, 0, "낙양", 69, 71, 47, 0, 201, 263, "-", "-"); $gencount++; - 21, "장기",1614, 0, "낙양", 77, 35, 79, 0, 170, 223, "-", "-"); $gencount++; - 74, "장남",1615, 0, "낙양", 71, 64, 38, 0, 187, 222, "-", "-"); $gencount++; -100, "장막",1616, 0, "낙양", 53, 52, 70, 0, 155, 195, "-", "-"); $gencount++; - 7, "장만성",1617, 0, "낙양", 73, 83, 47, 0, 143, 184, "-", "-"); $gencount++; -135, "장반",1618, 0, "낙양", 56, 73, 66, 0, 227, 282, "-", "-"); $gencount++; - 78, "장빈",1619, 0, "낙양", 30, 28, 67, 0, 216, 263, "-", "-"); $gencount++; -124, "장승",1620, 0, "낙양", 75, 68, 75, 0, 178, 244, "-", "-"); $gencount++; -999, "장양2",1621, 0, "낙양", 58, 50, 47, 0, 130, 184, "-", "-"); $gencount++; - 68, "장억",1622, 0, "낙양", 82, 80, 54, 0, 190, 254, "-", "-"); $gencount++; - 75, "장준",1623, 0, "낙양", 65, 67, 66, 0, 224, 263, "-", "-"); $gencount++; - 20, "장집",1624, 0, "낙양", 31, 27, 74, 0, 196, 254, "-", "-"); $gencount++; - 39, "장특",1625, 0, "낙양", 71, 53, 74, 0, 209, 265, "-", "-"); $gencount++; - 96, "저곡",1626, 0, "낙양", 57, 53, 67, 0, 184, 204, "-", "-"); $gencount++; -128, "전기",1627, 0, "낙양", 51, 69, 55, 0, 231, 258, "-", "-"); $gencount++; - 23, "전만",1628, 0, "낙양", 52, 74, 38, 0, 181, 235, "-", "-"); $gencount++; -128, "전상",1629, 0, "낙양", 5, 6, 11, 0, 208, 258, "-", "-"); $gencount++; -130, "전역",1630, 0, "낙양", 60, 62, 37, 0, 212, 265, "-", "-"); $gencount++; - 75, "전예",1631, 0, "낙양", 80, 62, 83, 0, 171, 252, "-", "-"); $gencount++; - 64, "전해",1632, 0, "낙양", 71, 63, 57, 0, 154, 199, "-", "-"); $gencount++; -123, "정봉2",1633, 0, "낙양", 67, 68, 52, 0, 198, 266, "-", "-"); $gencount++; - 22, "정의",1634, 0, "낙양", 17, 3, 66, 0, 184, 220, "-", "-"); $gencount++; - 81, "제갈교",1635, 0, "낙양", 55, 17, 77, 0, 204, 228, "-", "-"); $gencount++; - 40, "제갈서",1636, 0, "낙양", 45, 43, 27, 0, 218, 286, "-", "-"); $gencount++; - 25, "조충",1637, 0, "낙양", 14, 7, 80, 0, 196, 208, "-", "-"); $gencount++; -121, "종리목",1638, 0, "낙양", 84, 68, 75, 0, 214, 269, "-", "-"); $gencount++; - 22, "종육",1639, 0, "낙양", 27, 11, 71, 0, 223, 263, "-", "-"); $gencount++; -122, "좌혁",1640, 0, "낙양", 60, 66, 51, 0, 232, 280, "-", "-"); $gencount++; - 36, "주령",1641, 0, "낙양", 77, 70, 69, 0, 170, 236, "-", "-"); $gencount++; -115, "주앙",1642, 0, "낙양", 75, 64, 64, 0, 162, 195, "-", "-"); $gencount++; - 52, "주포",1643, 0, "낙양", 59, 72, 12, 0, 191, 225, "-", "-"); $gencount++; - 11, "주흔",1644, 0, "낙양", 67, 53, 77, 0, 159, 196, "-", "-"); $gencount++; -140, "진기",1645, 0, "낙양", 58, 67, 46, 0, 165, 198, "-", "-"); $gencount++; -142, "진란",1646, 0, "낙양", 65, 70, 43, 0, 157, 204, "-", "-"); $gencount++; - 25, "진랑",1647, 0, "낙양", 57, 70, 38, 0, 192, 234, "-", "-"); $gencount++; - 12, "진응",1648, 0, "낙양", 62, 69, 49, 0, 172, 208, "-", "-"); $gencount++; -124, "진표",1649, 0, "낙양", 62, 49, 74, 0, 204, 237, "-", "-"); $gencount++; -999, "채염",1650, 0, "낙양", 40, 22, 64, 0, 168, 237, "-", "-"); $gencount++; -999, "초선",1651, 0, "낙양", 66, 15, 72, 0, 176, 211, "-", "-"); $gencount++; -135, "초이",1652, 0, "낙양", 54, 65, 55, 0, 219, 266, "-", "-"); $gencount++; - 65, "추단",1653, 0, "낙양", 63, 71, 36, 0, 148, 193, "-", "-"); $gencount++; -999, "추씨",1654, 0, "낙양", 36, 13, 54, 0, 165, 225, "-", "-"); $gencount++; - 71, "추정",1655, 0, "낙양", 67, 65, 66, 0, 144, 193, "-", "-"); $gencount++; -145, "파재",1656, 0, "낙양", 69, 75, 52, 0, 145, 184, "-", "-"); $gencount++; - 22, "포신",1657, 0, "낙양", 78, 60, 83, 0, 152, 192, "-", "-"); $gencount++; -114, "하식",1658, 0, "낙양", 18, 38, 29, 0, 230, 284, "-", "-"); $gencount++; - 36, "하안",1659, 0, "낙양", 6, 27, 72, 0, 190, 249, "-", "-"); $gencount++; -999, "하후씨",1660, 0, "낙양", 29, 16, 47, 0, 186, 249, "-", "-"); $gencount++; - 5, "학맹",1661, 0, "낙양", 57, 66, 41, 0, 156, 197, "-", "-"); $gencount++; - 98, "한거자",1662, 0, "낙양", 53, 59, 30, 0, 158, 200, "-", "-"); $gencount++; - 19, "한덕",1663, 0, "낙양", 62, 79, 24, 0, 171, 228, "-", "-"); $gencount++; -140, "한윤",1664, 0, "낙양", 27, 24, 68, 0, 155, 197, "-", "-"); $gencount++; -999, "허소",1665, 0, "낙양", 53, 27, 60, 0, 150, 195, "-", "-"); $gencount++; - 30, "호열",1666, 0, "낙양", 77, 69, 76, 0, 225, 272, "-", "-"); $gencount++; - 76, "호제",1667, 0, "낙양", 58, 42, 68, 0, 207, 264, "-", "-"); $gencount++; -149, "호진",1668, 0, "낙양", 65, 77, 13, 0, 146, 190, "-", "-"); $gencount++; - 29, "호질",1669, 0, "낙양", 73, 50, 75, 0, 192, 250, "-", "-"); $gencount++; - 7, "환계",1670, 0, "낙양", 12, 25, 67, 0, 156, 221, "-", "-"); $gencount++; - 56, "황숭",1671, 0, "낙양", 68, 64, 74, 0, 208, 263, "-", "-"); $gencount++; -999, "황승언",1672, 0, "낙양", 68, 17, 81, 0, 165, 222, "-", "-"); $gencount++; -999, "황월영",1673, 0, "낙양", 58, 14, 75, 0, 186, 235, "-", "-"); $gencount++; - 45, "황조",1674, 0, "낙양", 74, 65, 57, 0, 148, 208, "-", "-"); $gencount++; - 48, "후선",1675, 0, "낙양", 56, 66, 35, 0, 175, 228, "-", "-"); $gencount++; - 8, "휴고",1676, 0, "낙양", 61, 72, 40, 0, 151, 199, "-", "-"); $gencount++; - 98, "휴원진",1677, 0, "낙양", 53, 63, 38, 0, 155, 200, "-", "-"); $gencount++; - 22, "희지재",1678, 0, "낙양", 24, 5, 86, 0, 157, 194, "-", "-"); $gencount++; diff --git a/che/index.php b/che/index.php deleted file mode 100644 index 3e8e5e49..00000000 --- a/che/index.php +++ /dev/null @@ -1,9 +0,0 @@ - - -삼국지 모의전투 유기체서버 - - - - - - diff --git a/che/install.php b/che/install.php deleted file mode 100644 index 43790b5c..00000000 --- a/che/install.php +++ /dev/null @@ -1,91 +0,0 @@ -
재설치하려면 해당 파일을 지우세요"); - - @chmod(".",0707); -?> - - - - - - - -


-

- + @@ -191,7 +191,7 @@ if($me['userlevel'] >= 5) { - + @@ -226,7 +226,7 @@ if($me['userlevel'] >= 5) { - +
삼국지 모의전투 PHP 유기체서버 (0?"cyan":"white";?>>)
@@ -251,7 +251,7 @@ if($me['userlevel'] >= 5) { - + "; - $str2 = ""; + $str1 = ""; + $str2 = ""; if($per <= 0) { $str1 = ""; } elseif($per >= 100) { $str2 = ""; } if($skin == 0) { diff --git a/twe/main.php b/twe/main.php index f11ed29c..4b60f6fc 100644 --- a/twe/main.php +++ b/twe/main.php @@ -57,10 +57,13 @@ $scenario = getScenario(); 메인 - + type=text/css> + + + From d2abd6daf210db34dede8f9b532642c8a831a16c Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Jan 2018 22:08:15 +0900 Subject: [PATCH 108/622] =?UTF-8?q?oncontextmenu,=20ondragstart=20?= =?UTF-8?q?=EA=B8=88=EC=A7=80=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=20=EC=9A=B0=ED=81=B4=EB=A6=AD=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_config/config.php | 3 --- i_other/help.php | 2 +- i_other/screenshot.php | 2 +- twe/_119.php | 4 ++-- twe/_admin1.php | 4 ++-- twe/_admin2.php | 4 ++-- twe/_admin3.php | 4 ++-- twe/_admin4.php | 4 ++-- twe/_admin5.php | 4 ++-- twe/_admin6.php | 4 ++-- twe/_admin7.php | 4 ++-- twe/_admin8.php | 4 ++-- twe/_simul.php | 2 +- twe/a_bestGeneral.php | 2 +- twe/a_emperior.php | 2 +- twe/a_emperior2.php | 2 +- twe/a_genList.php | 2 +- twe/a_hallOfFame.php | 2 +- twe/a_history.php | 2 +- twe/a_kingdomList.php | 2 +- twe/a_npcList.php | 2 +- twe/a_status.php | 2 +- twe/a_traffic.php | 2 +- twe/a_vote.php | 2 +- twe/b_auction.php | 2 +- twe/b_battleCenter.php | 2 +- twe/b_betting.php | 2 +- twe/b_chiefboard.php | 2 +- twe/b_chiefcenter.php | 2 +- twe/b_currentCity.php | 2 +- twe/b_dipcenter.php | 2 +- twe/b_diplomacy.php | 2 +- twe/b_genList.php | 2 +- twe/b_myBossInfo.php | 2 +- twe/b_myCityInfo.php | 2 +- twe/b_myGenInfo.php | 2 +- twe/b_myKingdomInfo.php | 2 +- twe/b_myPage.php | 2 +- twe/b_nationboard.php | 2 +- twe/b_nationrule.php | 2 +- twe/b_tournament.php | 2 +- twe/b_troop.php | 2 +- twe/commandlist.php | 2 +- twe/css/common.css | 51 ++++++++++++++++++++++++++++++++++++++++- twe/event_1.php | 2 +- twe/event_2.php | 2 +- twe/event_3.php | 2 +- twe/event_4.php | 4 ++-- twe/func_legacy.php | 2 +- twe/join.php | 2 +- twe/main.php | 2 +- twe/map.php | 4 ++-- twe/msglist.php | 2 +- twe/npc_login.php | 2 +- twe/processing.php | 2 +- twe/select_npc.php | 2 +- 56 files changed, 115 insertions(+), 69 deletions(-) diff --git a/f_config/config.php b/f_config/config.php index 4d2d4897..2da12dbf 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -52,6 +52,3 @@ define('INSTALL', 'install'); define('SLEEP', 'sleep'); define('BLOCKBODY', ''); -//define('BLOCKBODY', 'oncontextmenu="return false" onselectstart="return false" ondragstart="return false"'); - - diff --git a/i_other/help.php b/i_other/help.php index 3038ef68..9fd5a23c 100644 --- a/i_other/help.php +++ b/i_other/help.php @@ -56,7 +56,7 @@ font { font-family:'맑은 고딕'; line-height:110%; } - +
@@ -259,7 +259,7 @@ if($me['userlevel'] >= 5) {
From 1b675eabe2cc888c09705f45f2a7e8bdc126ce0a Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:27:11 +0900 Subject: [PATCH 089/622] =?UTF-8?q?onlinenum=EC=9D=84=20=EB=8B=A8=EC=88=9C?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/a_traffic.php | 2 +- twe/func.php | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/twe/a_traffic.php b/twe/a_traffic.php index 54429946..1005941a 100644 --- a/twe/a_traffic.php +++ b/twe/a_traffic.php @@ -17,7 +17,7 @@ $str = ""; for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } echo $str; -$curonline = onlinenum($connect); +$curonline = getOnlineNum(); for($i=0; $i < 11; $i++) { $parse = explode("|", $log[count($log)-12+$i]); $date[$i] = trim($parse[0]); diff --git a/twe/func.php b/twe/func.php index 71ceeac0..6bef2d8d 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1981,20 +1981,10 @@ function adminMsg($connect, $skin=1) { echo $admin['msg'].""; } - -function getOnlineNumEx(){ +function getOnlineNum() { return newDB()->queryFirstField('select `online` from `game` where `no`=1'); } - - -function onlinenum($connect) { - $query = "select online from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - return $game['online']; -} - function onlinegen($connect) { $onlinegen = ""; if($_SESSION['p_nation'] == 0) { @@ -2349,7 +2339,7 @@ function increateRefreshEx($type, $cnt=1){ $date = date('Y_m_d H:i:s'); $date2 = substr($date, 0, 10); - $online = onlinenum($connect); + $online = getOnlineNum(); $fp = fopen("logs/_{$date2}_refresh.txt", "a"); $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; fwrite($fp, $msg."\n"); @@ -2401,7 +2391,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { $date = date('Y_m_d H:i:s'); $date2 = substr($date, 0, 10); - $online = onlinenum($connect); + $online = getOnlineNum(); $fp = fopen("logs/_{$date2}_refresh.txt", "a"); $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; fwrite($fp, $msg."\n"); @@ -2437,7 +2427,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { } function updateTraffic($connect) { - $online = onlinenum($connect); + $online = getOnlineNum(); $query = "select year,month,refresh,maxonline,maxrefresh from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2474,7 +2464,7 @@ function CheckOverhead($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $onlineNumber = onlinenum($connect); + $onlineNumber = getOnlineNum(); switch($admin['turnterm']) { case 0: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 120분턴 case 1: $thr1 = 30; $thr2 = 60; $thr3 = 120; $con1 = 480; $con2 = 360; $con3 = 240; $con4 = 120; break; // 60분턴 From 1a5e67233f84ae5923f3c78da2e6953387a1770f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:32:52 +0900 Subject: [PATCH 090/622] =?UTF-8?q?isLock,=20lock,=20unlock=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/twe/func.php b/twe/func.php index 6bef2d8d..45ae59fa 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2501,31 +2501,24 @@ function CheckOverhead($connect) { } } -function isLock($connect) { - $query = "select plock from plock where no=1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $plock = MYDB_fetch_array($result); - - if($plock['plock'] == 0) { return 0; } // 열려있음 - else { return 1; } // 사용중 +function isLock() { + return newDB()->queryFirstColumn("select plock from plock where no=1") != 0; } -function lock($connect) { +function lock() { + //NOTE: 게임 로직과 관련한 모든 insert, update 함수들은 lock을 거칠것을 권장함. + $db = newDB(); //테이블 락 - $query = "lock tables plock write"; - @MYDB_query($query, $connect); + $db->query("lock tables plock write"); // 잠금 - $query = "update plock set plock=1 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $db->query("update plock set plock=1 where no=1"); //테이블 언락 - $query = "unlock tables"; - @MYDB_query($query, $connect); + $db->query("unlock tables"); } -function unlock($connect) { +function unlock() { // 풀림 - $query = "update plock set plock=0 where no=1"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + newDB()->query("update plock set plock=0 where no=1"); } function timeover($connect) { @@ -2632,7 +2625,7 @@ function checkTurn($connect) { // 잦은 갱신 금지 현재 10초당 1회 if(!timeover($connect)) { return; } // 현재 처리중이면 접근 불가 - if(isLock($connect)) { return; } + if(isLock()) { return; } $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); @@ -2645,9 +2638,9 @@ function checkTurn($connect) { //if(!@sem_acquire($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } // 현재 처리중이면 접근 불가 - if(isLock($connect)) { return; } + if(isLock()) { return; } // 락 걸고 처리 - lock($connect); + lock(); // 파일락 해제 if(!flock($fp, LOCK_UN)) { return; } @@ -2725,7 +2718,7 @@ function checkTurn($connect) { // 잡금 해제 //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); - unlock($connect); + unlock(); return false; } @@ -2847,7 +2840,7 @@ function checkTurn($connect) { processAuction($connect); // 잡금 해제 //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); - unlock($connect); + unlock(); $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); From da73997385824f4a2d0f147e8dba4bcc9ff6149a Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:35:47 +0900 Subject: [PATCH 091/622] =?UTF-8?q?meekroDB=20=EC=97=90=EC=84=9C=EB=8A=94?= =?UTF-8?q?=20=EC=88=AB=EC=9E=90=EB=8A=94=20%i=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/j_msgsubmit.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 86933be3..8369642f 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -99,7 +99,7 @@ if($src_nation_id == 0) { $src_color = '#FFFFFF'; } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i_nation",array( 'nation' => $src_nation_id )); $src_nation = $nation['name']; @@ -128,9 +128,7 @@ if($dest == 9999) { } elseif($dest >= 9000) { $real_nation = $dest - 9000; $query = "select nation,name,color from nation where nation='$genlist'"; - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( - 'nation' => $real_nation - )); + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$real_nation); if($nation === NULL || empty($nation)){ $dest = 9998; @@ -207,8 +205,7 @@ if($dest == 9999) { $_SESSION['last_msg'] = $date; - $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s_p_id',array( - 'p_id'=>$dest)); + $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$dest); if($dest_user == NULL || empty($dest_user)){ header('Content-Type: application/json'); @@ -226,9 +223,7 @@ if($dest == 9999) { $dest_color = str_replace('##', '#', $dest_color); } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( - 'nation' => $dest_user['nation'] - )); + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$dest_user['nation']); $dest_nation = $nation['name']; $dest_color = '#'.$nation['color']; $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 From 5ac2f4e27d934c6613b919f0bd970c6a2b70c711 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:43:33 +0900 Subject: [PATCH 092/622] =?UTF-8?q?converter=EC=97=90=EC=84=9C=20=EB=A7=8E?= =?UTF-8?q?=EC=9D=80=20"=EB=A5=BC=20'=EB=A1=9C=20=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - html tag의 attribute에서 안전하게 "를 쓰기 위하여 - PHP 변수가 들어가는 경우를 줄이기 위한 카운트 --- twe/func_converter.php | 1111 ++++++++++++++++++++-------------------- 1 file changed, 556 insertions(+), 555 deletions(-) diff --git a/twe/func_converter.php b/twe/func_converter.php index 9f2fc437..ced27bf8 100644 --- a/twe/func_converter.php +++ b/twe/func_converter.php @@ -11,31 +11,31 @@ function getScenario() { $scenario = newDB()->queryFirstColumn("select `scenario` from `game` where no=1"); switch($scenario) { - case 0: $str = "공백지모드"; break; - case 1: $str = "역사모드1 : 184년 황건적의 난"; break; - case 2: $str = "역사모드2 : 190년 반동탁연합"; break; - case 3: $str = "역사모드3 : 194년 군웅할거"; break; - case 4: $str = "역사모드4 : 196년 황제는 허도로"; break; - case 5: $str = "역사모드5 : 200년 관도대전"; break; - case 6: $str = "역사모드6 : 202년 원가의 분열"; break; - case 7: $str = "역사모드7 : 207년 적벽대전"; break; - case 8: $str = "역사모드8 : 213년 익주 공방전"; break; - case 9: $str = "역사모드9 : 219년 삼국정립"; break; - case 10: $str = "역사모드10 : 225년 칠종칠금"; break; - case 11: $str = "역사모드11 : 228년 출사표"; break; + case 0: $str = '공백지모드'; break; + case 1: $str = '역사모드1 : 184년 황건적의 난'; break; + case 2: $str = '역사모드2 : 190년 반동탁연합'; break; + case 3: $str = '역사모드3 : 194년 군웅할거'; break; + case 4: $str = '역사모드4 : 196년 황제는 허도로'; break; + case 5: $str = '역사모드5 : 200년 관도대전'; break; + case 6: $str = '역사모드6 : 202년 원가의 분열'; break; + case 7: $str = '역사모드7 : 207년 적벽대전'; break; + case 8: $str = '역사모드8 : 213년 익주 공방전'; break; + case 9: $str = '역사모드9 : 219년 삼국정립'; break; + case 10: $str = '역사모드10 : 225년 칠종칠금'; break; + case 11: $str = '역사모드11 : 228년 출사표'; break; - case 12: $str = "IF모드1 : 191년 백마장군의 위세"; break; + case 12: $str = 'IF모드1 : 191년 백마장군의 위세'; break; - case 20: $str = "가상모드1 : 180년 영웅 난무"; break; - case 21: $str = "가상모드1 : 180년 영웅 집결"; break; - case 22: $str = "가상모드2 : 179년 훼신 집결"; break; - case 23: $str = "가상모드3 : 180년 영웅 시대"; break; - case 24: $str = "가상모드4 : 180년 결사항전"; break; - case 25: $str = "가상모드5 : 180년 영웅독존"; break; - case 26: $str = "가상모드6 : 180년 무풍지대"; break; - case 27: $str = "가상모드7 : 180년 가요대잔치"; break; - case 28: $str = "가상모드8 : 180년 확산성 밀리언 아서"; break; - default: $str = "시나리오?"; break; + case 20: $str = '가상모드1 : 180년 영웅 난무'; break; + case 21: $str = '가상모드1 : 180년 영웅 집결'; break; + case 22: $str = '가상모드2 : 179년 훼신 집결'; break; + case 23: $str = '가상모드3 : 180년 영웅 시대'; break; + case 24: $str = '가상모드4 : 180년 결사항전'; break; + case 25: $str = '가상모드5 : 180년 영웅독존'; break; + case 26: $str = '가상모드6 : 180년 무풍지대'; break; + case 27: $str = '가상모드7 : 180년 가요대잔치'; break; + case 28: $str = '가상모드8 : 180년 확산성 밀리언 아서'; break; + default: $str = '시나리오?'; break; } return $str; } @@ -43,19 +43,19 @@ function getScenario() { function NationCharCall($call) { switch($call) { - case "명가": $type =13; break; - case "음양가": $type =12; break; - case "종횡가": $type =11; break; - case "불가": $type =10; break; - case "도적": $type = 9; break; - case "오두미도":$type = 8; break; - case "태평도": $type = 7; break; - case "도가": $type = 6; break; - case "묵가": $type = 5; break; - case "덕가": $type = 4; break; - case "병가": $type = 3; break; - case "유가": $type = 2; break; - case "법가": $type = 1; break; + case '명가': $type =13; break; + case '음양가': $type =12; break; + case '종횡가': $type =11; break; + case '불가': $type =10; break; + case '도적': $type = 9; break; + case '오두미도':$type = 8; break; + case '태평도': $type = 7; break; + case '도가': $type = 6; break; + case '묵가': $type = 5; break; + case '덕가': $type = 4; break; + case '병가': $type = 3; break; + case '유가': $type = 2; break; + case '법가': $type = 1; break; default: $type = 0; break; } return $type; @@ -64,13 +64,13 @@ function NationCharCall($call) { function CityNameArray() { $cityNames = array( - "","업","허창","낙양","장안","성도","양양","건업","북평","남피","완","수춘","서주","강릉","장사", - "시상","위례","계","복양","진류","여남","하비","서량","하내","한중","상용","덕양","강주","건녕", - "남해","계양","오","평양","사비","계림","진양","평원","북해","초","패","천수","안정","홍농", - "하변","자동","영안","귀양","주시","운남","남영","교지","신야","강하","무릉","영릉","상동","여강", - "회계","고창","대","안평","졸본","이도","강","저","흉노","남만","산월","오환","왜","호관", - "호로","사곡","함곡","사수","양평","가맹","역경","계교","동황","관도","정도","합비","광릉","적도", - "가정","기산","면죽","이릉","장판","백랑","적벽","파양","탐라","유구" + '','업','허창','낙양','장안','성도','양양','건업','북평','남피','완','수춘','서주','강릉','장사', + '시상','위례','계','복양','진류','여남','하비','서량','하내','한중','상용','덕양','강주','건녕', + '남해','계양','오','평양','사비','계림','진양','평원','북해','초','패','천수','안정','홍농', + '하변','자동','영안','귀양','주시','운남','남영','교지','신야','강하','무릉','영릉','상동','여강', + '회계','고창','대','안평','졸본','이도','강','저','흉노','남만','산월','오환','왜','호관', + '호로','사곡','함곡','사수','양평','가맹','역경','계교','동황','관도','정도','합비','광릉','적도', + '가정','기산','면죽','이릉','장판','백랑','적벽','파양','탐라','유구' ); return $cityNames; } @@ -78,53 +78,53 @@ function CityNameArray() { function CityCall($call) { switch($call) { - case "업": $type = 1; break; case "허창": $type = 2; break; - case "낙양": $type = 3; break; case "장안": $type = 4; break; - case "성도": $type = 5; break; case "양양": $type = 6; break; - case "건업": $type = 7; break; case "북평": $type = 8; break; - case "남피": $type = 9; break; case "완": $type = 10; break; - case "수춘": $type = 11; break; case "서주": $type = 12; break; - case "강릉": $type = 13; break; case "장사": $type = 14; break; - case "시상": $type = 15; break; case "위례": $type = 16; break; - case "계": $type = 17; break; case "복양": $type = 18; break; - case "진류": $type = 19; break; case "여남": $type = 20; break; - case "하비": $type = 21; break; case "서량": $type = 22; break; - case "하내": $type = 23; break; case "한중": $type = 24; break; - case "상용": $type = 25; break; case "덕양": $type = 26; break; - case "강주": $type = 27; break; case "건녕": $type = 28; break; - case "남해": $type = 29; break; case "계양": $type = 30; break; - case "오": $type = 31; break; case "평양": $type = 32; break; - case "사비": $type = 33; break; case "계림": $type = 34; break; - case "진양": $type = 35; break; case "평원": $type = 36; break; - case "북해": $type = 37; break; case "초": $type = 38; break; - case "패": $type = 39; break; case "천수": $type = 40; break; - case "안정": $type = 41; break; case "홍농": $type = 42; break; - case "하변": $type = 43; break; case "자동": $type = 44; break; - case "영안": $type = 45; break; case "귀양": $type = 46; break; - case "주시": $type = 47; break; case "운남": $type = 48; break; - case "남영": $type = 49; break; case "교지": $type = 50; break; - case "신야": $type = 51; break; case "강하": $type = 52; break; - case "무릉": $type = 53; break; case "영릉": $type = 54; break; - case "상동": $type = 55; break; case "여강": $type = 56; break; - case "회계": $type = 57; break; case "고창": $type = 58; break; - case "대": $type = 59; break; case "안평": $type = 60; break; - case "졸본": $type = 61; break; case "이도": $type = 62; break; - case "강": $type = 63; break; case "저": $type = 64; break; - case "흉노": $type = 65; break; case "남만": $type = 66; break; - case "산월": $type = 67; break; case "오환": $type = 68; break; - case "왜": $type = 69; break; case "호관": $type = 70; break; - case "호로": $type = 71; break; case "사곡": $type = 72; break; - case "함곡": $type = 73; break; case "사수": $type = 74; break; - case "양평": $type = 75; break; case "가맹": $type = 76; break; - case "역경": $type = 77; break; case "계교": $type = 78; break; - case "동황": $type = 79; break; case "관도": $type = 80; break; - case "정도": $type = 81; break; case "합비": $type = 82; break; - case "광릉": $type = 83; break; case "적도": $type = 84; break; - case "가정": $type = 85; break; case "기산": $type = 86; break; - case "면죽": $type = 87; break; case "이릉": $type = 88; break; - case "장판": $type = 89; break; case "백랑": $type = 90; break; - case "적벽": $type = 91; break; case "파양": $type = 92; break; - case "탐라": $type = 93; break; case "유구": $type = 94; break; + case '업': $type = 1; break; case '허창': $type = 2; break; + case '낙양': $type = 3; break; case '장안': $type = 4; break; + case '성도': $type = 5; break; case '양양': $type = 6; break; + case '건업': $type = 7; break; case '북평': $type = 8; break; + case '남피': $type = 9; break; case '완': $type = 10; break; + case '수춘': $type = 11; break; case '서주': $type = 12; break; + case '강릉': $type = 13; break; case '장사': $type = 14; break; + case '시상': $type = 15; break; case '위례': $type = 16; break; + case '계': $type = 17; break; case '복양': $type = 18; break; + case '진류': $type = 19; break; case '여남': $type = 20; break; + case '하비': $type = 21; break; case '서량': $type = 22; break; + case '하내': $type = 23; break; case '한중': $type = 24; break; + case '상용': $type = 25; break; case '덕양': $type = 26; break; + case '강주': $type = 27; break; case '건녕': $type = 28; break; + case '남해': $type = 29; break; case '계양': $type = 30; break; + case '오': $type = 31; break; case '평양': $type = 32; break; + case '사비': $type = 33; break; case '계림': $type = 34; break; + case '진양': $type = 35; break; case '평원': $type = 36; break; + case '북해': $type = 37; break; case '초': $type = 38; break; + case '패': $type = 39; break; case '천수': $type = 40; break; + case '안정': $type = 41; break; case '홍농': $type = 42; break; + case '하변': $type = 43; break; case '자동': $type = 44; break; + case '영안': $type = 45; break; case '귀양': $type = 46; break; + case '주시': $type = 47; break; case '운남': $type = 48; break; + case '남영': $type = 49; break; case '교지': $type = 50; break; + case '신야': $type = 51; break; case '강하': $type = 52; break; + case '무릉': $type = 53; break; case '영릉': $type = 54; break; + case '상동': $type = 55; break; case '여강': $type = 56; break; + case '회계': $type = 57; break; case '고창': $type = 58; break; + case '대': $type = 59; break; case '안평': $type = 60; break; + case '졸본': $type = 61; break; case '이도': $type = 62; break; + case '강': $type = 63; break; case '저': $type = 64; break; + case '흉노': $type = 65; break; case '남만': $type = 66; break; + case '산월': $type = 67; break; case '오환': $type = 68; break; + case '왜': $type = 69; break; case '호관': $type = 70; break; + case '호로': $type = 71; break; case '사곡': $type = 72; break; + case '함곡': $type = 73; break; case '사수': $type = 74; break; + case '양평': $type = 75; break; case '가맹': $type = 76; break; + case '역경': $type = 77; break; case '계교': $type = 78; break; + case '동황': $type = 79; break; case '관도': $type = 80; break; + case '정도': $type = 81; break; case '합비': $type = 82; break; + case '광릉': $type = 83; break; case '적도': $type = 84; break; + case '가정': $type = 85; break; case '기산': $type = 86; break; + case '면죽': $type = 87; break; case '이릉': $type = 88; break; + case '장판': $type = 89; break; case '백랑': $type = 90; break; + case '적벽': $type = 91; break; case '파양': $type = 92; break; + case '탐라': $type = 93; break; case '유구': $type = 94; break; } return $type; } @@ -132,53 +132,53 @@ function CityCall($call) { function CityNum($num) { switch($num) { - case 1: $call = "업" ; break; case 2: $call = "허창"; break; - case 3: $call = "낙양"; break; case 4: $call = "장안"; break; - case 5: $call = "성도"; break; case 6: $call = "양양"; break; - case 7: $call = "건업"; break; case 8: $call = "북평"; break; - case 9: $call = "남피"; break; case 10: $call = "완" ; break; - case 11: $call = "수춘"; break; case 12: $call = "서주"; break; - case 13: $call = "강릉"; break; case 14: $call = "장사"; break; - case 15: $call = "시상"; break; case 16: $call = "위례"; break; - case 17: $call = "계" ; break; case 18: $call = "복양"; break; - case 19: $call = "진류"; break; case 20: $call = "여남"; break; - case 21: $call = "하비"; break; case 22: $call = "서량"; break; - case 23: $call = "하내"; break; case 24: $call = "한중"; break; - case 25: $call = "상용"; break; case 26: $call = "덕양"; break; - case 27: $call = "강주"; break; case 28: $call = "건녕"; break; - case 29: $call = "남해"; break; case 30: $call = "계양"; break; - case 31: $call = "오" ; break; case 32: $call = "평양"; break; - case 33: $call = "사비"; break; case 34: $call = "계림"; break; - case 35: $call = "진양"; break; case 36: $call = "평원"; break; - case 37: $call = "북해"; break; case 38: $call = "초" ; break; - case 39: $call = "패" ; break; case 40: $call = "천수"; break; - case 41: $call = "안정"; break; case 42: $call = "홍농"; break; - case 43: $call = "하변"; break; case 44: $call = "자동"; break; - case 45: $call = "영안"; break; case 46: $call = "귀양"; break; - case 47: $call = "주시"; break; case 48: $call = "운남"; break; - case 49: $call = "남영"; break; case 50: $call = "교지"; break; - case 51: $call = "신야"; break; case 52: $call = "강하"; break; - case 53: $call = "무릉"; break; case 54: $call = "영릉"; break; - case 55: $call = "상동"; break; case 56: $call = "여강"; break; - case 57: $call = "회계"; break; case 58: $call = "고창"; break; - case 59: $call = "대" ; break; case 60: $call = "안평"; break; - case 61: $call = "졸본"; break; case 62: $call = "이도"; break; - case 63: $call = "강" ; break; case 64: $call = "저" ; break; - case 65: $call = "흉노"; break; case 66: $call = "남만"; break; - case 67: $call = "산월"; break; case 68: $call = "오환"; break; - case 69: $call = "왜" ; break; case 70: $call = "호관"; break; - case 71: $call = "호로"; break; case 72: $call = "사곡"; break; - case 73: $call = "함곡"; break; case 74: $call = "사수"; break; - case 75: $call = "양평"; break; case 76: $call = "가맹"; break; - case 77: $call = "역경"; break; case 78: $call = "계교"; break; - case 79: $call = "동황"; break; case 80: $call = "관도"; break; - case 81: $call = "정도"; break; case 82: $call = "합비"; break; - case 83: $call = "광릉"; break; case 84: $call = "적도"; break; - case 85: $call = "가정"; break; case 86: $call = "기산"; break; - case 87: $call = "면죽"; break; case 88: $call = "이릉"; break; - case 89: $call = "장판"; break; case 90: $call = "백랑"; break; - case 91: $call = "적벽"; break; case 92: $call = "파양"; break; - case 93: $call = "탐라"; break; case 94: $call = "유구"; break; + case 1: $call = '업' ; break; case 2: $call = '허창'; break; + case 3: $call = '낙양'; break; case 4: $call = '장안'; break; + case 5: $call = '성도'; break; case 6: $call = '양양'; break; + case 7: $call = '건업'; break; case 8: $call = '북평'; break; + case 9: $call = '남피'; break; case 10: $call = '완' ; break; + case 11: $call = '수춘'; break; case 12: $call = '서주'; break; + case 13: $call = '강릉'; break; case 14: $call = '장사'; break; + case 15: $call = '시상'; break; case 16: $call = '위례'; break; + case 17: $call = '계' ; break; case 18: $call = '복양'; break; + case 19: $call = '진류'; break; case 20: $call = '여남'; break; + case 21: $call = '하비'; break; case 22: $call = '서량'; break; + case 23: $call = '하내'; break; case 24: $call = '한중'; break; + case 25: $call = '상용'; break; case 26: $call = '덕양'; break; + case 27: $call = '강주'; break; case 28: $call = '건녕'; break; + case 29: $call = '남해'; break; case 30: $call = '계양'; break; + case 31: $call = '오' ; break; case 32: $call = '평양'; break; + case 33: $call = '사비'; break; case 34: $call = '계림'; break; + case 35: $call = '진양'; break; case 36: $call = '평원'; break; + case 37: $call = '북해'; break; case 38: $call = '초' ; break; + case 39: $call = '패' ; break; case 40: $call = '천수'; break; + case 41: $call = '안정'; break; case 42: $call = '홍농'; break; + case 43: $call = '하변'; break; case 44: $call = '자동'; break; + case 45: $call = '영안'; break; case 46: $call = '귀양'; break; + case 47: $call = '주시'; break; case 48: $call = '운남'; break; + case 49: $call = '남영'; break; case 50: $call = '교지'; break; + case 51: $call = '신야'; break; case 52: $call = '강하'; break; + case 53: $call = '무릉'; break; case 54: $call = '영릉'; break; + case 55: $call = '상동'; break; case 56: $call = '여강'; break; + case 57: $call = '회계'; break; case 58: $call = '고창'; break; + case 59: $call = '대' ; break; case 60: $call = '안평'; break; + case 61: $call = '졸본'; break; case 62: $call = '이도'; break; + case 63: $call = '강' ; break; case 64: $call = '저' ; break; + case 65: $call = '흉노'; break; case 66: $call = '남만'; break; + case 67: $call = '산월'; break; case 68: $call = '오환'; break; + case 69: $call = '왜' ; break; case 70: $call = '호관'; break; + case 71: $call = '호로'; break; case 72: $call = '사곡'; break; + case 73: $call = '함곡'; break; case 74: $call = '사수'; break; + case 75: $call = '양평'; break; case 76: $call = '가맹'; break; + case 77: $call = '역경'; break; case 78: $call = '계교'; break; + case 79: $call = '동황'; break; case 80: $call = '관도'; break; + case 81: $call = '정도'; break; case 82: $call = '합비'; break; + case 83: $call = '광릉'; break; case 84: $call = '적도'; break; + case 85: $call = '가정'; break; case 86: $call = '기산'; break; + case 87: $call = '면죽'; break; case 88: $call = '이릉'; break; + case 89: $call = '장판'; break; case 90: $call = '백랑'; break; + case 91: $call = '적벽'; break; case 92: $call = '파양'; break; + case 93: $call = '탐라'; break; case 94: $call = '유구'; break; } return $call; } @@ -186,60 +186,60 @@ function CityNum($num) { function CharCall($call) { switch($call) { - case "은둔": $type =10; break; - case "안전"; $type = 9; break; - case "유지"; $type = 8; break; - case "재간"; $type = 7; break; - case "출세"; $type = 6; break; - case "할거"; $type = 5; break; - case "정복"; $type = 4; break; - case "패권"; $type = 3; break; - case "의협"; $type = 2; break; - case "대의"; $type = 1; break; - case "왕좌"; $type = 0; break; + case '은둔': $type =10; break; + case '안전'; $type = 9; break; + case '유지'; $type = 8; break; + case '재간'; $type = 7; break; + case '출세'; $type = 6; break; + case '할거'; $type = 5; break; + case '정복'; $type = 4; break; + case '패권'; $type = 3; break; + case '의협'; $type = 2; break; + case '대의'; $type = 1; break; + case '왕좌'; $type = 0; break; } return $type; } function SpecCall($call) { switch($call) { - case "-": $type = 0; break; - case "경작": $type = 1; break; - case "상재": $type = 2; break; - case "발명": $type = 3; break; + case '-': $type = 0; break; + case '경작': $type = 1; break; + case '상재': $type = 2; break; + case '발명': $type = 3; break; - case "축성": $type = 10; break; - case "수비": $type = 11; break; - case "통찰": $type = 12; break; + case '축성': $type = 10; break; + case '수비': $type = 11; break; + case '통찰': $type = 12; break; - case "인덕": $type = 20; break; + case '인덕': $type = 20; break; - case "거상": $type = 30; break; - case "귀모": $type = 31; break; + case '거상': $type = 30; break; + case '귀모': $type = 31; break; - case "귀병": $type = 40; break; - case "신산": $type = 41; break; - case "환술": $type = 42; break; - case "집중": $type = 43; break; - case "신중": $type = 44; break; - case "반계": $type = 45; break; + case '귀병': $type = 40; break; + case '신산': $type = 41; break; + case '환술': $type = 42; break; + case '집중': $type = 43; break; + case '신중': $type = 44; break; + case '반계': $type = 45; break; - case "보병": $type = 50; break; - case "궁병": $type = 51; break; - case "기병": $type = 52; break; - case "공성": $type = 53; break; + case '보병': $type = 50; break; + case '궁병': $type = 51; break; + case '기병': $type = 52; break; + case '공성': $type = 53; break; - case "돌격": $type = 60; break; - case "무쌍": $type = 61; break; - case "견고": $type = 62; break; - case "위압": $type = 63; break; + case '돌격': $type = 60; break; + case '무쌍': $type = 61; break; + case '견고': $type = 62; break; + case '위압': $type = 63; break; - case "저격": $type = 70; break; - case "필살": $type = 71; break; - case "징병": $type = 72; break; - case "의술": $type = 73; break; - case "격노": $type = 74; break; - case "척사": $type = 75; break; + case '저격': $type = 70; break; + case '필살': $type = 71; break; + case '징병': $type = 72; break; + case '의술': $type = 73; break; + case '격노': $type = 74; break; + case '척사': $type = 75; break; } return $type; } @@ -247,30 +247,30 @@ function SpecCall($call) { function getCityLevel($level) { switch($level) { - case 8: $call = "특"; break; - case 7: $call = "대"; break; - case 6: $call = "중"; break; - case 5: $call = "소"; break; - case 4: $call = "이"; break; - case 3: $call = "관"; break; - case 2: $call = "진"; break; - case 1: $call = "수"; break; - default:$call = "?"; break; + case 8: $call = '특'; break; + case 7: $call = '대'; break; + case 6: $call = '중'; break; + case 5: $call = '소'; break; + case 4: $call = '이'; break; + case 3: $call = '관'; break; + case 2: $call = '진'; break; + case 1: $call = '수'; break; + default:$call = '?'; break; } return $call; } function getRegion($region) { switch($region) { - case 8: $call = "동이"; break; - case 7: $call = "오월"; break; - case 6: $call = "초"; break; - case 5: $call = "남중"; break; - case 4: $call = "서촉"; break; - case 3: $call = "서북"; break; - case 2: $call = "중원"; break; - case 1: $call = "하북"; break; - default:$call = "?"; break; + case 8: $call = '동이'; break; + case 7: $call = '오월'; break; + case 6: $call = '초'; break; + case 5: $call = '남중'; break; + case 4: $call = '서촉'; break; + case 3: $call = '서북'; break; + case 2: $call = '중원'; break; + case 1: $call = '하북'; break; + default:$call = '?'; break; } return $call; } @@ -291,130 +291,130 @@ function getNationChiefLevel($level) { function getNationLevel($level) { switch($level) { - case 7: $call = "황제"; break; - case 6: $call = "왕"; break; - case 5: $call = "공"; break; - case 4: $call = "주목"; break; - case 3: $call = "주자사"; break; - case 2: $call = "군벌"; break; - case 1: $call = "호족"; break; - case 0: $call = "방랑군"; break; + case 7: $call = '황제'; break; + case 6: $call = '왕'; break; + case 5: $call = '공'; break; + case 4: $call = '주목'; break; + case 3: $call = '주자사'; break; + case 2: $call = '군벌'; break; + case 1: $call = '호족'; break; + case 0: $call = '방랑군'; break; } return $call; } function getGenChar($type) { switch($type) { - case 10: $call = "은둔"; break; - case 9: $call = "안전"; break; - case 8: $call = "유지"; break; - case 7: $call = "재간"; break; - case 6: $call = "출세"; break; - case 5: $call = "할거"; break; - case 4: $call = "정복"; break; - case 3: $call = "패권"; break; - case 2: $call = "의협"; break; - case 1: $call = "대의"; break; - case 0: $call = "왕좌"; break; + case 10: $call = '은둔'; break; + case 9: $call = '안전'; break; + case 8: $call = '유지'; break; + case 7: $call = '재간'; break; + case 6: $call = '출세'; break; + case 5: $call = '할거'; break; + case 4: $call = '정복'; break; + case 3: $call = '패권'; break; + case 2: $call = '의협'; break; + case 1: $call = '대의'; break; + case 0: $call = '왕좌'; break; } return $call; } function getGenSpecial($type) { switch($type) { - case 0: $call = "-"; break; - case 1: $call = "경작"; break; - case 2: $call = "상재"; break; - case 3: $call = "발명"; break; + case 0: $call = '-'; break; + case 1: $call = '경작'; break; + case 2: $call = '상재'; break; + case 3: $call = '발명'; break; - case 10: $call = "축성"; break; - case 11: $call = "수비"; break; - case 12: $call = "통찰"; break; + case 10: $call = '축성'; break; + case 11: $call = '수비'; break; + case 12: $call = '통찰'; break; - case 20: $call = "인덕"; break; + case 20: $call = '인덕'; break; - case 30: $call = "거상"; break; - case 31: $call = "귀모"; break; + case 30: $call = '거상'; break; + case 31: $call = '귀모'; break; - case 40: $call = "귀병"; break; - case 41: $call = "신산"; break; - case 42: $call = "환술"; break; - case 43: $call = "집중"; break; - case 44: $call = "신중"; break; - case 45: $call = "반계"; break; + case 40: $call = '귀병'; break; + case 41: $call = '신산'; break; + case 42: $call = '환술'; break; + case 43: $call = '집중'; break; + case 44: $call = '신중'; break; + case 45: $call = '반계'; break; - case 50: $call = "보병"; break; - case 51: $call = "궁병"; break; - case 52: $call = "기병"; break; - case 53: $call = "공성"; break; + case 50: $call = '보병'; break; + case 51: $call = '궁병'; break; + case 52: $call = '기병'; break; + case 53: $call = '공성'; break; - case 60: $call = "돌격"; break; - case 61: $call = "무쌍"; break; - case 62: $call = "견고"; break; - case 63: $call = "위압"; break; + case 60: $call = '돌격'; break; + case 61: $call = '무쌍'; break; + case 62: $call = '견고'; break; + case 63: $call = '위압'; break; - case 70: $call = "저격"; break; - case 71: $call = "필살"; break; - case 72: $call = "징병"; break; - case 73: $call = "의술"; break; - case 74: $call = "격노"; break; - case 75: $call = "척사"; break; + case 70: $call = '저격'; break; + case 71: $call = '필살'; break; + case 72: $call = '징병'; break; + case 73: $call = '의술'; break; + case 74: $call = '격노'; break; + case 75: $call = '척사'; break; } return $call; } function getNationType($type) { switch($type) { - case 13: $call = "명 가"; break; - case 12: $call = "음 양 가"; break; - case 11: $call = "종 횡 가"; break; - case 10: $call = "불 가"; break; - case 9: $call = "도 적"; break; - case 8: $call = "오 두 미 도"; break; - case 7: $call = "태 평 도"; break; - case 6: $call = "도 가"; break; - case 5: $call = "묵 가"; break; - case 4: $call = "덕 가"; break; - case 3: $call = "병 가"; break; - case 2: $call = "유 가"; break; - case 1: $call = "법 가"; break; - case 0: $call = "-"; break; + case 13: $call = '명 가'; break; + case 12: $call = '음 양 가'; break; + case 11: $call = '종 횡 가'; break; + case 10: $call = '불 가'; break; + case 9: $call = '도 적'; break; + case 8: $call = '오 두 미 도'; break; + case 7: $call = '태 평 도'; break; + case 6: $call = '도 가'; break; + case 5: $call = '묵 가'; break; + case 4: $call = '덕 가'; break; + case 3: $call = '병 가'; break; + case 2: $call = '유 가'; break; + case 1: $call = '법 가'; break; + case 0: $call = '-'; break; } return $call; } function getConnect($con) { - if($con < 50) $conname = "안함"; - elseif($con < 100) $conname = "무관심"; - elseif($con < 200) $conname = "가끔"; - elseif($con < 400) $conname = "보통"; - elseif($con < 800) $conname = "자주"; - elseif($con < 1600) $conname = "열심"; - elseif($con < 3200) $conname = "중독"; - elseif($con < 6400) $conname = "폐인"; - elseif($con < 12800) $conname = "경고"; - else $conname = "헐..."; + if($con < 50) $conname = '안함'; + elseif($con < 100) $conname = '무관심'; + elseif($con < 200) $conname = '가끔'; + elseif($con < 400) $conname = '보통'; + elseif($con < 800) $conname = '자주'; + elseif($con < 1600) $conname = '열심'; + elseif($con < 3200) $conname = '중독'; + elseif($con < 6400) $conname = '폐인'; + elseif($con < 12800) $conname = '경고'; + else $conname = '헐...'; return $conname; } function getNationType2($type) { switch($type) { - case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; - case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; - case 11: $call = "전략↑ 수성↑ 금수입↓ 내정↓"; break; - case 10: $call = "민심↑ 수성↑ 금수입↓"; break; - case 9: $call = "계략↑ 금수입↓ 치안↓ 민심↓"; break; - case 8: $call = "쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓"; break; - case 7: $call = "인구↑ 민심↑ 기술↓ 수성↓"; break; - case 6: $call = "인구↑ 기술↓ 치안↓"; break; - case 5: $call = "수성↑ 기술↓"; break; - case 4: $call = "치안↑인구↑ 민심↑ 쌀수입↓ 수성↓"; break; - case 3: $call = "기술↑ 수성↑ 인구↓ 민심↓"; break; - case 2: $call = "내정↑ 민심↑ 쌀수입↓"; break; - case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; - case 0: $call = "-"; break; + case 13: $call = '기술↑ 인구↑ 쌀수입↓ 수성↓'; break; + case 12: $call = '내정↑ 인구↑ 기술↓ 전략↓'; break; + case 11: $call = '전략↑ 수성↑ 금수입↓ 내정↓'; break; + case 10: $call = '민심↑ 수성↑ 금수입↓'; break; + case 9: $call = '계략↑ 금수입↓ 치안↓ 민심↓'; break; + case 8: $call = '쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓'; break; + case 7: $call = '인구↑ 민심↑ 기술↓ 수성↓'; break; + case 6: $call = '인구↑ 기술↓ 치안↓'; break; + case 5: $call = '수성↑ 기술↓'; break; + case 4: $call = '치안↑인구↑ 민심↑ 쌀수입↓ 수성↓'; break; + case 3: $call = '기술↑ 수성↑ 인구↓ 민심↓'; break; + case 2: $call = '내정↑ 민심↑ 쌀수입↓'; break; + case 1: $call = '금수입↑ 치안↑ 인구↓ 민심↓'; break; + case 0: $call = '-'; break; } return $call; } @@ -423,45 +423,45 @@ function getLevel($level, $nlevel=8) { if($level >= 0 && $level <= 4) { $nlevel = 0; } $code = $nlevel * 100 + $level; switch($code) { - case 812: $call = "군주"; break; - case 811: $call = "참모"; break; - case 810: $call = "제1장군"; break; - case 809: $call = "제1모사"; break; - case 808: $call = "제2장군"; break; - case 807: $call = "제2모사"; break; - case 806: $call = "제3장군"; break; - case 805: $call = "제3모사"; break; + case 812: $call = '군주'; break; + case 811: $call = '참모'; break; + case 810: $call = '제1장군'; break; + case 809: $call = '제1모사'; break; + case 808: $call = '제2장군'; break; + case 807: $call = '제2모사'; break; + case 806: $call = '제3장군'; break; + case 805: $call = '제3모사'; break; - case 712: $call = "황제"; break; case 612: $call = "왕"; break; - case 711: $call = "승상"; break; case 611: $call = "광록훈"; break; - case 710: $call = "위장군"; break; case 610: $call = "전장군"; break; - case 709: $call = "사공"; break; case 609: $call = "상서령"; break; - case 708: $call = "표기장군"; break; case 608: $call = "좌장군"; break; - case 707: $call = "태위"; break; case 607: $call = "중서령"; break; - case 706: $call = "거기장군"; break; case 606: $call = "우장군"; break; - case 705: $call = "사도"; break; case 605: $call = "비서령"; break; + case 712: $call = '황제'; break; case 612: $call = '왕'; break; + case 711: $call = '승상'; break; case 611: $call = '광록훈'; break; + case 710: $call = '위장군'; break; case 610: $call = '전장군'; break; + case 709: $call = '사공'; break; case 609: $call = '상서령'; break; + case 708: $call = '표기장군'; break; case 608: $call = '좌장군'; break; + case 707: $call = '태위'; break; case 607: $call = '중서령'; break; + case 706: $call = '거기장군'; break; case 606: $call = '우장군'; break; + case 705: $call = '사도'; break; case 605: $call = '비서령'; break; - case 512: $call = "공"; break; case 412: $call = "주목"; break; - case 511: $call = "광록대부"; break; case 411: $call = "태사령"; break; - case 510: $call = "안국장군"; break; case 410: $call = "아문장군"; break; - case 509: $call = "집금오"; break; case 409: $call = "낭중"; break; - case 508: $call = "파로장군"; break; case 408: $call = "호군"; break; - case 507: $call = "소부"; break; case 407: $call = "종사중랑"; break; + case 512: $call = '공'; break; case 412: $call = '주목'; break; + case 511: $call = '광록대부'; break; case 411: $call = '태사령'; break; + case 510: $call = '안국장군'; break; case 410: $call = '아문장군'; break; + case 509: $call = '집금오'; break; case 409: $call = '낭중'; break; + case 508: $call = '파로장군'; break; case 408: $call = '호군'; break; + case 507: $call = '소부'; break; case 407: $call = '종사중랑'; break; - case 312: $call = "주자사"; break; case 212: $call = "군벌"; break; - case 311: $call = "주부"; break; case 211: $call = "참모"; break; - case 310: $call = "편장군"; break; case 210: $call = "비장군"; break; - case 309: $call = "간의대부"; break; case 209: $call = "부참모"; break; + case 312: $call = '주자사'; break; case 212: $call = '군벌'; break; + case 311: $call = '주부'; break; case 211: $call = '참모'; break; + case 310: $call = '편장군'; break; case 210: $call = '비장군'; break; + case 309: $call = '간의대부'; break; case 209: $call = '부참모'; break; - case 112: $call = "영주"; break; case 12: $call = "두목"; break; - case 111: $call = "참모"; break; case 11: $call = "부두목"; break; + case 112: $call = '영주'; break; case 12: $call = '두목'; break; + case 111: $call = '참모'; break; case 11: $call = '부두목'; break; - case 4: $call = "태수"; break; - case 3: $call = "군사"; break; - case 2: $call = "시중"; break; - case 1: $call = "일반"; break; - case 0: $call = "재야"; break; - default: $call = "-"; break; + case 4: $call = '태수'; break; + case 3: $call = '군사'; break; + case 2: $call = '시중'; break; + case 1: $call = '일반'; break; + case 0: $call = '재야'; break; + default: $call = '-'; break; } return $call; } @@ -469,58 +469,58 @@ function getLevel($level, $nlevel=8) { function getCall($leader, $power, $intel) { global $_goodgenleader, $_goodgenpower, $_goodgenintel; - $call = "평범"; + $call = '평범'; if($leader >= $_goodgenleader && $power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "만능"; + $call = '만능'; } elseif($leader >= $_goodgenleader && $power >= $_goodgenpower) { - $call = "용장"; + $call = '용장'; } elseif($leader >= $_goodgenleader && $intel >= $_goodgenintel) { - $call = "지장"; + $call = '지장'; } elseif($power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "명장"; + $call = '명장'; } elseif($leader >= $_goodgenleader) { - $call = "명사"; + $call = '명사'; } elseif($power >= $_goodgenpower) { - $call = "용맹"; + $call = '용맹'; } elseif($intel >= $_goodgenintel) { - $call = "현명"; + $call = '현명'; } return $call; } function getDed($dedication) { - if($dedication < 1 ) $level2 = "무품관"; - elseif($dedication < 10*10) $level2 = "30품관"; - elseif($dedication < 20*20) $level2 = "29품관"; - elseif($dedication < 30*30) $level2 = "28품관"; - elseif($dedication < 40*40) $level2 = "27품관"; - elseif($dedication < 50*50) $level2 = "26품관"; - elseif($dedication < 60*60) $level2 = "25품관"; - elseif($dedication < 70*70) $level2 = "24품관"; - elseif($dedication < 80*80) $level2 = "23품관"; - elseif($dedication < 90*90) $level2 = "22품관"; - elseif($dedication < 100*100) $level2 = "21품관"; - elseif($dedication < 110*110) $level2 = "20품관"; - elseif($dedication < 120*120) $level2 = "19품관"; - elseif($dedication < 130*130) $level2 = "18품관"; - elseif($dedication < 140*140) $level2 = "17품관"; - elseif($dedication < 150*150) $level2 = "16품관"; - elseif($dedication < 160*160) $level2 = "15품관"; - elseif($dedication < 170*170) $level2 = "14품관"; - elseif($dedication < 180*180) $level2 = "13품관"; - elseif($dedication < 190*190) $level2 = "12품관"; - elseif($dedication < 200*200) $level2 = "11품관"; // 40000 - elseif($dedication < 210*210) $level2 = "10품관"; // 44100 - elseif($dedication < 220*220) $level2 = "9품관"; // 48400 - elseif($dedication < 230*230) $level2 = "8품관"; // 52900 - elseif($dedication < 240*240) $level2 = "7품관"; // 57600 - elseif($dedication < 250*250) $level2 = "6품관"; // 62500 - elseif($dedication < 260*260) $level2 = "5품관"; // 67600 - elseif($dedication < 270*270) $level2 = "4품관"; // 72900 - elseif($dedication < 280*280) $level2 = "3품관"; // 78400 - elseif($dedication < 290*290) $level2 = "2품관"; // 84100 + if($dedication < 1 ) $level2 = '무품관'; + elseif($dedication < 10*10) $level2 = '30품관'; + elseif($dedication < 20*20) $level2 = '29품관'; + elseif($dedication < 30*30) $level2 = '28품관'; + elseif($dedication < 40*40) $level2 = '27품관'; + elseif($dedication < 50*50) $level2 = '26품관'; + elseif($dedication < 60*60) $level2 = '25품관'; + elseif($dedication < 70*70) $level2 = '24품관'; + elseif($dedication < 80*80) $level2 = '23품관'; + elseif($dedication < 90*90) $level2 = '22품관'; + elseif($dedication < 100*100) $level2 = '21품관'; + elseif($dedication < 110*110) $level2 = '20품관'; + elseif($dedication < 120*120) $level2 = '19품관'; + elseif($dedication < 130*130) $level2 = '18품관'; + elseif($dedication < 140*140) $level2 = '17품관'; + elseif($dedication < 150*150) $level2 = '16품관'; + elseif($dedication < 160*160) $level2 = '15품관'; + elseif($dedication < 170*170) $level2 = '14품관'; + elseif($dedication < 180*180) $level2 = '13품관'; + elseif($dedication < 190*190) $level2 = '12품관'; + elseif($dedication < 200*200) $level2 = '11품관'; // 40000 + elseif($dedication < 210*210) $level2 = '10품관'; // 44100 + elseif($dedication < 220*220) $level2 = '9품관'; // 48400 + elseif($dedication < 230*230) $level2 = '8품관'; // 52900 + elseif($dedication < 240*240) $level2 = '7품관'; // 57600 + elseif($dedication < 250*250) $level2 = '6품관'; // 62500 + elseif($dedication < 260*260) $level2 = '5품관'; // 67600 + elseif($dedication < 270*270) $level2 = '4품관'; // 72900 + elseif($dedication < 280*280) $level2 = '3품관'; // 78400 + elseif($dedication < 290*290) $level2 = '2품관'; // 84100 else { - $level2 = "1품관"; + $level2 = '1품관'; } return $level2; @@ -528,62 +528,62 @@ function getDed($dedication) { function getHonor($experience) { - if($experience < 640 ) $honor = "전무"; - elseif($experience < 2560) $honor = "무명"; - elseif($experience < 5760) $honor = "신동"; - elseif($experience < 10240) $honor = "약간"; - elseif($experience < 16000) $honor = "평범"; - elseif($experience < 23040) $honor = "지역적"; - elseif($experience < 31360) $honor = "전국적"; - elseif($experience < 40960) $honor = "세계적"; - elseif($experience < 45000) $honor = "유명"; - elseif($experience < 51840) $honor = "명사"; - elseif($experience < 55000) $honor = "호걸"; - elseif($experience < 64000) $honor = "효웅"; - elseif($experience < 77440) $honor = "영웅"; - else $honor = "구세주"; + if($experience < 640 ) $honor = '전무'; + elseif($experience < 2560) $honor = '무명'; + elseif($experience < 5760) $honor = '신동'; + elseif($experience < 10240) $honor = '약간'; + elseif($experience < 16000) $honor = '평범'; + elseif($experience < 23040) $honor = '지역적'; + elseif($experience < 31360) $honor = '전국적'; + elseif($experience < 40960) $honor = '세계적'; + elseif($experience < 45000) $honor = '유명'; + elseif($experience < 51840) $honor = '명사'; + elseif($experience < 55000) $honor = '호걸'; + elseif($experience < 64000) $honor = '효웅'; + elseif($experience < 77440) $honor = '영웅'; + else $honor = '구세주'; return $honor; } function getTypename($type) { switch($type) { - case 0: $typename = "보병"; break; - case 1: $typename = "청주병"; break; - case 2: $typename = "수병"; break; - case 3: $typename = "자객병"; break; - case 4: $typename = "근위병"; break; - case 5: $typename = "등갑병"; break; + case 0: $typename = '보병'; break; + case 1: $typename = '청주병'; break; + case 2: $typename = '수병'; break; + case 3: $typename = '자객병'; break; + case 4: $typename = '근위병'; break; + case 5: $typename = '등갑병'; break; - case 10: $typename = "궁병"; break; - case 11: $typename = "궁기병"; break; - case 12: $typename = "연노병"; break; - case 13: $typename = "강궁병"; break; - case 14: $typename = "석궁병"; break; + case 10: $typename = '궁병'; break; + case 11: $typename = '궁기병'; break; + case 12: $typename = '연노병'; break; + case 13: $typename = '강궁병'; break; + case 14: $typename = '석궁병'; break; - case 20: $typename = "기병"; break; - case 21: $typename = "백마병"; break; - case 22: $typename = "중장기병"; break; - case 23: $typename = "돌격기병"; break; - case 24: $typename = "철기병"; break; - case 25: $typename = "수렵기병"; break; - case 26: $typename = "맹수병"; break; - case 27: $typename = "호표기병"; break; + case 20: $typename = '기병'; break; + case 21: $typename = '백마병'; break; + case 22: $typename = '중장기병'; break; + case 23: $typename = '돌격기병'; break; + case 24: $typename = '철기병'; break; + case 25: $typename = '수렵기병'; break; + case 26: $typename = '맹수병'; break; + case 27: $typename = '호표기병'; break; - case 30: $typename = "귀병"; break; - case 31: $typename = "신귀병"; break; - case 32: $typename = "백귀병"; break; - case 33: $typename = "흑귀병"; break; - case 34: $typename = "악귀병"; break; - case 35: $typename = "남귀병"; break; - case 36: $typename = "황귀병"; break; - case 37: $typename = "천귀병"; break; - case 38: $typename = "마귀병"; break; + case 30: $typename = '귀병'; break; + case 31: $typename = '신귀병'; break; + case 32: $typename = '백귀병'; break; + case 33: $typename = '흑귀병'; break; + case 34: $typename = '악귀병'; break; + case 35: $typename = '남귀병'; break; + case 36: $typename = '황귀병'; break; + case 37: $typename = '천귀병'; break; + case 38: $typename = '마귀병'; break; - case 40: $typename = "정란"; break; - case 41: $typename = "충차"; break; - case 42: $typename = "벽력거"; break; - case 43: $typename = "목우"; break; + case 40: $typename = '정란'; break; + case 41: $typename = '충차'; break; + case 42: $typename = '벽력거'; break; + case 43: $typename = '목우'; break; } return $typename; } @@ -628,7 +628,8 @@ function getBill($dedication) { function getCost($armtype) { //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. - return newDB()->queryFirstColumn("select cst%l from game where no='1'", $armtype); + //TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함 + return newDB()->queryFirstColumn("select cst%l from game where no='1'", intval($armtype)); } function TechLimit($startyear, $year, $tech) { @@ -683,54 +684,54 @@ function getTechCost($tech) { } function getTechCall($tech) { - if($tech < 1000) { $str = "0등급"; } - elseif($tech < 2000) { $str = "1등급"; } - elseif($tech < 3000) { $str = "2등급"; } - elseif($tech < 4000) { $str = "3등급"; } - elseif($tech < 5000) { $str = "4등급"; } - elseif($tech < 6000) { $str = "5등급"; } - elseif($tech < 7000) { $str = "6등급"; } - elseif($tech < 8000) { $str = "7등급"; } - elseif($tech < 9000) { $str = "8등급"; } - elseif($tech < 10000) { $str = "9등급"; } - elseif($tech < 11000) { $str = "10등급"; } - elseif($tech < 12000) { $str = "11등급"; } - else { $str = "12등급"; } + if($tech < 1000) { $str = '0등급'; } + elseif($tech < 2000) { $str = '1등급'; } + elseif($tech < 3000) { $str = '2등급'; } + elseif($tech < 4000) { $str = '3등급'; } + elseif($tech < 5000) { $str = '4등급'; } + elseif($tech < 6000) { $str = '5등급'; } + elseif($tech < 7000) { $str = '6등급'; } + elseif($tech < 8000) { $str = '7등급'; } + elseif($tech < 9000) { $str = '8등급'; } + elseif($tech < 10000) { $str = '9등급'; } + elseif($tech < 11000) { $str = '10등급'; } + elseif($tech < 12000) { $str = '11등급'; } + else { $str = '12등급'; } return $str; } function getDexCall($dex) { - if($dex < 2500) { $str = "F-"; } - elseif($dex < 7500) { $str = "F"; } - elseif($dex < 15000) { $str = "F+"; } - elseif($dex < 25000) { $str = "E-"; } - elseif($dex < 37500) { $str = "E"; } - elseif($dex < 52500) { $str = "E+"; } - elseif($dex < 70000) { $str = "D-"; } - elseif($dex < 90000) { $str = "D"; } - elseif($dex < 112500) { $str = "D+"; } - elseif($dex < 137500) { $str = "C-"; } - elseif($dex < 165000) { $str = "C"; } - elseif($dex < 195000) { $str = "C+"; } - elseif($dex < 227500) { $str = "B-"; } - elseif($dex < 262500) { $str = "B"; } - elseif($dex < 300000) { $str = "B+"; } - elseif($dex < 340000) { $str = "A-"; } - elseif($dex < 382500) { $str = "A"; } - elseif($dex < 427500) { $str = "A+"; } - elseif($dex < 475000) { $str = "S-"; } - elseif($dex < 525000) { $str = "S"; } - elseif($dex < 577500) { $str = "S+"; } - elseif($dex < 632500) { $str = "SS-"; } - elseif($dex < 690000) { $str = "SS"; } - elseif($dex < 750000) { $str = "SS+"; } - elseif($dex < 812500) { $str = "SSS-"; } - elseif($dex < 877500) { $str = "SSS"; } - elseif($dex < 945000) { $str = "SSS+"; } - elseif($dex < 1015000) { $str = "Z-"; } - elseif($dex < 1087500) { $str = "Z"; } - elseif($dex < 1162500) { $str = "Z+"; } - else { $str = "?"; } + if($dex < 2500) { $str = 'F-'; } + elseif($dex < 7500) { $str = 'F'; } + elseif($dex < 15000) { $str = 'F+'; } + elseif($dex < 25000) { $str = 'E-'; } + elseif($dex < 37500) { $str = 'E'; } + elseif($dex < 52500) { $str = 'E+'; } + elseif($dex < 70000) { $str = 'D-'; } + elseif($dex < 90000) { $str = 'D'; } + elseif($dex < 112500) { $str = 'D+'; } + elseif($dex < 137500) { $str = 'C-'; } + elseif($dex < 165000) { $str = 'C'; } + elseif($dex < 195000) { $str = 'C+'; } + elseif($dex < 227500) { $str = 'B-'; } + elseif($dex < 262500) { $str = 'B'; } + elseif($dex < 300000) { $str = 'B+'; } + elseif($dex < 340000) { $str = 'A-'; } + elseif($dex < 382500) { $str = 'A'; } + elseif($dex < 427500) { $str = 'A+'; } + elseif($dex < 475000) { $str = 'S-'; } + elseif($dex < 525000) { $str = 'S'; } + elseif($dex < 577500) { $str = 'S+'; } + elseif($dex < 632500) { $str = 'SS-'; } + elseif($dex < 690000) { $str = 'SS'; } + elseif($dex < 750000) { $str = 'SS+'; } + elseif($dex < 812500) { $str = 'SSS-'; } + elseif($dex < 877500) { $str = 'SSS'; } + elseif($dex < 945000) { $str = 'SSS+'; } + elseif($dex < 1015000) { $str = 'Z-'; } + elseif($dex < 1087500) { $str = 'Z'; } + elseif($dex < 1162500) { $str = 'Z+'; } + else { $str = '?'; } return $str; } @@ -777,34 +778,34 @@ function getDexLog($dex1, $dex2) { function getWeapName($weap) { switch($weap) { - case 0: $weapname = "-"; break; - case 1: $weapname = "단도(+1)"; break; - case 2: $weapname = "단궁(+2)"; break; - case 3: $weapname = "단극(+3)"; break; - case 4: $weapname = "목검(+4)"; break; - case 5: $weapname = "죽창(+5)"; break; - case 6: $weapname = "소부(+6)"; break; + case 0: $weapname = '-'; break; + case 1: $weapname = '단도(+1)'; break; + case 2: $weapname = '단궁(+2)'; break; + case 3: $weapname = '단극(+3)'; break; + case 4: $weapname = '목검(+4)'; break; + case 5: $weapname = '죽창(+5)'; break; + case 6: $weapname = '소부(+6)'; break; - case 7: $weapname = "동추(+7)"; break; - case 8: $weapname = "철편(+7)"; break; - case 9: $weapname = "철쇄(+7)"; break; - case 10: $weapname = "맥궁(+7)"; break; - case 11: $weapname = "유성추(+8)"; break; - case 12: $weapname = "철질여골(+8)"; break; - case 13: $weapname = "쌍철극(+9)"; break; - case 14: $weapname = "동호비궁(+9)"; break; - case 15: $weapname = "삼첨도(+10)"; break; - case 16: $weapname = "대부(+10)"; break; - case 17: $weapname = "고정도(+11)"; break; - case 18: $weapname = "이광궁(+11)"; break; - case 19: $weapname = "철척사모(+12)"; break; - case 20: $weapname = "칠성검(+12)"; break; - case 21: $weapname = "사모(+13)"; break; - case 22: $weapname = "양유기궁(+13)"; break; - case 23: $weapname = "언월도(+14)"; break; - case 24: $weapname = "방천화극(+14)"; break; - case 25: $weapname = "청홍검(+15)"; break; - case 26: $weapname = "의천검(+15)"; break; + case 7: $weapname = '동추(+7)'; break; + case 8: $weapname = '철편(+7)'; break; + case 9: $weapname = '철쇄(+7)'; break; + case 10: $weapname = '맥궁(+7)'; break; + case 11: $weapname = '유성추(+8)'; break; + case 12: $weapname = '철질여골(+8)'; break; + case 13: $weapname = '쌍철극(+9)'; break; + case 14: $weapname = '동호비궁(+9)'; break; + case 15: $weapname = '삼첨도(+10)'; break; + case 16: $weapname = '대부(+10)'; break; + case 17: $weapname = '고정도(+11)'; break; + case 18: $weapname = '이광궁(+11)'; break; + case 19: $weapname = '철척사모(+12)'; break; + case 20: $weapname = '칠성검(+12)'; break; + case 21: $weapname = '사모(+13)'; break; + case 22: $weapname = '양유기궁(+13)'; break; + case 23: $weapname = '언월도(+14)'; break; + case 24: $weapname = '방천화극(+14)'; break; + case 25: $weapname = '청홍검(+15)'; break; + case 26: $weapname = '의천검(+15)'; break; } return $weapname; } @@ -838,34 +839,34 @@ function getWeapEff($weap) { function getBookName($book) { switch($book) { - case 0: $bookname = "-"; break; - case 1: $bookname = "효경전(+1)"; break; - case 2: $bookname = "회남자(+2)"; break; - case 3: $bookname = "변도론(+3)"; break; - case 4: $bookname = "건상역주(+4)"; break; - case 5: $bookname = "여씨춘추(+5)"; break; - case 6: $bookname = "사민월령(+6)"; break; + case 0: $bookname = '-'; break; + case 1: $bookname = '효경전(+1)'; break; + case 2: $bookname = '회남자(+2)'; break; + case 3: $bookname = '변도론(+3)'; break; + case 4: $bookname = '건상역주(+4)'; break; + case 5: $bookname = '여씨춘추(+5)'; break; + case 6: $bookname = '사민월령(+6)'; break; - case 7: $bookname = "위료자(+7)"; break; - case 8: $bookname = "사마법(+7)"; break; - case 9: $bookname = "한서(+7)"; break; - case 10: $bookname = "논어(+7)"; break; - case 11: $bookname = "전론(+8)"; break; - case 12: $bookname = "사기(+8)"; break; - case 13: $bookname = "장자(+9)"; break; - case 14: $bookname = "역경(+9)"; break; - case 15: $bookname = "시경(+10)"; break; - case 16: $bookname = "구국론(+10)"; break; - case 17: $bookname = "상군서(+11)"; break; - case 18: $bookname = "춘추전(+11)"; break; - case 19: $bookname = "산해경(+12)"; break; - case 20: $bookname = "맹덕신서(+12)"; break; - case 21: $bookname = "관자(+13)"; break; - case 22: $bookname = "병법24편(+13)"; break; - case 23: $bookname = "한비자(+14)"; break; - case 24: $bookname = "오자병법(+14)"; break; - case 25: $bookname = "노자(+15)"; break; - case 26: $bookname = "손자병법(+15)"; break; + case 7: $bookname = '위료자(+7)'; break; + case 8: $bookname = '사마법(+7)'; break; + case 9: $bookname = '한서(+7)'; break; + case 10: $bookname = '논어(+7)'; break; + case 11: $bookname = '전론(+8)'; break; + case 12: $bookname = '사기(+8)'; break; + case 13: $bookname = '장자(+9)'; break; + case 14: $bookname = '역경(+9)'; break; + case 15: $bookname = '시경(+10)'; break; + case 16: $bookname = '구국론(+10)'; break; + case 17: $bookname = '상군서(+11)'; break; + case 18: $bookname = '춘추전(+11)'; break; + case 19: $bookname = '산해경(+12)'; break; + case 20: $bookname = '맹덕신서(+12)'; break; + case 21: $bookname = '관자(+13)'; break; + case 22: $bookname = '병법24편(+13)'; break; + case 23: $bookname = '한비자(+14)'; break; + case 24: $bookname = '오자병법(+14)'; break; + case 25: $bookname = '노자(+15)'; break; + case 26: $bookname = '손자병법(+15)'; break; } return $bookname; } @@ -899,34 +900,34 @@ function getBookEff($book) { function getHorseName($horse) { switch($horse) { - case 0: $horsename = "-"; break; - case 1: $horsename = "노기(+1)"; break; - case 2: $horsename = "조랑(+2)"; break; - case 3: $horsename = "노새(+3)"; break; - case 4: $horsename = "나귀(+4)"; break; - case 5: $horsename = "갈색마(+5)"; break; - case 6: $horsename = "흑색마(+6)"; break; + case 0: $horsename = '-'; break; + case 1: $horsename = '노기(+1)'; break; + case 2: $horsename = '조랑(+2)'; break; + case 3: $horsename = '노새(+3)'; break; + case 4: $horsename = '나귀(+4)'; break; + case 5: $horsename = '갈색마(+5)'; break; + case 6: $horsename = '흑색마(+6)'; break; - case 7: $horsename = "백마(+7)"; break; - case 8: $horsename = "백마(+7)"; break; - case 9: $horsename = "기주마(+7)"; break; - case 10: $horsename = "기주마(+7)"; break; - case 11: $horsename = "양주마(+8)"; break; - case 12: $horsename = "양주마(+8)"; break; - case 13: $horsename = "과하마(+9)"; break; - case 14: $horsename = "과하마(+9)"; break; - case 15: $horsename = "대완마(+10)"; break; - case 16: $horsename = "대완마(+10)"; break; - case 17: $horsename = "서량마(+11)"; break; - case 18: $horsename = "서량마(+11)"; break; - case 19: $horsename = "사륜거(+12)"; break; - case 20: $horsename = "사륜거(+12)"; break; - case 21: $horsename = "절영(+13)"; break; - case 22: $horsename = "적로(+13)"; break; - case 23: $horsename = "적란마(+14)"; break; - case 24: $horsename = "조황비전(+14)"; break; - case 25: $horsename = "한혈마(+15)"; break; - case 26: $horsename = "적토마(+15)"; break; + case 7: $horsename = '백마(+7)'; break; + case 8: $horsename = '백마(+7)'; break; + case 9: $horsename = '기주마(+7)'; break; + case 10: $horsename = '기주마(+7)'; break; + case 11: $horsename = '양주마(+8)'; break; + case 12: $horsename = '양주마(+8)'; break; + case 13: $horsename = '과하마(+9)'; break; + case 14: $horsename = '과하마(+9)'; break; + case 15: $horsename = '대완마(+10)'; break; + case 16: $horsename = '대완마(+10)'; break; + case 17: $horsename = '서량마(+11)'; break; + case 18: $horsename = '서량마(+11)'; break; + case 19: $horsename = '사륜거(+12)'; break; + case 20: $horsename = '사륜거(+12)'; break; + case 21: $horsename = '절영(+13)'; break; + case 22: $horsename = '적로(+13)'; break; + case 23: $horsename = '적란마(+14)'; break; + case 24: $horsename = '조황비전(+14)'; break; + case 25: $horsename = '한혈마(+15)'; break; + case 26: $horsename = '적토마(+15)'; break; } return $horsename; } @@ -960,34 +961,34 @@ function getHorseEff($horse) { function getItemName($item) { switch($item) { - case 0: $itemname = "-"; break; - case 1: $itemname = "환약(치료)"; break; - case 2: $itemname = "수극(저격)"; break; - case 3: $itemname = "탁주(사기)"; break; - case 4: $itemname = "청주(훈련)"; break; - case 5: $itemname = "이추(계략)"; break; - case 6: $itemname = "향낭(계략)"; break; + case 0: $itemname = '-'; break; + case 1: $itemname = '환약(치료)'; break; + case 2: $itemname = '수극(저격)'; break; + case 3: $itemname = '탁주(사기)'; break; + case 4: $itemname = '청주(훈련)'; break; + case 5: $itemname = '이추(계략)'; break; + case 6: $itemname = '향낭(계략)'; break; - case 7: $itemname = "오석산(치료)"; break; - case 8: $itemname = "무후행군(치료)"; break; - case 9: $itemname = "도소연명(치료)"; break; - case 10: $itemname = "칠엽청점(치료)"; break; - case 11: $itemname = "정력견혈(치료)"; break; - case 12: $itemname = "과실주(훈련)"; break; - case 13: $itemname = "이강주(훈련)"; break; - case 14: $itemname = "의적주(사기)"; break; - case 15: $itemname = "두강주(사기)"; break; - case 16: $itemname = "보령압주(사기)"; break; - case 17: $itemname = "철벽서(훈련)"; break; - case 18: $itemname = "단결도(훈련)"; break; - case 19: $itemname = "춘화첩(사기)"; break; - case 20: $itemname = "초선화(사기)"; break; - case 21: $itemname = "육도(계략)"; break; - case 22: $itemname = "삼략(계략)"; break; - case 23: $itemname = "청낭서(의술)"; break; - case 24: $itemname = "태평청령(의술)"; break; - case 25: $itemname = "태평요술(회피)"; break; - case 26: $itemname = "둔갑천서(회피)"; break; + case 7: $itemname = '오석산(치료)'; break; + case 8: $itemname = '무후행군(치료)'; break; + case 9: $itemname = '도소연명(치료)'; break; + case 10: $itemname = '칠엽청점(치료)'; break; + case 11: $itemname = '정력견혈(치료)'; break; + case 12: $itemname = '과실주(훈련)'; break; + case 13: $itemname = '이강주(훈련)'; break; + case 14: $itemname = '의적주(사기)'; break; + case 15: $itemname = '두강주(사기)'; break; + case 16: $itemname = '보령압주(사기)'; break; + case 17: $itemname = '철벽서(훈련)'; break; + case 18: $itemname = '단결도(훈련)'; break; + case 19: $itemname = '춘화첩(사기)'; break; + case 20: $itemname = '초선화(사기)'; break; + case 21: $itemname = '육도(계략)'; break; + case 22: $itemname = '삼략(계략)'; break; + case 23: $itemname = '청낭서(의술)'; break; + case 24: $itemname = '태평청령(의술)'; break; + case 25: $itemname = '태평요술(회피)'; break; + case 26: $itemname = '둔갑천서(회피)'; break; } return $itemname; } From 207f190e0b1dfa7cae0fbbdd03389135473189e5 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:45:55 +0900 Subject: [PATCH 093/622] =?UTF-8?q?j=5Fmsgsubmit=EB=8F=84=20"=20=EA=B8=B0?= =?UTF-8?q?=ED=98=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/j_msgsubmit.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 8369642f..083ad480 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -1,8 +1,8 @@ queryFirstField("select conlimit from game where no=1"); +$conlimit = $db->queryFirstField('select conlimit from game where no=1'); $me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `user_id` = %s_p_id', array('p_id'=>$_SESSION['p_id'])); @@ -70,7 +70,7 @@ if($con >= 2) { } //FIXME: 원래는 필요없는 값이지만 예전 코드와 꼬일 수 있어 유지함. -$msg = str_replace("|", "", $msg); +$msg = str_replace('|', '', $msg); //TODO: 몰라서 임시로 값 세팅해봄. 추후에 용도를 확인하고 수정 필요 //$s = 50; @@ -99,9 +99,7 @@ if($src_nation_id == 0) { $src_color = '#FFFFFF'; } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i_nation",array( - 'nation' => $src_nation_id - )); + $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$src_nation_id); $src_nation = $nation['name']; $src_color = '#'.$nation['color']; $src_color = str_replace('##', '#', $src_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 @@ -123,12 +121,10 @@ if($dest == 9999) { 'message' => $msg )); - //PushMsg(1, 0, $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $nation['name'], $nation['color'], $msg); // 국가 메세지 } elseif($dest >= 9000) { $real_nation = $dest - 9000; - $query = "select nation,name,color from nation where nation='$genlist'"; - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$real_nation); + $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$real_nation); if($nation === NULL || empty($nation)){ $dest = 9998; @@ -198,7 +194,7 @@ if($dest == 9999) { header('Content-Type: application/json'); die(json_encode([ 'result' => false, - 'reason' => "개인메세지는 2초당 1건만 보낼 수 있습니다!", + 'reason' => '개인메세지는 2초당 1건만 보낼 수 있습니다!', 'redirect' => NULL ])); } @@ -223,7 +219,7 @@ if($dest == 9999) { $dest_color = str_replace('##', '#', $dest_color); } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$dest_user['nation']); + $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$dest_user['nation']); $dest_nation = $nation['name']; $dest_color = '#'.$nation['color']; $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 @@ -264,14 +260,11 @@ else{ header('Content-Type: application/json'); die(json_encode([ 'result' => false, - 'reason' => "알 수 없는 에러", + 'reason' => '알 수 없는 에러', 'redirect' => NULL ])); } -//echo ""; -//echo 'msglist.php';//TODO:debug all and replace - header('Content-Type: application/json'); echo json_encode([ 'result' => true, From 88add40d4c378e4350db5b56d018d75b753426cf Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 06:02:19 +0900 Subject: [PATCH 094/622] =?UTF-8?q?gamerule=EC=97=90=20=ED=95=B4=EB=8B=B9?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EC=9D=BC=EB=B6=80=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 1367 +--------------------------------------- twe/func_converter.php | 78 ++- twe/func_gamerule.php | 1292 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1380 insertions(+), 1357 deletions(-) create mode 100644 twe/func_gamerule.php diff --git a/twe/func.php b/twe/func.php index 45ae59fa..691d0101 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1,17 +1,18 @@ $leader, 'power' => $power, 'intel' => $intel); -} - -// 14 ~ 75 -function abilityLeadpow() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 6.0; - $power = (rand()%100 + 1) / 100.0 + 6.0; - $intel = (rand()%100 + 1) / 100.0 + 1.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} - -function abilityLeadint() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 6.0; - $power = (rand()%100 + 1) / 100.0 + 1.0; - $intel = (rand()%100 + 1) / 100.0 + 6.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} - -function abilityPowint() { - $total = 150; - $leader = (rand()%100 + 1) / 100.0 + 1.0; - $power = (rand()%100 + 1) / 100.0 + 6.0; - $intel = (rand()%100 + 1) / 100.0 + 6.0; - $rate = $leader + $power + $intel; - $leader = floor($leader / $rate * $total); - $power = floor($power / $rate * $total); - $intel = floor($intel / $rate * $total); - - while($leader+$power+$intel < 150) { - $leader++; - } - - return array('leader' => $leader, 'power' => $power, 'intel' => $intel); -} function GetImageURL($imgsvr) { global $image, $image1; @@ -160,124 +93,6 @@ function getRandGenName() { return $fullname; } -// 0 1 2 3 4 5 6 7 -// 0 -, 경작, 상재, 발명 = 3 지력내정 -// 10 축성, 수비, 통찰 = 3 무력내정 -// 20 인덕 = 1 통솔내정 -// 30 거상, 귀모 = 2 공통내정 - -function getSpecial($connect, $leader, $power, $intel) { - //통장 - if($leader*0.9 > $power && $leader*0.9 > $intel) { - $type = array(20, 31); - $special = array_rand($type); - // 귀모는 50% * 5% = 2.5% - if($special == 31 && randF() < 0.05) { - $type = array(20, 20); - $special = array_rand($type); - } - //무장 - } elseif($power >= $intel) { - $type = array(10, 11, 12, 31); - $special = array_rand($type); - // 귀모는 그중에 25% * 10% = 2.5% - if(($special == 30 || $special == 31) && randF() < 0.05) { - $type = array(10, 11, 12); - $special = array_rand($type); - } - //지장 - } elseif($intel > $power) { - $type = array(1, 2, 3, 31); - $special = array_rand($type); - // 거상, 귀모는 그중에 25% * 10% = 2.5% - if($special == 31 && randF() < 0.05) { - $type = array(1, 2, 3); - $special = array_rand($type); - } - } else { - //귀모. 다만 이쪽으로 빠지지 않음. - $type = 31; - } - return $special; -} - -// 0 1 2 3 4 5 6 7 -// 40 귀병, 신산, 환술, 집중, 신중, 반계 = 6 지력전투 -// 50 보병, 궁병, 기병, 공성 = 4 무력전투 -// 60 돌격, 무쌍, 견고, 위압 = 4 무장전투 -// 70 저격, 필살, 징병, 의술, 격노, 척사 = 6 공통전투 - -function getSpecial2($connect, $leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex20=0, $dex30=0, $dex40=0) { - $special2 = 70; - // 숙련 10,000: 25%, 40,000: 50%, 100,000: 79%, 160,000: 100% - $dex = sqrt($dex0 + $dex10 + $dex20 + $dex30 + $dex40); - $dex = round($dex / 4); - // 숙련 10,000: 75%, 40,000: 50%, 100,000: 21%, 160,000: 0% - // 그중 20%만 - if($nodex == 0 && rand()%100 < 20 && rand()%100 > $dex) { - if(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex0) { - $special2 = 50; - // 숙련이 아얘 없을시 재분배 - if($dex0 <= 0) { - if($power >= $intel) { - $special2 = 50 + rand()%4; - } else { - $special2 = 40; - } - } - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex10) { - $special2 = 51; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex20) { - $special2 = 52; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex30) { - $special2 = 40; - } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex40) { - $special2 = 53; - } - //무장 - } elseif($power >= $intel) { - $type = array(60, 61, 62, 63, 70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%10]; - // 의술은 그중에 10% * 20% = 2% - if(($special2 == 73) && rand()%100 > 20) { - $type = array(60, 61, 62, 63, 70, 71, 72, 74, 75); - $special2 = $type[rand()%9]; - } - //지장 - } elseif($intel > $power) { - $type = array(41, 42, 43, 44, 45, 70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%11]; - // 환술은 그중에 9% * 50% = 4.5% - if(($special2 == 42) && rand()%100 > 50) { - $type = array(41, 43, 44, 45, 70, 71, 72, 74, 75); - $special2 = $type[rand()%9]; - } - // 의술은 그중에 9% * 20% = 1.8% - if(($special2 == 73) && rand()%100 > 20) { - $type = array(41, 42, 43, 44, 45, 70, 71, 72, 74, 75); - $special2 = $type[rand()%10]; - } - } else { - $type = array(70, 71, 72, 73, 74, 75); - $special2 = $type[rand()%6]; - } - return $special2; -} - -function getGenDex($general, $type) { - $type = floor($type / 10) * 10; - return $general["dex{$type}"]; -} - -function addGenDex($connect, $no, $type, $exp) { - $type = floor($type / 10) * 10; - $dexType = "dex{$type}"; - if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율 - elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율 - - $query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} function getTurn($connect, $general, $type, $font=1) { $turn[0] = $general["turn0"]; @@ -2926,476 +2741,6 @@ function turnDate($connect, $curtime) { return $value; } -//한국가의 전체 전방 설정 -function SetNationFront($connect, $nationNo) { - if(!$nationNo) { return; } - // 도시소유 국가와 선포,교전중인 국가 - $query = "select me,you from diplomacy where me={$nationNo} and (state=0 or (state=1 and term<=3))"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipNum = MYDB_num_rows($result); - if($dipNum > 0) { - for($i=0; $i < $dipNum; $i++) { - $dip = MYDB_fetch_array($result); - - $query = "select city,path from city where nation={$dip['you']}"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result2); - for($k=0; $k < $cityNum; $k++) { - $city = MYDB_fetch_array($result2); - $path = explode("|", $city['path']); - $cnt = count($path); - for($j=0; $j < $cnt; $j++) { - $adj[$path[$j]] = 1; - } - } - } - } else { - //평시이면 공백지 - $query = "select city,path from city where nation=0"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result2); - for($k=0; $k < $cityNum; $k++) { - $city = MYDB_fetch_array($result2); - $path = explode("|", $city['path']); - $cnt = count($path); - for($j=0; $j < $cnt; $j++) { - $adj[$path[$j]] = 1; - } - } - } - $str = "city=0"; $valid = 0; - $query = "select city from city where nation={$nationNo}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - for($i=0; $i < $cityNum; $i++) { - $city = MYDB_fetch_array($result); - if(isset($city['city'])) { - if (isset($adj[$city['city']]) && ($adj[$city['city']] == 1)) { - $str .= " or city={$city['city']}"; - $valid = 1; - } - } - } - $query = "update city set front=0 where nation={$nationNo}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($valid == 1) { - $query = "update city set front=1 where {$str}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -} - -function checkSupply($connect) { - include_once("queue.php"); - - $query = "select city,nation,path from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - for($i=0; $i < $cityNum; $i++) { - $city = MYDB_fetch_array($result); - $cityPath[$city['city']] = $city['path']; - $cityNation[$city['city']] = $city['nation']; - $label[$city['city']] = 0; - } - - $select = 0; - $queue = new Queue(20); - $queue2 = new Queue(20); - $labelling = 0; - $marked = 0; - $comCount = array(); - - //모든 도시 마크할 때까지 - while($marked < $cityNum) { - $queue->clear(); $queue2->clear(); - $q = $queue; $q2 = $queue2; - - $labelling++; - //마크 되지 않은 도시부터 라벨링 시작 - for($i=1; $i <= $cityNum; $i++) { - if($label[$i] == 0) { - $label[$i] = $labelling; - $labelMapping[$labelling] = $cityNation[$i]; - isset($comCount[$cityNation[$i]]) ? $comCount[$cityNation[$i]]++ : $comCount[$cityNation[$i]] = 1; - $q->push($i); - $marked++; - break; - } - } - - while($q->getSize() > 0 || $q2->getSize() > 0) { - while($q->getSize() > 0) { - $city = $q->pop(); - unset($path); - $path = explode("|", $cityPath[$city]); - for($i=0; $i < count($path); $i++) { - if($label[$path[$i]] == 0 && $cityNation[$path[$i]] == $cityNation[$city]) { - $label[$path[$i]] = $labelling; - $q2->push($path[$i]); - $marked++; - } - } - } - if($select == 0) { - $q2 = $queue; - $q = $queue2; - } else { - $q = $queue; - $q2 = $queue2; - } - $select = 1 - $select; - } - } - - //공백지는 다 보급상태 - $query = "update city set supply='1' where nation='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //우선 다 미보급 상태로 - $query = "update city set supply='0' where nation!='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //도시 있는 국가들 - $query = "select nation,capital from nation where level>'0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nationNum = MYDB_num_rows($result); - - $str = "city='0'"; - for($i=0; $i < $nationNum; $i++) { - $nation = MYDB_fetch_array($result); - //수도 있는 덩어리 도시들 1로 세팅 - $lbl = $label[$nation['capital']]; - - for($k=1; $k <= $cityNum; $k++) { - if($lbl == $label[$k]) { - $str .= " or city='{$k}'"; - } - } - } - $query = "update city set supply='1' where {$str}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function updateYearly($connect) { - //통계 - checkStatistic($connect); -} - -//관직 변경 해제 -function updateQuaterly($connect) { - //천도 제한 해제, 관직 변경 제한 해제 - $query = "update nation set capset='0',l12set='0',l11set='0',l10set='0',l9set='0',l8set='0',l7set='0',l6set='0',l5set='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //관직 변경 제한 해제 - $query = "update city set gen1set='0',gen2set='0',gen3set='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정 -function preUpdateMonthly($connect) { - //연감 월결산 - $result = LogHistory($connect); - $history = array(); - - if($result == false) { return false; } - - $query = "select startyear,year,month,normgeneral from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //배신 횟수 최대 10회 미만 - $query = "update general set betray=9 where betray>9"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //보급선 체크 - checkSupply($connect); - //미보급도시 10% 감소 - $query = "update city set pop=pop*0.9,rate=rate*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,def=def*0.9,wall=wall*0.9 where supply='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //미보급도시 장수 5% 감소 - $query = "select city,nation from city where supply='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - for($i=0; $i < $cityCount; $i++) { - $city = MYDB_fetch_array($result); - //병 훈 사 5%감소 - $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='{$city['city']}' and nation='{$city['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //민심30이하 공백지 처리 - $query = "select city,name,gen1,gen2,gen3 from city where rate<='30' and supply='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - for($i=0; $i < $cityCount; $i++) { - $city = MYDB_fetch_array($result); - - $query = "update general set level=1 where no='{$city['gen1']}' or no='{$city['gen2']}' or no='{$city['gen3']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; - } - pushHistory($connect, $history); - //민심30이하 공백지 처리 - $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 우선 병사수/100 만큼 소비 - $query = "update general set rice=rice-round(crew/100) where crew>=100"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 쌀이 마이너스인 장수들 소집해제 - $query = "select no,name,rice,crew,city from general where rice<0"; - $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); - - // 주민으로 돌아감 - $query = "update city set pop=pop+'{$general['crew']}' where city='{$general['city']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "update general set crew=0,rice=0 where no='{$general['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; - pushGenLog($general, $log); - } - - //접률감소 - $query = "update general set connect=floor(connect*0.99)"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //건국제한, 전략제한, 외교제한-1 - $query = "update general set makelimit=makelimit-1 where makelimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set tricklimit=tricklimit-1 where tricklimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update nation set surlimit=surlimit-1 where surlimit>'0'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //세율 동기화 목적 - $query = "update nation set rate_tmp=rate"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //도시훈사 180년 60, 220년 87, 240년 100 - $rate = round(($admin['year'] - $admin['startyear']) / 1.5) + 60; - if($rate > 100) $rate = 100; - - //금률 쌀률, 내정비용 -// $query = "select count(*) as cnt from general"; -// $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -// $gencount = MYDB_fetch_array($result); // 전체 등록자 수 -// $ratio = 50 + round($gencount['cnt'] / $admin['normgeneral'] * 100 / 2); // 300명 등록시에 100% 지급 - $ratio = 100; - // 20 ~ 140원 - $develcost = ($admin['year'] - $admin['startyear'] + 10) * 2; - $query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost' where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //매달 사망자 수입 결산 - processDeadIncome($connect, $ratio); - - //계략, 전쟁표시 해제 - $query = "update city set state=0 where state=31 or state=33"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=state-1 where state=32 or state=34"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set term=term-1 where term>0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set conflict='',conflict2='' where term=0"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=0 where state=41"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=41 where state=42"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update city set state=42 where state=43"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 계급 검사 및 승,강급 - $query = "select no,name,dedication,dedlevel,experience,explevel from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - - unset($log); - $log = array(); - $log = checkDedication($connect, $general, $log); - $log = checkExperience($connect, $general, $log); - pushGenLog($general, $log); - } - - //첩보-1 - $query = "select nation,spy from nation where spy!=''"; - $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); - $spy = ""; $k = 0; unset($citys); - if($nation['spy'] != "") { $citys = explode("|", $nation['spy']); } - while(count($citys)) { - $citys[$k]--; - if($citys[$k]%10 != 0) { $spy .= "$citys[$k]"; } - $k++; - if($k >= count($citys)) { break; } - if($citys[$k-1]%10 != 0) { $spy .= "|"; } - } - $query = "update nation set spy='$spy' where nation='{$nation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - return true; -} - -// 외교 로그처리, 외교 상태 처리 -function postUpdateMonthly($connect) { - $query = "select startyear,year,month,scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - //각 국가 전월 장수수 대비 당월 장수수로 단합도 산정 - //각 국가 장수수를 구하고 국력 산정 -// $query = "select nation,gennum from nation where level>0"; -// 국력= -// 자원(국가/장수의 금,쌀) -// 기술력 -// 인구수*내정% -// 장수능력 -// 접속률 -// 숙련도 -// 명성,공헌 - $query = " -select -A.nation, -A.gennum, A.gennum2, A.chemi, -round(( - round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100) - +A.tech - +if(A.level=0,0,( - select round( - sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100 - ) from city where nation=A.nation and supply=1 - )) - +(select sum(leader+power+intel) from general where nation=A.nation) - +(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation) - +(select round(sum(experience+dedication)/100) from general where nation=A.nation) - +(select round(avg(connect)) from general where nation=A.nation) -)/10) -as power -from nation A -group by A.nation -"; - $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); - $genNum[$nation['nation']] = $nation['gennum']; - - if($nation['gennum'] > $nation['gennum2']) { - // 장수가 증가했을때 - $nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100); - } else { - // 장수가 감소했을때 - $nation['chemi'] -= ceil(($nation['gennum2'] - $nation['gennum']) / $nation['gennum2'] * 100); - } - // 매달 2씩 증가 - $nation['chemi'] += 2; - if($nation['chemi'] < 0) { $nation['chemi'] = 0; } - if($nation['chemi'] > 100) { $nation['chemi'] = 100; } - - //약간의 랜덤치 부여 (95% ~ 105%) - $nation['power'] = round($nation['power'] * (rand()%101 + 950) / 1000); - $query = "update nation set power='{$nation['power']}',gennum2='{$nation['gennum']}',chemi='{$nation['chemi']}' where nation='{$nation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - // 전쟁기한 세팅 - $query = "select me,you,dead,term from diplomacy where state='0'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipCount = MYDB_num_rows($result); - for($i=0; $i < $dipCount; $i++) { - $dip = MYDB_fetch_array($result); - $genCount = $genNum[$dip['me']]; - // 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산 - // 4000 / 10 * 0.25 = 100 - $term = round($dip['dead'] / 100 / $genCount) + 1; - if($dip['term'] > $term) { $term = $dip['term']; } - if($term > 13) { $term = 13; } - $query = "update diplomacy set term='{$term}' where (me='{$dip['me']}' and you='{$dip['you']}')"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - - //개전국 로그 - $query = "select me,you from diplomacy where state='1' and term<='1' and me= $admin['startyear']+3) { - checkWander($connect); - } - // 작위 업데이트 - updateNationState($connect); - // 천통여부 검사 - checkEmperior($connect); - //토너먼트 개시 - triggerTournament($connect); - // 시스템 거래건 등록 - registerAuction($connect); - //전방설정 - $query = "select nation from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation['nation']); - } -} function triggerTournament($connect) { $query = "select tournament,tnmt_trig from game where no='1'"; @@ -3411,625 +2756,6 @@ function triggerTournament($connect) { } } -function checkWander($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - // 국가정보, 장수수 - $query = "select nation from nation where level=0"; - $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); - - $query = "select no,name,nation,level,history,turntime from general where nation='{$nation['nation']}' and level=12"; - $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($kingResult); - - $log[0] = "●초반 제한후 방랑군은 자동 해산됩니다."; - pushGenLog($king, $log); - - process_56($connect, $king); - } -} - -function checkMerge($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from diplomacy where state='3' and term='0'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($dipresult); - - for($i=0; $i < $dipcount; $i++) { - $dip = MYDB_fetch_array($dipresult); - - // 아국군주 - $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - //양국 NPC수 - $query = "select no from general where nation='{$you['nation']}' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - //양국 NPC수 - $query = "select no from general where nation='{$me['nation']}' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount2 = MYDB_num_rows($result); - - //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "{$mynation['name']}(와)과 통합에 성공했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합에 성공"); - } - //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount2 = MYDB_num_rows($result); - $genlog[0] = "{$younation['name']}(와)과 통합에 성공했습니다."; - for($i=0; $i < $gencount2; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}{$you['makenation']}로 통합에 성공"); - } - - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통합】{$mynation['name']}(와)과 {$younation['name']}(이)가 {$you['makenation']}(으)로 통합하였습니다."; - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$you['makenation']}에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합"); - - $newGenCount = $gencount + $gencount2; - if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; - $newTech = round($newTotalTech / $newGenCount); - // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //국가 삭제 - $query = "delete from nation where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 - $query = "update general set belong=1,level=1,nation='{$you['nation']}' where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 공헌도0.9, 명성0.9 - $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='{$you['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 통합국 모든 도시 5% 감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) - $resignCount = 0; - if($npccount >= $npccount2) { - $resignCount = round($npccount*(rand()%21+90)/100); - } else { - $resignCount = round($npccount2*(rand()%21+90)/100); - } - $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($me, $mylog); - pushGenLog($you, $youlog); - pushHistory($connect, $history); - unset($mylog); - unset($youlog); - unset($history); - } -} - -function checkSurrender($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select * from diplomacy where state='5' and term='0'"; - $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipcount = MYDB_num_rows($dipresult); - - for($i=0; $i < $dipcount; $i++) { - $dip = MYDB_fetch_array($dipresult); - - // 아국군주 - $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - // 상대군주 - $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - // 모국 - $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $younation = MYDB_fetch_array($result); - // 아국 - $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - //양국 NPC수 - $query = "select no from general where nation='{$you['nation']}' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount = MYDB_num_rows($result); - //양국 NPC수 - $query = "select no from general where nation='{$me['nation']}' and npc>=2"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npccount2 = MYDB_num_rows($result); - - //피항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "{$mynation['name']} 합병에 성공했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']} 합병에 성공"); - } - //항복국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount2 = MYDB_num_rows($result); - $genlog[0] = "{$younation['name']}(으)로 항복하여 수도로 이동합니다."; - for($i=0; $i < $gencount2; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$younation['name']}(으)로 항복"); - } - - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【투항】{$mynation['name']} (이)가 {$younation['name']}(으)로 항복하였습니다."; - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$younation['name']}에 혼란이 일고 있습니다."; - $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 합병"); - - $newGenCount = $gencount + $gencount2; - if($newGenCount < 10) { $newGenCount = 10; } - $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; - $newTech = round($newTotalTech / $newGenCount); - // 자금 통합, 외교제한 5년, 기술유지 - $query = "update nation set gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //합병 당한국 모든 도시 10%감소 - $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //합병 시도국 모든 도시 5%감소 - $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //국가 삭제 - $query = "delete from nation where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 군주가 있는 위치 구함 - $query = "select city from general where nation='{$you['nation']}' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $king = MYDB_fetch_array($result); - // 아국 모든 도시들 상대국 소속으로 - $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 제의국 모든 장수들 공헌도0.95, 명성0.95 - $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='{$you['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 - $query = "update general set belong=1,level=1,nation='{$you['nation']}',city='{$king['city']}',dedication=dedication*1.1,experience=experience*0.9 where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대도 모두 국가 소속 변경 - $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) - $resignCount = 0; - if($npccount >= $npccount2) { - $resignCount = round($npccount*(rand()%21+90)/100); - } else { - $resignCount = round($npccount2*(rand()%21+90)/100); - } - $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 - $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($me, $mylog); - pushGenLog($you, $youlog); - pushHistory($connect, $history); - unset($mylog); - unset($youlog); - unset($history); - } -} - -function updateNationState($connect) { - $history = array(); - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,level,history from nation"; - $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 city,level,secu from city where nation='{$nation['nation']}' and level>=4"; - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - $query = "select no from general where nation='{$nation['nation']}'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($genresult); - - if($citycount == 0) { - $nationlevel = 0; // 방랑군 - } elseif($citycount == 1) { - $nationlevel = 1; // 호족 - } elseif($citycount <= 4) { - $nationlevel = 2; // 군벌 - } elseif($citycount <= 7) { - $nationlevel = 3; // 주자사 - } elseif($citycount <= 10) { - $nationlevel = 4; // 주목 - } elseif($citycount <= 15) { - $nationlevel = 5; // 공 - } elseif($citycount <= 20) { - $nationlevel = 6; // 왕 - } else { - $nationlevel = 7; // 황제 - } - - if($nationlevel > $nation['level']) { - $nation['level'] = $nationlevel; - - switch($nationlevel) { - case 7: - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; - $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); - break; - case 6: - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; - $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극"); - break; - case 5: - case 4: - case 3: - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; - $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); - break; - case 2: - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; - $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."로 나서다"); - break; - } - - //작위 상승 - $query = "update nation set level='{$nation['level']}' where nation='{$nation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $gennum = $gencount; - if($gencount < 10) $gencount = 10; - //기술 및 변경횟수 업데이트 - $myset = $nation['level'] + 1; - $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='{$nation['nation']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - pushHistory($connect, $history); -} - -function checkStatistic($connect) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $etc = ''; - - $query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $general['avggold'] = round($general['avggold']); - $general['avgrice'] = round($general['avgrice']); - $general['avgdex'] = round($general['avgdex']); - $general['avgexpded'] = round($general['avgexpded']); - $etc .= "평균 금/쌀 ({$general['avggold']}/{$general['avgrice']}), 평균/최고 숙련({$general['avgdex']}/{$general['maxdex']}), 평균/최고 경험공헌({$general['avgexpded']}/{$general['maxexpded']}), "; - - $query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - $nation['avgtech'] = round($nation['avgtech']); - $nation['avgpower'] = round($nation['avgpower']); - $etc .= "최저/평균/최고 기술({$nation['mintech']}/{$nation['avgtech']}/{$nation['maxtech']}), "; - $etc .= "최저/평균/최고 국력({$nation['minpower']}/{$nation['avgpower']}/{$nation['maxpower']}), "; - - $nationName = ''; - $power_hist = ''; - - $query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice 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); - for($i=0; $i < $nationCount; $i++) { - $nation = MYDB_fetch_array($result); - - $query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result2); - - $query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'"; - $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($result2); - - $nationName .= $nation['name'].'('.getNationType($nation['type']).'), '; - $power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), "; - $nationHists[$nation['type']]++; - } - - $nationHist = ''; - for($i=1; $i <= 13; $i++) { - if(!$nationHists[$i]) { $nationHists[$i] = '-'; } - $nationHist .= getNationType($i)."({$nationHists[$i]}), "; - } - - $query = "select no from general where npc <= 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($result); - - $query = "select no from general where npc > 1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $npcCount = MYDB_num_rows($result); - - $query = "select personal,special,special2 from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $generalCount = MYDB_num_rows($result); - for($i=0; $i < $generalCount; $i++) { - $general = MYDB_fetch_array($result); - - $personalHists[$general['personal']]++; - $specialHists[$general['special']]++; - $specialHists2[$general['special2']]++; - } - - $generalCountStr = "{$generalCount}({$genCount}+{$npcCount})"; - - $personalHist = ''; - for($i=0; $i < 11; $i++) { - if(!$personalHists[$i]) { $personalHists[$i] = '-'; } - $personalHist .= getGenChar($i)."({$personalHists[$i]}), "; - } - $specialHist = ''; - for($i=0; $i < 40; $i++) { - $call = getGenSpecial($i); - if($call) { - if(!$specialHists[$i]) { $specialHists[$i] = '-'; } - - $specialHist .= $call."({$specialHists[$i]}), "; - } - } - $specialHist .= '// '; - $specialHist .= "-({$specialHists2[0]}), "; - for($i=40; $i < 80; $i++) { - $call = getGenSpecial($i); - if($call) { - if(!$specialHists2[$i]) { $specialHists2[$i] = '-'; } - - $specialHist .= $call."({$specialHists2[$i]}), "; - } - } - - $crewtype = ''; - $types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43); - $count = count($types); - for($i=0; $i < $count; $i++) { - $query = "select count(*) as type from general where crewtype={$types[$i]} and crew>=100"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $crewtype .= getTypeName($types[$i])."({$general['type']}), "; - } - - $query = " - insert into statistic ( - year, month, - nation_count, nation_name, nation_hist, - gen_count, personal_hist, special_hist, power_hist, - crewtype, etc - ) values ( - '{$admin['year']}', '{$admin['month']}', - '$nationCount', '$nationName', '$nationHist', - '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', - '$crewtype', '$etc' - )"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function checkEmperior($connect) { - $query = "select year,month,isUnited from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select nation,name,history from nation where level>0"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - if($count == 1 && $admin['isUnited'] == 0) { - $nation = MYDB_fetch_array($result); - - $query = "select city from city where nation='{$nation['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - $query = "select city from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $allcount = MYDB_num_rows($result); - - if($count == $allcount) { - $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(이)가 전토를 통일"); - - $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no from general where npc<2 and age>50"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - for($i=0; $i < $count; $i++) { - $general = MYDB_fetch_array($result); - CheckHall($connect, $general['no']); - } - - $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='{$nation['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $city = MYDB_fetch_array($cityresult); - $pop = "{$city['totalpop']} / {$city['maxpop']}"; - $poprate = round($city['totalpop']/$city['maxpop']*100, 2); - $poprate .= " %"; - - $query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'"; - $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $level12 = MYDB_fetch_array($genresult); - - $query = "select name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군 - $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $tigernum = MYDB_num_rows($tigerresult); - for($i=0; $i < $tigernum; $i++) { - $tiger = MYDB_fetch_array($tigerresult); - if($tiger['killnum'] > 0) { - $tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, "; - } - } - - $query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자 - $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $eaglenum = MYDB_num_rows($eagleresult); - for($i=0; $i < $eaglenum; $i++) { - $eagle = MYDB_fetch_array($eagleresult); - if($eagle['firenum'] > 0) { - $eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, "; - } - } - - $log[0] = "●{$admin['year']}년 {$admin['month']}월: {$nation['name']}(이)가 전토를 통일하였습니다."; - - $query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - for($i=0; $i < $gencount; $i++) { - $general = MYDB_fetch_array($result); - $gen .= "{$general['name']}, "; - - pushGenLog($general, $log); - } - - $nation['type'] = getNationType($nation['type']); - - $query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $stat = MYDB_fetch_array($result); - - $query = "select count(*) as cnt from general"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_fetch_array($result); - - $statNC = "1 / {$stat['nc']}"; - $statGC = "{$gencount['cnt']} / {$stat['gc']}"; - - $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $statNation = MYDB_fetch_array($result); - - $query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $statGeneral = MYDB_fetch_array($result); - - $query = " - insert into emperior ( - phase, - nation_count, nation_name, nation_hist, - gen_count, personal_hist, special_hist, - name, type, color, year, month, power, gennum, citynum, - pop, poprate, gold, rice, - l12name, l12pic, l11name, l11pic, - l10name, l10pic, l9name, l9pic, - l8name, l8pic, l7name, l7pic, - l6name, l6pic, l5name, l5pic, - tiger, eagle, gen, history - ) values ( - '-', - '$statNC', '{$statNation['nation_name']}', '{$statNation['nation_hist']}', - '$statGC', '{$statGeneral['personal_hist']}', '{$statGeneral['special_hist']}', - '{$nation['name']}', '{$nation['type']}', '{$nation['color']}', '{$admin['year']}', '{$admin['month']}', '{$nation['power']}', '{$nation['gennum']}', '$allcount', - '$pop', '$poprate', '{$nation['gold']}', '{$nation['rice']}', - '{$level12['name']}', '{$level12['picture']}', '{$level11['name']}', '{$level11['picture']}', - '{$level10['name']}', '{$level10['picture']}', '{$level9['name']}', '{$level9['picture']}', - '{$level8['name']}', '{$level8['picture']}', '{$level7['name']}', '{$level7['picture']}', - '{$level6['name']}', '{$level6['picture']}', '{$level5['name']}', '{$level5['picture']}', - '$tigerstr', '$eaglestr', '$gen', '{$nation['history']}' - )"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통일】{$nation['name']}(이)가 전토를 통일하였습니다."; - pushHistory($connect, $history); - - //연감 월결산 - LogHistory($connect); - } - } -} - function PreprocessCommand($connect, $no) { $query = "select no,name,city,injury,special2,item,turn0 from general where no='$no'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5536,75 +4262,6 @@ function getNation($connect, $nation) { return $nation; } -function newColor($color) { - switch($color) { - case "": - case "330000": - case "FF0000": - case "800000": - case "A0522D": - case "FF6347": - case "808000": - case "008000": - case "2E8B57": - case "008080": - case "6495ED": - case "0000FF": - case "000080": - case "483D8B": - case "7B68EE": - case "800080": - case "A9A9A9": - case "000000": - $color = "FFFFFF"; break; - default: - $color = "000000"; break; - } - return $color; -} - -function backColor($color) { - return newColor($color); -} - -function ConvertLog($str, $type=1) { - if($type > 0) { - $str = str_replace("<1>", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - //$str = str_replace("", "", $str); - //$str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - } else { - $str = str_replace("<1>", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - $str = str_replace("", "", $str); - } - - return $str; -} - function deleteNation($connect, $general) { $date = substr($general['turntime'],11,5); diff --git a/twe/func_converter.php b/twe/func_converter.php index ced27bf8..c231e076 100644 --- a/twe/func_converter.php +++ b/twe/func_converter.php @@ -8,7 +8,7 @@ function getScenario() { //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. - $scenario = newDB()->queryFirstColumn("select `scenario` from `game` where no=1"); + $scenario = newDB()->queryFirstColumn('select `scenario` from `game` where no=1'); switch($scenario) { case 0: $str = '공백지모드'; break; @@ -629,7 +629,7 @@ function getBill($dedication) { function getCost($armtype) { //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. //TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함 - return newDB()->queryFirstColumn("select cst%l from game where no='1'", intval($armtype)); + return newDB()->queryFirstColumn('select cst%l from game where no=1', intval($armtype)); } function TechLimit($startyear, $year, $tech) { @@ -1020,3 +1020,77 @@ function getItemCost($weap) { } return $weapcost; } + + + +function ConvertLog($str, $type=1) { + //TODO: 이 함수는 없애야 한다. CSS로 대신하자 + if($type > 0) { + $str = str_replace("<1>", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + //$str = str_replace("", "", $str); + //$str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + } else { + $str = str_replace("<1>", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + $str = str_replace("", "", $str); + } + + return $str; +} + + + +function newColor($color) { + switch($color) { + case "": + case "330000": + case "FF0000": + case "800000": + case "A0522D": + case "FF6347": + case "808000": + case "008000": + case "2E8B57": + case "008080": + case "6495ED": + case "0000FF": + case "000080": + case "483D8B": + case "7B68EE": + case "800080": + case "A9A9A9": + case "000000": + $color = "FFFFFF"; break; + default: + $color = "000000"; break; + } + return $color; +} + +function backColor($color) { + return newColor($color); +} diff --git a/twe/func_gamerule.php b/twe/func_gamerule.php new file mode 100644 index 00000000..f5deb460 --- /dev/null +++ b/twe/func_gamerule.php @@ -0,0 +1,1292 @@ + $leader, 'power' => $power, 'intel' => $intel); +} + +// 14 ~ 75 +function abilityLeadpow() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 6.0; + $power = (rand()%100 + 1) / 100.0 + 6.0; + $intel = (rand()%100 + 1) / 100.0 + 1.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +function abilityLeadint() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 6.0; + $power = (rand()%100 + 1) / 100.0 + 1.0; + $intel = (rand()%100 + 1) / 100.0 + 6.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +function abilityPowint() { + $total = 150; + $leader = (rand()%100 + 1) / 100.0 + 1.0; + $power = (rand()%100 + 1) / 100.0 + 6.0; + $intel = (rand()%100 + 1) / 100.0 + 6.0; + $rate = $leader + $power + $intel; + $leader = floor($leader / $rate * $total); + $power = floor($power / $rate * $total); + $intel = floor($intel / $rate * $total); + + while($leader+$power+$intel < 150) { + $leader++; + } + + return array('leader' => $leader, 'power' => $power, 'intel' => $intel); +} + +/** + * 게임 내부에 사용하는 유틸리티 함수들을 분리 + */ + + +// 0 1 2 3 4 5 6 7 +// 0 -, 경작, 상재, 발명 = 3 지력내정 +// 10 축성, 수비, 통찰 = 3 무력내정 +// 20 인덕 = 1 통솔내정 +// 30 거상, 귀모 = 2 공통내정 + +function getSpecial($connect, $leader, $power, $intel) { + //통장 + if($leader*0.9 > $power && $leader*0.9 > $intel) { + $type = array(20, 31); + $special = array_rand($type); + // 귀모는 50% * 5% = 2.5% + if($special == 31 && randF() < 0.05) { + $type = array(20, 20); + $special = array_rand($type); + } + //무장 + } elseif($power >= $intel) { + $type = array(10, 11, 12, 31); + $special = array_rand($type); + // 귀모는 그중에 25% * 10% = 2.5% + if(($special == 30 || $special == 31) && randF() < 0.05) { + $type = array(10, 11, 12); + $special = array_rand($type); + } + //지장 + } elseif($intel > $power) { + $type = array(1, 2, 3, 31); + $special = array_rand($type); + // 거상, 귀모는 그중에 25% * 10% = 2.5% + if($special == 31 && randF() < 0.05) { + $type = array(1, 2, 3); + $special = array_rand($type); + } + } else { + //귀모. 다만 이쪽으로 빠지지 않음. + $type = 31; + } + return $special; +} + +// 0 1 2 3 4 5 6 7 +// 40 귀병, 신산, 환술, 집중, 신중, 반계 = 6 지력전투 +// 50 보병, 궁병, 기병, 공성 = 4 무력전투 +// 60 돌격, 무쌍, 견고, 위압 = 4 무장전투 +// 70 저격, 필살, 징병, 의술, 격노, 척사 = 6 공통전투 + +function getSpecial2($connect, $leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex20=0, $dex30=0, $dex40=0) { + $special2 = 70; + // 숙련 10,000: 25%, 40,000: 50%, 100,000: 79%, 160,000: 100% + $dex = sqrt($dex0 + $dex10 + $dex20 + $dex30 + $dex40); + $dex = round($dex / 4); + // 숙련 10,000: 75%, 40,000: 50%, 100,000: 21%, 160,000: 0% + // 그중 20%만 + if($nodex == 0 && rand()%100 < 20 && rand()%100 > $dex) { + if(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex0) { + $special2 = 50; + // 숙련이 아얘 없을시 재분배 + if($dex0 <= 0) { + if($power >= $intel) { + $special2 = 50 + rand()%4; + } else { + $special2 = 40; + } + } + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex10) { + $special2 = 51; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex20) { + $special2 = 52; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex30) { + $special2 = 40; + } elseif(max($dex0, $dex10, $dex20, $dex30, $dex40) == $dex40) { + $special2 = 53; + } + //무장 + } elseif($power >= $intel) { + $type = array(60, 61, 62, 63, 70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%10]; + // 의술은 그중에 10% * 20% = 2% + if(($special2 == 73) && rand()%100 > 20) { + $type = array(60, 61, 62, 63, 70, 71, 72, 74, 75); + $special2 = $type[rand()%9]; + } + //지장 + } elseif($intel > $power) { + $type = array(41, 42, 43, 44, 45, 70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%11]; + // 환술은 그중에 9% * 50% = 4.5% + if(($special2 == 42) && rand()%100 > 50) { + $type = array(41, 43, 44, 45, 70, 71, 72, 74, 75); + $special2 = $type[rand()%9]; + } + // 의술은 그중에 9% * 20% = 1.8% + if(($special2 == 73) && rand()%100 > 20) { + $type = array(41, 42, 43, 44, 45, 70, 71, 72, 74, 75); + $special2 = $type[rand()%10]; + } + } else { + $type = array(70, 71, 72, 73, 74, 75); + $special2 = $type[rand()%6]; + } + return $special2; +} + +function getGenDex($general, $type) { + $type = floor($type / 10) * 10; + return $general["dex{$type}"]; +} + +function addGenDex($connect, $no, $type, $exp) { + $type = floor($type / 10) * 10; + $dexType = "dex{$type}"; + if($type == 30) { $exp = round($exp * 0.90); } //귀병은 90%효율 + elseif($type == 40) { $exp = round($exp * 0.90); } //차병은 90%효율 + + $query = "update general set {$dexType}={$dexType}+{$exp} where no='$no'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + + +//한국가의 전체 전방 설정 +function SetNationFront($connect, $nationNo) { + if(!$nationNo) { return; } + // 도시소유 국가와 선포,교전중인 국가 + $query = "select me,you from diplomacy where me={$nationNo} and (state=0 or (state=1 and term<=3))"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipNum = MYDB_num_rows($result); + if($dipNum > 0) { + for($i=0; $i < $dipNum; $i++) { + $dip = MYDB_fetch_array($result); + + $query = "select city,path from city where nation={$dip['you']}"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result2); + for($k=0; $k < $cityNum; $k++) { + $city = MYDB_fetch_array($result2); + $path = explode("|", $city['path']); + $cnt = count($path); + for($j=0; $j < $cnt; $j++) { + $adj[$path[$j]] = 1; + } + } + } + } else { + //평시이면 공백지 + $query = "select city,path from city where nation=0"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result2); + for($k=0; $k < $cityNum; $k++) { + $city = MYDB_fetch_array($result2); + $path = explode("|", $city['path']); + $cnt = count($path); + for($j=0; $j < $cnt; $j++) { + $adj[$path[$j]] = 1; + } + } + } + $str = "city=0"; $valid = 0; + $query = "select city from city where nation={$nationNo}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + for($i=0; $i < $cityNum; $i++) { + $city = MYDB_fetch_array($result); + if(isset($city['city'])) { + if (isset($adj[$city['city']]) && ($adj[$city['city']] == 1)) { + $str .= " or city={$city['city']}"; + $valid = 1; + } + } + } + $query = "update city set front=0 where nation={$nationNo}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + if($valid == 1) { + $query = "update city set front=1 where {$str}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } +} + +function checkSupply($connect) { + include_once("queue.php"); + + $query = "select city,nation,path from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityNum = MYDB_num_rows($result); + for($i=0; $i < $cityNum; $i++) { + $city = MYDB_fetch_array($result); + $cityPath[$city['city']] = $city['path']; + $cityNation[$city['city']] = $city['nation']; + $label[$city['city']] = 0; + } + + $select = 0; + $queue = new Queue(20); + $queue2 = new Queue(20); + $labelling = 0; + $marked = 0; + $comCount = array(); + + //모든 도시 마크할 때까지 + while($marked < $cityNum) { + $queue->clear(); $queue2->clear(); + $q = $queue; $q2 = $queue2; + + $labelling++; + //마크 되지 않은 도시부터 라벨링 시작 + for($i=1; $i <= $cityNum; $i++) { + if($label[$i] == 0) { + $label[$i] = $labelling; + $labelMapping[$labelling] = $cityNation[$i]; + isset($comCount[$cityNation[$i]]) ? $comCount[$cityNation[$i]]++ : $comCount[$cityNation[$i]] = 1; + $q->push($i); + $marked++; + break; + } + } + + while($q->getSize() > 0 || $q2->getSize() > 0) { + while($q->getSize() > 0) { + $city = $q->pop(); + unset($path); + $path = explode("|", $cityPath[$city]); + for($i=0; $i < count($path); $i++) { + if($label[$path[$i]] == 0 && $cityNation[$path[$i]] == $cityNation[$city]) { + $label[$path[$i]] = $labelling; + $q2->push($path[$i]); + $marked++; + } + } + } + if($select == 0) { + $q2 = $queue; + $q = $queue2; + } else { + $q = $queue; + $q2 = $queue2; + } + $select = 1 - $select; + } + } + + //공백지는 다 보급상태 + $query = "update city set supply='1' where nation='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //우선 다 미보급 상태로 + $query = "update city set supply='0' where nation!='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //도시 있는 국가들 + $query = "select nation,capital from nation where level>'0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nationNum = MYDB_num_rows($result); + + $str = "city='0'"; + for($i=0; $i < $nationNum; $i++) { + $nation = MYDB_fetch_array($result); + //수도 있는 덩어리 도시들 1로 세팅 + $lbl = $label[$nation['capital']]; + + for($k=1; $k <= $cityNum; $k++) { + if($lbl == $label[$k]) { + $str .= " or city='{$k}'"; + } + } + } + $query = "update city set supply='1' where {$str}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + + +function updateYearly($connect) { + //통계 + checkStatistic($connect); +} + +//관직 변경 해제 +function updateQuaterly($connect) { + //천도 제한 해제, 관직 변경 제한 해제 + $query = "update nation set capset='0',l12set='0',l11set='0',l10set='0',l9set='0',l8set='0',l7set='0',l6set='0',l5set='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //관직 변경 제한 해제 + $query = "update city set gen1set='0',gen2set='0',gen3set='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +// 벌점 감소와 건국제한-1 전턴제한-1 외교제한-1, 1달마다 실행, 병사 있는 장수의 군량 감소, 수입비율 조정 +function preUpdateMonthly($connect) { + //연감 월결산 + $result = LogHistory($connect); + $history = array(); + + if($result == false) { return false; } + + $query = "select startyear,year,month,normgeneral from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //배신 횟수 최대 10회 미만 + $query = "update general set betray=9 where betray>9"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //보급선 체크 + checkSupply($connect); + //미보급도시 10% 감소 + $query = "update city set pop=pop*0.9,rate=rate*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,def=def*0.9,wall=wall*0.9 where supply='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //미보급도시 장수 5% 감소 + $query = "select city,nation from city where supply='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + for($i=0; $i < $cityCount; $i++) { + $city = MYDB_fetch_array($result); + //병 훈 사 5%감소 + $query = "update general set crew=crew*0.95,atmos=atmos*0.95,train=train*0.95 where city='{$city['city']}' and nation='{$city['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + //민심30이하 공백지 처리 + $query = "select city,name,gen1,gen2,gen3 from city where rate<='30' and supply='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $cityCount = MYDB_num_rows($result); + for($i=0; $i < $cityCount; $i++) { + $city = MYDB_fetch_array($result); + + $query = "update general set level=1 where no='{$city['gen1']}' or no='{$city['gen2']}' or no='{$city['gen3']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; + } + pushHistory($connect, $history); + //민심30이하 공백지 처리 + $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0,front=0 where rate<='30' and supply='0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 우선 병사수/100 만큼 소비 + $query = "update general set rice=rice-round(crew/100) where crew>=100"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 쌀이 마이너스인 장수들 소집해제 + $query = "select no,name,rice,crew,city from general where rice<0"; + $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); + + // 주민으로 돌아감 + $query = "update city set pop=pop+'{$general['crew']}' where city='{$general['city']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "update general set crew=0,rice=0 where no='{$general['no']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $log[0] = "●군량이 모자라 병사들이 소집해제되었습니다!"; + pushGenLog($general, $log); + } + + //접률감소 + $query = "update general set connect=floor(connect*0.99)"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //건국제한, 전략제한, 외교제한-1 + $query = "update general set makelimit=makelimit-1 where makelimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set tricklimit=tricklimit-1 where tricklimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update nation set surlimit=surlimit-1 where surlimit>'0'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //세율 동기화 목적 + $query = "update nation set rate_tmp=rate"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //도시훈사 180년 60, 220년 87, 240년 100 + $rate = round(($admin['year'] - $admin['startyear']) / 1.5) + 60; + if($rate > 100) $rate = 100; + + //금률 쌀률, 내정비용 +// $query = "select count(*) as cnt from general"; +// $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +// $gencount = MYDB_fetch_array($result); // 전체 등록자 수 +// $ratio = 50 + round($gencount['cnt'] / $admin['normgeneral'] * 100 / 2); // 300명 등록시에 100% 지급 + $ratio = 100; + // 20 ~ 140원 + $develcost = ($admin['year'] - $admin['startyear'] + 10) * 2; + $query = "update game set gold_rate='$ratio',rice_rate='$ratio',city_rate='$rate',develcost='$develcost' where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + //매달 사망자 수입 결산 + processDeadIncome($connect, $ratio); + + //계략, 전쟁표시 해제 + $query = "update city set state=0 where state=31 or state=33"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=state-1 where state=32 or state=34"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set term=term-1 where term>0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set conflict='',conflict2='' where term=0"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=0 where state=41"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=41 where state=42"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $query = "update city set state=42 where state=43"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 계급 검사 및 승,강급 + $query = "select no,name,dedication,dedlevel,experience,explevel from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + + unset($log); + $log = array(); + $log = checkDedication($connect, $general, $log); + $log = checkExperience($connect, $general, $log); + pushGenLog($general, $log); + } + + //첩보-1 + $query = "select nation,spy from nation where spy!=''"; + $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); + $spy = ""; $k = 0; unset($citys); + if($nation['spy'] != "") { $citys = explode("|", $nation['spy']); } + while(count($citys)) { + $citys[$k]--; + if($citys[$k]%10 != 0) { $spy .= "$citys[$k]"; } + $k++; + if($k >= count($citys)) { break; } + if($citys[$k-1]%10 != 0) { $spy .= "|"; } + } + $query = "update nation set spy='$spy' where nation='{$nation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + return true; +} + +// 외교 로그처리, 외교 상태 처리 +function postUpdateMonthly($connect) { + $query = "select startyear,year,month,scenario from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + //각 국가 전월 장수수 대비 당월 장수수로 단합도 산정 + //각 국가 장수수를 구하고 국력 산정 +// $query = "select nation,gennum from nation where level>0"; +// 국력= +// 자원(국가/장수의 금,쌀) +// 기술력 +// 인구수*내정% +// 장수능력 +// 접속률 +// 숙련도 +// 명성,공헌 + $query = " +select +A.nation, +A.gennum, A.gennum2, A.chemi, +round(( + round(((A.gold+A.rice)+(select sum(gold+rice) from general where nation=A.nation))/100) + +A.tech + +if(A.level=0,0,( + select round( + sum(pop)*sum(pop+agri+comm+secu+wall+def)/sum(pop2+agri2+comm2+secu2+wall2+def2)/100 + ) from city where nation=A.nation and supply=1 + )) + +(select sum(leader+power+intel) from general where nation=A.nation) + +(select round(sum(dex0+dex10+dex20+dex30+dex40)/1000) from general where nation=A.nation) + +(select round(sum(experience+dedication)/100) from general where nation=A.nation) + +(select round(avg(connect)) from general where nation=A.nation) +)/10) +as power +from nation A +group by A.nation +"; + $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); + $genNum[$nation['nation']] = $nation['gennum']; + + if($nation['gennum'] > $nation['gennum2']) { + // 장수가 증가했을때 + $nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100); + } else { + // 장수가 감소했을때 + $nation['chemi'] -= ceil(($nation['gennum2'] - $nation['gennum']) / $nation['gennum2'] * 100); + } + // 매달 2씩 증가 + $nation['chemi'] += 2; + if($nation['chemi'] < 0) { $nation['chemi'] = 0; } + if($nation['chemi'] > 100) { $nation['chemi'] = 100; } + + //약간의 랜덤치 부여 (95% ~ 105%) + $nation['power'] = round($nation['power'] * (rand()%101 + 950) / 1000); + $query = "update nation set power='{$nation['power']}',gennum2='{$nation['gennum']}',chemi='{$nation['chemi']}' where nation='{$nation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + // 전쟁기한 세팅 + $query = "select me,you,dead,term from diplomacy where state='0'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipCount = MYDB_num_rows($result); + for($i=0; $i < $dipCount; $i++) { + $dip = MYDB_fetch_array($result); + $genCount = $genNum[$dip['me']]; + // 25% 참여율일때 두당 10턴에 4000명 소모한다고 계산 + // 4000 / 10 * 0.25 = 100 + $term = round($dip['dead'] / 100 / $genCount) + 1; + if($dip['term'] > $term) { $term = $dip['term']; } + if($term > 13) { $term = 13; } + $query = "update diplomacy set term='{$term}' where (me='{$dip['me']}' and you='{$dip['you']}')"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + //개전국 로그 + $query = "select me,you from diplomacy where state='1' and term<='1' and me= $admin['startyear']+3) { + checkWander($connect); + } + // 작위 업데이트 + updateNationState($connect); + // 천통여부 검사 + checkEmperior($connect); + //토너먼트 개시 + triggerTournament($connect); + // 시스템 거래건 등록 + registerAuction($connect); + //전방설정 + $query = "select nation from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + for($i=0; $i < $count; $i++) { + $nation = MYDB_fetch_array($result); + SetNationFront($connect, $nation['nation']); + } +} + + +function checkWander($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + // 국가정보, 장수수 + $query = "select nation from nation where level=0"; + $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); + + $query = "select no,name,nation,level,history,turntime from general where nation='{$nation['nation']}' and level=12"; + $kingResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($kingResult); + + $log[0] = "●초반 제한후 방랑군은 자동 해산됩니다."; + pushGenLog($king, $log); + + process_56($connect, $king); + } +} + +function checkMerge($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from diplomacy where state='3' and term='0'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($dipresult); + + for($i=0; $i < $dipcount; $i++) { + $dip = MYDB_fetch_array($dipresult); + + // 아국군주 + $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + // 상대군주 + $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 모국 + $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + // 아국 + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + //양국 NPC수 + $query = "select no from general where nation='{$you['nation']}' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + //양국 NPC수 + $query = "select no from general where nation='{$me['nation']}' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount2 = MYDB_num_rows($result); + + //피항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "{$mynation['name']}(와)과 통합에 성공했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합에 성공"); + } + //항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount2 = MYDB_num_rows($result); + $genlog[0] = "{$younation['name']}(와)과 통합에 성공했습니다."; + for($i=0; $i < $gencount2; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$younation['name']}{$you['makenation']}로 통합에 성공"); + } + + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통합】{$mynation['name']}(와)과 {$younation['name']}(이)가 {$you['makenation']}(으)로 통합하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$you['makenation']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$you['makenation']}로 통합"); + + $newGenCount = $gencount + $gencount2; + if($newGenCount < 10) { $newGenCount = 10; } + $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; + $newTech = round($newTotalTech / $newGenCount); + // 자금 통합, 외교제한 5년, 기술유지 + $query = "update nation set name='{$you['makenation']}',gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //국가 삭제 + $query = "delete from nation where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 도시들 상대국 소속으로 + $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동 + $query = "update general set belong=1,level=1,nation='{$you['nation']}' where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 공헌도0.9, 명성0.9 + $query = "update general set dedication=dedication*0.9,experience=experience*0.9 where nation='{$you['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대도 모두 국가 소속 변경 + $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 통합국 모든 도시 5% 감소 + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) + $resignCount = 0; + if($npccount >= $npccount2) { + $resignCount = round($npccount*(rand()%21+90)/100); + } else { + $resignCount = round($npccount2*(rand()%21+90)/100); + } + $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 + $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($me, $mylog); + pushGenLog($you, $youlog); + pushHistory($connect, $history); + unset($mylog); + unset($youlog); + unset($history); + } +} + +function checkSurrender($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select * from diplomacy where state='5' and term='0'"; + $dipresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dipcount = MYDB_num_rows($dipresult); + + for($i=0; $i < $dipcount; $i++) { + $dip = MYDB_fetch_array($dipresult); + + // 아국군주 + $query = "select no,name,history,nation from general where nation='{$dip['me']}' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + // 상대군주 + $query = "select no,name,history,nation,makenation from general where nation='{$dip['you']}' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + // 모국 + $query = "select nation,name,surlimit,history,totaltech from nation where nation='{$you['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $younation = MYDB_fetch_array($result); + // 아국 + $query = "select nation,name,gold,rice,surlimit,totaltech from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $mynation = MYDB_fetch_array($result); + //양국 NPC수 + $query = "select no from general where nation='{$you['nation']}' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount = MYDB_num_rows($result); + //양국 NPC수 + $query = "select no from general where nation='{$me['nation']}' and npc>=2"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npccount2 = MYDB_num_rows($result); + + //피항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='{$you['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + $genlog[0] = "{$mynation['name']} 합병에 성공했습니다."; + for($i=0; $i < $gencount; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']} 합병에 성공"); + } + //항복국 장수들 역사 기록 및 로그 전달 + $query = "select no,name,nation,history from general where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount2 = MYDB_num_rows($result); + $genlog[0] = "{$younation['name']}(으)로 항복하여 수도로 이동합니다."; + for($i=0; $i < $gencount2; $i++) { + $gen = MYDB_fetch_array($result); + pushGenLog($gen, $genlog); + $gen = addHistory($connect, $gen, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}{$younation['name']}(으)로 항복"); + } + + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【투항】{$mynation['name']} (이)가 {$younation['name']}(으)로 항복하였습니다."; + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【혼란】통합에 반대하는 세력들로 인해 {$younation['name']}에 혼란이 일고 있습니다."; + $younation = addNationHistory($connect, $younation, "●{$admin['year']}년 {$admin['month']}월:{$mynation['name']}(와)과 합병"); + + $newGenCount = $gencount + $gencount2; + if($newGenCount < 10) { $newGenCount = 10; } + $newTotalTech = $younation['totaltech'] + $mynation['totaltech']; + $newTech = round($newTotalTech / $newGenCount); + // 자금 통합, 외교제한 5년, 기술유지 + $query = "update nation set gold=gold+'{$mynation['gold']}',rice=rice+'{$mynation['rice']}',surlimit='24',totaltech='$newTotalTech',tech='$newTech',gennum='{$newGenCount}' where nation='{$younation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //합병 당한국 모든 도시 10%감소 + $query = "update city set pop=pop*0.9,agri=agri*0.9,comm=comm*0.9,secu=secu*0.9,rate=rate*0.9,def=def*0.9,wall=wall*0.9 where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //합병 시도국 모든 도시 5%감소 + $query = "update city set pop=pop*0.95,agri=agri*0.95,comm=comm*0.95,secu=secu*0.95,rate=rate*0.95,def=def*0.95,wall=wall*0.95 where nation='{$you['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + //국가 삭제 + $query = "delete from nation where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 군주가 있는 위치 구함 + $query = "select city from general where nation='{$you['nation']}' and level='12'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $king = MYDB_fetch_array($result); + // 아국 모든 도시들 상대국 소속으로 + $query = "update city set nation='{$you['nation']}',gen1='0',gen2='0',gen3='0',conflict='',conflict2='' where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 제의국 모든 장수들 공헌도0.95, 명성0.95 + $query = "update general set dedication=dedication*0.95,experience=experience*0.95 where nation='{$you['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 아국 모든 장수들 일반으로 하고 상대국 소속으로, 수도로 이동, 공헌도1.1, 명성0.9 + $query = "update general set belong=1,level=1,nation='{$you['nation']}',city='{$king['city']}',dedication=dedication*1.1,experience=experience*0.9 where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 부대도 모두 국가 소속 변경 + $query = "update troop set nation='{$you['nation']}' where nation='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + // 외교 삭제 + $query = "delete from diplomacy where me='{$me['nation']}' or you='{$me['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // NPC들 일부 하야 (양국중 큰쪽 장수수의 90~110%만큼) + $resignCount = 0; + if($npccount >= $npccount2) { + $resignCount = round($npccount*(rand()%21+90)/100); + } else { + $resignCount = round($npccount2*(rand()%21+90)/100); + } + $resignCommand = EncodeCommand(0, 0, 0, 45); //하야 + $query = "update general set turn0='$resignCommand' where nation='{$you['nation']}' and npc>=2 order by rand() limit {$resignCount}"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + pushGenLog($me, $mylog); + pushGenLog($you, $youlog); + pushHistory($connect, $history); + unset($mylog); + unset($youlog); + unset($history); + } +} + +function updateNationState($connect) { + $history = array(); + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,level,history from nation"; + $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 city,level,secu from city where nation='{$nation['nation']}' and level>=4"; + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $citycount = MYDB_num_rows($cityresult); + + $query = "select no from general where nation='{$nation['nation']}'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($genresult); + + if($citycount == 0) { + $nationlevel = 0; // 방랑군 + } elseif($citycount == 1) { + $nationlevel = 1; // 호족 + } elseif($citycount <= 4) { + $nationlevel = 2; // 군벌 + } elseif($citycount <= 7) { + $nationlevel = 3; // 주자사 + } elseif($citycount <= 10) { + $nationlevel = 4; // 주목 + } elseif($citycount <= 15) { + $nationlevel = 5; // 공 + } elseif($citycount <= 20) { + $nationlevel = 6; // 왕 + } else { + $nationlevel = 7; // 황제 + } + + if($nationlevel > $nation['level']) { + $nation['level'] = $nationlevel; + + switch($nationlevel) { + case 7: + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."(을)를 자칭"); + break; + case 6: + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극하였습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 등극"); + break; + case 5: + case 4: + case 3: + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명되었습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."에 임명됨"); + break; + case 2: + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【작위】{$nation['name']}의 군주가 독립하여 ".getNationLevel($nationlevel)."로 나섰습니다."; + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}의 군주가 ".getNationLevel($nationlevel)."로 나서다"); + break; + } + + //작위 상승 + $query = "update nation set level='{$nation['level']}' where nation='{$nation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + $gennum = $gencount; + if($gencount < 10) $gencount = 10; + //기술 및 변경횟수 업데이트 + $myset = $nation['level'] + 1; + $query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='{$nation['nation']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + pushHistory($connect, $history); +} + +function checkStatistic($connect) { + $query = "select year,month from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $etc = ''; + + $query = "select avg(gold) as avggold, avg(rice) as avgrice, avg(dex0+dex10+dex20+dex30) as avgdex, max(dex0+dex10+dex20+dex30) as maxdex, avg(experience+dedication) as avgexpded, max(experience+dedication) as maxexpded from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + $general['avggold'] = round($general['avggold']); + $general['avgrice'] = round($general['avgrice']); + $general['avgdex'] = round($general['avgdex']); + $general['avgexpded'] = round($general['avgexpded']); + $etc .= "평균 금/쌀 ({$general['avggold']}/{$general['avgrice']}), 평균/최고 숙련({$general['avgdex']}/{$general['maxdex']}), 평균/최고 경험공헌({$general['avgexpded']}/{$general['maxexpded']}), "; + + $query = "select min(tech) as mintech, max(tech) as maxtech, avg(tech) as avgtech, min(power) as minpower, max(power) as maxpower, avg(power) as avgpower from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + $nation['avgtech'] = round($nation['avgtech']); + $nation['avgpower'] = round($nation['avgpower']); + $etc .= "최저/평균/최고 기술({$nation['mintech']}/{$nation['avgtech']}/{$nation['maxtech']}), "; + $etc .= "최저/평균/최고 국력({$nation['minpower']}/{$nation['avgpower']}/{$nation['maxpower']}), "; + + $nationName = ''; + $power_hist = ''; + + $query = "select nation,name,type,power,gennum,round((gold+rice)/100) as goldrice 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); + for($i=0; $i < $nationCount; $i++) { + $nation = MYDB_fetch_array($result); + + $query = "select sum(leader+power+intel) as abil,round(sum(gold+rice)/100) as goldrice,round(sum(dex0+dex10+dex20+dex30)/1000) as dex,round(sum(experience+dedication)/100) as expded from general where nation='{$nation['nation']}'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result2); + + $query = "select count(*) as cnt,round(sum(pop)/100) as pop,round(sum(pop2)/100) as pop2 from city where nation='{$nation['nation']}'"; + $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($result2); + + $nationName .= $nation['name'].'('.getNationType($nation['type']).'), '; + $power_hist .= "{$nation['name']}({$nation['power']}/{$nation['gennum']}/{$city['cnt']}/{$city['pop']}/{$city['pop2']}/{$nation['goldrice']}/{$general['goldrice']}/{$general['abil']}/{$general['dex']}/{$general['expded']}), "; + $nationHists[$nation['type']]++; + } + + $nationHist = ''; + for($i=1; $i <= 13; $i++) { + if(!$nationHists[$i]) { $nationHists[$i] = '-'; } + $nationHist .= getNationType($i)."({$nationHists[$i]}), "; + } + + $query = "select no from general where npc <= 1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $genCount = MYDB_num_rows($result); + + $query = "select no from general where npc > 1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $npcCount = MYDB_num_rows($result); + + $query = "select personal,special,special2 from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $generalCount = MYDB_num_rows($result); + for($i=0; $i < $generalCount; $i++) { + $general = MYDB_fetch_array($result); + + $personalHists[$general['personal']]++; + $specialHists[$general['special']]++; + $specialHists2[$general['special2']]++; + } + + $generalCountStr = "{$generalCount}({$genCount}+{$npcCount})"; + + $personalHist = ''; + for($i=0; $i < 11; $i++) { + if(!$personalHists[$i]) { $personalHists[$i] = '-'; } + $personalHist .= getGenChar($i)."({$personalHists[$i]}), "; + } + $specialHist = ''; + for($i=0; $i < 40; $i++) { + $call = getGenSpecial($i); + if($call) { + if(!$specialHists[$i]) { $specialHists[$i] = '-'; } + + $specialHist .= $call."({$specialHists[$i]}), "; + } + } + $specialHist .= '// '; + $specialHist .= "-({$specialHists2[0]}), "; + for($i=40; $i < 80; $i++) { + $call = getGenSpecial($i); + if($call) { + if(!$specialHists2[$i]) { $specialHists2[$i] = '-'; } + + $specialHist .= $call."({$specialHists2[$i]}), "; + } + } + + $crewtype = ''; + $types = array(0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43); + $count = count($types); + for($i=0; $i < $count; $i++) { + $query = "select count(*) as type from general where crewtype={$types[$i]} and crew>=100"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $general = MYDB_fetch_array($result); + + $crewtype .= getTypeName($types[$i])."({$general['type']}), "; + } + + $query = " + insert into statistic ( + year, month, + nation_count, nation_name, nation_hist, + gen_count, personal_hist, special_hist, power_hist, + crewtype, etc + ) values ( + '{$admin['year']}', '{$admin['month']}', + '$nationCount', '$nationName', '$nationHist', + '$generalCountStr', '$personalHist', '$specialHist', '$power_hist', + '$crewtype', '$etc' + )"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function checkEmperior($connect) { + $query = "select year,month,isUnited from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + $query = "select nation,name,history from nation where level>0"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + if($count == 1 && $admin['isUnited'] == 0) { + $nation = MYDB_fetch_array($result); + + $query = "select city from city where nation='{$nation['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + $query = "select city from city"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $allcount = MYDB_num_rows($result); + + if($count == $allcount) { + $nation = addNationHistory($connect, $nation, "●{$admin['year']}년 {$admin['month']}월:{$nation['name']}(이)가 전토를 통일"); + + $query = "update game set isUnited=2,conlimit=conlimit*100 where no='1'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $query = "select no from general where npc<2 and age>50"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $count = MYDB_num_rows($result); + + for($i=0; $i < $count; $i++) { + $general = MYDB_fetch_array($result); + CheckHall($connect, $general['no']); + } + + $query = "select nation,name,type,color,gold,rice,power,gennum,history from nation where nation='{$nation['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + $query = "select SUM(pop) as totalpop,SUM(pop2) as maxpop from city where nation='{$nation['nation']}'"; // 도시 이름 목록 + $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $city = MYDB_fetch_array($cityresult); + $pop = "{$city['totalpop']} / {$city['maxpop']}"; + $poprate = round($city['totalpop']/$city['maxpop']*100, 2); + $poprate .= " %"; + + $query = "select name,picture,belong from general where nation='{$nation['nation']}' and level='12'"; + $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $level12 = MYDB_fetch_array($genresult); + + $query = "select name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,belong 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 name,picture,killnum from general where nation='{$nation['nation']}' order by killnum desc limit 5"; // 오호장군 + $tigerresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $tigernum = MYDB_num_rows($tigerresult); + for($i=0; $i < $tigernum; $i++) { + $tiger = MYDB_fetch_array($tigerresult); + if($tiger['killnum'] > 0) { + $tigerstr .= "{$tiger['name']}【{$tiger['killnum']}】, "; + } + } + + $query = "select name,picture,firenum from general where nation='{$nation['nation']}' order by firenum desc limit 7"; // 건안칠자 + $eagleresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $eaglenum = MYDB_num_rows($eagleresult); + for($i=0; $i < $eaglenum; $i++) { + $eagle = MYDB_fetch_array($eagleresult); + if($eagle['firenum'] > 0) { + $eaglestr .= "{$eagle['name']}【{$eagle['firenum']}】, "; + } + } + + $log[0] = "●{$admin['year']}년 {$admin['month']}월: {$nation['name']}(이)가 전토를 통일하였습니다."; + + $query = "select no,name from general where nation='{$nation['nation']}' order by dedication desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_num_rows($result); + for($i=0; $i < $gencount; $i++) { + $general = MYDB_fetch_array($result); + $gen .= "{$general['name']}, "; + + pushGenLog($general, $log); + } + + $nation['type'] = getNationType($nation['type']); + + $query = "select MAX(nation_count) as nc,MAX(gen_count) as gc from statistic"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $stat = MYDB_fetch_array($result); + + $query = "select count(*) as cnt from general"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $gencount = MYDB_fetch_array($result); + + $statNC = "1 / {$stat['nc']}"; + $statGC = "{$gencount['cnt']} / {$stat['gc']}"; + + $query = "select nation_count,nation_name,nation_hist from statistic where nation_count='{$stat['nc']}' limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $statNation = MYDB_fetch_array($result); + + $query = "select gen_count,personal_hist,special_hist from statistic order by no desc limit 0,1"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $statGeneral = MYDB_fetch_array($result); + + $query = " + insert into emperior ( + phase, + nation_count, nation_name, nation_hist, + gen_count, personal_hist, special_hist, + name, type, color, year, month, power, gennum, citynum, + pop, poprate, gold, rice, + l12name, l12pic, l11name, l11pic, + l10name, l10pic, l9name, l9pic, + l8name, l8pic, l7name, l7pic, + l6name, l6pic, l5name, l5pic, + tiger, eagle, gen, history + ) values ( + '-', + '$statNC', '{$statNation['nation_name']}', '{$statNation['nation_hist']}', + '$statGC', '{$statGeneral['personal_hist']}', '{$statGeneral['special_hist']}', + '{$nation['name']}', '{$nation['type']}', '{$nation['color']}', '{$admin['year']}', '{$admin['month']}', '{$nation['power']}', '{$nation['gennum']}', '$allcount', + '$pop', '$poprate', '{$nation['gold']}', '{$nation['rice']}', + '{$level12['name']}', '{$level12['picture']}', '{$level11['name']}', '{$level11['picture']}', + '{$level10['name']}', '{$level10['picture']}', '{$level9['name']}', '{$level9['picture']}', + '{$level8['name']}', '{$level8['picture']}', '{$level7['name']}', '{$level7['picture']}', + '{$level6['name']}', '{$level6['picture']}', '{$level5['name']}', '{$level5['picture']}', + '$tigerstr', '$eaglestr', '$gen', '{$nation['history']}' + )"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【통일】{$nation['name']}(이)가 전토를 통일하였습니다."; + pushHistory($connect, $history); + + //연감 월결산 + LogHistory($connect); + } + } +} From ca2b34507503a59bcdfc1fca7d01d293a33290d1 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 06:03:45 +0900 Subject: [PATCH 095/622] =?UTF-8?q?regnpc=EB=A5=BC=20=EB=B3=84=EB=8F=84?= =?UTF-8?q?=EB=A1=9C=20=EB=B6=84=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_npc.php | 691 +------------------------------------------ twe/func_regnpc.php | 692 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 693 insertions(+), 690 deletions(-) create mode 100644 twe/func_regnpc.php diff --git a/twe/func_npc.php b/twe/func_npc.php index 045e78d3..362803f6 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -1,695 +1,6 @@ 0) { - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1492, 123, "가화",$img,1492, 0, "-", 50, 66, 40, 0, 176, 224, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1493, 999, "건석",$img,1493, 0, "-", 21, 12, 61, 0, 155, 189, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1494, 999, "견씨",$img,1494, 0, "-", 35, 24, 58, 0, 182, 221, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1495, 40, "견홍",$img,1495, 0, "-", 76, 72, 66, 0, 224, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1496, 120, "고담",$img,1496, 0, "-", 33, 21, 69, 0, 203, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1497, 101, "고유",$img,1497, 0, "-", 56, 44, 73, 0, 174, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1498, 132, "곽마",$img,1498, 0, "-", 68, 71, 49, 0, 239, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1499, 39, "관구수",$img,1499, 0, "-", 58, 63, 35, 0, 206, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1500, 39, "관구전",$img,1500, 0, "-", 63, 58, 68, 0, 224, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1501, 999, "관로",$img,1501, 0, "-", 62, 21, 75, 0, 191, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1502, 65, "관정",$img,1502, 0, "-", 35, 50, 73, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1503, 137, "교수",$img,1503, 0, "-", 67, 69, 39, 0, 143, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1504, 33, "구건",$img,1504, 0, "-", 43, 56, 69, 0, 239, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1505, 41, "구본",$img,1505, 0, "-", 52, 41, 70, 0, 232, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1506, 12, "구성",$img,1506, 0, "-", 56, 71, 31, 0, 157, 187, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1507, 21, "국연",$img,1507, 0, "-", 52, 21, 71, 0, 160, 219, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1508, 99, "국의",$img,1508, 0, "-", 83, 79, 50, 0, 146, 191, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1509, 34, "금의",$img,1509, 0, "-", 18, 40, 63, 0, 177, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1510, 76, "나헌",$img,1510, 0, "-", 86, 67, 75, 0, 218, 270, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1511, 999, "남두",$img,1511, 0, "-", 35, 25, 54, 0, 130, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1512, 54, "냉포",$img,1512, 0, "-", 70, 82, 69, 0, 176, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1513, 124, "노숙2",$img,1513, 0, "-", 70, 55, 76, 0, 208, 274, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1514, 42, "누규",$img,1514, 0, "-", 54, 19, 88, 0, 143, 212, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1515, 6, "누반",$img,1515, 0, "-", 65, 76, 39, 0, 178, 207, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1516, 130, "누현",$img,1516, 0, "-", 23, 20, 68, 0, 223, 275, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1517, 40, "당균",$img,1517, 0, "-", 33, 19, 81, 0, 229, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1518, 32, "당빈",$img,1518, 0, "-", 70, 74, 62, 0, 235, 294, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1519, 999, "대교",$img,1519, 0, "-", 42, 10, 54, 0, 177, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1520, 28, "대릉",$img,1520, 0, "-", 64, 75, 45, 0, 199, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1521, 129, "동조",$img,1521, 0, "-", 16, 15, 51, 0, 221, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1522, 114, "등수",$img,1522, 0, "-", 35, 20, 44, 0, 228, 288, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1523, 50, "마막",$img,1523, 0, "-", 22, 17, 5, 0, 221, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1524, 116, "만욱",$img,1524, 0, "-", 20, 18, 66, 0, 240, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1525, 120, "맹종",$img,1525, 0, "-", 48, 48, 67, 0, 216, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1526, 38, "문호",$img,1526, 0, "-", 65, 74, 45, 0, 227, 279, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1527, 999, "미씨",$img,1527, 0, "-", 59, 15, 68, 0, 176, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1528, 39, "반림",$img,1528, 0, "-", 66, 79, 8, 0, 168, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1529, 129, "반장",$img,1529, 0, "-", 77, 78, 69, 0, 177, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1530, 94, "방열",$img,1530, 0, "-", 58, 82, 28, 0, 153, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1531, 55, "방희",$img,1531, 0, "-", 59, 38, 69, 0, 153, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1532, 30, "배수",$img,1532, 0, "-", 10, 11, 77, 0, 223, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1533, 8, "번능",$img,1533, 0, "-", 70, 61, 47, 0, 158, 194, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1534, 999, "번씨",$img,1534, 0, "-", 32, 17, 45, 0, 176, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1535, 49, "보도근",$img,1535, 0, "-", 64, 73, 50, 0, 170, 233, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1536, 129, "보천",$img,1536, 0, "-", 68, 60, 72, 0, 222, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1537, 121, "보협",$img,1537, 0, "-", 73, 53, 75, 0, 216, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1538, 28, "부하",$img,1538, 0, "-", 44, 36, 85, 0, 209, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1539, 26, "비요",$img,1539, 0, "-", 70, 65, 73, 0, 192, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1540, 31, "사마주",$img,1540, 0, "-", 63, 53, 62, 0, 227, 283, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1541, 41, "사찬",$img,1541, 0, "-", 61, 71, 54, 0, 215, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1542, 128, "설후",$img,1542, 0, "-", 16, 14, 71, 0, 221, 271, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1543, 36, "성공영",$img,1543, 0, "-", 73, 58, 80, 0, 172, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1544, 126, "성만",$img,1544, 0, "-", 61, 69, 66, 0, 225, 276, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1545, 999, "소교",$img,1545, 0, "-", 57, 23, 66, 0, 178, 218, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1546, 46, "소유",$img,1546, 0, "-", 51, 61, 48, 0, 164, 210, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1547, 31, "소제2",$img,1547, 0, "-", 22, 16, 78, 0, 224, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1548, 126, "손교",$img,1548, 0, "-", 77, 60, 69, 0, 181, 219, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1549, 116, "손기",$img,1549, 0, "-", 62, 65, 52, 0, 227, 276, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1550, 999, "손상향",$img,1550, 0, "-", 72, 62, 42, 0, 193, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1551, 125, "손익",$img,1551, 0, "-", 69, 75, 26, 0, 184, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1552, 125, "손진",$img,1552, 0, "-", 64, 71, 48, 0, 234, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1553, 123, "송겸",$img,1553, 0, "-", 61, 48, 44, 0, 175, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1554, 85, "순심",$img,1554, 0, "-", 20, 21, 79, 0, 164, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1555, 31, "순욱2",$img,1555, 0, "-", 10, 16, 77, 0, 225, 289, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1556, 31, "순의",$img,1556, 0, "-", 16, 11, 73, 0, 207, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1557, 129, "시삭",$img,1557, 0, "-", 36, 66, 44, 0, 226, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1558, 29, "신창",$img,1558, 0, "-", 51, 29, 46, 0, 210, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1559, 999, "악신",$img,1559, 0, "-", 53, 12, 46, 0, 175, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1560, 138, "악취",$img,1560, 0, "-", 56, 68, 58, 0, 157, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1561, 138, "양강",$img,1561, 0, "-", 62, 70, 42, 0, 160, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1562, 21, "양부",$img,1562, 0, "-", 68, 55, 85, 0, 178, 239, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1563, 72, "양서",$img,1563, 0, "-", 56, 62, 66, 0, 198, 260, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1564, 34, "양습",$img,1564, 0, "-", 67, 49, 73, 0, 168, 230, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1565, 16, "양앙",$img,1565, 0, "-", 65, 70, 39, 0, 172, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1566, 17, "양임",$img,1566, 0, "-", 71, 78, 56, 0, 170, 215, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1567, 32, "양제",$img,1567, 0, "-", 69, 63, 71, 0, 226, 291, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1568, 33, "양조2",$img,1568, 0, "-", 65, 61, 67, 0, 223, 286, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1569, 48, "양추2",$img,1569, 0, "-", 66, 67, 61, 0, 172, 238, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1570, 140, "양홍",$img,1570, 0, "-", 19, 17, 76, 0, 152, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1571, 31, "양혼",$img,1571, 0, "-", 60, 67, 63, 0, 220, 278, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1572, 123, "여거",$img,1572, 0, "-", 71, 58, 69, 0, 196, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1573, 130, "여대",$img,1573, 0, "-", 83, 72, 70, 0, 161, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1574, 136, "염상",$img,1574, 0, "-", 29, 27, 69, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1575, 36, "염행",$img,1575, 0, "-", 70, 86, 38, 0, 159, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1576, 73, "영수",$img,1576, 0, "-", 69, 70, 74, 0, 234, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1577, 39, "오거",$img,1577, 0, "-", 49, 63, 32, 0, 151, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1578, 126, "오경",$img,1578, 0, "-", 73, 60, 57, 0, 159, 203, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1579, 999, "오국태",$img,1579, 0, "-", 31, 11, 60, 0, 161, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1580, 126, "오찬",$img,1580, 0, "-", 69, 41, 78, 0, 181, 245, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1581, 23, "온회",$img,1581, 0, "-", 42, 40, 78, 0, 178, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1582, 21, "왕기2",$img,1582, 0, "-", 70, 66, 63, 0, 217, 281, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1583, 32, "왕도",$img,1583, 0, "-", 48, 44, 70, 0, 210, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1584, 123, "왕돈",$img,1584, 0, "-", 60, 65, 41, 0, 198, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1585, 34, "왕릉",$img,1585, 0, "-", 73, 60, 71, 0, 172, 251, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1586, 63, "왕문",$img,1586, 0, "-", 64, 67, 32, 0, 162, 205, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1587, 32, "왕상",$img,1587, 0, "-", 25, 19, 65, 0, 180, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1588, 34, "왕숙",$img,1588, 0, "-", 35, 21, 80, 0, 195, 256, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1589, 33, "왕업",$img,1589, 0, "-", 32, 6, 46, 0, 220, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1590, 35, "왕충",$img,1590, 0, "-", 42, 58, 21, 0, 152, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1591, 1, "우보",$img,1591, 0, "-", 43, 63, 12, 0, 159, 192, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1592, 122, "우사",$img,1592, 0, "-", 70, 33, 79, 0, 217, 273, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1593, 138, "원요",$img,1593, 0, "-", 44, 42, 45, 0, 177, 206, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1594, 95, "원유",$img,1594, 0, "-", 57, 38, 73, 0, 150, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1595, 31, "위관",$img,1595, 0, "-", 69, 45, 81, 0, 220, 291, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1596, 129, "위막",$img,1596, 0, "-", 58, 62, 60, 0, 221, 268, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1597, 55, "유괴",$img,1597, 0, "-", 75, 72, 66, 0, 165, 214, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1598, 129, "유략",$img,1598, 0, "-", 72, 68, 59, 0, 206, 260, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1599, 45, "유반",$img,1599, 0, "-", 74, 79, 48, 0, 168, 210, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1600, 29, "유복",$img,1600, 0, "-", 54, 50, 73, 0, 164, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1601, 78, "유선2",$img,1601, 0, "-", 9, 21, 39, 0, 224, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1602, 139, "유섭",$img,1602, 0, "-", 62, 79, 26, 0, 158, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1603, 28, "유소",$img,1603, 0, "-", 66, 51, 73, 0, 195, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1604, 128, "유승",$img,1604, 0, "-", 46, 69, 29, 0, 215, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1605, 129, "유찬",$img,1605, 0, "-", 74, 75, 66, 0, 172, 255, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1606, 129, "유평",$img,1606, 0, "-", 65, 70, 67, 0, 218, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1607, 138, "유훈",$img,1607, 0, "-", 51, 64, 50, 0, 163, 216, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1608, 48, "이감",$img,1608, 0, "-", 59, 67, 33, 0, 176, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1609, 19, "이승",$img,1609, 0, "-", 13, 26, 32, 0, 201, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1610, 22, "이통",$img,1610, 0, "-", 75, 84, 52, 0, 168, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1611, 138, "이풍2",$img,1611, 0, "-", 72, 77, 50, 0, 158, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1612, 20, "이풍3",$img,1612, 0, "-", 23, 25, 71, 0, 204, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1613, 29, "장구",$img,1613, 0, "-", 69, 71, 47, 0, 201, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1614, 21, "장기",$img,1614, 0, "-", 77, 35, 79, 0, 170, 223, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1615, 74, "장남",$img,1615, 0, "-", 71, 64, 38, 0, 187, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1616, 100, "장막",$img,1616, 0, "-", 53, 52, 70, 0, 155, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1617, 7, "장만성",$img,1617, 0, "-", 73, 83, 47, 0, 143, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1618, 135, "장반",$img,1618, 0, "-", 56, 73, 66, 0, 227, 282, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1619, 78, "장빈",$img,1619, 0, "-", 30, 28, 67, 0, 216, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1620, 124, "장승",$img,1620, 0, "-", 75, 68, 75, 0, 178, 244, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1621, 999, "장양2",$img,1621, 0, "-", 58, 50, 47, 0, 130, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1622, 68, "장억",$img,1622, 0, "-", 82, 80, 54, 0, 190, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1623, 75, "장준",$img,1623, 0, "-", 65, 67, 66, 0, 224, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1624, 20, "장집",$img,1624, 0, "-", 31, 27, 74, 0, 196, 254, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1625, 39, "장특",$img,1625, 0, "-", 71, 53, 74, 0, 209, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1626, 96, "저곡",$img,1626, 0, "-", 57, 53, 67, 0, 184, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1627, 128, "전기",$img,1627, 0, "-", 51, 69, 55, 0, 231, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1628, 23, "전만",$img,1628, 0, "-", 52, 74, 38, 0, 181, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1629, 128, "전상",$img,1629, 0, "-", 5, 6, 11, 0, 208, 258, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1630, 130, "전역",$img,1630, 0, "-", 60, 62, 37, 0, 212, 265, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1631, 75, "전예",$img,1631, 0, "-", 80, 62, 83, 0, 171, 252, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1632, 64, "전해",$img,1632, 0, "-", 71, 63, 57, 0, 154, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1633, 123, "정봉2",$img,1633, 0, "-", 67, 68, 52, 0, 198, 266, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1634, 22, "정의",$img,1634, 0, "-", 17, 3, 66, 0, 184, 220, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1635, 81, "제갈교",$img,1635, 0, "-", 55, 17, 77, 0, 204, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1636, 40, "제갈서",$img,1636, 0, "-", 45, 43, 27, 0, 218, 286, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1637, 25, "조충",$img,1637, 0, "-", 14, 7, 80, 0, 196, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1638, 121, "종리목",$img,1638, 0, "-", 84, 68, 75, 0, 214, 269, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1639, 22, "종육",$img,1639, 0, "-", 27, 11, 71, 0, 223, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1640, 122, "좌혁",$img,1640, 0, "-", 60, 66, 51, 0, 232, 280, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1641, 36, "주령",$img,1641, 0, "-", 77, 70, 69, 0, 170, 236, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1642, 115, "주앙",$img,1642, 0, "-", 75, 64, 64, 0, 162, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1643, 52, "주포",$img,1643, 0, "-", 59, 72, 12, 0, 191, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1644, 11, "주흔",$img,1644, 0, "-", 67, 53, 77, 0, 159, 196, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1645, 140, "진기",$img,1645, 0, "-", 58, 67, 46, 0, 165, 198, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1646, 142, "진란",$img,1646, 0, "-", 65, 70, 43, 0, 157, 204, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1647, 25, "진랑",$img,1647, 0, "-", 57, 70, 38, 0, 192, 234, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1648, 12, "진응",$img,1648, 0, "-", 62, 69, 49, 0, 172, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1649, 124, "진표",$img,1649, 0, "-", 62, 49, 74, 0, 204, 237, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1650, 999, "채염",$img,1650, 0, "-", 40, 22, 64, 0, 168, 237, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1651, 999, "초선",$img,1651, 0, "-", 66, 15, 72, 0, 176, 211, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1652, 135, "초이",$img,1652, 0, "-", 54, 65, 55, 0, 219, 266, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1653, 65, "추단",$img,1653, 0, "-", 63, 71, 36, 0, 148, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1654, 999, "추씨",$img,1654, 0, "-", 36, 13, 54, 0, 165, 225, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1655, 71, "추정",$img,1655, 0, "-", 67, 65, 66, 0, 144, 193, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1656, 145, "파재",$img,1656, 0, "-", 69, 75, 52, 0, 145, 184, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1657, 22, "포신",$img,1657, 0, "-", 78, 60, 83, 0, 152, 192, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1658, 114, "하식",$img,1658, 0, "-", 18, 38, 29, 0, 230, 284, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1659, 36, "하안",$img,1659, 0, "-", 6, 27, 72, 0, 190, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1660, 999, "하후씨",$img,1660, 0, "-", 29, 16, 47, 0, 186, 249, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1661, 5, "학맹",$img,1661, 0, "-", 57, 66, 41, 0, 156, 197, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1662, 98, "한거자",$img,1662, 0, "-", 53, 59, 30, 0, 158, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1663, 19, "한덕",$img,1663, 0, "-", 62, 79, 24, 0, 171, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1664, 140, "한윤",$img,1664, 0, "-", 27, 24, 68, 0, 155, 197, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1665, 999, "허소",$img,1665, 0, "-", 53, 27, 60, 0, 150, 195, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1666, 30, "호열",$img,1666, 0, "-", 77, 69, 76, 0, 225, 272, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1667, 76, "호제",$img,1667, 0, "-", 58, 42, 68, 0, 207, 264, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1668, 149, "호진",$img,1668, 0, "-", 65, 77, 13, 0, 146, 190, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1669, 29, "호질",$img,1669, 0, "-", 73, 50, 75, 0, 192, 250, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1670, 7, "환계",$img,1670, 0, "-", 12, 25, 67, 0, 156, 221, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1671, 56, "황숭",$img,1671, 0, "-", 68, 64, 74, 0, 208, 263, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1672, 999, "황승언",$img,1672, 0, "-", 68, 17, 81, 0, 165, 222, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1673, 999, "황월영",$img,1673, 0, "-", 58, 14, 75, 0, 186, 235, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1674, 45, "황조",$img,1674, 0, "-", 74, 65, 57, 0, 148, 208, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1675, 48, "후선",$img,1675, 0, "-", 56, 66, 35, 0, 175, 228, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1676, 8, "휴고",$img,1676, 0, "-", 61, 72, 40, 0, 151, 199, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1677, 98, "휴원진",$img,1677, 0, "-", 53, 63, 38, 0, 155, 200, "-", "-"); - RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1678, 22, "희지재",$img,1678, 0, "-", 24, 5, 86, 0, 157, 194, "-", "-"); - } -} +include('func_regnpc.php'); function RegGeneral($connect,$init,$life,$fiction,$turnterm,$startyear,$year,$gencount,$npcmatch,$name,$img,$picture,$nation, $city,$leader,$power,$intel,$level, diff --git a/twe/func_regnpc.php b/twe/func_regnpc.php new file mode 100644 index 00000000..6f09155c --- /dev/null +++ b/twe/func_regnpc.php @@ -0,0 +1,692 @@ + 0) { + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1492, 123, "가화",$img,1492, 0, "-", 50, 66, 40, 0, 176, 224, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1493, 999, "건석",$img,1493, 0, "-", 21, 12, 61, 0, 155, 189, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1494, 999, "견씨",$img,1494, 0, "-", 35, 24, 58, 0, 182, 221, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1495, 40, "견홍",$img,1495, 0, "-", 76, 72, 66, 0, 224, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1496, 120, "고담",$img,1496, 0, "-", 33, 21, 69, 0, 203, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1497, 101, "고유",$img,1497, 0, "-", 56, 44, 73, 0, 174, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1498, 132, "곽마",$img,1498, 0, "-", 68, 71, 49, 0, 239, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1499, 39, "관구수",$img,1499, 0, "-", 58, 63, 35, 0, 206, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1500, 39, "관구전",$img,1500, 0, "-", 63, 58, 68, 0, 224, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1501, 999, "관로",$img,1501, 0, "-", 62, 21, 75, 0, 191, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1502, 65, "관정",$img,1502, 0, "-", 35, 50, 73, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1503, 137, "교수",$img,1503, 0, "-", 67, 69, 39, 0, 143, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1504, 33, "구건",$img,1504, 0, "-", 43, 56, 69, 0, 239, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1505, 41, "구본",$img,1505, 0, "-", 52, 41, 70, 0, 232, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1506, 12, "구성",$img,1506, 0, "-", 56, 71, 31, 0, 157, 187, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1507, 21, "국연",$img,1507, 0, "-", 52, 21, 71, 0, 160, 219, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1508, 99, "국의",$img,1508, 0, "-", 83, 79, 50, 0, 146, 191, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1509, 34, "금의",$img,1509, 0, "-", 18, 40, 63, 0, 177, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1510, 76, "나헌",$img,1510, 0, "-", 86, 67, 75, 0, 218, 270, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1511, 999, "남두",$img,1511, 0, "-", 35, 25, 54, 0, 130, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1512, 54, "냉포",$img,1512, 0, "-", 70, 82, 69, 0, 176, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1513, 124, "노숙2",$img,1513, 0, "-", 70, 55, 76, 0, 208, 274, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1514, 42, "누규",$img,1514, 0, "-", 54, 19, 88, 0, 143, 212, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1515, 6, "누반",$img,1515, 0, "-", 65, 76, 39, 0, 178, 207, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1516, 130, "누현",$img,1516, 0, "-", 23, 20, 68, 0, 223, 275, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1517, 40, "당균",$img,1517, 0, "-", 33, 19, 81, 0, 229, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1518, 32, "당빈",$img,1518, 0, "-", 70, 74, 62, 0, 235, 294, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1519, 999, "대교",$img,1519, 0, "-", 42, 10, 54, 0, 177, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1520, 28, "대릉",$img,1520, 0, "-", 64, 75, 45, 0, 199, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1521, 129, "동조",$img,1521, 0, "-", 16, 15, 51, 0, 221, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1522, 114, "등수",$img,1522, 0, "-", 35, 20, 44, 0, 228, 288, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1523, 50, "마막",$img,1523, 0, "-", 22, 17, 5, 0, 221, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1524, 116, "만욱",$img,1524, 0, "-", 20, 18, 66, 0, 240, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1525, 120, "맹종",$img,1525, 0, "-", 48, 48, 67, 0, 216, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1526, 38, "문호",$img,1526, 0, "-", 65, 74, 45, 0, 227, 279, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1527, 999, "미씨",$img,1527, 0, "-", 59, 15, 68, 0, 176, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1528, 39, "반림",$img,1528, 0, "-", 66, 79, 8, 0, 168, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1529, 129, "반장",$img,1529, 0, "-", 77, 78, 69, 0, 177, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1530, 94, "방열",$img,1530, 0, "-", 58, 82, 28, 0, 153, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1531, 55, "방희",$img,1531, 0, "-", 59, 38, 69, 0, 153, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1532, 30, "배수",$img,1532, 0, "-", 10, 11, 77, 0, 223, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1533, 8, "번능",$img,1533, 0, "-", 70, 61, 47, 0, 158, 194, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1534, 999, "번씨",$img,1534, 0, "-", 32, 17, 45, 0, 176, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1535, 49, "보도근",$img,1535, 0, "-", 64, 73, 50, 0, 170, 233, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1536, 129, "보천",$img,1536, 0, "-", 68, 60, 72, 0, 222, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1537, 121, "보협",$img,1537, 0, "-", 73, 53, 75, 0, 216, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1538, 28, "부하",$img,1538, 0, "-", 44, 36, 85, 0, 209, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1539, 26, "비요",$img,1539, 0, "-", 70, 65, 73, 0, 192, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1540, 31, "사마주",$img,1540, 0, "-", 63, 53, 62, 0, 227, 283, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1541, 41, "사찬",$img,1541, 0, "-", 61, 71, 54, 0, 215, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1542, 128, "설후",$img,1542, 0, "-", 16, 14, 71, 0, 221, 271, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1543, 36, "성공영",$img,1543, 0, "-", 73, 58, 80, 0, 172, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1544, 126, "성만",$img,1544, 0, "-", 61, 69, 66, 0, 225, 276, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1545, 999, "소교",$img,1545, 0, "-", 57, 23, 66, 0, 178, 218, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1546, 46, "소유",$img,1546, 0, "-", 51, 61, 48, 0, 164, 210, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1547, 31, "소제2",$img,1547, 0, "-", 22, 16, 78, 0, 224, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1548, 126, "손교",$img,1548, 0, "-", 77, 60, 69, 0, 181, 219, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1549, 116, "손기",$img,1549, 0, "-", 62, 65, 52, 0, 227, 276, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1550, 999, "손상향",$img,1550, 0, "-", 72, 62, 42, 0, 193, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1551, 125, "손익",$img,1551, 0, "-", 69, 75, 26, 0, 184, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1552, 125, "손진",$img,1552, 0, "-", 64, 71, 48, 0, 234, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1553, 123, "송겸",$img,1553, 0, "-", 61, 48, 44, 0, 175, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1554, 85, "순심",$img,1554, 0, "-", 20, 21, 79, 0, 164, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1555, 31, "순욱2",$img,1555, 0, "-", 10, 16, 77, 0, 225, 289, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1556, 31, "순의",$img,1556, 0, "-", 16, 11, 73, 0, 207, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1557, 129, "시삭",$img,1557, 0, "-", 36, 66, 44, 0, 226, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1558, 29, "신창",$img,1558, 0, "-", 51, 29, 46, 0, 210, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1559, 999, "악신",$img,1559, 0, "-", 53, 12, 46, 0, 175, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1560, 138, "악취",$img,1560, 0, "-", 56, 68, 58, 0, 157, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1561, 138, "양강",$img,1561, 0, "-", 62, 70, 42, 0, 160, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1562, 21, "양부",$img,1562, 0, "-", 68, 55, 85, 0, 178, 239, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1563, 72, "양서",$img,1563, 0, "-", 56, 62, 66, 0, 198, 260, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1564, 34, "양습",$img,1564, 0, "-", 67, 49, 73, 0, 168, 230, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1565, 16, "양앙",$img,1565, 0, "-", 65, 70, 39, 0, 172, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1566, 17, "양임",$img,1566, 0, "-", 71, 78, 56, 0, 170, 215, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1567, 32, "양제",$img,1567, 0, "-", 69, 63, 71, 0, 226, 291, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1568, 33, "양조2",$img,1568, 0, "-", 65, 61, 67, 0, 223, 286, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1569, 48, "양추2",$img,1569, 0, "-", 66, 67, 61, 0, 172, 238, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1570, 140, "양홍",$img,1570, 0, "-", 19, 17, 76, 0, 152, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1571, 31, "양혼",$img,1571, 0, "-", 60, 67, 63, 0, 220, 278, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1572, 123, "여거",$img,1572, 0, "-", 71, 58, 69, 0, 196, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1573, 130, "여대",$img,1573, 0, "-", 83, 72, 70, 0, 161, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1574, 136, "염상",$img,1574, 0, "-", 29, 27, 69, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1575, 36, "염행",$img,1575, 0, "-", 70, 86, 38, 0, 159, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1576, 73, "영수",$img,1576, 0, "-", 69, 70, 74, 0, 234, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1577, 39, "오거",$img,1577, 0, "-", 49, 63, 32, 0, 151, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1578, 126, "오경",$img,1578, 0, "-", 73, 60, 57, 0, 159, 203, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1579, 999, "오국태",$img,1579, 0, "-", 31, 11, 60, 0, 161, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1580, 126, "오찬",$img,1580, 0, "-", 69, 41, 78, 0, 181, 245, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1581, 23, "온회",$img,1581, 0, "-", 42, 40, 78, 0, 178, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1582, 21, "왕기2",$img,1582, 0, "-", 70, 66, 63, 0, 217, 281, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1583, 32, "왕도",$img,1583, 0, "-", 48, 44, 70, 0, 210, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1584, 123, "왕돈",$img,1584, 0, "-", 60, 65, 41, 0, 198, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1585, 34, "왕릉",$img,1585, 0, "-", 73, 60, 71, 0, 172, 251, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1586, 63, "왕문",$img,1586, 0, "-", 64, 67, 32, 0, 162, 205, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1587, 32, "왕상",$img,1587, 0, "-", 25, 19, 65, 0, 180, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1588, 34, "왕숙",$img,1588, 0, "-", 35, 21, 80, 0, 195, 256, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1589, 33, "왕업",$img,1589, 0, "-", 32, 6, 46, 0, 220, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1590, 35, "왕충",$img,1590, 0, "-", 42, 58, 21, 0, 152, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1591, 1, "우보",$img,1591, 0, "-", 43, 63, 12, 0, 159, 192, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1592, 122, "우사",$img,1592, 0, "-", 70, 33, 79, 0, 217, 273, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1593, 138, "원요",$img,1593, 0, "-", 44, 42, 45, 0, 177, 206, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1594, 95, "원유",$img,1594, 0, "-", 57, 38, 73, 0, 150, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1595, 31, "위관",$img,1595, 0, "-", 69, 45, 81, 0, 220, 291, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1596, 129, "위막",$img,1596, 0, "-", 58, 62, 60, 0, 221, 268, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1597, 55, "유괴",$img,1597, 0, "-", 75, 72, 66, 0, 165, 214, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1598, 129, "유략",$img,1598, 0, "-", 72, 68, 59, 0, 206, 260, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1599, 45, "유반",$img,1599, 0, "-", 74, 79, 48, 0, 168, 210, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1600, 29, "유복",$img,1600, 0, "-", 54, 50, 73, 0, 164, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1601, 78, "유선2",$img,1601, 0, "-", 9, 21, 39, 0, 224, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1602, 139, "유섭",$img,1602, 0, "-", 62, 79, 26, 0, 158, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1603, 28, "유소",$img,1603, 0, "-", 66, 51, 73, 0, 195, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1604, 128, "유승",$img,1604, 0, "-", 46, 69, 29, 0, 215, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1605, 129, "유찬",$img,1605, 0, "-", 74, 75, 66, 0, 172, 255, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1606, 129, "유평",$img,1606, 0, "-", 65, 70, 67, 0, 218, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1607, 138, "유훈",$img,1607, 0, "-", 51, 64, 50, 0, 163, 216, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1608, 48, "이감",$img,1608, 0, "-", 59, 67, 33, 0, 176, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1609, 19, "이승",$img,1609, 0, "-", 13, 26, 32, 0, 201, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1610, 22, "이통",$img,1610, 0, "-", 75, 84, 52, 0, 168, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1611, 138, "이풍2",$img,1611, 0, "-", 72, 77, 50, 0, 158, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1612, 20, "이풍3",$img,1612, 0, "-", 23, 25, 71, 0, 204, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1613, 29, "장구",$img,1613, 0, "-", 69, 71, 47, 0, 201, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1614, 21, "장기",$img,1614, 0, "-", 77, 35, 79, 0, 170, 223, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1615, 74, "장남",$img,1615, 0, "-", 71, 64, 38, 0, 187, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1616, 100, "장막",$img,1616, 0, "-", 53, 52, 70, 0, 155, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1617, 7, "장만성",$img,1617, 0, "-", 73, 83, 47, 0, 143, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1618, 135, "장반",$img,1618, 0, "-", 56, 73, 66, 0, 227, 282, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1619, 78, "장빈",$img,1619, 0, "-", 30, 28, 67, 0, 216, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1620, 124, "장승",$img,1620, 0, "-", 75, 68, 75, 0, 178, 244, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1621, 999, "장양2",$img,1621, 0, "-", 58, 50, 47, 0, 130, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1622, 68, "장억",$img,1622, 0, "-", 82, 80, 54, 0, 190, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1623, 75, "장준",$img,1623, 0, "-", 65, 67, 66, 0, 224, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1624, 20, "장집",$img,1624, 0, "-", 31, 27, 74, 0, 196, 254, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1625, 39, "장특",$img,1625, 0, "-", 71, 53, 74, 0, 209, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1626, 96, "저곡",$img,1626, 0, "-", 57, 53, 67, 0, 184, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1627, 128, "전기",$img,1627, 0, "-", 51, 69, 55, 0, 231, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1628, 23, "전만",$img,1628, 0, "-", 52, 74, 38, 0, 181, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1629, 128, "전상",$img,1629, 0, "-", 5, 6, 11, 0, 208, 258, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1630, 130, "전역",$img,1630, 0, "-", 60, 62, 37, 0, 212, 265, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1631, 75, "전예",$img,1631, 0, "-", 80, 62, 83, 0, 171, 252, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1632, 64, "전해",$img,1632, 0, "-", 71, 63, 57, 0, 154, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1633, 123, "정봉2",$img,1633, 0, "-", 67, 68, 52, 0, 198, 266, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1634, 22, "정의",$img,1634, 0, "-", 17, 3, 66, 0, 184, 220, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1635, 81, "제갈교",$img,1635, 0, "-", 55, 17, 77, 0, 204, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1636, 40, "제갈서",$img,1636, 0, "-", 45, 43, 27, 0, 218, 286, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1637, 25, "조충",$img,1637, 0, "-", 14, 7, 80, 0, 196, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1638, 121, "종리목",$img,1638, 0, "-", 84, 68, 75, 0, 214, 269, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1639, 22, "종육",$img,1639, 0, "-", 27, 11, 71, 0, 223, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1640, 122, "좌혁",$img,1640, 0, "-", 60, 66, 51, 0, 232, 280, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1641, 36, "주령",$img,1641, 0, "-", 77, 70, 69, 0, 170, 236, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1642, 115, "주앙",$img,1642, 0, "-", 75, 64, 64, 0, 162, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1643, 52, "주포",$img,1643, 0, "-", 59, 72, 12, 0, 191, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1644, 11, "주흔",$img,1644, 0, "-", 67, 53, 77, 0, 159, 196, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1645, 140, "진기",$img,1645, 0, "-", 58, 67, 46, 0, 165, 198, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1646, 142, "진란",$img,1646, 0, "-", 65, 70, 43, 0, 157, 204, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1647, 25, "진랑",$img,1647, 0, "-", 57, 70, 38, 0, 192, 234, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1648, 12, "진응",$img,1648, 0, "-", 62, 69, 49, 0, 172, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1649, 124, "진표",$img,1649, 0, "-", 62, 49, 74, 0, 204, 237, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1650, 999, "채염",$img,1650, 0, "-", 40, 22, 64, 0, 168, 237, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1651, 999, "초선",$img,1651, 0, "-", 66, 15, 72, 0, 176, 211, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1652, 135, "초이",$img,1652, 0, "-", 54, 65, 55, 0, 219, 266, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1653, 65, "추단",$img,1653, 0, "-", 63, 71, 36, 0, 148, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1654, 999, "추씨",$img,1654, 0, "-", 36, 13, 54, 0, 165, 225, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1655, 71, "추정",$img,1655, 0, "-", 67, 65, 66, 0, 144, 193, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1656, 145, "파재",$img,1656, 0, "-", 69, 75, 52, 0, 145, 184, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1657, 22, "포신",$img,1657, 0, "-", 78, 60, 83, 0, 152, 192, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1658, 114, "하식",$img,1658, 0, "-", 18, 38, 29, 0, 230, 284, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1659, 36, "하안",$img,1659, 0, "-", 6, 27, 72, 0, 190, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1660, 999, "하후씨",$img,1660, 0, "-", 29, 16, 47, 0, 186, 249, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1661, 5, "학맹",$img,1661, 0, "-", 57, 66, 41, 0, 156, 197, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1662, 98, "한거자",$img,1662, 0, "-", 53, 59, 30, 0, 158, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1663, 19, "한덕",$img,1663, 0, "-", 62, 79, 24, 0, 171, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1664, 140, "한윤",$img,1664, 0, "-", 27, 24, 68, 0, 155, 197, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1665, 999, "허소",$img,1665, 0, "-", 53, 27, 60, 0, 150, 195, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1666, 30, "호열",$img,1666, 0, "-", 77, 69, 76, 0, 225, 272, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1667, 76, "호제",$img,1667, 0, "-", 58, 42, 68, 0, 207, 264, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1668, 149, "호진",$img,1668, 0, "-", 65, 77, 13, 0, 146, 190, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1669, 29, "호질",$img,1669, 0, "-", 73, 50, 75, 0, 192, 250, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1670, 7, "환계",$img,1670, 0, "-", 12, 25, 67, 0, 156, 221, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1671, 56, "황숭",$img,1671, 0, "-", 68, 64, 74, 0, 208, 263, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1672, 999, "황승언",$img,1672, 0, "-", 68, 17, 81, 0, 165, 222, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1673, 999, "황월영",$img,1673, 0, "-", 58, 14, 75, 0, 186, 235, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1674, 45, "황조",$img,1674, 0, "-", 74, 65, 57, 0, 148, 208, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1675, 48, "후선",$img,1675, 0, "-", 56, 66, 35, 0, 175, 228, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1676, 8, "휴고",$img,1676, 0, "-", 61, 72, 40, 0, 151, 199, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1677, 98, "휴원진",$img,1677, 0, "-", 53, 63, 38, 0, 155, 200, "-", "-"); + RegGeneral($connect,0,0,$fiction,$turnterm,$startyear,$year,1678, 22, "희지재",$img,1678, 0, "-", 24, 5, 86, 0, 157, 194, "-", "-"); + } +} From 8a181055a0f605711a15444349293c6ef3ac03be Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 18:20:32 +0900 Subject: [PATCH 096/622] =?UTF-8?q?queryFirstField=EC=9D=84=20queryFirstFi?= =?UTF-8?q?eld=EB=A1=9C=20=EB=B3=80=EA=B2=BD.=20=ED=97=B7=EA=B0=88?= =?UTF-8?q?=EB=A0=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twe/func.php b/twe/func.php index 691d0101..444c6a9a 100644 --- a/twe/func.php +++ b/twe/func.php @@ -2317,7 +2317,7 @@ function CheckOverhead($connect) { } function isLock() { - return newDB()->queryFirstColumn("select plock from plock where no=1") != 0; + return newDB()->queryFirstField("select plock from plock where no=1") != 0; } function lock() { From d422c030030e116c160dec7fcd619233e891ba2c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 19:25:31 +0900 Subject: [PATCH 097/622] =?UTF-8?q?=EC=99=B8=EB=B6=80=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EB=A5=BC=20Composer=20=EA=B8=B0=EB=B0=98=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 7 + composer.lock | 162 ++ d_setting/conf.orig.php | 3 +- f_func/class._Validation.php | 2 +- twe/func.php | 37 +- vendor/autoload.php | 7 + vendor/brandonwamboldt/utilphp/.coveralls.yml | 1 + vendor/brandonwamboldt/utilphp/.gitignore | 4 + vendor/brandonwamboldt/utilphp/.travis.yml | 22 + vendor/brandonwamboldt/utilphp/CHANGELOG.md | 86 + .../brandonwamboldt/utilphp/CONTRIBUTORS.md | 48 + vendor/brandonwamboldt/utilphp/LICENSE.md | 24 + vendor/brandonwamboldt/utilphp/README.md | 123 + vendor/brandonwamboldt/utilphp/composer.json | 24 + .../brandonwamboldt/utilphp/docs/css/docs.css | 168 ++ .../brandonwamboldt/utilphp/docs/favicon.png | Bin 0 -> 803 bytes .../utilphp/docs/images/awesome_var_dump.jpg | Bin 0 -> 41429 bytes .../utilphp/docs/images/background.png | Bin 0 -> 1028 bytes .../utilphp/docs/images/utility_logo.png | Bin 0 -> 84870 bytes .../brandonwamboldt/utilphp/docs/index.html | 1234 ++++++++ .../brandonwamboldt/utilphp/phpunit.xml.dist | 25 + .../utilphp/src/utilphp/util.php | 2535 +++++++++++++++++ .../brandonwamboldt/utilphp/tests/README.md | 39 + .../utilphp/tests/UtilTest.php | 1183 ++++++++ vendor/brandonwamboldt/utilphp/util.php | 10 + vendor/composer/ClassLoader.php | 445 +++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 16 + vendor/composer/autoload_namespaces.php | 10 + vendor/composer/autoload_psr4.php | 10 + vendor/composer/autoload_real.php | 52 + vendor/composer/autoload_static.php | 53 + vendor/composer/installed.json | 152 + vendor/league/plates/CONTRIBUTING.md | 22 + vendor/league/plates/LICENSE | 21 + vendor/league/plates/README.md | 63 + vendor/league/plates/composer.json | 41 + vendor/league/plates/docs/CNAME | 1 + vendor/league/plates/docs/_data/images.yml | 8 + vendor/league/plates/docs/_data/menu.yml | 24 + vendor/league/plates/docs/_data/project.yml | 4 + .../league/plates/docs/_layouts/default.html | 107 + .../docs/apple-touch-icon-precomposed.png | Bin 0 -> 5531 bytes vendor/league/plates/docs/changelog.md | 15 + vendor/league/plates/docs/css/custom.scss | 16 + .../league/plates/docs/engine/extensions.md | 120 + .../plates/docs/engine/file-extensions.md | 36 + vendor/league/plates/docs/engine/folders.md | 50 + vendor/league/plates/docs/engine/functions.md | 34 + vendor/league/plates/docs/engine/index.md | 56 + vendor/league/plates/docs/extensions/asset.md | 59 + vendor/league/plates/docs/extensions/uri.md | 83 + vendor/league/plates/docs/favicon.ico | Bin 0 -> 6518 bytes vendor/league/plates/docs/index.md | 40 + vendor/league/plates/docs/installation.md | 35 + vendor/league/plates/docs/logo.png | Bin 0 -> 2306 bytes vendor/league/plates/docs/simple-example.md | 54 + vendor/league/plates/docs/templates/data.md | 61 + .../league/plates/docs/templates/escaping.md | 50 + .../league/plates/docs/templates/functions.md | 47 + vendor/league/plates/docs/templates/index.md | 73 + .../plates/docs/templates/inheritance.md | 63 + .../league/plates/docs/templates/layouts.md | 102 + .../league/plates/docs/templates/nesting.md | 44 + .../league/plates/docs/templates/sections.md | 80 + vendor/league/plates/docs/templates/syntax.md | 50 + vendor/league/plates/example/example.php | 12 + .../plates/example/templates/layout.php | 12 + .../plates/example/templates/profile.php | 12 + .../plates/example/templates/sidebar.php | 6 + vendor/league/plates/phpunit.xml.dist | 20 + vendor/league/plates/src/Engine.php | 279 ++ vendor/league/plates/src/Extension/Asset.php | 85 + .../src/Extension/ExtensionInterface.php | 13 + vendor/league/plates/src/Extension/URI.php | 113 + vendor/league/plates/src/Template/Data.php | 93 + .../league/plates/src/Template/Directory.php | 53 + .../plates/src/Template/FileExtension.php | 45 + vendor/league/plates/src/Template/Folder.php | 109 + vendor/league/plates/src/Template/Folders.php | 75 + vendor/league/plates/src/Template/Func.php | 107 + .../league/plates/src/Template/Functions.php | 78 + vendor/league/plates/src/Template/Name.php | 202 ++ .../league/plates/src/Template/Template.php | 346 +++ vendor/sergeytsalkov/meekrodb/.gitignore | 1 + vendor/sergeytsalkov/meekrodb/COPYING | 674 +++++ vendor/sergeytsalkov/meekrodb/COPYING.LESSER | 165 ++ vendor/sergeytsalkov/meekrodb/README.md | 139 + vendor/sergeytsalkov/meekrodb/composer.json | 29 + vendor/sergeytsalkov/meekrodb/db.class.php | 956 +++++++ .../meekrodb/simpletest/BasicTest.php | 420 +++ .../meekrodb/simpletest/CallTest.php | 17 + .../meekrodb/simpletest/ErrorTest.php | 83 + .../meekrodb/simpletest/ErrorTest_53.php | 19 + .../meekrodb/simpletest/HelperTest.php | 51 + .../meekrodb/simpletest/ObjectTest.php | 312 ++ .../meekrodb/simpletest/TransactionTest.php | 30 + .../simpletest/TransactionTest_55.php | 85 + .../meekrodb/simpletest/WhereClauseTest.php | 73 + .../meekrodb/simpletest/smile1.jpg | Bin 0 -> 48874 bytes .../meekrodb/simpletest/test.php | 86 + 101 files changed, 12743 insertions(+), 19 deletions(-) create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 vendor/autoload.php create mode 100644 vendor/brandonwamboldt/utilphp/.coveralls.yml create mode 100644 vendor/brandonwamboldt/utilphp/.gitignore create mode 100644 vendor/brandonwamboldt/utilphp/.travis.yml create mode 100644 vendor/brandonwamboldt/utilphp/CHANGELOG.md create mode 100644 vendor/brandonwamboldt/utilphp/CONTRIBUTORS.md create mode 100644 vendor/brandonwamboldt/utilphp/LICENSE.md create mode 100644 vendor/brandonwamboldt/utilphp/README.md create mode 100644 vendor/brandonwamboldt/utilphp/composer.json create mode 100644 vendor/brandonwamboldt/utilphp/docs/css/docs.css create mode 100644 vendor/brandonwamboldt/utilphp/docs/favicon.png create mode 100644 vendor/brandonwamboldt/utilphp/docs/images/awesome_var_dump.jpg create mode 100644 vendor/brandonwamboldt/utilphp/docs/images/background.png create mode 100644 vendor/brandonwamboldt/utilphp/docs/images/utility_logo.png create mode 100644 vendor/brandonwamboldt/utilphp/docs/index.html create mode 100644 vendor/brandonwamboldt/utilphp/phpunit.xml.dist create mode 100644 vendor/brandonwamboldt/utilphp/src/utilphp/util.php create mode 100644 vendor/brandonwamboldt/utilphp/tests/README.md create mode 100644 vendor/brandonwamboldt/utilphp/tests/UtilTest.php create mode 100644 vendor/brandonwamboldt/utilphp/util.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json create mode 100644 vendor/league/plates/CONTRIBUTING.md create mode 100644 vendor/league/plates/LICENSE create mode 100644 vendor/league/plates/README.md create mode 100644 vendor/league/plates/composer.json create mode 100644 vendor/league/plates/docs/CNAME create mode 100644 vendor/league/plates/docs/_data/images.yml create mode 100644 vendor/league/plates/docs/_data/menu.yml create mode 100644 vendor/league/plates/docs/_data/project.yml create mode 100644 vendor/league/plates/docs/_layouts/default.html create mode 100644 vendor/league/plates/docs/apple-touch-icon-precomposed.png create mode 100644 vendor/league/plates/docs/changelog.md create mode 100644 vendor/league/plates/docs/css/custom.scss create mode 100644 vendor/league/plates/docs/engine/extensions.md create mode 100644 vendor/league/plates/docs/engine/file-extensions.md create mode 100644 vendor/league/plates/docs/engine/folders.md create mode 100644 vendor/league/plates/docs/engine/functions.md create mode 100644 vendor/league/plates/docs/engine/index.md create mode 100644 vendor/league/plates/docs/extensions/asset.md create mode 100644 vendor/league/plates/docs/extensions/uri.md create mode 100644 vendor/league/plates/docs/favicon.ico create mode 100644 vendor/league/plates/docs/index.md create mode 100644 vendor/league/plates/docs/installation.md create mode 100644 vendor/league/plates/docs/logo.png create mode 100644 vendor/league/plates/docs/simple-example.md create mode 100644 vendor/league/plates/docs/templates/data.md create mode 100644 vendor/league/plates/docs/templates/escaping.md create mode 100644 vendor/league/plates/docs/templates/functions.md create mode 100644 vendor/league/plates/docs/templates/index.md create mode 100644 vendor/league/plates/docs/templates/inheritance.md create mode 100644 vendor/league/plates/docs/templates/layouts.md create mode 100644 vendor/league/plates/docs/templates/nesting.md create mode 100644 vendor/league/plates/docs/templates/sections.md create mode 100644 vendor/league/plates/docs/templates/syntax.md create mode 100644 vendor/league/plates/example/example.php create mode 100644 vendor/league/plates/example/templates/layout.php create mode 100644 vendor/league/plates/example/templates/profile.php create mode 100644 vendor/league/plates/example/templates/sidebar.php create mode 100644 vendor/league/plates/phpunit.xml.dist create mode 100644 vendor/league/plates/src/Engine.php create mode 100644 vendor/league/plates/src/Extension/Asset.php create mode 100644 vendor/league/plates/src/Extension/ExtensionInterface.php create mode 100644 vendor/league/plates/src/Extension/URI.php create mode 100644 vendor/league/plates/src/Template/Data.php create mode 100644 vendor/league/plates/src/Template/Directory.php create mode 100644 vendor/league/plates/src/Template/FileExtension.php create mode 100644 vendor/league/plates/src/Template/Folder.php create mode 100644 vendor/league/plates/src/Template/Folders.php create mode 100644 vendor/league/plates/src/Template/Func.php create mode 100644 vendor/league/plates/src/Template/Functions.php create mode 100644 vendor/league/plates/src/Template/Name.php create mode 100644 vendor/league/plates/src/Template/Template.php create mode 100644 vendor/sergeytsalkov/meekrodb/.gitignore create mode 100644 vendor/sergeytsalkov/meekrodb/COPYING create mode 100644 vendor/sergeytsalkov/meekrodb/COPYING.LESSER create mode 100644 vendor/sergeytsalkov/meekrodb/README.md create mode 100644 vendor/sergeytsalkov/meekrodb/composer.json create mode 100644 vendor/sergeytsalkov/meekrodb/db.class.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/BasicTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/CallTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest_53.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/HelperTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/ObjectTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest_55.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/WhereClauseTest.php create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/smile1.jpg create mode 100644 vendor/sergeytsalkov/meekrodb/simpletest/test.php diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..7b57b10e --- /dev/null +++ b/composer.json @@ -0,0 +1,7 @@ +{ + "require": { + "brandonwamboldt/utilphp": "^1.1", + "sergeytsalkov/meekrodb": "^2.3", + "league/plates": "^3.3" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..742982da --- /dev/null +++ b/composer.lock @@ -0,0 +1,162 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "08d6fa0a77eca6b860aa39d42081eea9", + "packages": [ + { + "name": "brandonwamboldt/utilphp", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/brandonwamboldt/utilphp.git", + "reference": "36c32efc4f0679c05163464a550f45c8d83fe683" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brandonwamboldt/utilphp/zipball/36c32efc4f0679c05163464a550f45c8d83fe683", + "reference": "36c32efc4f0679c05163464a550f45c8d83fe683", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "type": "library", + "autoload": { + "psr-0": { + "utilphp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brandon Wamboldt", + "email": "brandon.wamboldt@gmail.com" + } + ], + "description": "util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects", + "homepage": "https://github.com/brandonwamboldt/utilphp", + "keywords": [ + "collection", + "helpers", + "php", + "utility" + ], + "time": "2015-02-02T17:56:14+00:00" + }, + { + "name": "league/plates", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/plates.git", + "reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/plates/zipball/b1684b6f127714497a0ef927ce42c0b44b45a8af", + "reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af", + "shasum": "" + }, + "require": { + "php": "^5.3 | ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.4", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Plates\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "role": "Developer" + } + ], + "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", + "homepage": "http://platesphp.com", + "keywords": [ + "league", + "package", + "templates", + "templating", + "views" + ], + "time": "2016-12-28T00:14:17+00:00" + }, + { + "name": "sergeytsalkov/meekrodb", + "version": "v2.3", + "source": { + "type": "git", + "url": "https://github.com/SergeyTsalkov/meekrodb.git", + "reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/eb36858f1aff94ae1665900e681a1cfb78563ee1", + "reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "db.class.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Sergey Tsalkov", + "email": "stsalkov@gmail.com" + } + ], + "description": "The Simple PHP/MySQL Library", + "homepage": "http://www.meekro.com", + "keywords": [ + "database", + "mysql", + "mysqli", + "pdo" + ], + "time": "2014-06-16T22:40:22+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index e566e043..a40cbf3c 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -1,6 +1,5 @@ queryFirstField("select plock from plock where no=1") != 0; } -function lock() { +function tryLock() { //NOTE: 게임 로직과 관련한 모든 insert, update 함수들은 lock을 거칠것을 권장함. $db = newDB(); //테이블 락 $db->query("lock tables plock write"); // 잠금 - $db->query("update plock set plock=1 where no=1"); + $isUnlocked = $db->queryFirstField("select plock from plock where no=1") != 0; + if($isUnlocked){ + $db->query("update plock set plock=1 where no=1"); + } + //테이블 언락 $db->query("unlock tables"); + + return $isUnlocked; } function unlock() { // 풀림 + //NOTE: unlock에는 table lock이 필요없는가? newDB()->query("update plock set plock=0 where no=1"); } @@ -2440,23 +2447,21 @@ function checkTurn($connect) { // 잦은 갱신 금지 현재 10초당 1회 if(!timeover($connect)) { return; } // 현재 처리중이면 접근 불가 - if(isLock()) { return; } + + // 파일락 획득 + //FIXME:이미 DB 테이블로 lock을 시도하는데 이게 따로 필요한가? + $fp = fopen('lock.txt', 'r'); + if(!flock($fp, LOCK_EX)) { + return; + } + + if(!tryLock()){ + return; + } $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; pushLockLog($connect, $locklog); - // 파일락 획득 - $fp = fopen('lock.txt', 'r'); - if(!flock($fp, LOCK_EX)) { return; } - // 세마포어 획득(윈도우서버 불가) - //$sema = @sem_get(fileinode('stylesheet.php')); - //if(!@sem_acquire($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } - - // 현재 처리중이면 접근 불가 - if(isLock()) { return; } - // 락 걸고 처리 - lock(); - // 파일락 해제 if(!flock($fp, LOCK_UN)) { return; } // 세마포어 해제 diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 00000000..97db69ce --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ +=5.3.3" + } +} diff --git a/vendor/brandonwamboldt/utilphp/docs/css/docs.css b/vendor/brandonwamboldt/utilphp/docs/css/docs.css new file mode 100644 index 00000000..77993435 --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/docs/css/docs.css @@ -0,0 +1,168 @@ +body { + background: #f4f4f4 url('../images/background.png'); + color: #333; + font: 18px/30px "Droid Serif", "Helvetica Neue", Helvetica, Arial; +} + +a { + text-decoration: none; + color: #f00; + padding: 2px; +} + +a:hover { + background: #277585; + color: #fff; + border-radius: 3px; +} + +h1, h2, h3, h4, h5, h6 { + padding-top: 20px; +} + +h2 { + font-size: 40px; + font-weight: normal; + margin: 0 0 15px; +} + +p { + margin: 20px 0; + min-width: 550px; + max-width: 900px; +} + +table, tr, td { + margin: 0; padding: 0; +} + +td { + padding: 2px 12px 2px 0; +} + +ul { + list-style-type: circle; + padding: 0 0 0 20px; +} + +li { + width: 500px; + margin-bottom: 10px; +} + +code, pre, tt { + font-family: Monaco, Consolas, "Lucida Console", monospace; + font-size: 12px; + line-height: 18px; + font-style: normal; +} + +tt { + padding: 0px 3px; + background: #fff; + border: 1px solid #ddd; + zoom: 1; +} + +code { + margin-left: 20px; +} + +pre { + font-size: 12px; + padding: 12px; + background: #fff; + margin: 0px 0 30px; + border-radius: 0 0 2px 2px; + box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); +} + +span.header { + font-size: 24px; + line-height: 30px; + border-left: 10px solid #ddd; + padding-left: 10px; +} + +.desc-text code { + margin-left: 0; + font-size: 18px; + color: #0E04C8; +} + +#sidebar { + background: #fff; + position: fixed; + top: 0; left: 0; bottom: 0; + width: 220px; + overflow-y: auto; + overflow-x: hidden; + padding: 5px 0 30px 10px; + border-right: 1px solid #bbb; + + box-shadow: 0 0 20px #ccc; + -webkit-box-shadow: 0 0 20px #ccc; + -moz-box-shadow: 0 0 20px #ccc; + -webkit-overflow-scrolling: touch; +} + +.toc_title, .toc_title:visited { + display: block; + color: #000; + margin-top: 15px; +} + +.toc_title:hover { + background: none; + color: #f00; +} + +.toc_title .version { + font-size: 12px; + font-weight: normal; +} + +.toc_section { + font-size: 14px; + line-height: 24px; + margin: 5px 0 0 0; + padding-left: 10px; + list-style-type: none; +} + +.toc_section li { + cursor: pointer; + margin: 0 0 3px 0; +} + +.toc_section li a { + text-decoration: none; + color: black; +} + +.toc_section li a:hover { + background: none; + color: #f00; +} + +.container { + min-width: 550px; + max-width: 1000px; + margin: 40px 0 50px 260px; +} + +#documentation section > article > p > code { + color: #999; +} + +#documentation section > article > p > code > .util_class { + color: #bbb; +} + +#documentation section > article > p > code > .func_name { + color: #0E04C8; +} + +#documentation section > article > p > code > .param { + color: #DA72F3; +} diff --git a/vendor/brandonwamboldt/utilphp/docs/favicon.png b/vendor/brandonwamboldt/utilphp/docs/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..5f17cf1dbd24f03f46089ef35b6078c8a09aeee8 GIT binary patch literal 803 zcmV+;1Kj+HP)pgS zs8Rd}6TPrgaLRU}`*&sOq(f!QZdIJa*orLFT9YnK@_pa=&hes2$h`2mdY|*0^Kjnh zeW3|Acfqp*4!5rsy#HK#B%J6y8&358^z8@9R5}UUHcI+>xC)|PY*+)Q-tOAi8gqv| z6Cd)*v$Q)GPYOV{WS;z|+IcP!53<@Tjy&{I?(3tc4FIZckXa#!sltdTPxnPt;#ee> z$cgHbCWYR;JTjdWi}|Qj?nmoZImx<#loIZ`MNq0JtbgSTW5D|J4&_TX7z4%tm6Q#Mx?%4~k+5aU%JUVfPVq{}hDZQO9$yu)LDr}{mwtHvw6 zW#RdzOy1nOkMVCNm&lo)nK<(X2c%?QO}FUMCzt1_%7e$T$G_u66Y!4FU^Eni)P=G0 zjR7$=4Y|LUU#ROwbL5v9o_h6D0{OxK>fW_{7KZE$HG~@CZ5^o<|647IGcdXlmytu=+f3aqwL}Y&3e~3K-kNun-LKKX9(? zKD6Uw^~mQZFF{l4tV@Fl*<7P#U=mng<39o`fey2fzc1a|c!o+O61c8QB^qH4`)JI} z?x{G*y@X!78~!#9P;pYPm1OdC-26H0>t(O!eMKhYQ79A;qobqUz->S$*0u?PYb-57 z;aa|7Yp74}cC2VGPL!1wjFTM2CPvhj<+T5Cb3pP;aCCGvI$F7+5%HC`fn+gx6I7 z{6DH+0fBrkAN~n{S2e{KTl3EX)V9$+PbCVN8v9BoE~xGmU}DEJ&SO_<_>a~IRF1CW z)AIsGUmnM}b@iXP>qh&%YJ&bk#*kj$k@_bY0M++a)Q*2E$WTfsrmb+3uAoyJE(-KO zh#fa-bP7MefAqUL6L^>Md-X9*;`(0a>=lsyz`S9o-{b{ORxz2{t01_Gmkg1jN{E$`D{3 z+c(i6|$z;E0uk<>1Cf$Mdx-#Dn7&767^*KuaV`JQ}m z)!uRU7XfSnKWaVAc>n;5RS33PJ2s`(>d9k5)i6+{@r?x4_xzHimB&uA8{U zJ<;auIE6rtGXMYtRWx#b*iQ>k4*(H2t33ARsitpBOa97kp85?JI-X1Ymu8ny>9aQA zP4c@>C!Vv{PX9J+TtzpaC_h^4$Z}cI=k|Qo=>R$nb?_!wi=RPgz$16$yfxU_S1LDCuT8%Lv z?gjHWwR-dU!hIwD|H8{yA%AjXdIb#i??l>PXWXQ)bjk(&!K3<~3qx3tP`;-Td6&Ew zU#@p&)9`M#j_eQYjR(kP(&?Q%s}~+pB0a0ZpB1fARfT^*Z&C}IYEb?w`-dTj?{>NW zD7U+kD-YK%*&6=`;{ zbmIpcIs%mceT+A9St(Zv7)m!e+J8yqjpkW9bpX$x0eCyEHNxH{eNR2j4by_?28b7+|jaqcqr=n$26D!so8iaw#-qeEv36tYqYX?35&^s}^lzP_WhVj|^ z`@%en)?3-9eayg>1rcH-iqprG3fY}_-=xGhx^JckEb;dDuk>b$aN7Q@AmcCYAN0=x zDaLbVAlW|)a3HHU^GWaz)A{el^G(zcP%yC2f7wpRKiX6I2SMUl=$=GjZShGY^{oZt zhqo$py{L*-$mi3Xu&@kQ?PxHj7^ACM13+tL_#J7A7XZF;a;yjC;Zw#zdk`REeZ2zk zvk-jweQpy#(ac#GB=Gp+8Fxtb2HEI=etS@{TgH2keuMX)b9jRQ6b*0mA+Yl@e)$9z z?78^7DR{)p}9JE)!S&SNy17Vgtcf3gWmdqnz?=jNR91Y$Gzd?zG1>w_GY!X z$Ni%{aqe4(koT)@|15f4w*Vv@VXhjg{9`}v(|Z2t8h2{_VSM>o*eXTm-6nP@;FoQR0X(i*|roCh5o96YRiz6Foh>0`%;y0RUO3 zoSYo6L-d;-e|T$-ASWc~_;mfh;M7b%oWTct{Z{q;LT+ zl0Wg?Ts3BlPX7d_1E6!?X#DjH>P-}^Xn;R100blq6!hDg`v(LA1q%rW0S~~@K)}N0 zal<70fR4eYjE0M6O!Lpx7XkxtX@_x9G>(9ZDtK}5;2K+wtIa1>jA?BOu!6VbV`{Cg=H zL5ooRKt->r$?w?b=F==L)9gFrEDoghwNE;MoBp%<3|oDIC^-jplx*kITDLN=h0Xaii%r>j5Q^9go!;!x@NLa1EDDIBkW7Lr-sCXb?}<`3~j+1Q_wC%fEEd!}uU4Nf~BwnX)d zXwcHOfKPG_jYF^))lF$s3`=qAX?Da#YOQgC!+Oq0V1n<)9N5=Y^Ry02K8_+1!bE96rH zV@?WO2TjIyJa_U5h;2>@{f;WE65s7x%xP!aHL%6xTAUPS73fR#!?sHr`jsWK-yzZ0 zz0rtW)~{Qn4Fu#Sc*{!WPn>xWc{WX}n;Ot{R>V0GE@c2kbpE)? zPJ=enL$^})x=eD&h~{b+y3!~%{P}oZeGqK#cl%tSMy*+kghplU@1*_k6RT~P!$T9G z=C2nqTa{KAn9WFD?g7)?w}>`bD`nr+!BqnuRb&qr{s}cp?cTp5zW%DD-}x9{`Q`kF zZR|(gASvUm#|rQ;JV1S_^B8(?*@1}_o05kyM3f4C$mksp&uN8n<4OMD#|GkxaRT*1 z%EOIFT?l<%qwb|^0fM64GGUrmz`Nf;1HBq{#$U_Zt;^r3*IoEXn6#ff`x_XD*U(jf zf46YQ55jiY*`4t6><39gM)=soQ%pIQIbrf}6m)HX$!Z0Yb*dNB7f_^RhzVAZvf(Ys z%4lB!R$7l1p4)?a1t-ZOk*rTD&DguYW5pfCl`OanXX|K%0%`^d&(RH($`u_&Tg{E{gTD1LpRnS zv*&!g$@lmizbtX<6J71f^dzqyQi`Ln}K}S9t7v?3W3$CrYA9dSIh+7ua6WtR4MJ##q)vGfP$7Wuw3yEys_}Q(Y8?^RkK}}DzRTmuI(c(V{Z6v% zcm+_05Glb7CkiTT3J3|veH|H$+nyp6%+KNfu_9sbo4y&&NZ}m&zF<_z^tj4r#d;-@ zVR?CYAAfm4Md)-fP)!ZhvtHCfj1+D{tvXiEdQ#Mv(; zOPj1hx)liQgXU{y&zf3bz41YECIP|WF6c4(+jw)IG}ad^K3r@*DFZCqXj4-I^R%`eOEI+a{|3}Xl6QhiV!5rKWcvs* z_7qmpcC2qhd$rTJ77gqyn<`u~LQ@l*Rx7N1SIeXBpr#rFE{` z6ZOQ)>#=|Mvf|ZlRkGXMlbXopZ;@U)c&arJuBCjYt+iXaa%_1Sl;V9*E3nP1*5u}( zUtDL_!IZGcnS!0&uWxV*X&bKF+k$6^#$My{yDC&W^{b8L1wKofa;w1Jl9`S%N+h%Y|yJkQvor4~i2+ zwV4Mb%jycl%Apa6I^8|=EEu$Qfe&W2Z8zAYM>$l=Y!InT%{j_O9%dSpI=-G&Im_Tr zd@fjRNNR(Hjk>G5ALg~5QaCI!jSd_@h*yjWl(=FWgNR5(JG@z?jEDG!LC>R?*y%{JpJm?jJ3kt3xjCdGGfji+*-{<5EpeKuu^{bK>X{~FQi2*X zj_#~wbR33hM+fQXBYl@>h(OYs@rw~#E4dF)_zc&93ai8%_ti@eU6f`I?m`}`S>|Rv zlS`wz<~DHqut{L+HiwkoA7O+|HVMh47|XeE(>>MSNjV9>N06I7q}RTk2j)D)RB%jJ zJtOV)+tVI7OcgZwNxLW2@G#&e&oPCr2(T_BKQ7HB7M>m5z+)kOtL6Mjtk6lY6^<>( zSGe@kFiuaKtn}C8k>b2iSB_gLLHPE?f_d5#ZTz?8#dtFN-7kXTl(N4JGD^7((r9^) zC~;0Q@V1;+eaqhcYFkqQ{anXvpH^Y-3HsLh#H((P&v?mIGu^A9<$*-tO25quSq04+ zYdAZhyb~UB?BEBoI2#kJ|4f8!OBKKD#XB`}c=ikjdMv^{5|O?MR-J#kiv8NB)2Oi@ zTHc4~Bh-#9|5dVoYY&R0l`GFOwkpnaD`yHbL~85Iei3Lb4vyQwaH*vCeDs>(jpf7>r>EVABQl`Fyfq<+nt@Xio}hD^?{mTix*7u)Pko8m;7=)?)*a z26#2r-9c-O{JpRfeaQjCc`(lLUW0=udR|3!_Dk0*HQYjJO881aa5;!ImQ-nGLCytZ zIu>;v*s}hnrxSEI6q|}XuFklGwaD1;2Dk|tTT_x0Qqkky(SvlHGfG2LH5Q1!>e|m3 zrrJE?_lJ_uYr}glrEGsJmfM{br^^wIZEG7(58lS>|9of2gXYxA<+W+P;eXQM|8?y* z7vszb1>(6$X5M~RBf2^K^1B$k^b%Gwg<(NR@1l z+TcDki`nV6U+azMxgb73MmDAhy!M!CTYd@L_c!5l_3PA=_^Iv@{(Ssc`C&jQQ5(| zuNU73Ab;@@Is9<+NXFOEW=auJgkRS|RaHmZ73Nex^)i{1tFEUl)>Tbk|CCS{5{HKn z)9$i|Ax*-sZxXK47r=SSKv?U8Jg(OXH=53-I_t2zyx&j>G0M!S3Hy1N_a+vt+LU%|Cm!Zz8+>^^yDX6 zroi&2q|bk-%p>` zA@MY}@PNRE2H8t$&&FJiON#hUzO=2hD=G44WaW3o8m&O~@a7&*RT(%M6y_eoc&67i65N>v zBS>VtDQrQPZE}0`Sc|Pez(~{0qQBXZ!z(~+rJ7~^XPL(VD07dknOGiNGz=W6#^Z0u zYu~Z(^3Nx~snoO$QDl$UCyJr4iRR4NUwm0HxU2QHezb_)9)I-2>9MO~1j{MuamIcY{?+rkGPn<%913RA8ofZ`}dZ4)X*6r`c(3ONKI zciNZvwv_dm(s^@RcfoB)1!f`>fk0uV&0jHiZt1<&_MI2?H~HVD@8qL?5M^efbBw+t z;Wz7r1`h7%MQnPyL^G5}N7WSq_`eO0jTVgM$WTVa-G zwbRz~cE+Tp%at4DPQzO}uQshwb{2s=gYkP!t zKa}#)25V>0mOt^{i>}V_*t|OmL93e@8YFt4lv}>;2jkVP%r})Z+V+l}i+o+H!amUB zL^7ZF)WX&0HL?xiMuf_9#w#F)Tv34|ms0|L*(_-$3o?>YpJ39KVw&sIWhS_%=>k>` zO;jgeuhfp3G{sa-TI;q$W|SDqOQbq417|0Wtjo{}1KxzN6w1 z-EIwi$3JVf{QM25e~QxpM-MtkA8M$t7P9QH74ESY06q??_OJ}4nnoEZgVsnI%Qu(> zOv~%^kOhNrT6NAJmu=c;x}_1CX1>vJY*JNvob^j~cQte)GD$|1?^7$62OkJ@msB_H zr;uvCbJ2!vWEQ7i?^`YX=$qstGV?NUGxeSm;T4edw>RaJbv=lxmg-7oA^UMrIDW%A zmHM-9Rx zB(sBy#qF@2JX)_eZ`reOYawVM46rBE%A-^K5fC=%kMDO75E0X}s8`H&tdtF(5{s_p zOmbHt9coF0=fT%wNM^|#>2^V^V73bhyC=hxtM90}Cd!yqs@ld!WxOO`f56;)fg+`F za^kC?H3phEj)L7yPU~Iuam#SC<(kvM)mEf1f!vY4od6~XHBfIc@N4mhheFmd)@EbJVHf#t64X5=Jc;u zdy6^fF(zQmn6B$IaXrl1<@Gs#4t`Pz7?lyr{02arks38pL!b5zUjl+_3Ml z7st|;j>$dRz!St;sarX>2j6JVf|v9#DQ4I?N*H#!ikJkO z>i(?v;Gg{qofb)Fx&cd`(Lvwo5qYVwqSu+j@3&k{J6~0dhQA^m6TE_3|4TuoBs{1P4-WvHgy#73$G&%g(sd3r)vI{R6QCq|K4KEAt^MZ z+)d|Z@77gq3k%~q{bxQ}tLu`NIB@6Omm84+pH5N4E+5c&l)lGt*M{=?m4r}}y94Np z-JR#M!#F_;t#R>=X?q7MJU7O-UT~~oxEqb0bYHxm>K(GbZPh&)VW>kUQjov9n&3Pwau|F4b$c zM-##dRj>733Ar5!YdDThA!(-R+D&VJY7~J)CRBOvzAE?XF~KLUhF!|=L}%uQo1pY* zM~YUDIe*7SMOBP=*EarWS4JxGz2^{8~gI_syEt{tbeiY_N+x()X=9-nBW8utWI`X2ywctz-R!iKDJYhb15rV?9lIyohCK!EJHj+^;SX(9=K{_;+dD zS+7O(dj4$YpKxF3U!t%3Kvnq)_@VJ1eYh85#qwdbvWMbuGFQKw|F+E7kAn%cU01a`{s=rCG{S0-By$`X; znNml5#oEkVnyGDQg~_(t)m^=7f!q5lxX8IMqc9FDZm3#%7J_;tmD(C{EYlttzctUx z+Qx$4h(#7d%y~Z>`pB zV+vFv=QH(7?7UkYT#2OVHdEiCD_85=h2{2Dfm_+25$1DZxAaoN@!c`zUDS0PHUFr~ zvb#ryfkVLMpG5ACKR+JAv0)hP@U0;@+V7Md)6VAvsH>)XJgDStN0d3AiEUb1ZfuQF z&b7Hk7Sz4)H~;rVaq%XUWt6V+009VaSFwxKxc}uKk(`#l-;(Uz?l^L(*JM)Hwqv+@ zYfZ>y=7*KHJw)Wx@{5iqbOfccEXEP|>*{Ob%}?&+4B==u?phRVX9#DjFvbKMnqXTQ zo1t##qMcy?xOlB$Ne{`0Q?fCRq26Bb^LPFTC=w>_+euw$olyWAzTmPh$%>I>B3F4y zO=x}#K{Y5G$^8)kr{5>I&S5}sJ4-o}QX}BxF~kB^CC4wnkQ&o%^y;WOBPE5U7%^mL z#b6c4T6FO>QmiWfyc#k~;g0EodkqA#UGIpCN)b1(7!#)*v*kSh-QnCl?pkvw;Hn3! z+JbQMzlX8U!70={H0736|9a|P=>OV1w_;GTL|{1ysTVq&w@8$L!`TP@ILa{Di9(-D zQ))XzLaQVa$;;3CF^A2olg|ClmBv+B03&`2$ks?m2rVkf1f4S39LPwhE8xESp50t+~@o};^cmAoODg?Pn!Scon zr5tNjnoE9db)?BMjB4Kg$p(S~D4c0^EOX70#fH&Db|`Zbh%KQ8^&v^61P%cj=B4;= zj?JZqnYK2sVzR$lRkwm3#Q@Q`EU$w4#w>TRdK1oAHn%1Z#fak=INH~4CD(p7`dl?E z63@ABCpUMMkc_9P_Ql6wtwNOznV>2G|> zw`Q_yvTzU6eHo7aCgalx>VEoJIj;IK^O(h;g}-kv=b`-XrlNslWd`IlRbXIb?k;#Y z_?0+dE%TEDe+20IP~CEss4h|HzoDgIYggsgGU%v1ri!8~V5yrnG!))Az8Y(!Xt_

z5A05_r=(9-cwE&2YU)gfoy7YIL+4c+M#RF8h>}+aWoK)aQT`yfMJ?nxX;C~~ zV1Q!(Q9}QNzRuRz?y5{~dc3Z4buYcwMGyaB(+PKSA82B>(j2j3?H!r9Vt&wYB#M8% z=4Tw256G}eJUC%ZS}R2;3}wgUrB$%Nn{Ba;fF1}CTP!bfiezVl^fmP{>N;_4WZS|w zN!t#U%j8N!R>t<>;ofg`xKVNgkyDHAGgSkcKtYC@9j)5AW0RG6wtVP&e|2g5i9}xS zFnqt!z@ze4fPK}Ic1MGM-SCCQD}dJ2Bd<+Q8`BIkol6CR$qz>|Xw~I(gD-TEe_eg# zSAf;M|9?ZR;1h5`;g26&>X#k+K7|u(XA4p8C(5M9D8tmIe#1F@QR8f;L8g8Hqg~FB zN&sCR&BrHA#(Km3_x;rbYsTiL>S1E$J;yFk_{EqQ7iw0l1lU@|G{Al&t{*>L@xOzu zI0osboi-;5pty_>>w>D*rB_T0guvg0bm#pRCu?18c`T1J(Z>JN60+6r)b*|befC{7 zT?i$Wd7I|X=e@rLHMX+2BYHO)E9=UeVe9qFYxHiWe<%G%@x5#e))0Ur9_HqkCK}LO zi@?-)!r*-1EWM?X`m!w#utq$c*mUuSf|-hLMQcuGA1?h)4Z_aLwq4ugCE}qH!tUrE zmS5zY|GY%oZFaXuF5rEd-&FruqaqL_=P{^U_3Osp z7MVa%Q~mfBqF!0#x^nq7J0&lLj7p(kbT8sD3VKoe_b zNbyN0k5H--kw4RIsB|>f;G;vKZcR&AR$~%)JgCpY(?vt}W7peg7OW^9S|Hta z+2>XNlMte-eBMKjf?(E@mL3pSGaI?aZtLcucnb-KHAT^Ysi%q-h^C-Bl^L?>z*G`z z#nh98uqN_NLjb6|ST7&uY+MJUA3rAKU2R!K=`i?BY%zK{&xFI?CGhF*D~+cKx8zXE zEltEj=u)Rah=Tj})v65%5F(!mp+s{bKS)Xy2Z+ThoYPgWf9!4~x|vKX118|< zRr#R>m#>pBs??G21=hyxQ$J#N8AB7nsOZuCOj}io_F&ut!Hzrlr0H{Dt5)_$QyB*G z>Ge)t-{ndH134f6YI_d`V5S}ve^;7tA(VP{ifQhQK9#o5$J!+V^4p??w(`Q_g9*_Y zSS*}5y|!86l3M!HSAa$gOz#%*1mG)v->O@AhTFW0Ir21P`={nE3LzFGZ!Rfa~< zFi8)CUEsSkcchbZ9~gbP>y=x_TW94}f~FE22F;dc(jjKEHa}5!maY|8^$Z>P z&zG0N%HM1^ra`<0v6Cux1tktQV&5-l(tbucEZg&)+M+GMgB0!!?W^0n^(ZPd-9yeY zR^Rhc8%u64!&ksJih$lzJqCjJ z4_y;6?Y%^1ta_gQDelZ1zQhnksG?uACD8+i#!iH5=6S3!)_H_bOLtRiv(adO$Y?tJ zvXQUl{;0`z!SDT~(>mKmbpK`W@MCp<8fW_F<-`;eosiPyWeP-gW2!EP_IvHs*~bvo z6m(h2X;kOhlR@1l^BG|pMFJjDdh+1WW!oeb=@P7-RtYv_U6X82`jvGM&;UoIBrcO( zShm_FGO!N)gMvGoTf0L@v<9JUXX%&Y(*#l?KD>HC+DM^`8p5MWUh_KgN?aG0I0PgV z0^zZ^wy49szBI>b$)*8aQAys8hY8(in+Zjty3n8OPV{dljnR*$4ICO6dL&d28h&!_ z+ru<^RFzb-j5B&D8kJd3e1?cBZ?>c7^^aPrDQphQj7sYl{L$_w`Q77_)6c{usv?f^ zS!xOvdCqR#PIsKmCy-@+a14_~1FqHTcZqnxS`Y4 zx-IH~hrmqOWK+!zj)90(ljctfHfh=ns9d5SryiD1YhJh+q)hkw z%*2ZV-8^1MtsTnDmaV=uy0dv7=hs~KeBC83FSLDPKlQW1^?$hYI*`aCz{9jbhos2OdvqzBtBp z-@gK~Z#XYW0+sInKVUl(t}E~bgtA8+h~GheyhUsoh7~= zvin4HM+&rY{}#)A_?^~vvh<|pi0h?j4mrG)*GV!nsI-XD*N@5dhe3pi565<7rc6z7 z0Ex!w*W{em<&%~Qjq+2{3Pp=5t@(I0+vi0?)crvlU+;dN^9FEEKPoXo%x`tmXdcFkPK#Hk>w*aIGTV={$TQCVuj*?L_v2}K3*1~uN_$qDxE!Od0_xg+< zt0Jn!i_-knOiEX)dNHisBelG_qa|$X_5)nu^-E%UXyecBGd+sCr4?0AHPGI6&hENv zxM^A#cRk`|5>kpZ2ci^rRZ&dWiJaQ{CfQs_QwgBjxhpq7LAMBu$4PnKy5vKs?TuKW z{OO|}qX}qeYUk-v0Um^n2}iyX=#bcrO(;#MYW_U_8J(HxJfW3kgAqwp%)=Lv+NU{a z26EL+qDeGMYGi&Lv56D}&8|0-AhRoV-Cu`m{>p`ZGR2-dgdT*b0_k75A-U%Rv@#e^ z&z44j*jXmN`?oQQ2-@((zmE*mcd6D;i-`Symu^bB2^6${WAyhhaRj0b#D^n{lJpFitZtM<`y6{J4PdlN{5)zba^5eou%V1c|ocv9oTo$(}t+qDkbHoOv zzfA+TtQ=JNp*u}9*|RB@ebqb|h12pgbHCZlQH)F^{uZSFZj$AX(8O^}b#AkFm?b%r zW-GQo2CJYgUH8jfaCXP^aX+mBsqK+Aw+DOmRi*_!9QJStCQm|}s1)`px2Q_KxVI=q z!|Q)RR&8+RGKIo*>LRD(uMI4kE8q_{82cffdH@4#bQkjW(9x@Nd6ttjhex)sdl}}h zxgFZ8AlB4i>}yMu1E6qsJKem1v{&LSqu+}q>cmi=mYz_{)wDDsrp|N`Lt;s8b0e+{ zu2u-38t>{{j`K->xo`ZNQ~y7v@n4$8tHr>dU8e0%uYl`kF8qRfhUWgjM4<{e%W31X zMA>lxLM+##n9gHexs!O;@lJ@ht4xUUG55~GL@tf9AOf>B?f|D_aaMZUs;Zj@mUb06 zwcttXCN-3iGQKMd_o2?l;~5_7p*#AIgHe22&NIpmC~<^(YD61avj+(D;4V5agvG+3 zoJnoZ0JaQ`Wb+U|`C`fbJ5Ou0uscZ>q%qIJpY27f;!|V5FfF3@#GjKHd=G8uEl1+; zm+eBf-2xm?pr&Rv9@R}gvr6i#xQ6p!P4|!0F3GJb?hCA% z|0t(s@~Xn(C@S+~kPL4c-kMCJD1RBPiVunQE!~h9FTJ^4->gWeqL{HNx+GT%gS%!kcBcWjJ@xH911Wa2zNPA3JeCo$fIG_j^nImDS&Vjl(hn)%b z7277by*KOBad(xGu&iHUKojqOx5QAruSsP%rnjA!4E^SYBW8gZE?GZTC6NMN&|tgoZjOY9VM^t)7W4651GJ4e zd)M!7O*`f|2ZhC`T7z;ja_!B6W`c`DnN6Jjhq~@sLN%ypy>$ckHkJ-8aBK;C)cKUO z4j8P0^C3FuZY#Xp5FzfFdP{%Z-%OH}0StI3D5U{4Ks>9G%fpXE9OX4%v(Q2YH z{E^tAY3NqLSrh6U=J%M%gO>d)Ho0XPeG$sI^~N z1+`}kLN3{*w8K;qU{9Kb4)qJsEl-thR78+JWirTor;S2}p1!_Z9 z;HOku{iid6uYjq)MSow|)>*%tK)ZbekC97{;`0ul-u9Rmh{i3Lke!5%!zfrd>+ z`9TzpicMJs$JpdECzseqRa3Kn-uJ^40UQ=9OTE;C;&QS(zCPXT(jHWkiwJom+=EAy zrVYgcd@eDs{{IOqN|OR_%ZPg;H5qq_{Zl&J(xka($frrRf75G6&WdF_o3b;=#SD8k2AaBHr~lE@xa5Y#ix zhER>;ud;1of<)etA1E>018g>1HU`8U8i#XP2#U+SxUVU1Lvvg)Sh@9HS4r) zz<)W)5}I=co2_F|l3{g)?VsO=LfAU$LpZi|(hDP5O3^v2;Gy`4xBI<0#!EV2jgA2A z$tYKsRne%DY2TgwV)lm&S^9g9-oX@A^9*wbklc?<-d4Md%8aX(M#Hg{2*g`jN6B7l zumS-)G&z)FmEKObr(Uoy{{#ZI*LK70M5r8k^_AUFE>+kk3sg%P>fOS&o04YZ@`OU0 z9j$OEw7rmEby|n)C_nwh{OpNo!Q;?LdUL`_su)oh2-hIEX3b2&+mg4dhO}v8AqKnY zIz&gg7BK)k($gGc@Ucj3YZ<|FhU#MQh(^hd$AGA1ud9`P^{?KMw>Z#CFK9W?bR~a* zv~hT$Vus6fII-@GaEHw%Wa?#;^zq#>v47Z|9VbvDcrbM*HrXULmaC22+cL&!#LIVYmvJ8~a>tTnz`w|=NQc0Y5N6OTkZ%TeMo z?wwA7k)H)Jg$A?s>%nl9Z&8$+bannV9=0R7^WSDW%xfV!#XywXuj=UoCRD3<`!-mE zbPULjxcxPPF&u3@SK7VuRX|Iq0>D9_1)sf(zQhlH{KJun+Lel1a#2TI3x;?t4#xOA z8K&0eLsY|NW*0w)LL#@Mc`G=Y9)?_3p0%#$@GSk7NurM z=yNhoq9$vWrjr^gP+aCos zLOa3Vafbee!lx`NT@EI6E?{VglcQjA&1K4=OA94dbQ0x4&Oc*Uz(wPV0n$$OsxiRt z@DEcNhZ+0$@OmS7)7c_W@nTa{w}j_K=!7ri4@C`*1xsY}Y*5k_o8XAtZ_C>$X##qMX9nR8Bsksg^QM^{tB^fBUsimvt*cu{T17bFyjnk>+cSOXf$n-Fw ze}m4_`{gCkdL(376kscnho+&2Ss*CzWEYA!Ou3xh$vfbpY3GuBP<2ZgQ)GszH$F^= zB}0jU1Hs;k=ncV3v~Ijp6ijcL+;LG+{ydt7*dnDFX&}RgqI*Ef>`idPFm9+#0+hkL ztyFlg1KC!o1;buXWxYLVsEW5&XBxL#AjNIHXF*0US>BU!TKx&A|Fw2_L{9N$>`+}` zQ90`uqm+fwu9&vbXM*~Rr-jT#eBh-D=TbD$Qm~nI9oEGFby_xA=tnYQnZquH_q8Lk z!O~z^COdIlqREiHjbDbjh9gdi@x_Atb@L@~Y843@w zCO))>Mmz^84L)pm8f@2*P+RQRUE1oQjE!2A6YUt-&<>ZhIHm-Ca#P6_O~`7f07sU@ zLxQn$xe+FsbotWp)K%ln8iL)OGB02fgDYAuS&U8TN;*~WvGqi&&oo8Qm}@XX!I185 ziSQH+Z6GvTxJen8Rm&2g4G$6~1*2c_2SblC+>+w- zqDXgRb}oscbm{W3NqqLy#34O_&+{vZOI~*KMS?tH=|^qT)MX}6t;dT-FfXDaU;Z*k z?S$Tjs^YCbO^Q1!UJ|mpn}nWSf8jlAKn^3%jT0p)B^ZE5d@mWFvh?9!7?hK@ghU*} zL`Jl#Ah0Sf(Jvthxpn#jX>1)MV#GrHWGOd&1=DqFZmCYRJFLu;+hlA#G-PLGPS9-d z7(E$%tonTx9U{t;nWP=0t+H_P8Eq+~ZpkU%GuehGBPCjd`pkF01bv5|k(@*~soV3w zU)H{6)V_ZHyb=$EQpGWNsH;*q7dLLnK_uBvfcBDfeYfdVnJwvJT1=hMnEBM5y2hio z#zzY71;^NS<2RUyeGwC|Q_fqk4`nu5uX+DIo@DZ!qU3mH?ua9Mvl<%>hNoHo;H6UcFntIP*0pY&c z%Xs=xH)C@t-$NI8sC9JQ?U2~$E^@`@-y^n|9_%tZ+c|pA2%c?3g;Q!TXJ8y7*7V{b zO8T6DSC0qR9(E5zjBppXI6Q{zoN$KAe$l#eFtaFjlN$|3&ybx6 zatsW*QplDlW`u`-5^Sux$nV81%p|L*Q9rx=O1wj1V!_}m*)r_q>x1L;svli#Z z5!&)Rd~xFxSuW|~)2LI?3tglbOC@{J@Qo0<^g9yZgT<88Gqxkaf<>#3U2?Luh!3Y? zNQp%hQ!N(2-u(A8>ES)!RzQWHMm9g6xm2?-_1kfJa~q9Dei-yBkE2E`IYBG(k;}*t zP(8Yb+Yew>s+(Jy&KEjOb1oYphFhwa)3}bh2HU_F8mZx@>}+#Z-}rbWtgT?aUM37W zt85wk;HT^svE>BCjzG$Rvw_*)0=_H{Cs`i)J4gJn^A|EwVf(*QBlWfAv&tA(*u*SL zmEp*zop7ntUI7TZW&NY1#sh@?k%>Au+sXW^dVu^)2B<6W!n)x4o}pOC%2MxV6W?$_ zQv|bbV!8_D=j#RBE!CAcn(M&N~o8n>;s~ zPpv-9wLJ?P8CE?6d>qrrK7tZ-c0pegN5^l9gDaoH9{Y5Rr~dZu61I1Q)GxS#hFDy} zEs{skqlqFe(hz|d@Z_y5Jc^PP?~(mT?- zR3Q}Uy;nhsND+`4k^n&v>Ai<0O{Ej6(z^%*m8u|Jz`@@+=fljL_gwSN%$NU6uIJlR zvh!q@d#!ujYkz<6=FwMKnIa-Pc*5#(tvN7FeX0*04a8z0`gx4U^`R;(!BoBSlHeQCH0dcaCw*6FmEzJIn@~iEN`wg152Bra_GAxS%yZvk&IC zm?rb(txz;VWX`a563}GgfDBotJ@{w$8*-z^$O!G}B(Qo`?IV{LR3kP8_gOk*7HY0F z4yEE|xn}hp1*IIIj3!*WO(AQk5B)a`w9FNS#{Dzws0sE#exAAeE__#Kb0fq9{D4!J zwcHa*Z4-H~7LT}0vP?ifL%&p1QNb)N5VP!o{c4MLS%v>8X_>k8n*?$A0+1p8QZBmk zmjLCU+Y909@wit@S`WTdGSk zMeICpkQp~sOvKF*`?qsig2$26;V@}4C080Ifmi+Ml7DS)qKiyFwjGZaimRs9<3%)` z7-Q08L?XV3p`l;EE(1^gc1RBAr;yEiCYiv)wb{8I;!!KgJ|6$-Judta;-gL(+&3XZ z24Y^?Q}1-oyoX8KCQ{oHj4;I37tI0o3y~Fz>um^WyR3pUmUUWx*@!J z#F9hx>$8zB8XErq=*4$do~2z;H^u9Gx2!>%*re+SM3_a@VxxoZZiT!?n-{H_s7k{U0b_o1YZ=Ud_6vZ8f7pHg7!jKpT-vn6X4YYrVL9cLTHbiJT7+-@T_%cA-Ge3o$u<}lP`(KA zevF%XZ-IZOL$=aQ@3X82t;x0zE1AEhUe(H4WMf!^uKt)6rU5MF5XOTLJk3j)&6bHwzWnzXydIlJbvc-fn;E zI9_>sMepag`}{AgN@$jAwE$Z}8GS@8R(FWyb(a8?FTpP`f@)*go?g0C*vG($@=D8>16WthOlOZCUk zJ|HuI@2l0GoCxcvM$mXKrK;aQqpL)LXvc4*gE}kMHF2E$Vn3MF?V6qbuq;z(tTivv z|CA%pQj_E)+h4?+h>=_=-)*Lr|f2 zAwI(pWAhE^ZDAEV&x|(BFhl(`kzTutKqqEjG!NRrFmQil7Ede3C_zwxF&N?u8XB+R z8X7MgX4b}FWmH#!hi?J61^aTzS?#1$Bo7q4Bpz{OxlqJMB^m{44X-z>zAeu0M(7ad zV_dP1U>SmyF0B34RopMF<8`VUGY^nRep(kZ4Xr@pSTn`1!vL+@@K&*f%3o#)-4kS?iTCaCPz)Z=scKwk&|_Q`6^ho^Zw32Qa6Q0} z0yFjb;z2piX{I@Oeq4ND@-_cw9j9bfyH7Fk)e|)SS}Pq*!l;3nVNPLc$jmydJ$sp` zTGx?6^d%7@%0zP?pO9Ll|B1m`(pCu6bP`{+vvCq%`Qz#OUz|O-xPt!WTEZI?na~+( zvGC|^kSx=e#gh-O725^4v!H{1zqDJIx;tLf)GnD|XF7ba>wLQ(<`jQ>v(Z-2amO(G zV4{52CkrZU-)sb)EPzN{x0bV9k~za8)s2(~kz9|7(bskt!Ssx~X2~v7wg(pnv~9hj ztMh~r^+oTM3|eNoR+L{m@iGntWTao-CR11knO#hj5YsSGtysmAmpF@h-fqW?jKj{{ z!vm#kNCwHr*;e>nyoB|3$Ki?aH8zV>)X>F6GlvTpYe?Az6yY2heiu=g4*UUh<1HB_ zH1mv(OIq7kp3CRwHUxN#Sqdcf3vacT?N$N#{0Fc_->q@KzvsGtSZ9F z�BpsKWyegYI!=cql~VJNDwx5La8(4l>Z;=Ha#OJeKxej9oU@Q`K{VrP6a@tvC=8 zTI@HS_Fp;LJ{Yw?G71j)tRVKkI%~UR@YDDcvDB~#e7Bnl@eI809AT>CeDjS$8KBD2L;*WBteQy>dCE&A(L4cGL~kUKA8QM? zz3<0`8RF~_g~?PKZmf1Nn@=!IuRTpJy!AbzoVEwzEoHpyl4e#NOpBo1|Ez6Q=TZ7u z(J9w7k5FiAMJs@XTKkY{G+}lNcJhs1lUc_EGnet0 z&Qs$~ZoJ&ATvnFY3>0?qtsfC=IkqaJ&Dmr{bNvDAjc~@KcL*^%b29w_Xed<*XpOW? zorA5j)Sp`znXF;f5f*j%OMhN7C@t#`J}ilisQBBa$ZFf z-0JK^KD3?99e0ADSb_^0q1BV65^-soiX&D>W8tny(^U;7^#mOYvh+dm>SjuSOj)1J zTM02u?I%dSVh>Iij#!WxM`~nv$$-sUDrNhFo#pr!3HPYSnJ>dDz3EwXi4IitKSN+~$Se4dai3c6_Y$K0K=7u5PB%axN13hebm!#vYD9=@jHhX$N#0V{ zLyj+E8LP%Ir#osyTrJ7dG=BSLTM*z*RpK|Fgb#E7xu!dHtskwv^*R;qayyOKx}~r# zC<6yJTeWzuRIcc;b6OL2Nv#k97v=C*Q!Dg)&cmcy0ky=CcNpAcA~J0$^E$z3mwEN2 zhaTU*&&<-BY)2R+LpmUh$9lLV4iIkbEi-Ln%e(O{BP)1p%G(vF7g&qDE{D1gWa!cm zA2s3yPE-lq(6F_CtvPzFNy8@rY-=TE)kHha-HhR6C5%(kHXNQfxCBowv@O z%K=gWJCz{cTRv4GLNXJQTvQjy&6ibv+*yV}vl9YrifNZSbiPQD$nyO-)&cek1njE? z=23qxagC7ss=X&se8;cP;jcE*XYfCi?Dw5t z)Mg`7E4yF$ySNG*4}#rV25C*-T%9ChZWIRtT3mRw%~Mif?wI)C6n7W+yutK0Vp_-@ z81c&fRzFlvnnnRs+(gN97}bIAHAy`N?b7L}b)S*?VQb>+IT)|yyk-<)6F(k4wfj4X z_glWPs-*+p#h9;ZeV@d$mU%}Lsv%X5X)8Z(cgTsGB8!vz-h`JA)J`pVSjKs+SXjW! z!7`uO&be(1*f}|cA0xWOgyarh4zxY=xUP!)13+H&53HdEXY$dHY)R<1lB&&-Mn{=Y z595`0bXbQxv;Ug?3Vb*sK0LBq!D6pKl{$hKx_?^|*BFg&t-U^FxJwK__K}Er7?6Cx zk=d1CQd4ix&xqcGr>b7RQ8o?BB6Mu-%{FsYeds;f1oj>!zk1qb+`QLDE?zJGBK3yi z(G-eAhvkl`i?@~Zm|CROOcV*}u|{C|3Qw=!YdS;`Cn#~C3}4-Gl6W7qd28rg${b(o zc*+e^wt$D!pUP|TdZ!tl@7g~M-W#mSRmH+BKyam|XC@mqDhAoMq$IHfF&04u0yJTZ z2(M{yxqAH=ow3UL_Q6QFU1pIMJeT3KC9omHa|aSaHFSt;(l(l^smxn_=guPG98)>` zWKnFysv{L_LKdSITXzgxulJk2t{`utv%9^|DzuPvz({1K5o6sf$A|YuWxKsA&un=H zPbcCYq?zSW-?Vy9i9#snTy*dmSVUJYfsuXj%bi{5Kk(0bxPtqu1B!NuA8kV?pQWpv zrthy4ET7l#*17_a_huz)FX@wIjetIG@PU|RforH+iesF*q`>jd$Xm0D>MR(D{`Ve> z(a6Tanr%zN58)=BQKyC-J=%l8zY%&ZUK@s$w5VPw;5yQpYZsnZu)}dWENPdzEK;OW z#M)YEv@4}X*KlaTk~c!(`mzG(@~PWszxSXC32DN-uN`4XVx2l!Z(d8w@Cg)8YfeqQ zgZyO!xu+h)8JAQ(Bon}qmJbb=)r_j~ges0Q2$@q7o4t^3-*f+}WUY}O2OX2DX>zUo z3VV)yOUZqNC3;k6C1jK~mZgp#ZXdg(>TH$0ayvM;l??GA?ha@-`L@Xzs6)^|FMlpH z?DpaF`U>m2Co}7^D=VzhrB1ft*C8AEoVx2g-r^IaBm!Uo)KE1Xk8d4^Ih=YxvaqFP zvx08)y0qA8t^H*nUB9*^ii^Ux-OzB%eERd7w~%2(Q~$tnhlgaY-)$&DdlMl-!$tMM zHsvJz$}l}}6khX@sM)@YcO<7DQ%GC|KL+CU@mUvK=egZkm(Sn)1ER=WgFPE9npwn_ z9Z?;MGS=xID)fxR!FH)GWcV7PHt}J*C5yfjTve5kg-8<;TDBmUMmUEyqBulCZi89#oQxykr1DwNH8*7?w{alw#;X*cB14QS2Gmi^1^EuMN4 zYO(ItgRVI6wSclos`Rd(&SE}h&PS5BxfO*jCeoX>T_L_I3}ggxu+?0d3`PW) z)d`JwVfl0rsPTEFuST((6Lyxm@m^^w227Z5Nu}}`xoi1&(#WO325WvJ33$cSmWp=J zOHc08$csdHmu1y<+^-S4Gv#^`#g0CbuQcyiS&|+KO3PL{mV3@(+0gfkroP{Q6{q{% z;D8HIE^YKLimXhvSt2}Wr4Ag%d6Ejq zXD_e@(60gUTVxU-cWO{$)}YX<`GZ9tl*U9iLg*Y=7;TBlxc#5Gp5Z%Q@7w-Sna;&z ztAGUj+CK>7E~d>mY^_8TmF*$3Fe#i>MOx;S`mD^JN=iTZu%n{iw#(!tl5##m$|3$s z9m~7HX`MGziT2EVJ$5IwWK zZrQ3>mQ7#?!=#pVsv|vS7rSJyfa3Z{)F~_2*SPBa)p!Mi!%sh#F$(XP#tAfr!Xz(2yGD%(yVOu(gmdh- z03=($qModg3vt8mQI;E^Rxz%5U!BROhngVW1bsEDrR^6GGX5T1Dk_JrBmIfSp`5U8 zCj?P7Fy69_dBs+6UwxWP6ov|DNAQ0(bMunXfBaOnu9{TfUGmgu55>h;!QT7706Jy% zbC#h=z&u$Dbqc?&PH~!0AJBoOp4;r6F6o^Z?o0BmVdD5_!{$c)X6Pb;_4AU2|1*X1 zV(RDcu7Qrvd@Es*6B04v!5L>^7O$$F3@dK5r$wCnG<1t8JmYEILeF6kWXo$cfqwwP zS|lv6^5M5PEdOrErNB!K5sp_+Ieeg(mmXEQ_wwX8U~coMEKEKgx7KF;8TCYgpPx71 z!H>0rgo{W`@wW@>3|GNp0VJcQuSTnJV|m~-4`U3VD_C7=+Pvlag9QANpO{d!U#(yyzU^_!j35_Jo?dc90-x0X@m3z42+>+$~Lb zLbA!H#PPtE>V2ss3L6a4aIM9;aYrGZ$Smw@t9(3Z0KJoaL#NP_OE|E+IS-kjE4-ccb*U{EU2L@rR*d@Kp-7Vn?BBaFEOvpO{868D))XiRjWZnLy}mPjeb z>OGbwL0WJv77lLJU6K%0`{eQ(r~sdPC2F2432}?t<1-VcD#5#RHL<4smK;o0Zy!M3 zrg-}Xamls?T(4;X_tUU`5-n{~k9EQQ(j8`PpNB1nkrCF=u#C`D5Bp*fv4^iX9uwRn zmRFE=F18HvN`ud2=~Lm^ zWg|!Kh-d2Rla}honHmy8mSt(5=ZuX?6QKxQ{Mvpsp!W&p3F(w*&xna`M$E|-#aYAO zKj&1|K(xa^tlxdATWS~lDQA=OMLcymD4BPJ&@5Fkt|Mf;4*Zejv9u@0M735kt%i}! zBE2v30?Pu4MK#Laia2C5=`}cTJU+1p6b%qL``+(E-nRxv9dB!56_euzP}Wn9)(D*T z2h0SttC+D0W{xH*I2V8ZII1Pz^<@ll#UjnHOdsvu9 zpDvhsFIvm`B_6u6=Ds^RU4eum(tfxDCfrUycCf&%Ix*BVRm~V-JOITAfBBNSmvI8& zDq!^d;afvmJ5A^mM9uz;5&K0A)|CNx;QP;>-(YRZ4WyR;dL@~PE@M{;1%aW6KVWNo6?&#x|3)y~bXxd?*)1tkIF+>yk9HP!hSpp6ealIl1 zM*IQz=7)XF*&C)!;`l(yZ!u;+X>ST8oNbnfwW9b#iWIG>%^l_2YReQ#__ z6V0qL7T#;ef$IQh6J6`K_-!6}N~mU$XkL{dM^l_EmN|xv@quK%*s&JarO^^cM}X=I ziVoNhe>sihY|Gq2h86t*$b{h={6zR=TwFEPV{^)r&8-Z@lnMf=U?ko3JvjTFZe%by zOsJ)-XPbo?%C7b9)zmHy#x7A)1hajjnjkbEdoYm5-}dj){)3|JTGo z{`lO6?;c*RWramK+!Sw?a08ywiA@{wBuu`T$V3yW+~g1eKTI{zH-93q$k_8WQpF@b z$H`To9yP{=G8yfm6w!s>bapWf8y575kFZ+4pbaZAa}70UiZ|I{60tke=(P>4Fk1df zK)L6%zO!^6eki7R)ulQvs0oJR@m{`fbXrBz zTjM00?WGsFZdtm|k-n?k)C#2c_ty*_xe}x@Ol^Jo)+_1K}Dh zanah~65sN&r->cI7qj4{L_J&2a_1it*ycvxUwVA1d=~HVFZ;0)z0m2qhi+YuD3|KM zj&{i{@X>mD`%*g6ZVJ+CB~}()?PM9x?q9F6fQ0RbjTZ<>T)vHW0TceM$u)F%g?D?q z8iCKnH;E%7<@rWzgr(wnC7*~sYeiv0bi$yw82HM`uizS)e3|45T3g}m-gFm^; zGniqUztZwQG2`s%)2fx3ZX5TUmbHWAc}d6pG@F-oh6q?%VB-^+D7`gzve@}`p&16O5pisg@T~nvG;dUG z4b&vLMYjunq}gS*?%8DZj<}KMK2{vk`e5#EnZPGs=%nMEggZ*q8+zQ{D}x)1_P0(> zZaPa%{MFNVK2I8vgS{8+|9LIo1ib1c#8i~s%A$R!dPq(<*`cK2$bW>aKih2_o#052 z7Ueweh4INXvX^d-8>Ev`G!4X%Gde#dyNaGwzhoR@&(Qgbaf}c*=PpziBorcYzV$+B z+90Jy318sm*Oqk|zQ_~d`~LYGk75E29<8(cw{2$?II-9;5Z|w`Px`~zj@L5gNBBz} zViifNPrd7}#*6Ym#_wqv+nn(_p@WIv%4OPrFo3ei3@|>fR`C9nC+2DU)tj13|9VEA z_!$&LyDapWk1Kf%LjKrZG(t75!3k#m*&|1aIR zAwYlB8|*GT`g4a@TW+n<$n~J zQw`%fl2zSdo*LkwIZrg|S=}>Bw+v1()r^?i%fDRKZCZ*%nyuzw4a*ZWOf#c3rm}(0 z2`rl0fU;Ln`tgtK^ItNV?Y3Gum?N7{4~v=R9*(1%2KMEZ<6ZA46o&!-XD`7&h99hd zWAy9=f{4v2fYB&K(J0co_b-QOn)~UI74v^^n8qLtAksACp2pwI#z)=b)9Pho-FL_^ z-rQ3EdGB#FYJ_K60F;uIC5}FlmRXkeR2}7Rh0GP0(j8`vaWK-IW5BEe%4CB zSK9=0kGSH5?gx#&AY*X3glW&UVj?9+ri##dEIxw6w)=C_buSM}+AYc)A<`U_wQBy^ zyEEJB4AjF`vyI?;XlSpk%$qf4`%&UXdgrX=Fd>uV@gs5!Rn#d4)-$|{OlzV{i<k?3EG^v~(9N%$(rd& zl(q^r5`4g7(h}si38) z2z9aTg&L8H=MJRDy51vPo@J}(z#67hOe#+FDn&$wml1JKS;X2Yln*4yv1Hp)Fa8gk zi|W%}n4UI{g}M9Im8mC|xxXrbgiKxpG%m!SkXqlbE~}C|8+kjTJPxu>WILf zB__=fZzo44%yUraX$%Gq>Tm&NU>MxFj8vGuq&`03NA)Zl<7WMaT#Ou!x{T`cFM&1H z5|;vsAYT*-1%CcA>u}^>+ciE$*SXlz2m(hGTyn++zC>3fC8bw+sp#(|{v6l$9$R_s z4A$~9^dC6!AYgejI^w{;D0YbbD!xhwkD-}6kWpS)EL=|F6mPb}c9tuv-mF#u(Tlxk zmSiF`XF>yk^fiUZEADqmJy~kKvAEINxh){ugL=i+nprdo;mHT6PatJoRR`>;l>rP9 zPaN7_I{2a&F9S;eQv}#DiROeZW?A7I?K|zuhQQ7)Ly(ZG`?4QYKCyDxb@6Q*D!_;I zliIxmY!g?PtVApx47aauB@M%!$M0N7n-WV~Y* zSOdJ)s+by6sU zItU4!Q^Mni5NSD8=yaPhF6S7>CGqNg;P`Q9{dXQ?GS6~XXG_Nr)VdMme zmzH3z%-E6%D{(aSK2Xif`B0q0NUu^Mog_T|kWYhpa?>-Y4{3Ck0|E?YYiSzw#ylwd zwmx%h8jowW@L15QU$Nui*m6DBSZxqX8o=wBo1kw-U(5aknC6nOrq01#fmvYDeN2P7 zEjo);t2a=5kfu=C=HXP&lndR&(+rC1mK@eo6XuGI`~4~%#6z|>oBV}&Sv|Vc2IHEC>S!GF3*zv+AH|ZVq+s8f)I1ds;yO%n z#fT_+jz1!+oh~B&KH!j%8(J2J5^iIaeIU5 z64CtXF0<$**Xjh0<&=gg_R1C5`~J%e{_W@g6?rX^k2$hl^gGO|wx>8YCVYA(sD#I2 zGOWc%<>SErtF%D-AwB$CT_C0Uwqs|bY4r?Y8S!H|8n$&Q+07|z^Tlr2PLpb5`vW1$_O+M6-;AT~X&MDuBqi6Di_ z{$%rL9JZb|4xlC)->~`}{ryVLZ7~{W&FnqRl>LE{+GtFq=!;!;y^rIz7&mBEE_Ye3 z;Hin$P_mb2|s1#iKHuQy?_zFxg=EsL)Z6UnQ;4n2CgLKC6RDZ&K^Oon)z(uevc0 zn_|LnfI1RWhCV#dc0^EhAJSR7xK~UDZTx&l%QP+Tl;hT zwfjcL{wfJS4~|9umKIp)HH_x5@tY(TqI#p>X}HS70&Idn-ocDME-h&1qX0#Yx}6nPkCEX_1~Nt~v# z;Z0WT$iPKrtnz4dc-!{$o}u!r*u;aq+8o8cL2DFRhS#?tTvPsffl}ryrkl9?g#|v7 z$*a;3s7zK@2AyzEr&8%VMYs5Z*(45_dR}+=b?Xm?@!Feyh%9N0g&0s2 zOmck69J>9qLH0&ZVA4vVkr5<u_s3S2kIjh5<>vz`5s?dHA@;EEL@2O%@vbcv`tFZZPge&4lWaRafQ0 zY@;wXx>J%>qh#(k1GC@a!9@pR+E^*V(A1(A*pYf4KU7>)5fir7w?SGHA_8-=Tdg&+ zExyV!0p>3zA#1$x9!t3v{Kr)0R(+pBrOXU^Q{P>wZuJQ=6LZ45xb&CkgH1|Bt0t8=HNN~5_)JGSy-;gJ zxF0<_63@5JrFgY{5pnyb*>`Y+RS?~`{RHlrzdAloCriT})=EB7v~fvviH?AT{>~P# ztXio=3NhN2m{VRHjjXL0ec_LIkoK*?c+1yx31n*`7i>ESf*Pr(hz)%KesM7n>=o}1 z*{I{b+ZYCsvXTJ7*N@D^4&h)o3O^I3oPv#!2AHYqo;f2|6HLa4)aA-UF3CIC^#h-{ z2T~6+>rO3nNj|A@`0aj3$8V99hQ__4Enh#^%;^1M)(vJXYp^b)TEfaKrzv^%D&lnP z>QUBadE>ObX6r_)m8^F&>Q3##($!fUJC4;nw6=Nw2z%fYxOuV8u|1zVnFu)qN>bCR z@viQ@YMGodlBcA)D|_>aCK@Gm`+Z|5zDt}59%B|Y3x-HR652nF85_Q?Y*lP2=KPRuZZF1#expw9BdJutx7yO)8)7{$TbjgRZ7R zq_kbqoMG~0rp0X&M~n~F0`;8|^YNfSL3|w!586>rQwdK75qYd1v!!PP^<^m!6i2xP zJBB+5?-H1&^fj9&r))e;DxlbjoCpYan)4GXb$O6HLW=3mdT{1hZ61HCb9F!Q@pHa% zy{>BE=_;@)jA3u?fu~-6u=$*M7#{ap?!J41b?2!o&5v=;d>#E9kiKbG4!N0=aUML{pXa13=}-?cGlM{T zIlLd9Wlhx92YPo5b9C&TW| zzgolihEb3Ce)f7(>SLA~AIrHCw4)GuG=-G4H&A7))1%#XBGuzCt7naf#sxDf-uupX zp)27Qn#I+4!ZyCAP^k=RiM~V10OzZkslcmPwnvK@Nq+~1Gu%Av`%W*8n6opfIh z9%_c}SQcAZ7Jo3qbtMssvuI+aIW*t+w0VAX{c-ifdbiZfxz;sVcltraWCc0i5_fa> zWu4^f^4ThoCbOTwAPZ$@vpVCQmTmW%w~S}Ab}Hw)c_EuD&j$}iT*=w*M|tRhgNFWw zJ2^uF>gw6BYl$qRi?D<5E%TjHAM%0-Tx6+-uk(&u{O19#LgXlw2{d`#(wJ6wLioUA zar7`s$5hv6D4;voKno@&k)cm>HtoKb#4A_J@2Z{*z6Xr94met5*>pqoxR&7u6l&TPTuxJRv{tqBMVj>p7Yrcg=K zc*+_FORf`*>c-i2en=T(@N)y()8})}_bGbcDOAb-(&!7dpaCJJlUn~C}d=# zvejvtjPQnYS~20Vwo!|iSgdv0&&ZdJlIrDu0NMIAp3daB;XZBtzn$3DZU5)xQQvc~VuLRw6-ftm~wx8?!t;HzI_Tr0oxL+btXU^!D+6;NxZnezCX9?79&R*3) z4VOe>(U<-R)TH&kG$9EBO&(M+P;sGxQbkDqO}TYl-?73+-sHnr7s~l+S62-rufsB~ zptyatI63eIM%L}Q?AcxVYYalf$YIhR#)6lcMQ+;kb)8~lSn^YykqS4-n`NG5FrtrNTR>s1L?K4FPeKx6uqB3v+xY_h^KGT=W}Gqjkf%a{--W^h zp-gJ|n}=6BOePH0)KTuEr%dfHhoJ_C%P+C? zmQMT>!_%1q%SX75;WO1|{Gh;CkR?(YiycQGz?LYV`7N0TSd4Qv({@#?QOs+<@E!_K zQ5F{FsVA9Kr*2ke_2yNfv5j`q^qI5p#$!<>y*|5}b+Yd-nr9>470~j|kr3t@?Uxb9 zvg)8{S~s)PqRlBw54KDQULF z7he|!?rOG;B_h`H2}u({#56@SI5D_>-2b2cy zS(Mvwhq}g7nR8A;hL6^M<(H3>OnYEWgeLEFGzxEKI+E2EXP=6;?>?ZuNxpt;Em{X@ zb(CRZIvSlWu0?bfd8aki61;GUxPBulZrPB*KvLKsJ<*s}F$mRk-K;mO8dt-Ol`SuE zbw`k(O2oGJbpE3{J5D4iPoNVW)1=z%3&rBKL1m==mt5-A#!7YqU9%FylxEiSw%eg} zI*>@}iR~0=NAT`A|N1L61;lGH?cA!TVl34|C9*)k7yTW*d#lL0iVAMn{4ht-+I{^9 zU%}lNv@t2x8Uanyz!BuPfHXVAjb(j6`$%_-WLJE!!F(8#|tnc=lx{-Gt+(YNI=8k zyJF6Km{GKj2f&`zA24!iUc7yZt5B|*nmB#qJ{9>YGZ@B_UM>=;wi9-lvYL7{-K^fy ztns{>aGdTjA<9{ff3=~%Xz<6@WkE;Ohftr2!}JU0F!mM0HwG*uO?s}UzpT8Z^{Y&@ zQ>8weCChLIyC#bN0SL`q80zW|T9$}^YEV`P)PFuLM(9;FwIvHrTCsa+n{wv_=5%ri zozM)d3!w@$_LU|dMc3g|TdFo8Ni)KA-8Pm9Lw{#-m9f&kZz>kB$+cOYL1nGpA}TXi zQnx~P^U^t-J$Q2Y@09Wj)CR#8CgVvo7Cc&j_N}c(+0ij8?e56DuM}Tf0uOWiw!KcA z7C3uHf)7<7gE=LhGi8;}!YH!E5J%$`UxFFrLn3U_dGvqVRkbbbylsp654Ic&N$=j(KgMN_H?FJNQ1qFR;ZN+lj?NkIyIkwND;Y3KI4Q% z%^4E_)&s_e5C=7n{sDl0+ef$VG5Oo{jWDZIVPHk>&Mvqe%wK*}IE?=MIQHnR)xL4* zl){~KWAw`)vtVs0b}6lWIBkSo*R{X|!5;w6w~qHK&$AX7E+fNj0c9208L{Ib9LR5o z5Hl|WCw^*LysWsm8g8YZx5DCchWE5d9oPAgmfmoNDRcuPtQy4;%kbY70Ny-Zl)JMu z`PaF%KLCfn^5fevIuEAqv=oTU4xA&6*9*tk)@aDWiP6rnCpKzdsqx8!(kz+pQBl7s z3mm4dVriZa#p@{j9=4TxE_XC@v;ZxDc0aie-m2JYU{zub-MQEsHvIqSNhB?9)DQON zJ1Z?gDgZVX4mKVh02>Dj@b`m-4ZxwI#>Kny(GpXkyvHG;Od}3dHFEsNI|~~Nix7bA z$iww-9>A$^wTh*iauRd>mf%Ro??20~1FcOucM1H$So}4`3 zI%4U&D2gVR{z>pjK7J=!bvt3=8e!9y+?_JzTku;cEM?}?Mdnpd*~Fb(=;Pl@mdDaHP)Bo2VbiSo)y%7^sR5zn`kp6!I#ireN& zYTQZ+F3}Z^_I+LTIse<_#BMFI<*|TetSbWlE^Lp*M_%#51a<@ew8}aIrZCU(IO*=x zJIV^GM`l{C6_1G}p1juA75G{ZxZP?tQ^#YqTwXr+rYdsizG3Y7`^$h{cT zGSv2%_0bdlB>Ak%^@aPajP4h!>KB^;O9pxl6!4hg?z%sKb?zf1G#@roxs0?a^t=q2 zz@Mu0&+2J4BN#B!mx2V6P%Ck!%wXOz?QIFMDsomBw}QKr=Z+6@$x4hi1Y;Y&@=iWE4gqrgAz~6keHh76$xg|qCRu%kHZ5H z$2x$K&hLMEkRFVPAj`hpKvE_Ipx8$UrpfTK6>47-RvwY3JNoaNVT7}Z@2%g1-Ka_u zhyEb!V!`J+yek?W&Q2w)3}Q2j-H@5xSOlCCax|Lg*M+uig+CosI~q_0e4!tD?4$T@ zM`pgfz}1{gfR9|Yh?mZJQ~2AD|KaY4Hu2011+4%5y$o289=b1NFVnjRcj&KR1s6Ox zV)r=z-DBskUEbd@j*W|hkAshghxK=qV^MKpivp-sjJX_Q!~)<&s9qdp1f__HWART_ zqrj<+dmOP%efCHHIpm3y0JnNaMAbBK1!D;SBYMenw7!brA|dw;C$2K1hnu7XEc6wK zjO|f_2iz2a*%sI5WTVuh9Kpd!B<{>>yh6}ze4QcCR+w6Mj0qPTC)EI#1!vaWI#X~& z99^_{xW4|5p!S5tbYPcMkz-ZM(-v#0Eq!VtVc5@2jwc6d&wP{m1314F-kR5X>^N|N zceAx(Z5xR^&hyk5{HXuKPLrR8rUwKYif2{8d2qkqScWj_{qm34+B*yGn(qe;_0 z4gKWhd>xrI8b8vZDo-<;nPb%Ui|;w3%fMzvT(F!MCZu@kTzw)@l#eW{=S*A+sl>bocukKz_nLcYkfLA&K5ZIHc`#T10m-5e#W;>Ow7K#HUmBm+;Bss z^#=9epN$zUCqQRVLxN5qZ%IF=to@GgD)%`*ci#}J$EMF$scJ!t)!}Z63k}t41fyDPp z1iRyeKg-fm8MrAB|M4Z#4=W=wCeol>Bp5TkrwY>;l1KH0PsFaB0;r-o{&{|I#7p3292Ny7MhT z`edV-MY`a8f!x?*9r!rcT9qzOIWn88r7y{bYoTpD$Vg9vD;F3$5EOL6deuk*_XpD7 z?ZNa(OaJ!k@{bhJ*BukB=2pve5BRrv9U87eye0bf&4P@0B@J7Shaf%WhohkAfXkde z07U8iodPcFt)DZeno)t&;dagQJj*$i64~A{8GA?JwllB?kMUw z68Fjap-=sVK-urT_t2>r*&O!F1ueqE5{1=x*+RdA-ycQ~6`h0IxSlo5M(y*n4(t!$ zy8h;9ojYt9DtyvmJ<7q#AV9IYV)N51=lqBHx4ZseuGeLZ%y80}uzU$3mb=!CH_-<{ zDVZ{~X{iBJb^0m{`$vka+uyV59|05XV~j`BRBrE&SR;uD4T`{cI^0iXF7?yjUf$~a zNZ+!hw1#rM!Y+U+w!aAEFP9)rI8yB`Mvrn{;`x?6NcG zH{Z&o|DQdv7^W~MUU$*PB*=pMz;o4br!svOd3LMu&p1yoR2FZb=3~{-Rn99{k|tu6 zSJ@-a^-F1>9=CG|b$KT`v*Q~j5!fkr7Q|joQG%002GHSyE2Ik_Hef})4gB4*_k$8- zs-fb7V>6hX!mt+`$aKzU+~;yFWk=Z}$Xt-@!HKXaWvpq=g_ZCl^+c$!XZF}2pLXB( za>RV51)n1}*T(RwOJ3nO7$YBJNS{IfnQ|Ew0h8U@g~8nXI7dpA@U4fkW_(jFR)Ipc+k)M(p!zWeF)&t$~O&qV0)hnd9=gs1gPbxV4D;qVwHgqg& zOY_Q>xo5)+zqxm%A!)_SkI(!U$ z{r@{3g1RAyOB2;;2QVkG0IiI+X%ZRn&wqY4|72?Z&3or4Rw_MOf7U5(iBIe&#A)?u z&j#fs8Nl@|0kA)s1EPXsm{m#Z^>5Vze9}j!6#Foqb(smW?jxTnt}d5wt?{h<0JQ!9 zFer*7_X)sH8FGTLe#sDq3IQ-*03E9kVL46hD`poheiD+C#~Osuujd76jz7kM)>wo7 zO458L>RhjFv3RLBQCzL$cGj$6B5TrtME=+h0PD^Mn#P!vtDIVK?y~%-ZX9HUGPS+( zqERNVb{)g!gXOieA>VsFXDw{_(5=57n;DX2`U4YBk5VE#p z7K8V18>M++qp=o4B9gIAk#z5Gfo$t{lTxyVq_`)cSc`&rM`(8dcW}2~gC)T{p^M?5 z8@p(YuJRUc9{(6(r`}&heOt-pTa#HCs8JXBCHvh4%P*+a^RBYHA5Kyxmnp!VHbyIm z?_Q>Ok;@l|2HcSY?J;%W2Tlrv8UlJv|)hZ=hkWG9*kD0w3We`r9X`fxf?i z9M4xATfpyb8q==^Wfu=K9E+VvmJ@k1v<-D^lS#>)54SRwFO+38}oH6ZC_!9rb`qDGD(&gXt5$1z*)4e)9xa;5n4 zE2+%z5?HCfw^c=nMVfwvd!bnT+TLsHom5GmS*lSc8jXS3l=x&&_0+kiOhseksFBIU zG6XU_2kDHUQUXjq$1|3US4rvH6a{G&Wnx zEq}||4^Krx#_eTHag#0>Wdi55bxEFnqb1LDP7L7(K$&Y#OQD=O17K$S%`%oV9{1GY zl+m&)Ctbmb+0dqka6L;w@XlsRw7$FsN;YyibIfkaY4LyyVNDs}Xg0t9-FrS%n&`?sb6QIt14Gd&nUjw$YBzI;(`^Kx8%sfj9IzGN?<;5T3niJn*Yy-`y)fuij%gg! z5B}a@xdDzT-I@B`%IzZHz3L8N}c!6J@HC3tR;%_`AT*cPHGT%Dsllt#Q z7hbl68Hvm~TGcIrKcs$CG?4cYeg-iTkP4CulpZ~`H7Z{{_$b5U=!`F3g9v+BK846z z1jxlWBJyAG{HDp*))j+K?#xy$mrYVdqn}>6Y#3Isshv}nn(Q%vz14p0gqgTWe~`}b zmY~DJ1{2D1R6&D>W@mYnkQ@)z^dvL|9I7}!xLp!rFm%X2>*Hj@K%jgq7_O%KS|G90 z%%CLyO|ims-!pIRMAXUQGSk-zo6NsArNS`G<(INTUF%Bkhk|=*RS~fp^hfrrRA_Kz z&2(J~;4koWpXZ_HJ1}4q0%L#|^rGQd#oMjppvFd?qdEB8mwC=SEz> z0q49%6jAtd9Dr)pUOaRU7k2PXF?vy#CJ;(2?>pC;b=v&?U+JajhoD$Nx%wVfaYwrO zUTLbg!x(vO+`FuwrvTCv?BTsYP4H}ej2xV(UdbNW4~n3m?Ih=EGj7h$1s1O(#hKfU zN1kx1EX8z~X({Z%6B>;%@HJdr5YgNE0T%TAV8qC%nlkDNW@RUtMxq2 zu2a#rZit5+7pMDoD&5H#V3)=KV}6*+&lDFsOA9;{&9?e$>Bi?OFuNLg+kPWvhUAje zerGe>5-Y-vTa77VCi9D?oFs6<`96aL1(A@E6u+&tYB?RQ071QECYK@)(sO};mU+o5 z86kKBYLONGUO@J$fc{y&W9+-l%vl_y=m)YZeOzW@o6XP6}+AbOtz@-p*5vMz#%u&mrjGUfo@5nfhAjk)5Ew z?_HPL^jDJmJfC3ZRNGkM1Y`>x@#TLVQOoytm#x|@hJha%6)U5t*+~MaLjyX_ulm(X zEA9!obv}MzT7^V41K<-UE^AT|M|MOAH>CCrQtQl01^LnbB#?azTkz%(*A$)HQ_tVY zE;5+k{Pd>&Xjobfg>snIM-J#HTNxRVkWdrJmYP^Yb}!W!$R#4sdM;-L3!gm5?rE>% zWmMvOU2!HHoYoXC)Sk_LUC8h#Y@_)R>Q<}DLB=BCpL-_1tQ3b3;w7@bT@1@(E^qcP z|D!fss`qskT|Q9YCWSiWwWpjxCoTjBXCFUy9+DB@idoSu+^NczxNXS|=kw-xAnfyQ zZIjp+r7Za}!uED|_xrBTFN4(bwt~I6`$QeZ6YoCj^l-G5sH*gCuWH(wSV@j*<-rS% zQh`Q8SLI!Ip1Zb6+7?j1m3XML_O4yO$gs literal 0 HcmV?d00001 diff --git a/vendor/brandonwamboldt/utilphp/docs/images/background.png b/vendor/brandonwamboldt/utilphp/docs/images/background.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6fddd7dfd3e43f9a6ff7fa5c4aa3eb2ca6275d GIT binary patch literal 1028 zcmV+f1pE7mP)=BiM0000RP)t-s{QUg+ z`T6(v_w)1f_V)Jl^z{1r`uqF)`1tr!(jr*^00X2+L_t(|UUihqaw0bvg^$!yOG^PZ zu#}B~Sqd5qOM$s~*}yQclxc3u#^B4cxfvcil}e>1PAYHk|L1()!BbJN?xQiJoQ51- zya5{RZpoV{Jc-o00It(U_N_^0I_O5CLZ?9LqE(=?A#vq{viX!%NDTvnIg06Yipp(Q z9~32tXNEl+P0)CLMs@kzRn=pK#-5){cTFLnS(+jPLG=D@wtJO$zF2B5!kfln7(szQ z%>8=o?M?~VM!t=tPm>M{SAYv{$LCiuQnMdHp_mUEH4VE`oMTE0m332Qwz?hO*n|^_ zVuhSu`;Zjym?f~ZU-XuPGe#9ip4#BhOYJhOq`h2h*iUl6YP%PLm=ISm*J;p|h{?^K zUq)W~S1`P`Y7&zmMZsN_4HjXF&XA7u))sNCB9wW52-2Ip}}qHO~v-(#^GDO{NA+^R(G7o0J;EJDls}| zwtfN(d#bz_RPHxGW#G>?D?GiqJ{MN4a9wp@s-XkFZxUgjpjr$mm(F9-^emy2(-pq(NXG8@t$ zpY3MC%v)m)-F^&~MW|lIr zY8ZD$k%#m~11>|Vo_2(62x}UV=cn^Up!>sw`DT(86AK)lD zp=(}mImIZZ;@Qxp8c^o@c;DyWojTW@*H*}{uzB6gyh9ZlN#uR8R-t+bam;VW5ltqZ zdl^j|fZiQZdf`f2w<26mchkRW#-T4cilW9;QdPUPi>S|hoJ0@d4qtqWftslW8M_C@ zGWj~6s5ktH$r7_ke|nY?cIf$wMQhOu2k`w^4f&;;=u+AB-L<2#{t3c+g4M77iOeTs zb`3L)cN?c=?pL|56UZ!~3F}Nh&8H2?_2DJgGVK{E9|$psvYUr;hkfp_apsX`V=Zqt z9_)ltbK<}cA?+#iTQsb|aJeTR+2wisZ2|E2k=nn%nB^?!b_u&LR$9P6#TazpxQ8Z* zhNn9i?W~h_7h!MKw-nMg1hB7B{434h(m>!`b!7Hm?11|oOFkA!u1?q;Yx~3ZvYk;= y0lYHE&Kyrv=(Wvu-@@lJ2|nh6;B)^!Tk!{xJN({xtRmq60000puJ$k+EiB%uM-IeF@2 zS7*)DRneK*)w^eY|CgWq?&>pde{9mFNQ@#y;;+2@SI7IZ$O6tGBhQn6yESkMt(=Up+nvH$-oikB3=b5)^R;Y#_lgh#--F^1mYYHW>zxCcV(G^9$v%h5q zdhWfwq(a3jRLoD`zivi!HCM|V$Rc^ImS%Hn?Dq4-ZHvH zxkWBlM2QkJPdp9LC6zQ!d(F6K#F$ri(R+99sv&304aQD<)RyD)ynThRk-V}Z^V=*d_3lE)b0;vzjK_TB-`gGNEfKPt2E9ng~^7nOwnZO4PGAdzEszOP+L^5sBg{ z)VM?;g^JhS$-XN_mrAA3GGwJ~7_j1s0RoI^Br}1z?Z};d6}V^yS%cEhJ#?tt7pW!lZ|G?D~!1ZaNi4i z2y*p9ay}F;LJYGmsU~?%;JF_&@s4D|R#zCJz&+X4N^W^1H}QSX?S=w#(N1AXnNQ7J zGbtS+ld1;8Q5~LZb-^IQf*MrMeS+A=yV+)wo#(_x#Ist~E70s)F3FZu)q576^Mw78 z?rL;9>X~a`)rx#f)r3-BnCd0DcCM;M^-OgpgJLFUJ7N>iSaNp~?9f5fuV554o+!Tf zxt*BUBN5(u;edD>AZ-mlln+U^t5gnEfBJN5U87s_vVikcdu*w%>S4>sYTX1_?8Ky+ z3)zuzq2V=5*{+&owLsLwCBB~UdP+;}VVbj|^h|SMrB;ddlBh$yiNaKv6Q0&l&m(hy zO>Qn66ldh&Fn3>v)WI9J&f+X23egJFR0VJvBy<01d*HR6m%^TlJE|eI-yPRpJ(WJ;H?6v4Nh=)MLon zm^dEF$yRGfYF_Jknajo8)wr9x{!|gocZR9(&h}DI(r#%TdaK@6-xfHSni4v*9{IV^ zWVujoB?#31>f#chOiY=$XTJPoL9-JIrcAAQ_5)#!1<7m9AW-va>N)17Fo%zP=q2`! zjIRzsxM6V*N^2si+gv0aNzEBSdJMjXZ^uGU)Kp8F3MG}10^CzDux4RGw$e$?xmzH2 zZb((zn#vBBLU<{JABsY_mkEb0U{n!nqW4-X8VOdAlt4y;S4?Gy@hxMN0uyLfZ1*7{ zMj}9oBNO^mp@J;VJPXZ&Ksgnf0kUK~sjM7Ak|t;V8E-%XyhF(Z3PeN0U1?}?dPCBU zNo-pB#1~n9y(6u6q=)d1l-bTI(HyE#G`$o`3y}Ft_*gPf>Vzf~W)UXgjF}ZC6Ph#C zLfHiJ*)4C9^bB5Sd zgjNRI5EdwJx;BNNU;xdCQU~Ms=}iJeVDHCICH+_MebFs&1^^}9YaD}ChP%q-XCK@E zwK!Wbgjs$qWHNAxUnHV3bxNt~P~}2qDCr>bM(F!xsyLzN*Z5 zfE%!5sl))9j2+|K3x!8>ZRcw{U;Yx0R2R6buA#cq6jydK!kj}>l~mQD{kb_Ymi5k2 z^0j$XQ=J?iw;a40*UD;U2-S8zpSNjLb_mTSW}2(3{<)kL%^^>xuo|O$?2jybjMSX^ z@EK3S$xK*Wn%;y96EQPbbHYqF=UP}(!4M5u>d>1pVR^2Ua|{kBUn4pCRjm?^#?%1z%lfNT&EejmV%@$ z=hlP;6JeJlf+SET^m7N!q5G(dV?MS{Y<2?H44>)>a^qw z!BBt1O6^2%Y&j|C9GI%OsV}f3kyN$N$!uNT$|CC9nk^GVf;=iyZ7IhTh;~)|YfrEJ z(S$G%_Q)3%gvgY4a3`kS9A#?ag1feaM!oQm@EURs`|&}ndLJQZ{m9~ zKZy|qvN>sf^1yM~=BMfWk>;o6ySB_vOJDVf^i{j5)tDQ=?EQM>t*wR2*#?rksq0jm z1q7c^Acz+Q-&Z%J3rzs$m()=)cRgTYYbVmgM>-t1f@Y#Va!wBwWJJONB5PAp`2nS_ z1zciEC}aN^QKA!zfnzM=RG=R*iGD0*dBBskK4fbFtVkk0kJ>ubCLMzc(9n%ren>_$ zmS+Y|lT)p~W_)OnFV{y5>m!B*1Rn_y+^y3E*69L2p3?;w+{QhfGxeXJOJwEg7HnSF zAaX^^JazURN&;tvpD)-28kA`7%wodoSH`r;onLuIo z-W(3HDldq#g-x#sO1#{x=*E@|eG6@!qc#W8Gz-o7Hi>p6#@a1w$nxG@-n-xTC79&n zi$UJ_`-5t#^7|` z^Q{G{+GNbsc1)m05%61v)xxLX#I1iCOoK7WORH2LF`ew?((%sbPbV7)RRoP9vXJ$( z;8g!}IeV|(2`Ig?D%COk)^80;4Y<`&*~6(WsxgJ847ttr&U2QglR-^9?$$W+rp^y~ zD6Wpb%O4S>A<2}-(dx4PJb*0;9}(hldc{d){@w`Q&M5fm5?U#8P??~cQH*U#wizj* z$X+j!wDHKv!>c#FWXdunvM^aGAH|qgh9)a!%&SWIhlKj#i4rZ4dK&t{Ib`zuVjLxn zeW-K1%yWz$2l?2m$wSOvCQ`LCr?g}4%$DU-xO@uN$0he`P7w$>Zcb^p-}!}=b0O=r z_T`hde23R_{^Nem>&F5Rum;~33=qDRKRD#mYYv~C-ze2bJ^7_{-E|D7w%`O~>|$pW zBrz%pF;nD}>;S18a`^D32nQMv2DT)F5+W&4R6xXKiFYY3&ZK-U={xMU zQ{nur0r15FSmn42a7+X_KO!^l56wJ}|67}36(PpF(zr8i#P73O-V*D-2kXBF_xj%hpv>|A z9_&t@b)#G!@>w^~apRXSm+@;EzkX2T7w5gQMddaCj)5Elj=4fO&cJni8HR9BMFy1v zSOs0jRj9F&%#Y-CS-zhz`Nv8iZ+VrL z#v1;(Qd|j_QhX`JpK_(RK*&ks*Y2cNL%A%i#?op$%?BaSIlvT$U>9K>^UPlRTjXD? z=V|&d7(T?X^#WpQujR9&JTK14>oaM|7=M656sCp9+7VqU6ezKhMvVPt%;;{yAV3DZ z0gcg&QI3T%9$8ysh~rXlzHz*&3fYoHGgEcsYD0CBjfi7~=^rpn!jW|G$&O_NeTnfX zez*+)y{mz93}ZbvyjUNWR%2;3ezbpcuNHbJMK>C=^My^EpAFMl^St1jtj22|*>dQmsEZtUo#AWdmFu)KJ)9k}%4# zcLiT%i_$6Bluo<(BkM#kHurEsKauIAVl?B=q%i~GT5B1+bg?v*EfW|B*m3Uiat#RLkh{p_Eh8Z}!RQLS;+msL+P63CO>{+iH#;(qGcGL`mbg-n z5jrLbCCyae@iS45pGiZcm$6|odp ze{xuVa(Ezrau5hP`6q|nNhG0M7Lr&<;;H&4ltcb9I26d)`Bxpp+3*J=((Xld8<9WIIQ&fJ^BiGOKJ| zKC#u78rITGRu9+E6n5!V?;)O`T8G+=IdD}JC*V0W<&T&15WGG|pOBdR8Yt0B92|G} z;Sp!bap)Wh7`}P-C59y922cxzBon{_MB?PSl;j<-a!cg=$&HVXoT0@WkMhR19AlJY z=!4Hq>4DN3B?5=><+dA0L++f~m!_ruULE3h+=@q`RVo?A<(W8k8J`%_v>u{(bE>Tq zPCa>^loM2)XQpLcI->r`Et7PAQmwIt$Z0~M+p?W;Szw^Xf=I$7#tSG@ojGUV z?xaVOa#vZF%YmS5y-|6(2?bn)c>mr_ZNPE#g|QB7kC_j%Oh&8AqrzU zEzh=fy74;Q_2M9Uxz25Hl?}VJok>3fubnW(wXP>`x{fl2*|H9$_UEbJ-FJ1dw zmm&#^e5qR&*5ymSrO+`>a>I9Ti*bgE6e)(xbxFJ!#K^}5nKxO|@f1o{)YC;1>H0WH zRf8B^QZeo-AL`&3M~d7o^3Ra86htriQXx50f8V9|L}ZSDix%(XSx;(69U_LJ$?dk8 z7&Usse2-TaO>>Z;#LR~tCPQMx)I_31mSn^kI9lzrSrb}e;g>)8N|y?iN}jeJufnFW>xXPoI3LyZcK;in)1yc_;GK&%Sx}Q`6TDB>?lP9*-#z2tWaRfNe&-u%)zIMpFuks>8OL`p`NR7MOnKW~of?>16%NIjq! z^`!g9V(KpQ4$lR?RyVq1>1_>!7?W~fXw0YxWzMJ?mTg~MV=Lo zhltrvq;nZ&FG~R{gYKGg_T~bT50}LppKAq=FteA1h;_SG7*|F#S5$J~xyy&H)@MgT zEE*280)#x9j)8Y^T(S(Z?y*2+2<6^^FpLF=q;DbC4LX^P!y$ucqI$8&#Abm&h%roD zI#1G4L~cOY?TmHq9pqNUA;~mj8O%B$PtQo+`5@_{lVRCs2dB1#Om$*B=Z`4E1VTQN8d{lAKf&X`dC5)fh4cENiIZ zQ1FN^V)j1f{vz6DmcPg){YA94|8V{y$ei#O**;f=RFA{CDnc!_AGrg!&Q$@*96wiO zS766{nW-kKATMn>@Q7v0%ltVzCAYd9?5Uk|SVQHs#3aqHsHS3yFb5k1LkyAgg90*i zT7At+K`ffwtalp;eJgzF~~AQ;?bI1$*k z#r(g42uxEGEcatpl{!KK$y$->b&j<4fRxF=)X&1U;hR@43)gyB>zl**g?Slwreucs z2}pV8)JGdIg$s$vyHheVnQ-bj{zIPrbPTYs@|-3W`hUxlhL|lUs@m_iGO^h71SmHK zvYp@gGaSb~8OVQTIPHuH`x1;=Co(-)5`<7XRLFIgwV4y$fT+d~0GL~jDbH@2)AtD0 z%YJ{HA8$$C^W&|)da538(Y-z1p6(C#@m6F*84~)7BngP}fzOlg^OOLnb0X|GzE=MlTr z=|khMy<~5qdmS<~{O*cRxY42|*5rTMU{+8po>iVLpkBv=efdbc4hyd1=F%%->*LS@ z4fTFp?^-9n@TjLun*a5M$H^}|uuiNmJTCc#2e2>uNALMtUw9bGoczLLcjPUfT!@EB zCFEoNmXFNCf6K3OHCpqBh%=M2`%JIELad0@5ERYNA4rvO5Li%)>HMJ#k%UKRPO!{s z))@`f)Q%>gtTE+o`Nz>?1#Zmei6E`}eaqE83?)V-g^6151+L@o@Z_#f?Zs(o^UpdLbh``l(2JKZy^DHh$PyA3q~p^RBQ$^a4|$M5V4GSBMFg!i%GXc zmK0elgFMM4DaN?R!ikgWt86ovpFlP=#5r)3FmQ+d;kQj#+$4-|wV+J>1p?GqF?Gmt zD$nkYa{aI(C=V0DNqnwI0Ohr-6Y}#Ye$CC{!tOfz$`~o)V8m}J z)v*_T+*H;m4KY?ltVmdz%!ruqOq-gSp_{p1ZOVf^FN57>otJS*ZHm^bbza6L&&x>X z0Z91f$axuM8k*Bgv^(kF3Y3}7Wv2n%u* z(A>*9IYGw%*gMx=$*!Xe_fG&mfFMW_AS94L0wKN_Pmpaq!cxplBqHR(MFHd> zlPCd0usvrkK6A!%^Ds!^@AA%hx*wOS)V+^prq5-jrP9*cwO6mxd+mLCy}RnIDlAwo zQ6t}}Z@-cQ6)k60RXNFevN%ynk>M5GR!2jv+S5Erh(XsNn?~c%R1@Wwl-12y;7Bw^ zCJS+5X-J3kca6!b0D3fRNOO_k0=y7{02efE275C`_{H_go}o1o8>UeN6Hc6QqDGx`)i#46EgkJ=HA1^(1QyU(W=nKCg9&(e zJT%Dvv;yU2Zrv@`!6@n#LIt6qpQmBIs>r zrB7sAv8}Xd2zk?kDPv}22f0KkN#rzK`IIF4FCp&l)uDv=S&D734>r&P$9zYzt$>il zVp}WMV)B0lL=9N@rLiz}Dre zR>n-ysoAd{3YerCU36zKhV53*(b}(6Fb&KYHfe)*h_430#L}R-g`K_z0nyi4Bh5wY z%NlBY6bNz>$=TqKv_O_1l65OU(FwJ|F;S-PuxPZnaEQ=%@_eP~u@X@MiNrKD<1j!C zO}tJO(6Dq~tjncsCcGjBm}3x>BV7p)si#SUP38ZhucWBS|E21M3@QZu7XEMamxceU z75R|i{fr)~?8Ju*?`QE?u@AOq809vP6(D3W!~1GS7`C)uKiME5#N$I4_EH$OPLq3w zFziKwwvloBCTP2=4WtTXkWCo&QBJ8e7FQmq)d`eIv!GMUS(mM}$VQ)F971x~lHH!c zADdX^<7Aerk<3zP!8ba6GKRLq79nffNyQ&@XaiFOBAfKS&jf&y&KsYcFbqHw4a1^G z84WXtdq72}c;zI0P?RR()%U#jl6$3&ahpLJ?{qEI z3d!tbHKe6wx|<1R+%;=`rL>i)>YiG0iQ6+fy@Zma%?+h@QcSRI$ktN<)Xzfxgn z#SI{mh?W)LNKgpbNM7aWt8*#t2W|B#ahFX=Ewsa7b` z>PVf&5))?}xq0MP>w$t*9Zf4Osf&AuO#pgjX4YnD%RzlwP=1M;!FA2p&D(g9= zP`mmRlkCL%rkKnhLp0kcCd{@#F+oO%lanL28HenIReuod@{Bchi>XM}d+(fb@;5|aZw$V2A0MUw-; z*q0$DJcpM&CLCYVTw8;&XG}O&nZ=m!)nehX%(AWU7+~s9cxD4tg~!gw^2=K7 zmF4H6Io=R!liis`CWnY2wdr{1SzqGowigX8O3;i%jkGvKB6yS{gle~h{T0MS11AO= zZ0Z>qz3kp^@;YV+f*}=N1m{iw1btzO;D%EhcyTuZ5Xl(ijZg0(jsy=OQRY-M70@tA z1U>Mmx}R(%<+S)FzpYBHngxlbR_A6(Glojqraz8VCM%4;six86ju6>ICsHeYdKjsZ z_UVXOD-V|$QRjYwNB*jZ*=j92K_ zVocpi)wdUdwxQZiX#miDeL6V&{`23= zpLxmJk5o(Ai=GbR0EB*xyLNkPX?#UC!5>KamE;SQVShytRZioXto94ShfiEu9F1waOq)0{Q{mh?DByVkBIg3S8s> znK-A4A>0lI&_ET^E`@Om3s(A|#;m#U#q@eA3lX@B2-Qr%0+bs2RxNxIdo|BQcuMth z@_fFm+>aAUv;f1#L~(#tzf;-+Y8pU1Byzwf%7Y?9p=ETW>X+H0{O4BGhzrbY9Pk`lBOkcSDnXrz?xXBo> zGt&aKRaH6j-Pu>zegr6n&N`v6##e2}w*qB?sIQoo? zRYsnyWE9LW(Z{^ONF6%Wr<1l~3*d+blANM%)Y2O_?nM}b2B3rZDV1UxrgC!smXo7b zaCM2ga6i@1Zv0R!&z?ps1GYId#3`jW4FMy*U4D|)4{~VAAM!7wsWICV-_Vs6Y{W5sR%}E^RHVl5(-4xdMr6Z+=zAZ-%}$Q zfKocP1)H?NWPB+<+0#0kEO7?y`%q;}+3I$rnZDp`{drAYWM&+)_0!KHeY-;3X%FY#Il0qLxPv=w ze+TABzXcfY@c#NtH;9QwnPZ%7Uhi~`&zCT#@epwZ1sy0e!O?sI%~#}_ zaCU+rADd~in!zAt=NJL8r5F=HC%l;m#u(v?-lghGGRoS@11ejHZ_XN;gqZuz0*bPI z&G|;ITdPKcZ_Kp<8 zlNQY>5)uG?7D*?XoXVISremyA+A2a8KJEa$R|Z3w$4?S5)E~W0#)?aGMljDvpdoPG zRb3Zp+Emsg?unbCvxytm0F6#Vo&mDw(MNgJ1V&XU{y%8gl zG_FYLtz=#dEy5SU3T+NSFrEe0IK#7HH%=m87e3Bm8<`ellU8GlfC-F+zTz7(nK^7Y z1jd;WhikWQWhnH*7psUHAZCbrsdAvHEFBXu-{DqbV~co~8-nqv;Nht}-&%Z>@f!?X zLz(J3-o=FWxaC}-a*r2kKoa&{{c?}{Hy~xLrU5Bfa2k-RJ!R2=v|40-7>upn{~W%- zf%$R9w-A8mtML|+&i>v);1#{Rw-6?8Yhs4q$PHX;cvDY!+7=!>B z=oi^OO@C*kl1`;`v@2w!)&fC{)r+)Ay#4Sg`Q`Ax7z9)~G3jWD(dGdz!OIhbfnZP( zy9AUlH~@tYVtN4s0bGDeYV9;{UX0%n$UW z$U87U&KOY(l(||FwUG;nsO7nGW+Sw>MbrX979(m`i_t(@WhRn>xqbf8K=iL%G!Scb z&e1?uF6)oT{pDu;VN2-W>cfvQy%@NJ*U8#CwM<}r+iuY->}RBq`Eoz|@sUy4ax#pR z$ze4NxRtu^!u9~fsIj25einkUXNdsghB(BaVv7)7lvc@L4Ko$K*neiNIr==G3JOUl z%JkETfP?@#T4=BjMPnPm(nD*9FDam*)l`EGCNdKZ*FxO(GrrZIf-xPd492ajd}fOQ zjD=-n@FhqE3}n`y;$xyUiL(#J5e}wVaxzklF+Pgb(}WUWU7fk;FDe=cuFQob8opZ5 zK=41#KN{$YX8mEU940YqN7kQ!kVVs=aW<{1CcI}e`%5o##4BQ8#boW=Kc&ogrPRs8^YYYLb5HYbs;F&3?&QNmM8^zl_S2aF64O z#hhglAdC^8AZ~gM8*f8RW28j%R^8lwGtjZ^l+DUAtGQO# zr>6b5*b$~|^KDm8+{{xx{Wx>==IwAQ7s@_=uAWjVP-|_K`H!&;@wm3YzQ{Hf(Y%RB zo6yg;F}4<3V!wgyYnT$qriN9!X=#rUyF_VrHLWkkD_QW#Y{NgZK^$H;mvc<8s=7a#y3xF{;%_!C-W@6c}kIf zo!>k&+u7edS*!NuIcrRM2|$^dF0xI#+MVo`S#~6Q4U~BeOS*e__LAYRK=TGe&1MJ)0#U*I{MdoYKS(l9rLdHZPH8I>GXeOnL*qud5z zXU3ogRVzH5goOIUqG>)mp-c@^LdjI~)(Ao-{`N6gEjsEl%b_CZ%c=-^D9^FT;g@pw zQaJpsiP==?NMF!4laCv5ot94Yv+%W5k;ON1dpT=u!gbuWOpA?21D1?71942V7PwWL z`;M%4=KjY%5eE|=#Q(y6-z+iU7{h|_?0{h8!DKe=E1F(JB%+WAhwB0PGQgb;l=<4x z-FI(({N^XOnXnpf)ChXOQaR)cXb>{|+qfrPV{(>tx>3W@@(UoW!4T5v)?U#b;Kpa4ff!P3>pczOrKDQPGK+qO720jPwNPfV$z&t%-P(Eec{Vzj_HOOG`aByU@=LLH z)-cyPxPldw*3I#(^j{rNyiv%PEYI9Smv#m*@kcPp5f~qS=f*LHszwt{vU`$GhLS z^We9?b^Cj79<9eWc;x)zBqrx@-3MK1M&j=RbPC*&?3{k9Bn1T2JVPI@3@9h79cakn zi)Ku+j71G7gI$d~=uMZ_Edjh%FyK%n8lNSLG1dQKGXn4gg1pl)V;&vCOjMW!O64H!Gz4h1wOQmXXC=Ic88w;WsFRA3R~0N zsHqQk`t43^i(s0mlV+W>xvkFGP_`F^ZIANocnMxe8_!hwBWLc1BWx_!kQ z)3xWP7LjNhhSYm>36UtY-xo)s*jn1P%S(`{z(*`38EM(@YDvgK>|JYGq^^D5>|u|Z zVOCCtF~eF205P;i9??c=2?80u8XMku^b{A2PzFq3(wEBQ)$x=uh=vx;EtpKq79$Ed z?LV6tjc`P0^48JKf4g`6XJ7pM|9$auCl7z~Z$A6J<{UbiFe59~CL*9gujM8HkG~U9bQJymr&49~^M0u_n5>+{oC{Sh* ziLMqC+cV3yykrJeIY2p-BJ--XG;9k#Jd`4<-xG-Z;=zZGM~~4yVqP*|e}yc1mvX8V z)8VjHy>|C9+b?v{912{FyOs*WMjH*rnCe=x+@rbq%>qXeX{|C*Vw;IoCTAtjf-Ni# zz}_#}R$GX4U4e+G1-z1$j$@GZu$!MpKqn4(|JILUj|q-JK7aV@-#PvsGccG|JB{pM z|1>zJ;UrN@%Y5S{17hM|6aRtsEV4~%V2V7fEnXW9$$K!&SgJ|hOjs4*~GqfUFZ(?WBeiS7AqKj*~ulhWtpI}+QcT}*6G>#64DnZKMf zu}%BajseOvkK06MQ`3MNlkd(}-~50a&ezno#k8aq%@^ja9GTVj;?oRjnLf=dAOogP z6DYIj(_Ag)y2&ita^08_au&PZL0nzTb>pJHVuWI7bo(F_r}HWiieyG#suj$(jKEmCk}!kByH710!R2D${eD3*50`L*PnfG|Ix3BX1;j* zl@Ct79%~JgGaDF1GtUk}F@rHL88@!)ET>Q!Lmo5(>|=cp`XCsfjDbroz8&JRMJ>jc z0cB{xF~C-UY<()gI*?|f;W2AO;OgJZ1IaVbQwPY7a{gvU=ucb1G{;sPLx0wWv_A>O z(0=zpC`R)t5sKl;?1@ku{i{SM=DC`L;y{@lgyMjZMMCka;_>eYmBZe3QRJj^d(`8ex)1|FSCI%>jZALuzCS8 z>FXsy;DP{L%ozh$W*tPm;lu!3>}%@Kp%a#Fv9g>*sRIaTB23{^*KR#vd^)rYpaqd2 ze|7tVhmXE0n)%rmzwq(>Km6vM?`LwQSb+G{8ri7V;Uz&BtBg@sEC^R^#y@h;SkcL1 z;5zJ*8Cg;=N&%%E;0qm44u%<>hBZj-RPK-?(MKhHpA+*z>u>T2WPsQ@BDG7I4w|!< zyisP!o0$x^d722u-d6HPP1}-Zm8JIk*=(_sTGy;T&goR>9oeHg>Yo#l?7z%7+w+bx zy|aTEK_r_|b|%>iOwnZ;z&tHr8D%;MCF;oyg|*k`F~1U2kX7JJcqC`5h{?;$K1 z?Dn+|c10~2gIGo*{_xZx^=zt0My@SABCSH2K}y_{brL`=nq*4(1-Q>8HL$iT^vNs3;v3fP zt&s&B!E#0jJw8DY4A_*usq@lmj4{v&$YKg2IlmfaW-egaFq0JAyx#k+YNTcKP!{_v zRgK_59?D{$(R-M+n%=`enQh)fpvf*=M14BjFRjlRYnvrZvXBC#VT!Lx-Q)9MeTV<@#a zCWn9W_$h+G@y%mX&So-37=AD0f z@78~5p2_ucMJ$DArY4>dyRe1`hq20}PyKL1+!2AM`DP^ff;Gi18Djx$?mNa9I#C+S zhQ7t{)A}6NbO68|%7LZR_b?Fox!7p2B3}|4tqbFw2K(6w?^ zt-&<^T%+mD=!p)VN=`h`iGx+DN8Dy4Z`y)m48~4}6eAqE^MP{M^AO+r?So)6v>1+* z)}U*}Ae~yy8omft88+i+tRzsA*J0bx%3=rfK&$^~W1GpR?gCR#Dl%iP-MSB~al)_N zeh}rg+Yh3o{rkIrd+WjPR`U$;O@TO{-2a1rIe!1|j=%k_JOA*F;~)IlXFqxO=1;HR z{O|W}ee@T%Km5*}Z~yS*o!bw7CjjVQ?_PiN(_R(D8QmDz9lTu*$1<>q=C4ja+z@*R0iZS9vuw$(fBA;jE{s zVIN_4v2FQ6I6QsrK7u4+&NSE(xRxv)$%dDfXlk>_WIRDMroscq&_;;6#wSv%5w$Xq zNNB&hT_Ps3bH7&vD;QdE34vqsskA{bD8(yykpfTxQ;_r-k5xv)Oircs5UdmV`kjCO z=aauoY&K9vDb(O!Nvu-_+;c7COn*W)bK`WD;aFr=+U8>37^enibQQ%%kM z!oGTWImle1NTb$H4ECJ3Ta@$7vw73l2NB2D za@m5Rn%u5A0VgMEwV2jcC^NS`q0D@%KBTp6J}=Pd`8#pbUM(lCPxkXUaerUs2qOow zXsEBzu#@L2XVc3nt>^lNt1v(%oNClduP14e|r9cZUrIccUE_6$}ByIC9cgxZw-AKU&5S2}VB7!2I zxNoB~qJOw=qcAw`&M3=>@%!czKR)w3eRI<5`$Bqi@BHS>bDneV$-U=2xzG1}f8XEt zm)+HKdsYu`%{J#}n;E_x!e-NO%j*^|2+KmIDck!L=g(i9--TZ-TdpbRWFx1X16f5u z6S+AFEeh9Z*aY3hX9S>xCllYu#~g$v11q#8-ZBQWT8fWoh7j45PmZ!*(Q^i6(OmgQ zjCuOEmy)jp0^zCJ+M>i#h?oS$x@PgBua?r~Q3#{WkvD&Y3^+Iq8kfm~4mk5d6-;8LD|?01}p5DBJE522a1mr!Y@Vw$Qg zQfJFYSjn=SDWgq5wv0=Kkt^pqXPj&;oLgsw7KK!@(2DIeDypOHo7MhJY2lRf{Ap+t zx9xXTGi6a?oAPYAv{ty?!Y}_J=Z%Wr^PCDZG2e-UJ)yc-8RAzJP2P1fv9eWSansWB@ml0bC1EX3gxbb;G$0{cWcY zx12G!;;g~tXAduZY5$Ec9bC4lf92`DD^DF{`2d*V?OhuD@*YjEfe|J7?}q8wXpd1J_$m{jb}ynI*|4a2uQ! zx6867pbS<$Okyx&ql1H=4wwcUW2yYS)-s0x(EpZgBk`7%v1PjS9s!OiQ&EU!d?vx% zO4KuO9*evLDSP24VK}$D?8HF;e z#H35gwHX`(8IuYoORN)AM4KmKvM|_PM3XCa5zv(I1wthuRg>-L&_QzLw_Vv9d-_(0_ulJDI-h&o;4_NH2O3ZCP?v~!exAc#{y!X7<_f9#t|C&=~ zXT?TPHMu4*B^@YFnH_GJ8^%m;&2S+SO_*Zq?2?kc~pE!Roz+kj2ox(sA-<*I~;oS=yW(NvlE1E16n5DGU`r;!o z7Goc^jRJ_Hq)`CKedXn*v-!E?_I-W1fs?QD$^r<>w0?MEO zwR19xiUjzEH~ySZmMmq`C6iJb$rwv-a+HB2jdTmhCR<(qH{QNq;YbErzo>?Rj5&DD zXzd5YK*n$gnM;LTGEXpun^`~H{_6hAuNj;$=skF0`>MHHRt>hU>fe~iU=+h`qe%|U z-kjZRN4ve=w{7b`{s5OiXutCQ^UvyEx_Yqi;@%>dhOOEi<--*e^8|ZRssvIe1is*8%Qc7T#qx* zyk8T!^?UCmmsBDEp$vH?$QX`VWF+n>;Y$YLOBBkCvPkoLvpr+>+ROSc81^0%Tw?4T ztlGEuz_;xAmLI(1VQ=66sCWI~;}Y+D>tlZSu8{&J^SAGO(C*m>1kD8NWINwGZm##h z>-$eWcW~h;gIh{1PD03qSePH%qACloz$iKbn_SC`8fQB+f%%k3pM2{b+*lBdUcfSB zY{j5fUxRY+KSVb}2Low2o)aDhDLN@VGL;pSNn<93SvnhObd)Iix|g~2vV+02Iw7;V zOr#TXo60xZ+=RQGosfkZZMuBiu9NM!?I%+JYIE=Sm-jDP zH|VPxCiq1tfFc)GAv2^fwpqvwO&IJ<2|%%LHZ@<|;jl8ylX41n>wdi#<*X*~%%}zok`eOVe^;ipY$Z5;DuZT29C;e`k899;r1X_14Yeo*>xim(OL+xWUj*%k@%s1V-O)fs!x=mo;k=Jcn$f`7wGu2MA zrFVfHa7sW!?_$;%LYc7oP1L>$Jnb@=F=UK(YKTMWPQV~1ASngAK*^Lj4(CZBDeTPv zV}AJuT3%B9FU z1<<^y_reH-rHD`ygQdVXRkDoG@lP$V_e5gGvadw$41O~>BYTJj+US$`MED3K&s5CV zz#IshNfc3e2B2*$%uXCCZQI;0RaR97(*a}UGEDM3w~mekV{y5EE7~=HL#42+s;eMc z)tyq-)*`mGOKIO2+p95I{b3xZ<8jb36KvbR36&tD4bQCXcPlAmi8ESn8+R)_r$oAy z5V_kzx)#8-LXfK1!t1j;j44&R~yZ$(>nS_zfB300Ykt4vD@RG!W{xwnpvC<@ve zA_(bpbe!o_9p@_Js_&3zuJqvOtiID%W~B$m5q9v;<9?qK^VK`6P)0t+r@C_W5XzMD z%xcwfOrZ+q^kx~5`ew^|*77mB;gxnWIW6OoeUX*X!PdNz9=t*LJyy5h@ZEJ=j;6i0}shBx!c*A9b6O#{$>Lux+a4Ml; zLcoAvf=&P~ogrJ3;9EZU?&Cx1K=5Q6sPxMI`6ju*SQ)De&KCGmX37XLkPRuhOI0fa z*eoQ{c04ebN1rAD4NMFYY|u=0k!Jgunr7k|KsBYqkZ8uXT!Lc_qY0ia(oBqjCTz)& zGA2Obl~>;M>|4se?M$v1yN|PP!86Q5i4|k_amMZ%ZFn``^IO@qTAAuLw*1pfXR{%> zooczYXtr%Olvrst)C$6FZeFhL#Q(F|P^-3UZ&Zb&%VbdXnHudmt?0N_zqc=8j9ado zqxI*gX?m-+X}kO*R44@~Ig-gILFdtFIoHV=p%;8m=`^SehLB<>H%SS)(ED#CkWN87EfyGJIY0v!E2hHUA zgWfm)z+gk!W>UjFem3w;wg4K_XOwE2X%fnaW-`c~OlT*l!kQl1W|t5u=~AdOp)k~x zQ^us35JjQwwJ_TRlL~RzKF#znUCeeIF(Vn{uFpJnc|=*ZJ@IBkGNY~NVWrtnwMc8U z!F+XnqXiA^eaoP;*%0CV^ys***DY@IQf&&XGUcj1Zm-<(>*d4dZn+f>Y9S+}w(`GP z9hiZY>1+r;)A{HCh}uWTCFdyVQ+4z|I>5fK@}tAm+D9kj!#q0K?R<2YBq~JJf>iHh zr5bLTGj@@NIpd?{j025fN=k+?hxEkDe0GWKdI&(H&u^vtwe-4lLX(ooAeAiS9mp}U zs!_yC)e;cL6p}(fj-a%c%w7wrv{ zcPG5~xONsQd_A)S60O9?C{sh@)E6_IDTZ8ST#A8W>dUT-$RbO_2Qg0UdBfG;d9W|24zPdt1?BxAraVj3mD7U)(6YwT8NhUF6k zgL(svDqDrCuo32!@ai?~lI58!3>83`30`3r(TN}iymG<(MdFyjp69HaADu(QrT6UF z%ZL4Be?~Yax|W}Q|1%*`fFP5NpqX4bMNd2WGb1#!J!s|yr_3(|%2<+Z(@OL`8PKs3 z39w=s3$rt6aTDTbO0_8mOTQ{nqw;Fd%m`e<&>Y;_z93@}49X{vD+o0~?Y)Ig)L@Hm z^5h7Dfi>2|mB3ot-_jY+ERvGpdu2(dl46kapMLMy#FBf*Iu;m>gINx$7u1O;jmp>Q^w0?KqMjb^I-%G}1Qw2y^JlQx}{=rj@bXp4)v+A=c{=F^&n ziEv{1nFs@AI!%Oe*Qj#m3C(|biR$aVQ2?z)xN4^EWjqmltb*Qt586S z;Maf{&DdOK+k{%PMKZUwf8%OG8gQ) zgc2e8L~a^fHRyc{G)YRS!?ipn>4U?hPD`mc|K;)bW`fQmrnUc@eaxxLt{&Y${Tg%TxSo>2kACn~* zZDqfmCc-n7DPeUv6HLxjg|+5W$H`QEYTH|1DzjR>ONIL?lCWhOE0j>BQQU3$y0&cvO%);UwV_f5qut@IExS&>`?iOIV`ld}D;~R<=gf_B{hNA^A+Ho1lbWM| z3}MIg&`emL{6k4&MOi$O=JdYdwSzO_DXb%K0;EM)qV=L8o5rqa#;|7-_mo* zWY^C{X|}3u#J|}!)1-9}V;%#Io{>+Pnq+HjHc&>n3?Yb-Vw9Kxb3-wLX3Q>C#H4>A zUC-L;-!{cxy~{DSS+Pgkl4iH9{6|7{oE#F{NK#IY*gbSA%rw8z~wyeFC zcoLQIeL_pmGN*H|H`c9D0;cv}RnXIGwg9O7j9LKa_jdaG6XX2-6HE5@*RQBedg|)Z zCOzR(I{p1;DjjI`pp#&#Ttiy7-!iFI(T|cb)q~agI#(Q8`$!2nE0VJX=`BfB9&Ha* zo-00}Z6?cS)NS?NFpl&?|1k{{2*=C71Y!yHT<|XSEzP*F`c>y!hV;IC453c5EI;u* zn?);IGfifcG6{S!wN$y}>5i{|2?I-(NFG5L0AdiXGPWZ$z(uWVDwrTA(3G&Wm#l{E z0xn)W?=AZt368mA-(z06aOv9lLpWyb+^tvlp9PLdc~Ni-#xTX^Oihe$u?$!Y z5@kI|Rm!A=43k7@Zic9nv6iny=7BGm+@liJNJaw2)DrbFmMHQQE)vTlX$}L$tkUisQL=%k`^n+Oq2A>%zf|8ad^JfSWi1 z|J*&#xoyWc=7&kEgme2B($K<5cOu&`*{rm*_XRFX%m`eRtBZA7fuJ;G)d_#e0uEXv zEeRMsU3>QmHp$9#R;|x;`jwerYW>PYSl)sv>sdxs&^wNF zY12JzBBL#bW85yEZjBbrC_QOiFDnsG%Qv(H%sACB66x|?s-h@5^w-?p@%rm*myQ0K zihxf2wHnFxp^|j523z3bD=$&{m6;Au^XnklQDV-Sh0X-1Z3hn1wyhc~%!ghY>oN&-2{eZn#M-h9i4-t%2Qbmzm9u}bTut=F#Fe8nhk zyk=EMmjIfGeA5OY>`TzhwU=i;m}X>SlOHnQmGNTl>#pxVW!>D!X$JTbOasXzRujV^ z2PVyACvC^xNuZ1$0c=g#gggQ6L^K2Fl)1^61{5e}w8*oe0e~iq9f}#c7Uay*U`B?| zhfUQv)Jq0Fr5Ma)oUisp!byK?7YTx+7A`q9 z1&}N23*x-kg_X%VCd*jV%_xg8C4s#!OhBoRF}q|<4LK&wdiVljU?oILF8CY2xaLnj^YYLB#cTiJ zZ!h`#zj^&%{n2^9_v;&zeo9s=9yVLv96&>FCSv59ckbXKcqYWZ;23cmTbq6(ni0yB z5@2-G8*bm9Ns@OeW;D&qJa|Q7#t+dBS&(faSA{a8P(($2QvqL0Jkg!B$~T!~62t(+ z37Q!ANCR0IkW?+`>Ltn-a_GLw7ZRQF1?T-+)CzlTx7wmD6o|`gnrjqU#mf z+*9k8=$7DT8~1UJd)&QdRYB*Koh-=@X8@k;`h2(ekMRCa)+>UzUwB2p_H}wiw6b5> z7q9HNvXDu*t74|IlfgNr=)N@IE!?tOS2bPKG624mRZEQN!<-pu0MZ#`L$b2!weQjk zl!0r}(w9XV9wOsY@7xbXv1#F^H}5!Y+wK!_j;Z46U8kNryO6a%AZFeC&P}sh&Yykt z)q`g(^pA@}U4rT%Qa_2LfkLPx?~|-k_>};ZPC%2RVQ~Uk@{OTha*6oBB7_F=B_q)NnU3bx74Fj!jaHxdEMq4nGJeOXDy9fiKET>R+qWo=Q5 zzB1!{Sz%>5eOYHZ#h7{qSDtTb8V=J*XIy5A!LgQ^;?r6}W-1pv)-qGMSDl$D=ycvn zZC0R-7z;q=HB_wtjm0CJKrcWGXsZTHBlv>sx9G1#0Sg3-J$fu$LM6l4MoVf-rDu?) z;?<_4BZIQblC?R?L2}4K9$1+*v%AmV@x}(hVCnna=Ph2kc6Mj@n6-1ePMh8Ky5Xj+ z{U^?Ee?WjsQa_#H93^Y915@qGzn)Ds)nwR<8Vy)n=m>!1t;#__mF^? zul&ai2afP75a$b9|MU-D5$Q~j5cEvysy5Bt5GZp9#2jiVMXlCoz-`eB*n%e68l^?K z&naA|4QKAQ7QiCQ1l){c8#76^CH$;Iv=nG&M6_@S>Q3_^(vi|LK61)_Wo2~I1AogV z@+7PIWotXh0xL|i9SY0y1lpl2_skTqZ)usSOde~QDeo1NzUPn2OaVeVoq=XL9CEqJ zc!ykwwJAB|63fFO7uYu?hg@fl&>^?tdySTSYAuPJ_X^G%QeSO_SNs2=O_^CeF^WpWrNWAtT5`ZsQ;i-VJ8xf^FK$)!Zfif?fzotYm$u8Y;>+@2(^pd%oR}V&{MVes0 zdhp6y`j3nfC0HSOpJ0Wz?|)R3w!iyp8~*GM&-uGQzwmQ^dC_10@%e!ufhOTsQco0o z6OButNluRCOtMahX<8if<3Id_oI@w=?X zkl!(YhEgUZGTD|qjZS)Gm%w~F&EzO{f=n{6o|+t!#0+EMW(h{KRrX7L6DcQrpRt)q zz`K}oQZXYk_5t(Rlbdm?-b)_=5WIT!d*LQ0=a8G#Woiz&0+i+8kc-e_st&nror*JU z{izq}bjbCnhbmdO+X@N!Sz3u=h1=6vAoui$)>niaHvFWYXXSOI3>t;{GmVvDr<6fy7LyzD&?`$@RuH zi5hHXH2f`vGJqKCS?uOhu8RRN_9(DxfiC+dnAiee>`0&^9Ep`I-jV$RYc|c@7~{J= zd%t~t&k5J=-f-cLi(fLk?Vu)RceWenhgS`r6Q~j1B}7X=Nf1obDqs4y%?G}G&w>B? z%z^*@$13%c$$$I%%cE`yrU{@4^r4Y;AWKSzCF=7aUX+ zH1pcQStl=y&>Nxb7eJF4a2_O0Zd$k*pbS`$l5C)i{U%k+AXmz`ERVN~ConX4l%Ajo zxEX+pgbh$eT+5@985>-PY06-dr%w5~C3SjL`#g)n$D|CHpMbv?dbMTg@0IPu{k>os zmY=^DGp)bZ(gd;^ZL|Ve1T?KcR#v7{AUo69M@lHu_K^aO9(fv>v6Y2zzx(`tT8KvOx&WL#FvVtN+5 z0wrVP0yMv6buPJvvIbiygG9yz6PQMoM#idr(Q{-?jgbtfMXNXa4GCowh(s$xY0tX3 zo#!lG8O`s>vvXAXu<)l|>5ReE+xm|O$7CC3CBoYg|8az0UtA1Z6VXh{rvp~P=tR}~ z@ee;YXa+v!p7%aINvOb%;Fv%VuKfT1`u*Q}39_4XxO~;{g8W8gnkdgs0AGZ9cFh#? znP$RiX2ZTag)-S9xaR&_1}{&B&e!0RwT}T~xtTt$!LmUW+0{R9=46RDqA#*Xm5(od>>VtG5l!}hf#0^-OPhge44Y5zFW z>47G<(|Vw>HafmuTf3CVlE(5zS7cckqRcMYqd=*zYF|=Ih+`1Jlnn}ULeY9D=g^%%5+V^_ znf(G6dt7Ii8l~uC&YrvCrv77h^h2wR$e1LOmWV9A{Jyx@g?b@5mE2Q!onQOZNvU$m zWyADDTQlNgzVb&0CinF_zj6xcu&sk9ojH3gza4^@4D|nH%zd-0$z+`L%*NYCx+3qh zOiYQ_F7V1^u%w!bdh;2WR(q9xM= zJkVU8CndW{EN|IO?$rbf!k4$~CX9P4GtgtOmE8bBIt#*QIyEA>%6N?kTAA)H$}1WX zU|)wuq^4WD`}ns|ucUJ-8=~szchc=)q7@;Pmui3J&dRvNk}KoNj(VlRqx3twmUVCi zlS*#OJ~;6Fz9Lt)c$kIY?Wp#N1sY70q=uJJWVf`dlQ2vlu<%^17_ z>yY(3lkgCQM&uAHld!bfacP{i`UMN)G+z&xFK50K*o3nGR_thSi17i zdJ_=iAoD7JN%@tP^Gam22vX}^ie><{h<{BvC9L5mMi6;(A2~S{OnBu9smq5`R;FMa z`wW=(|7O`*azYvr{$6!=QC`uAAob|fhO%roYxuq@x!U5qWp7C>9v zB!b}(gQ9T(MtLCbK9jaGs5BEfp^{-PZHYxZaO^Cx#L|k-filNV@i~Jf6rYP)+TwGC zSryzA%5)Z=&vbT>%2md7kOE;X*@7wCW5-nkCKU0%?@NER*(;~dOJ3jd`TBOPI<@b<=bd-&Ij7(L&%gfluUS*sHCZrmu7)j` z_zMn{G2q*UFFwE4@{q>oSB6GF(>y?%OWOSw%at~05;Ko%YOrBqP{~;N;#eG`K88{n z8G^Rg5^JqcM(mO;L0)MBWma(v3w&03ni6c?apf5c2d9`hARuK*H~-gj_9DE9%^e6P zWC`k-C}tuYo(7c3VL$SL$K_irU3RDQ7Y>kcidAu2(8K^R7kndp$)tWfhhBF*qM4|X zIK39YgJ#hGD*lyJ1JH0~^$lXcZ4g8YpkYgptn{7{5Nn-R?ebcEdaLMaS4R=K1~a~u z*js7nK$)2@`KT|sZI$bptPOK`S;M0h8h)g$P|Zb@R$Lpdt&o~g4~~FlsI3rCX0)x) z+~}3gQHHKGQr6Kc&0Di8&AHkPP1mO1Knh)vhbm{RNWiPdm9-yu#2|;6VS}8+R1I=Kqnp7XXZqqN zVBe7VNmAX1(F6&mR%ULOY_-5rGHz{9AVZUZp-C%38DUMfxTR&QPzIHZwM$gBWYVle zr~Fl!kp4JrykAx+Z$-CdSbt-(x z&2LU6R4ixmThjG&WEfAYfP@*RU_C}nD!F(p*{W(*l4D5MzM<`2AO z={ve5Ss8qO(_m6+ZE`iA2Lq?FThYvNwkW|#L5hGW$;N4Bw|XXnWhfbMMJt=ymt>Lj z7sxyu3^VP21fmsquE!Q!dFBSU1t->G3qEawoUDVJz#wPZ;wMo{6+hMIe8R>BqvEHz z(WE8`rkd3BV{L$>=0ZlE=?j(P~saD0)z3qVAN(yA`t$KCY zpnOSjjE~MtYHKD3LrBa7%J8J_nwK&82=y`e{346lEd*X+fBBfUt8>#6k?jPvP;AVy z9Vi1sbHw#8r81eNeG@LzqNkfei zbxaU503BEva!eU(B%Mi1fyw zHoEmtoimE`Nhz=xF)$;lftfEitbrL!!^SZ%OKfBVv$ooct>wMdz)U`6#K26q-`Zch zdIs0^iK5w>C}};RTMXU_JbRL0xHWkdBM+RcjtCtgoVszrYRFMpGX=jXlC2CdmOU7h+GCbipZG(%2mZ-ZOMvK_IG z9YEhh-hhtR?hOd++c&)d^X}Tc0lnR;H=wLc6&iOP37klB3F@v{`FOHND3eK5GIm)qSXo=6eegg}sfKdcPxBwI=*gTq%Y zUD|%vtomsNdCSdjpDMse)lz;@^uK92dCPZin(FUL8Y{mm;@_hdF65g+%%K0(PDa?5 z$paf)m@|x4#?y-nFgYeD8H%yBF|;KUMNCp|49Foe5Y(~-zGQ4kHsY8J@LGiV16U`R zH__RG8*XE18?-W@cHT10)DST1wT^{p*!b45EnU5SZ$Qt|+PwjFC*L={0oiBm-hd{U z{JrAls;p|E%&0fu+>q|FtzfE@K&$_#H%-;6c8Qn))Y78by=L^3mm9(8iL134`m0Uf z=m}P4$mmIlfcs0l16&Zw_}AQ3p)Cxt9vkMr+Q~a$OuZ5>;by48Rx9Hpd#j8=^UGwm zf|~?>`3O!4CxMMPg*`59K%<}>{yVOmk=|YM!^kQ8SV1yo{eIL0Jz}% z3y$d;OxmHsVtd9dMTa;h^ORu&Tr$JWmX~HNZ6R6fm=0*r3}Z2h{g^UY*XdE+WuodX zyEPl>ef#HSRCnoQ^?0omwI8hJBWmuxlLL2-7|hhfLd9q8xO!N)f9GsIpndL1g;ohv zsScvD9WGCuFr#9%j-aYSmMR{o*S8|ef(uK6rFaB)1VqKGmF5@x(JHuJmrPbwhL=e` zCEHE}B0!%TEw$w+wbWMq#~moO&3LHPwl2>t9;(k7?pY0TdQNN@Mb-cOev+DCRH-#mDnaE0F-6e;Lr}(MC2W^ zGJ!JM`=WBiNM^#pT>ny88GQYpweZN)V5i>ai=Tc5g-cWYmmW+>FaDW} z=gk_zcE(z*(VkrIfy!ES7KODVfl#Kc!EVj*^vC0^$yiu}P)5yfa7^Eqmd$Bge2H>b&9=j!Um$3t= zB44ZPDO|D!8+RF1;oueCMKEqhQWH$vW0qk%PG}RL$Bd~`F^zy;MX;grH`^jLU2C;4 zNt4Z5Exdl#%8w+JnXy)TV69p~aVv{y+Xf7=R)COE)@p9F^-qp6V8$&R3~qRN*HwoVi`B>^LV~ArM4&8q z(SD}Lg-nEPeGtmP0q9u*AAqlkIOafc%=}Ip3}q{bA(=ASq7hk@{f3{g7<=o|%B2hU zixl@2H~w(iK;9v6vMU%RDGwt>`Az%V@(ndS#;6%DL zWt?6I8T{Gn9uhhyL=Hc)Mkqsh`O_DUe(dEhz()r(V}i*t^}MuWwq7#n!6XN!um-t| zVZl5GGm~pt%IWPZX$f0`l5Fn{18y$^TT7C161XVU;ua-TeYN6Wn=uJxY{pcczSf%& zrs8sQwEn5?G72*GiW84b9%fEFqfR`C2MQM4IfShNA)`(_bE9HdS($Fn&ZN)pIctR`P%;VmhCmsVB7rja{KCz|LGCve zek7d=-t5rZCFYiA#37zzw{QM_R{npnm+(V-3tDiqR{&j&e z0V}tB=RK{jUCdzOJ(DI%K`k}FH=q6YlLbtp^v|R<_htK^x_Ar~OyHPowcC-HNpR9I zm;vIX^`?!oRm|w?lX069B-Y+28#5v1bs@5Y0k=?_zO)k)gRTph1$TN_>y4yml8v%! zuiW*EVPP6tUUt?fyNY35i90dutWow*qim~F-AcoEB%EVGh`+Zs%AOm&R5{9!ZW(K! z*`?|()zA}zX8iS1B}Ok*#pC^q#~k+4t7X+jEyJsMsQQ4_vP!;H(B8mHC(Bs2&lxL~ zDn=B_I5~N8RWDf@^)a@GpOlP388ZUDq{ucitLql6mlgwMn4ugu(Kb)cmNAq}w)R~L zc7co`SWvUIg(PxRO0SW!<}C)g;f0c+{q+$y+=yfZ)yU(Q&kHLPDD&s9f9UP?dI@BC z|2q#2@(5*;a-nP!K^vi4k|7#u;q;9!pPw@6^Pf2ZPf{$Yoci#4j>?R{WeCk=OY^2t zeewI=aY&k0F3kVHiAyKaWGY`d-#vqDg)cT{f|aq4K_aY-&c6UhpbThI(>y>-&bj@V zxSFP%RLR&PyA}UheeGB@qgJNv{MF`|sKgd|i&tb8+y4l%HB7b{rS&%?u{w3AA<0Z7 z$v0MuZO(PE->F=m zI}fo{j=MylpP$_-CB@6p=2M)wO4GT|?P@;7CEN#_Pq|%t^C@rlO6D2POETSpnfa+0?DlI;uBI;iNhk_A>Kp-_h67cKIrd?BO66MxoAl)w7p31!TN5E$2L zkz$1of?u*KN514nSeZ$_2`DrFLovn;9TGgTb~5HmpE;dOP!d2b+Auwo0-}g^>yLi( zs~3coiS6&7zV^Y8H&8W!LG7U;k@?%dcx1ND5J65MZ$>|AU|9~B9+va-cRyzN0=_I| z*bp8WlohFw%T#YC;Ik)n;lwHB}*mO=&!uxVZ`;gfgQ-h`G_Ln4=6`MdePj zt2lZUxrCcU&NBVF2326U$$pz%VxQWx2FguNE;)kWFj&>&>Rok-jok zFe&+xdPFNjUMZ0oaZL9(v>rJNEb?ZOvt&CxIg7I2%^_#;gabNivOfU^e#Yqi~ zO2y|!?MygIwKGxfv>EJ7rY~NDgxn7OTRdSi33fphVWPppC5v2CkLr0Jq+;JC?M%|5St!G@N)2`fYCgm9j*<3Y()N0tb|z^1HjSOhP{GcSoe6_cI}eegUDI*yS-2)!nL)DK2YN@w@K%$cIR4~=G zrpr>zjaJR&C__-ldisrDHMbGGp3r}6{HnPP;PnJV=4DTPOQd@!(@6wlCfhO)!jf!Y zij~+(GBd-%<1;iR*+vjdmND}MqM2-^XS9}4Lkd{IR|ZxF#SEGlR#rs55(#>~QJ!tz zB_;!3kiH)A;+JH6&}xDybv=hHZ~L`{hXz=rs)&5hXlg0KUKo@v859T-l}u2MfQE!o z>|xp;k2E;>to+7*{D&g|GGT5);drPZl@w8*b?TNgPPsMCJ8R2pe(%SFX4oe?M5D83 z3!Hqyz@S+F9lw0)W0tN2zCg?X<6vc|Q8xj{DFq8==Fk`2fWb_*7y(Ptw4Tc-oKVuB zb83t239dVGZ*Z;dG8y0s?LEWYm8~IOVN5tyJ!7bq0izR+wU%j^%f4Mq$@`QQs96^i z7|c6KbkDSv{dMO(YX@udxNb3a2j1-y&1!@R4_Lk$N3N3Ln!|Eji%Z&-g0cJSj9i6B z^=!24e$A#0EyR7ke%J@3BV#I$QXj$xuGFB+!w*@7)m6P9l&lFR6O;+Xk)Ga;&XARH z>%rY;ZqxxfM;Q{mlj7>o>rC`c)VGjGw|IOedLL3!7a1MlxOwC%t@YZTH3_>f!PT?v zeSYn`Wb??~QU>r!W>}moSLwX+crI_77$i_yK+oV)qD3AA08qy45|}0{YgS^GUT_Q% zC}YW%LD-vBcRd2S%)Eg5%V&7aHLck$xwrxpcIaRe{qbNBP;AWQyJz# zCrqlIX@QF=S3AS6Q(Z?QVB@Rni~)6>^TMz4#hb~FU#~hIqcbHLRZ?@PnUdPXrIX;B zA-`EH@j2?O`{-f~cJJ z%r`Fqc1WVcy7%Pcx19F00FF>88Bb8iYhUpIq%&bq-t{++QBWM>CkP`rBfl_}Xb z0fHgMoDJK9>%o(koItfQIfqDRtP!L7U7MfISB45E;3?u?CEi?jLW++5TzLyhhNhCO z^4D8V93!L_+^_|s^HP8=lwpRbS=WcJPm%(Z*-(-cUT#213hUs8lBBe}{wRYbbQ_hV z)C<>v9%d>(;ssR}!~U`|L#t=oJ*n1s8*`&;Fi@th!4hk;HFzx|aFF{NMc^~PaA04{ zIhkN`|JEohZ_y~2@+Fj#n92xZTK#W=1QYAZWN^`hq;bZSQvyoH3Z};3HE2cwP2kHF zKpDFarXe;A4Mj1ifLSS7GR-bohRvdjdP8xHfjvJy{d)EvdBctBMO^03S$x#W_B)3T ziPIen%Fw?wHwfc`L^raSKYry;p8bp#c}#H3iBH-Ru}h#y_6$Mt?ze3XLLxa8hyz~| zf8m$C=-$>hB?*=N15g>Y}*0q!5CbX(fh$B*AQUhz@J7H?|dxUp)R2FK2X|@J4Q_EVJsg0d0zcsoB z`xRO)r{v|=rFlYo$z zacN`=f>CFRN(L3GzA~~hW=Rqm3uPcAU}XR?k&h&TV-m+LpEtj7_rQzjRDuTfT;!Y* z>!gi>IYOlbHw3$MP$o*3prQzGgFLcLwGph$CqH^ZAWj6oG^~#4%j^H}XK>OBG>O6{ zluX(!z5K=Z$#GzJNHd-EsRCHm1!6<_?Y#p zVIK*YYVZNRsRkcHnNfp}xvm7JI?1Y)sj3>w!K-N!+YWH-%c>fX`x;d>iG5sE(^^h7 zL}0zw+mnCm8IYfcl@Y-Zt+Ofv_qT|NMv{yHF|EQEX=mGuhX^ZU_d&Nxef5|jh1A3q zR0YEpBqm@B20wu#rpY5|34_Mi@Uu=J4ZKsN*{!3aX z9xzm52X_3<4fhQz(@J#nGAJZQHSzxql*#rBpE?Z;6b(%vPO?8K{ElKK`&{}Q8YWzy z_doX^rvxF9y1M@A@6U09U=mMz$^;m_;nfeM0zAJ|uvI0xCmAXD}``ba-F zTC@z5sYT1?Q)jI{M~jwi^04-z<$c`IA;`U^nkdTIY~m`LKs^>@#t%RuM$3#(7? z#2kM-o8tgw7`HZPHVf417s!$s#J{O+k&iJG(I%KOAg`2Qz?w=)Hl{KelMNBjz|Cm# zO9aZ`a*IV?W)RB2TRdj@s>iRKf7!x)gDuh`J3W>5z{`B)b7uu`Ac6_467&-x3w%uC z%%@NA$2B|d65&grNzhD?N0L?nD6z#$^5~`4-Xr8n5X{vp`v=WrCWY4DzUkt0R*C{9 z`J?<)Qb?H$pox4ZxF-mPqXoyrEciC_N=aRTW415c`zb4D=Bx4T_=1eVaM@<83RvYY zK+sO(i9@b^F~v&OVCOB0uI0(NG!y$DyJWA@Gn)T;eIK=3H-q}y222U=7FoTv7#mn) zH-ikMVZ2vuUm(sF#AM8UuHaoEu>U*!Pr9C>WtZo@ShSqjlts%S74~A$vQdkc84MLI zCq|2wU3A*>;I^j5YUOOVA`q3Kuh~p(b=%A5&F0EzxE|s5+no@1W^!&+ip)`J9z=8N z&6Ee3YC&Cq=f2jOB;z~KngnvYv?eL$zZ5hzXoh)k3?PR6yBl;3$wK z^MNl^Yv(1-^UJPJpVlZ>i(&a6JX`xI8070!~4tvo{U}bF5X;8$( zg#gWfT5@%$V6reRTa!(|S=?nrFo2ls(86Dml0q5lu_6CjVXtH%JIFPPW&kd{%vkkI z`M-b1jm}wJW_|nDVsuW@WN#Ury8}_pVA)pC=C`P8XlI;JF;Jyv9MrPY3QW6$w@0fF z>gpgpzUdur#hMyw&s(piQuf=vok6G5;V6vj&ByZ0N3W33Lv^_r(I`=Yo4>K!wo&^g zI;e2OTd>wHRkE(rBbNh~(_Nx#ovQvrcCl*>UHxFX9GvI2UI=HpTejjP297K4sWRRw zE9MUA)Oq#Owh+5EWMQ}NY+!jb#yJ$j!8lGAyxVLj*KPK(bF)iJc`pgCv-!Mh=w84C_5{*yW4o zE&XDMjlhCrj)E%oP{))K>o6-+N2g3WKN9Pgz@UJY%m<4k-4l=j)QHk0J0!If=`J36 zMD`5t5|on&rpb@wmxiH+2U4MD^DH{I{p2kyG?HsaHxp zc}kX2Se`EuCM%cNBCL;dhA z`7tV);H@Fa1aZ406C{{sMkJ$>2|Hs~$wVfHBojcHQOU&I=yN$xraqVZ2}YmGXDvhd zY+S9umZ4R^?{^t)8CpACufL5P@qgGxPPR`#tWO4?#Cq(`SH|7IHx^?vhPUr*RYfp3 z%GgUXfoO)R?5seTx7xvgCvx&ijFWCqQGu2Mqge73RASpmvQ?hq^Gm)XTL!c&0JtER zVPVde)Dq=OS>RK_WVQwIZ?<_!9KGX`iUTyWP-w}4AeaDid^@De}8zuN0LFw zA|-$H#@9S35fUYtpum*WS|?`|TizThNF{(H9(rMMC{xlSIE+h3px~$c(v)Fm5GE!d z=F6Ww^OkR2)BN^bIa&lUK~aG_(d*=Q1qKBqfnzRMdRW}>wq7~mW47+R_SlsRPFp(W z;)Mrpo4@zc_PecYzsrv8cgk*21Shu7-{aiHM;yO+(!onhlT(L39&Fa`3Z{&a{pOt0 z9U_4_A+(utY@rMlOv0Cxq_u{4kaO@ciMGJ41u=<6`P)|eFK4DrEoBmenXVI4OTD!8 zOxMkzm{8pD=W_IFQ+h6Ep78iaeNbeFk>~QVgb^+uzFP}y>({9#s?+Ou9RIdU!*r^H zdbT@SsHS+-BPaZggvals(^WMw+LEYZyOIHzN=qWDo}FhLEI8DX2oN&bl4x#}(E`d; zM$29~Q(&|<=l>k8*82bFFy6%fb9^FfuS+F$Yj*;K0$>;NO`XH9n%~xoOhAJTtG%zm zG{6_6GjKE6(oWJ!Y#SE@&9KzL%D4oEl>xqF*)ypGj4tW+1Qo?n3zjdz%H$=i z%&J)As%#k(Xk(9FzUbn`2W7nvN{DVIzPhOlqDw&KMWUODOqj+=5wfJXDfs3yAAf3U zw$ra5xuhH<7$rvw%|m<0uHylbW|r4p@qK|B0X-L<6CgFIrHcF|v`uzPLMjIj?g?^= zp>VQM*$w4Qj(q9-{Z3kW>cLlB4IeXc%Gr7Cxl0G;XasO4APG}r>ZkH@dHY>1nE$!s z=FbY0!6gqAn6s2~OM;2~om~sSG5X_4%uv46Nn~>Qc!^Mk3jEA-Ga!@!%5bX${$^k` z97u&*%bShKMtD9CnrR_8Tah|7dO{h@2*S$vpJFe#HlXbrc5RsTtMNohDhx?KXZ>ng z>8C~hgt&P~`UxvDD*c>m{es*wBOvPf9(!+byVsmweJFR(tzNb3W;Ma9D|E*Pbo!=_ z=J92F?W=@VxYk{gq3)m^{PZ~TewA}lE7KmT(oxKGJX58(*t4EY?;8dkSgAB}VL^)^ zw;b8eU#+V=xH|}mT0YGAYDl1`MRmNem!$g>W|6ehKtte5F%85_!bXx*z!H`(p^Raf z5zS=K;Fuj5Q-}+8fu|v~meEv=C;Nn%CIW|FbgAH&um%6i-nstDbyjEm#6W4e2%#b( zXrV1CRYg^yhzh70CyuYV6LP_cOD;`t5)w?12_(hwnVEBr?~W7Okg8Iv3aM4q|DzxK zpY&tD^kaWBKl{Jd8Y+?ZX>Ce`9tROFrv8c^`zgqLXX3WRjuzpa1?5jR;5sF$To^*MIH< zivS>i5gg>#|Mj#^x!vaA`MeU&X=oVNy+%tALhp8AskHVL89iy6l*ff-xntF|=CUz-6DjMFxVr8oV9G)J+zn0d7_v4+!EMg$`(<6xeb zStOg(%-(-`{l&Eh=N!iB4qyc60h|HjGOw)u-;-Uki2@}QyVO*Z`awejbO0joDu4*M z1h1F$wZ2ZUgUy?$yQXX#Bm_@GS_&j2r^1+{(eVIQhB4=Mc>TcM6DLJryXW9+q4Pa) z`r(srKezt)+UoD}Dgr%?K#H*8B~qUM`1Mx+G#+`n`srt;Pu(*;$#s*&GM%*l;=G+? z;0xo>W339CEfKX-G`}r9)7Igqg2~imxH?!F3$S&LmXaY_rFqhw+BOntvO%=Ij&1TZ zIi}|3FL~|qwb}j05#2J=E?qH?$o@-|c003WOS^?KH?U#C7B21fzREtK0EbGu1tFsi z6IR^2t}&h4Z)Unn7BpIGe}?MrI{K?t|JG|t4Dm+3wx#Ua3sF|+rF3w-WEmY?fajLi z!7Yz3;TyaC!^+gcvCuGVJ51A={0e0{e>|~Eeh?=Spgn7TQn!juSQ)m~t=MZx-Asy@ zVy)&+d9z5CG8q=jSOeVVm4q^CWir$D#E!8qA(VlYVe6Q%65G5?eDg#zdrzHt?9@@@ zCTr7A%-;DJ90~4oz>9zVr!T>9fH^3}CjG<~WB~0!DH8~W-5^e=vIc69RMOWjcx5y| z8$b;Wg>ecdMaAC&+z@aoJY*mK7MuzY6<9M4J=z6Ew7M_QQ1` zAr~y$0$(0R|C?r|&ZGg8bxgT4nF;mcHUrUlX6!-M+5VQUw@b8@RnzdBZY%3PgI2S{ zgh9qeE&QyMRfR-E)qon=EmGDhTQtg=vJ}1~HZ{H!_Emi8TbX8v|nsFTX;u<5SAz})m?!hEN5=^OEVJo09U}dzEVN3Y4-iFw2 zWnxrpIM!Fj$*$-|hQ^0+vkfZ)UWx42N^GHw38so>cFzILIT#M~C?_X7Kq};$U}(^? zNO+j~0pgJTAs90W+@W6*;6rG_w#Fz!qp-#XlX(cc19Ae;*!cSOwQuh~xh^a7(8+gx zFxx+wd{!w80o*Z*M2-n!#vE1xa3ehf&=K^!Ir-Cv){b)N0t(T}q&7R*r3}&;+p_t{ zegjEcRz~;|={Mn>ppHuRr6p-{k2&x*(^@9_7%7?BC_9KeHrB!Pna@8(6-ahQAk0*q zTqp7il&LmRfgK|{zhci(^DGW(lA>0I*WaRhj!o`7HvIy1Kqpo|3eiGl zhoHmJ`a3%!q;(zyL(c*7P>6HW=K4Bdg)r&k*vZj6l+6&Z-~)gBX!chJPGW}hv)9)C zW;Xd`3Y5;SeFVD2L=`6q@IoIW8B@^=jy2S3fyp+Gf8?df-g{Le~xH4Mb z%Tb2vdqtzSZGG=D{YRL*;r&NIqg%572!k8je?+#g`ff?2*PANR0ijI3{n^Hc!w8hA z_1GCC(-cp$l%Kc`H5PfqMyr)+dL~QNL@TqQ>OxjVI~mu`7RspJP?s9!AQpKp##-b7 zVn8!m#1gpda{~pRNAU1Jj?xqz6{U3yZIeb?@or zDL3X;pcz&M5EHG8pK1CPw7QufT?gC`>88#@i?Mx}n=M=*w`H1``czn%)LOT_IQ$O^ zf>$@jWJh2xQ>7@2yeaB?9b`VII#l25c(lIP{W}i3(pTEPwF-xtEvhxS^|yUZ`c&Lm znfodqqrIh9MsH}2GIT==WwvkV zj#n7Ep^>s~-_RejS-SUCWdYlLv;|WTkd8C)+h7o-WJ}Sf0TYoP#SBskn+hhNjI2y* zuv@JRW5XJj)>kG_CRqvFU#G1PTi46Gv*lU48(uA30>K2+qz6+fn37)ux`NM}$|z0m3kd(F-aodJhY1slENNltjVX6bB~ZDH!{bs_TF1I9H z{U>Zm$oiH;t$UD+(>J))LMFi!KX|uo>%J5;DZq^TYTQ23gDLck`KG{{kTGoam5God zp1)!j#%3sZXi_7x-)Lnl#%7Q-Q$)TzbSx{w456p({g?kCJ(wDC%zOJb)(_8ilSL94 zfM9?cNfjwo!K)Ya0RM4x_LqB4o!xWx;=c2j4zKOEya*c@z4C@a5MwzsIUNE71Bn8f zp!OcH5vYIdAPk}9GY>m}2<{RaD{j6Vq`HNTPl zR)R3Kbu9!Z;v!@4Fj99Nu7UO3{6w=-Hk5W#cU@iZ>l)Tp<H=da;|5ddL znGfQu@Ugv0o!d>0zf>8&CpKKhZ+0SlL4d?i8NVQ8w2Xgcv}%i^3{`D;2AicJXU%RH zLk&4^cyB3|=PlV=ii6+S-ck~_wYQWkOXs1iU6?LmXQE2Ec;3oyaBt#1Os$j$gHvR_#l=Htb( z`^2f2XS*e1Brre*uJNtvmU#_b$mzVYzWb5W$M&AR`0R;8CZ6C_Y)UYMW1w3&0$>Fo z0)k;nWi=@w7#(E1P(HNFW)fHfrUBmoFCJ1u z>TaMM5YO7N9dAv(>~&N28$O0;l)p_+?AYZkxHJY*GOei$yQP0*z-uh>l3-#R7hrBG zy%uHuL^HuI-gObA2g>B8%|MI1PTs5LJ&UnpCyTr0c#boqgEQDH z)!;&zrK`cWepeJBa;*ke3e*0YZ2Qg#bc|?dLcd2xncfA=L^s1z>5Lsg17Q{*atF4p zqbuQh79A*1h9Bz$lgfSx%a_tlGJ@Z9G?bySHaLDWgjGvwWf&Wx9A&>E7-hfAFFG+< zl6~&b+SB;@i%4KN1P}oSp*MgXKpBHp0LQ1Fdt>bzudVM?{ENmmK%rsNB8g6WzSn3 zWWMUN?fCl+AC#G;s=;}7Q&fWs`+l?4;KXLB2IpGU1)9Zis2W@lGFlD3lAC_0CMZYg z?y9!!Uro?-`i6@5s_$~PhWFnPF)&1&c19I>5%U8DxhIdzTPItJENCk@;j1q?8cRlTR!IqNUu3Zx8*DESSWY5-4EGT z_L~~lkTFR%Wz4*GGCG*qTGEb^M$AHlGMS;6#l{7MsU^38GEvEhdz@s(u;v@v%LV6hTI1931~wf-bGo{4(o;> zKS?BWSJmf6tuc;y+U4Cl-4LnR8Jo+MW3VQ=*+q@Exx2<|hRliud>x`{0K=qX&fHKJ|#diQ!CN?t-USBQRi>0i? zSzWeCN{eFdAo~}ESN|^bn^-d_uED?^3KQF9m1l= zn!W8GnQeS!h!kVHB(#)_g(0cL&TnM~R+^SP(ND=moW13<&GxYTe!xf%Xq zXK)81(FOS5|K*QIE%3qnSHidRN6jsl`QtZn}|iN*Fb zA1By~6LoCxkYK=Ja;ov;wy!)_a?9m($9yTxGsmwEW(sBDL z200&g$V&)k+$S?e-UtIu#v>Csn%Bqh;$-Yw@U?l5IexB^PvuYK_&IsEo<=T?dx z@NnnGd1iL5vz?FcHrCG(_rO@3e3!|c8|RFBPhD`pJmX!b-($d*F@yWgytnJje9V@y z4-Lk<&t1Il-23zSa~B!Ux92a-XD9-?aG9As=PxnXcj5A$cQ5g9-+K%$5Rw$wuy`LAgP4OFWUz$e}L@Qpp=Pt^wPQG zvpZSB5v(BcRTW#|2#Fq13&28kEtBYJwEs7K16Zk=6>tV7xMvab!HM(SV{CVx$PLMW8+9=t7%ax#(pT?f<`=OTbHfu1 zx__~&-w$WHZJ@XIiq3YMQ|AyVyUA~=s*nUU3n>!GBp$EyH`76xlDaZLDZNGAv zblfi-Sx}nq>U=%6=aVnh`aP4E=W6&c2gzH`LkC%{oNWJej*zDudntT_c}Mwj&N<{X zjJ%5+yj|>kZO*n`=B~W)?ww}g$o_6~gq&ErtYos>9(hSt0k=8HEUE3M#$Vd`zeOZQDtj zW-^jslKf|Db|Bp)6>mBpEob`gDE>9UBqhT(*(C$^MV^MOluYVnBm*3$4U_fQ7BMj+ z83PC7L#wjqX{Lo%hT3eiOEfKd?8F<^0g=k7nVKYY!~q2KhAfC^Ko9^%;VD>+O6LG~ zfFov?$Q+4d0%aT|+IiDYWTSX3NQh$%T%XnNedsL_DA|;2Lhlyi?9O zT#lW$!8bNTcxAftzS;Uci##3BaA7KA|ISn9@67bc$FPmnubN-RtyU&J&SsiY$QEKo zt&GG>T3&?MBVs2VOGfz^$9e>G{&;b(ZfjWDbgGlZpJJ&dg?wLaq9%p4Shae6RYB`$ zlfu@2FY8)8+ayi$EzP)Uak{JROtlfI27OgnS&!yqmx37*Gi6Z89=EmPsdLAvQBxoJ zxHDFi(voVC{dP=Du8$z3`z)%CVkM)_vLy?KP^PL((krL4Nv@Ugb?tOObRAYJ1($1@ zlO8qHZx`&U>dN_7bH)}c_|)|sY^#)P=w?m9UIj_jcBLCTsA3?;L-pH%2vrl_UURoy z*;lPmPt+`7E#B@v(@u?)nM_uxUE4jieu(XbHJy|*iQ8`?+1__o%W?CZ?!=#d#j&uT22Sf0%mCMZM4IZw|MKeH| zG|DDkSbNw4Y*IERacXu3$2oWxvoqp`E`Nk{hG$_lfCwGi0eu2=Kt=<_0y?RXg{TjW zCmx+kgTXNz0Zp-qAuW12CGZn{5=dQHEmxgTWbGN3*w#ln=(>n^`vYZ$ zJXr)Gqn<1)qec82r55qG$o;Osg>CIqIWTH z5UmVjw+UC2rXD-Zu^U!K!KRDQ9Q4d534d)z7!eQqz!wP^x(}ukp|W2>mpm(FLd*~i zLo*+1@5@YR7z4<{!<|>9Gk_R-Fsb|{UY~t?{rE?1A6>Z(DG+EC?f)S*YH2jDBF99o zhk|M}G&u+Z0@eh{3zW>^=YcY!7Pl4F^x^&xGaP|HJItRG%AlSBIbq|=JQ!tEF2kAd zDvGlJD-biNb^u1a%A;}GD1jiBelhvNL(?}>&`x$~!M>bSmPCjhW04oZZ#2KHM5gup z4KwGsR$}w4m{{OqXY4d92mzB~>^3qJwQtNG!R}YuN#@z^mlZpU=?8x18lyjRU7qU~ zOT`l&e8_zx$M@k-TmGSn&W^$#ExC0&RC3GUCY0P-$-8{X?bdI=919u8M%Btx5Hc#9 zT^TJj=O{yk=0cg}3(bw{#(SMYb0$X%%^g%D;L2xYP~CXlx#G~e0Oy560;m=cY(%tX8rOv8etVAHLJzb;_uzax|}>7bDe+oluK6;{R+M$#EBnORm1 zABHN>^OqEfRZBt{!a64OF%~WfZr+%Foo-4bYY@r+6e^kFG7nM#I?(32LKy-mfF!7((ITe23e*Lc z1M1S7SkVu7NWUDiOI}iCzp^rb#V}!BX9jV}GpXdKrn^jA!K68!PC|bA5&s6}%D$MF z6v`w!$wS5=|FSilHwW4}AqA9MkL@6RIUIDHF_TMnpbL~)z5|`lZs87eB*brE2Rdge ziC*3RDi~_FoyUI*U%DeZs3%Z!1%+BG$hdsOjJr~y>OF1$;0lrgLMk6qWWQZ|=jJSp za61+Ii?BvmkO3AellfGZN$V1~d0N-y`F2R_GPuptx?TU5cF-Nc-UVt1qL|5U&bLs8 z$e`;&tjVvQzb-skkfL=+;Zp2F(szkL`W2+Fq?m>op^S2ww3EE@)8DG>)l+eoaiJv` z%fy%vVaBn<48X-YCZLRc40QYb@$@cR7h%3qxeY`lls!Yqph_XdBhgaJn87PR8SoJJ zAgF=?$VNY37#(m4+Ls~7Qs*52Wq$I*d5#IRL9R*?NRULf2q*(IVXRttv}Xb@B#)+k znR5op==;Y*vQEcVKY#!1ZBd|520iuSI$!bm70SftmjTh1o=KrO;~?23x6DLL<6S`^ z+u|lsF4K6)Xpu)W!Ypy~V$%6m)YaJHiCw&(^@I$RF^-hqhsza;$~0`cLQ&(^7m5O9 zHe;b^#f2VWfH@m1EbkPb-DlLf!q)0kS()lqAK;kOP=9?|Uzt%lL?~0~kf?QTe>#Ni z?Ldd{5#FwJ$arr#;#T&SOUHF*nvb|7xi$Q4`syi{iJutbwliPH-nXlWsU;ukE-#v4 zl4Z%U5yRiee$zkFe3MWn5>b7A*=o7Q4#{Xpy|_((Y#%aU0VZT(m;}UVi*iLtvv}(M z%O9wru_XKD={;6cBOeikbag#o1u`;V9WqcNh6-gs1Ar9{LQ{h5!_k08YJMR?pk#24 zsS=rNiJExgRhZBSWmNM-YYY_xltHFL;;Eik_eMl5Kr4=8YfPvnfEOj@mS543@_Um* zK)tJ-#^>Y~2_~*^+p@q=pJWoyN^Hk${rK8XGgiNT;)F^m`52%~#8pXC#%nRU@_6EP zKELfP$~ZVCR(Oro?=fd;y4HVzCFu|o;#;@}w+= zT5$MjCdM)lwn$ek8s=5aNL=oMWe%>hTF~rM7oO&ITJW3WRaB#$L>BpBr+dP z-a(3(VlCs=rNu;mIVJ*$12YU-`+3!!tYnVUT##)HVc90fM5K3tx*1nQa~V;|2xStY z8GU6;kr;9|z#7pEPzFARF_aAP{Q7rEFtL_X)oiw<&B#E6u+jrlKqR7;YeE@}^)##l zZKQVr^FSHBVE{w$D*}{kjXF+Pl?{~P2tpaPy7n&MlsGJ@A^^%z4LR?~rvPd|AFXBB zYER5-#W9Rum_4*>c1rpRRz`6Q_1Ip$nB$2cL(G^|ik>MSpO8gL#x0P=&$<&%>5u0< zBb4D53Z*9*!`8?+D&X{QkC&sjZpJEn18x@EUX&ojsml6{Ylr{5yiEjjT~MkZw_DhF zXbi!E+C#CWlZnF36m(KN`-5q!NX3~%-KXkUE7Yq*a=U`WBCmegwvxWOY*kR$*4x%K zqIPo}>IPF;tIEezGTw3hO`dI{Dn=rTsshlQQdXQ!SJYVm6WzrRl<};FdU33b`qy=x zoGKcvGMsH%veJ^u=&FC+HZ6HgS~5lcLp`zGEl}pJ80EQJ!@yVnUssOO#?P%klqW7i zm4>lb_I#~+Grq10ChT2s$|4uHsmEpzWMi_aE5kN_B$P=_lS~XV!WVmGJC=sgE6>i@ z%$Q($a{cgR@);I*R(h4NVKR6q3PI_DscxDQR4AkC448myRGfaAJ@*pfN}t-hy_Cw!W!*; zpPfBU0k#?=od$)5KpDFec%7MX;BGPeHJv0eBlUuUJDP66E1xyn+!#^GIF2la2-PPP zCfa*1b^vXQQzK%p_V#8zO~*pm7^NxFQoj;eayF@d-L3zX$U3++{OgG7Uzc+j?bulT z>#9b=WSmb`*>COGs72mr$HtYRrUcpbnhB;h@3q~O;KLN%`Dtx8B^Ymn9%)!9x~ut7 zi%wJJ5gd~rvP8$#`;*s6AWMu^(*ehM#SPH~$0>v&CV-2q49Z`Yu9(&fWq4L76ShVW zqm0yXE0W+?A6I%^TPGjj~|`>`4h7jcTVT{&&#DyMk5&#OajDI zV#nc^Xn2~_ZBJ~rvTkA*+=BvMTf^TpQD>6-B+Uv$GZw+wNK*2TXn}RcscC9OzD7KM zTk6r2Q~eDyWEJLkv?&4K?b}vi*S88YgnipqVIQ&)I--=imc?4SQWdf?qm9s4Mprul zQC;BzWp4dyH(FvoBt*^35Xsb8stg^(-KzAY)6KZ8gl(%z8IjHm*v3>bY*imugXUU6 zmYGW74#9TcLcQR*0z*ZBwWuMd=QVM+Fj$^gy?rY%jaDZ8Xq<6*s9t#j6mv{$TULgd zv|h^3>$WX6OH?XvA!gzxVgf>`ghCkrO{5iUvozYlz+6V8rcunexH@BUL{^3n)}$mm zikSx%ow1q0E^kiEY@9hXeRAXY4()o?xUjX38rlN{kcQGjPzD(dFDFR)`0@lijm9wK ziQ@BHw~5NipoUR!W3%p%Mr5^g?X%@%%BkpaP0=;=O`MNh5vb+O=~oZU4({F90LDR0 zJv=?~)9If*H+|&5+A&!x#W6w|;h+g7E@Nt!qP%vH4~y#`d6SbZ*_I|1%A_RcLe!aT z63Q@8D`VDDgPE@EUu;b<-*r3{$`EZ+4kC_`;Ufd%<=Mb30mWESKmQkyN5aj|quM0x5U4=rMHJq`yGqde=F7-PWC_};~&XlCE+ z_}h~&*%FeD)9OpW4diZ=$Hp5sQM*NI8BA$(OWrVsu(A6RheE?!YLu>*W};Qok6*n* zTN*f+PR9d+;e-JzurH8F%m8A5UnpRhB<9bqe(J}QuOFN}`@qIKfHvMNZ`^CLYvXJx z(#^*)smZVN07v=~i87dZ_RMu1-nFw&Y`nI%`Uy3#fCeB4jg!pFQ1h%MuAB#h3T1+O zD0gz_whtvZMq`-Qf6(Tb28*%dDD&*WxtR@61~3Hi(?J*UIah@+G|r*$QF;TzD89lN?j@ z-A?*2d8N52k*HUP-ymR%lC<32f!g!|XEvn|tY|9a(G99Q7wvmIySc1R6V#X}uwQN@~7fmDH7 zvJ*q9n#x+W%ARVL;mpuNQvqUC-c;+tPX1Dbn4O%og49}=Jj56U({!|ru&=TP`NFSs z6w#)Jy89}zGMW+KC_@mS)0E$9RrBAO>~)UKSem`#a=UgmsSsh?Ae$6s ztIbSXMNIz5$;&VZk6n7|pTh5^J(C!ant zz3cJWOS?AaFi!G`w;3Emq*Il!rjc^|g!nUxD+P%&IBeoI`F_8hXi zZVy!}n1<-hax*ol!|LoeTo9O-=VhYuN`{D+t8y7axl9UiQ;(fzV{+e$f6ZLT%9vwPa4L>*kiL>BUy_xPW^kNU z94Ny>E%G2~m|>;YW9G%#17u{t1n?{37{jgwP$0k&G`4UskRpWG!YzCZsDk7UdRu1< zTMd9k?8F4@c=bilj5aeB$1pj6>ba-kSLQfIN160PXrT;D49PDMj9X6r@O0P18*hqT z2s>yB-2!FYidqDJ4kWR>hN43o7qtBfEQViv1VmA1FLnr&5yx1D?L*Gh~rAq2l4qSL zxH|ESy7n_U@89ipMfEAs87c;JQ>0sav z&ZHze1MTolWF*rRp^VG0HN(hzv+i1Y6U7X{vub6Cc>cQN+o9>u+QFYq{vx7)8_AW4Z2);pu!#5 zhsMqZxPbG-G_6)T?#cTuT-HU#hhBWPgp7-wBPD5!kTGd^E==*mwV!B&z=ZdVcS|}h z32_vaxBW5NyD<_Oady09!YTT&|7t3$rZs)bcSHipY|@TMJiNsnkzg7&X-A|iXG=On ze|ReviTHfBZ>-6dBQ#G}}^Q~`vYuz;e#5B#%3oDu!SM(55 z4%r(?x+N5y?_T6E=i0NHV{-e6bF0AtPTak8nn}{ZF=a2VyGK?LMz#HA93myzj9Cc- zVLztI%J9%W2I^+i!&=#N|LSXxY~Qz7{to!yft_!h+x_mnJ69fEUF6|v`MQ(^!LPuw z09*t#AP?4oARv$45s4Kwxu6qU8ITg9S2mt8e{~rSX0JmN{U*Qq_#U|ed=baM$8fd? zbovR&Sn*50z4_LMwjV#YOTuU`mn0?=tAWx~1-T+#5y}Yf7)>W}iFg=oua}V?OpIZ_ z1d(3%ap%e!BxC@7`R#9w?*07VLta7fmj7i*1lLD07rg!?KMy}E|SC2RS(<)PU<*D0W$cBycLI$`TFMO?H9L} zFfn^Cb?fu zcQMZnRYmnCV}w~d)~nUDDqDpz@tBdifQ$jn2x4yT`U+_FaEx(7eX{*M$d60gpZ((MPp>ZDq)0{M7BGzy zN}uAr+tG~O3^1yZcQG`cF~B#ZqUeqUWclC!`Vf%C;G7^NGfhAuRKQe#^MfF&#qy00 zZ{A00?BT5k9^E|u*yj5m*}VJ1+k2EuYPBSy_$!i5^0J6&cvyRkBcS$r3T3#MJ{wBL z+@ES+E%JQGC?xf*#bBoiPTfZ*j&G+1x0`9_^9Rmm@2! zxPkEqiXq%xj-eRBl~Y~}A=7a7%>Z3Fj2WP?uft+4;1nzt%FM#zjcyO0N$tTj)wR;? zdA4h1hlGPd)~KY&P`RDOAk$97btqQ1Nh7E>dwg$i>Eh5lq8GgNnz!!Z<}m@D9qdnu zh--prfPnpj9xRoy;^Gcmrd9?ll1tR<7>Dx@0FlU?v9q01hBsMH!CuEkLYV;v6RGK7 zLgZ_`j^Sx?2OL(ALd1tb zGd`6j&xA&BYGpt(?CTOUq8T=RSs9Zu@z6tkBC<(vv{>HhSmh@Mqy4d(q1uZu}Att&S2Ql~05l1u7U$+>`ud~!@M%{CD$zA_ErMm*dNWAZ}T zp8Kc4haIK5KH$Nryv9UZvOtH!>e^g9PF)+<>Xho*d>O~7YvWqY=H@HdcXR`&KN1a1 zAWq*lEFOtJUb0J$g!zKpPkR@hx)n!P7zHj&QpDs6QR{m(oRy)`{Fl(+B(y>DO7aS| zHiwaLdj`rd0%b%q@G|D9D^YGU<--#|* zu`p;Oy$kjSG>jyP04_wjC8#5&;)!A?RK1Mg74lZLvxbAgNCx#Wt+r`sz?=k=L3)d4 zeGPP#y12E;A0;ajD?AZQ@@}bMGPRU`oYuFimGR2Q%g2eiKi8S3Fk8st+{P3>l!3eX z8E|~D=ctp);nh~yWS4BoULf_dLh9myG+GISfb^l2*n>um^~2vo3T4i~J)}Q=OYb2q ze>ofXki^tIudXV48ECaL@l2(+lYE&7K?e7j>Yl{X0ceJV=-157CTf! zSL0+hbmc8PX$@T&Phdk=LHa%oUEecd%2(??EY*&BrY4wT4*Ew!f^qYr2oRW!fLRR%NS_QA6XLQE_V|GCa%vZ4ai@W~V+` z>;hzw$v}6)C_Td>XohDApp0mSICt%bf*WjeFI@Z1CwDIE7fj};C7AZZG{&%kXa-TR zzy;I-b`hxnQ$RMtwciHj~b~cg0CPdB!dZ>_{c& zui;_`7Hv13%&q76+@^MN%V$S&Wm=(F(MfOq9KbQSr1qXVCrt3D6?+$Im_jy+wSJQ#JG5I8)zy}q9_;mmm0`uy5*OJkA6q{qGNZfZ~f4X+xnRVacVHkH$UX8@2 z+;`+tX5Du-W+W+|WtvXpEj*2M;_*vTMDDLZI&navi77fU4A%a1V#szQz@>IAs3HSK zLrhcY8FNhO$7H@KXeNpo+ZO;|+^g)89gi6!jk05&X8ns1?=>PS8TMCw*i4AH#mX5- z(l~dNbufF9d=m*KGc1H?1~{TBRwxrbCej%nG6xoD+>(b81>d{7*j~KGMhD?qdZ_$O zB1!DhJ!4>5ERuq2v51NA2WzC4LZA%kEyVWJ`e{F$CJyTnD7 zak=Yne;Vp5S{W^v&HDK^2|5i{ZmMKNHr8M>?kS?uLNe7%=|Y+^Y*qq=CH$BtmlRvP znqA81M><8}09!bh+PlG_f^fX9hzda2i2$@ZT zY|LtsIm^_m7mcn<^$yswm20&w)jOc2q1S54(oocrzqiUBlV-{oD~@n8K`L>^GvsNa zn^FABBnhT;%r0JeTcs=Vu5uacn7o6J@;CSTFP6qIcTX+8CUORZsU>@56FgN5vlIHt z=%?Zs(_0=QE+Jx|CzLVqBzDO|aSXvkZiW)*#qtfvS*WZARcHrn*%6q76&Mt#6gU+s zm=yd%vBWHRaPkGgz^tHvfsYZg^uvh$gHSkXkUz2dOC>(F(ULfZVBQOtw8E>ICft4l zV$3?3>{GO42hgZw%qv-g%_JgUvxgDNxEN17`8lO95_l4Oj6@~>szS?onw}a#-YoiW zK|z>!rDt2BL}Wf^%k)g|n>#S&ar<@b-{*-D#I)3QSNnAs(I-`x)9+e`jzz|-^pnMX zq@PTFDe0#y^4XVu9^TSWeQjP?hcaDmq3m~7`niz@Qy$fxWr`&OjlKd|vR}@lTG;mr z@u)sbmfdSLlVxwLSnW+CBJpQ~V4Mu~*nux0W5W5zo7HfmlB7uqZoKlc$pK;F$ZVOmxPuXI_WNpu`R$RgfbFi!cFm|swUq)X&5M(0!&$t zyUY#l&4@~d0OBMO8Lvg6w#BFtuHF|c{oa`btP`>_t_b5uGS z1%^0=k&qHd)+yYK+K!58q#4Yf+;q>AY50li5Jtr!gqbEr=W&(;)-Y#9EijArWqfG$ z`A0VId~EYizOs7HQ=9L=2pF50oyD)EDx0w2i0BiZ1*V|wH7k^CQSwCi%7A+i{GxpU z?i?J-V9*B!;urDqtkO!+HNYho$4Ru(mMp0{vM$NPko~6PQnWJFf>|8HNcbiWjU*Z6 z;TY|^B#dS{~4m-TRs?Y{BIx=*{ioT%>8%uj6h zX}0GR)qT1HFQ1+2KJCNV?$h}!^-ZC_eU8}~4e5`%9zRB3d8Mgpf@yeDI)>hu#Za83 zUheM7+A$R4EQZQrr~3w3#-Qfu4O#~?>{)O|Oo21kZxJ|?l{rh`%!7{{oJnrag0oa= z4b4aZ<1 zV>|9y9HYnv48-r^SATKy1A?<8l1!-8ZVx^SB_rVTx-kz2qwJSS?0pThOH6e56}}KW zyq;aU<{PSdCZ*SmMu3YTraI#}kLK49+z4xuQ3{ladlXrP=6R88^|R182r90%tNZ-b>@qY4zJpa>~~hRr(&RH{f7DuBK51TyDQ|D zH+lsZtt+We#(jv0^4EylFJlr+ww9EVNt#JPs4lTY^uOuv6VZ%)vsI@WH+*G^35qm~ ztW11UfHFcBC9aHdycNw5%n5-@N}1AY8hYjnTNgB=1EzpE^nf9Y1Wdugj;xT?(d3Cx z#$d~fN(Mv%D4G!bi zaW;PNE6YFP#YZ9&5p=Y@DajsEOI1&;uM88>Op4*tRw4!1DNrKxJT$N5n;ttEf^}=K zeJZW6i3)|&qg3>4-JFg9LDhyvj;*8QG621z7S@M59LK{KA6XxJ=8KOG-}+k*p0%uE zw)OXvDM@tGT~-lRW=2*~wKBc8Vn0iLgN-WT>4?O04*T(d${jmBz&Q0Vi+$d6E>3zj z(M4k-!{U6hdDHN4wyYf}vrkz&u`X-pseFyjAxi;DBaK`Pl!+F&)q~XRl99?0Ax?T1 z7-pJs3!Vg%n;8g(xec_dR)%0DwYz4T;=tyjn$tMux!0!6WZjRW1!hd2rn}I}6p}_v zqj8*B7?Vxx^tDeDi}EpQWl*B*UfpA2aOnk_5b?MJPZ+(zNI5VE+eTaL67ps*IkkB8 z*5WnG#p{>LH|$*R#SPY>^!k8MhTny(82X3PKDB%Y<~O!(h;592sQ`|@(OyfbU6+#a zN-B{d!DMQw_K|QNWGQxG9#X9uH>-(B?UGWMigEWwYuxq(F}-sn2ahV5R4|EMQp!|u zj5;uVu64!}+?1s15!+&=S59JWi#1i&9u~QmwL7lM+Oy)ds>o7&Gb7lYLzWveEucNi zbPMRbg5eUZTR>NRdv}Cna)h-8jAyCVKqzyNT7#h(Q`}|5D^U+vm0d~ujI4K~)!HRn zou;Ch^xPS^8B+<4=_zRKZu%I6l}Q;klMn;e1FQelF)vUit%Affj-nQ=^X`7(XTlc` zj^nNM*tKri6-IS4Y1IUjxwQT1ovW_`f6#3JbP~MMqkF~xWk?%Ay#Q98UcT*#&3Auk z^SzI4e&F+~3lFazxV-)GPi$TO)YheME`JXw11$HqdhwR?J2%XA z6aX=Xh+@&v15$t;fe|5;iNkVAvRR4RH%+h;tVpxTu^Frc$fma_52K8co{7+EXu3q0 z&r@ErxkgbZMD+&)4yG zL_CY4SeZgm#wkKkqS0R!iefxfC`v*5Jc<&j>m;{N-_y=wIg(> z1~ab9%2=^tvp}#*>UCoat72yGn_-LtTbyRpYQ(F}@kVmw%5x!I)PFFSc%Y#HUMcbr z3P-GFicy|sdJ;3zFpLIhM)O}LxVCIxeKl+fRY*`KLY4y(C&+k7LIGuHF92$}YwOuN zcUBjlyLQLccU~-*+Pe0o)%!R-PX)kVyVLrZOj;`c$R4c713xt@4DCdl!1z04FL_A?{A>e$ital=fptM5yNM$ ze|=Oa(^bIrY+31gu1Y_4z-QzsPu2a4op;&qAVBWcg2DK3@8#z8N;LvD@l>6E2V$ny zF%7a`1IQu)Q%kZ5=ZuuJxDwA_M$KmI;L}?b+J{+vjG~#i081OhH!tBscWc~!*}tVI zl7CT65@iX%#Zj~WYM^I9(?_NPOImLdpg>k4mr*N|wvnvJ z$EcEF67oz0<6D+a6e5^3U1D@%cLL$>5Xmb!uX6J6F)C(=>V7mp8R1L(W{e>#afAjc z-cGE0=N-^Mh41!t?>vv`Z&1HY?bkD3_#KW5LT2Ik#;hczDQ;S&$w`u=I6s+^6wv4? z6+0h)r-cxCKk|K?+NwYFRVUnX*Xp}Los%of1}9B3*aHu zPtZA3SKYgOQYJ>fWB-JRhpNsu86|N{N|r8M*UH3}P;Q1uiwSu$`Iz(v)gsULS17~i zJ043RMpZJ(Woq@c{UeEhm;h))^-S`fwfTk*!!Mlx1ppfHsI(=Z|D zrH=T)&Bs2te6i>nK*pc!-|io4B%|a=I2X!jh?kNv(WK2IgEAx8F2!iuaSTejFukt{ zKnx!Y$vHkJB|+J}efI>s$uzkhcs-Qe<>Ou1#0ma?zTdUS9I)SYT+3WsH>laCL509>T_UmE&(rr|TP~YjnGq`*I*XAmwR}J)_qT#b4@fm5@OBM~*&uUUgIleZM^jRj13M#XI)HajS{;tcuWIoi> zCJE(w?D8B{hDQ8rS(7S?vK{XDFtT4(s%3r}Gie7bf?=#>O^JA=#7spphKboFBBk1K zonexc(+zFS>iKUk-;A9MO{zf^4a&@vO#k8^-fqd#=eF)Yx63cu)8E{z{l1aRy1aUb zBoTQi>blbjf!_s5L$gV$zR|=`)J?TE%n(crEe?P+|M%Z_aJ&vTf4;mdWD&{`!ENE9 zQuZY%%m`B9dS3Yc3yQ3nn?+K8&BO);(aPu#lsC&2R5BK+C8bC>zm8p2O#D=&{H?Pu zt`DLaBE%sPU|mgqV<@nXrANPG?%K5hWK5|HO`7a;5)bSBmTUHZD$7jN+T)pi(al$) zYc8F1!D4>PKKEC>n^j_pJFj2JjM0DO3QXMuc2nKFyu6Q{8R`sECS42Bxt7kmS2nI+ zTOW2XKnz!J*yDP}zavUPky7WB3z{joJ25oMoy3lX)%%s4CoyHaSC$}Xh=9O3% zqcD&2Z@8J1G7)jiGgXmN?Qk<<7l{Fa6|LK3YXmn*nq;4L!l;y0N`^VA5syrva%^T8 zt#7hU+ZBUF;_J(|V~&R`mtyG#W#*0SFp_~gd35pNi@UpOiqqXmOmk`V$<4)Yq7Eh- z1>=Id3od=P#7>}9q{W;m+!%1gi7<;ZNlk`FBKqRN?`&Nyq`%GfkX!q%WXbiw;*qBFc z05Oe6Un3r@r zBnB~7FZigK$@$b9l-txwoup*7GD8E_iB@L#b@exH%=QlDEYrP1m1oZP4)vHOL$})GtQvoz`Gui=%n~`R4+jgH;%Gw(?WieXdG@F!wUI|4WIr%@7EFDVT=bmc)$s z20%kLO1ok0`#!t8hby3RIb91>4h78+wYzxA!Ne}-zxM)@gph?XR=)z!s*jOct2*CE zxka&rws^{A)P`5tZx;Pf4S6MEsKj;-7WeaLCb5iM(CR3mcd4}P33&@KvP9MeGC!XL)qfUNt}W6SpeWq=O<`cJ>#p-lCa z=}-prgJBH#_U4zW*aZj3AORRq;f+UI(u*N~)1s zQvbxWwd0aF#t!N{40dt78p*gGVb+W5(le%(5@p3gJm+^-_~i)gmw0WiXgwMR{i00a`j6gAfIt(R%p!BT z8SI7144*25LC}nIB7)Y~*Sei!`xe(3U0B{}lbsMWLF01DszJ?rI zHnhpnTOYNq*mcr-Qw;ceKqoVr@d@>JUGML5Ao9UA<3{Z(S!FbYRZB*ST17B{HKF=T zEQzYkq^dRoh`<+iHLF+B7+J@>%FwXrM(76V3Z5lqF$g6Z3AL!II#O$6x1h8WVswH< zUSu@sG-)U$NsDX_i2V!`!nOt`fIhRlUnoO4k}i2MsiWx<9jcMv0xalkfX0PmNGkD^ zjjvJfk{be`e0_2IeXDP%^Cg&wmYCeP^^I>W-fAZ%01amlB<i;jtVkz<}B9l zimVL$bbhwey~9q?OR@I9nPD9Kw|aR_uRo}HkYU5_N7gZy#WM_f1C2I1&glMrMxPS{ z44veMrU|VIL@GMmzg+ZIXvV!n{Ui~kcvw#`b;BlHb7I@(bn#J$Rbq~-_P9Z0P||=i?48}W}|xE zuvP?gDOJ6(>)p0HlN3WdN%&zg`d?!3$}2a}%U;=}3OF{e%(a<`dtUtU^#6?wi4R$i z(t-^#y_u5okVs(5Oc9e(kFX1F*kT~IbD&I`P1-aDJ=ZHDP5=qq`^>K;=V#ZC^Dhm=QLv(&mUT7c#`d;YR z6D5qD4sE#dR^4_mKhE0@3ER_n+u{5;Z##s2FYC5r@XAXlHDIhayOoJ?eYBH*B7F?T zjDQfwWRq1(sdAETNmYx_+C`ZOVJ^eXG6X7BZiba0o{w#QZs&UM0!SB1pz-9T^&>?p5fGH8-GVvj}gb9ik8W&JO z&BJFGZ~Exw;|hvP<<#?ct*$`W_~WoU2k(uLu9hfx{PE@Dx9?d#-i^xQ^uQI7>GL(8Z#;`Ae#evSKWc=L59U$=9 zOlbV6yAfHwI{GaW>xaK(lJh_Fw@j`a{FbTb0kRVhzq%jOIS*Hy_mw7X%lD9&G9 z(MbnQAS=7};s$s3~qrSxtBa?cD@4Jah}c^Z(g9 z*I&8LtBfBN5JCv4L|lYGTtp@K0FgqgM%0dDyUo3j2AW=IOA<=bghmO?O`-AZIdScn zv?Uh=-}qC?H~7DJ?4SM9(!09ZC+Cdk_#BV4^y-~=_UtpWXYBXc&wAFgKKf6a9+7%OfE*m#7>E{;%E68Jg0b?qV*C5z`hIe1^d*p_!BLQl zV|N1Qxzrbb`tLjxK2|;ku);(`ASfAX(;#O2#`7Bh*pLabL?mjD6@$6_A1FH zWbvWgj{8k_?qg2O34}SrT`Le)E3=^*#nUek&b2y3jpFb&s{IB#gioc8$z6oqqEa$L zS0*ZHwVWYrXaI0Q|C^vT8zDt{CX-jPno0Exi44t468N*#vTY`2n(&)JK$FNz*s3FC zWiO|!$(&1q>K@RHNvMQ`4N!x4^xZcvPrrhjOGYS=C}5%jjt9)pRRB1Wf}{ApB=r+M zhLY)+;61he2P&jUGi5x#zWnC&2UH=2Txq=|5856fZ-bKW^jNsCp1^Hfy?i2>D&U|H zkcZ@zF8<^rfnzDUz6Mn$nnBoPQvxR$YismM$!I}Tvyk<-MBVM!?Hk_1MXIVu($Nf0%69xSs>gk^8B%NfpD!o8s1XprFL4GomS@b zXk}{6Dp3noIlx7NUBugBkWDp}cT!cH>{WI%NMw_%T3`awS6pZyvRxl}NxiGD!>C*rXDuyDOLDd@&GZbSp z;n`?q((w@uOpZOHzuejDF@q+9FwJ3(BlG%DTNEZZ)v{I76Y)zQUf-UnK(4)qEX*cgV(KCl+8JeN zemMPBa15X%xuhVNa3K-@{{J|G!~W|(ev=o*2k(*THAun-yF@*g_WUL2^>?eb^<$QBu$95 zMJ=Wdt--cr$>v;{)D9R!Mv|xenMuqTu(yeIb?!I_cr7(E5(2tMF+;6~>d#e7HI7$B*7(FdOf@#=mq~SXaW`e2Pc~r_{ zZ_y%_vvfSDgy(oIVoy--)-YJd+aKUW^lsJD;?TWYxnUg?LP0H%E^HgB4QeS<_xv5y z!3KwED5BF$9wzCK6~&>4uWxrro}$o~s7y>A!ZfJ)0L@ULlc&PUkYTZqhl$`O zp^`?kf1pej>ByLPWc|i^`n8~hP%^17qD=aLLGCFOxdYud_ZB!TGE|GtqO# z{6q(9&DwOSZ56lOA{N>29n~Lz@eb?{kZZM}{s5={=3iFEKx58%IwJ)LS-kn*>%YHY z`e$O;A9!W!wBmsX!m8YmS>;a5IsbL?Od z+A75;FK8yf<*V;LYb&V0jyTo?e*~Zesf6#zB*Njyc=Na7_M7UbD2vm|AV?+3n+RfJ z2Mqf{a|7zYG1emm_Qv!_4^MAetR(qF?K&hD0geH?gq5j=goGx)mMqy^DGw1m-Grw_ z(~V3jBRGZ$V8y~E`(R7VWNyH_Fea$Mrr}0yy_8AS_!Gnb3{1L%l)Fyf1Lj)j`z*Ul z&m;F;v;Vsuv;Xt*xB;kjB}(5loA{FXtaYz%vNzxEj^&+i}rOoOBm$$n8VBX!nXLgYBWhn#%Ae z#4&jO+O?o03%KE4yKa|kZqq4a5!|>VvQr|OsS@CXdny~MsU;g6CZK8{X)MyFz&Ibh|2-a(rt*gzR_7pAEVp z(^P$1QmxZlnG4@4L*+T=`mMYD7=1hMde!c>GFT=PeOI1SU}fwqLI*B&=ay%hQ|1C? zhU$a4SM~pQ?y5#tNDdFz=!(n2_E7hLs`J%XhEk@4<*$|VccT)lun8HamNXQhUe|&q z@8A>EG_h-fX4pG3TF_+qlJkmSvZC@g4^1|uMPeqfHHkA$fG>=Nwoy$2puvRZx#^)R z(=UaR2~&b{JfLcDnP5HBp zBw=FA#M$tnijXe;^y7dP*e_B`nP_IH)R#HE2+S_g^7ZqZMFqbs0{*I&`?+$}n(p~YMDy~TU$oMryrnl0z}J5>3? zwi(ZMs7fq$sOs3+ zs(>bASQ#Y1)kaSzJ@QT97}PVFR7<_Yx%Jgora#Ar_YlR>D0UNhVTz2RamlH!tbXC! z>nHgW-YOn>;w^k*+kpa1Uqe3~SDWB=< zOP9|~SI%6za%Oe)?D|?JXK$5X@mccm8FdbneX)EgqbSg(5M0Ul%5YV)jw}XYFC>it zc9B#A&FFc^OQ>4X3Qs`8VWgZOV|w`#zrajtnNkHYMrSp)ac}Ky>ioU+;iPPf_tss) z(hH_M?V^*2XPav^xDh82bdbANg9mgHF>xtt=#Q;CiD+)O=p?eYXcx;_x?QYlolV%q zp8hTs=!y>5rDAXk@Y%U86`XdVOU1lKZ?5yyYze&wS7`_?;l^ z7-$BSt(iy43N*oZCILwUcF9~OMxG{f76Ces?!O-2m+&Rg)y66&8s4AV3#s;!%p8N6 z&@gHGm?llZKoP;jgeKx&l1Ja0zJQ0#x#>ser_}?~yXW?=KCu7Z+3CFp_OD$Z*BNi7 z!xGiE*R~9qy8?*8w-=vZTz2x%G9|A7xjFJm)+=53$;TN*jYwn?*ce)RjVDmPH3d(m zkPreFN`^e+*l~$5IL38|K$X1A2YcVaHJ}qS_if8AmK)_e%`UbJYpPA?oLwyQMY~wf z+-B`by}Q}4hoAdVygRiT z>q=ye$ZRl4)CQA86+l#p0|14MO66~Y!WN)RtzcqgF?(bVkgCZ`U z3eQO%*dNdUU=TO5^=7iT^=5b3ZM}4gwlaD4()u z*t54Fyy7gg!YdO@$1l9Plk1#Knru^eb#lpJ*uJBa!}9hVU<|f+InsJ1jvSn3hV6=t z%B{=J1~uQr`sdi#vj3GP2C8S+FBAHg*n3&a88&89PH+tLaF&}%f(fF+tO{utmBhk(o{F7J#f4#Ie*95JWxol!MS?7eU`;ZE zLn0|F2{<{r6NqMpHU&~LgoR6Re%)qTUw}&0NF_Q?Y_rZeTh6i9ITLqyoih^YlVWn_ zn>;R)vnoodLee>tGeF3q$=Tk3r)u_Vs9^H-RVE_B8l(@2F3uhDh#u*mtH{)-54)DW z=LI`M)k)VyvGV{tJO6PAu`~J9yG`tzIE2`lJHjK1orysjr75ryOFu7ZrcCNRG>viy zC7jk~S2Say0T*B@b#2)6`5POjIHp?1lHIVNrg-OH5zRm?Ap6LKAlVcsW1TjsCHH@e&_Y+k6)SYePQ~`=hhE>YyFk4 zuD|o;)eDbKKZyJVRtAh>i>PXTBboub@Gv10lh0y}5-B9|N-$EEZYlNUvM?qP_KFTK zy#FCjkyIkVN4H2wvfvoj695$5VzSOdf-jfKd?hjj#n_3#Ii@yR($lCkC3wfD;9%{pGjRy9GqM_Cw|MuTv+Sf{J89VVrC}RsGFA1zEV4<+!DJ%kTM3(t zLY72#IYT7D9@cA}h|EPT99AoPt6>S5CX*Vr&bBvD*4>`j$YE&cD!<%_dgk#-?olU$}G?q(TT;gel=s((zHhKArl6ENWr^ReVNLWAaSGGV^FwD#1&UaZ?;qy^=Gj zkz^dQq>SX10%Zi0@G*P~)F@GyEq2K$6T>J6lW-2|9Xgd(X*q&l%%=G@YVUhrMJn}1 ze7i1Zu*e&^`#<#-=dd!TyUA1@ZmP+YJ(zq7C^Oe&3MjMKWNL3wR|_lCU+MOIhv;gF zJ62Zqmz&6m%p344e1MNJtSMx12b1n3YYz=@$2U}Gma5EbDXC3&W!=6eS=#U4e{b#3# zzrA|m>Ge0CTs`;L`qeL9dh5aUWw3?BiL{D53NQr(lTmv~v%lyvN)xtEKEOAf9?TdS?dhX&L zOxL=&M<}x>?%7-Pfff+;{3r-(3;EHL?gK6G+(dr#^xq-D%51s`6n-=7uB4It=d{Xx zyOmkpsO-KZH^aoOF5yi)wJ`3EiBi+M&(9(EIv*jGSbNY#B0!4P>*qzf)N)sp{vhP#bZ~qP0a$vCu)ZSvk zC1;sSxPaUbop8zgu1dHB_8lVO;<%B7OBVpnx&Aom0IOcr0kSxDHmlP!p1+29`c1W! zK^fz1ZYH&H!63Jkn=vC`0j-#3;9$7_rab#rTfyt7h4cgm*nN`ubek61)B2y%V6bV#Jl)5&s?V9GHGK+Fw%xi25X zgl`I1Q_JlALcys_hNc!$GGb!L7%7=*EiDsM4x1FpRF(QkzMVMz2^SdmLnK^?nf?#6 z374!dCR`c>ob4=KKV!c>eRK3`R}|afX6N2&wU-yl`~0D6Uavjsa@hJO_7**1bCx+z zSfI=?dcrau&J(t`7hyE|Z-VG-ZB4$oKE$AG8Y~|MDQo?nW`C(Q#n$Or=Vjd&_DRPv z1G=whrb8URtZpLQJr9R}2^GWDiU40S=(p;p>pfP+HY+?Ol&Q2++gcd)m>FC^s&8Ix zoz2TlH#h=o22WV}O(F_5&4F%4#fB3In2cZ)%biFzsRcnRV+dSeDb$fj)ev$sQZ?WS zaf6To;v^3N6EZP*SnI=iDx*cz30}p^3I2qm4lz8%r1r9|md7Du_(bHAL~P<4y?HeA zh3?Wk=KT8~aD`ddu`r`HhI%(sucV~+Cdc;LdMMGSIN#)>kT*%miizd?D8N>mRZHiH z?zXjMPgwOIoArb}#cf*xWj55d<@8(2f?9l`THrZrS)k0Kwd~$vH4uQP|LFA_-cU8r z>2G}i8r?)S(CKe|z%P4)FxS5YALGA9A&XQEZ_f;Z{=dULcP+jps!1ASt!9F!!3aO= zB%9P>NC1FWGQZ`Xch!O#tZC7-W@0^dY~QHaQ9YB9f^F7CHhKhG0R&h9HvlOTup>4@ zsPY>57{VGT8JZl!0RSVI80IK>{ad^%!nbV^mN-c*b7f-qfKKeA1g0?`2Z?nH-z2V_ zfB(bqUR1nWA#Z9AA`QQ0y%3dkch8va0WHi8j;YiOsillyW!77p0=u}_0(*N7sbtmjF7hjnUb5UP(m@5cbgt>cF&D1^6Jj>iSt=lirvyVhuDTw)F`&lQ5}KU1hb;&!&qO7*c`l*2a_W-$|NeqV83L zU`4WGg(?abC1^jRTo<_vxu=XGAzz!(ycN6-k*6pH=UMYsX0-q@b|CDX!}@^5hGMSj4V30dSSPuUrwc0*JZzV&@7x}7sbl~0*7M9qA! z{`n65^p)X&-jdX!S)w1!XbfIC%#G7JE#=U_*NJ9T0d8pk_~K7 zWoriA7Wve<^x**f=eoUj(yMb49g_|7{tNE^ul4^ps%p?lZTymhuFcCZ6B>tuVKs*3PdKBKL(-T#P6#tdaLRx|OC z3Bep4s{$Gn!RafM3C=VGnHLa%0ldH?xC%{b5=Y~foAO?Q6%mgslg`37aY-hwkU2`I z;f1ha%%aufyfHFIzFU%3z%>qrcB*d3VjTj!VzP+{1Vnqp^?C5x2f1Q3o#!pOw*~LYcL%TaWmlJQEmpTH1XL=kaG+x1H|cqmAXF- zY*5cS8Pda^q3aa8BngTP|c)r$Vn|jds*YGL*VaZu!#ViK&jNP-X&}LL3 z{He;S@$&@uM^d{de0Hujv&%v~6$;c%aO#a`+(LN-$VEss91JmCVy`R_ZTa;bG-|t!Bz-2Fk^R z;Ks_^3T2dkGEXQMwcjLE4Wb!KvbCIXMOc$XGb4%Gb+TriQef;}4wPXcE&<16bUhC} zK&!oBWMXMIfFold`8Q;aRobe*0ovR%)F#QeRU`mFMGE+H*0tsdAX(7b}Ok zQQlP!XVNQ&4UYu&`RNubhx=wUCwi?!NH2^Zu0}s*Pnr^Y*H7Bn3d4_3 zvlBypfNW;nsRxdr`}EeYp4eLyi{vbGViDfK!NnrX??SPNNt12z!z`Xqei)FxS$?>? z#Vhi)a0z{kq8ZlRa%xq!2h(Jy=8}eH+N@Wn83Y-2Hb6R)hm6+LAmGqaFO$3wvOye! zR|-T$6^l6Ps-lJlh66_yzz2tkIlwMLjX@m4VkK9cS9=)FCg0cg(gG=c1&(uz?-CtY8Z4yxmH}>Dvsf+K_4Sh$$HHzS#q!QujxghOrl!h`3uSD z|G6fZNG8mE*1gG9NA#=^ovEP_Bu-U+>A%;p6jWI!AfJ;xn?U%+MV72VF!w6 zz?Z|=w+Vk&!qkD87HAbJz9ZT!}%icy~U>LJeM6_0H03H5ga)A4V@>=q2|aX;_;*ylNn3 zDzed9zVbA}8r@}@3fPpynmO!?W-|$$*=#(?3fKjWFo&^KBLpsdL$>D+hQ^by6wLLZ zNkk+Y_>wT8leuY~3Q$-PzDUfdu#tli02v;`tLn*}_=kAUM0JSaS#gZb!z*0#t?GjZ z#PJeUA3`QcFliwJpfs}eF~FCaQKH;h8iqxl71KO;?cZ=-=E`R=C^O+@uM(MBxFn|O-@7Y3TRULe zos?gWM*?NKcfP;LqZpqY{oc}~$*DI!*~q;mOvCBEx6FJa_m-j---9%K$EHIucKu#D z*xFm#tArOP2{G7-}- z>OLoPqn1T>M;#2|O2(RX65;@!5}sB$jtIs+N)=QIZq)Yj9?T_ac6Xz}HCF~&>oV60 zSi=QGSA+yRPYtA(y6j9+MQ>(M8(-zXnH#!4_YT;OT1)f0;)N-l8@AzQmfE%u#uD8S zWv;}!q8VZ?!)~y!=zng|@${Xz->!E^*KZ)5 z6P1myv2%a7(kgkofm?vy>z$PvCkf+$5>F^ADk+7CW0Szme0BeF~ zIIJp#rD5c0D%xOVaWPBPsTYgGc{wi>vX~v~mDR$Rp#>F((NUa(3A#OK8za}n1th^l zxwZB1z!y*p6V~guIami(?#-V{?NmU+NK;6_U(rnc|H__`d3eMcNybgpNU}X2y+-oX zXQ^Oij-I7re!8<%T&td?(nzd>ODdRVI|9kdEEc14mR^i5!rD$TI??BI#pq1tiqW^< z%^O|O0lRtsAA4u}Y)Ms}@%t$sOc_ffAwew#5do2k8p_llSHhdX2*W!J!;8#-fPkPS z8U-;5qUZpjjDk_4L<1ojd`qHMv?_iuAM#h_f#1D9SM6m_Pf>?6_g+rbs;+%@@7~?F zPoKM=e%7Dq?0lOhALNH$Cbetaxnbin0lWz_KrjDlDN~i5cUY zETau}siGOh9Fh<<)+taXop2Jc7wk&IrM*^%MtUOd!S@8PsCo9n+0Yg==u4_fUivXZ zrR*H=P=zdVJR2X&HAusxhXy0LIegTe1Rcc|#8zX$EOCXxH+f}p=Z(SE(ATERn3t%HKT85?QBX2`rIq&0~Fy z#-wn7GRig;1y_Acg*d7!dh&bI0W(bO!d?qDDf_5Gh3K(#D;O)%So?gSETu4-#VGJ_zfM-go9~|Bq>T`YbPlpSIT^n zqE((ANXX@sx>=o)3?qHE2jfpWlU z!jhkM($4^ERJ^j-%WYudh6-+g7s3VT9B>J=jWrqpI`S(toQiFX13@#S!>PC`4G>IC zij#&w$AX%G4}hB67)(_f5?2iKz8P+f{3svSzw{Ucm|CUkT^h<rKVZx^7PPH<>@gqve&8CsXqfXBg|}`p0!y9C9_O1 zC@jwlVo-Lz&IZ`G2nJ>6>udtjm!sJCW51>Pm}+GMQI1SZCuV4fV-%3ah|1R4l#g&T z5CAo}NwF#)nL)>smYz6GT+S8Hz+1%d#fS!qRMv7%m1RlKsIy`6L1%+81GopglD(Y5 zIdzKB>6HL|q=no%o~vaxp^R7!;6fDw{%{Nki1Wz&gc-p7%)J8K#L_P}<2M47fqJQJ zwx`^F?@71Zed7MR{_>vt0XM+eQ}6urNe4cfU8mf3Fa7mLXUI~28TDB`;fyLlNocrosm{7o zd9rDDCH$02m7ZCbYOIby0b{$B-nC=_Zi4$548%bd!7eEol@p?wE1rG+*5CbK?7g3U z7*N8S{W%Apr2o=?{x|xKqq*{5f6T5ayX^Zv%<_z7dCq}*pa0K3?B@UZ->m&8X<}DB z_Y?Y0f8Y^N0%#x&#kRFpC9H`aqPo@CTfxm6F1hlLPJ8cQe|-8nQ<KpZ%(Kz;+8`;6l&i9R%UUP`E|H=E$ z26qBRfv0cSb2WQ`CWhq)$IyT5-u+NADr1h}kg2n*pUrc%fH)eqi;AOR$=SJaG-K*> z7t!fBn*PG$oYt%A)VSuQ4#Nh)-_(n=^AAha@Q2f>4JR71=k*-%gW9sb=niZ`<$=76 zfv~A7er5aoLMxDP+PA!#LyFO&h#ou`bV6pqDr=bUA z2=@K#SL~Xyi@)+p>XK8Am7dG?8AEbz|8=)$ zkCy1GCDEvFv)x(d%)^c9auY5O<759XF-$czVZCXV5b8NpoTP)BjvG3yQg7@OcA3cx z$5GRn;j&$FX1JO&3?m=oRAx9p$ZTe~wb?Y!nWZjuJ%jCnYJ%_lG|&0AR_S(TBQFH$ zOHQ|AOf2$+f%k%s!OaAku|kuDnHV5~G1Mj0NC3pXpZ-#P48SF141nXzho7+M4;I|R zt||M#6W_`qa1xYA? zn7(F*s;TOn*lW%_hh0;4;{H2K9=HLL&b=`GM_;fXB^_}Z@TrTkAu`7TEENc$mH(j=mUGXvTU>J9O=(D`>(rY_S z*d0$Dn$#Dbu3xFM*)wG9v{40o?(#S2E^$B|<|KcZFrH>@ohn9;ZBAErZJl&G{iR*0 z$LghhmL^m)+F#ny%1phq2ZYSNw6D#&KVfCM`_r#*m1f{@+@CNFt26_1$*||s3~({C zX$CxSDj9aa0HaHkWIBma*}@wCWFvBE4~buQJ@6I1NGfI+aP3cj!LHLj^&p)BooIno z&jfkkDpKc*fQBsr#)fBK_WccbwCl59HhDkUXwLZjL3U+KI&nOKX+$caA>E>$m$REuChd*o|FUbi4_?wSd#+^H zdp`DA>njNj#g0IkG+w08KC?O7UcpN2Emv<`_SnD8qPn6ZBA4?T ztnKGVaExYl8DpKKWSEL2^Q^CY9RLw`k~oG2)JwKiUfL@#X8^7us0CCYq^V_OSQ+x^ z#rFN|m*Acn>x7;A*i&4|p6@;zl;Ex^s?9uDgf#+%%z53?EVM?cdhew_bZo%`Ftmsc}3FKijw8bO(n7 zyVU;)$LzU^{*(6KJ$OmF&lejI!?67K5*#yGqx5LE{}r`Xjx%?y8;$z9;@+94SZq2f zHY2xPRBRZm1x3Z~e7u-@)$w9Dktw_gpE4U2yEd!P%q)jcXp-e{2@1_EMZIE&Prb@u z?NsV@;d&|AzU5P|L@L!_u|XiL6oz4eI|eb?PzZd{w|)SCIO~yru#j@LkpR;lppbr7 z&Fpd|&d0z0%$FDzAuww#+1?m~79^}p)_c$lE~Fp~W0=7!85RV?RKYZGD*9+@a1(@$ z49%|lzpT)>1|Nm>q5tw9{0JA7p;CcC*=BXe86@iytMNxA;OKLkKApW*Y(UbRVIrZE z4&24ClWx8%yOc=3`=0wZbtik$i8~2p3N|#K*~$t{+`a93zHEdbERJIG(OMzOdlM5PtN-qVJ znbk|J&0Yk6XiBsdreOz&w$fOFXp4Uh3m0we$a0=R?h7yH$%M1zJY`(^Yi`d1%*Yz( zL|Btr;7h*u97}#EgqrI9{SQB(<0;3QmJP7t0?aUUzTg{IWs}WB$_g9-_W(OGOs|u^ zC&QQW5zYhOlMGEgggMW7^hvp#T9o^|$G^GJ|D9*(2Rw;XYDm#(WqxZ=D-%BTj!n8{ z-vLWExb;dx#%zL&`)XB(ci#R9`lFc1NNx*c48sh%PUrf=k8=0keC72Vb?Tj;O26d@ z=zQHd7tm9oOw=>tlDF@_OB1gI>mZTwf$@-2Zu=xXKpZ*)XzKeR);Zw*(azrP*;Z(D zCfmWCim<{T?WsKJGwD@nPp4N+d#9vVg~3{Ua*!Qa&Xd>F9^N~Z90U+Dn;c|q)+d)) z4&jpvl-aUAIcJ;F4twf4!>mtksQ=tKOy}v&xXP4v2d%T!y_5Q^X+c)~8~gp~f|VX3 zG;p~CKCa&O)15tw>}TrmB~VdE4gU$6b3si3~Y>&7m9vERt6y{YRaD z5k9F5lPZf-iK+g4_hmId5RaLHm~Lulj9lYk%ORX4Z3w(PhbP_gF~%Rg`?3XQ9`lFq zB$^|8UbU&rW0pu{*lez;n5XWlwf;}Ij?sD=s+c|9YutMdour4oSiePs^WBdFv(@Da z<_zmM*=y+QeMe3`I^hsXMB8qA3IcHq1JNu zObrgEPDfQZwKluLWtOQG4zNeJd57QsDz~Ob89l*W>fg%}a%<-G z+Q_CsE@r76ENu*DlZu&GK+FqDm;d^WV1>PgFP(kx8y0WkSk_?7VP|~dQF=@b977iz zrUBpr>;PWCuP`QrQ1Lze61afZNj60$CRVE#WvZZ-%)I{KqZ|d$2`iJ%*!mY9HD){g zOm+PAH*ba%-3_85lO6-a7Mvx_4TIl(&wYK2irqiE;9~faT6rMj;a3P>65e?O`KY8i z_llmWz#`MbSgk^Y`s($w=R&UT8s65X&LWGmWmhF+C?KjA5kXLg0_{**5G z>lrntidglvl74Dqt;}T?9ZdBTF#|I*gV|zYpf2k+0M|^*oA{;| z)4f~{PvgBx4~IuIGvFB8@Gd}^9HqRbn=T}U-lh)PAZ$K(*$at%58NG#cPUz6g)d0~ zoMAqer{3|mQ}Y|Xv^7Il{NKK_Y4X@YXmak=@@evIM+t zndJ~k2DyT5k!0|QOW0VRx4wieJx5l;21wru61G5!dbfL4O=}tpVrp)^^-ZPAMc@7b zoxqedh)W7nVzL<*UDjYmG7M73^%%OvQix|fbP%tKE+mK$zz0YoscV$H$mpoHi7Bv! zs!0Qrtx@0txJg^6WR@3!PSm~xSL?>AOpnD7*pgu8b?07SmR|lk2GdA-U&S||9HYHB z{8hWwEzenRsUb-Cp3ZpitND1!ZOCgT?VTU_WX*P%LjqrOR_eO2pN&|Bf0Q(&%Q zrY>#i|FJ!AigEAGsh;w*vI7;YOww%AfeyCoQ9WR@hbB#Zxz34oh}MIStMv%tTI^^* zZ;Ebx&fR6~(X4uGZI;hqmdNw^A0f zAy~=K73&CI_~iFCf`%UdW_r}t5WZyIJYk9|83D~^rn{e~r^W_bt%(3*0(J~vNY9>p$<|ZD4rTJ1DG|)LnA@@pX%N*}dkX*53}DbKs?&+0F{p?eVCJQJlOB+K2kC z?XRBnf7Nfzv)94yb;7RcaVk$e^`954qiBW(8c)NQcHRF-c3D+>{h`O{zx3(n4C}31 z8YO(`8S79EV`7oAW?RFTG7KCeK+*TK{@`Qa54}ZDCXP4Qn`j`Ahwh>DOT#dUs$P3^ z-@N&%8w?uvVi4{~z4Y)UN)2!>&`j)v58ckNDN8{mfRQCUy+8HV1`S!xy7w}@QBJHON__iDMhhUW!a4zq2E1LZPxS_Lr*fhnYX!PkEuzEle= zrwuW~mVjr=6vPO(semSncN|P?=*ZV@CD#yOtmuSprYC6A@GVa8WSj&K=){6 z9!pz!P4*gdWQkBS9P*I^6Vo(!k)ULvsxb-P@H_R8ZJ9d`reQGz=g!X^2jjl{T*Kak zZIo-+b+DIV?}9BOm}UiAYqRIhEK~kPmYja>l~}AV&*+Lexw;aIb#j#_d#jPF=w=i{ zcx{96HqVRurqbot>96noa3ti-(>ax03DvI7ktl2!78VEh2fK_PrYFmD8b(J4)8ITR zP++6jWVRd*;gPMvSOE=!-&*vbYhp+}r`pDN zjCu2X>Uct4y?z#l9Ko1s#=L}>YFOk~T1+*Kmk?9Uz1ns$)yt1K1IqNf0j<>|&U7%% zMx3q9WY-1COlQ{(8eL9y-R)l33@Edx?7BO<8aZs=q6(WWuo^i4Wq|2~YO^)wCBw4d zfi1$#SbLIH^XeaNur;aBWcepCkS3`k48qK^58r^4^^&KbV{n8xf}zM@S@^9kDIgH; z7!VXQbZE2Y_SepR?8#X02Wl8xKY#P3ClaKcG&Y<_Y4ApH^;I_*QUoyKC{Pi+3)`3k ziJ*!LqhZZ~6s3yQ`r*uwcp`$0vXXz*l zNtWjy4ULCv%NKDp4Lc(Bi;b5l^$SpDC#8OIwh=r{r+!IeHuZ}TIsF><$8y;npTVaL zqTBwZtU1D4GsK;uxUol5tnP4-Je?B!2NOQ3wBQqJrzsUzX+{9D19aFp46UX$O|6)U!Ah*8sQ$lV81ii zZ<+xgTO3l$z)Z5=`sk8uRr-N4UTp8qHCqK z8i8TY6f09HrKw4V<-;oCm4ccImGvR%+*@C*JKN-hogVAFxM!JS!rVn;3F35oNuBvl z=OM)DK$*!unQXtax(!&FuG`RQvK@6B%cqM#?hB%ec7CSdz`m_X7j*>yNkqB|N~Oz` zUGdEGETWk70IO+2jV#jSm|Eh1Mj%U{8O4lYJ0WA}>?T+NMu1e1!o2VA4qEHlig7t8&ea3hQNXeQyUN?wjC<&$pkZ?u%AmWl+k;Y$)%+@;vbAO1c2Ldl5i4U|F3 zL-^8=(y$|JK3aP+n5OQTp`oGn^#XJo%gu$areT}vHkMBp!OARxF53B- zf@`9U`mjyWMX)lnbkW+ZC>=o5Md>1}RYCK^5v7CNx3wsJnZ>q%$Xi?(j&8;^%=0o* zK}s zX40^bb!Zr=toJ>1Fya;Z=^=hzr&9fOuq(s7fB~RK>TCECDTsvQhA(Z?7YyVJ+rl5s ziH@K@8peIbAH7wJZ82t<#kMTH>9k_OE(|vqdqx7A>vfAC(}?y9SS$i?jGD%u$-bVEg5y49u7q!V08p@*lULlE!Pc9B90Xu4-g z-Au;#_OC|?0S&^^DwmNeu)Ow=NTx>=k0?TQry0d-D8gbWB$N6aux z95cjB1rLFWRJu4VJ(&7sOdX7>AphzN!|aiR(dzxt_-MoQTw+Jf?{tW(7v-q$&Y1Q^ zmo>8dmix=@AWOH?Z6_OsVc2YzcIWR|+I!M!ZOH$z%F<4IHcNZ{U#+CjOf{RO-Kb|D zC*Sk?QG$?JDfHTGb~t94$_|&yn#~SJdzBrI(D~WyaM`uA>~PC>zz@1GdpeZaE)ICX zhcis%8M;pbAcuG$5x+4y#W60WF3&xg8@nQ91sN~~_sWnR&dB6y8OGj@W`+is#$mMO zQD~TK*N-%MkLU6-6a}-Z<~xREi8+H;;ueBR=u_{NHxRljtPJ;=k63O#&xSsxfhq&R zRDJjG&Aw|VW`~1upUn;zTV;o19h}V$*Kbrkbsysyr`%P2Rc#Maxx-DeQwhHc*E(n( zmY6}fIWQ4^mA$wj5V=E7grwbtB$RQgy2{t*d2JS_XO=11Fj|=vPM-}~R7SVL>4zDz zm?wK1g)9O)49t#o(hIN>bMZ6zJz+9lkG>>n0|wJj^BeI;8bmPJiPid)0tnEIGL(v7 zrWg*#V0;uC)i@)z_A^ZLbk0VP*rgU3s29&{4p1s&n3D5X_C+9QM3UtQ-uK|an#>mv z1JNRR#<5rius3Z0O(&RPbhd0YCF~_sQ)0<^rBzeX4!@cbPLo$$H6?Fy7kf-sQ}Q*{ zk2N3Tl&)Mpr7zH4$(odQ4j)wfI<8f-fLZO<;l32?|kjI z`uctEdXpzJV~));Hgn85?)hxSm^znG3ti?e{;Hqeh8~I}ViMN5S_snS$!d-!WC2tO zm28`081Ybp7>g)1sqJs1FSW6rugAhltY(k8(nSK?MvI1L{K87)K5u6cXljdWVVy8~ z(%)soE%sD2GuIM~W2TkHbX>AiW+33IEX`FMTNwosXqq5Bdd#3OgR5vJrBnk=a6=3v zz7d@ehTDRBxJvTZ+gb2o*e(c+CVrA3Iq9Zgr441A($h65PzFg1F-vBz3oapGICPf3 z%jWOD=L2royT8k}%_L~UUfA%a%Gld>4%*@~Wkm#9W#5iJTP{MasSKhrN$@neoyLHC%L^C#~KeK2j$SeV67Ofwol}jJ91DW}1 z7v_h{0hpf_WX9(~MzI=LlR&PCOmn$SYLapd5g$rCkrI(+NDLfuC6fFJhsX(YuE|M7 zHh`oAsEdL&gKOg9pCa%#C$}V7X);5zBea$bA*;5O{Uw9>?X|^WOYOwiWd_q!tDa1_ z5@~nr9R&%<(;ms(QgD!Hyq$u2Jjn^cpQjU=-Io>dcGkwoR?fCiCLtq<_c{91CfnI~ zn@R%?l$sNaoOWEEldY|dE@RG_+{*AChtSFaD=q|P^vtF86@ zr7Q*INoE6ng`C?qWBHO>3j;E08GWy>Isy4Z<}qo$ZgzS0*9?B@z52Xt!yIaO&Y0zc z=`b!lxk~ohA@b8f*!VeHcp|d0?|z@>Q1rJ{{tielozQIa(oM4Uay-{cN7xB(Hj5KE zM@F8I<3ATc`4cY@vxUo%r|jbLs~t@wT(&il>F^0Ok)botMCO5=^4H4S+xTmhNq^#B zE5i5f*Qz^P>L>DOIujzG8}K3tAZa4}8e37-R?qX0PRET5niknMMlxSgvY|rK)SBDmTqb1CQk8>7 zF0Z-N3e9=D^|5MsZ96Emidp7U;oE9l=V$+O_s3AF47Hfl-+?{{cgruK4|avDr8mRu zFD)^Lty!TSJvBIXQ-;l|{kq#NroB_S_CPI4v=$QEFRAm$t@~R?QZ5`l+A02 zU<=@V=)Fcvw(ZicnT=fTDs=uu(krP-{cNB zQclF)v1Xa~J*NNfifw@B2^=iXK(WnOozigo{wuZ_{83iB8MRJ&&Ga&scr$}wG#nPV zfOzt0nCc|+z{Ge+mD8da5;t_tkUAYzR7+-K)IeGFfl`Dg(weEuxm4Ie>y$LrLn`SU zZA^|Fd2wW9EkH(q3t@b%cMZ3BQYX+vhi-r-ns@N#YN8F?1Wh!i9yiBuTe^XU+xcEK zs6s>6;t~yZcf}=FyXrasQLF1zFx^IVotYu~wWY43)ULXYFgd$+Bn>?e%8ihM`@0p* z_yrml((=*Vj(^HP!Xl5`XPDYH`6|5HuiVWt|IG8h2OVx{5oPfR2Yja}v*{D!## zN+wE>A++V$q>zTi(__w?s@|IEP8L0w);{1LFQ=-+@mxNb}7;guo+jo9SfHO9Ro~Vr(+3s z$GGi|S;cP0eBSMfVlNsTEK0H7o4FyBfkyf^%pGhO=5n)&hByoVN!>M*mM_AAwHb0e zOgpa9_(}b9Cwnj+)<~OqE5*fA>mu<=35XzBUex_&b z=C`c9RvzFAZ9uzV#WP?XBs7Q<@)>pC6o{}+#fx@kdOt0e!V6@{RRxgop~ZX{4znx; z1u>E)y*Aahd7V&WkuW(XkO*cvS1UVdaDY^XzC&|nGX4YzlZpuE?DyA(EY1e=H)?-v z`7}mZ-s0YDU2a<E8W?TBuIz7E>*<*uF3g>K55|1?!6sb(xfwfxJr+gZWOWEBs zWO~Xi-_QGdhD_eUb3H@G>-Eo&QPOb682A33Ap`7_ga59Lai_uVF2=oT+ni-&!(~g3 z3Y59+a@5m6F~;h)%TZ4T#WLM*yBxKlnEED2%~2cEAdnDzs8wNw<|+n?V~$!Fk|-!R zAm=m(mU%-Boxmp;GG}5I_#$fQt!UapSyr>b1fT;@4AN*u>68s-G>D%Y#yFnrE8{BS zBPe%kLFfG!HxjrN;>JLk6GO4vc$}ZG@0LQb(~BEXFtw%178C=7>_V}t1G|vP<-jgv zY1U0S4QJbHX^xr&x$WxajBGD}UQ_LOLpKA9I?xB%c2&!}c@*(!H2zcs9arrnoX zZ8Tw!WTdyYfut6<&|s77FJqWUMoi`wv~7T%NU(TJnp6{LACL!gmu(xVBH*%Z*sig* z->b{EVaFJ2x6LSqq+7IR+=Whp36G8+(Qh|fqBtl)nhB0v1;AT&2h zUT}=f^J(hswP^H)9y7IH&K0_xD|CO(6}oJcyah>_R~B~w4?xm@kX=Z6wX0o&OKaEM z%Isq3v}@?3ROalB`3Yawm>(!}{>J=*vlW*sa-f6LQdrB6xjb|1wuU%>gOqBOsAoY> z%h?G>ge+~NqsobbVhAw`OuSXH(u$`=u?1O|RrlA)-dT~=$t3jap?LVu7jx-IWlE7s zEt`ieFR;UaV7*^YCx+bGsLmK`S;U`hJJ{AIZ4zLs{Brh-+y);uV_yAxUN8Y+nMmgB z-sRd&S~Tp(Y(K$h_gVujqtSVw-kBm~Oxp`~Og9+!m-+R8dWhs^V;WX2YW+4sg>9pm z7M!#QYU>1SGarVkeNOl?-^{Q;Ko>hsT$h||OV{A68}%}y`WO0Y*D@C_ZJDdB%n2-W z&%;S7Q04@dxo6-c1w=l^GWTpY0sznmJ`z~qmw?96c8_3xCzQb~o3c4j7AD4RSd-oaVJ=N>6oLK99R{+(L{w$~eIyrEb1u?&+PR zPz0R7GWR^3q<9C1`p9luU)E}yKyt$QMZ-c;k521%dJq~WH%u`SWn7E?8iCDeaaiN#N3bDO zTlgBYrDB`}xn;jI~c{J-S`!0e1wp zwgztLn$1&DI59zc2pg6O{@8fsXfP|L5ob)B8}u^E4mSZ1ifRZbV$n2sqMRgA(Q-b3 zpvT>KVKVpqlR5rJi&AX9*A#>g1b-P4X|r1vVhm_T^GtXy3uNy`qv(aeGTU3_T^iex z^b}{;@)qjI+zd`>+tb=%+c0BV9%G=toKq37RMAp|PV|70=A|SZ>Ryyz@XJje-@= z5Hl@Q;JFM=V#GIE%!qZS5w1x9myj}^30#Pjw4UL*G=L0379>xGjW@}sKlO13d@3WA zxyNVIXOr*&pUp&`z0am*zt{2EBz*Qhn~v2P9Izw3a|i5b;kz2K5n1*|?g+Dcz|NIp z)L(hkR8IQk1)v2cNz;z_xW(rDKP#9>pTHITJU%Od$PfCtUFC?;9aL!oAP@wAFt7^- z0RV3F3{r^F8YKYJ)FFmc_jpC`Gn*tXA%1T0!mZi<;4eP(&{NO8@57(88H$m#Xx5u) zTK|wVhvK29o(qNB??3u@8>+wiubxQKyB_`EZ;IqI`r)^6ZdW)w^yIT)mAZcK&pvR? zbG!cVFF*S5Q=hqxV?;W8x66+_)?(UszyFCe_4<*SQoXxCTwYFEJ)E(a8B*vg!NaqbCr+6KAbI^*2a@3hTW-8AFewsq*8wrAUR zciMK4Whl*I1Z|K(tYBY&$Tl0;AskT*qyM({CEiYtYX}I^YNJ+f&D-ORbD#O@%Rl|) zubz3~WpGKZtCfKgd$2gbv(POQC77} z3t&+&Ic@sOIB9VXB49XVDK${4a(4G_v0iyXWSb7yZ+!3j|M|0@M>ZqGnPfAlx=pF* zsgc1J;FT%+fdWdh-oNY7$0?{v{*C>c_=yFB0UC=^oa zeII%H*UkHq^3tdqK9-8I=sx=F=fCpWH(vawyA?THkA3b-$)BY+MbcCaV$!>my7S6w z$?&J2{X!a`8YmTo!`-@Ge)Y9)eJ4G&Nsm7Fg+!*71hT*bIFdPeA|pvf?|J;myBWUr z4My+r&wu&RXYb@T{QvkPPk-gLucy+KLTVBY8Q6@>-PDghO*}e|WDBc|Rmx^;gEJ5U z(Q-sG(;M88Oporo@@hIYXQqNE!U~@f;Grul(bwtWr=Clz(u|Bo+T#fP(I@@}B$1Ix zz=xjH1pfZDuO}(vK-oN+IY09d0Xoa#^vE-xyYtdNrfeqCG1j;UrSgDy7E=iH*x!CJ z&%%jK^Qb-JmN`Hz8CXCSRivFkFiFa|A@X4YGv$0)h!Lpm8XZRBejBZEPj7UH1nZVs zuYc=1Nqy@_KMuEmC%CcxCF#y9;r5HLWvE$Mk(7kq z{P!Q^n&mvuB*h(sM85uS-%TKEZIU8WNlf^pIN1Vvz(()+z{hhN{`M$EgffqO`g18I zkdmHx{-rPsl*#i-hIGxO)>h182ZEDW*QX3Ak15T5f+wa2Q#O6Am{+7nAR1LMV zn`$YW*UQ%8$vc7IJWjHEt=aE^85p|i&7B}y;6{7P+|`uT7(3HWA3d{|muCqG2#oJl z%_+6OrlzIYlx?_U`xiavG95`eY%J0kYw8HCsO>6dpf?g&!o77wi*`(!bt!n9slADu zxMykA7P4$pr&iC)-;OwQj0pje8-vQw@i8V}bC&0Xk-#I6$bytGqLke7=N(J{`UzG@ z2DoLB$YMZU+F@i-bpD84vO*+`AVC0RhW`3wL81+0$PybSK8v&=sjR6MNeht>a0`S& zToC~Yy#pM4`zJrmtpk`|u;%%F5$XwF@@Jns5%VCUVucHgNFd-K9I|jGDYz$iD1o4; zgcAUSCGg~zUr0E@7?{8Hqn`u;=v$N|TByy9d(fq#w7t5Q6yx`ZtU}OG^M;-`+qENWxJi5K~f7Qhu-$7 zEz-O~HoKJzQY&BNxtM0k*+}Qi&h8|&gsU`hrMT=)a#$bY7BZ#^Bw8QhKE1p8kgHwi z=WyAQLwe-cMGkq491;`hiyZP8IV7;}NatsS=g1H8>lw;NoJAM@K!+5`FKm`fmigQU zD6m>2XG#GA>`}s5!X0EMDjJH^n8<*GEFM!N*}qvVDy)L@|JeQ_3795p=sUnSwnsn~ zh>+zdIRDOdjQ8LkAf zC;~o0iJ?*-ialzF^Ce&y4jIohGGn{ELE1a}#05zYYXe(TF+*gM3UMJqdnux;!o8@y z6tz$>f5O1cJkShd_T2Z6wkw;=Js z+!Q(9OEKT86F5JghnHd?@{M(VmJgBAmh&@_yUx%456^L)WhvOl4FUV+iqAiW)j1S> zrnNM?2JiqHkD zkmCH-r;59cdEu3WQGAGCLWv;&xJfEaO@8DD=u;TI$ZQgDk|09xeNmdy51LzSXu>(z zQDK-#1Sqa_$FUW!^nc`($`Hfv1c0M#w#@(BZ`EAO&0bJ73MmL}+Tk4(dHQhhX;Os2 zw1`hU6@jtnh0}Q9rohI}6xzDn=DCCB=c3Y8K2pIl(DHXW*!eaC_HLdG?FtlZuuB%n$1YHJN*yBRd z&zA)QnMBy4rkQKNl zKc1=(o>T^kr7`$`-}(fwdPyqKBr&;dD3d^v(uIt`{F;bVL_CSM@UZRA#`VWlIr2MrKj+ z2xX`)z*lviB092VRsdxHpy~?YkeTM>hY9(y$T{9oIm`3q6ro*5W%VQ1cT{fVXX*h* z<LZvU{Eb%_BUpDd%PPJZGn$(c|UP$_X%h!4^b;yx@c1eY=pwAm9D0%BZOLy|xRA z_oeCOn^dGJ$H=8wOR{LO-`YKU%zySRqoM|a=*7@Pq#`6S!kRQS9ZXMu_N)I{R16^p z)8i7uD(hUz#!fbCCni2hj0gn5B)M%cn-)FEY1^8!%|mj1ifKbq%PI{Z~DCm1@0u~ z_}%lSd1i0NaM?Z2iNXGATf65aaM?W%YN?FekjiZBmeQvuH7dC3z8QAU-~$%#JVGDy z#p3;d#XBd0%J5?Ge!${g?+I?(;(gZT4=5fekT#MOVU+8Juw%e`<-H$z%KmEIY1iygnq(3F{zJIiBnIuq%inxUrxk!ms83x5 z-lbD$$Mk}UUo^!NskJWwjb;*)p#Y;K02V>C_HItkehqdkIcRWq)qb0jLkgVFpwN7Xrk2@si`*-Rp#sl)#C&tLxcvVBY zr>UB%$;cL{BfS1e#b^J{Fx{{D&Oqn=&S>`g_THJOC)i#7$diiweUGx>_>+n; zC1#o5J*n6qaonl0&>nwMF-6iN<0%qxLK@8I{oU)>jqaaRoMB;ba-08tR8-^7&*Qbz zu+3#lK#Paqk4bs_aL_zALu zbOlkT5kEmtrsOAFrTTfaGFnpvrph&?)z8(GJPixP84g@iG_!Z(JVF1|-W}RRxuztZ z@B1|+fK+V3W5XSV^`fp!1S3{(o`h)xZpat{l;~aG7{oR4mwORjc*uE5$leRIfQHjk zJmNfgy&^71+{}{m#7R$u9aTuWMI5Ci#c;& zF|=NNEY6@8Z^Rk=FC$A=zZYlVf|ue9K$!!?8P;*0cm|#GB;z=WDg+2AIZszaV~5 z38R%vk&ZS+$rNc`eS=PrW*rQh4@^Hk1He6H z@?xX!_{IeyTuw4|1)hRyUTz;iaA+%nvtU z9(S0R+kc+A36guCx(Vg*;M7g7f1kRkXYk%;0_E^Xn0)8m5bj?x$=5XDOU~QCQ`1tYfmXxL79D|Tz!G?<;E+M7E-RY4o;mFNRof+ z;5^9+)H2#SIAvBKTQ5VFLmeE?a89ePV<0Z@41*_Gfh=Y2?MRaT-uXToQ|G5H)!|uz z3<2|s&L8a=QqDH#-92nev0>SpM}+H>wK7;!WCb##QqBbb`YzWc2)!ri=Ol=cCYxIj zK*%sFkYwyqwGlw%s*QYuO;j7XeM8koL7A;o8+l!-HvTYLWnTR{v>M0Hqt)oE--uRq z^2g9ByXQ^N>gF{p@b>M1R(Gyp!87=~&??8zqgByjc#8*ff>r~BlxX#u>kg`wk?x?T z`ybRDS6_sMO88zCP=*TnY0 za(kRCZnhbwj*+7NT;>lIi#y8LgM~hCdA$++aEEceD2xzxsp-LAUs-h7&uDr?Uu~-C zv6=255P1VlkKJ_#<-z*1x`UjYZ?_WFW}-V-5<^FvPR{slne5aihNkWv5kr|*yeksh zgcuqiq$Gx3WtK1GVUPaGxm{-Ywz2^ptdfG$$_6YAi&CpjqTm2!7G?RKM8Sb8vnaLd zBnl3J%aVfA$_8ZemK2;;Hi#F@D<(5;_z?w1Af%+=TqSl^DkRJFK~fbUq)4i|N+TMrOpK_$)&e7XU}kdkRg20#G@^mrTU53*qL}9eM)b_gz)K$VOwc_v!PQxM{X|6v*M_RCN zk&ZOSa~)|8N0$CVxAQ~N1u4MkM_PbN9qD^=W1{}JLTnlfPL5)E4(5{cZS2({l1^(|VX~u}+74bDH9cex;b%l3`Lr*tR{?v?^zjym#4u+YI^vD;> zue;BR)TW!a=&R8Hxy^pABdy~k9cj(0MLN=P9HS!*>|3EDO>1tjCOXpby3~A6-kbHr^B2r0P@R}q3GOl5e2xL5O-o`hgQqYH{d9~gqgrvm(;N{jVqPVJMHkZ?5iFvwHX&GWazlazux}HBg>K)O zU=h}36M{uTu};Qvf`u9^2^PHT`KouArNe^~oP@8I#%oe4Hkn1Ia?+D2;N{*IPb2rD z20rDug^}{v?$(4ZN^_EqN{gObLozP)FAt_CWAo(!A?|3Pg{uszsTE)Kpt7zDs`+Eg z?%9KCv|I+&7zSTB(wuNSOM_|Wln|2p?a}G*1;z6z559^m ziqh&UF6)ZYqnsGB2%qP~2!xb5F;`g~AzB$FcBVq$EjgRE&hA6w_LiKTL=|P8K@u%F zJBlhYuZ~IVTpd-6zB(rJV0Bb6`s$d>gLP3woC?Qe9;}Wk29!xrMSz6&7$BsKDqbaz z5-8(5N-YhC@F>?8Dc2Alz@uDRq?{dL7g{WNlt7s-v{>>esaMp67Rwq@aAmsCVp$`K zWb7`q_{5cf2aBd4&`ewj0YXYw!d1=ywKA9i8p8Kg!p@%oLZdHcz;~6}jOo6@nRFyY zJ^E^eGwDc*x?tY|XVPgDbwT76&ZP4w>guZ%&ZP4w>cR}}Oj4BGok;|kN@vnlAbqtm zM*3PtCrH0bs_TWIOyj%~=`*t%=aoT2JPnQW9tI6#y=t6S1`XjAHO?!8hCt-Td1cU$ zzH*!=p`_kc=GNRBnByd;%Vo~uda zC8?Zeuu0`5sa*VzIN7A~l2neaP?O3_QaKry{5lpfCzX@IRFcZC5+16R5j+%fXW8v) zwi7p?c7$|YSF;^)%9z>UgRW*fs#HN{9Cvj!+tD5gZ7n`JaTpI)7ho-k z!#Hfa0BcDcX1(eHtYbPsU4XUe1pi4Vkf)((qjNd|+f*kGs{IB?;4aF4Vaqib%wk^APAg-~H)eMz)5;i=jhXt2!Af}^&NBnblpC|FMAOmA1WgOM zpFqxCkER9t7NF_VD*6Z_A3)AsorFcuq;*0{axUe$S|_9==d$%`osg28O9k8333O+gd{loF*A5l}%|s7jGg0tAp|K)_I*dU(#<-Q4cXx8MB! zgx#5~a+;KFi6PsfVtS?EfpBBa+-3gUhqD_L+gdwU<+lD>i@;>&LfMF1C*DDBEK$wW zs#HNX^nvPGd;$C7h~DP6fxr24@m4;N+EyZ)F#YTPnlIC4K4V#b4D1|Lz`qGBBwynkIm zUWw;p_Bx~095sVnQ zpo?LhGdu}TV-be^McCL}>)b9*2wb_yZglhukIpmJHY{QI{02^w5$h*BRaJJExT`n4 ze9K1xbWTOoIM+_o;*Iz(`A~9$Smk_n{F#tLp5EuQWpSD6n@;}JUW58=lD$7KCV5G< zPF;Z1?fyhDvpTa!UD>`njVx(0PfLWy_L1Pn{@CTDm3m~#ZlB?G zGn{{>l5VOhTkh2>nx7O%v{QB>ITaVa@5fNF=#7S#2GRVi>SI#fa!=w6LI$E=p2{NX zj`0F{ih_=Mq*|u5>lb36TenK)Iziu&*X6vR1S=@m=ABWOghtJ3O1Y#BGOaUYe4R59 z^hRUDo-h71zYp3u@+(i*FT+C#5($>~K|ndz>@YxFV%Rm?(+I17jqq|iR%0BJ%9R7E z!JI~XTH`&;5$2Xqec|pCTJGSqKJzZi1<%CBXUHuZ*iyZf^16zn&pXHRYBUa{hLE{f z$uofPL3rB|uB5-1-&3O6I@Vl7XyHx|&gX98s^ro)M$GIi0L1945IaZw$U*tNPaea7 z&{i8qR>$(BZ@4-m0E7tn2rNOQ?npv?g&u%qCSV)*l;@ZvaPmRMe6gRQLN|P53LoOL zKJ?D6tv#8N!;TBmv-e%uge1X4Js_LX!ZW0qae_@Y;*q(~s|(7MGGLDV+cT09Zzh$3 z6+Dw9l-Uf+A)(Ao9>##Z(G_}WW0jl+li3+0C9!>_ktv-PSm98}TtoXMH(Y@su#@WAF)z%U81V&qy zw8pe$OTt6ydB&ih{6|#XuglKx!!*nJlz6RuxIo^vD?U zti-Q1F$TH`K(jBG0a$`^d`gCEed_O%NebgEPn!R^@~MBUKrr5DY(v)Y$_>nz35Tzu zn~%u^SfU+UwH}5&-eXe(h!( z@0`FY_8Yu&bY~J?>%x-6x*}))EH3$gbr8$5XjhTR<|f{|>uHWkl?!?yXgNQn)ZCp* zi*)ff#XhS_C}YYJITU=6@Oc0@(Y35;mu|j#`**|Cl|OeQd2`_mnl%iX*nTm3U^(tH zbFfgaj&ILOwsZ5E#mujd-mx-E^*_GU7bpH1>L0vMAo<(KWBT#hz0rB^lMSyG!8ubr ztT2qQy&NF-_OLNwQ5@XqJCYm77g$+5BnE4lMeuSpnHSYp_5Zvj9kQ-w&G#(6e*k_- z6zaCuZqIr<@8v>WrOSPT<&EH$1Bn2Q&G%_pJLs@VztA~g%cv|TWq7*-nBc`l=FX?n zWFWKLy+D`sN5EXzEILj*PDHf>Gi#ewJ3RUqe+pB0X-Ty*U8sFDuBdKhprj)+I6q@V z=`lmc9Q3i&Sd**uuqG2x5oEx9Irm;bATlmmNSlfH&-kmL*<-P}<7=qR$goW)t*3Tj ztX4b(>(sf42wI+`#(W~R9>f;1LhjC$v3di!Tzh1g@xbi9;z z?GcD0g`JSN0M+jaxE#H|^@!@|WVeHlxeXEwdDtY5d$`!jA)Nv~Qp<0X z5HxHEYUQ%0jB39#xZb{m?NUEoRMH@CUvuft>UnNU#Je8%0#dD=gM3fzb?xYwh5k?IJg#q9qqTVJ5{U2di6FfoXmfuwFqhe1cl6sSzwL9UM4EG#5XN>$t{MVktoCC#8hslPTn+_xOB|T&2z&E-YX-j>#hHqKGM!V0z|AV+d z*eHM(2D^-KfOzxcY;M^8mV;UFPZkRuQj`Bwy~|+4r9Tq;H6lQIAU+W;JB|Eb=!2%E at&X`!7td+Kk+sfrr)3JUFsd_jPy81`G + + + + + + + + + + + + + + + util.php - The PHP programmers best friend - UtilityPHP + + + +

+ +
+

+ +

+ +

+ util.php is a collection of useful functions and snippets + that you need or could use every day. It's implemented as a class with static methods, to avoid conflicts with your + existing code-base. Just drop it in and start using it immediately. +

+ +

+ Included are 60+ functions that provide you with the ability to do common tasks much easier and more efficiently, + without having to find that one comment on php.net where you know its been done already. Access superglobals + without checking to see if certain indexes are set first and pass default values, use a nicely formatted var dump, + validate emails, generate random strings, flatten an array, pull a single column out of a multidimensional array + and much more. +

+ +

+ Although it's implemented as one giant class, util.php has extensive documentation and a full suite of unit tests + to avoid breaking backwards-compatibility unintentionally. +

+ +

+ The project is hosted on GitHub. + You can report bugs and discuss features on the + issues page, + or send tweets to @brandonwamboldt. +

+ +

Downloads (Right-click, and use "Save As")

+ +

+ Stable Version (1.1.0)
+ Unstable Version (master) +

+ +

Installation

+ + Server Requirements
+ +
    +
  • PHP 5.3.3+
  • +
+ + Standalone File
+ +

+ Simply drop util.php in any project and call include 'util.php'; in your project. + You can then access the Util class. +

+ + Composer
+ +

+ Add the following dependency to your composer.json: + +

"brandonwamboldt/utilphp": "1.1.*"
+ + When used with composer, the class is namespaced (\utilphp\util) instead of + just util. +

+ +
+

Debugging Functions

+ +
+
+

+ var_dump + + util::var_dump(mixed $var[, bool $return = FALSE]) + +

+ +

+ Nicely prints out the contents of a passed variable. Booleans are properly displayed as 'true' or 'false', + null values are shown as 'NULL', variable types are displayed, and arrays and objects are displayed as a + collapsible tree powered by JavaScript. +

+ +

Usage:

+ +
util::var_dump($var);
+ + +
+
+ +

Array/Object Functions

+ +
+
+

+ array_first + + util::array_first(array $array) + +

+ +

+ Retrieve the first value from an array. Can be run on function callbacks, and it will not modify the pointer + of the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_first( ['a', 'b', 'c'] );
=> Returns 'a'
+
+ +
+

+ array_first_key + + util::array_first_key(array $array) + +

+ +

+ Retrieve the first key from an array. Can be run on function callbacks, and it will not modify the pointer of + the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_first_key( $users );
=> Returns 'brandon'
+
+ +
+

+ array_flatten + + util::array_flatten(array $array[, bool $preserve_keys = TRUE]) + +

+ +

Flattens a multi-dimensional array into a one dimensional array

+ +

Usage:

+ +
util::array_flatten( [ 'a', 'b', [ 'c', 'd', 'e', [ 'f', 'g', [ [ [ [ 'h', 'i', 'j' ] ] ] ] ] ] ] );
+=> Returns [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' ]
+
+ +
+

+ array_get + + util::array_get($var[, mixed $default = NULL]) + +

+ +

Retrieve a value from an array, or return a given default if the index isn't set

+ +

Usage:

+ +
util::array_get($_POST['action'], 'index');
+=> If $_POST['action'] is set, returns its value, otherwise returns 'index'
+util::array_get($_POST['action']['do'], 'index');
+=> Returns the value of $_POST['action']['do'] or 'index'
+
+ +
+

+ array_last + + util::array_last(array $array) + +

+ +

+ Retrieve the last value from an array. Can be run on function callbacks, and it will not modify the pointer + of the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_last( [ 'a', 'b', 'c'] );
+=> Returns 'c'
+
+ +
+

+ array_last_key + + util::array_last_key(array $array) + +

+ +

+ Retrieve the last key from an array. Can be run on function callbacks, and it will not modify the pointer of + the source array unlike most other methods of doing this. +

+ +

Usage:

+ +
util::array_last_key( $users );
+=> Returns 'zane'
+
+ +
+

+ array_map_deep + + util::array_map_deep(array $array, callable $callback[, bool $on_nonscalar = FALSE]) + +

+ +

+ Returns an array containing all the elements of $array after applying the callback function to each one recursively. + Particularly useful for avoiding errors when calling functions that only accept scalar values on an array that could + contain nested arrays, such as $_GET or $_POST. +

+ +

Usage:

+ +
util::array_map_deep($_POST, 'htmlentities');
+=> Recursively escapes each scalar value in $_POST
+util::array_map_deep($_POST, 'htmlentities', TRUE);
+=> Recursively escapes each value in $_POST regardless of its type
+
+ +
+

+ array_pluck + + util::array_pluck(array $array, string $field[, bool $preserve_keys, bool $remove_nomatches]) + +

+ +

+ Replaces each value in an array with the specified field of the array or object that used to be the value. Very + useful when you have an array of objects or arrays from a database, and you only want one specific field. For + example, you want an array of emails from an array of users. +

+ +

Usage:

+ +
util::array_pluck([['val' => 1], ['val' => 2], ['val' => 3]], 'val');
+=> Returns [1, 2, 3]
+util::array_pluck($users, 'email');
+=> Returns an array of email addresses for each user
+
+ +
+

+ array_search_deep + + util::array_search_deep(array $array, mixed $search[, string $field = FALSE]) + +

+ +

+ Allows you to search for a value in an array of arrays or an array of objects, and return the key of the value + that matches the search criteria. If $field is unspecified, the entire array/object is searched. +

+ +

Usage:

+ +
util::array_search_deep($_POST, 'delete_post');
+=> Might return 'do' if $_POST['do']['action'] = 'delete_post'
+util::array_search_deep($users, 'rogue_coder', 'username');
+=> Might return 5 if $users[5]->username = 'rogue_coder'
+
+ +
+

+ array_clean + + util::array_clean(array $array) + +

+ +

+ Remove all null/empty/false values from the given array. +

+ +

Usage:

+ +
util::array_clean( array( 'a', 'b', '', null, false, 0) );
=> Returns array('a', 'b');
+
+ +
+ +

URL Functions

+ +
+
+

+ add_query_arg + + util::add_query_arg() + +

+ +

Adds one ore more query args to the query string of the current URL or a given URL

+ +

Usage:

+ +
util::add_query_arg( 'user', '5', '/admin/users?action=edit' );
+=> Returns '/admin/users?action=edit&user=5'
+util::add_query_arg( [ 'user' => 5, 'action' => 'edit' ], '/admin/users' );
+=> Returns '/admin/users?user=5&action=edit'
+
+ +
+

+ get_current_url + + util::get_current_url() + +

+ +

Returns the current URL with hostname

+ +

Usage:

+ +
util::get_current_url();
+=> Returns 'http://brandonwamboldt.ca/utilphp/'
+
+ +
+

+ is_https + + util::is_https() + +

+ +

Returns true if the current page is being loaded over https, false if it isn't

+ +

Usage:

+ +
util::is_https();
+=> Returns false
+
+ +
+

+ http_build_url + + util::http_build_url([mixed $url[, mixed $parts[, int $flags = HTTP_URL_REPLACE[, array &amo;$new_url]]]]) + +

+ +

+ Pure PHP implementation/polyfill for http_build_url + which requires pecl_http to be installed. +

+ +

Usage:

+ +
echo util::http_build_url("http://user@www.example.com/pub/index.php?a=b#files",
+    array(
+        "scheme" => "ftp",
+        "host" => "ftp.example.com",
+        "path" => "files/current/",
+        "query" => "a=c"
+    ),
+    HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT
+);
+ +

The above example will output:

+ +
ftp://ftp.example.com/pub/files/current/?a=c
+
+ +
+

+ is_https + + util::is_https() + +

+ +

Returns true if the current page is being loaded over https, false if it isn't

+ +

Usage:

+ +
util::is_https();
+=> Returns false
+
+ +
+

+ remove_query_arg + + util::remove_query_arg( array|string $query_args[, string $url]) + +

+ +

Removes one ore more query args from the query string of the current URL or a given URL

+ +

Usage:

+ +
util::remove_query_arg( 'action', '/admin/users?action=edit&user=5' );
+=> Returns '/admin/users?user=5'
+util::remove_query_arg( [ 'user', 'action'], '/admin/users?action=edit&user=5' );
+=> Returns '/admin/users'
+
+ +
+

+ slugify + + util::slugify(string $string[, string $separator = "-", bool $css_mode = FALSE]) + +

+ +

+ Generate a string safe for use in URLs from any given string. Converts any accent characters + to their equivalent normal characters and converts any other non-alphanumeric characters to + dashes, then converts any sequence of two or more dashes to a single dash. This function + generates slugs safe for use as URLs, and if you pass TRUE as the second parameter, it will + create strings safe for use as CSS classes or IDs. +

+ +

Usage:

+ +
util::slugify('This is a random --string with an Ãccent');
+=> Returns 'this-is-a-random-string-with-an-accent'
+util::slugify('Another String', '.');
+=> Returns 'another.string'
+
+
+ +

String Functions

+ +
+
+

+ htmlentities + + util::htmlentities(string $string[, bool $preserve_encoded_entities = FALSE]) + +

+ +

+ Executes htmlentities with ENT_QUOTES set by default. However, if you pass TRUE as + the second parameter, it will not re-encode entities that are already encoded. +

+ +

Usage:

+ +
util::htmlentities('this string < this string', TRUE);
+=> Returns 'this string < this string'
+
+ +
+

+ htmlspecialchars + + util::htmlspecialchars(string $string[, bool $preserve_encoded_entities = FALSE]) + +

+ +

+ Executes htmlspecialchars with ENT_QUOTES set by default. However, if you pass TRUE as + the second parameter, it will not re-encode entities that are already encoded. +

+ +

Usage:

+ +
util::htmlspecialchars('this string < this string', TRUE);
+=> Returns 'this string < this string'
+
+ +
+

+ linkify + + util::linkify(string $text) + +

+ +

Find's any URLs in the specified text and wraps them with HTML anchor tags

+ +

Usage:

+ +
util::linkify('this string has a link to www.google.com');
+=> Returns 'this string has a link to <a href="http://wwww.google.com/">www.google.com</a>'
+
+ +
+

+ match_string + + util::match_string(string $pattern, string $string[, bool $caseSensitive = true]) + +

+ +

+ Check if a string matches a given pattern. You can use '*' as a wildcard character. +

+ +

Usage:

+ +
util::match_string("test/*", "test/my/test");
+=> Returns true
+util::match_string("test/", "test/my/test");
+=> Returns false
+
+ +
+

+ random_string + + util::random_string(int $length[, bool $human_friendly = TRUE, bool $include_symbols = FALSE, bool $no_duplicate_chars = FALSE]) + +

+ +

+ Generates a random string of the specified length. Human friendly mode + will exclude characters that can be confused with other characters, such + as 0 (zero) and O (capital o), 1 (one) and l (lowercase L). +

+ +

Usage:

+ +
util::random_string(8);
+=> Returns 'a6BiF4UW'
+
+ +
+

+ number_to_word + + util::number_to_word(int|float $number) + +

+ +

Converts a number into its text equivalent. For example, 56 becomes fifty-six.

+ +
util::number_to_word(512.5);
+=> Returns 'five hundred and twelve point five'
+
+ +
+

+ ordinal + + util::ordinal(int $number) + +

+ +

Returns the ordinal version of a number (appends th, st, nd, rd)

+ +

Usage:

+ +
util::ordinal(22);
+=> Returns '22nd'
+
+ +
+

+ remove_accents + + util::remove_accents(string $string) + +

+ +

Converts all accent characters to their ASCII equivalents

+ +

Usage:

+ +
util::remove_accents('Àccent');
+=> Returns 'Accent'
+
+ +
+

+ secure_random_string + + util::secure_random_string(int $length) + +

+ +

Generate a random string of characters. Will attempt to use a secure source (openssl).

+ +

Usage:

+ +
util::secure_random_string(16);
+=> Returns '5bB1RJH0cQhNjviT'
+
+ +
+

+ seems_utf8 + + util::seems_utf8(string $string) + +

+ +

Checks to see if a given string is UTF-8 encoded/safe

+ +

Usage:

+ +
util::seems_utf8('This is some random string user input');
+=> Returns true
+
+ +
+

+ safe_truncate + + util::safe_truncate(string $string, int $length[, string $append = '...']) + +

+ +

Truncate a string to a specified length without cutting a word off

+ +

Usage:

+ +
util::safe_truncate('The quick brown fox jumps over the lazy dog', 24);
+=> Returns 'The quick brown fox...'
+
+ +
+

+ size_format + + util::size_format(int $bytes[, int $decimals = 0]) + +

+ +

Formats an integer as a human friendly size string, such as 4 KiB.

+ +

Usage:

+ +
util::size_format( 25151251, 2 );
+=> Returns '23.99 MiB'
+
+ +
+

+ str_to_bool + + util::str_to_bool(string $string) + +

+ +

Converts a string to boolean, looking for yes/no words like 'yes', 'no', 'true', 'false', 'y', 'n', etc

+ +

Usage:

+ +
util::str_to_bool('yes');
+=> Returns true
+
+ +
+

+ zero_pad + + util::zero_pad(int $number, int $length) + +

+ +

Pads a given number with zeroes on the left

+ +

Usage:

+ +
util::zero_pad(341, 8);
+=> Returns '00000341'
+
+ +
+

+ strip_space + + util::strip_space(string $string) + +

+ +

Strip all withspace from the given string

+ +

Usage:

+ +
util::strip_space(' The quick brown fox jumps over the lazy dog ');
+=> Returns 'Thequickbrownfoxjumpsoverthelazydog'
+
+ +
+

+ sanitize_string + + util::sanitize_string(string $string) + +

+ +

+ Sanitize a string by performing the following operation : +

    +
  • Remove accents
  • +
  • Lower the string
  • +
  • Remove punctuation characters
  • +
  • Strip whitespaces
  • +
+ +

+

Usage:

+ +
util::sanitize_string(' Benoit! à New-York? j’ai perçu 1 % : Qu’as-tu "gagné" chez M. V. Noël? Dix francs.');
+=> Returns 'benoitanewyorkjaipercu1quastugagnechezmvnoeldixfrancs'
+
+
+ +

Files

+ +
+
+

+ full_permissions + + util::full_permissions(string $file) + +

+ +

Returns the file permissions as a nice string, like -rw-r--r--

+ +

Usage:

+ +
util::full_permissions('/etc/passwd');
+=> Returns '-rw-r--r--'
+
+ +
+

+ rmdir + + util::rmdir(string $dir[, bool $traverseSymlinks = false]) + +

+ +

Recursively deletes a directories (including all contents).

+ +

Usage:

+ +
util::rmdir('/tmp/working/dir');
+=> Returns true
+
+
+ +

Serialization

+ +
+
+

+ is_serialized + + util::is_serialized(mixed $data) + +

+ +

Checks to see if a given variable is a seralized data structure

+ +

Usage:

+ +
util::is_serialized( 'a:0:{}' );
+=> Returns true
+
+ +
+

+ maybe_serialize + + util::maybe_serialize(mixed $data) + +

+ +

Serialize data, if needed to store in plaintext (Arrays or objects)

+ +

Usage:

+ +
util::maybe_serialize( 5 );
+=> Returns 5
+util::maybe_serialize( array() );
+=> Returns 'a:0:{}'
+
+ +
+

+ maybe_unserialize + + util::maybe_unserialize(mixed $data) + +

+ +

Unserialize data, if it's a serialized string

+ +

Usage:

+ +
util::maybe_unserialize(5);
+=> Returns 5
+util::maybe_unserialize("a:0:{}");
+=> Returns array()
+
+ +
+

+ fix_broken_serialization + + util::fix_broken_serialization(mixed $data) + +

+ +

+ Attempt to fix a broken serialization string (e.g. where string offsets are incorrect). Can fix + errors that frequently occur with mismatched character sets or higher-than-ASCII characters. +

+ +

Usage:

+ +
util::fix_broken_serialization('a:1:{s:4:"test";s:4:"abc";}');
+=> Returns 'a:1:{s:4:"test";s:3:"abc";}'
+
+
+ +

Other

+ +
+
+

+ force_download + + util::force_download(string $filename, string $content = FALSE) + +

+ +

+ Transmit headers that force a browser to display the download file dialog. Cross + browser compatible. Only fires if headers have not already been sent. +

+ +

Usage:

+ +
util::force_download( 'export.csv', file_get_contents( 'securefile.csv' ) );
+=> The user will be prompted to download the file
+
+ +
+

+ get_client_ip + + util::get_client_ip(bool $trust_proxy_headers = FALSE) + +

+ +

+ Returns the IP address of the client. Only enable $trust_proxy_headers if your server is behind a proxy + that sets the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR headers. +

+ +

Usage:

+ +
util::get_client_ip();
+=> Returns '12.123.12.100'
+
+ +
+

+ get_gravatar + + util::get_gravatar(string $email, int $size = 32) + +

+ +

Return the URL to a user's gravatar

+ +

Usage:

+ +
util::get_gravatar('brandon.wamboldt@gmail.com');
+=> Returns 'http://www.gravatar.com/avatar/46679faeb6780ecb1ea57527fdc66eb3?s=32'
+
+ +
+

+ human_time_diff + + util::human_time_diff(int $from, int $to = '', int $as_text = FALSE, string $suffix = ' ago') + +

+ +

Converts a unix timestamp to a relative time string, such as "3 days ago" or "2 weeks ago"

+ +

Usage:

+ +
util::human_time_diff(time() - 7400);
+=> Returns '2 hours ago'
+util::human_time_diff(time() - 7400, '', TRUE);
+=> Returns 'two hours ago'
+
+ +
+

+ nocache_headers + + util::nocache_headers(mixed $data) + +

+ +

Sets the headers to prevent caching for the different browsers

+ +

+ Different browsers support different nocache headers, so several headers must be sent + so that all of them get the point that no caching should occur +

+ +

Usage:

+ +
util::nocache_headers();
+
+ +
+

+ utf8_headers + + util::utf8_headers(mixed $content_type = 'text/html') + +

+ +

Transmit UTF-8 content headers if the headers haven't already been sent

+ +

Usage:

+ +
util::utf8_headers();
+
+ +
+

+ validate_email + + util::validate_email(string $possible_email) + +

+ +

Validate an email address

+ +

Usage:

+ +
util::validate_email( 'brandon.wamboldt@gmail.com' );
+=> Returns true
+util::validate_email( 'not an email' );
+=> Returns false
+
+
+ +

Constants

+ +
+
+

+ SECONDS_IN_A_MINUTE + + util::SECONDS_IN_A_MINUTE + +

+ +

The number of seconds in a minute, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_AN_HOUR + + util::SECONDS_IN_AN_HOUR + +

+ +

The number of seconds in an hour, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_DAY + + util::SECONDS_IN_A_DAY + +

+ +

The number of seconds in a day, useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_WEEK + + util::SECONDS_IN_A_WEEK + +

+ +

The number of seconds in a week (7 days), useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_MONTH + + util::SECONDS_IN_A_MONTH + +

+ +

The number of seconds in a month (30 days), useful for making code more verbose

+
+ +
+

+ SECONDS_IN_A_YEAR + + util::SECONDS_IN_A_YEAR + +

+ +

The number of seconds in a year (365 days), useful for making code more verbose

+
+
+ +

Change Log

+ + + +

+ 1.1.0
+ + This release introduces a deprecation notice for slugify(), please update your code.

+ + - Added a cryptographically secure random string function secure_random_string. Thanks to @abhimanyusharma003 via Pull Request #53
+ - Added limit_characters and limit_words functions. Thanks to @abhimanyusharma003 via Pull Request #55
+ - Added rmdir method to recursively delete a directory. Thanks to @ARACOOOL via Pull Request #56
+ - Added set_executable, set_readable, set_writable, directory_size, directory_contents and get_user_dir functions. Thanks to @sergserg via Pull Request #70
+ - Changed parameter ordering for slugify, $css_mode is now the third argument. For backwards compatibility, the old order will still work but it will generate an E_USER_DEPRECATED warning. Thanks to @abhimanyusharma003 via Pull Request #71
+ - Added match_string method. Thanks to @abhimanyusharma003 via Pull Request #72
+ - Renamed internal methods (protected ones) for PSR-2 compliance
+ - General performance improvements, code quality improvements, and increased unit test coverage (special thanks to @hopeseekr for getting us near 100% coverage)
+

+ +

+ 1.0.7
+ - Added fix_broken_serialization to fix broken serialized strings (Thanks to @hopeseekr via Pull Request #48)
+ - Fixed get_current_url appending port 80 or 443 when not needed (Thanks to @scottchiefbaker via Pull Request #49)
+ - var_dump can now handle recursive data structures without crashing
+ - var_dump code was minified and cleaned up
+ - array_flatten was optimized (thanks to @hopeseekr via Pull Request #47)
+ - remove_accents was completely rewritten and is now ~4x faster
+

+ +

+ 1.0.6
+ - Added start_with function
+ - Added ends_with function
+ - Added str_contains function
+ - Added str_icontains function
+ - Added get_file_ext function
+ - Fixing permissions on the files & directories
+ - Fixing a bug with the include path of util.php
+

+ +

+ 1.0.5
+ - Issue #29 Fixed error in var_dump if mbstring extension wasn't present
+ - Adding Composer support
+ - Updating license from GPL to MIT
+ - Adding Changelog to project
+ - Bumping minimum version to PHP 5.3.3
+

+ +

+ 1.0.4
+ - Issue #22 Removed all superglobal *_get functions, you can use the modified array_get now
+ - Issue #22 Modifed the behaviour of array_get, see documentation
+ - Pull Request #21 Added multibyte support to html* functions
+ - Issue #9 Removed the str_to_utf8 function
+ - Issue #3 Removed the absint function
+ - Removed declare() from util.php to avoid errors
+ - Updated PHPUnit tests to use PHPUnit 3.6 +

+ +

+ 1.0.3
+ - Issue #16 Improved performance of slugify
+ - Issue #14 Modified the regex for seems_utf8 to be more accurate
+ - Issue #13 Changed validate_email to be wrapper for filter_var
+ - Added 'ok' to the list of yes words for str_to_bool
+ - str_to_bool matches no followed by any number of 'o's +

+ +

+ 1.0.2
+ - Issue #12 get_current_url now includes the port and user/password if required
+ - Issue #11 human_time_diff now uses the DateTime functions
+ - Issue #10 is_https no longer checks the port as well +

+ +

+ 1.0.1
+ - Issue #7 Added the $trust_proxy_headers parameter to get_client_ip
+ - Issue #6 Removed is_isset as the function did not work as intended
+ - Issue #6 Removed is_empty as it is redundant, use ! with function calls instead
+ - Fixed a bug with get_gravatar +

+ +

+ 1.0.0
+ Initial release of util.php. +

+
+
+ + + diff --git a/vendor/brandonwamboldt/utilphp/phpunit.xml.dist b/vendor/brandonwamboldt/utilphp/phpunit.xml.dist new file mode 100644 index 00000000..d4b9366c --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/phpunit.xml.dist @@ -0,0 +1,25 @@ + + + + + ./tests + + + + + ./src + + + + + + \ No newline at end of file diff --git a/vendor/brandonwamboldt/utilphp/src/utilphp/util.php b/vendor/brandonwamboldt/utilphp/src/utilphp/util.php new file mode 100644 index 00000000..0932d7d1 --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/src/utilphp/util.php @@ -0,0 +1,2535 @@ + + * @link http://github.com/brandonwamboldt/utilphp/ Official Documentation + */ +class util +{ + /** + * A constant representing the number of seconds in a minute, for + * making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_MINUTE = 60; + + /** + * A constant representing the number of seconds in an hour, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_HOUR = 3600; + const SECONDS_IN_AN_HOUR = 3600; + + /** + * A constant representing the number of seconds in a day, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_DAY = 86400; + + /** + * A constant representing the number of seconds in a week, for making + * code more verbose + * + * @var integer + */ + const SECONDS_IN_A_WEEK = 604800; + + /** + * A constant representing the number of seconds in a month (30 days), + * for making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_MONTH = 2592000; + + /** + * A constant representing the number of seconds in a year (365 days), + * for making code more verbose + * + * @var integer + */ + const SECONDS_IN_A_YEAR = 31536000; + + /** + * URL constants as defined in the PHP Manual under "Constants usable with + * http_build_url()". + * + * @see http://us2.php.net/manual/en/http.constants.php#http.constants.url + */ + const HTTP_URL_REPLACE = 1; + const HTTP_URL_JOIN_PATH = 2; + const HTTP_URL_JOIN_QUERY = 4; + const HTTP_URL_STRIP_USER = 8; + const HTTP_URL_STRIP_PASS = 16; + const HTTP_URL_STRIP_AUTH = 32; + const HTTP_URL_STRIP_PORT = 64; + const HTTP_URL_STRIP_PATH = 128; + const HTTP_URL_STRIP_QUERY = 256; + const HTTP_URL_STRIP_FRAGMENT = 512; + const HTTP_URL_STRIP_ALL = 1024; + + /** + * A collapse icon, using in the dump_var function to allow collapsing + * an array or object + * + * @var string + */ + public static $icon_collapse = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNzFDNDQyNEMyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNzFDNDQyM0MyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NDlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuF4AWkAAAA2UExURU9t2DBStczM/1h16DNmzHiW7iNFrypMvrnD52yJ4ezs7Onp6ejo6P///+Tk5GSG7D9h5SRGq0Q2K74AAAA/SURBVHjaLMhZDsAgDANRY3ZISnP/y1ZWeV+jAeuRSky6cKL4ryDdSggP8UC7r6GvR1YHxjazPQDmVzI/AQYAnFQDdVSJ80EAAAAASUVORK5CYII='; + + /** + * A collapse icon, using in the dump_var function to allow collapsing + * an array or object + * + * @var string + */ + public static $icon_expand = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQzZERTJDNEMyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQzZERTJDM0MyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3MzlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkmDvWIAAABIUExURU9t2MzM/3iW7ubm59/f5urq85mZzOvr6////9ra38zMzObm5rfB8FZz5myJ4SNFrypMvjBStTNmzOvr+mSG7OXl8T9h5SRGq/OfqCEAAABKSURBVHjaFMlbEoAwCEPRULXF2jdW9r9T4czcyUdA4XWB0IgdNSybxU9amMzHzDlPKKu7Fd1e6+wY195jW0ARYZECxPq5Gn8BBgCr0gQmxpjKAwAAAABJRU5ErkJggg=='; + + private static $hasArray = false; + + /** + * Map of special non-ASCII characters and suitable ASCII replacement + * characters. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + public static $maps = array( + 'de' => array(/* German */ + 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', + 'ẞ' => 'SS' + ), + 'latin' => array( + 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' => + 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', + 'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => + 'O', 'Ő' => 'O', 'Ø' => 'O','Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', + 'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => + 'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', + 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => + 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u', + 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y' + ), + 'latin_symbols' => array( + '©' => '(c)' + ), + 'el' => array(/* Greek */ + 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8', + 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p', + 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w', + 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's', + 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', + 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8', + 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P', + 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W', + 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I', + 'Ϋ' => 'Y' + ), + 'tr' => array(/* Turkish */ + 'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U', + 'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G' + ), + 'ru' => array(/* Russian */ + 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh', + 'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', + 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', + 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu', + 'я' => 'ya', + 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh', + 'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', + 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', + 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu', + 'Я' => 'Ya', + '№' => '' + ), + 'uk' => array(/* Ukrainian */ + 'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g' + ), + 'cs' => array(/* Czech */ + 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u', + 'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', + 'Ů' => 'U', 'Ž' => 'Z' + ), + 'pl' => array(/* Polish */ + 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', + 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', + 'Ź' => 'Z', 'Ż' => 'Z' + ), + 'ro' => array(/* Romanian */ + 'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't' + ), + 'lv' => array(/* Latvian */ + 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', + 'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', + 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z' + ), + 'lt' => array(/* Lithuanian */ + 'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z', + 'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z' + ), + 'vn' => array(/* Vietnamese */ + 'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A', + 'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a', + 'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E', + 'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e', + 'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i', + 'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O', + 'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o', + 'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U', + 'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u', + 'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y', + 'Đ' => 'D', 'đ' => 'd' + ), + 'ar' => array(/* Arabic */ + 'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', + 'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't', + 'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm', + 'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y' + ), + 'sr' => array(/* Serbian */ + 'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'dj', + 'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'Dj' + ), + 'az' => array(/* Azerbaijani */ + 'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', + 'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U' + ), + ); + + /** + * The character map for the designated language + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $map = array(); + + /** + * The character list as a string. + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $chars = ''; + + /** + * The character list as a regular expression. + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $regex = ''; + + /** + * The current language + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static $language = ''; + + /** + * Initializes the character map. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + */ + private static function initLanguageMap($language = '') + { + if (count(self::$map) > 0 && (($language == '') || ($language == self::$language))) { + return; + } + + // Is a specific map associated with $language? + if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) { + // Move this map to end. This means it will have priority over others + $m = self::$maps[$language]; + unset(self::$maps[$language]); + self::$maps[$language] = $m; + } + + // Reset static vars + self::$language = $language; + self::$map = array(); + self::$chars = ''; + + foreach (self::$maps as $map) { + foreach ($map as $orig => $conv) { + self::$map[$orig] = $conv; + self::$chars .= $orig; + } + } + + self::$regex = '/[' . self::$chars . ']/u'; + } + + + /** + * Access an array index, retrieving the value stored there if it + * exists or a default if it does not. This function allows you to + * concisely access an index which may or may not exist without + * raising a warning. + * + * @param array $var Array value to access + * @param mixed $default Default value to return if the key is not + * present in the array + * @return mixed + */ + public static function array_get(&$var, $default = null) + { + if (isset($var)) { + return $var; + } + + return $default; + } + + /** + * Display a variable's contents using nice HTML formatting and will + * properly display the value of booleans as true or false + * + * @see var_dump_plain() + * + * @param mixed $var The variable to dump + * @return string + */ + public static function var_dump($var, $return = false, $expandLevel = 1) + { + self::$hasArray = false; + $toggScript = 'var colToggle = function(toggID) {var img = document.getElementById(toggID);if (document.getElementById(toggID + "-collapsable").style.display == "none") {document.getElementById(toggID + "-collapsable").style.display = "inline";setImg(toggID, 0);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling;while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}} else {document.getElementById(toggID + "-collapsable").style.display = "none";setImg(toggID, 1);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling; while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}}};'; + $imgScript = 'var setImg = function(objID,imgID,addStyle) {var imgStore = ["data:image/png;base64,' . self::$icon_collapse . '", "data:image/png;base64,' . self::$icon_expand . '"];if (objID) {document.getElementById(objID).setAttribute("src", imgStore[imgID]);if (addStyle){document.getElementById(objID).setAttribute("style", "position:relative;left:-5px;top:-1px;cursor:pointer;");}}};'; + $jsCode = preg_replace('/ +/', ' ', ''); + $html = '
';
+        $done  = array();
+        $html .= self::var_dump_plain($var, intval($expandLevel), 0, $done);
+        $html .= '
'; + + if (self::$hasArray) { + $html = $jsCode . $html; + } + + if (!$return) { + echo $html; + } + + return $html; + } + + /** + * Display a variable's contents using nice HTML formatting (Without + * the
 tag) and will properly display the values of variables
+     * like booleans and resources. Supports collapsable arrays and objects
+     * as well.
+     *
+     * @param  mixed $var The variable to dump
+     * @return string
+     */
+    public static function var_dump_plain($var, $expLevel, $depth = 0, $done = array())
+    {
+        $html = '';
+
+        if ($expLevel > 0) {
+            $expLevel--;
+            $setImg = 0;
+            $setStyle = 'display:inline;';
+        } elseif ($expLevel == 0) {
+            $setImg = 1;
+            $setStyle='display:none;';
+        } elseif ($expLevel < 0) {
+            $setImg = 0;
+            $setStyle = 'display:inline;';
+        }
+
+        if (is_bool($var)) {
+            $html .= 'bool(' . (($var) ? 'true' : 'false') . ')';
+        } elseif (is_int($var)) {
+            $html .= 'int(' . $var . ')';
+        } elseif (is_float($var)) {
+            $html .= 'float(' . $var . ')';
+        } elseif (is_string($var)) {
+            $html .= 'string(' . strlen($var) . ') "' . self::htmlentities($var) . '"';
+        } elseif (is_null($var)) {
+            $html .= 'NULL';
+        } elseif (is_resource($var)) {
+            $html .= 'resource("' . get_resource_type($var) . '") "' . $var . '"';
+        } elseif (is_array($var)) {
+            // Check for recursion
+            if ($depth > 0) {
+                foreach ($done as $prev) {
+                    if ($prev === $var) {
+                        $html .= 'array(' . count($var) . ') *RECURSION DETECTED*';
+                        return $html;
+                    }
+                }
+
+                // Keep track of variables we have already processed to detect recursion
+                $done[] = &$var;
+            }
+
+            self::$hasArray = true;
+            $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000);
+
+            $html .= (!empty($var) ? ' ' : '') . 'array(' . count($var) . ')';
+            if (!empty($var)) {
+                $html .= ' 
[
'; + + $indent = 4; + $longest_key = 0; + + foreach ($var as $key => $value) { + if (is_string($key)) { + $longest_key = max($longest_key, strlen($key) + 2); + } else { + $longest_key = max($longest_key, strlen($key)); + } + } + + foreach ($var as $key => $value) { + if (is_numeric($key)) { + $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); + } else { + $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); + } + + $html .= ' => '; + + $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); + + foreach ($value as $line => $val) { + if ($line != 0) { + $value[$line] = str_repeat(' ', $indent * 2) . $val; + } + } + + $html .= implode('
', $value) . '
'; + } + + $html .= ']
'; + } + } elseif (is_object($var)) { + // Check for recursion + foreach ($done as $prev) { + if ($prev === $var) { + $html .= 'object(' . get_class($var) . ') *RECURSION DETECTED*'; + return $html; + } + } + + // Keep track of variables we have already processed to detect recursion + $done[] = &$var; + + self::$hasArray=true; + $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000); + + $html .= ' object(' . get_class($var) . ')
[
'; + + $varArray = (array) $var; + + $indent = 4; + $longest_key = 0; + + foreach ($varArray as $key => $value) { + if (substr($key, 0, 2) == "\0*") { + unset($varArray[$key]); + $key = 'protected:' . substr($key, 3); + $varArray[$key] = $value; + } elseif (substr($key, 0, 1) == "\0") { + unset($varArray[$key]); + $key = 'private:' . substr($key, 1, strpos(substr($key, 1), "\0")) . ':' . substr($key, strpos(substr($key, 1), "\0") + 2); + $varArray[$key] = $value; + } + + if (is_string($key)) { + $longest_key = max($longest_key, strlen($key) + 2); + } else { + $longest_key = max($longest_key, strlen($key)); + } + } + + foreach ($varArray as $key => $value) { + if (is_numeric($key)) { + $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); + } else { + $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); + } + + $html .= ' => '; + + $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); + + foreach ($value as $line => $val) { + if ($line != 0) { + $value[$line] = str_repeat(' ', $indent * 2) . $val; + } + } + + $html .= implode('
', $value) . '
'; + } + + $html .= ']
'; + } + + return $html; + } + + /** + * Converts any accent characters to their equivalent normal characters + * and converts any other non-alphanumeric characters to dashes, then + * converts any sequence of two or more dashes to a single dash. This + * function generates slugs safe for use as URLs, and if you pass true + * as the second parameter, it will create strings safe for use as CSS + * classes or IDs. + * + * @param string $string A string to convert to a slug + * @param string $separator The string to separate words with + * @param boolean $css_mode Whether or not to generate strings safe for + * CSS classes/IDs (Default to false) + * @return string + */ + public static function slugify($string, $separator = '-', $css_mode = false) + { + // Compatibility with 1.0.* parameter ordering for semvar + if ($separator === true || $separator === false) { + $css_mode = $separator; + $separator = '-'; + + // Raise deprecation error + trigger_error( + 'util::slugify() now takes $css_mode as the third parameter, please update your code', + E_USER_DEPRECATED + ); + } + + $slug = preg_replace('/([^a-z0-9]+)/', $separator, strtolower(self::remove_accents($string))); + + if ($css_mode) { + $digits = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); + + if (is_numeric(substr($slug, 0, 1))) { + $slug = $digits[substr($slug, 0, 1)] . substr($slug, 1); + } + } + + return $slug; + } + + /** + * Checks to see if a string is utf8 encoded. + * + * NOTE: This function checks for 5-Byte sequences, UTF8 + * has Bytes Sequences with a maximum length of 4. + * + * Written by Tony Ferrara + * + * @param string $string The string to be checked + * @return boolean + */ + public static function seems_utf8($string) + { + if (function_exists('mb_check_encoding')) { + // If mbstring is available, this is significantly faster than + // using PHP regexps. + return mb_check_encoding($string, 'UTF-8'); + } + + // @codeCoverageIgnoreStart + return self::seemsUtf8Regex($string); + // @codeCoverageIgnoreEnd + } + + /** + * A non-Mbstring UTF-8 checker. + * + * @param $string + * @return bool + */ + protected static function seemsUtf8Regex($string) + { + // Obtained from http://stackoverflow.com/a/11709412/430062 with permission. + $regex = '/( + [\xC0-\xC1] # Invalid UTF-8 Bytes + | [\xF5-\xFF] # Invalid UTF-8 Bytes + | \xE0[\x80-\x9F] # Overlong encoding of prior code point + | \xF0[\x80-\x8F] # Overlong encoding of prior code point + | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start + | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start + | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start + | (?<=[\x0-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle + | (? + * + * @param string $brokenSerializedData + * @return string + */ + public static function fix_broken_serialization($brokenSerializedData) + { + $fixdSerializedData = preg_replace_callback('!s:(\d+):"(.*?)";!', function($matches) { + $snip = $matches[2]; + return 's:' . strlen($snip) . ':"' . $snip . '";'; + }, $brokenSerializedData); + + return $fixdSerializedData; + } + + /** + * Checks to see if the page is being server over SSL or not + * + * @return boolean + */ + public static function is_https() + { + return isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'; + } + + /** + * Add or remove query arguments to the URL. + * + * @param mixed $newKey Either newkey or an associative array + * @param mixed $newValue Either newvalue or oldquery or uri + * @param mixed $uri URI or URL to append the queru/queries to. + * @return string + */ + public static function add_query_arg($newKey, $newValue = null, $uri = null) + { + // Was an associative array of key => value pairs passed? + if (is_array($newKey)) { + $newParams = $newKey; + + // Was the URL passed as an argument? + if (!is_null($newValue)) { + $uri = $newValue; + } elseif (!is_null($uri)) { + $uri = $uri; + } else { + $uri = self::array_get($_SERVER['REQUEST_URI'], ''); + } + } else { + $newParams = array($newKey => $newValue); + + // Was the URL passed as an argument? + $uri = is_null($uri) ? self::array_get($_SERVER['REQUEST_URI'], '') : $uri; + } + + // Parse the URI into it's components + $puri = parse_url($uri); + + if (isset($puri['query'])) { + parse_str($puri['query'], $queryParams); + $queryParams = array_merge($queryParams, $newParams); + } elseif (isset($puri['path']) && strstr($puri['path'], '=') !== false) { + $puri['query'] = $puri['path']; + unset($puri['path']); + parse_str($puri['query'], $queryParams); + $queryParams = array_merge($queryParams, $newParams); + } else { + $queryParams = $newParams; + } + + // Strip out any query params that are set to false + foreach ($queryParams as $param => $value) { + if ($value === false) { + unset($queryParams[$param]); + } + } + + // Re-construct the query string + $puri['query'] = http_build_query($queryParams); + + // Re-construct the entire URL + $nuri = self::http_build_url($puri); + + // Make the URI consistent with our input + if ($nuri[0] === '/' && strstr($uri, '/') === false) { + $nuri = substr($nuri, 1); + } + + if ($nuri[0] === '?' && strstr($uri, '?') === false) { + $nuri = substr($nuri, 1); + } + + return rtrim($nuri, '?'); + } + + /** + * Removes an item or list from the query string. + * + * @param string|array $keys Query key or keys to remove. + * @param bool $uri When false uses the $_SERVER value + * @return string + */ + public static function remove_query_arg($keys, $uri = null) + { + if (is_array($keys)) { + return self::add_query_arg(array_combine($keys, array_fill(0, count($keys), null)), $uri); + } + + return self::add_query_arg(array($keys => null), $uri); + } + + /** + * Build a URL. + * + * The parts of the second URL will be merged into the first according to + * the flags argument. + * + * @author Jake Smith + * @see https://github.com/jakeasmith/http_build_url/ + * + * @param mixed $url (part(s) of) an URL in form of a string or + * associative array like parse_url() returns + * @param mixed $parts same as the first argument + * @param int $flags a bitmask of binary or'ed HTTP_URL constants; + * HTTP_URL_REPLACE is the default + * @param array $new_url if set, it will be filled with the parts of the + * composed url like parse_url() would return + * @return string + */ + public static function http_build_url($url, $parts = array(), $flags = self::HTTP_URL_REPLACE, &$new_url = array()) + { + is_array($url) || $url = parse_url($url); + is_array($parts) || $parts = parse_url($parts); + + isset($url['query']) && is_string($url['query']) || $url['query'] = null; + isset($parts['query']) && is_string($parts['query']) || $parts['query'] = null; + + $keys = array('user', 'pass', 'port', 'path', 'query', 'fragment'); + + // HTTP_URL_STRIP_ALL and HTTP_URL_STRIP_AUTH cover several other flags. + if ($flags & self::HTTP_URL_STRIP_ALL) { + $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS + | self::HTTP_URL_STRIP_PORT | self::HTTP_URL_STRIP_PATH + | self::HTTP_URL_STRIP_QUERY | self::HTTP_URL_STRIP_FRAGMENT; + } elseif ($flags & self::HTTP_URL_STRIP_AUTH) { + $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS; + } + + // Schema and host are alwasy replaced + foreach (array('scheme', 'host') as $part) { + if (isset($parts[$part])) { + $url[$part] = $parts[$part]; + } + } + + if ($flags & self::HTTP_URL_REPLACE) { + foreach ($keys as $key) { + if (isset($parts[$key])) { + $url[$key] = $parts[$key]; + } + } + } else { + if (isset($parts['path']) && ($flags & self::HTTP_URL_JOIN_PATH)) { + if (isset($url['path']) && substr($parts['path'], 0, 1) !== '/') { + $url['path'] = rtrim( + str_replace(basename($url['path']), '', $url['path']), + '/' + ) . '/' . ltrim($parts['path'], '/'); + } else { + $url['path'] = $parts['path']; + } + } + + if (isset($parts['query']) && ($flags & self::HTTP_URL_JOIN_QUERY)) { + if (isset($url['query'])) { + parse_str($url['query'], $url_query); + parse_str($parts['query'], $parts_query); + + $url['query'] = http_build_query( + array_replace_recursive( + $url_query, + $parts_query + ) + ); + } else { + $url['query'] = $parts['query']; + } + } + } + + if (isset($url['path']) && substr($url['path'], 0, 1) !== '/') { + $url['path'] = '/' . $url['path']; + } + + foreach ($keys as $key) { + $strip = 'HTTP_URL_STRIP_' . strtoupper($key); + if ($flags & constant('utilphp\\util::' . $strip)) { + unset($url[$key]); + } + } + + $parsed_string = ''; + + if (isset($url['scheme'])) { + $parsed_string .= $url['scheme'] . '://'; + } + + if (isset($url['user'])) { + $parsed_string .= $url['user']; + + if (isset($url['pass'])) { + $parsed_string .= ':' . $url['pass']; + } + + $parsed_string .= '@'; + } + + if (isset($url['host'])) { + $parsed_string .= $url['host']; + } + + if (isset($url['port'])) { + $parsed_string .= ':' . $url['port']; + } + + if (!empty($url['path'])) { + $parsed_string .= $url['path']; + } else { + $parsed_string .= '/'; + } + + if (isset($url['query'])) { + $parsed_string .= '?' . $url['query']; + } + + if (isset($url['fragment'])) { + $parsed_string .= '#' . $url['fragment']; + } + + $new_url = $url; + + return $parsed_string; + } + + /** + * Converts many english words that equate to true or false to boolean. + * + * Supports 'y', 'n', 'yes', 'no' and a few other variations. + * + * @param string $string The string to convert to boolean + * @param bool $default The value to return if we can't match any + * yes/no words + * @return boolean + */ + public static function str_to_bool($string, $default = false) + { + $yes_words = 'affirmative|all right|aye|indubitably|most assuredly|ok|of course|okay|sure thing|y|yes+|yea|yep|sure|yeah|true|t|on|1|oui|vrai'; + $no_words = 'no*|no way|nope|nah|na|never|absolutely not|by no means|negative|never ever|false|f|off|0|non|faux'; + + if (preg_match('/^(' . $yes_words . ')$/i', $string)) { + return true; + } elseif (preg_match('/^(' . $no_words . ')$/i', $string)) { + return false; + } + + return $default; + } + + /** + * Check if a string starts with the given string. + * + * @param string $string + * @param string $starts_with + * @return boolean + */ + public static function starts_with($string, $starts_with) + { + return strpos($string, $starts_with) === 0; + } + + /** + * Check if a string ends with the given string. + * + * @param string $string + * @param string $starts_with + * @return boolean + */ + public static function ends_with($string, $ends_with) + { + return substr($string, -strlen($ends_with)) === $ends_with; + } + + /** + * Check if a string contains another string. + * + * @param string $haystack + * @param string $needle + * @return boolean + */ + public static function str_contains($haystack, $needle) + { + return strpos($haystack, $needle) !== false; + } + + /** + * Check if a string contains another string. This version is case + * insensitive. + * + * @param string $haystack + * @param string $needle + * @return boolean + */ + public static function str_icontains($haystack, $needle) + { + return stripos($haystack, $needle) !== false; + } + + /** + * Return the file extension of the given filename. + * + * @param string $filename + * @return string + */ + public static function get_file_ext($filename) + { + return pathinfo($filename, PATHINFO_EXTENSION); + } + + /** + * Removes a directory (and its contents) recursively. + * + * Contributed by Askar (ARACOOL) + * + * @param string $dir The directory to be deleted recursively + * @param bool $traverseSymlinks Delete contents of symlinks recursively + * @return bool + * @throws \RuntimeException + */ + public static function rmdir($dir, $traverseSymlinks = false) + { + if (!file_exists($dir)) { + return true; + } elseif (!is_dir($dir)) { + throw new \RuntimeException('Given path is not a directory'); + } + + if (!is_link($dir) || $traverseSymlinks) { + foreach (scandir($dir) as $file) { + if ($file === '.' || $file === '..') { + continue; + } + + $currentPath = $dir . '/' . $file; + + if (is_dir($currentPath)) { + self::rmdir($currentPath, $traverseSymlinks); + } elseif (!unlink($currentPath)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $currentPath); + // @codeCoverageIgnoreEnd + } + } + } + + // Windows treats removing directory symlinks identically to removing directories. + if (is_link($dir) && !defined('PHP_WINDOWS_VERSION_MAJOR')) { + if (!unlink($dir)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $dir); + // @codeCoverageIgnoreEnd + } + } else { + if (!rmdir($dir)) { + // @codeCoverageIgnoreStart + throw new \RuntimeException('Unable to delete ' . $dir); + // @codeCoverageIgnoreEnd + } + } + + return true; + } + + /** + * Convert entities, while preserving already-encoded entities. + * + * @param string $string The text to be converted + * @return string + */ + public static function htmlentities($string, $preserve_encoded_entities = false) + { + if ($preserve_encoded_entities) { + // @codeCoverageIgnoreStart + if (defined('HHVM_VERSION')) { + $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); + } else { + $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, self::mbInternalEncoding()); + } + // @codeCoverageIgnoreEnd + + $translation_table[chr(38)] = '&'; + return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); + } + + return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); + } + + /** + * Convert >, <, ', " and & to html entities, but preserves entities that + * are already encoded. + * + * @param string $string The text to be converted + * @return string + */ + public static function htmlspecialchars($string, $preserve_encoded_entities = false) + { + if ($preserve_encoded_entities) { + // @codeCoverageIgnoreStart + if (defined('HHVM_VERSION')) { + $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES); + } else { + $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES, self::mbInternalEncoding()); + } + // @codeCoverageIgnoreEnd + + $translation_table[chr(38)] = '&'; + + return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); + } + + return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); + } + + /** + * Transliterates characters to their ASCII equivalents. + * + * Part of the URLify.php Project + * + * @see https://github.com/jbroadway/urlify/blob/master/URLify.php + * + * @param string $text Text that might have not-ASCII characters + * @param string $language Specifies a priority for a specific language. + * @return string Filtered string with replaced "nice" characters + */ + public static function downcode($text, $language = '') + { + self::initLanguageMap($language); + + if (self::seems_utf8($text)) { + if (preg_match_all(self::$regex, $text, $matches)) { + for ($i = 0; $i < count($matches[0]); $i++) { + $char = $matches[0][$i]; + if (isset(self::$map[$char])) { + $text = str_replace($char, self::$map[$char], $text); + } + } + } + } else { + // Not a UTF-8 string so we assume its ISO-8859-1 + $search = "\x80\x83\x8a\x8e\x9a\x9e\x9f\xa2\xa5\xb5\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd"; + $search .= "\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9"; + $search .= "\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xff"; + $text = strtr($text, $search, 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'); + + // These latin characters should be represented by two characters so + // we can't use strtr + $complexSearch = array("\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe"); + $complexReplace = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); + $text = str_replace($complexSearch, $complexReplace, $text); + } + + return $text; + } + + /** + * Converts all accent characters to ASCII characters. + * + * If there are no accent characters, then the string given is just + * returned. + * + * @param string $string Text that might have accent characters + * @param string $language Specifies a priority for a specific language. + * @return string Filtered string with replaced "nice" characters + */ + public static function remove_accents($string, $language = '') + { + if (!preg_match('/[\x80-\xff]/', $string)) { + return $string; + } + + return self::downcode($string, $language); + } + + /** + * Strip all witespaces from the given string. + * + * @param string $string The string to strip + * @return string + */ + public static function strip_space($string) + { + return preg_replace('/\s+/', '', $string); + } + + /** + * Sanitize a string by performing the following operation : + * - Remove accents + * - Lower the string + * - Remove punctuation characters + * - Strip whitespaces + * + * @param string $string the string to sanitize + * @return string + */ + public static function sanitize_string($string) + { + $string = self::remove_accents($string); + $string = strtolower($string); + $string = preg_replace('/[^a-zA-Z 0-9]+/', '', $string); + $string = self::strip_space($string); + + return $string; + } + + /** + * Pads a given string with zeroes on the left. + * + * @param int $number The number to pad + * @param int $length The total length of the desired string + * @return string + */ + public static function zero_pad($number, $length) + { + return str_pad($number, $length, '0', STR_PAD_LEFT); + } + + /** + * Converts a unix timestamp to a relative time string, such as "3 days ago" + * or "2 weeks ago". + * + * @param int $from The date to use as a starting point + * @param int $to The date to compare to, defaults to now + * @param string $suffix The string to add to the end, defaults to " ago" + * @return string + */ + public static function human_time_diff($from, $to = '', $as_text = false, $suffix = ' ago') + { + if ($to == '') { + $to = time(); + } + + $from = new \DateTime(date('Y-m-d H:i:s', $from)); + $to = new \DateTime(date('Y-m-d H:i:s', $to)); + $diff = $from->diff($to); + + if ($diff->y > 1) { + $text = $diff->y . ' years'; + } elseif ($diff->y == 1) { + $text = '1 year'; + } elseif ($diff->m > 1) { + $text = $diff->m . ' months'; + } elseif ($diff->m == 1) { + $text = '1 month'; + } elseif ($diff->d > 7) { + $text = ceil($diff->d / 7) . ' weeks'; + } elseif ($diff->d == 7) { + $text = '1 week'; + } elseif ($diff->d > 1) { + $text = $diff->d . ' days'; + } elseif ($diff->d == 1) { + $text = '1 day'; + } elseif ($diff->h > 1) { + $text = $diff->h . ' hours'; + } elseif ($diff->h == 1) { + $text = ' 1 hour'; + } elseif ($diff->i > 1) { + $text = $diff->i . ' minutes'; + } elseif ($diff->i == 1) { + $text = '1 minute'; + } elseif ($diff->s > 1) { + $text = $diff->s . ' seconds'; + } else { + $text = '1 second'; + } + + if ($as_text) { + $text = explode(' ', $text, 2); + $text = self::number_to_word($text[0]) . ' ' . $text[1]; + } + + return trim($text) . $suffix; + } + + /** + * Converts a number into the text equivalent. For example, 456 becomes four + * hundred and fifty-six. + * + * Part of the IntToWords Project. + * + * @param int|float $number The number to convert into text + * @return string + */ + public static function number_to_word($number) + { + $number = (string) $number; + + if (strpos($number, '.') !== false) { + list($number, $decimal) = explode('.', $number); + } else { + $decimal = false; + } + + $output = ''; + + if ($number[0] == '-') { + $output = 'negative '; + $number = ltrim($number, '-'); + } elseif ($number[0] == '+') { + $output = 'positive '; + $number = ltrim($number, '+'); + } + + if ($number[0] == '0') { + $output .= 'zero'; + } else { + $length = 19; + $number = str_pad($number, 60, '0', STR_PAD_LEFT); + $group = rtrim(chunk_split($number, 3, ' '), ' '); + $groups = explode(' ', $group); + $groups2 = array(); + + foreach ($groups as $group) { + $group[1] = isset($group[1]) ? $group[1] : null; + $group[2] = isset($group[2]) ? $group[2] : null; + $groups2[] = self::numberToWordThreeDigits($group[0], $group[1], $group[2]); + } + + for ($z = 0; $z < count($groups2); $z++) { + if ($groups2[$z] != '') { + $output .= $groups2[$z] . self::numberToWordConvertGroup($length - $z); + $output .= ($z < $length && ! array_search('', array_slice($groups2, $z + 1, -1)) && $groups2[$length] != '' && $groups[$length][0] == '0' ? ' and ' : ', '); + } + } + + $output = rtrim($output, ', '); + } + + if ($decimal > 0) { + $output .= ' point'; + + for ($i = 0; $i < strlen($decimal); $i++) { + $output .= ' ' . self::numberToWordConvertDigit($decimal[$i]); + } + } + + return $output; + } + + protected static function numberToWordConvertGroup($index) + { + switch($index) { + case 11: + return ' decillion'; + case 10: + return ' nonillion'; + case 9: + return ' octillion'; + case 8: + return ' septillion'; + case 7: + return ' sextillion'; + case 6: + return ' quintrillion'; + case 5: + return ' quadrillion'; + case 4: + return ' trillion'; + case 3: + return ' billion'; + case 2: + return ' million'; + case 1: + return ' thousand'; + case 0: + return ''; + } + + return ''; + } + + protected static function numberToWordThreeDigits($digit1, $digit2, $digit3) + { + $output = ''; + + if ($digit1 == '0' && $digit2 == '0' && $digit3 == '0') { + return ''; + } + + if ($digit1 != '0') { + $output .= self::numberToWordConvertDigit($digit1) . ' hundred'; + + if ($digit2 != '0' || $digit3 != '0') { + $output .= ' and '; + } + } + if ($digit2 != '0') { + $output .= self::numberToWordTwoDigits($digit2, $digit3); + } elseif ($digit3 != '0') { + $output .= self::numberToWordConvertDigit($digit3); + } + + return $output; + } + + protected static function numberToWordTwoDigits($digit1, $digit2) + { + if ($digit2 == '0') { + switch ($digit1) { + case '1': + return 'ten'; + case '2': + return 'twenty'; + case '3': + return 'thirty'; + case '4': + return 'forty'; + case '5': + return 'fifty'; + case '6': + return 'sixty'; + case '7': + return 'seventy'; + case '8': + return 'eighty'; + case '9': + return 'ninety'; + } + } elseif ($digit1 == '1') { + switch ($digit2) { + case '1': + return 'eleven'; + case '2': + return 'twelve'; + case '3': + return 'thirteen'; + case '4': + return 'fourteen'; + case '5': + return 'fifteen'; + case '6': + return 'sixteen'; + case '7': + return 'seventeen'; + case '8': + return 'eighteen'; + case '9': + return 'nineteen'; + } + } else { + $second_digit = self::numberToWordConvertDigit($digit2); + + switch ($digit1) { + case '2': + return "twenty-{$second_digit}"; + case '3': + return "thirty-{$second_digit}"; + case '4': + return "forty-{$second_digit}"; + case '5': + return "fifty-{$second_digit}"; + case '6': + return "sixty-{$second_digit}"; + case '7': + return "seventy-{$second_digit}"; + case '8': + return "eighty-{$second_digit}"; + case '9': + return "ninety-{$second_digit}"; + } + } + } + + /** + * @param $digit + * @return string + * @throws \LogicException + */ + protected static function numberToWordConvertDigit($digit) + { + switch ($digit) { + case '0': + return 'zero'; + case '1': + return 'one'; + case '2': + return 'two'; + case '3': + return 'three'; + case '4': + return 'four'; + case '5': + return 'five'; + case '6': + return 'six'; + case '7': + return 'seven'; + case '8': + return 'eight'; + case '9': + return 'nine'; + default: + throw new \LogicException('Not a number'); + } + } + + /** + * Transmit UTF-8 content headers if the headers haven't already been sent. + * + * @param string $content_type The content type to send out + * @return boolean + */ + public static function utf8_headers($content_type = 'text/html') + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + header('Content-type: ' . $content_type . '; charset=utf-8'); + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Transmit headers that force a browser to display the download file + * dialog. Cross browser compatible. Only fires if headers have not + * already been sent. + * + * @param string $filename The name of the filename to display to + * browsers + * @param string $content The content to output for the download. + * If you don't specify this, just the + * headers will be sent + * @return boolean + */ + public static function force_download($filename, $content = false) + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + // Required for some browsers + if (ini_get('zlib.output_compression')) { + @ini_set('zlib.output_compression', 'Off'); + } + + header('Pragma: public'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + + // Required for certain browsers + header('Cache-Control: private', false); + + header('Content-Disposition: attachment; filename="' . basename(str_replace('"', '', $filename)) . '";'); + header('Content-Type: application/force-download'); + header('Content-Transfer-Encoding: binary'); + + if ($content) { + header('Content-Length: ' . strlen($content)); + } + + ob_clean(); + flush(); + + if ($content) { + echo $content; + } + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Sets the headers to prevent caching for the different browsers. + * + * Different browsers support different nocache headers, so several + * headers must be sent so that all of them get the point that no + * caching should occur + * + * @return boolean + */ + public static function nocache_headers() + { + // @codeCoverageIgnoreStart + if (!headers_sent()) { + header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + header('Cache-Control: no-cache, must-revalidate, max-age=0'); + header('Pragma: no-cache'); + + return true; + } + + return false; + // @codeCoverageIgnoreEnd + } + + /** + * Generates a string of random characters. + * + * @throws LengthException If $length is bigger than the available + * character pool and $no_duplicate_chars is + * enabled + * + * @param integer $length The length of the string to + * generate + * @param boolean $human_friendly Whether or not to make the + * string human friendly by + * removing characters that can be + * confused with other characters ( + * O and 0, l and 1, etc) + * @param boolean $include_symbols Whether or not to include + * symbols in the string. Can not + * be enabled if $human_friendly is + * true + * @param boolean $no_duplicate_chars Whether or not to only use + * characters once in the string. + * @return string + */ + public static function random_string($length = 16, $human_friendly = true, $include_symbols = false, $no_duplicate_chars = false) + { + $nice_chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnprstuvwxyz23456789'; + $all_an = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'; + $symbols = '!@#$%^&*()~_-=+{}[]|:;<>,.?/"\'\\`'; + $string = ''; + + // Determine the pool of available characters based on the given parameters + if ($human_friendly) { + $pool = $nice_chars; + } else { + $pool = $all_an; + + if ($include_symbols) { + $pool .= $symbols; + } + } + + if (!$no_duplicate_chars) { + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + } + + // Don't allow duplicate letters to be disabled if the length is + // longer than the available characters + if ($no_duplicate_chars && strlen($pool) < $length) { + throw new \LengthException('$length exceeds the size of the pool and $no_duplicate_chars is enabled'); + } + + // Convert the pool of characters into an array of characters and + // shuffle the array + $pool = str_split($pool); + $poolLength = count($pool); + $rand = mt_rand(0, $poolLength - 1); + + // Generate our string + for ($i = 0; $i < $length; $i++) { + $string .= $pool[$rand]; + + // Remove the character from the array to avoid duplicates + array_splice($pool, $rand, 1); + + // Generate a new number + if (($poolLength - 2 - $i) > 0) { + $rand = mt_rand(0, $poolLength - 2 - $i); + } else { + $rand = 0; + } + } + + return $string; + } + + /** + * Generate secure random string of given length + * If 'openssl_random_pseudo_bytes' is not available + * then generate random string using default function + * + * Part of the Laravel Project + * + * @param int $length length of string + * @return bool + */ + public static function secure_random_string($length = 16) + { + if (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($length * 2); + + if ($bytes === false) { + throw new \LengthException('$length is not accurate, unable to generate random string'); + } + + return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length); + } + + // @codeCoverageIgnoreStart + return static::random_string($length); + // @codeCoverageIgnoreEnd + } + + /** + * Check if a given string matches a given pattern. + * + * Contributed by Abhimanyu Sharma + * + * @param string $pattern Parttern of string exptected + * @param string $string String that need to be matched + * @return bool + */ + public static function match_string($pattern, $string, $caseSensitive = true) + { + if ($pattern == $string) { + return true; + } + + // Preg flags + $flags = $caseSensitive ? '' : 'i'; + + // Escape any regex special characters + $pattern = preg_quote($pattern, '#'); + + // Unescape * which is our wildcard character and change it to .* + $pattern = str_replace('\*', '.*', $pattern); + + return (bool) preg_match('#^' . $pattern . '$#' . $flags, $string); + } + + /** + * Validate an email address. + * + * @param string $possible_email An email address to validate + * @return bool + */ + public static function validate_email($possible_email) + { + return (bool) filter_var($possible_email, FILTER_VALIDATE_EMAIL); + } + + /** + * Return the URL to a user's gravatar. + * + * @param string $email The email of the user + * @param integer $size The size of the gravatar + * @return string + */ + public static function get_gravatar($email, $size = 32) + { + if (self::is_https()) { + $url = 'https://secure.gravatar.com/'; + } else { + $url = 'http://www.gravatar.com/'; + } + + $url .= 'avatar/' . md5($email) . '?s=' . (int) abs($size); + + return $url; + } + + /** + * Turns all of the links in a string into HTML links. + * + * Part of the LinkifyURL Project + * + * @param string $text The string to parse + * @return string + */ + public static function linkify($text) + { + $text = preg_replace('/'/', ''', $text); // IE does not handle ' entity! + $section_html_pattern = '%# Rev:20100913_0900 github.com/jmrware/LinkifyURL + # Section text into HTML tags and everything else. + ( # $1: Everything not HTML tag. + [^<]+(?:(?!... tag. + ]*> # opening tag. + [^<]*(?:(?! # closing tag. + ) # End $2: + %ix'; + + return preg_replace_callback($section_html_pattern, array(__CLASS__, 'linkifyCallback'), $text); + } + + /** + * Callback for the preg_replace in the linkify() method. + * + * Part of the LinkifyURL Project + * + * @param array $matches Matches from the preg_ function + * @return string + */ + protected static function linkifyRegex($text) + { + $url_pattern = '/# Rev:20100913_0900 github.com\/jmrware\/LinkifyURL + # Match http & ftp URL that is not already linkified. + # Alternative 1: URL delimited by (parentheses). + (\() # $1 "(" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $2: URL. + (\)) # $3: ")" end delimiter. + | # Alternative 2: URL delimited by [square brackets]. + (\[) # $4: "[" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $5: URL. + (\]) # $6: "]" end delimiter. + | # Alternative 3: URL delimited by {curly braces}. + (\{) # $7: "{" start delimiter. + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $8: URL. + (\}) # $9: "}" end delimiter. + | # Alternative 4: URL delimited by . + (<|&(?:lt|\#60|\#x3c);) # $10: "<" start delimiter (or HTML entity). + ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $11: URL. + (>|&(?:gt|\#62|\#x3e);) # $12: ">" end delimiter (or HTML entity). + | # Alternative 5: URL not delimited by (), [], {} or <>. + (# $13: Prefix proving URL not already linked. + (?: ^ # Can be a beginning of line or string, or + | [^=\s\'"\]] # a non-"=", non-quote, non-"]", followed by + ) \s*[\'"]? # optional whitespace and optional quote; + | [^=\s]\s+ # or... a non-equals sign followed by whitespace. + ) # End $13. Non-prelinkified-proof prefix. + (\b # $14: Other non-delimited URL. + (?:ht|f)tps?:\/\/ # Required literal http, https, ftp or ftps prefix. + [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]+ # All URI chars except "&" (normal*). + (?: # Either on a "&" or at the end of URI. + (?! # Allow a "&" char only if not start of an... + &(?:gt|\#0*62|\#x0*3e); # HTML ">" entity, or + | &(?:amp|apos|quot|\#0*3[49]|\#x0*2[27]); # a [&\'"] entity if + [.!&\',:?;]? # followed by optional punctuation then + (?:[^a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]|$) # a non-URI char or EOS. + ) & # If neg-assertion true, match "&" (special). + [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]* # More non-& URI chars (normal*). + )* # Unroll-the-loop (special normal*)*. + [a-z0-9\-_~$()*+=\/#[\]@%] # Last char can\'t be [.!&\',;:?] + ) # End $14. Other non-delimited URL. + /imx'; + + $url_replace = '$1$4$7$10$13$2$5$8$11$14$3$6$9$12'; + + return preg_replace($url_pattern, $url_replace, $text); + } + + /** + * Callback for the preg_replace in the linkify() method. + * + * Part of the LinkifyURL Project + * + * @param array $matches Matches from the preg_ function + * @return string + */ + protected static function linkifyCallback($matches) + { + if (isset($matches[2])) { + return $matches[2]; + } + + return self::linkifyRegex($matches[1]); + } + + /** + * Return the current URL. + * + * @return string + */ + public static function get_current_url() + { + $url = ''; + + // Check to see if it's over https + $is_https = self::is_https(); + if ($is_https) { + $url .= 'https://'; + } else { + $url .= 'http://'; + } + + // Was a username or password passed? + if (isset($_SERVER['PHP_AUTH_USER'])) { + $url .= $_SERVER['PHP_AUTH_USER']; + + if (isset($_SERVER['PHP_AUTH_PW'])) { + $url .= ':' . $_SERVER['PHP_AUTH_PW']; + } + + $url .= '@'; + } + + + // We want the user to stay on the same host they are currently on, + // but beware of security issues + // see http://shiflett.org/blog/2006/mar/server-name-versus-http-host + $url .= $_SERVER['HTTP_HOST']; + + $port = $_SERVER['SERVER_PORT']; + + // Is it on a non standard port? + if ($is_https && ($port != 443)) { + $url .= ':' . $_SERVER['SERVER_PORT']; + } elseif (!$is_https && ($port != 80)) { + $url .= ':' . $_SERVER['SERVER_PORT']; + } + + // Get the rest of the URL + if (!isset($_SERVER['REQUEST_URI'])) { + // Microsoft IIS doesn't set REQUEST_URI by default + $url .= $_SERVER['PHP_SELF']; + + if (isset($_SERVER['QUERY_STRING'])) { + $url .= '?' . $_SERVER['QUERY_STRING']; + } + } else { + $url .= $_SERVER['REQUEST_URI']; + } + + return $url; + } + + /** + * Returns the IP address of the client. + * + * @param boolean $trust_proxy_headers Whether or not to trust the + * proxy headers HTTP_CLIENT_IP + * and HTTP_X_FORWARDED_FOR. ONLY + * use if your server is behind a + * proxy that sets these values + * @return string + */ + public static function get_client_ip($trust_proxy_headers = false) + { + if (!$trust_proxy_headers) { + return $_SERVER['REMOTE_ADDR']; + } + + if (!empty($_SERVER['HTTP_CLIENT_IP'])) { + $ip = $_SERVER['HTTP_CLIENT_IP']; + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + } else { + $ip = $_SERVER['REMOTE_ADDR']; + } + + return $ip; + } + + /** + * Truncate a string to a specified length without cutting a word off. + * + * @param string $string The string to truncate + * @param integer $length The length to truncate the string to + * @param string $append Text to append to the string IF it gets + * truncated, defaults to '...' + * @return string + */ + public static function safe_truncate($string, $length, $append = '...') + { + $ret = substr($string, 0, $length); + $last_space = strrpos($ret, ' '); + + if ($last_space !== false && $string != $ret) { + $ret = substr($ret, 0, $last_space); + } + + if ($ret != $string) { + $ret .= $append; + } + + return $ret; + } + + + /** + * Truncate the string to given length of charactes. + * + * @param $string + * @param $limit + * @param string $append + * @return string + */ + public static function limit_characters($string, $limit = 100, $append = '...') + { + if (mb_strlen($string) <= $limit) { + return $string; + } + + return rtrim(mb_substr($string, 0, $limit, 'UTF-8')) . $append; + } + + /** + * Truncate the string to given length of words. + * + * @param $string + * @param $limit + * @param string $append + * @return string + */ + public static function limit_words($string, $limit = 100, $append = '...') + { + preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $string, $matches); + + if (!isset($matches[0]) || strlen($string) === strlen($matches[0])) { + return $string; + } + + return rtrim($matches[0]).$append; + } + + /** + * Returns the ordinal version of a number (appends th, st, nd, rd). + * + * @param string $number The number to append an ordinal suffix to + * @return string + */ + public static function ordinal($number) + { + $test_c = abs($number) % 10; + $ext = ((abs($number) % 100 < 21 && abs($number) % 100 > 4) ? 'th' : (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th')); + + return $number . $ext; + } + + /** + * Returns the file permissions as a nice string, like -rw-r--r-- or false + * if the file is not found. + * + * @param string $file The name of the file to get permissions form + * @param int $perms Numerical value of permissions to display as text. + * @return string + */ + public static function full_permissions($file, $perms = null) + { + if (is_null($perms)) { + if (!file_exists($file)) { + return false; + } + $perms = fileperms($file); + } + + if (($perms & 0xC000) == 0xC000) { + // Socket + $info = 's'; + } elseif (($perms & 0xA000) == 0xA000) { + // Symbolic Link + $info = 'l'; + } elseif (($perms & 0x8000) == 0x8000) { + // Regular + $info = '-'; + } elseif (($perms & 0x6000) == 0x6000) { + // Block special + $info = 'b'; + } elseif (($perms & 0x4000) == 0x4000) { + // Directory + $info = 'd'; + } elseif (($perms & 0x2000) == 0x2000) { + // Character special + $info = 'c'; + } elseif (($perms & 0x1000) == 0x1000) { + // FIFO pipe + $info = 'p'; + } else { + // Unknown + $info = 'u'; + } + + // Owner + $info .= (($perms & 0x0100) ? 'r' : '-'); + $info .= (($perms & 0x0080) ? 'w' : '-'); + $info .= (($perms & 0x0040) ? + (($perms & 0x0800) ? 's' : 'x') : + (($perms & 0x0800) ? 'S' : '-')); + + // Group + $info .= (($perms & 0x0020) ? 'r' : '-'); + $info .= (($perms & 0x0010) ? 'w' : '-'); + $info .= (($perms & 0x0008) ? + (($perms & 0x0400) ? 's' : 'x') : + (($perms & 0x0400) ? 'S' : '-')); + + // World + $info .= (($perms & 0x0004) ? 'r' : '-'); + $info .= (($perms & 0x0002) ? 'w' : '-'); + $info .= (($perms & 0x0001) ? + (($perms & 0x0200) ? 't' : 'x') : + (($perms & 0x0200) ? 'T' : '-')); + + return $info; + } + + /** + * Returns the first element in an array. + * + * @param array $array + * @return mixed + */ + public static function array_first(array $array) + { + return reset($array); + } + + /** + * Returns the last element in an array. + * + * @param array $array + * @return mixed + */ + public static function array_last(array $array) + { + return end($array); + } + + /** + * Returns the first key in an array. + * + * @param array $array + * @return int|string + */ + public static function array_first_key(array $array) + { + reset($array); + + return key($array); + } + + /** + * Returns the last key in an array. + * + * @param array $array + * @return int|string + */ + public static function array_last_key(array $array) + { + end($array); + + return key($array); + } + + /** + * Flatten a multi-dimensional array into a one dimensional array. + * + * Contributed by Theodore R. Smith of PHP Experts, Inc. + * + * @param array $array The array to flatten + * @param boolean $preserve_keys Whether or not to preserve array keys. + * Keys from deeply nested arrays will + * overwrite keys from shallowy nested arrays + * @return array + */ + public static function array_flatten(array $array, $preserve_keys = true) + { + $flattened = array(); + + array_walk_recursive($array, function($value, $key) use (&$flattened, $preserve_keys) { + if ($preserve_keys && !is_int($key)) { + $flattened[$key] = $value; + } else { + $flattened[] = $value; + } + }); + + return $flattened; + } + + /** + * Accepts an array, and returns an array of values from that array as + * specified by $field. For example, if the array is full of objects + * and you call util::array_pluck($array, 'name'), the function will + * return an array of values from $array[]->name. + * + * @param array $array An array + * @param string $field The field to get values from + * @param boolean $preserve_keys Whether or not to preserve the + * array keys + * @param boolean $remove_nomatches If the field doesn't appear to be set, + * remove it from the array + * @return array + */ + public static function array_pluck(array $array, $field, $preserve_keys = true, $remove_nomatches = true) + { + $new_list = array(); + + foreach ($array as $key => $value) { + if (is_object($value)) { + if (isset($value->{$field})) { + if ($preserve_keys) { + $new_list[$key] = $value->{$field}; + } else { + $new_list[] = $value->{$field}; + } + } elseif (!$remove_nomatches) { + $new_list[$key] = $value; + } + } else { + if (isset($value[$field])) { + if ($preserve_keys) { + $new_list[$key] = $value[$field]; + } else { + $new_list[] = $value[$field]; + } + } elseif (!$remove_nomatches) { + $new_list[$key] = $value; + } + } + } + + return $new_list; + } + + /** + * Searches for a given value in an array of arrays, objects and scalar + * values. You can optionally specify a field of the nested arrays and + * objects to search in. + * + * @param array $array The array to search + * @param scalar $search The value to search for + * @param string $field The field to search in, if not specified + * all fields will be searched + * @return boolean|scalar False on failure or the array key on success + */ + public static function array_search_deep(array $array, $search, $field = false) + { + // *grumbles* stupid PHP type system + $search = (string) $search; + + foreach ($array as $key => $elem) { + // *grumbles* stupid PHP type system + $key = (string) $key; + + if ($field) { + if (is_object($elem) && $elem->{$field} === $search) { + return $key; + } elseif (is_array($elem) && $elem[$field] === $search) { + return $key; + } elseif (is_scalar($elem) && $elem === $search) { + return $key; + } + } else { + if (is_object($elem)) { + $elem = (array) $elem; + + if (in_array($search, $elem)) { + return $key; + } + } elseif (is_array($elem) && in_array($search, $elem)) { + return $key; + } elseif (is_scalar($elem) && $elem === $search) { + return $key; + } + } + } + + return false; + } + + /** + * Returns an array containing all the elements of arr1 after applying + * the callback function to each one. + * + * @param string $callback Callback function to run for each + * element in each array + * @param array $array An array to run through the callback + * function + * @param boolean $on_nonscalar Whether or not to call the callback + * function on nonscalar values + * (Objects, resources, etc) + * @return array + */ + public static function array_map_deep(array $array, $callback, $on_nonscalar = false) + { + foreach ($array as $key => $value) { + if (is_array($value)) { + $args = array($value, $callback, $on_nonscalar); + $array[$key] = call_user_func_array(array(__CLASS__, __FUNCTION__), $args); + } elseif (is_scalar($value) || $on_nonscalar) { + $array[$key] = call_user_func($callback, $value); + } + } + + return $array; + } + + public static function array_clean(array $array) + { + return array_filter($array); + } + + /** + * Wrapper to prevent errors if the user doesn't have the mbstring + * extension installed. + * + * @param string $encoding + * @return string + */ + protected static function mbInternalEncoding($encoding = null) + { + if (function_exists('mb_internal_encoding')) { + return $encoding ? mb_internal_encoding($encoding) : mb_internal_encoding(); + } + + // @codeCoverageIgnoreStart + return 'UTF-8'; + // @codeCoverageIgnoreEnd + } + + /** + * Set the writable bit on a file to the minimum value that allows the user + * running PHP to write to it. + * + * @param string $filename The filename to set the writable bit on + * @param boolean $writable Whether to make the file writable or not + * @return boolean + */ + public static function set_writable($filename, $writable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($writable) { + // Set only the user writable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0200); + } + + // Set only the group writable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0220); + } + + // Set the world writable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0222); + } else { + // Set only the user writable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0222) ^ 0222); + } + + // Set only the group writable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0222) ^ 0022); + } + + // Set the world writable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0222) ^ 0002); + } + } + + /** + * Set the readable bit on a file to the minimum value that allows the user + * running PHP to read to it. + * + * @param string $filename The filename to set the readable bit on + * @param boolean $readable Whether to make the file readable or not + * @return boolean + */ + public static function set_readable($filename, $readable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($readable) { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0400); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0440); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0444); + } else { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0444) ^ 0444); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0444) ^ 0044); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0444) ^ 0004); + } + } + + /** + * Set the executable bit on a file to the minimum value that allows the + * user running PHP to read to it. + * + * @param string $filename The filename to set the executable bit on + * @param boolean $executable Whether to make the file executable or not + * @return boolean + */ + public static function set_executable($filename, $executable = true) + { + $stat = @stat($filename); + + if ($stat === false) { + return false; + } + + // We're on Windows + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + return true; + } + + list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); + + if ($executable) { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, fileperms($filename) | 0100); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, fileperms($filename) | 0110); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, fileperms($filename) | 0111); + } else { + // Set only the user readable bit (file is owned by us) + if ($stat['uid'] == $myuid) { + return chmod($filename, (fileperms($filename) | 0111) ^ 0111); + } + + // Set only the group readable bit (file group is the same as us) + if ($stat['gid'] == $mygid) { + return chmod($filename, (fileperms($filename) | 0111) ^ 0011); + } + + // Set the world readable bit (file isn't owned or grouped by us) + return chmod($filename, (fileperms($filename) | 0111) ^ 0001); + } + } + + /** + * Returns size of a given directory in bytes. + * + * @param string $dir + * @return integer + */ + public static function directory_size($dir) + { + $size = 0; + foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $file => $key) { + if ($key->isFile()) { + $size += $key->getSize(); + } + } + return $size; + } + + /** + * Returns a home directory of current user. + * + * @return string + */ + public static function get_user_directory() + { + if (isset($_SERVER['HOMEDRIVE'])) return $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']; + else return $_SERVER['HOME']; + } + + /** + * Returns all paths inside a directory. + * + * @param string $dir + * @return array + */ + public static function directory_contents($dir) + { + $contents = array(); + foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $pathname => $fi) { + $contents[] = $pathname; + } + natsort($contents); + return $contents; + } +} diff --git a/vendor/brandonwamboldt/utilphp/tests/README.md b/vendor/brandonwamboldt/utilphp/tests/README.md new file mode 100644 index 00000000..e81d26c3 --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/tests/README.md @@ -0,0 +1,39 @@ +# UtilityPHP Unit Tests # + +### Introduction + +This is the testing documentation for util.php. The unit tests require PHPUnit, +and can be run in your web browser. + +### Requirements + +PHP Unit >= 3.5.6 + +#### Installation of PHPUnit + + # Download the PHPUnit phar. + wget https://phar.phpunit.de/phpunit.phar + + # You can just run it locally. (Preferred for Windows) + php phpunit.phar --version + + # Or install it system-wide. + mv phpunit.phar phpunit + chmod +x phpunit + sudo mv phpunit /usr/local/bin + phpunit --version + +## Test Suites: + +util.php includes a phpunit config file, so just run `phpunit` from the working +directory to run the test suite. + +``` +phpunit +``` + +If you want code coverage reports, use the following: + +``` +phpunit --coverage-html ./report +``` diff --git a/vendor/brandonwamboldt/utilphp/tests/UtilTest.php b/vendor/brandonwamboldt/utilphp/tests/UtilTest.php new file mode 100644 index 00000000..404cf7bd --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/tests/UtilTest.php @@ -0,0 +1,1183 @@ +data = (object)array('a', 'b', 'c'); + } +} + +/** + * PHPUnit test case for the util.php library + * + * @author Brandon Wamboldt + * @since 1.0.000 + */ +class UtilityPHPTest extends PHPUnit_Framework_TestCase +{ + /** + * Allows for the testing of private and protected methods. + * + * @param $name + * @return \ReflectionMethod + */ + protected static function getMethod($name) + { + $class = new \ReflectionClass('util'); + $method = $class->getMethod($name); + $method->setAccessible(true); + return $method; + } + + public function test_array_get() + { + $_GET = array(); + $_GET['abc'] = 'def'; + $_GET['nested'] = array( 'key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3' ); + + // Looks for $array['abc'] + $this->assertEquals( 'def', util::array_get( $_GET['abc'] ) ); + + // Looks for $array['nested']['key2'] + $this->assertEquals( 'val2', util::array_get( $_GET['nested']['key2'] ) ); + + // Looks for $array['doesnotexist'] + $this->assertEquals( 'defaultval', util::array_get( $_GET['doesnotexist'], 'defaultval' ) ); + } + + public function test_slugify() + { + $this->assertEquals( 'a-simple-title', util::slugify( 'A simple title' ) ); + $this->assertEquals( 'this-post-it-has-a-dash', util::slugify( 'This post -- it has a dash' ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251' ) ); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', '-', true ) ); + + $this->assertEquals( 'a-simple-title', util::slugify( 'A simple title', '-' ) ); + $this->assertEquals( 'this-post-it-has-a-dash', util::slugify( 'This post -- it has a dash', '-' ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251', '-' ) ); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', '-', true ) ); + + $this->assertEquals( 'a_simple_title', util::slugify( 'A simple title', '_' ) ); + $this->assertEquals( 'this_post_it_has_a_dash', util::slugify( 'This post -- it has a dash', '_' ) ); + $this->assertEquals( '123_1251251', util::slugify( '123----1251251', '_' ) ); + $this->assertEquals( 'one23_1251251', util::slugify( '123----1251251', '_', true ) ); + + // Blank seperator test + $this->assertEquals( 'asimpletitle', util::slugify( 'A simple title', '' ) ); + $this->assertEquals( 'thispostithasadash', util::slugify( 'This post -- it has a dash', '' ) ); + $this->assertEquals( '1231251251', util::slugify( '123----1251251', '' ) ); + $this->assertEquals( 'one231251251', util::slugify( '123----1251251', '', true ) ); + + // Test old parameter ordering for backwards compatability + error_reporting(E_ALL ^ E_USER_DEPRECATED); + $this->assertEquals( 'one23-1251251', util::slugify( '123----1251251', true ) ); + $this->assertEquals( '123-1251251', util::slugify( '123----1251251', false ) ); + } + + public function test_seems_utf8() + { + // Test a valid UTF-8 sequence: "ÜTF-8 Fµñ". + $validUTF8 = "\xC3\x9CTF-8 F\xC2\xB5\xC3\xB1"; + $this->assertTrue( util::seems_utf8( $validUTF8 ) ); + + $this->assertTrue( util::seems_utf8( "\xEF\xBF\xBD this has \xEF\xBF\xBD\xEF\xBF\xBD some invalid utf8 \xEF\xBF\xBD" ) ); + + // Test invalid UTF-8 sequences + $invalidUTF8 = "\xc3 this has \xe6\x9d some invalid utf8 \xe6"; + $this->assertFalse( util::seems_utf8( $invalidUTF8 ) ); + + // And test some plain ASCII + $this->assertTrue( util::seems_utf8( 'The quick brown fox jumps over the lazy dog' ) ); + + // Test an invalid non-UTF-8 string. + if (function_exists('mb_convert_encoding')) { + mb_internal_encoding('UTF-8'); + // Converts the 'ç' UTF-8 character to UCS-2LE + $utf8Char = pack('n', 50087); + $ucsChar = mb_convert_encoding($utf8Char, 'UCS-2LE', 'UTF-8'); + + // Ensure that PHP's internal encoding system isn't malconfigured. + $this->assertEquals( $utf8Char, 'ç', 'This PHP system\'s internal character set is not properly set as UTF-8.' ); + $this->assertEquals( $utf8Char, pack('n', 50087), 'Something is wrong with your ICU unicode library.' ); + + // Test for not UTF-8. + $this->assertFalse( util::seems_utf8( $ucsChar) ); + + // Test the worker method. + $method = self::getMethod('seemsUtf8Regex'); + $this->assertFalse($method->invoke(null, $invalidUTF8), 'util::seemsUtf8Regex did not properly detect invalid UTF-8.'); + $this->assertTrue($method->invoke(null, $validUTF8), 'util::seemsUtf8Regex did not properly detect valid UTF-8.'); + } + } + + public function test_size_format() + { + $size = util::size_format( 512, 0 ); + $this->assertEquals( '512 B', $size ); + + $size = util::size_format( 2048, 1 ); + $this->assertEquals( '2.0 KiB', $size ); + + $size = util::size_format( 25151251, 2 ); + $this->assertEquals( '23.99 MiB', $size ); + + $size = util::size_format( 19971597926, 2 ); + $this->assertEquals( '18.60 GiB', $size ); + + $size = util::size_format( 2748779069440, 1 ); + $this->assertEquals( '2.5 TiB', $size ); + + $size = util::size_format( 2.81475e15, 1 ); + $this->assertEquals( '2.5 PiB', $size ); + + $size = util::size_format( 2.81475e19, 1 ); + $this->assertEquals( '25000.0 PiB', $size ); + } + + public function test_maybe_serialize() + { + $obj = new stdClass(); + $obj->prop1 = 'Hello'; + $obj->prop2 = 'World'; + + $this->assertEquals( 'This is a string', util::maybe_serialize( 'This is a string' ) ); + $this->assertEquals( 5.81, util::maybe_serialize( 5.81 ) ); + $this->assertEquals( 'a:0:{}', util::maybe_serialize( array() ) ); + $this->assertEquals( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}', util::maybe_serialize( $obj ) ); + $this->assertEquals( 'a:4:{i:0;s:4:"test";i:1;s:4:"blah";s:5:"hello";s:5:"world";s:5:"array";O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}}', util::maybe_serialize( array( 'test', 'blah', 'hello' => 'world', 'array' => $obj ) ) ); + } + + public function test_maybe_unserialize() + { + $obj = new stdClass(); + $obj->prop1 = 'Hello'; + $obj->prop2 = 'World'; + + $this->assertNull(util::maybe_unserialize(serialize(null))); + $this->assertFalse(util::maybe_unserialize(serialize(false))); + + $this->assertEquals( 'This is a string', util::maybe_unserialize( 'This is a string' ) ); + $this->assertEquals( 5.81, util::maybe_unserialize( 5.81 ) ); + $this->assertEquals( array(), util::maybe_unserialize( 'a:0:{}' ) ); + $this->assertEquals( $obj, util::maybe_unserialize( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}' ) ); + $this->assertEquals( array( 'test', 'blah', 'hello' => 'world', 'array' => $obj ), util::maybe_unserialize( 'a:4:{i:0;s:4:"test";i:1;s:4:"blah";s:5:"hello";s:5:"world";s:5:"array";O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}}' ) ); + + // Test a broken serialization. + $expectedData = array( + 'Normal', + 'High-value Char: '.chr(231).'a-va?', // High-value Char: ça-va? [in ISO-8859-1] + ); + + $brokenSerialization = 'a:2:{i:0;s:6:"Normal";i:1;s:23:"High-value Char: ▒a-va?";}'; + + $unserializedData = util::maybe_unserialize($brokenSerialization); + $this->assertEquals($expectedData[0], $unserializedData[0], 'Did not properly fix the broken serialized data.'); + $this->assertEquals(substr($expectedData[1], 0, 10), substr($unserializedData[1], 0, 10), 'Did not properly fix the broken serialized data.'); + + // Test unfixable serialization. + $unfixableSerialization = 'a:2:{i:0;s:6:"Normal";}'; + $this->assertEquals($unfixableSerialization, util::maybe_unserialize($unfixableSerialization), 'Somehow the [previously?] impossible happened and utilphp thinks it has unserialized an unfixable serialization.'); + } + + public function test_is_serialized() + { + $this->assertFalse( util::is_serialized(1) ); + $this->assertFalse( util::is_serialized(null) ); + $this->assertFalse( util::is_serialized( 's:4:"test;' ) ); + $this->assertFalse( util::is_serialized( 'a:0:{}!' ) ); + $this->assertFalse( util::is_serialized( 'a:0' ) ); + $this->assertFalse( util::is_serialized( 'This is a string' ) ); + $this->assertFalse( util::is_serialized( 'a string' ) ); + $this->assertFalse( util::is_serialized( 'z:0;' ) ); + $this->assertTrue( util::is_serialized( 'N;' ) ); + $this->assertTrue( util::is_serialized( 'b:1;' ) ); + $this->assertTrue( util::is_serialized( 'a:0:{}' ) ); + $this->assertTrue( util::is_serialized( 'O:8:"stdClass":2:{s:5:"prop1";s:5:"Hello";s:5:"prop2";s:5:"World";}' ) ); + } + + public function test_fix_broken_serialization() + { + $expectedData = array( + 'Normal', + 'High-value Char: '.chr(231).'a-va?', // High-value Char: ça-va? [in ISO-8859-1] + ); + + $brokenSerialization = 'a:2:{i:0;s:6:"Normal";i:1;s:23:"High-value Char: ▒a-va?";}'; + + // Temporarily override error handling to ensure that this is, in fact, [still] a broken serialization. + { + $expectedError = array( + 'errno' => 8, + 'errstr' => 'unserialize(): Error at offset 55 of 60 bytes' + ); + + $reportedError = array(); + set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) use (&$reportedError) { + $reportedError = compact('errno', 'errstr'); + }); + + unserialize($brokenSerialization); + + $this->assertEquals($expectedError['errno'], $reportedError['errno']); + // Because HHVM's unserialize() error message does not contain enough info to properly test. + if (!defined('HHVM_VERSION')) { + $this->assertEquals($expectedError['errstr'], $reportedError['errstr']); + } + restore_error_handler(); + } + + $fixedSerialization = util::fix_broken_serialization($brokenSerialization); + $unserializedData = unserialize($fixedSerialization); + $this->assertEquals($expectedData[0], $unserializedData[0], 'Did not properly fix the broken serialized data.'); + + $this->assertEquals(substr($expectedData[1], 0, 10), substr($unserializedData[1], 0, 10), 'Did not properly fix the broken serialized data.'); + } + + public function test_is_https() + { + $_SERVER['HTTPS'] = null; + + $this->assertFalse( util::is_https() ); + + $_SERVER['HTTPS'] = 'on'; + + $this->assertTrue( util::is_https() ); + } + + public function test_add_query_arg() + { + // Regular tests + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( 'user', 5, '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::add_query_arg( array( 'user' => 5 ), null, '/app/admin/users' ) ); + $this->assertEquals( '/app/admin/users?action=edit&user=5', util::add_query_arg( 'user', 5, '/app/admin/users?action=edit' ) ); + $this->assertEquals( '/app/admin/users?action=edit&user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users?action=edit' ) ); + $this->assertEquals( '/app/admin/users?action=edit&tab=personal&user=5', util::add_query_arg( 'user', 5, '/app/admin/users?action=edit&tab=personal' ) ); + $this->assertEquals( '/app/admin/users?action=edit&tab=personal&user=5', util::add_query_arg( array( 'user' => 5 ), '/app/admin/users?action=edit&tab=personal' ) ); + + // Ensure strips false. + $this->assertEquals('/index.php', util::add_query_arg('debug', false, '/index.php')); + + // With a URL fragment + $this->assertEquals( '/app/admin/users?user=5#test', util::add_query_arg( 'user', 5, '/app/admin/users#test' ) ); + + // Full URL + $this->assertEquals( 'http://example.com/?a=b', util::add_query_arg( 'a', 'b', 'http://example.com' ) ); + + // Only the query string + $this->assertEquals( '?a=b&c=d', util::add_query_arg( 'c', 'd', '?a=b' ) ); + $this->assertEquals( 'a=b&c=d', util::add_query_arg( 'c', 'd', 'a=b' ) ); + + // Url encoding test + $this->assertEquals( '/app/admin/users?param=containsa%26sym', util::add_query_arg( 'param', 'containsa&sym', '/app/admin/users' ) ); + + // If not provided, grab the URI from the server. + $_SERVER['REQUEST_URI'] = '/app/admin/users'; + $this->assertEquals( '/app/admin/users?user=6', util::add_query_arg( array( 'user' => 6 ) ) ); + $this->assertEquals( '/app/admin/users?user=7', util::add_query_arg( 'user', 7 ) ); + } + + public function test_remove_query_arg() + { + $this->assertEquals( '/app/admin/users', util::remove_query_arg( 'user', '/app/admin/users?user=5' ) ); + $this->assertEquals( '/app/admin/users?action=edit', util::remove_query_arg( 'user', '/app/admin/users?action=edit&user=5' ) ); + $this->assertEquals( '/app/admin/users?user=5', util::remove_query_arg( array( 'tab', 'action' ), '/app/admin/users?action=edit&tab=personal&user=5' ) ); + } + + public function test_http_build_url() + { + $url = 'http://user:pass@example.com:8080/path/?query#fragment'; + + $expected = 'http://example.com/'; + $actual = util::http_build_url($url, array(), util::HTTP_URL_STRIP_ALL); + $this->assertEquals($expected, $actual); + + $expected = 'http://example.com:8080/path/?query#fragment'; + $actual = util::http_build_url($url, array(), util::HTTP_URL_STRIP_AUTH); + $this->assertEquals($expected, $actual); + + $this->assertEquals('https://dev.example.com/', util::http_build_url('http://example.com/', array('scheme' => 'https', 'host' => 'dev.example.com'))); + $this->assertEquals('http://example.com/#hi', util::http_build_url('http://example.com/', array('fragment' => 'hi'), util::HTTP_URL_REPLACE)); + $this->assertEquals('http://example.com/page', util::http_build_url('http://example.com/', array('path' => 'page'), util::HTTP_URL_JOIN_PATH)); + $this->assertEquals('http://example.com/page', util::http_build_url('http://example.com', array('path' => 'page'), util::HTTP_URL_JOIN_PATH)); + $this->assertEquals('http://example.com/?hi=Bro', util::http_build_url('http://example.com/', array('query' => 'hi=Bro'), util::HTTP_URL_JOIN_QUERY)); + $this->assertEquals('http://example.com/?show=1&hi=Bro', util::http_build_url('http://example.com/?show=1', array('query' => 'hi=Bro'), util::HTTP_URL_JOIN_QUERY)); + + $this->assertEquals('http://admin@example.com/', util::http_build_url('http://example.com/', array('user' => 'admin'))); + $this->assertEquals('http://admin:1@example.com/', util::http_build_url('http://example.com/', array('user' => 'admin', 'pass' => '1'))); + } + + public function test_str_to_bool() + { + $this->assertTrue( util::str_to_bool( 'true' ) ); + $this->assertTrue( util::str_to_bool( 'yes' ) ); + $this->assertTrue( util::str_to_bool( 'y' ) ); + $this->assertTrue( util::str_to_bool( 'oui' ) ); + $this->assertTrue( util::str_to_bool( 'vrai' ) ); + + $this->assertFalse( util::str_to_bool( 'false' ) ); + $this->assertFalse( util::str_to_bool( 'no' ) ); + $this->assertFalse( util::str_to_bool( 'n' ) ); + $this->assertFalse( util::str_to_bool( 'non' ) ); + $this->assertFalse( util::str_to_bool( 'faux' ) ); + + $this->assertFalse( util::str_to_bool( 'test' , false) ); + + } + + public function test_array_pluck() + { + $array = array( + array( + 'name' => 'Bob', + 'age' => 37 + ), + array( + 'name' => 'Fred', + 'age' => 37 + ), + array( + 'name' => 'Jane', + 'age' => 29 + ), + array( + 'name' => 'Brandon', + 'age' => 20 + ), + array( + 'age' => 41 + ) + ); + + $obj_array = array( + 'bob' => (object) array( + 'name' => 'Bob', + 'age' => 37 + ), + 'fred' => (object) array( + 'name' => 'Fred', + 'age' => 37 + ), + 'jane' => (object) array( + 'name' => 'Jane', + 'age' => 29 + ), + 'brandon' => (object) array( + 'name' => 'Brandon', + 'age' => 20 + ), + 'invalid' => (object) array( + 'age' => 41 + ) + ); + + $obj_array_expect = array( + 'bob' => 'Bob', + 'fred' => 'Fred', + 'jane' => 'Jane', + 'brandon' => 'Brandon' + ); + + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon' ), util::array_pluck( $array, 'name' ) ); + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon', array( 'age' => 41 ) ), util::array_pluck( $array, 'name', TRUE, FALSE ) ); + $this->assertEquals( $obj_array_expect, util::array_pluck( $obj_array, 'name' ) ); + $this->assertEquals( array( 'Bob', 'Fred', 'Jane', 'Brandon' ), util::array_pluck( $obj_array, 'name', FALSE ) ); + + $expected = array('Bob', 'Fred', 'Jane', 'Brandon', 'invalid' => (object)array('age' => 41)); + $this->assertEquals($expected, util::array_pluck($obj_array, 'name', FALSE, FALSE)); + $expected = array('Bob', 'Fred', 'Jane', 'Brandon', array('age' => 41)); + $this->assertEquals($expected, util::array_pluck($array, 'name', false, false)); + } + + public function test_htmlentities() + { + $this->assertEquals( 'One & Two', util::htmlentities( 'One & Two' ) ); + $this->assertEquals( 'One & Two', util::htmlentities( 'One & Two', TRUE ) ); + } + + public function test_htmlspecialchars() + { + $this->assertEquals( 'One & Two', util::htmlspecialchars( 'One & Two' ) ); + $this->assertEquals( 'One & Two', util::htmlspecialchars( 'One & Two', TRUE ) ); + } + + public function test_remove_accents() + { + $this->assertEquals( 'A', util::remove_accents( "\xC3\x81" ) ); + $this->assertEquals( 'e', util::remove_accents( "\xC4\x97" ) ); + $this->assertEquals( 'U', util::remove_accents( "\xC3\x9C" ) ); + $this->assertEquals( 'Ae', util::remove_accents( "Ä", 'de' ) ); + $this->assertEquals( 'OEoeAEDHTHssaedhth', util::remove_accents(chr(140) . chr(156) . chr(198) . chr(208) . chr(222) . chr(223) . chr(230) . chr(240) . chr(254))); + } + + public function test_zero_pad() + { + $this->assertEquals( '00000341', util::zero_pad( 341, 8 ) ); + $this->assertEquals( '341', util::zero_pad( 341, 1 ) ); + } + + public function test_human_time_diff() + { + $this->assertEquals( '1 second ago', util::human_time_diff( time() - 1 ) ); + $this->assertEquals( '30 seconds ago', util::human_time_diff( time() - 30 ) ); + $this->assertEquals( '1 minute ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 1.4 ) ) ); + $this->assertEquals( '5 minutes ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 5 ) ) ); + $this->assertEquals( '1 hour ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR ) ) ); + $this->assertEquals( '2 hours ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 2 ) ) ); + $this->assertEquals( '1 day ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 ) ) ); + $this->assertEquals( '5 days ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 5 ) ) ); + $this->assertEquals( '1 week ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 7 ) ) ); + $this->assertEquals( '2 weeks ago', util::human_time_diff( time() - ( util::SECONDS_IN_AN_HOUR * 24 * 14 ) ) ); + $this->assertEquals( '1 month ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_WEEK * 5 ) ) ); + $this->assertEquals( '2 months ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_WEEK * 10 ) ) ); + $this->assertEquals( '1 year ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 15 ) ) ); + $this->assertEquals( '2 years ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 36 ) ) ); + $this->assertEquals( '11 years ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MONTH * 140 ) ) ); + + $this->assertEquals( 'fifteen minutes ago', util::human_time_diff( time() - ( util::SECONDS_IN_A_MINUTE * 15 ), '', TRUE ) ); + } + + public function test_number_to_word() + { + try { + util::number_to_word('junk data'); + $this->fail('Accepted junk data'); + } catch(\LogicException $e) { + $this->assertEquals('Not a number', $e->getMessage()); + } + + // Partially numeric. + $this->assertEquals('', util::number_to_word('1a')); + + // Decimals + $this->assertEquals( 'five point zero five', util::number_to_word('5.05') ); + $this->assertEquals( 'zero point eight', util::number_to_word( 0.8 ) ); + + // Integers + $this->assertEquals( 'positive one', util::number_to_word( '+1' ) ); + $this->assertEquals( 'negative twelve', util::number_to_word( -12 ) ); + $this->assertEquals( 'one', util::number_to_word( 1 ) ); + $this->assertEquals( 'five', util::number_to_word( 5 ) ); + $this->assertEquals( 'fifteen', util::number_to_word( 15 ) ); + $this->assertEquals( 'twenty-one', util::number_to_word( 21 ) ); + $this->assertEquals( 'thirty-two', util::number_to_word( 32 ) ); + $this->assertEquals( 'forty-three', util::number_to_word( 43 ) ); + $this->assertEquals( 'fifty-four', util::number_to_word( 54 ) ); + $this->assertEquals( 'sixty-six', util::number_to_word( 66 ) ); + $this->assertEquals( 'seventy-seven', util::number_to_word( 77 ) ); + $this->assertEquals( 'eighty-eight', util::number_to_word( 88 ) ); + $this->assertEquals( 'ninety-nine', util::number_to_word( 99 ) ); + $this->assertEquals( 'one hundred and thirty-six', util::number_to_word( 136 ) ); + $this->assertEquals( 'ten', util::number_to_word( 10 ) ); + $this->assertEquals( 'twenty', util::number_to_word( 20 ) ); + $this->assertEquals( 'thirty', util::number_to_word( 30 ) ); + $this->assertEquals( 'forty', util::number_to_word( 40 ) ); + $this->assertEquals( 'fifty', util::number_to_word( 50 ) ); + $this->assertEquals( 'sixty', util::number_to_word( 60 ) ); + $this->assertEquals( 'seventy', util::number_to_word( 70 ) ); + $this->assertEquals( 'eighty', util::number_to_word( 80 ) ); + $this->assertEquals( 'ninety', util::number_to_word( 90 ) ); + $this->assertEquals( 'eleven', util::number_to_word( 11 ) ); + $this->assertEquals( 'thirteen', util::number_to_word( 13 ) ); + $this->assertEquals( 'fourteen', util::number_to_word( 14 ) ); + $this->assertEquals( 'fifteen', util::number_to_word( 15 ) ); + $this->assertEquals( 'sixteen', util::number_to_word( 16 ) ); + $this->assertEquals( 'seventeen', util::number_to_word( 17 ) ); + $this->assertEquals( 'eighteen', util::number_to_word( 18 ) ); + $this->assertEquals( 'nineteen', util::number_to_word( 19 ) ); + $this->assertEquals( 'one thousand', util::number_to_word( 1000 ) ); + $this->assertEquals( 'one million', util::number_to_word( 1000000 ) ); + $this->assertEquals( 'one billion', util::number_to_word( 1000000000 ) ); + $this->assertEquals( 'one trillion', util::number_to_word( 1000000000000 ) ); + $this->assertEquals( 'one quadrillion', util::number_to_word( '1000000000000000' ) ); + $this->assertEquals( 'one quintrillion', util::number_to_word( '1000000000000000000' ) ); + $this->assertEquals( 'one sextillion', util::number_to_word( '1000000000000000000000' ) ); + $this->assertEquals( 'one septillion', util::number_to_word( '1000000000000000000000000' ) ); + $this->assertEquals( 'one octillion', util::number_to_word( '1000000000000000000000000000' ) ); + $this->assertEquals( 'one nonillion', util::number_to_word( '1000000000000000000000000000000' ) ); + $this->assertEquals( 'one decillion', util::number_to_word( '1000000000000000000000000000000000' ) ); + $this->assertEquals( 'one', util::number_to_word( '1000000000000000000000000000000000000000000' ) ); + + } + + public function test_array_search_deep() + { + $users = array( + 1 => (object) array( 'username' => 'brandon', 'age' => 20 ), + 2 => (object) array( 'username' => 'matt', 'age' => 27 ), + 3 => (object) array( 'username' => 'jane', 'age' => 53 ), + 4 => (object) array( 'username' => 'john', 'age' => 41 ), + 5 => (object) array( 'username' => 'steve', 'age' => 11 ), + 6 => (object) array( 'username' => 'fred', 'age' => 42 ), + 7 => (object) array( 'username' => 'rasmus', 'age' => 21 ), + 8 => (object) array( 'username' => 'don', 'age' => 15 ), + 9 => array( 'username' => 'darcy', 'age' => 33 ), + ); + + $test = array( + 1 => 'brandon', + 2 => 'devon', + 3 => array( 'troy' ), + 4 => 'annie' + ); + + $this->assertFalse( util::array_search_deep( $test, 'bob' ) ); + $this->assertEquals( 3, util::array_search_deep( $test, 'troy' ) ); + $this->assertEquals( 4, util::array_search_deep( $test, 'annie' ) ); + $this->assertEquals( 2, util::array_search_deep( $test, 'devon', 'devon' ) ); + $this->assertEquals( 7, util::array_search_deep( $users, 'rasmus', 'username' ) ); + $this->assertEquals( 9, util::array_search_deep( $users, 'darcy', 'username' ) ); + $this->assertEquals( 1, util::array_search_deep( $users, 'brandon' ) ); + } + + public function test_array_map_deep() + { + $input = array( + '<', + 'abc', + '>', + 'def', + array( '&', 'test', '123' ), + (object) array( 'hey', '<>' ) + ); + + $expect = array( + '<', + 'abc', + '>', + 'def', + array( '&', 'test', '123' ), + (object) array( 'hey', '<>' ) + ); + + $this->assertEquals( $expect, util::array_map_deep( $input, 'htmlentities' ) ); + } + + public function test_random_string() + { + // Make sure the generated string contains only human friendly characters and is 30 characters long + $str = util::random_string( 30 ); + $this->assertTrue( (bool) preg_match( '/^([ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnprstuvwxyz23456789]{30})$/', $str ) ); + + // Make sure the generated string is 30 characters long + $str = util::random_string( 30, false, true ); + $this->assertTrue( strlen( $str ) === 30, 'random_string produced an invalid length string' ); + + // Make sure the generated string is 120 characters long + $str = util::random_string( 120 ); + $this->assertTrue(strlen( $str ) === 120, 'random_string produced an invalid length string'); + + // Make sure the string doesn't contain duplicate letters + $str = util::random_string( 53, true, false, true ); + $this->assertTrue(strlen($str) === 53, 'random_string produced an invalid length string'); + $this->assertTrue(count(array_unique(str_split($str))) === strlen($str), 'random_string produced a string with duplicate characters'); + + // Longer length than characters available + try { + $str = util::random_string( 55, true, false, true ); + $this->assertTrue( false ); + } catch (Exception $e) { + $this->assertTrue( true ); + } + + // Test secure variant + $str = util::secure_random_string(16); + $this->assertTrue(strlen($str) === 16); + + // Longer length than characters available + try { + $str = util::secure_random_string(0); + $this->assertTrue(false); + } catch (Exception $e) { + $this->assertTrue(true); + } + } + + public function test_match_string() + { + $this->assertTrue( util::match_string('a', 'a') ); + $this->assertFalse( util::match_string('a', ' a') ); + $this->assertFalse( util::match_string('/', '/something') ); + $this->assertTrue( util::match_string('test/*', 'test/first/second') ); + $this->assertTrue( util::match_string('*/test', 'first/second/test') ); + $this->assertFalse( util::match_string('first/', 'first/second/test') ); + $this->assertFalse( util::match_string('test', 'TEST') ); + $this->assertTrue( util::match_string('test', 'TEST', false) ); + } + + public function test_validate_email() + { + $this->assertTrue( util::validate_email( 'john.smith@gmail.com' ) ); + $this->assertTrue( util::validate_email( 'john.smith+label@gmail.com' ) ); + $this->assertTrue( util::validate_email( 'john.smith@gmail.co.uk' ) ); + } + + public function test_safe_truncate() + { + $this->assertEquals( 'The quick brown fox...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 24 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 55 ) ); + $this->assertEquals( 'Th...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 2 ) ); + $this->assertEquals( 'The...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The...', util::safe_truncate( 'The quick brown fox jumps over the lazy dog', 7 ) ); + } + + public function test_limit_characters() + { + $this->assertEquals( 'The quick brown fox jump...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 24 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 55 ) ); + $this->assertEquals( 'Th...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 2 ) ); + $this->assertEquals( 'The...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The qui...', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 7 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_characters( 'The quick brown fox jumps over the lazy dog', 150 ) ); + } + + public function test_limit_words() + { + $this->assertEquals( 'The quick brown...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 3 ) ); + $this->assertEquals( 'The quick brown fox jumps...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 5 ) ); + $this->assertEquals( 'The...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 1 ) ); + $this->assertEquals( 'The quick brown fox jumps over the lazy dog', util::limit_words( 'The quick brown fox jumps over the lazy dog', 90 ) ); + $this->assertEquals( 'The quick brown fox jumps over the...', util::limit_words( 'The quick brown fox jumps over the lazy dog', 7 ) ); + } + + public function test_ordinal() + { + $this->assertEquals( '1st', util::ordinal( 1 ) ); + $this->assertEquals( '2nd', util::ordinal( 2 ) ); + $this->assertEquals( '3rd', util::ordinal( 3 ) ); + $this->assertEquals( '4th', util::ordinal( 4 ) ); + $this->assertEquals( '5th', util::ordinal( 5 ) ); + $this->assertEquals( '6th', util::ordinal( 6 ) ); + $this->assertEquals( '7th', util::ordinal( 7 ) ); + $this->assertEquals( '8th', util::ordinal( 8 ) ); + $this->assertEquals( '9th', util::ordinal( 9 ) ); + $this->assertEquals( '22nd', util::ordinal( 22 ) ); + $this->assertEquals( '23rd', util::ordinal( 23 ) ); + $this->assertEquals( '143rd', util::ordinal( 143 ) ); + } + + public function test_array_first() + { + $test = array( 'a' => array( 'a', 'b', 'c' ) ); + + $this->assertEquals( 'a', util::array_first( util::array_get( $test['a'] ) ) ); + } + + public function test_array_first_key() + { + $test = array( 'a' => array( 'a' => 'b', 'c' => 'd' ) ); + + $this->assertEquals( 'a', util::array_first_key( util::array_get( $test['a'] ) ) ); + } + + public function test_array_last() + { + $test = array( 'a' => array( 'a', 'b', 'c' ) ); + + $this->assertEquals( 'c', util::array_last( util::array_get( $test['a'] ) ) ); + } + + public function test_array_last_key() + { + $test = array( 'a' => array( 'a' => 'b', 'c' => 'd' ) ); + + $this->assertEquals( 'c', util::array_last_key( util::array_get( $test['a'] ) ) ); + } + + public function test_array_flatten() + { + $input = array( 'a', 'b', 'c', 'd', array( 'first' => 'e', 'f', 'second' => 'g', array( 'h', 'third' => 'i', array( array( array( array( 'j', 'k', 'l' ) ) ) ) ) ) ); + $expectNoKeys = range( 'a', 'l' ); + $expectWithKeys = array( + 'a', 'b', 'c', 'd', + 'first' => 'e', + 'f', + 'second' => 'g', + 'h', + 'third' => 'i', + 'j', 'k', 'l' + ); + + $this->assertEquals( $expectWithKeys, util::array_flatten( $input ) ); + $this->assertEquals( $expectNoKeys, util::array_flatten( $input, false ) ); + $this->assertEquals( $expectWithKeys, util::array_flatten( $input, true ) ); + } + + public function test_strip_space() + { + $input = ' The quick brown fox jumps over the lazy dog '; + $expect = 'Thequickbrownfoxjumpsoverthelazydog'; + + $this->assertEquals($expect, Util::strip_space($input)); + } + + public function test_sanitize_string() + { + $input = ' Benoit! à New-York? j’ai perçu 1 % : Qu’as-tu "gagné" chez M. V. Noël? Dix francs.'; + $expect = 'benoitanewyorkjaipercu1quastugagnechezmvnoeldixfrancs'; + + $this->assertEquals($expect, Util::sanitize_string($input)); + } + + public function test_get_gravatar() + { + $_SERVER['HTTPS'] = 'on'; + $this->assertEquals('https://secure.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=32', util::get_gravatar('john.doe@example.org')); + $this->assertEquals('https://secure.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=128', util::get_gravatar('john.doe@example.org', 128)); + + $_SERVER['HTTPS'] = 'off'; + $this->assertEquals('http://www.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=32', util::get_gravatar('john.doe@example.org')); + $this->assertEquals('http://www.gravatar.com/avatar/a4bf5bbb9feaa2713d99a3b52ab80024?s=128', util::get_gravatar('john.doe@example.org', 128)); + } + + public function test_get_client_ip() + { + $_SERVER['REMOTE_ADDR'] = '192.168.30.152'; + $_SERVER['HTTP_CLIENT_IP'] = '192.168.30.153'; + $_SERVER['HTTP_X_FORWARDED_FOR'] = '192.168.30.154'; + $this->assertEquals('192.168.30.152', util::get_client_ip()); + $this->assertEquals('192.168.30.153', util::get_client_ip(true)); + + unset($_SERVER['HTTP_CLIENT_IP']); + $this->assertEquals('192.168.30.154', util::get_client_ip(true)); + unset($_SERVER['HTTP_X_FORWARDED_FOR']); + $this->assertEquals('192.168.30.152', util::get_client_ip(true)); + } + + public function test_full_permissions() + { + // Text a non-existant file. + $this->assertFalse(util::full_permissions('faker-123.blah'), 'Gave a permission value for a non-existant file.'); + + // Test an existing file. + $expected = '-rw-rw-rw-'; + $tempFile = tempnam(sys_get_temp_dir(), 'foo'); + $this->assertTrue(chmod($tempFile, 0666), 'Oops. Could not change temp file\'s permissions to 0666.'); + $this->assertEquals($expected, util::full_permissions($tempFile), 'Could not properly obtain permissions of an existing file.'); + unlink($tempFile); + + $this->assertEquals('lr--r--r--', util::full_permissions('fake-file-222', octdec('120444'))); + $this->assertEquals('ur--r--r--', util::full_permissions('fake-file-222', octdec('000444'))); + $this->assertEquals('srwxr-xr-x', util::full_permissions('fake-file-222', octdec('140755'))); + $this->assertEquals('drwxr-xr-x', util::full_permissions('fake-file-222', octdec('40755'))); + $this->assertEquals('brw-rw----', util::full_permissions('fake-file-222', octdec('60660'))); + $this->assertEquals('crw-rw----', util::full_permissions('fake-file-222', octdec('20660'))); + $this->assertEquals('prw-rw----', util::full_permissions('fake-file-222', octdec('10660'))); + $this->assertEquals('---x------', util::full_permissions('fake-file-222', octdec('100100'))); + $this->assertEquals('--w-------', util::full_permissions('fake-file-222', octdec('100200'))); + $this->assertEquals('--wx------', util::full_permissions('fake-file-222', octdec('100300'))); + $this->assertEquals('-r--------', util::full_permissions('fake-file-222', octdec('100400'))); + $this->assertEquals('-r-x------', util::full_permissions('fake-file-222', octdec('100500'))); + $this->assertEquals('-rw-------', util::full_permissions('fake-file-222', octdec('100600'))); + $this->assertEquals('-rwx------', util::full_permissions('fake-file-222', octdec('100700'))); + + // Windows does not have the concept of /. + if (!defined('PHP_WINDOWS_VERSION_MAJOR')) { + $this->assertEquals('drwxr-xr-x', util::full_permissions('/')); + } + } + + public function test_array_clean() + { + $input = array( 'a', 'b', '', null, false, 0); + $expect = array('a', 'b'); + $this->assertEquals($expect, Util::array_clean($input)); + } + + public function test_var_dump_plain() + { + $input = 'var'; + $expect = 'string(3) "var"'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = true; + $expect = 'bool(true)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = 1; + $expect = 'int(1)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = 1.5; + $expect = 'float(1.5)'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = null; + $expect = 'NULL'; + $this->assertEquals($expect, Util::var_dump_plain($input, true)); + + $input = fopen('php://memory', 'r'); + $expect = 'resource("stream") "' . $input . '"'; + $this->assertEquals($expect, Util::var_dump_plain($input, -1)); + fclose($input); + + // Test complex arrays. + $input = array(1, 2, 4, 6, 10 => 20, 100 => 200); + $actual = util::var_dump_plain($input, true); + $this->assertContains(')', $actual); + + // Test complex objects. + $experiment = new VarDumpExperiment(); + $actual = util::var_dump_plain($experiment, true); + $this->assertContains('1 => string(1', $actual); + } + + public function test_var_dump() + { + $input = 'var'; + $expect = '
string(3) "var"
'; + + // Ensure the proper output is returned + $this->assertEquals($expect, Util::var_dump($input, true)); + + // Ensure the proper output is actually outputted + $this->expectOutputString($expect); + util::var_dump($input); + + // Ensure we avoid infinite recursion on recursive arrays + $a = array('a' => 'value a', 'b' => 'value b'); + $b = array('test' => &$a); + $c = array('a' => &$a, 'b' => &$b); + $a['c'] = &$c; + $b['c'] = &$c; + $this->assertContains('*RECURSION DETECTED*', Util::var_dump($c, true)); + + // Ensure we avoid infinite recursion on recursive objects + $a = (object) array('a' => 'value a', 'b' => 'value b'); + $b = (object) array('test' => &$a); + $c = (object) array('a' => &$a, 'b' => &$b); + $a->c = &$c; + $b->c = &$c; + $this->assertContains('*RECURSION DETECTED*', Util::var_dump($c, true)); + + // Test class scoping. + $experiment = new VarDumpExperiment(); + $actual = util::var_dump($experiment, true); + + $snippet = substr($actual, strrpos($actual, 'display:inline')); + $this->assertContains('"public"', $snippet); + $this->assertContains('"protected:protected"', $snippet); + $this->assertContains('"private:VarDumpExperiment:private"', $actual); + } + + public function test_linkify() + { + $input = 'great websites: http://www.google.com?param=test and http://yahoo.com/a/nested/folder'; + $expect = 'great websites: http://www.google.com?param=test and http://yahoo.com/a/nested/folder'; + $this->assertEquals($expect, Util::linkify($input)); + + $this->assertEquals($expect, util::linkify($expect), 'linkify() tried to double linkify an href.'); + } + + public function test_start_with() + { + $this->assertTrue(Util::starts_with('start a string', 'start a')); + $this->assertFalse(Util::starts_with('start a string', 'string')); + } + + public function test_end_with() + { + $this->assertTrue(Util::ends_with('start a string', 'a string')); + $this->assertFalse(Util::ends_with('start a string', 'start')); + } + + public function test_contains() + { + $this->assertTrue(Util::str_contains('start a string', 'a string')); + $this->assertFalse(Util::str_contains('start a string', 'Start')); + } + + public function test_iContains() + { + $this->assertTrue(Util::str_icontains('start a string', 'a string')); + $this->assertTrue(Util::str_icontains('start a string', 'Start')); + } + + public function test_get_file_ext() + { + $input = 'a_pdf_fil.pdf'; + $expect = 'pdf'; + $this->assertEquals($expect, Util::get_file_ext($input)); + } + + public function test_rmdir() + { + $dirname = dirname(__FILE__); + + // Test deleting a non-existant directory + $this->assertFalse(file_exists($dirname . '/test1')); + $this->assertTrue(util::rmdir($dirname . '/test1')); + + // Test deleting an empty directory + $dir = $dirname . '/test2'; + mkdir($dir); + + $this->assertTrue(is_dir($dir)); + + if (is_dir($dir)) { + util::rmdir($dir); + $this->assertFalse(is_dir($dir)); + } + + // Test deleting a non-empty directory + $dir = $dirname . '/test3'; + $file = $dirname . '/test3/test.txt'; + mkdir($dir); + touch($file); + + $this->assertTrue(is_dir($dir)); + $this->assertTrue(is_file($file)); + + if (is_dir($dir)) { + util::rmdir($dir); + $this->assertFalse(is_dir($dir)); + $this->assertFalse(is_file($file)); + } + + // Test deleting a non-directory path + $file = $dirname . '/test4.txt'; + touch($file); + + try { + $str = util::rmdir($file); + $this->assertTrue(false); + } catch (\Exception $e) { + $this->assertTrue(true); + } + + unlink($file); + + // Test deleting a nested directory + $dir1 = $dirname . '/test5'; + $dir2 = $dirname . '/test5/nested_dir'; + $file1 = $dir1 . '/file1.txt'; + $file2 = $dir2 . '/file2.txt'; + mkdir($dir1); + mkdir($dir2); + touch($file1); + touch($file2); + + $this->assertTrue(is_dir($dir1)); + $this->assertTrue(is_dir($dir2)); + $this->assertTrue(is_file($file1)); + $this->assertTrue(is_file($file2)); + + if (is_dir($dir1)) { + util::rmdir($dir1); + $this->assertFalse(is_dir($dir1)); + $this->assertFalse(is_dir($dir2)); + $this->assertFalse(is_file($file1)); + $this->assertFalse(is_file($file2)); + } + + // Test symlink traversal. + $dir = $dirname . '/test6'; + $nestedDir = "$dir/nested"; + $symlink = "$dir/nested-symlink"; + + mkdir($dir); + mkdir($nestedDir); + + $symlinkStatus = symlink($nestedDir, $symlink); + $this->assertTrue($symlinkStatus, 'The test system does not support making symlinks.'); + + if (!$symlink) { + return; + } + + $this->assertTrue(util::rmdir($symlink, true), 'Could not delete a symlinked directory.'); + $this->assertFalse(file_exists($symlink), 'Could not delete a symlinked directory.'); + util::rmdir($dir, true); + $this->assertFalse(is_dir($dir), 'Could not delete a directory with a symlinked directory inside of it.'); + } + + public function test_get_current_url() + { + $expected = 'http://test.dev/test.php?foo=bar'; + $expectedAuth = 'http://admin:123@test.dev/test.php?foo=bar'; + $expectedPort = 'http://test.dev:443/test.php?foo=bar'; + $expectedPort2 = 'https://test.dev:80/test.php?foo=bar'; + $expectedSSL = 'https://test.dev/test.php?foo=bar'; + + $_SERVER['HTTP_HOST'] = 'test.dev'; + $_SERVER['SERVER_PORT'] = 80; + $_SERVER['REQUEST_URI'] = '/test.php?foo=bar'; + $_SERVER['QUERY_STRING'] = 'foo=bar'; + $_SERVER['PHP_SELF'] = '/test.php'; + + // Test regular. + $this->assertEquals($expected, util::get_current_url()); + + // Test server auth. + $_SERVER['PHP_AUTH_USER'] = 'admin'; + $_SERVER['PHP_AUTH_PW'] = '123'; + $this->assertEquals($expectedAuth, util::get_current_url()); + unset($_SERVER['PHP_AUTH_USER']); + unset($_SERVER['PHP_AUTH_PW']); + + // Test port. + $_SERVER['SERVER_PORT'] = 443; + $this->assertEquals($expectedPort, util::get_current_url()); + + // Test SSL. + $_SERVER['HTTPS'] = 'on'; + $this->assertEquals($expectedSSL, util::get_current_url()); + $_SERVER['SERVER_PORT'] = 80; + $this->assertEquals($expectedPort2, util::get_current_url()); + unset($_SERVER['HTTPS']); + + // Test no $_SERVER['REQUEST_URI'] (e.g., MS IIS). + unset($_SERVER['REQUEST_URI']); + $this->assertEquals($expected, util::get_current_url()); + } + + public function test_set_writable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_writable('/no/such/file')); + + // Create a file to test with + $dirname = dirname(__FILE__); + $file = $dirname . '/test7'; + touch($file); + chmod($file, 0644); + + // The file is owned by us so it should be writable + $this->assertTrue(is_writable($file)); + $this->assertEquals('-rw-r--r--', util::full_permissions($file)); + + // Toggle writable bit off for us + util::set_writable($file, false); + clearstatcache(); + $this->assertFalse(is_writable($file)); + $this->assertEquals('-r--r--r--', util::full_permissions($file)); + + // Toggle writable bit back on for us + util::set_writable($file, true); + clearstatcache(); + $this->assertTrue(is_writable($file)); + $this->assertEquals('-rw-r--r--', util::full_permissions($file)); + + unlink($file); + } + + public function test_set_readable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_readable('/no/such/file')); + + $dirname = dirname(__FILE__); + $file = $dirname . '/test8'; + touch($file); + + $this->assertTrue(is_readable($file)); + + util::set_readable($file, false); + clearstatcache(); + $this->assertFalse(is_readable($file)); + + util::set_readable($file, true); + clearstatcache(); + $this->assertTrue(is_readable($file)); + + unlink($file); + } + + public function test_set_executable() + { + if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { + $this->markTestSkipped('This functionality is not working on Windows.'); + } + + if (posix_geteuid() === 0) { + $this->markTestSkipped('These tests don\'t work when run as root'); + } + + $this->assertFalse(util::set_executable('/no/such/file')); + + $dirname = dirname(__FILE__); + $file = $dirname . '/test9'; + touch($file); + + $this->assertFalse(is_executable($file)); + + util::set_executable($file, true); + clearstatcache(); + $this->assertTrue(is_executable($file)); + + util::set_executable($file, false); + clearstatcache(); + $this->assertFalse(is_executable($file)); + + unlink($file); + } + + public function test_directory_size() { + $dirname = dirname(__FILE__); + $dir = $dirname .'/dir1'; + mkdir($dir); + $file1 = $dir .'/file1'; + file_put_contents($file1, '1234567890'); + $file2 = $dir .'/file2'; + file_put_contents($file2, range('a', 'z')); + $this->assertEquals(10 + 26, util::directory_size($dir)); + util::rmdir($dir); + } + + public function test_get_user_directory() { + // Test for OS Default. + $this->assertTrue(is_writable(util::get_user_directory())); + + $oldServer = $_SERVER; + unset($_SERVER); + // Test for UNIX. + $_SERVER['HOME'] = '/home/unknown'; + $this->assertEquals($_SERVER['HOME'], util::get_user_directory(), 'Could not get the user\'s home directory in UNIX.'); + unset($_SERVER); + + // Test for Windows. + $expected = 'X:\Users\ThisUser'; + $_SERVER['HOMEDRIVE'] = 'X:'; + $_SERVER['HOMEPATH'] = '\Users\ThisUser'; + $this->assertEquals($expected, util::get_user_directory(), 'Could not get the user\'s home directory in Windows.'); + + // In case the tests are not being run in isolation. + $_SERVER = $oldServer; + } + + public function test_directory_contents() { + $dirname = dirname(__FILE__); + $dir = $dirname . DIRECTORY_SEPARATOR .'dir1'; + mkdir($dir); + $file1 = $dir . DIRECTORY_SEPARATOR .'file1'; + touch($file1); + $this->assertEquals(array($file1), util::directory_contents($dir)); + util::rmdir($dir); + } +} diff --git a/vendor/brandonwamboldt/utilphp/util.php b/vendor/brandonwamboldt/utilphp/util.php new file mode 100644 index 00000000..1b209796 --- /dev/null +++ b/vendor/brandonwamboldt/utilphp/util.php @@ -0,0 +1,10 @@ + + */ +class util extends \utilphp\util { } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100644 index 00000000..dc02dfb1 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,445 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..af2fd3b1 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,16 @@ + $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'DBHelper' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'DBTransaction' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDB' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDBEval' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDBException' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', + 'WhereClause' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..bf34e7c9 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,10 @@ + array($vendorDir . '/brandonwamboldt/utilphp/src'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100644 index 00000000..f44fc383 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,10 @@ + array($vendorDir . '/league/plates/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 00000000..afca66f6 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,52 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 00000000..ac3cfb2c --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,53 @@ + + array ( + 'League\\Plates\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'League\\Plates\\' => + array ( + 0 => __DIR__ . '/..' . '/league/plates/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'u' => + array ( + 'utilphp\\' => + array ( + 0 => __DIR__ . '/..' . '/brandonwamboldt/utilphp/src', + ), + ), + ); + + public static $classMap = array ( + 'DB' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'DBHelper' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'DBTransaction' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDB' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDBEval' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'MeekroDBException' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + 'WhereClause' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::$prefixesPsr0; + $loader->classMap = ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 00000000..b52416a5 --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,152 @@ +[ + { + "name": "brandonwamboldt/utilphp", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/brandonwamboldt/utilphp.git", + "reference": "36c32efc4f0679c05163464a550f45c8d83fe683" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brandonwamboldt/utilphp/zipball/36c32efc4f0679c05163464a550f45c8d83fe683", + "reference": "36c32efc4f0679c05163464a550f45c8d83fe683", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "time": "2015-02-02T17:56:14+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "utilphp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brandon Wamboldt", + "email": "brandon.wamboldt@gmail.com" + } + ], + "description": "util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects", + "homepage": "https://github.com/brandonwamboldt/utilphp", + "keywords": [ + "collection", + "helpers", + "php", + "utility" + ] + }, + { + "name": "league/plates", + "version": "3.3.0", + "version_normalized": "3.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/plates.git", + "reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/plates/zipball/b1684b6f127714497a0ef927ce42c0b44b45a8af", + "reference": "b1684b6f127714497a0ef927ce42c0b44b45a8af", + "shasum": "" + }, + "require": { + "php": "^5.3 | ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "^1.4", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "time": "2016-12-28T00:14:17+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Plates\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "role": "Developer" + } + ], + "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", + "homepage": "http://platesphp.com", + "keywords": [ + "league", + "package", + "templates", + "templating", + "views" + ] + }, + { + "name": "sergeytsalkov/meekrodb", + "version": "v2.3", + "version_normalized": "2.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/SergeyTsalkov/meekrodb.git", + "reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SergeyTsalkov/meekrodb/zipball/eb36858f1aff94ae1665900e681a1cfb78563ee1", + "reference": "eb36858f1aff94ae1665900e681a1cfb78563ee1", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "time": "2014-06-16T22:40:22+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "db.class.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Sergey Tsalkov", + "email": "stsalkov@gmail.com" + } + ], + "description": "The Simple PHP/MySQL Library", + "homepage": "http://www.meekro.com", + "keywords": [ + "database", + "mysql", + "mysqli", + "pdo" + ] + } +] diff --git a/vendor/league/plates/CONTRIBUTING.md b/vendor/league/plates/CONTRIBUTING.md new file mode 100644 index 00000000..9eebab6e --- /dev/null +++ b/vendor/league/plates/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +We accept contributions via Pull Requests on [Github](https://github.com/thephpleague/plates). + +## Pull Requests + +- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer). +- **Add tests!** - Your patch won't be accepted if it doesn't have tests. +- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date. +- **Consider our release cycle** - We try to follow semver. Randomly breaking public APIs is not an option. +- **Create topic branches** - Don't ask us to pull from your master branch. +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting. + +## Running Tests + +``` bash +$ phpunit +``` +**Happy coding**! \ No newline at end of file diff --git a/vendor/league/plates/LICENSE b/vendor/league/plates/LICENSE new file mode 100644 index 00000000..26357d46 --- /dev/null +++ b/vendor/league/plates/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 The League of Extraordinary Packages + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/vendor/league/plates/README.md b/vendor/league/plates/README.md new file mode 100644 index 00000000..56679e19 --- /dev/null +++ b/vendor/league/plates/README.md @@ -0,0 +1,63 @@ +Plates +====== + +[![Author](http://img.shields.io/badge/author-@reinink-blue.svg?style=flat-square)](https://twitter.com/reinink) +[![Source Code](http://img.shields.io/badge/source-league/plates-blue.svg?style=flat-square)](https://github.com/thephpleague/plates) +[![Latest Version](https://img.shields.io/github/release/thephpleague/plates.svg?style=flat-square)](https://github.com/thephpleague/plates/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +[![Build Status](https://img.shields.io/travis/thephpleague/plates/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/plates) +[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/plates.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/plates/code-structure) +[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/plates.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/plates) +[![Total Downloads](https://img.shields.io/packagist/dt/league/plates.svg?style=flat-square)](https://packagist.org/packages/league/plates) + +Plates is a native PHP template system that's fast, easy to use and easy to extend. It's inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and strives to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled template languages, such as Twig or Smarty. + +### Highlights + +- Native PHP templates, no new [syntax](http://platesphp.com/templates/syntax/) to learn +- Plates is a template system, not a template language +- Plates encourages the use of existing PHP functions +- Increase code reuse with template [layouts](http://platesphp.com/templates/layouts/) and [inheritance](http://platesphp.com/templates/inheritance/) +- Template [folders](http://platesphp.com/engine/folders/) for grouping templates into namespaces +- [Data](http://platesphp.com/templates/data/#preassigned-and-shared-data) sharing across templates +- Preassign [data](http://platesphp.com/templates/data/#preassigned-and-shared-data) to specific templates +- Built-in [escaping](http://platesphp.com/templates/escaping/) helpers +- Easy to extend using [functions](http://platesphp.com/engine/functions/) and [extensions](http://platesphp.com/engine/extensions/) +- Framework-agnostic, will work with any project +- Decoupled design makes templates easy to test +- Composer ready and PSR-2 compliant + +## Installation + +Plates is available via Composer: + +``` +composer require league/plates +``` + +## Documentation + +Full documentation can be found at [platesphp.com](http://platesphp.com/). + +## Testing + +```bash +phpunit +``` + +## Contributing + +Please see [CONTRIBUTING](https://github.com/thephpleague/plates/blob/master/CONTRIBUTING.md) for details. + +## Security + +If you discover any security related issues, please email jonathan@reinink.ca instead of using the issue tracker. + +## Credits + +- [Jonathan Reinink](https://github.com/reinink) +- [All Contributors](https://github.com/thephpleague/plates/contributors) + +## License + +The MIT License (MIT). Please see [License File](https://github.com/thephpleague/plates/blob/master/LICENSE) for more information. diff --git a/vendor/league/plates/composer.json b/vendor/league/plates/composer.json new file mode 100644 index 00000000..8971a983 --- /dev/null +++ b/vendor/league/plates/composer.json @@ -0,0 +1,41 @@ +{ + "name": "league/plates", + "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", + "keywords": [ + "league", + "package", + "templating", + "templates", + "views" + ], + "homepage": "http://platesphp.com", + "license": "MIT", + "authors" : [ + { + "name": "Jonathan Reinink", + "email": "jonathan@reinink.ca", + "role": "Developer" + } + ], + "require" : { + "php": "^5.3 | ^7.0" + }, + "require-dev": { + "mikey179/vfsStream": "^1.4", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "autoload": { + "psr-4": { + "League\\Plates\\": "src" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "scripts": { + "test": "phpunit" + } +} diff --git a/vendor/league/plates/docs/CNAME b/vendor/league/plates/docs/CNAME new file mode 100644 index 00000000..1e00c34f --- /dev/null +++ b/vendor/league/plates/docs/CNAME @@ -0,0 +1 @@ +platesphp.com \ No newline at end of file diff --git a/vendor/league/plates/docs/_data/images.yml b/vendor/league/plates/docs/_data/images.yml new file mode 100644 index 00000000..56d11839 --- /dev/null +++ b/vendor/league/plates/docs/_data/images.yml @@ -0,0 +1,8 @@ +# Path to project specific favicon.ico, leave blank to use default +favicon: /favicon.ico + +# Path to project specific apple-touch-icon-precomposed.png, leave blank to use default +apple_touch: /apple-touch-icon-precomposed.png + +# Path to project logo +logo: /logo.png \ No newline at end of file diff --git a/vendor/league/plates/docs/_data/menu.yml b/vendor/league/plates/docs/_data/menu.yml new file mode 100644 index 00000000..317a0e4f --- /dev/null +++ b/vendor/league/plates/docs/_data/menu.yml @@ -0,0 +1,24 @@ +Getting Started: + Introduction: '/' + Simple example: '/simple-example/' + Installation: '/installation/' + Changelog: '/changelog/' +The Engine: + Overview: '/engine/' + File extensions: '/engine/file-extensions/' + Folders: '/engine/folders/' + Functions: '/engine/functions/' + Extensions: '/engine/extensions/' +Templates: + Overview: '/templates/' + Data: '/templates/data/' + Functions: '/templates/functions/' + Nesting: '/templates/nesting/' + Layouts: '/templates/layouts/' + Sections: '/templates/sections/' + Inheritance: '/templates/inheritance/' + Escaping: '/templates/escaping/' + Syntax: '/templates/syntax/' +Extensions: + Asset: '/extensions/asset/' + URI: '/extensions/uri/' \ No newline at end of file diff --git a/vendor/league/plates/docs/_data/project.yml b/vendor/league/plates/docs/_data/project.yml new file mode 100644 index 00000000..4ff76f30 --- /dev/null +++ b/vendor/league/plates/docs/_data/project.yml @@ -0,0 +1,4 @@ +title: Plates +tagline: Native PHP Templates +description: 'Plates is a Twig inspired, native PHP template system that brings modern template language functionality to native PHP templates.' +google_analytics_tracking_id: UA-46050814-2 \ No newline at end of file diff --git a/vendor/league/plates/docs/_layouts/default.html b/vendor/league/plates/docs/_layouts/default.html new file mode 100644 index 00000000..72042e30 --- /dev/null +++ b/vendor/league/plates/docs/_layouts/default.html @@ -0,0 +1,107 @@ + + + + + + + {% if page.url == '/' %} + {{ site.data.project.title }} - {{ site.data.project.tagline }} + {% else %} + {{ page.title }} - {{ site.data.project.title }} + {% endif %} + {% if site.data.project.description %} + + {% endif %} + {% if site.github.url %} + + {% endif %} + {% if site.data.images.favicon %} + + {% else %} + + {% endif %} + {% if site.data.images.apple_touch %} + + {% else %} + + {% endif %} + + + + + + + Fork me on GitHub + + +
+ + The League of Extraordinary Packages + +

Our Packages:

+
    + +
+
+ +
+ + + Presented by The League of Extraordinary Packages + +
+ + + + +
+ + {% for section in site.data.menu %} +

{{ section[0] }}

+
    + {% for link in section[1] %} +
  • + {{ link[0] }} +
  • + {% endfor %} +
+ {% endfor %} +
+
+ {{ content }} +
+
+ + + + + + + +{% if site.data.project.google_analytics_tracking_id %} + +{% endif %} + + + \ No newline at end of file diff --git a/vendor/league/plates/docs/apple-touch-icon-precomposed.png b/vendor/league/plates/docs/apple-touch-icon-precomposed.png new file mode 100644 index 0000000000000000000000000000000000000000..460a2ba1184954e4478277ec9ad08b9166b130ab GIT binary patch literal 5531 zcmbVQc{r3`-yg=3CD}rRu~dk$&zQ0AOD2*nOW6h!V}==fB1^J_ELkcN60-06o~?v3 zNHSz6Cdv|xcltd)&-=UH>$#pk-uwF8_c`~uzuWnq@42pXe_~9p>YrxhWdr~Krwt8s z%qVTfpZgRw<(dAx-jC9p!|Ph(uVY;C{*FFKfTjz^2?;VpJGvpwkd7{a-UCP#008KY zGPlNCBaGqB7&O@Nj|?~fjiqP<04nMMSVw0MBp&31bVGTm3U4*H3xiNDs=`)^2pI%c z8|jWR2=YN*54vjZ9OU5)a}ico1E~bSDF)C;ydx+8?dgSs2dE1FWfxBA{~4AR2K^<1 z_fQr7S5VdnQ;;^s2MJOH%S$=S$jX8s5U{L*A_O8U36hhMm6MjC03s!;09S;-<)EOy zFJX!|9~W1+nU3Dyz9?_1!tQuH7A`IA@9z)xmj`2f+@xh;FxVd(a&l4>2`OBl7v3>I z$_poQVnGLqbM`@D@hFTJ=#NE5CyXy%RhSa#zovl3A`t&J?1lR~QIwQP2RLG-Wx+Di zX!M_X{UwdVn<4)wAbb>)@xv>`eW9jLsll8&6LoZgA9p%)JC=;e$&@r$DP{aY9IUv=Ty zK1fGA#>X6k@jR&jQ+Es=gLB7VLE6_LATflaGs^4FfcT#U`qzAQkUl6sq>G*p1`YZv z!*JAph(Het)%(9Qhw18S%4#X->S@B{g#Xrc`Tt~1ni7okpYr%extt79YVc3@-^EXP z`S==7 zo=gto0J6lz11~M~us%+S_)6@l>`tbg_I8@5QKqAx=Wyz9km*d~VfCpv{{YR}&%?kV zQe!)2kX4}AYHs!W!q)L)UX)&GQQ79|>gvJP$IK7mgjZ{`$Ft4H_cu=eWt_KfMW=C8sVeBy zrtm9Zo}XuJNzNLMJy)EEEFCW0vCL_PO97>7M3YrvC~xs7Br-oOO-{PBB{ewe*JtU4 zj<%uj_pNrDMCvw&uy`kyswGyH=oeF*?=J*g)K#VNb=F`SU)Z}G_UM;I>6%I2@o=lw zCTG~I&u{{%JZH-dQ!}o+>~E2l|dmZ{PGj4WFPU>+Sv3Ga&N)q1t=a z^xPa@-9^2fWEkU0mXPyM(dEl1~o} zUzz7EwX%L)&b5EcwZE>mx6nh+uD9$AKHyKMj$|nwOhh|50Xb|NK9_+jQ-)^js%&cX#7^XQkasXX^ZiuP=b@vz}Lwg)53QY)XLN z{W^qpTl#u}JC&~MTetO1?JMyQnN$wk;hRnaGT~SVD|rt^=ukcF^7bd5g zZ}UiVPwrJQx16re>LgAHC3Ju!6D(xX=B6B3H~F?p+#1KJ17ohVk1gRNv*TeX)#TFx zgES#pHt*akz!;+`sOUExcO|M`Y35(jK^E7b$!jYKD)d`kzQow*ulTTO|LV?%zoQlf z-a{`v7$lB%yi>_`1}qG)Fvu&&gr)b2dqxta2jS%g8sEvglYL(uVd5KtUVJ2nLQlj+ zTOtut+pM2d;jz=cy|H_bx_mjd1s97$kFgveJ20r6`WQox| z+;0W;)NA?i*ZJ=_OGw6c43=%}(e>nOSGtpkr2V-fab`(o%(Ji-m_n?>UjFagfmo+e z;&(^ZH|_x?)a(I%{g_QQAKiPlDPJ5|cO$dk%|+MSfUf5j^v&2A0rOlpnzcE`%tet< z#-wJg*$(?Y~K^`mps z+%`}1R`RcY5ATcCJavHNvF7;#r)o?aY95P9y5-fmGH})Zp1fgYBz<%rhC#})tHbNz zf{h3xwFfm7Zutm%BoQ-e;T>#Xvqh8QE<&x1(;g%1HS?*VH!cVN)~{kaJF#N3Zgk7j zVOuNxey%*t4erK;Jn&4%BIL`Fdp5tw8GJ*I@kr9P-Bp`VxOIRew>`9c_Xm)=W40dV zrgYXb2cN45|H62TQxxcLxbz$=Q0LXKB+e4cy-^klPaxKhmo}K4#k-pjmTVd6^ ziWU#{i#q>P_2SLJ9V^BS^es|M9r>y^Nmn+=`{{YBIm#Jn-Zqm+e=v8T9A~e{CcL5X z0&t*Hs66||YA$4^$2{6Viqn;qQdb z`1inNwhI(7`gH;tUfGW%?*i(vvq{I_jIkMF^m*8#D~}sETTB&$2U^T8IX!8d9CRs9 zQnrYCxbZ;|I=&poRh^<-Stc*^iYZS-Jgd~m6x+fW!*-u`zE>`>mH7SPViACFNx;8G z=>l0jIM_bSPF7WIIn0-Cm{eBN4q?rc0Jbj@ckoq#=-OBdNe*ep=ylB+!KHQD=Ix&V_NC!(QoAw} z$L0wkA^m4EOQzb|kDPNOOzONZXHO0W+4SF{bs8skB_c&uimh((@BszMmweXhN4^NguI zuWSEwVxY$$IpBzuA-_4Q#obD+>)M^35YdM4KKP7}AwdS3^OpAga^S@^Z_&t-M&4@~ zb*fG5zANjkN{@lZ27ds@0dtaZrCIFf~v*-OB}mha)a`$Ki7Y$oU-se zO9S>90DjwaYyk8WTj8G`3rfRZh)jjXWYmM(7`M#Q z)|3;n2hecA=T;TQJ(lm<&NsdSLNK+0X76ebuHTiY~_r^7(ml;h_ zaesFR_8fM9OWXg=qp1uyf869y<)YK&N9#UwAnQ}6t(TT}kN8>6)Y`U}XnuLL6TV+9 zzPoklThga_FgSE`C#@~u!!maEooGF~YPF+sKvTqfzy2TC*i-Qxp)L`jlYA~EIGbAW z`Fr&HcjADZqXCV$$F695ZjKZlazeG)-j$Qcz%Cou3KHFdK00+wI-_M;`ZE&lx(d^_(I`B7Ug6V_r7>{2@T9B7fL) zD*xQiL*r*@)RCi{$|S?k)EC_Z?NPPLOYOzmT4N6m`;`loplRZ~Hmf`O)y&kvX%E9= z5vvI!J|0lZmdXHMhmZGJ`Q?*@GET42MX(<3*=sSBwioF#!MSf}0Lo3qJ`B0Isirb) z&hTB(ga!3(PfVZfmDr1lPgQ^WeOYDq&16lm!5TtK+0w|B{YFv9yVs_btrkq=3VVk~ zj~?SWio%mvbd5YL@X$OP*CIXvRxVG^DrZxFnr>gcc)QK9%j^p>^vW8FYJ9a$u%;>? zbT7ShxKO{umhOG^XW-JCyOyj|hL%rgaVt-GZqASC3T4$F*+TZsJ|(KGdW?*J9YSBt z;F2d+ePK?;vpi_yFzzpdJ2FFF3RW@@>8DFSc(Pxl>99L?8n;)y{k*o$@kb-q;hxs| z5`laXiP=B@U^7bt5R%d0CTtCjgB$unyIBt;Ze!`zx4wIlYI7a1pAR=unFW>zsUf~m z&&rL)-omAxg+4d=GO;ed_r|W$0P`g=S0ZK3J@)EHW94ue8uIF@O0dHnn-dqSv;*`u#V-dtw)F6w*a#JZp;iG~-v~`e?7Ya9mKA-)i?bGljHs|#_^I0BH>DDKVl(G&d^mOW z+j}b?? zQZW+uc9@|09U}{rKE3ipb2( zKZv!L7GnR63w~{mvAHyQG?T3(-U5ux5tMAPGaO`XD35|)aLOIC@h%n*%5uxMTP*oV zfQGb5u&x?euQ;XOsg<&HI;-*f>gQ|eXAexHn-_?$6LL8B(?5`d(>N-G{iQF~a>ZSC zW&gPEW>0!Lz1xm_p7DtnO;3A<+-teq6~WY=9(eSU+{F3)>1tBp%O;U}ozbe4=*%@2 zEs|X^erHOj;5vRaIlj(&yD#Ebfncka*R`}uMzXX0qNGO>(>J76 ze&{P+0z7(0{OH`OK3}HTd8O7k2fz2D}a7yHYzb$PW4=VQOC%M-Pe`9kd^MyPBMTrDBJ6g zJ}tg(=zr~?rt$7f<6)plT6xxzl|g#X&84x+96w|bvFX7_OXLSe_IPA;vG2KNFw96@ zbaEHGGZ`m9&qXwmGoT!1_@zfJqVfof>W`8Bg-nlr5^i5;8v6R9+(tWQiP&>@lUo;; zhWYZklrCmiR$YHNBj+0{^r`z@lTV>)>R(>KdWzdK<|Ps4NjK6`2oi#XSNjE5O~1f8 z`Rec-G*7sh7pIHi$<7d&E9irzMhw$%52U=XF3<#UBU$yZ_Gvp4@}8KWRernmAc@} zNU<_8lKMHZk8{4sqfZ#`LrDQdGl+bkYkbeB%Z)7J&X&>PtxxL{%c3m;8eC|8j>Kgi zv(@oPh+%LqN|1ZSc?b74~CSzn(#W|9F|u{3W8K8Nl8 Pp-T;Quj-U(IfVZYAVm%x literal 0 HcmV?d00001 diff --git a/vendor/league/plates/docs/changelog.md b/vendor/league/plates/docs/changelog.md new file mode 100644 index 00000000..a471991d --- /dev/null +++ b/vendor/league/plates/docs/changelog.md @@ -0,0 +1,15 @@ +--- +layout: default +permalink: changelog/ +title: Changelog +--- + +Changelog +========= + +All notable changes to this project will be documented in this file. + +{% for release in site.github.releases %} +## [{{ release.name }}]({{ release.html_url }}) - {{ release.published_at | date: "%Y-%m-%d" }} +{{ release.body | markdownify }} +{% endfor %} \ No newline at end of file diff --git a/vendor/league/plates/docs/css/custom.scss b/vendor/league/plates/docs/css/custom.scss new file mode 100644 index 00000000..6bef9794 --- /dev/null +++ b/vendor/league/plates/docs/css/custom.scss @@ -0,0 +1,16 @@ +--- +--- + +.github { + position: absolute; + top: 0; + right: 0; + border: 0; + z-index: 1000; +} + +@media screen and (max-width: 1065px) { + .github { + display: none; + } +} \ No newline at end of file diff --git a/vendor/league/plates/docs/engine/extensions.md b/vendor/league/plates/docs/engine/extensions.md new file mode 100644 index 00000000..c40868a5 --- /dev/null +++ b/vendor/league/plates/docs/engine/extensions.md @@ -0,0 +1,120 @@ +--- +layout: default +permalink: engine/extensions/ +title: Extensions +--- + +Extensions +========== + +Creating extensions couldn't be easier, and can really make Plates sing for your specific project. Start by creating a class that implements `\League\Plates\Extension\ExtensionInterface`. Next, register your template [functions](/engine/functions/) within a `register()` method. + +## Simple extensions example + +~~~ php +use League\Plates\Engine; +use League\Plates\Extension\ExtensionInterface; + +class ChangeCase implements ExtensionInterface +{ + public function register(Engine $engine) + { + $engine->registerFunction('uppercase', [$this, 'uppercaseString']); + $engine->registerFunction('lowercase', [$this, 'lowercaseString']); + } + + public function uppercaseString($var) + { + return strtoupper($var); + } + + public function lowercaseString($var) + { + return strtolower($var); + } +} +~~~ + +To use this extension in your template, simply call your new functions: + +~~~ php +

Hello, e($this->uppercase($name))?>

+~~~ + +They can also be used in a [batch](/templates/functions/#batch-function-calls) compatible function: + +~~~ php +

Hello e($name, 'uppercase')

+~~~ + +## Single method extensions + +Alternatively, you may choose to expose the entire extension object to the template using a single function. This can make your templates more legible and also reduce the chance of conflicts with other extensions. + +~~~ php +use League\Plates\Engine; +use League\Plates\Extension\ExtensionInterface; + +class ChangeCase implements ExtensionInterface +{ + public function register(Engine $engine) + { + $engine->registerFunction('case', [$this, 'getObject']); + } + + public function getObject() + { + return $this; + } + + public function upper($var) + { + return strtoupper($var); + } + + public function lower($var) + { + return strtolower($var); + } +} +~~~ + +To use this extension in your template, first call the primary function, then the secondary functions: + +~~~ php +

Hello, e($this->case()->upper($name))?>

+~~~ + +## Loading extensions + +To enable an extension, load it into the [engine](/engine/) object using the `loadExtension()` method. + +~~~ php +$engine->loadExtension(new ChangeCase()); +~~~ + +## Accessing the engine and template + +It may be desirable to access the `engine` or `template` objects from within your extension. Plates makes both of these objects available to you. The engine is automatically passed to the `register()` method, and the template is assigned as a parameter on each function call. + +~~~ php +use League\Plates\Engine; +use League\Plates\Extension\ExtensionInterface; + +class MyExtension implements ExtensionInterface +{ + protected $engine; + public $template; // must be public + + public function register(Engine $engine) + { + $this->engine = $engine; + + // Access template data: + $data = $this->template->data(); + + // Register functions + // ... + } +} +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/engine/file-extensions.md b/vendor/league/plates/docs/engine/file-extensions.md new file mode 100644 index 00000000..613bccf4 --- /dev/null +++ b/vendor/league/plates/docs/engine/file-extensions.md @@ -0,0 +1,36 @@ +--- +layout: default +permalink: engine/file-extensions/ +title: File extensions +--- + +File extensions +=============== + +Plates does not enforce a specific template file extension. By default it assumes `.php`. This file extension is automatically appended to your template names when rendered. You are welcome to change the default extension using one of the following methods. + +## Constructor method + +~~~ php +// Create new engine and set the default file extension to ".tpl" +$template = new League\Plates\Engine('/path/to/templates', 'tpl'); +~~~ + +## Setter method + +~~~ php +// Sets the default file extension to ".tpl" after engine instantiation +$template->setFileExtension('tpl'); +~~~ + +## Manually assign + +If you prefer to manually set the file extension, simply set the default file extension to `null`. + +~~~ php +// Disable automatic file extensions +$template->setFileExtension(null); + +// Render template +echo $templates->render('home.php'); +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/engine/folders.md b/vendor/league/plates/docs/engine/folders.md new file mode 100644 index 00000000..7991bfcd --- /dev/null +++ b/vendor/league/plates/docs/engine/folders.md @@ -0,0 +1,50 @@ +--- +layout: default +permalink: engine/folders/ +title: Folders +--- + +Folders +======= + +Folders make it really easy to organize and access your templates. Folders allow you to group your templates under different namespaces, each of which having their own file system path. + +## Creating folders + +To create folders, use the `addFolder()` method: + +~~~ php +// Create new Plates instance +$templates = new League\Plates\Engine(); + +// Add folders +$templates->addFolder('admin', '/path/to/admin/templates'); +$templates->addFolder('emails', '/path/to/email/templates'); +~~~ + +## Using folders + +To use the folders you created within your project simply append the folder name with two colons before the template name. For example, to render a welcome email: + +~~~ php +$email = $templates->render('emails::welcome'); +~~~ + +This works with template functions as well, such as layouts or nested templates. For example: + +~~~ php +layout('shared::template') ?> +~~~ + +## Folder fallbacks + +When enabled, if a folder template is missing, Plates will automatically fallback and look for a template with the **same** name in the default folder. This can be helpful when using folders to manage themes. To enable fallbacks, simply pass `true` as the third parameter in the `addFolders()` method. + +~~~ php +// Create new Plates engine +$templates = new \League\Plates\Engine('/path/to/default/theme'); + +// Add themes +$templates->addFolder('theme1', '/path/to/theme/1', true); +$templates->addFolder('theme2', '/path/to/theme/2', true); +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/engine/functions.md b/vendor/league/plates/docs/engine/functions.md new file mode 100644 index 00000000..b677ec57 --- /dev/null +++ b/vendor/league/plates/docs/engine/functions.md @@ -0,0 +1,34 @@ +--- +layout: default +permalink: engine/functions/ +title: Functions +--- + +Functions +========= + +While [extensions](/engine/extensions/) are awesome for adding additional reusable functionality to Plates, sometimes it's easier to just create a one-off function for a specific use case. Plates makes this easy to do. + +## Registering functions + +~~~ php +// Create new Plates engine +$templates = new \League\Plates\Engine('/path/to/templates'); + +// Register a one-off function +$templates->registerFunction('uppercase', function ($string) { + return strtoupper($string); +}); +~~~ + +To use this function in a template, simply call it like any other function: + +~~~ php +

Hello e($this->uppercase($name))

+~~~ + +It can also be used in a [batch](/templates/functions/#batch-function-calls) compatible function: + +~~~ php +

Hello e($name, 'uppercase')

+~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/engine/index.md b/vendor/league/plates/docs/engine/index.md new file mode 100644 index 00000000..6d428796 --- /dev/null +++ b/vendor/league/plates/docs/engine/index.md @@ -0,0 +1,56 @@ +--- +layout: default +permalink: engine/ +title: The Engine +--- + +The Engine +========== + +Plates uses a central object called the `Engine`, which is used to store the environment configuration, functions and extensions. It helps decouple your templates from the file system and other dependencies. For example, if you want to change the folder where your templates are stored, you can do so by simply changing the path in one location. + +## Basic usage + +~~~ php +// Create new Plates engine +$templates = new League\Plates\Engine('/path/to/templates'); + +// Add any any additional folders +$templates->addFolder('emails', '/path/to/emails'); + +// Load any additional extensions +$templates->loadExtension(new League\Plates\Extension\Asset('/path/to/public')); + +// Create a new template +$template = $templates->make('emails::welcome'); +~~~ + +## Dependency Injection + +Plates is designed to be easily passed around your application and easily injected in your controllers or other application objects. Simply pass an instance of the `Engine` to any consuming objects, and then use either the `make()` method to create a new template, or the `render()` method to render it immediately. For example: + +~~~ php +class Controller +{ + private $templates; + + public function __construct(League\Plates\Engine $templates) + { + $this->templates = $templates; + } + + // Create a template object + public function getIndex() + { + $template = $this->templates->make('home'); + + return $template->render(); + } + + // Render a template directly + public function getIndex() + { + return $this->templates->render('home'); + } +} +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/extensions/asset.md b/vendor/league/plates/docs/extensions/asset.md new file mode 100644 index 00000000..6a1d40e6 --- /dev/null +++ b/vendor/league/plates/docs/extensions/asset.md @@ -0,0 +1,59 @@ +--- +layout: default +permalink: extensions/asset/ +title: Asset extension +--- + +Asset +===== + +The asset extension can be used to quickly create "cache busted" asset URLs in your templates. This is particularly helpful for aggressively cached files that can potentially change in the future, such as CSS files, JavaScript files and images. It works by appending the timestamp of the file's last update to its URL. For example, `/css/all.css` becomes `/css/all.1373577602.css`. As long as the file does not change, the timestamp remains the same and caching occurs. However, if the file is changed, a new URL is automatically generated with a new timestamp, and visitors receive the new file. + +## Installing the asset extension + +The asset extension comes packaged with Plates but is not enabled by default, as it requires extra parameters passed to it at instantiation. + +~~~ php +// Load asset extension +$engine->loadExtension(new League\Plates\Extension\Asset('/path/to/public/assets/', true)); +~~~ + +The first constructor parameter is the file system path of the assets directory. The second is an optional `boolean` parameter that if set to true uses the filename caching method (ie. `file.1373577602.css`) instead of the default query string method (ie. `file.css?v=1373577602`). + +## Filename caching + +To make filename caching work, some URL rewriting is required: + +### Apache example +~~~ php + + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L] + +~~~ + +### Nginx example + +~~~ php +location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ { + try_files $uri $1.$2; +} +~~~ + +## Using the asset extension + +~~~ php + + + Asset Extension Example + + + + + + + + + +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/extensions/uri.md b/vendor/league/plates/docs/extensions/uri.md new file mode 100644 index 00000000..e18c2060 --- /dev/null +++ b/vendor/league/plates/docs/extensions/uri.md @@ -0,0 +1,83 @@ +--- +layout: default +permalink: extensions/uri/ +title: URI extension +--- + +URI +=== + +The URI extension is designed to make URI checks within templates easier. The most common use is marking the current page in a menu as "selected". It only has one function, `uri()`, but can do a number of helpful tasks depending on the parameters passed to it. + +## Installing the URI extension + +The URI extension comes packaged with Plates but is not enabled by default, as it requires an extra parameter passed to it at instantiation. + +~~~ php +// Load URI extension using global variable +$engine->loadExtension(new League\Plates\Extension\URI($_SERVER['PATH_INFO'])); + +// Load URI extension using a HttpFoundation's request object +$engine->loadExtension(new League\Plates\Extension\URI($request->getPathInfo())); +~~~ + +## URI example + +~~~ php +
    +
  • uri('/', 'class="selected"')?>>Home
  • +
  • uri('/about', 'class="selected"')?>>About
  • +
  • uri('/products', 'class="selected"')?>>Products
  • +
  • uri('/contact', 'class="selected"')?>>Contact
  • +
+~~~ + +## Using the URI extension + +Get the whole URI. + +~~~ php +uri()?> +~~~ + +Get a specified segment of the URI. + +~~~ php +uri(1)?> +~~~ + +Check if a specific segment of the URI (first parameter) equals a given string (second parameter). Returns `true` on success or `false` on failure. + +~~~ php +uri(1, 'home')): ?> +~~~ + +Check if a specific segment of the URI (first parameter) equals a given string (second parameter). Returns string (third parameter) on success or `false` on failure. + +~~~ php +uri(1, 'home', 'success')?> +~~~ + +Check if a specific segment of the URI (first parameter) equals a given string (second parameter). Returns string (third parameter) on success or string (fourth parameter) on failure. + +~~~ php +uri(1, 'home', 'success', 'fail')?> +~~~ + +Check if a regular expression string matches the current URI. Returns `true` on success or `false` on failure. + +~~~ php +uri('/home')): ?> +~~~ + +Check if a regular expression string (first parameter) matches the current URI. Returns string (second parameter) on success or `false` on failure. + +~~~ php +uri('/home', 'success')?> +~~~ + +Check if a regular expression string (first parameter) matches the current URI. Returns string (second parameter) on success or string (third parameter) on failure. + +~~~ php +uri('/home', 'success', 'fail')?> +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/favicon.ico b/vendor/league/plates/docs/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..44d7f3ff4a36a12c417cc785bed908b3a67f4148 GIT binary patch literal 6518 zcmeI0ONbm*6oyN|eHJccGU&ie_w+oHuIhSpSIrE@g%|~+h=L2j$HE7WLRK0TA>xDJ zgD^%!7ZQ9fd@EU~Br8z_7YZ(Pp#~LEQE_21jM&;Q?h z?zy+`tspofI5QX<3v?d~T4x7AGYEn$Tl(*31;H-aTCxce?9c^n(62pyjvHRX91LsV zRIPy#7foI4lJ;JgC9k?(?-Q5Leea5e6jws zZ`SB|z0KW;O~ZW-u1(k1#JMh>y;-{7Zm65j|0>^CmIwOlFKqZ$bF$h-xZ>GcTwC0O z+p*Op+wW8!e=v@G?q}Cc4=I=TyUxrtE}AUw`$xk4?hIJnVAtFE7H-(xuHCH9bN3DHuW$_Ej z)#r*?wz$pYd=;~7v2egu_IcDa(DJ(e9dpV=y509xV^1sYF4gq4 z%HJiz8-gUf17gW3h1D=13YH&^Ye0T;LCzq4IjA z`f;mje6LHRC9C@^KBycW?9YKE^ML_NOv$a<7Z;r6+&*sk@Vfq<&;6t^dO+hgW_>}Y zo4u=;a_%w))NMC=Pns|GH4hjs^AH<8Fn+vj4G{-ibU3=A`H`e%Ueg!*)7UkLv%-wDHJM|1Ky@_E^+D=tA9Z zmw!q4m+XwpIhki{_)5&8&J>5M_;~gP?W;bP?TB&5vp3m!)6Nc@A2^@NhAtSe@yzvA zd=@`%7|uf0_u^|ilb-MmMK;R;XE5;*Ph&~B literal 0 HcmV?d00001 diff --git a/vendor/league/plates/docs/index.md b/vendor/league/plates/docs/index.md new file mode 100644 index 00000000..3c342719 --- /dev/null +++ b/vendor/league/plates/docs/index.md @@ -0,0 +1,40 @@ +--- +layout: default +permalink: / +title: Introduction +--- + +Introduction +============ + +[![Author](http://img.shields.io/badge/author-@reinink-blue.svg?style=flat-square)](https://twitter.com/reinink) +[![Source Code](http://img.shields.io/badge/source-league/plates-blue.svg?style=flat-square)](https://github.com/thephpleague/plates) +[![Latest Version](https://img.shields.io/github/release/thephpleague/plates.svg?style=flat-square)](https://github.com/thephpleague/plates/releases) +[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/thephpleague/plates/blob/master/LICENSE)
+[![Build Status](https://img.shields.io/travis/thephpleague/plates/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/plates) +[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/plates.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/plates/code-structure) +[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/plates.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/plates) +[![Total Downloads](https://img.shields.io/packagist/dt/league/plates.svg?style=flat-square)](https://packagist.org/packages/league/plates) + +## About + +Plates is a native PHP template system that's fast, easy to use and easy to extend. It's inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and strives to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled template languages, such as Twig or Smarty. + +## Highlights + +- Native PHP templates, no new [syntax](/templates/syntax/) to learn +- Plates is a template system, not a template language +- Plates encourages the use of existing PHP functions +- Increase code reuse with template [layouts](/templates/layouts/) and [inheritance](/templates/inheritance/) +- Template [folders](/engine/folders/) for grouping templates into namespaces +- [Data](/templates/data/#preassigned-and-shared-data) sharing across templates +- Preassign [data](/templates/data/#preassigned-and-shared-data) to specific templates +- Built-in [escaping](/templates/escaping/) helpers +- Easy to extend using [functions](/engine/functions/) and [extensions](/engine/extensions/) +- Framework-agnostic, will work with any project +- Decoupled design makes templates easy to test +- Composer ready and PSR-2 compliant + +## Questions? + +Plates was created by [Jonathan Reinink](https://twitter.com/reinink). Submit issues to [Github](https://github.com/thephpleague/plates/issues). diff --git a/vendor/league/plates/docs/installation.md b/vendor/league/plates/docs/installation.md new file mode 100644 index 00000000..ba7a2b63 --- /dev/null +++ b/vendor/league/plates/docs/installation.md @@ -0,0 +1,35 @@ +--- +layout: default +permalink: installation/ +title: Installation +--- + +Installation +============ + +## Using Composer + +Plates is available on [Packagist](https://packagist.org/packages/league/plates) and can be installed using [Composer](https://getcomposer.org/). This can be done by running the following command or by updating your `composer.json` file. + +~~~ bash +composer require league/plates +~~~ + +
composer.json
+~~~ javascript +{ + "require": { + "league/plates": "3.*" + } +} +~~~ + +Be sure to also include your Composer autoload file in your project: + +~~~ php +require 'vendor/autoload.php'; +~~~ + +## Downloading .zip file + +This project is also available for download as a `.zip` file on GitHub. Visit the [releases page](https://github.com/thephpleague/plates/releases), select the version you want, and click the "Source code (zip)" download button. \ No newline at end of file diff --git a/vendor/league/plates/docs/logo.png b/vendor/league/plates/docs/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..19cf68a7c3e56530df929a59942768f58abf1deb GIT binary patch literal 2306 zcmaJ@dpwi-A74oq6;7y=RL?dd(&m~J(k>5MyV_>tH}#WfqfqITE-JT^ zO6BNs`iV+NDZMIk%Q`WsLk-=WqhI}=b<+9$@$2`zp6B^~zn|Cp{r+74_-aE~tLB>7 znjsK~xq$)nFnD!`Kc|_~;r~^6#Ts~7sANPb!=>@cWVReaPZ;Fh~6+%jY10@I~6qKRn8VV5bD5!OK zrW;e{2k`{~sd6Yhl@-BF6>>>Dl0De+A1mLkA7_J)#0t5mU^u!Ygpex|+2D;ZVi z3a(rrQwpRKz^KUPNRyNl6ddVaDTrm?WF?BPWr7QaOJU1!AlA*8(j<_{{Qpp~_#0ZG z41@lT_kRj2BDTmNTo|N~Cds*QM)1@ZjlQZeu)X|mw^v3Pw~?<<%0 z{aA?K<>KIAaK_gDSF0yY@cbCJ-v$>xd>eg80?)e~9_$Fl;`<1MDO>?+L`wH?p+Hoy z);cR;wLnNc-}G>*X^HqEzs)v?0c>LQPhGB!ep0EuvD6kXp?-X3k<7FQk+ywV(GgD^ z{HZw&kqqsjrmzzMmS^ zo#&;=Y1HQr4x1!vjxjREV?R1~GdxZoeZfu?bvSC(;MyautRE7xi!}wGgVb1^<;7`> zY&B)|yZfkN%lMzOgByM>&b4@LQJs0%8EbPuJBl<^wf$rDRo1B`=Jsc|1zWi^EKHxV zS3g|RhnA~>dz(ckQVx3Vn(^t=>0bleqJc;6`h*~1#L=aBu+hY?6r^BYm$s^VTw1GR zV&>1=G4S*b(waUeE^@liq^P5rA z_eo0{)T5gNSms#+zqP2lX>P6xZY}UfSq%uw_nRCTeE)N${^zxiqStz*RT)c~vcxoA&gY@XpWHGsIysws&mR~cX^g^HXk1#X>NBu0p5|8nxTW2&_S5|_)Ei!?LVsGo+~6Liyc@A z?eYmy+574q--o{oiG$-_4&nJ@9Z|EQfXg9ES=?HOpZ0AFt*z5+jT^Q}okFeQ+}Aq2 zH$T^TxRxe`M%oqpoI|0Jw=QdkeA+|B>BPcc+72HHTyb}C>E=Bx8Eo#tU9XR?)t8lE zntS^g9T)qoySRO)G#+mqRRWWqy25^Ov4vDwzV}~c))RBge1~&?qg3rE-*;hU(W9K5 zov91*#l8DuJm2z;+HHw`vEh|2!r<6pRaA1NwEXbvKa`cU++Ww%s-H%-+PB0a)Q|gF z#chdQ=g}dvRY=*2@H9dkIscMX>_zkRPRo-=QCM{R1^_?DPI&ab{A#aFsD7XGm|)t= z;P;8EUJMsq=Sf#yYp?F<{ozi1ZtaH$^&K04M!L^!s|-WVWkFiSMxve`P!MyjEGw`e z*At5pO^b0kJJL{Q>fK>eQ~7rGoa>u>KbvXCOw5!9gvupcm#`0fLwkN;ZgUUj$IlyG zGBmGzu&f~tVprHmN#vGqJyGr z$Mz)CBMan-viyYuwl@i?H1v$i$LpEBg?pY_u9~`VR_UsVxPMMTJU*DczXIGdYP^*M MGFbGpv`yRp1F-VQdH?_b literal 0 HcmV?d00001 diff --git a/vendor/league/plates/docs/simple-example.md b/vendor/league/plates/docs/simple-example.md new file mode 100644 index 00000000..35f9b71d --- /dev/null +++ b/vendor/league/plates/docs/simple-example.md @@ -0,0 +1,54 @@ +--- +layout: default +permalink: simple-example/ +title: Simple example +--- + +Simple example +============== + +Here is a simple example of how to use Plates. We will assume the following directory stucture: + +~~~ +`-- path + `-- to + `-- templates + |-- template.php + |-- profile.php +~~~ + +## Within your controller + +~~~ php +// Create new Plates instance +$templates = new League\Plates\Engine('/path/to/templates'); + +// Render a template +echo $templates->render('profile', ['name' => 'Jonathan']); +~~~ + +## The page template + +
profile.php
+~~~ php +layout('template', ['title' => 'User Profile']) ?> + +

User Profile

+

Hello, e($name)?>

+~~~ + +## The layout template + +
template.php
+~~~ php + + + <?=$this->e($title)?> + + + +section('content')?> + + + +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/data.md b/vendor/league/plates/docs/templates/data.md new file mode 100644 index 00000000..33bfb2aa --- /dev/null +++ b/vendor/league/plates/docs/templates/data.md @@ -0,0 +1,61 @@ +--- +layout: default +permalink: templates/data/ +title: Data +--- + +Data +==== + +It's very common to share application data (variables) with a template. Data can be whatever you want: strings, arrays, objects, etc. Plates allows you set both template specific data as well as shared template data. + +## Assign data + +Assigning data is done from within your application code, such as a controller. There are a number of ways to assign the data, depending on how you structure your objects. + +~~~ php +// Create new Plates instance +$templates = new League\Plates\Engine('/path/to/templates'); + +// Assign via the engine's render method +echo $templates->render('profile', ['name' => 'Jonathan']); + +// Assign via the engine's make method +$template = $templates->make('profile', ['name' => 'Jonathan']); + +// Assign directly to a template object +$template = $templates->make('profile'); +$template->data(['name' => 'Jonathan']); +~~~ + +## Accessing data + +Template data is available as locally scoped variables at the time of rendering. Continuing with the example above, here is how you would [escape](/templates/escaping/) and output the "name" value in a template: + +~~~ php +

Hello e($name)?>

+~~~ + +

Prior to Plates 3.0, variables were accessed using the $this pseudo-variable. This is no longer possible. Use the locally scoped variables instead.

+ +## Preassigned and shared data + +If you have data that you want assigned to a specific template each time that template is rendered throughout your application, the `addData()` function can help organize that code in one place. + +~~~ php +$templates->addData(['name' => 'Jonathan'], 'emails::welcome'); +~~~ + +You can pressaign data to more than one template by passing an array of templates: + +~~~ php +$templates->addData(['name' => 'Jonathan'], ['login', 'template']); +~~~ + +To assign data to ALL templates, simply omit the second parameter: + +~~~ php +$templates->addData(['name' => 'Jonathan']); +~~~ + +Keep in mind that shared data is assigned to a template when it's first created, meaning any conflicting data assigned that's afterwards to a specific template will overwrite the shared data. This is generally desired behavior. \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/escaping.md b/vendor/league/plates/docs/templates/escaping.md new file mode 100644 index 00000000..4dcd2f62 --- /dev/null +++ b/vendor/league/plates/docs/templates/escaping.md @@ -0,0 +1,50 @@ +--- +layout: default +permalink: templates/escaping/ +title: Escaping +--- + +Escaping +======== + +Escaping is a form of [data filtering](http://www.phptherightway.com/#data_filtering) which sanitizes unsafe, user supplied input prior to outputting it as HTML. Plates provides two shortcuts to the `htmlspecialchars()` function. + +## Escaping example + +~~~ php +

Hello, escape($name)?>

+ + +

Hello, e($name)?>

+~~~ + +## Batch function calls + +The escape functions also support [batch](/templates/functions/#batch-function-calls) function calls, which allow you to apply multiple functions, including native PHP functions, to a variable at one time. + +~~~ php +

Welcome e($name, 'strip_tags|strtoupper')?>

+~~~ + +## Escaping HTML attributes + +

It's VERY important to always double quote HTML attributes that contain escaped variables, otherwise your template will still be open to injection attacks.

+ +Some [libraries](http://framework.zend.com/manual/2.1/en/modules/zend.escaper.escaping-html-attributes.html) go as far as having a special function for escaping HTML attributes. However, this is somewhat redundant considering that if a developer forgets to properly quote an HTML attribute, they will likely also forget to use this special function. Here is how you properly escape HTML attributes: + +~~~ php + +<?=$this->e($name)?> + + +<?=$this->e($name)?> + + +<?=$this-e($name)?>> +~~~ + +## Automatic escaping + +Probably the biggest drawbacks to native PHP templates is the inability to auto-escape variables properly. Template languages like Twig and Smarty can identify "echoed" variables during a parsing stage and automatically escape them. This cannot be done in native PHP as the language does not offer overloading functionality for it's output functions (ie. `print` and `echo`). + +Don't worry, escaping can still be done safely, it just means you are responsible for manually escaping each variable on output. Consider creating a snippet for one of the above, built-in escaping functions to make this process easier. \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/functions.md b/vendor/league/plates/docs/templates/functions.md new file mode 100644 index 00000000..234d9cf1 --- /dev/null +++ b/vendor/league/plates/docs/templates/functions.md @@ -0,0 +1,47 @@ +--- +layout: default +permalink: templates/functions/ +title: Functions +--- + +Functions +========= + +Template functions in Plates are accessed using the `$this` pseudo-variable. + +~~~ php +

Hello, escape($name)?>

+~~~ + + +## Custom fuctions + +In addition to the functions included with Plates, it's also possible to add [one-off functions](/engine/functions/), or even groups of functions, known as [extensions](/engine/extensions/). + +## Batch function calls + +Sometimes you need to apply more than function to a variable in your templates. This can become somewhat illegible. The `batch()` function helps by allowing you to apply multiple functions, including native PHP functions, to a variable at one time. + +~~~ php + +

Welcome escape(strtoupper(strip_tags($name)))?>

+ + +

Welcome batch($name, 'strip_tags|strtoupper|escape')?>

+~~~ + +The [escape](/templates/escaping/) functions also support batch function calls. + +~~~ php +

Welcome e($name, 'strip_tags|strtoupper')?>

+~~~ + +The batch functions works well for "piped" functions that accept one parameter, modify it, and then return it. It's important to note that they execute functions left to right and will favour extension functions over native PHP functions if there are conflicts. + +~~~ php + +batch('Jonathan', 'escape|strtolower|strtoupper')?> + + +batch('Jonathan', 'escape|strtoupper|strtolower')?> +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/index.md b/vendor/league/plates/docs/templates/index.md new file mode 100644 index 00000000..f08f1469 --- /dev/null +++ b/vendor/league/plates/docs/templates/index.md @@ -0,0 +1,73 @@ +--- +layout: default +permalink: templates/ +title: Templates +--- + +Templates +========= + +Plates templates are very simple PHP objects. Generally you'll want to create these using the two factory methods, `make()` and `render()`, in the [engine](/engine/). For example: + +~~~ php +// Create new Plates instance +$templates = new League\Plates\Engine('/path/to/templates'); + +// Render a template in a subdirectory +echo $templates->render('partials/header'); + +// Render a template +echo $templates->render('profile', ['name' => 'Jonathan']); +~~~ + +For more information about how Plates is designed to be easily added to your application, see the section on [dependency injection](/engine/#dependency-injection). + +## Manually creating templates + +It's also possible to create templates manually. The only dependency they require is an instance of the [engine](/engine/) object. For example: + +~~~ php +// Create new Plates instance +$templates = new League\Plates\Engine('/path/to/templates'); + +// Create a new template +$template = new League\Plates\Template\Template($templates, 'profile'); + +// Render the template +echo $template->render(['name' => 'Jonathan']); + +// You can also render the template using the toString() magic method +echo $template; +~~~ + +## Check if a template exists + +When dynamically loading templates, you may need to check if they exist. This can be done using the engine's `exists()` method: + +~~~ php +if ($templates->exists('articles::beginners_guide')) { + // It exists! +} +~~~ + +You can also run this check on an existing template: + +~~~ php +if ($template->exists()) { + // It exists! +} +~~~ + +## Get a template path + +To get a template path from its name, use the engine's `path()` method: + +~~~ php +$path = $templates->path('articles::beginners_guide'); +~~~ + +You can also get the path from an existing template: + +~~~ php +$path = $template->path(); +~~~ diff --git a/vendor/league/plates/docs/templates/inheritance.md b/vendor/league/plates/docs/templates/inheritance.md new file mode 100644 index 00000000..9b0f211a --- /dev/null +++ b/vendor/league/plates/docs/templates/inheritance.md @@ -0,0 +1,63 @@ +--- +layout: default +permalink: templates/inheritance/ +title: Inheritance +--- + +Inheritance +=========== + +By combining [layouts](/templates/layouts/) and [sections](/templates/sections/), Plates allows you to "build up" your pages using predefined sections. This is best understand using an example: + + +## Inheritance example + +The following example illustrates a pretty standard website. Start by creating a site template, which includes your header and footer as well as any predefined content [sections](/templates/sections/). Notice how Plates makes it possible to even set default section content, in the event that a page doesn't define it. + +
template.php
+~~~ php + + + <?=$this->e($title)?> + + + + + +
+ section('page')?> +
+ + + + + +~~~ + +With the template defined, any page can now "implement" this [layout](/templates/layouts/). Notice how each section of content is defined between the `start()` and `end()` functions. + +
profile.php
+~~~ php +layout('template', ['title' => 'User Profile']) ?> + +start('page') ?> +

Welcome!

+

Hello e($name)?>

+stop() ?> + +start('sidebar') ?> + +stop() ?> +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/layouts.md b/vendor/league/plates/docs/templates/layouts.md new file mode 100644 index 00000000..63c871df --- /dev/null +++ b/vendor/league/plates/docs/templates/layouts.md @@ -0,0 +1,102 @@ +--- +layout: default +permalink: templates/layouts/ +title: Layouts +--- + +Layouts +======= + +The `layout()` function allows you to define a layout template that a template will implement. It's like having separate header and footer templates in one file. + +## Define a layout + +The `layout()` function can be called anywhere in a template, since the layout template is actually rendered second. Typically it's placed at the top of the file. + +~~~ php +layout('template') ?> + +

User Profile

+

Hello, e($name)?>

+~~~ + +This function also works with [folders](/engine/folders/): + +~~~ php +layout('shared::template') ?> +~~~ + +## Assign data + +To assign data (variables) to a layout template, pass them as an array to the `layout()` function. This data will then be available as locally scoped variables within the layout template. + +~~~ php +layout('template', ['title' => 'User Profile']) ?> +~~~ + +## Accessing the content + +To access the rendered template content within the layout, use the `section()` function, passing `'content'` as the section name. This will return all outputted content from the template that hasn't been defined in a [section](/templates/sections/). + +~~~ php + + + <?=$this->e($title)?> + + + +section('content')?> + + + +~~~ + +## Stacked layouts + +Plates allows stacking of layouts, allowing even further simplification and organization of templates. Instead of just using one main layout, it's possible to break templates into more specific layouts, which themselves implement a main layout. Consider this example: + +### The main site layout + +
template.php
+~~~ php + + + <?=$this->e($title)?> + + + +section('content')?> + + + +~~~ + +### The blog layout + +
blog.php
+~~~ php +layout('template') ?> + +

The Blog

+ +
+
+ section('content')?> +
+ +
+~~~ + +### A blog article + +
blog-article.php
+~~~ php +layout('blog', ['title' => $article->title]) ?> + +

e($article->title)?>

+
+ e($article->content)?> +
+~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/nesting.md b/vendor/league/plates/docs/templates/nesting.md new file mode 100644 index 00000000..bc60aeb9 --- /dev/null +++ b/vendor/league/plates/docs/templates/nesting.md @@ -0,0 +1,44 @@ +--- +layout: default +permalink: templates/nesting/ +title: Nesting +--- + +Nesting +======= + +Including another template into the current template is done using the `insert()` function: + +~~~ php +insert('partials/header') ?> + +

Your content.

+ +insert('partials/footer') ?> +~~~ + +The `insert()` function also works with [folders](/engine/folders/): + +~~~ php +insert('partials::header') ?> +~~~ + +## Alternative syntax + +The `insert()` function automatically outputs the rendered template. If you prefer to manually output the response, use the `fetch()` function instead: + +~~~ php +fetch('partials/header')?> +~~~ + +## Assign data + +To assign data (variables) to a nested template, pass them as an array to the `insert()` or `fetch()` functions. This data will then be available as locally scoped variables within the nested template. + +~~~ php +insert('partials/header', ['name' => 'Jonathan']) ?> + +

Your content.

+ +insert('partials/footer') ?> +~~~ \ No newline at end of file diff --git a/vendor/league/plates/docs/templates/sections.md b/vendor/league/plates/docs/templates/sections.md new file mode 100644 index 00000000..a5cadcd3 --- /dev/null +++ b/vendor/league/plates/docs/templates/sections.md @@ -0,0 +1,80 @@ +--- +layout: default +permalink: templates/sections/ +title: Sections +--- + +Sections +======== + +The `start()` and `stop` functions allow you to build sections (or blocks) of content within your template, and instead of them being rendered directly, they are saved for use elsewhere. For example, in your [layout](/templates/layouts/) template. + +## Creating sections + +You define the name of the section with the `start()` function. To end a section call the `stop()` function. + +~~~ php +start('welcome') ?> + +

Welcome!

+

Hello e($name)?>

+ +stop() ?> +~~~ + +## Stacking section content + +By default, when you render a section its content will overwrite any existing content for that section. However, it's possible to append (or stack) the content instead using the `push()` method. This can be useful for specifying any JavaScript libraries required by your child views. + +~~~ php +push('scripts') ?> + +end() ?> +~~~ + +

The end() function is simply an alias of stop(). These functions can be used interchangeably.

+ +## Accessing section content + +Access rendered section content using the name you assigned in the `start()` method. This variable can be accessed from the current template and layout templates using the `section()` function. + +~~~ php +section('welcome')?> +~~~ + +

Prior to Plates 3.0, accessing template content was done using either the content() or child() functions. For consistency with sections, this is no longer possible.

+ +## Default section content + +In situations where a page doesn't implement a particular section, it's helpful to assign default content. There are a couple ways to do this: + +### Defining it inline + +If the default content can be defined in a single line of code, it's best to simply pass it as the second parameter of the `content()` function. + +~~~ php + +~~~ + +### Use an if statement + +If the default content requires more than a single line of code, it's best to use a simple if statement to check if a section exists, and otherwise display the default. + +~~~ php + +~~~ + diff --git a/vendor/league/plates/docs/templates/syntax.md b/vendor/league/plates/docs/templates/syntax.md new file mode 100644 index 00000000..c2a78e9c --- /dev/null +++ b/vendor/league/plates/docs/templates/syntax.md @@ -0,0 +1,50 @@ +--- +layout: default +permalink: templates/syntax/ +title: Syntax +--- + +Syntax +====== + +While the actual syntax you use in your templates is entirely your choice (it's just PHP after all), we suggest the following syntax guidelines to help keep templates clean and legible. + +## Guidelines + +- Always use HTML with inline PHP. Never use blocks of PHP. +- Always escape potentially dangerous variables prior to outputting using the built-in escape functions. More on escaping [here](/templates/escaping/). +- Always use the short echo syntax (`layout('template', ['title' => 'User Profile']) ?> + +

Welcome!

+

Hello e($name)?>

+ +

Friends

+ + + +

Invitations

+

You have some friend invites!

+ +~~~ diff --git a/vendor/league/plates/example/example.php b/vendor/league/plates/example/example.php new file mode 100644 index 00000000..aaffe052 --- /dev/null +++ b/vendor/league/plates/example/example.php @@ -0,0 +1,12 @@ +addData(['company' => 'The Company Name'], 'layout'); + +// Render a template +echo $templates->render('profile', ['name' => 'Jonathan']); diff --git a/vendor/league/plates/example/templates/layout.php b/vendor/league/plates/example/templates/layout.php new file mode 100644 index 00000000..5b5847cf --- /dev/null +++ b/vendor/league/plates/example/templates/layout.php @@ -0,0 +1,12 @@ + + + <?=$this->e($title)?> | <?=$this->e($company)?> + + + +section('content')?> + +section('scripts')?> + + + \ No newline at end of file diff --git a/vendor/league/plates/example/templates/profile.php b/vendor/league/plates/example/templates/profile.php new file mode 100644 index 00000000..0797e463 --- /dev/null +++ b/vendor/league/plates/example/templates/profile.php @@ -0,0 +1,12 @@ +layout('layout', ['title' => 'User Profile']) ?> + +

User Profile

+

Hello, e($name)?>!

+ +insert('sidebar') ?> + +push('scripts') ?> + +end() ?> \ No newline at end of file diff --git a/vendor/league/plates/example/templates/sidebar.php b/vendor/league/plates/example/templates/sidebar.php new file mode 100644 index 00000000..13d9ea83 --- /dev/null +++ b/vendor/league/plates/example/templates/sidebar.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/vendor/league/plates/phpunit.xml.dist b/vendor/league/plates/phpunit.xml.dist new file mode 100644 index 00000000..aae18548 --- /dev/null +++ b/vendor/league/plates/phpunit.xml.dist @@ -0,0 +1,20 @@ + + + + + tests/ + + + + + src/ + + + + + + + + + + diff --git a/vendor/league/plates/src/Engine.php b/vendor/league/plates/src/Engine.php new file mode 100644 index 00000000..6c89642b --- /dev/null +++ b/vendor/league/plates/src/Engine.php @@ -0,0 +1,279 @@ +directory = new Directory($directory); + $this->fileExtension = new FileExtension($fileExtension); + $this->folders = new Folders(); + $this->functions = new Functions(); + $this->data = new Data(); + } + + /** + * Set path to templates directory. + * @param string|null $directory Pass null to disable the default directory. + * @return Engine + */ + public function setDirectory($directory) + { + $this->directory->set($directory); + + return $this; + } + + /** + * Get path to templates directory. + * @return string + */ + public function getDirectory() + { + return $this->directory->get(); + } + + /** + * Set the template file extension. + * @param string|null $fileExtension Pass null to manually set it. + * @return Engine + */ + public function setFileExtension($fileExtension) + { + $this->fileExtension->set($fileExtension); + + return $this; + } + + /** + * Get the template file extension. + * @return string + */ + public function getFileExtension() + { + return $this->fileExtension->get(); + } + + /** + * Add a new template folder for grouping templates under different namespaces. + * @param string $name + * @param string $directory + * @param boolean $fallback + * @return Engine + */ + public function addFolder($name, $directory, $fallback = false) + { + $this->folders->add($name, $directory, $fallback); + + return $this; + } + + /** + * Remove a template folder. + * @param string $name + * @return Engine + */ + public function removeFolder($name) + { + $this->folders->remove($name); + + return $this; + } + + /** + * Get collection of all template folders. + * @return Folders + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Add preassigned template data. + * @param array $data; + * @param null|string|array $templates; + * @return Engine + */ + public function addData(array $data, $templates = null) + { + $this->data->add($data, $templates); + + return $this; + } + + /** + * Get all preassigned template data. + * @param null|string $template; + * @return array + */ + public function getData($template = null) + { + return $this->data->get($template); + } + + /** + * Register a new template function. + * @param string $name; + * @param callback $callback; + * @return Engine + */ + public function registerFunction($name, $callback) + { + $this->functions->add($name, $callback); + + return $this; + } + + /** + * Remove a template function. + * @param string $name; + * @return Engine + */ + public function dropFunction($name) + { + $this->functions->remove($name); + + return $this; + } + + /** + * Get a template function. + * @param string $name + * @return Func + */ + public function getFunction($name) + { + return $this->functions->get($name); + } + + /** + * Check if a template function exists. + * @param string $name + * @return boolean + */ + public function doesFunctionExist($name) + { + return $this->functions->exists($name); + } + + /** + * Load an extension. + * @param ExtensionInterface $extension + * @return Engine + */ + public function loadExtension(ExtensionInterface $extension) + { + $extension->register($this); + + return $this; + } + + /** + * Load multiple extensions. + * @param array $extensions + * @return Engine + */ + public function loadExtensions(array $extensions = array()) + { + foreach ($extensions as $extension) { + $this->loadExtension($extension); + } + + return $this; + } + + /** + * Get a template path. + * @param string $name + * @return string + */ + public function path($name) + { + $name = new Name($this, $name); + + return $name->getPath(); + } + + /** + * Check if a template exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + $name = new Name($this, $name); + + return $name->doesPathExist(); + } + + /** + * Create a new template. + * @param string $name + * @return Template + */ + public function make($name) + { + return new Template($this, $name); + } + + /** + * Create a new template and render it. + * @param string $name + * @param array $data + * @return string + */ + public function render($name, array $data = array()) + { + return $this->make($name)->render($data); + } +} diff --git a/vendor/league/plates/src/Extension/Asset.php b/vendor/league/plates/src/Extension/Asset.php new file mode 100644 index 00000000..91d39f66 --- /dev/null +++ b/vendor/league/plates/src/Extension/Asset.php @@ -0,0 +1,85 @@ +path = rtrim($path, '/'); + $this->filenameMethod = $filenameMethod; + } + + /** + * Register extension function. + * @param Engine $engine + * @return null + */ + public function register(Engine $engine) + { + $engine->registerFunction('asset', array($this, 'cachedAssetUrl')); + } + + /** + * Create "cache busted" asset URL. + * @param string $url + * @return string + */ + public function cachedAssetUrl($url) + { + $filePath = $this->path . '/' . ltrim($url, '/'); + + if (!file_exists($filePath)) { + throw new LogicException( + 'Unable to locate the asset "' . $url . '" in the "' . $this->path . '" directory.' + ); + } + + $lastUpdated = filemtime($filePath); + $pathInfo = pathinfo($url); + + if ($pathInfo['dirname'] === '.') { + $directory = ''; + } elseif ($pathInfo['dirname'] === '/') { + $directory = '/'; + } else { + $directory = $pathInfo['dirname'] . '/'; + } + + if ($this->filenameMethod) { + return $directory . $pathInfo['filename'] . '.' . $lastUpdated . '.' . $pathInfo['extension']; + } + + return $directory . $pathInfo['filename'] . '.' . $pathInfo['extension'] . '?v=' . $lastUpdated; + } +} diff --git a/vendor/league/plates/src/Extension/ExtensionInterface.php b/vendor/league/plates/src/Extension/ExtensionInterface.php new file mode 100644 index 00000000..0164d1ea --- /dev/null +++ b/vendor/league/plates/src/Extension/ExtensionInterface.php @@ -0,0 +1,13 @@ +uri = $uri; + $this->parts = explode('/', $this->uri); + } + + /** + * Register extension functions. + * @param Engine $engine + * @return null + */ + public function register(Engine $engine) + { + $engine->registerFunction('uri', array($this, 'runUri')); + } + + /** + * Perform URI check. + * @param null|integer|string $var1 + * @param mixed $var2 + * @param mixed $var3 + * @param mixed $var4 + * @return mixed + */ + public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null) + { + if (is_null($var1)) { + return $this->uri; + } + + if (is_numeric($var1) and is_null($var2)) { + return array_key_exists($var1, $this->parts) ? $this->parts[$var1] : null; + } + + if (is_numeric($var1) and is_string($var2)) { + return $this->checkUriSegmentMatch($var1, $var2, $var3, $var4); + } + + if (is_string($var1)) { + return $this->checkUriRegexMatch($var1, $var2, $var3); + } + + throw new LogicException('Invalid use of the uri function.'); + } + + /** + * Perform a URI segment match. + * @param integer $key + * @param string $string + * @param mixed $returnOnTrue + * @param mixed $returnOnFalse + * @return mixed + */ + protected function checkUriSegmentMatch($key, $string, $returnOnTrue = null, $returnOnFalse = null) + { + if (array_key_exists($key, $this->parts) && $this->parts[$key] === $string) { + return is_null($returnOnTrue) ? true : $returnOnTrue; + } + + return is_null($returnOnFalse) ? false : $returnOnFalse; + } + + /** + * Perform a regular express match. + * @param string $regex + * @param mixed $returnOnTrue + * @param mixed $returnOnFalse + * @return mixed + */ + protected function checkUriRegexMatch($regex, $returnOnTrue = null, $returnOnFalse = null) + { + if (preg_match('#^' . $regex . '$#', $this->uri) === 1) { + return is_null($returnOnTrue) ? true : $returnOnTrue; + } + + return is_null($returnOnFalse) ? false : $returnOnFalse; + } +} diff --git a/vendor/league/plates/src/Template/Data.php b/vendor/league/plates/src/Template/Data.php new file mode 100644 index 00000000..aa4d1e1e --- /dev/null +++ b/vendor/league/plates/src/Template/Data.php @@ -0,0 +1,93 @@ +shareWithAll($data); + } + + if (is_array($templates)) { + return $this->shareWithSome($data, $templates); + } + + if (is_string($templates)) { + return $this->shareWithSome($data, array($templates)); + } + + throw new LogicException( + 'The templates variable must be null, an array or a string, ' . gettype($templates) . ' given.' + ); + } + + /** + * Add data shared with all templates. + * @param array $data; + * @return Data + */ + public function shareWithAll($data) + { + $this->sharedVariables = array_merge($this->sharedVariables, $data); + + return $this; + } + + /** + * Add data shared with some templates. + * @param array $data; + * @param array $templates; + * @return Data + */ + public function shareWithSome($data, array $templates) + { + foreach ($templates as $template) { + if (isset($this->templateVariables[$template])) { + $this->templateVariables[$template] = array_merge($this->templateVariables[$template], $data); + } else { + $this->templateVariables[$template] = $data; + } + } + + return $this; + } + + /** + * Get template data. + * @param null|string $template; + * @return array + */ + public function get($template = null) + { + if (isset($template, $this->templateVariables[$template])) { + return array_merge($this->sharedVariables, $this->templateVariables[$template]); + } + + return $this->sharedVariables; + } +} diff --git a/vendor/league/plates/src/Template/Directory.php b/vendor/league/plates/src/Template/Directory.php new file mode 100644 index 00000000..f5de5374 --- /dev/null +++ b/vendor/league/plates/src/Template/Directory.php @@ -0,0 +1,53 @@ +set($path); + } + + /** + * Set path to templates directory. + * @param string|null $path Pass null to disable the default directory. + * @return Directory + */ + public function set($path) + { + if (!is_null($path) and !is_dir($path)) { + throw new LogicException( + 'The specified path "' . $path . '" does not exist.' + ); + } + + $this->path = $path; + + return $this; + } + + /** + * Get path to templates directory. + * @return string + */ + public function get() + { + return $this->path; + } +} diff --git a/vendor/league/plates/src/Template/FileExtension.php b/vendor/league/plates/src/Template/FileExtension.php new file mode 100644 index 00000000..57646bdd --- /dev/null +++ b/vendor/league/plates/src/Template/FileExtension.php @@ -0,0 +1,45 @@ +set($fileExtension); + } + + /** + * Set the template file extension. + * @param null|string $fileExtension + * @return FileExtension + */ + public function set($fileExtension) + { + $this->fileExtension = $fileExtension; + + return $this; + } + + /** + * Get the template file extension. + * @return string + */ + public function get() + { + return $this->fileExtension; + } +} diff --git a/vendor/league/plates/src/Template/Folder.php b/vendor/league/plates/src/Template/Folder.php new file mode 100644 index 00000000..01fcbdd2 --- /dev/null +++ b/vendor/league/plates/src/Template/Folder.php @@ -0,0 +1,109 @@ +setName($name); + $this->setPath($path); + $this->setFallback($fallback); + } + + /** + * Set the folder name. + * @param string $name + * @return Folder + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * Get the folder name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the folder path. + * @param string $path + * @return Folder + */ + public function setPath($path) + { + if (!is_dir($path)) { + throw new LogicException('The specified directory path "' . $path . '" does not exist.'); + } + + $this->path = $path; + + return $this; + } + + /** + * Get the folder path. + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set the folder fallback status. + * @param boolean $fallback + * @return Folder + */ + public function setFallback($fallback) + { + $this->fallback = $fallback; + + return $this; + } + + /** + * Get the folder fallback status. + * @return boolean + */ + public function getFallback() + { + return $this->fallback; + } +} diff --git a/vendor/league/plates/src/Template/Folders.php b/vendor/league/plates/src/Template/Folders.php new file mode 100644 index 00000000..9bf266a7 --- /dev/null +++ b/vendor/league/plates/src/Template/Folders.php @@ -0,0 +1,75 @@ +exists($name)) { + throw new LogicException('The template folder "' . $name . '" is already being used.'); + } + + $this->folders[$name] = new Folder($name, $path, $fallback); + + return $this; + } + + /** + * Remove a template folder. + * @param string $name + * @return Folders + */ + public function remove($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template folder "' . $name . '" was not found.'); + } + + unset($this->folders[$name]); + + return $this; + } + + /** + * Get a template folder. + * @param string $name + * @return Folder + */ + public function get($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template folder "' . $name . '" was not found.'); + } + + return $this->folders[$name]; + } + + /** + * Check if a template folder exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + return isset($this->folders[$name]); + } +} diff --git a/vendor/league/plates/src/Template/Func.php b/vendor/league/plates/src/Template/Func.php new file mode 100644 index 00000000..79141f46 --- /dev/null +++ b/vendor/league/plates/src/Template/Func.php @@ -0,0 +1,107 @@ +setName($name); + $this->setCallback($callback); + } + + /** + * Set the function name. + * @param string $name + * @return Func + */ + public function setName($name) + { + if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name) !== 1) { + throw new LogicException( + 'Not a valid function name.' + ); + } + + $this->name = $name; + + return $this; + } + + /** + * Get the function name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the function callback + * @param callable $callback + * @return Func + */ + public function setCallback($callback) + { + if (!is_callable($callback, true)) { + throw new LogicException( + 'Not a valid function callback.' + ); + } + + $this->callback = $callback; + + return $this; + } + + /** + * Get the function callback. + * @return callable + */ + public function getCallback() + { + return $this->callback; + } + + /** + * Call the function. + * @param Template $template + * @param array $arguments + * @return mixed + */ + public function call(Template $template = null, $arguments = array()) + { + if (is_array($this->callback) and + isset($this->callback[0]) and + $this->callback[0] instanceof ExtensionInterface + ) { + $this->callback[0]->template = $template; + } + + return call_user_func_array($this->callback, $arguments); + } +} diff --git a/vendor/league/plates/src/Template/Functions.php b/vendor/league/plates/src/Template/Functions.php new file mode 100644 index 00000000..e0e4c2c1 --- /dev/null +++ b/vendor/league/plates/src/Template/Functions.php @@ -0,0 +1,78 @@ +exists($name)) { + throw new LogicException( + 'The template function name "' . $name . '" is already registered.' + ); + } + + $this->functions[$name] = new Func($name, $callback); + + return $this; + } + + /** + * Remove a template function. + * @param string $name; + * @return Functions + */ + public function remove($name) + { + if (!$this->exists($name)) { + throw new LogicException( + 'The template function "' . $name . '" was not found.' + ); + } + + unset($this->functions[$name]); + + return $this; + } + + /** + * Get a template function. + * @param string $name + * @return Func + */ + public function get($name) + { + if (!$this->exists($name)) { + throw new LogicException('The template function "' . $name . '" was not found.'); + } + + return $this->functions[$name]; + } + + /** + * Check if a template function exists. + * @param string $name + * @return boolean + */ + public function exists($name) + { + return isset($this->functions[$name]); + } +} diff --git a/vendor/league/plates/src/Template/Name.php b/vendor/league/plates/src/Template/Name.php new file mode 100644 index 00000000..a999d74d --- /dev/null +++ b/vendor/league/plates/src/Template/Name.php @@ -0,0 +1,202 @@ +setEngine($engine); + $this->setName($name); + } + + /** + * Set the engine. + * @param Engine $engine + * @return Name + */ + public function setEngine(Engine $engine) + { + $this->engine = $engine; + + return $this; + } + + /** + * Get the engine. + * @return Engine + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Set the original name and parse it. + * @param string $name + * @return Name + */ + public function setName($name) + { + $this->name = $name; + + $parts = explode('::', $this->name); + + if (count($parts) === 1) { + $this->setFile($parts[0]); + } elseif (count($parts) === 2) { + $this->setFolder($parts[0]); + $this->setFile($parts[1]); + } else { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. ' . + 'Do not use the folder namespace separator "::" more than once.' + ); + } + + return $this; + } + + /** + * Get the original name. + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set the parsed template folder. + * @param string $folder + * @return Name + */ + public function setFolder($folder) + { + $this->folder = $this->engine->getFolders()->get($folder); + + return $this; + } + + /** + * Get the parsed template folder. + * @return string + */ + public function getFolder() + { + return $this->folder; + } + + /** + * Set the parsed template file. + * @param string $file + * @return Name + */ + public function setFile($file) + { + if ($file === '') { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. ' . + 'The template name cannot be empty.' + ); + } + + $this->file = $file; + + if (!is_null($this->engine->getFileExtension())) { + $this->file .= '.' . $this->engine->getFileExtension(); + } + + return $this; + } + + /** + * Get the parsed template file. + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Resolve template path. + * @return string + */ + public function getPath() + { + if (is_null($this->folder)) { + return $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; + } + + $path = $this->folder->getPath() . DIRECTORY_SEPARATOR . $this->file; + + if (!is_file($path) and $this->folder->getFallback() and is_file($this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file)) { + $path = $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; + } + + return $path; + } + + /** + * Check if template path exists. + * @return boolean + */ + public function doesPathExist() + { + return is_file($this->getPath()); + } + + /** + * Get the default templates directory. + * @return string + */ + protected function getDefaultDirectory() + { + $directory = $this->engine->getDirectory(); + + if (is_null($directory)) { + throw new LogicException( + 'The template name "' . $this->name . '" is not valid. '. + 'The default directory has not been defined.' + ); + } + + return $directory; + } +} diff --git a/vendor/league/plates/src/Template/Template.php b/vendor/league/plates/src/Template/Template.php new file mode 100644 index 00000000..0a88c8cf --- /dev/null +++ b/vendor/league/plates/src/Template/Template.php @@ -0,0 +1,346 @@ +engine = $engine; + $this->name = new Name($engine, $name); + + $this->data($this->engine->getData($name)); + } + + /** + * Magic method used to call extension functions. + * @param string $name + * @param array $arguments + * @return mixed + */ + public function __call($name, $arguments) + { + return $this->engine->getFunction($name)->call($this, $arguments); + } + + /** + * Alias for render() method. + * @throws \Throwable + * @throws \Exception + * @return string + */ + public function __toString() + { + return $this->render(); + } + + /** + * Assign or get template data. + * @param array $data + * @return mixed + */ + public function data(array $data = null) + { + if (is_null($data)) { + return $this->data; + } + + $this->data = array_merge($this->data, $data); + } + + /** + * Check if the template exists. + * @return boolean + */ + public function exists() + { + return $this->name->doesPathExist(); + } + + /** + * Get the template path. + * @return string + */ + public function path() + { + return $this->name->getPath(); + } + + /** + * Render the template and layout. + * @param array $data + * @throws \Throwable + * @throws \Exception + * @return string + */ + public function render(array $data = array()) + { + $this->data($data); + unset($data); + extract($this->data); + + if (!$this->exists()) { + throw new LogicException( + 'The template "' . $this->name->getName() . '" could not be found at "' . $this->path() . '".' + ); + } + + try { + $level = ob_get_level(); + ob_start(); + + include $this->path(); + + $content = ob_get_clean(); + + if (isset($this->layoutName)) { + $layout = $this->engine->make($this->layoutName); + $layout->sections = array_merge($this->sections, array('content' => $content)); + $content = $layout->render($this->layoutData); + } + + return $content; + } catch (Throwable $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } catch (Exception $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + + throw $e; + } + } + + /** + * Set the template's layout. + * @param string $name + * @param array $data + * @return null + */ + public function layout($name, array $data = array()) + { + $this->layoutName = $name; + $this->layoutData = $data; + } + + /** + * Start a new section block. + * @param string $name + * @return null + */ + public function start($name) + { + if ($name === 'content') { + throw new LogicException( + 'The section name "content" is reserved.' + ); + } + + if ($this->sectionName) { + throw new LogicException('You cannot nest sections within other sections.'); + } + + $this->sectionName = $name; + + ob_start(); + } + + /** + * Start a new append section block. + * @param string $name + * @return null + */ + public function push($name) + { + $this->appendSection = true; + + $this->start($name); + } + + /** + * Stop the current section block. + * @return null + */ + public function stop() + { + if (is_null($this->sectionName)) { + throw new LogicException( + 'You must start a section before you can stop it.' + ); + } + + if (!isset($this->sections[$this->sectionName])) { + $this->sections[$this->sectionName] = ''; + } + + $this->sections[$this->sectionName] = $this->appendSection ? $this->sections[$this->sectionName] . ob_get_clean() : ob_get_clean(); + $this->sectionName = null; + $this->appendSection = false; + } + + /** + * Alias of stop(). + * @return null + */ + public function end() + { + $this->stop(); + } + + /** + * Returns the content for a section block. + * @param string $name Section name + * @param string $default Default section content + * @return string|null + */ + public function section($name, $default = null) + { + if (!isset($this->sections[$name])) { + return $default; + } + + return $this->sections[$name]; + } + + /** + * Fetch a rendered template. + * @param string $name + * @param array $data + * @return string + */ + public function fetch($name, array $data = array()) + { + return $this->engine->render($name, $data); + } + + /** + * Output a rendered template. + * @param string $name + * @param array $data + * @return null + */ + public function insert($name, array $data = array()) + { + echo $this->engine->render($name, $data); + } + + /** + * Apply multiple functions to variable. + * @param mixed $var + * @param string $functions + * @return mixed + */ + public function batch($var, $functions) + { + foreach (explode('|', $functions) as $function) { + if ($this->engine->doesFunctionExist($function)) { + $var = call_user_func(array($this, $function), $var); + } elseif (is_callable($function)) { + $var = call_user_func($function, $var); + } else { + throw new LogicException( + 'The batch function could not find the "' . $function . '" function.' + ); + } + } + + return $var; + } + + /** + * Escape string. + * @param string $string + * @param null|string $functions + * @return string + */ + public function escape($string, $functions = null) + { + static $flags; + + if (!isset($flags)) { + $flags = ENT_QUOTES | (defined('ENT_SUBSTITUTE') ? ENT_SUBSTITUTE : 0); + } + + if ($functions) { + $string = $this->batch($string, $functions); + } + + return htmlspecialchars($string, $flags, 'UTF-8'); + } + + /** + * Alias to escape function. + * @param string $string + * @param null|string $functions + * @return string + */ + public function e($string, $functions = null) + { + return $this->escape($string, $functions); + } +} diff --git a/vendor/sergeytsalkov/meekrodb/.gitignore b/vendor/sergeytsalkov/meekrodb/.gitignore new file mode 100644 index 00000000..55317fd6 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/.gitignore @@ -0,0 +1 @@ +simpletest/test_setup.php diff --git a/vendor/sergeytsalkov/meekrodb/COPYING b/vendor/sergeytsalkov/meekrodb/COPYING new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/vendor/sergeytsalkov/meekrodb/COPYING.LESSER b/vendor/sergeytsalkov/meekrodb/COPYING.LESSER new file mode 100644 index 00000000..65c5ca88 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/vendor/sergeytsalkov/meekrodb/README.md b/vendor/sergeytsalkov/meekrodb/README.md new file mode 100644 index 00000000..a564246b --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/README.md @@ -0,0 +1,139 @@ +MeekroDB -- The Simple PHP MySQL Library +======== +Learn more: http://www.meekro.com + +MeekroDB is: + +* A PHP MySQL library that lets you **get more done with fewer lines of code**, and **makes SQL injection 100% impossible**. +* Google's #1 search result for "php mysql library" for over 2 years, with **thousands of deployments worldwide**. +* A library with a **perfect security track record**. No bugs relating to security or SQL injection have ever been discovered. + +Installation +======== +When you're ready to get started, see the [Quick Start Guide](http://www.meekro.com/quickstart.php) on our website. + +### Manual Setup +Include the `db.class.php` file into your project and set it up like this: + + require_once 'db.class.php'; + DB::$user = 'my_database_user'; + DB::$password = 'my_database_password'; + DB::$dbName = 'my_database_name'; + +### Composer +Add this to your `composer.json` + + { + "require": { + "sergeytsalkov/meekrodb": "*" + } + } + +Code Examples +======== +### Grab some rows from the database and print out a field from each row. + + $accounts = DB::query("SELECT * FROM accounts WHERE type = %s AND age > %i", $type, 15); + foreach ($accounts as $account) { + echo $account['username'] . "\n"; + } + +### Insert a new row. + + DB::insert('mytable', array( + 'name' => $name, + 'rank' => $rank, + 'location' => $location, + 'age' => $age, + 'intelligence' => $intelligence + )); + +### Grab one row or field + + $account = DB::queryFirstRow("SELECT * FROM accounts WHERE username=%s", 'Joe'); + $number_accounts = DB::queryFirstField("SELECT COUNT(*) FROM accounts"); + +### Use a list in a query + DB::query("SELECT * FROM tbl WHERE name IN %ls AND age NOT IN %li", array('John', 'Bob'), array(12, 15)); + +### Nested Transactions + + DB::$nested_transactions = true; + DB::startTransaction(); // outer transaction + // .. some queries.. + $depth = DB::startTransaction(); // inner transaction + echo $depth . 'transactions are currently active'; // 2 + + // .. some queries.. + DB::commit(); // commit inner transaction + // .. some queries.. + DB::commit(); // commit outer transaction + +### Lots More - See: http://www.meekro.com/docs.php + + +How is MeekroDB better than PDO? +======== +### Optional Static Class Mode +Most web apps will only ever talk to one database. This means that +passing $db objects to every function of your code just adds unnecessary clutter. +The simplest approach is to use static methods such as DB::query(), and that's how +MeekroDB works. Still, if you need database objects, MeekroDB can do that too. + +### Do more with fewer lines of code +The code below escapes your parameters for safety, runs the query, and grabs +the first row of results. Try doing that in one line with PDO. + + $account = DB::queryFirstRow("SELECT * FROM accounts WHERE username=%s", 'Joe'); + +### Work with list parameters easily +Using MySQL's IN keyword should not be hard. MeekroDB smooths out the syntax for you, +PDO does not. + + $accounts = DB::query("SELECT * FROM accounts WHERE username IN %ls", array('Joe', 'Frank')); + + +### Simple inserts +Using MySQL's INSERT should not be more complicated than passing in an +associative array. MeekroDB also simplifies many related commands, including +the useful and bizarre INSERT .. ON DUPLICATE UPDATE command. PDO does none of this. + + DB::insert('accounts', array('username' => 'John', 'password' => 'whatever')); + +### Focus on the goal, not the task +Want to do INSERT yourself rather than relying on DB::insert()? +It's dead simple. I don't even want to think about how many lines +you'd need to pull this off in PDO. + + // Insert 2 rows at once + DB::query("INSERT INTO %b %lb VALUES %?", 'accounts', + array('username', 'password', 'last_login_timestamp'), + array( + array('Joe', 'joes_password', new DateTime('yesterday')), + array('Frank', 'franks_password', new DateTime('last Monday')) + ) + ); + +### Nested transactions +MySQL's SAVEPOINT commands lets you create nested transactions, but only +if you keep track of SAVEPOINT ids yourself. MeekroDB does this for you, +so you can have nested transactions with no complexity or learning curve. + + DB::$nested_transactions = true; + DB::startTransaction(); // outer transaction + // .. some queries.. + $depth = DB::startTransaction(); // inner transaction + echo $depth . 'transactions are currently active'; // 2 + + // .. some queries.. + DB::commit(); // commit inner transaction + // .. some queries.. + DB::commit(); // commit outer transaction + +### Flexible error and success handlers +Set your own custom function run on errors, or on every query that succeeds. +You can easily have separate error handling behavior for the dev and live +versions of your application. Want to count up all your queries and their +runtime? Just add a new success handler. + +### More about MeekroDB's design philosophy: http://www.meekro.com/beliefs.php diff --git a/vendor/sergeytsalkov/meekrodb/composer.json b/vendor/sergeytsalkov/meekrodb/composer.json new file mode 100644 index 00000000..f4940634 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/composer.json @@ -0,0 +1,29 @@ +{ + "name": "SergeyTsalkov/meekrodb", + "description": "The Simple PHP/MySQL Library", + "homepage": "http://www.meekro.com", + "support": { + "email": "support@meekro.com" + }, + "keywords": [ + "mysql", + "database", + "mysqli", + "pdo" + ], + "license": "LGPL-3.0", + "authors": [ + { + "name": "Sergey Tsalkov", + "email": "stsalkov@gmail.com" + } + ], + "require": { + "php": ">=5.2.0" + }, + "autoload": { + "classmap": [ + "db.class.php" + ] + } +} diff --git a/vendor/sergeytsalkov/meekrodb/db.class.php b/vendor/sergeytsalkov/meekrodb/db.class.php new file mode 100644 index 00000000..e63d9669 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/db.class.php @@ -0,0 +1,956 @@ +. +*/ + + +class DB { + // initial connection + public static $dbName = ''; + public static $user = ''; + public static $password = ''; + public static $host = 'localhost'; + public static $port = null; + public static $encoding = 'latin1'; + + // configure workings + public static $param_char = '%'; + public static $named_param_seperator = '_'; + public static $success_handler = false; + public static $error_handler = true; + public static $throw_exception_on_error = false; + public static $nonsql_error_handler = null; + public static $throw_exception_on_nonsql_error = false; + public static $nested_transactions = false; + public static $usenull = true; + public static $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); + public static $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); + + // internal + protected static $mdb = null; + + public static function getMDB() { + $mdb = DB::$mdb; + + if ($mdb === null) { + $mdb = DB::$mdb = new MeekroDB(); + } + + static $variables_to_sync = array('param_char', 'named_param_seperator', 'success_handler', 'error_handler', 'throw_exception_on_error', + 'nonsql_error_handler', 'throw_exception_on_nonsql_error', 'nested_transactions', 'usenull', 'ssl', 'connect_options'); + + $db_class_vars = get_class_vars('DB'); // the DB::$$var syntax only works in 5.3+ + + foreach ($variables_to_sync as $variable) { + if ($mdb->$variable !== $db_class_vars[$variable]) { + $mdb->$variable = $db_class_vars[$variable]; + } + } + + return $mdb; + } + + // yes, this is ugly. __callStatic() only works in 5.3+ + public static function get() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'get'), $args); } + public static function disconnect() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'disconnect'), $args); } + public static function query() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'query'), $args); } + public static function queryFirstRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstRow'), $args); } + public static function queryOneRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneRow'), $args); } + public static function queryAllLists() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryAllLists'), $args); } + public static function queryFullColumns() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFullColumns'), $args); } + public static function queryFirstList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstList'), $args); } + public static function queryOneList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneList'), $args); } + public static function queryFirstColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstColumn'), $args); } + public static function queryOneColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneColumn'), $args); } + public static function queryFirstField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstField'), $args); } + public static function queryOneField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneField'), $args); } + public static function queryRaw() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRaw'), $args); } + public static function queryRawUnbuf() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRawUnbuf'), $args); } + + public static function insert() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insert'), $args); } + public static function insertIgnore() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertIgnore'), $args); } + public static function insertUpdate() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertUpdate'), $args); } + public static function replace() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'replace'), $args); } + public static function update() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'update'), $args); } + public static function delete() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'delete'), $args); } + + public static function insertId() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertId'), $args); } + public static function count() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'count'), $args); } + public static function affectedRows() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'affectedRows'), $args); } + + public static function useDB() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'useDB'), $args); } + public static function startTransaction() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'startTransaction'), $args); } + public static function commit() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'commit'), $args); } + public static function rollback() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'rollback'), $args); } + public static function tableList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'tableList'), $args); } + public static function columnList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'columnList'), $args); } + + public static function sqlEval() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'sqlEval'), $args); } + public static function nonSQLError() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'nonSQLError'), $args); } + + public static function serverVersion() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'serverVersion'), $args); } + public static function transactionDepth() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'transactionDepth'), $args); } + + + public static function debugMode($handler = true) { + DB::$success_handler = $handler; + } + +} + + +class MeekroDB { + // initial connection + public $dbName = ''; + public $user = ''; + public $password = ''; + public $host = 'localhost'; + public $port = null; + public $encoding = 'latin1'; + + // configure workings + public $param_char = '%'; + public $named_param_seperator = '_'; + public $success_handler = false; + public $error_handler = true; + public $throw_exception_on_error = false; + public $nonsql_error_handler = null; + public $throw_exception_on_nonsql_error = false; + public $nested_transactions = false; + public $usenull = true; + public $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); + public $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); + + // internal + public $internal_mysql = null; + public $server_info = null; + public $insert_id = 0; + public $num_rows = 0; + public $affected_rows = 0; + public $current_db = null; + public $nested_transactions_count = 0; + + + public function __construct($host=null, $user=null, $password=null, $dbName=null, $port=null, $encoding=null) { + if ($host === null) $host = DB::$host; + if ($user === null) $user = DB::$user; + if ($password === null) $password = DB::$password; + if ($dbName === null) $dbName = DB::$dbName; + if ($port === null) $port = DB::$port; + if ($encoding === null) $encoding = DB::$encoding; + + $this->host = $host; + $this->user = $user; + $this->password = $password; + $this->dbName = $dbName; + $this->port = $port; + $this->encoding = $encoding; + } + + public function get() { + $mysql = $this->internal_mysql; + + if (!($mysql instanceof MySQLi)) { + if (! $this->port) $this->port = ini_get('mysqli.default_port'); + $this->current_db = $this->dbName; + $mysql = new mysqli(); + + $connect_flags = 0; + if ($this->ssl['key']) { + $mysql->ssl_set($this->ssl['key'], $this->ssl['cert'], $this->ssl['ca_cert'], $this->ssl['ca_path'], $this->ssl['cipher']); + $connect_flags |= MYSQLI_CLIENT_SSL; + } + foreach ($this->connect_options as $key => $value) { + $mysql->options($key, $value); + } + + // suppress warnings, since we will check connect_error anyway + @$mysql->real_connect($this->host, $this->user, $this->password, $this->dbName, $this->port, null, $connect_flags); + + if ($mysql->connect_error) { + $this->nonSQLError('Unable to connect to MySQL server! Error: ' . $mysql->connect_error); + } + + $mysql->set_charset($this->encoding); + $this->internal_mysql = $mysql; + $this->server_info = $mysql->server_info; + } + + return $mysql; + } + + public function disconnect() { + $mysqli = $this->internal_mysql; + if ($mysqli instanceof MySQLi) { + if ($thread_id = $mysqli->thread_id) $mysqli->kill($thread_id); + $mysqli->close(); + } + $this->internal_mysql = null; + } + + public function nonSQLError($message) { + if ($this->throw_exception_on_nonsql_error) { + $e = new MeekroDBException($message); + throw $e; + } + + $error_handler = is_callable($this->nonsql_error_handler) ? $this->nonsql_error_handler : 'meekrodb_error_handler'; + + call_user_func($error_handler, array( + 'type' => 'nonsql', + 'error' => $message + )); + } + + public function debugMode($handler = true) { + $this->success_handler = $handler; + } + + public function serverVersion() { $this->get(); return $this->server_info; } + public function transactionDepth() { return $this->nested_transactions_count; } + public function insertId() { return $this->insert_id; } + public function affectedRows() { return $this->affected_rows; } + public function count() { $args = func_get_args(); return call_user_func_array(array($this, 'numRows'), $args); } + public function numRows() { return $this->num_rows; } + + public function useDB() { $args = func_get_args(); return call_user_func_array(array($this, 'setDB'), $args); } + public function setDB($dbName) { + $db = $this->get(); + if (! $db->select_db($dbName)) $this->nonSQLError("Unable to set database to $dbName"); + $this->current_db = $dbName; + } + + + public function startTransaction() { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if (!$this->nested_transactions || $this->nested_transactions_count == 0) { + $this->query('START TRANSACTION'); + $this->nested_transactions_count = 1; + } else { + $this->query("SAVEPOINT LEVEL{$this->nested_transactions_count}"); + $this->nested_transactions_count++; + } + + return $this->nested_transactions_count; + } + + public function commit($all=false) { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if ($this->nested_transactions && $this->nested_transactions_count > 0) + $this->nested_transactions_count--; + + if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { + $this->nested_transactions_count = 0; + $this->query('COMMIT'); + } else { + $this->query("RELEASE SAVEPOINT LEVEL{$this->nested_transactions_count}"); + } + + return $this->nested_transactions_count; + } + + public function rollback($all=false) { + if ($this->nested_transactions && $this->serverVersion() < '5.5') { + return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); + } + + if ($this->nested_transactions && $this->nested_transactions_count > 0) + $this->nested_transactions_count--; + + if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { + $this->nested_transactions_count = 0; + $this->query('ROLLBACK'); + } else { + $this->query("ROLLBACK TO SAVEPOINT LEVEL{$this->nested_transactions_count}"); + } + + return $this->nested_transactions_count; + } + + protected function formatTableName($table) { + $table = trim($table, '`'); + + if (strpos($table, '.')) return implode('.', array_map(array($this, 'formatTableName'), explode('.', $table))); + else return '`' . str_replace('`', '``', $table) . '`'; + } + + public function update() { + $args = func_get_args(); + $table = array_shift($args); + $params = array_shift($args); + $where = array_shift($args); + + $query = str_replace('%', $this->param_char, "UPDATE %b SET %? WHERE ") . $where; + + array_unshift($args, $params); + array_unshift($args, $table); + array_unshift($args, $query); + return call_user_func_array(array($this, 'query'), $args); + } + + public function insertOrReplace($which, $table, $datas, $options=array()) { + $datas = unserialize(serialize($datas)); // break references within array + $keys = $values = array(); + + if (isset($datas[0]) && is_array($datas[0])) { + foreach ($datas as $datum) { + ksort($datum); + if (! $keys) $keys = array_keys($datum); + $values[] = array_values($datum); + } + + } else { + $keys = array_keys($datas); + $values = array_values($datas); + } + + if (isset($options['ignore']) && $options['ignore']) $which = 'INSERT IGNORE'; + + if (isset($options['update']) && is_array($options['update']) && $options['update'] && strtolower($which) == 'insert') { + if (array_values($options['update']) !== $options['update']) { + return $this->query( + str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE %?"), + $table, $keys, $values, $options['update']); + } else { + $update_str = array_shift($options['update']); + $query_param = array( + str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE ") . $update_str, + $table, $keys, $values); + $query_param = array_merge($query_param, $options['update']); + return call_user_func_array(array($this, 'query'), $query_param); + } + + } + + return $this->query( + str_replace('%', $this->param_char, "%l INTO %b %lb VALUES %?"), + $which, $table, $keys, $values); + } + + public function insert($table, $data) { return $this->insertOrReplace('INSERT', $table, $data); } + public function insertIgnore($table, $data) { return $this->insertOrReplace('INSERT', $table, $data, array('ignore' => true)); } + public function replace($table, $data) { return $this->insertOrReplace('REPLACE', $table, $data); } + + public function insertUpdate() { + $args = func_get_args(); + $table = array_shift($args); + $data = array_shift($args); + + if (! isset($args[0])) { // update will have all the data of the insert + if (isset($data[0]) && is_array($data[0])) { //multiple insert rows specified -- failing! + $this->nonSQLError("Badly formatted insertUpdate() query -- you didn't specify the update component!"); + } + + $args[0] = $data; + } + + if (is_array($args[0])) $update = $args[0]; + else $update = $args; + + return $this->insertOrReplace('INSERT', $table, $data, array('update' => $update)); + } + + public function delete() { + $args = func_get_args(); + $table = $this->formatTableName(array_shift($args)); + $where = array_shift($args); + $buildquery = "DELETE FROM $table WHERE $where"; + array_unshift($args, $buildquery); + return call_user_func_array(array($this, 'query'), $args); + } + + public function sqleval() { + $args = func_get_args(); + $text = call_user_func_array(array($this, 'parseQueryParams'), $args); + return new MeekroDBEval($text); + } + + public function columnList($table) { + return $this->queryOneColumn('Field', "SHOW COLUMNS FROM %b", $table); + } + + public function tableList($db = null) { + if ($db) { + $olddb = $this->current_db; + $this->useDB($db); + } + + $result = $this->queryFirstColumn('SHOW TABLES'); + if (isset($olddb)) $this->useDB($olddb); + return $result; + } + + protected function preparseQueryParams() { + $args = func_get_args(); + $sql = trim(strval(array_shift($args))); + $args_all = $args; + + if (count($args_all) == 0) return array($sql); + + $param_char_length = strlen($this->param_char); + $named_seperator_length = strlen($this->named_param_seperator); + + $types = array( + $this->param_char . 'll', // list of literals + $this->param_char . 'ls', // list of strings + $this->param_char . 'l', // literal + $this->param_char . 'li', // list of integers + $this->param_char . 'ld', // list of decimals + $this->param_char . 'lb', // list of backticks + $this->param_char . 'lt', // list of timestamps + $this->param_char . 's', // string + $this->param_char . 'i', // integer + $this->param_char . 'd', // double / decimal + $this->param_char . 'b', // backtick + $this->param_char . 't', // timestamp + $this->param_char . '?', // infer type + $this->param_char . 'ss' // search string (like string, surrounded with %'s) + ); + + // generate list of all MeekroDB variables in our query, and their position + // in the form "offset => variable", sorted by offsets + $posList = array(); + foreach ($types as $type) { + $lastPos = 0; + while (($pos = strpos($sql, $type, $lastPos)) !== false) { + $lastPos = $pos + 1; + if (isset($posList[$pos]) && strlen($posList[$pos]) > strlen($type)) continue; + $posList[$pos] = $type; + } + } + + ksort($posList); + + // for each MeekroDB variable, substitute it with array(type: i, value: 53) or whatever + $chunkyQuery = array(); // preparsed query + $pos_adj = 0; // how much we've added or removed from the original sql string + foreach ($posList as $pos => $type) { + $type = substr($type, $param_char_length); // variable, without % in front of it + $length_type = strlen($type) + $param_char_length; // length of variable w/o % + + $new_pos = $pos + $pos_adj; // position of start of variable + $new_pos_back = $new_pos + $length_type; // position of end of variable + $arg_number_length = 0; // length of any named or numbered parameter addition + + // handle numbered parameters + if ($arg_number_length = strspn($sql, '0123456789', $new_pos_back)) { + $arg_number = substr($sql, $new_pos_back, $arg_number_length); + if (! array_key_exists($arg_number, $args_all)) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); + + $arg = $args_all[$arg_number]; + + // handle named parameters + } else if (substr($sql, $new_pos_back, $named_seperator_length) == $this->named_param_seperator) { + $arg_number_length = strspn($sql, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_', + $new_pos_back + $named_seperator_length) + $named_seperator_length; + + $arg_number = substr($sql, $new_pos_back + $named_seperator_length, $arg_number_length - $named_seperator_length); + if (count($args_all) != 1 || !is_array($args_all[0])) $this->nonSQLError("If you use named parameters, the second argument must be an array of parameters"); + if (! array_key_exists($arg_number, $args_all[0])) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); + + $arg = $args_all[0][$arg_number]; + + } else { + $arg_number = 0; + $arg = array_shift($args); + } + + if ($new_pos > 0) $chunkyQuery[] = substr($sql, 0, $new_pos); + + if (is_object($arg) && ($arg instanceof WhereClause)) { + list($clause_sql, $clause_args) = $arg->textAndArgs(); + array_unshift($clause_args, $clause_sql); + $preparsed_sql = call_user_func_array(array($this, 'preparseQueryParams'), $clause_args); + $chunkyQuery = array_merge($chunkyQuery, $preparsed_sql); + } else { + $chunkyQuery[] = array('type' => $type, 'value' => $arg); + } + + $sql = substr($sql, $new_pos_back + $arg_number_length); + $pos_adj -= $new_pos_back + $arg_number_length; + } + + if (strlen($sql) > 0) $chunkyQuery[] = $sql; + + return $chunkyQuery; + } + + protected function escape($str) { return "'" . $this->get()->real_escape_string(strval($str)) . "'"; } + + protected function sanitize($value) { + if (is_object($value)) { + if ($value instanceof MeekroDBEval) return $value->text; + else if ($value instanceof DateTime) return $this->escape($value->format('Y-m-d H:i:s')); + else return ''; + } + + if (is_null($value)) return $this->usenull ? 'NULL' : "''"; + else if (is_bool($value)) return ($value ? 1 : 0); + else if (is_int($value)) return $value; + else if (is_float($value)) return $value; + + else if (is_array($value)) { + // non-assoc array? + if (array_values($value) === $value) { + if (is_array($value[0])) return implode(', ', array_map(array($this, 'sanitize'), $value)); + else return '(' . implode(', ', array_map(array($this, 'sanitize'), $value)) . ')'; + } + + $pairs = array(); + foreach ($value as $k => $v) { + $pairs[] = $this->formatTableName($k) . '=' . $this->sanitize($v); + } + + return implode(', ', $pairs); + } + else return $this->escape($value); + } + + protected function parseTS($ts) { + if (is_string($ts)) return date('Y-m-d H:i:s', strtotime($ts)); + else if (is_object($ts) && ($ts instanceof DateTime)) return $ts->format('Y-m-d H:i:s'); + } + + protected function intval($var) { + if (PHP_INT_SIZE == 8) return intval($var); + return floor(doubleval($var)); + } + + protected function parseQueryParams() { + $args = func_get_args(); + $chunkyQuery = call_user_func_array(array($this, 'preparseQueryParams'), $args); + + $query = ''; + $array_types = array('ls', 'li', 'ld', 'lb', 'll', 'lt'); + + foreach ($chunkyQuery as $chunk) { + if (is_string($chunk)) { + $query .= $chunk; + continue; + } + + $type = $chunk['type']; + $arg = $chunk['value']; + $result = ''; + + if ($type != '?') { + $is_array_type = in_array($type, $array_types, true); + if ($is_array_type && !is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected array, got scalar instead!"); + else if (!$is_array_type && is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected scalar, got array instead!"); + } + + if ($type == 's') $result = $this->escape($arg); + else if ($type == 'i') $result = $this->intval($arg); + else if ($type == 'd') $result = doubleval($arg); + else if ($type == 'b') $result = $this->formatTableName($arg); + else if ($type == 'l') $result = $arg; + else if ($type == 'ss') $result = $this->escape("%" . str_replace(array('%', '_'), array('\%', '\_'), $arg) . "%"); + else if ($type == 't') $result = $this->escape($this->parseTS($arg)); + + else if ($type == 'ls') $result = array_map(array($this, 'escape'), $arg); + else if ($type == 'li') $result = array_map(array($this, 'intval'), $arg); + else if ($type == 'ld') $result = array_map('doubleval', $arg); + else if ($type == 'lb') $result = array_map(array($this, 'formatTableName'), $arg); + else if ($type == 'll') $result = $arg; + else if ($type == 'lt') $result = array_map(array($this, 'escape'), array_map(array($this, 'parseTS'), $arg)); + + else if ($type == '?') $result = $this->sanitize($arg); + + else $this->nonSQLError("Badly formatted SQL query: Invalid MeekroDB param $type"); + + if (is_array($result)) $result = '(' . implode(',', $result) . ')'; + + $query .= $result; + } + + return $query; + } + + protected function prependCall($function, $args, $prepend) { array_unshift($args, $prepend); return call_user_func_array($function, $args); } + public function query() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'assoc'); } + public function queryAllLists() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'list'); } + public function queryFullColumns() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'full'); } + + public function queryRaw() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_buf'); } + public function queryRawUnbuf() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_unbuf'); } + + protected function queryHelper() { + $args = func_get_args(); + $type = array_shift($args); + $db = $this->get(); + + $is_buffered = true; + $row_type = 'assoc'; // assoc, list, raw + $full_names = false; + + switch ($type) { + case 'assoc': + break; + case 'list': + $row_type = 'list'; + break; + case 'full': + $row_type = 'list'; + $full_names = true; + break; + case 'raw_buf': + $row_type = 'raw'; + break; + case 'raw_unbuf': + $is_buffered = false; + $row_type = 'raw'; + break; + default: + $this->nonSQLError('Error -- invalid argument to queryHelper!'); + } + + $sql = call_user_func_array(array($this, 'parseQueryParams'), $args); + + if ($this->success_handler) $starttime = microtime(true); + $result = $db->query($sql, $is_buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); + if ($this->success_handler) $runtime = microtime(true) - $starttime; + else $runtime = 0; + + // ----- BEGIN ERROR HANDLING + if (!$sql || $db->error) { + if ($this->error_handler) { + $error_handler = is_callable($this->error_handler) ? $this->error_handler : 'meekrodb_error_handler'; + + call_user_func($error_handler, array( + 'type' => 'sql', + 'query' => $sql, + 'error' => $db->error, + 'code' => $db->errno + )); + } + + if ($this->throw_exception_on_error) { + $e = new MeekroDBException($db->error, $sql, $db->errno); + throw $e; + } + } else if ($this->success_handler) { + $runtime = sprintf('%f', $runtime * 1000); + $success_handler = is_callable($this->success_handler) ? $this->success_handler : 'meekrodb_debugmode_handler'; + + call_user_func($success_handler, array( + 'query' => $sql, + 'runtime' => $runtime, + 'affected' => $db->affected_rows + )); + } + + // ----- END ERROR HANDLING + + $this->insert_id = $db->insert_id; + $this->affected_rows = $db->affected_rows; + + // mysqli_result->num_rows won't initially show correct results for unbuffered data + if ($is_buffered && ($result instanceof MySQLi_Result)) $this->num_rows = $result->num_rows; + else $this->num_rows = null; + + if ($row_type == 'raw' || !($result instanceof MySQLi_Result)) return $result; + + $return = array(); + + if ($full_names) { + $infos = array(); + foreach ($result->fetch_fields() as $info) { + if (strlen($info->table)) $infos[] = $info->table . '.' . $info->name; + else $infos[] = $info->name; + } + } + + while ($row = ($row_type == 'assoc' ? $result->fetch_assoc() : $result->fetch_row())) { + if ($full_names) $row = array_combine($infos, $row); + $return[] = $row; + } + + // free results + $result->free(); + while ($db->more_results()) { + $db->next_result(); + if ($result = $db->use_result()) $result->free(); + } + + return $return; + } + + public function queryOneRow() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstRow'), $args); } + public function queryFirstRow() { + $args = func_get_args(); + $result = call_user_func_array(array($this, 'query'), $args); + if (!$result || !is_array($result)) return null; + return reset($result); + } + + public function queryOneList() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstList'), $args); } + public function queryFirstList() { + $args = func_get_args(); + $result = call_user_func_array(array($this, 'queryAllLists'), $args); + if (!$result || !is_array($result)) return null; + return reset($result); + } + + public function queryFirstColumn() { + $args = func_get_args(); + $results = call_user_func_array(array($this, 'queryAllLists'), $args); + $ret = array(); + + if (!count($results) || !count($results[0])) return $ret; + + foreach ($results as $row) { + $ret[] = $row[0]; + } + + return $ret; + } + + public function queryOneColumn() { + $args = func_get_args(); + $column = array_shift($args); + $results = call_user_func_array(array($this, 'query'), $args); + $ret = array(); + + if (!count($results) || !count($results[0])) return $ret; + if ($column === null) { + $keys = array_keys($results[0]); + $column = $keys[0]; + } + + foreach ($results as $row) { + $ret[] = $row[$column]; + } + + return $ret; + } + + public function queryFirstField() { + $args = func_get_args(); + $row = call_user_func_array(array($this, 'queryFirstList'), $args); + if ($row == null) return null; + return $row[0]; + } + + public function queryOneField() { + $args = func_get_args(); + $column = array_shift($args); + + $row = call_user_func_array(array($this, 'queryOneRow'), $args); + if ($row == null) { + return null; + } else if ($column === null) { + $keys = array_keys($row); + $column = $keys[0]; + } + + return $row[$column]; + } +} + +class WhereClause { + public $type = 'and'; //AND or OR + public $negate = false; + public $clauses = array(); + + function __construct($type) { + $type = strtolower($type); + if ($type !== 'or' && $type !== 'and') DB::nonSQLError('you must use either WhereClause(and) or WhereClause(or)'); + $this->type = $type; + } + + function add() { + $args = func_get_args(); + $sql = array_shift($args); + + if ($sql instanceof WhereClause) { + $this->clauses[] = $sql; + } else { + $this->clauses[] = array('sql' => $sql, 'args' => $args); + } + } + + function negateLast() { + $i = count($this->clauses) - 1; + if (!isset($this->clauses[$i])) return; + + if ($this->clauses[$i] instanceof WhereClause) { + $this->clauses[$i]->negate(); + } else { + $this->clauses[$i]['sql'] = 'NOT (' . $this->clauses[$i]['sql'] . ')'; + } + } + + function negate() { + $this->negate = ! $this->negate; + } + + function addClause($type) { + $r = new WhereClause($type); + $this->add($r); + return $r; + } + + function count() { + return count($this->clauses); + } + + function textAndArgs() { + $sql = array(); + $args = array(); + + if (count($this->clauses) == 0) return array('(1)', $args); + + foreach ($this->clauses as $clause) { + if ($clause instanceof WhereClause) { + list($clause_sql, $clause_args) = $clause->textAndArgs(); + } else { + $clause_sql = $clause['sql']; + $clause_args = $clause['args']; + } + + $sql[] = "($clause_sql)"; + $args = array_merge($args, $clause_args); + } + + if ($this->type == 'and') $sql = implode(' AND ', $sql); + else $sql = implode(' OR ', $sql); + + if ($this->negate) $sql = '(NOT ' . $sql . ')'; + return array($sql, $args); + } + + // backwards compatability + // we now return full WhereClause object here and evaluate it in preparseQueryParams + function text() { return $this; } +} + +class DBTransaction { + private $committed = false; + + function __construct() { + DB::startTransaction(); + } + function __destruct() { + if (! $this->committed) DB::rollback(); + } + function commit() { + DB::commit(); + $this->committed = true; + } + + +} + +class MeekroDBException extends Exception { + protected $query = ''; + + function __construct($message='', $query='', $code = 0) { + parent::__construct($message); + $this->query = $query; + $this->code = $code; + } + + public function getQuery() { return $this->query; } +} + +class DBHelper { + /* + verticalSlice + 1. For an array of assoc rays, return an array of values for a particular key + 2. if $keyfield is given, same as above but use that hash key as the key in new array + */ + + public static function verticalSlice($array, $field, $keyfield = null) { + $array = (array) $array; + + $R = array(); + foreach ($array as $obj) { + if (! array_key_exists($field, $obj)) die("verticalSlice: array doesn't have requested field\n"); + + if ($keyfield) { + if (! array_key_exists($keyfield, $obj)) die("verticalSlice: array doesn't have requested field\n"); + $R[$obj[$keyfield]] = $obj[$field]; + } else { + $R[] = $obj[$field]; + } + } + return $R; + } + + /* + reIndex + For an array of assoc rays, return a new array of assoc rays using a certain field for keys + */ + + public static function reIndex() { + $fields = func_get_args(); + $array = array_shift($fields); + $array = (array) $array; + + $R = array(); + foreach ($array as $obj) { + $target =& $R; + + foreach ($fields as $field) { + if (! array_key_exists($field, $obj)) die("reIndex: array doesn't have requested field\n"); + + $nextkey = $obj[$field]; + $target =& $target[$nextkey]; + } + $target = $obj; + } + return $R; + } +} + +function meekrodb_error_handler($params) { + if (isset($params['query'])) $out[] = "QUERY: " . $params['query']; + if (isset($params['error'])) $out[] = "ERROR: " . $params['error']; + $out[] = ""; + + if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { + echo implode("\n", $out); + } else { + echo implode("
\n", $out); + } + + die; +} + +function meekrodb_debugmode_handler($params) { + echo "QUERY: " . $params['query'] . " [" . $params['runtime'] . " ms]"; + if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { + echo "\n"; + } else { + echo "
\n"; + } +} + +class MeekroDBEval { + public $text = ''; + + function __construct($text) { + $this->text = $text; + } +} + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/BasicTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/BasicTest.php new file mode 100644 index 00000000..f924c90a --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/BasicTest.php @@ -0,0 +1,420 @@ +assert($mysqli->server_info === null); + } + + function test_1_5_empty_table() { + $counter = DB::queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(0)); + + $row = DB::queryFirstRow("SELECT * FROM accounts"); + $this->assert($row === null); + + $field = DB::queryFirstField("SELECT * FROM accounts"); + $this->assert($field === null); + + $field = DB::queryOneField('nothere', "SELECT * FROM accounts"); + $this->assert($field === null); + + $column = DB::queryFirstColumn("SELECT * FROM accounts"); + $this->assert(is_array($column) && count($column) === 0); + + $column = DB::queryOneColumn('nothere', "SELECT * FROM accounts"); //TODO: is this what we want? + $this->assert(is_array($column) && count($column) === 0); + } + + function test_2_insert_row() { + $true = DB::insert('accounts', array( + 'username' => 'Abe', + 'password' => 'hello' + )); + + $this->assert($true === true); + $this->assert(DB::affectedRows() === 1); + + $counter = DB::queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(1)); + } + + function test_3_more_inserts() { + DB::insert('`accounts`', array( + 'username' => 'Bart', + 'password' => 'hello', + 'age' => 15, + 'height' => 10.371 + )); + $dbname = DB::$dbName; + DB::insert("`$dbname`.`accounts`", array( + 'username' => 'Charlie\'s Friend', + 'password' => 'goodbye', + 'age' => 30, + 'height' => 155.23, + 'favorite_word' => null, + )); + + $this->assert(DB::insertId() === 3); + $counter = DB::queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(3)); + + DB::insert('`accounts`', array( + 'username' => 'Deer', + 'password' => '', + 'age' => 15, + 'height' => 10.371 + )); + + $username = DB::queryFirstField("SELECT username FROM accounts WHERE password=%s0", null); + $this->assert($username === 'Deer'); + + $password = DB::queryFirstField("SELECT password FROM accounts WHERE favorite_word IS NULL"); + $this->assert($password === 'goodbye'); + + DB::$usenull = false; + DB::insertUpdate('accounts', array( + 'id' => 3, + 'favorite_word' => null, + )); + + $password = DB::queryFirstField("SELECT password FROM accounts WHERE favorite_word=%s AND favorite_word=%s", null, ''); + $this->assert($password === 'goodbye'); + + DB::$usenull = true; + DB::insertUpdate('accounts', array( + 'id' => 3, + 'favorite_word' => null, + )); + + DB::$param_char = '###'; + $bart = DB::queryFirstRow("SELECT * FROM accounts WHERE age IN ###li AND height IN ###ld AND username IN ###ls", + array(15, 25), array(10.371, 150.123), array('Bart', 'Barts')); + $this->assert($bart['username'] === 'Bart'); + DB::insert('accounts', array('username' => 'f_u')); + DB::query("DELETE FROM accounts WHERE username=###s", 'f_u'); + DB::$param_char = '%'; + + $charlie_password = DB::queryFirstField("SELECT password FROM accounts WHERE username IN %ls AND username = %s", + array('Charlie', 'Charlie\'s Friend'), 'Charlie\'s Friend'); + $this->assert($charlie_password === 'goodbye'); + + $charlie_password = DB::queryOneField('password', "SELECT * FROM accounts WHERE username IN %ls AND username = %s", + array('Charlie', 'Charlie\'s Friend'), 'Charlie\'s Friend'); + $this->assert($charlie_password === 'goodbye'); + + $passwords = DB::queryFirstColumn("SELECT password FROM accounts WHERE username=%s", 'Bart'); + $this->assert(count($passwords) === 1); + $this->assert($passwords[0] === 'hello'); + + $username = $password = $age = null; + list($age, $username, $password) = DB::queryOneList("SELECT age,username,password FROM accounts WHERE username=%s", 'Bart'); + $this->assert($username === 'Bart'); + $this->assert($password === 'hello'); + $this->assert($age == 15); + + $mysqli_result = DB::queryRaw("SELECT * FROM accounts WHERE favorite_word IS NULL"); + $this->assert($mysqli_result instanceof MySQLi_Result); + $row = $mysqli_result->fetch_assoc(); + $this->assert($row['password'] === 'goodbye'); + $this->assert($mysqli_result->fetch_assoc() === null); + } + + function test_4_query() { + DB::update('accounts', array( + 'birthday' => new DateTime('10 September 2000 13:13:13') + ), 'username=%s', 'Charlie\'s Friend'); + + $results = DB::query("SELECT * FROM accounts WHERE username=%s AND birthday IN %lt", 'Charlie\'s Friend', array('September 10 2000 13:13:13')); + $this->assert(count($results) === 1); + $this->assert($results[0]['age'] === '30' && $results[0]['password'] === 'goodbye'); + $this->assert($results[0]['birthday'] == '2000-09-10 13:13:13'); + + $results = DB::query("SELECT * FROM accounts WHERE username!=%s", "Charlie's Friend"); + $this->assert(count($results) === 3); + + $columnlist = DB::columnList('accounts'); + $this->assert(count($columnlist) === 8); + $this->assert($columnlist[0] === 'id'); + $this->assert($columnlist[5] === 'height'); + + $tablelist = DB::tableList(); + $this->assert(count($tablelist) === 2); + $this->assert($tablelist[0] === 'accounts'); + + $tablelist = null; + $tablelist = DB::tableList(DB::$dbName); + $this->assert(count($tablelist) === 2); + $this->assert($tablelist[0] === 'accounts'); + } + + function test_4_1_query() { + DB::insert('accounts', array( + 'username' => 'newguy', + 'password' => DB::sqleval("REPEAT('blah', %i)", '3'), + 'age' => DB::sqleval('171+1'), + 'height' => 111.15 + )); + + $row = DB::queryOneRow("SELECT * FROM accounts WHERE password=%s", 'blahblahblah'); + $this->assert($row['username'] === 'newguy'); + $this->assert($row['age'] === '172'); + + $true = DB::update('accounts', array( + 'password' => DB::sqleval("REPEAT('blah', %i)", 4), + 'favorite_word' => null, + ), 'username=%s', 'newguy'); + + $row = null; + $row = DB::queryOneRow("SELECT * FROM accounts WHERE username=%s", 'newguy'); + $this->assert($true === true); + $this->assert($row['password'] === 'blahblahblahblah'); + $this->assert($row['favorite_word'] === null); + + $row = DB::query("SELECT * FROM accounts WHERE password=%s_mypass AND (password=%s_mypass) AND username=%s_myuser", + array('myuser' => 'newguy', 'mypass' => 'blahblahblahblah') + ); + $this->assert(count($row) === 1); + $this->assert($row[0]['username'] === 'newguy'); + $this->assert($row[0]['age'] === '172'); + + $true = DB::query("DELETE FROM accounts WHERE password=%s", 'blahblahblahblah'); + $this->assert($true === true); + $this->assert(DB::affectedRows() === 1); + } + + function test_4_2_delete() { + DB::insert('accounts', array( + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + )); + + $ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s AND height=%d", 'gonesoon', 199.194); + $this->assert(intval($ct) === 1); + + $ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s1 AND height=%d0 AND height=%d", 199.194, 'gonesoon'); + $this->assert(intval($ct) === 1); + + DB::delete('accounts', 'username=%s AND age=%i AND height=%d', 'gonesoon', '61', '199.194'); + $this->assert(DB::affectedRows() === 1); + + $ct = DB::queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s AND height=%d", 'gonesoon', '199.194'); + $this->assert(intval($ct) === 0); + } + + function test_4_3_insertmany() { + $ins[] = array( + 'username' => '1ofmany', + 'password' => 'something', + 'age' => 23, + 'height' => 190.194 + ); + $ins[] = array( + 'password' => 'somethingelse', + 'username' => '2ofmany', + 'age' => 25, + 'height' => 190.194 + ); + $ins[] = array( + 'password' => NULL, + 'username' => '3ofmany', + 'age' => 15, + 'height' => 111.951 + ); + + DB::insert('accounts', $ins); + $this->assert(DB::affectedRows() === 3); + + $rows = DB::query("SELECT * FROM accounts WHERE height=%d ORDER BY age ASC", 190.194); + $this->assert(count($rows) === 2); + $this->assert($rows[0]['username'] === '1ofmany'); + $this->assert($rows[0]['age'] === '23'); + $this->assert($rows[1]['age'] === '25'); + $this->assert($rows[1]['password'] === 'somethingelse'); + $this->assert($rows[1]['username'] === '2ofmany'); + + $nullrow = DB::queryOneRow("SELECT * FROM accounts WHERE username LIKE %ss", '3ofman'); + $this->assert($nullrow['password'] === NULL); + $this->assert($nullrow['age'] === '15'); + } + + + + function test_5_insert_blobs() { + DB::query("CREATE TABLE `store data` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `picture` BLOB + ) ENGINE = InnoDB"); + + $columns = DB::columnList('store data'); + $this->assert(count($columns) === 2); + $this->assert($columns[1] === 'picture'); + + + $smile = file_get_contents('smile1.jpg'); + DB::insert('store data', array( + 'picture' => $smile, + )); + DB::queryOneRow("INSERT INTO %b (picture) VALUES (%s)", 'store data', $smile); + + $getsmile = DB::queryFirstField("SELECT picture FROM %b WHERE id=1", 'store data'); + $getsmile2 = DB::queryFirstField("SELECT picture FROM %b WHERE id=2", 'store data'); + $this->assert($smile === $getsmile); + $this->assert($smile === $getsmile2); + } + + function test_6_insert_ignore() { + DB::insertIgnore('accounts', array( + 'id' => 1, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + )); + } + + function test_7_insert_update() { + $true = DB::insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ), 'age = age + %i', 1); + + $this->assert($true === true); + $this->assert(DB::affectedRows() === 2); // a quirk of MySQL, even though only 1 row was updated + + $result = DB::query("SELECT * FROM accounts WHERE age = %i", 16); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '10.371'); + + DB::insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'blahblahdude', + 'age' => 233, + 'height' => 199.194 + )); + + $result = DB::query("SELECT * FROM accounts WHERE age = %i", 233); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '199.194'); + $this->assert($result[0]['username'] === 'blahblahdude'); + + DB::insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ), array( + 'age' => 74, + )); + + $result = DB::query("SELECT * FROM accounts WHERE age = %i", 74); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '199.194'); + $this->assert($result[0]['username'] === 'blahblahdude'); + + $multiples[] = array( + 'id' => 3, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ); + $multiples[] = array( + 'id' => 1, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ); + + DB::insertUpdate('accounts', $multiples, array('age' => 914)); + $this->assert(DB::affectedRows() === 4); + + $result = DB::query("SELECT * FROM accounts WHERE age=914 ORDER BY id ASC"); + $this->assert(count($result) === 2); + $this->assert($result[0]['username'] === 'Abe'); + $this->assert($result[1]['username'] === 'Charlie\'s Friend'); + + $true = DB::query("UPDATE accounts SET age=15, username='Bart' WHERE age=%i", 74); + $this->assert($true === true); + $this->assert(DB::affectedRows() === 1); + } + + function test_8_lb() { + $data = array( + 'username' => 'vookoo', + 'password' => 'dookoo', + ); + + $true = DB::query("INSERT into accounts %lb VALUES %ls", array_keys($data), array_values($data)); + $result = DB::query("SELECT * FROM accounts WHERE username=%s", 'vookoo'); + $this->assert($true === true); + $this->assert(count($result) === 1); + $this->assert($result[0]['password'] === 'dookoo'); + } + + function test_9_fullcolumns() { + $true = DB::insert('profile', array( + 'id' => 1, + 'signature' => 'u_suck' + )); + DB::query("UPDATE accounts SET profile_id=1 WHERE id=2"); + + $r = DB::queryFullColumns("SELECT accounts.*, profile.*, 1+1 FROM accounts + INNER JOIN profile ON accounts.profile_id=profile.id"); + + $this->assert($true === true); + $this->assert(count($r) === 1); + $this->assert($r[0]['accounts.id'] === '2'); + $this->assert($r[0]['profile.id'] === '1'); + $this->assert($r[0]['profile.signature'] === 'u_suck'); + $this->assert($r[0]['1+1'] === '2'); + } + + function test_901_updatewithspecialchar() { + $data = 'www.mysite.com/product?s=t-%s-%%3d%%3d%i&RCAID=24322'; + DB::update('profile', array('signature' => $data), 'id=%i', 1); + $signature = DB::queryFirstField("SELECT signature FROM profile WHERE id=%i", 1); + $this->assert($signature === $data); + + DB::update('profile',array('signature'=> "%li "),"id = %d",1); + $signature = DB::queryFirstField("SELECT signature FROM profile WHERE id=%i", 1); + $this->assert($signature === "%li "); + + } + + + +} + + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/CallTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/CallTest.php new file mode 100644 index 00000000..cd82e6fa --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/CallTest.php @@ -0,0 +1,17 @@ +assert($r[0]['username'] === 'Abe'); + $this->assert($r[2]['age'] === '914'); + } + +} \ No newline at end of file diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest.php new file mode 100644 index 00000000..b2309808 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest.php @@ -0,0 +1,83 @@ +assert($error_callback_worked === 1); + + DB::$error_handler = array('ErrorTest', 'static_error_callback'); + DB::query("SELET * FROM accounts"); + $this->assert($static_error_callback_worked === 1); + + DB::$error_handler = array($this, 'nonstatic_error_callback'); + DB::query("SELET * FROM accounts"); + $this->assert($nonstatic_error_callback_worked === 1); + + } + + public static function static_error_callback($params) { + global $static_error_callback_worked; + if (substr_count($params['error'], 'You have an error in your SQL syntax')) $static_error_callback_worked = 1; + } + + public function nonstatic_error_callback($params) { + global $nonstatic_error_callback_worked; + if (substr_count($params['error'], 'You have an error in your SQL syntax')) $nonstatic_error_callback_worked = 1; + } + + function test_2_exception_catch() { + $dbname = DB::$dbName; + DB::$error_handler = ''; + DB::$throw_exception_on_error = true; + try { + DB::query("SELET * FROM accounts"); + } catch(MeekroDBException $e) { + $this->assert(substr_count($e->getMessage(), 'You have an error in your SQL syntax')); + $this->assert($e->getQuery() === 'SELET * FROM accounts'); + $exception_was_caught = 1; + } + $this->assert($exception_was_caught === 1); + + try { + DB::insert("`$dbname`.`accounts`", array( + 'id' => 2, + 'username' => 'Another Dude\'s \'Mom"', + 'password' => 'asdfsdse', + 'age' => 35, + 'height' => 555.23 + )); + } catch(MeekroDBException $e) { + $this->assert(substr_count($e->getMessage(), 'Duplicate entry')); + $exception_was_caught = 2; + } + $this->assert($exception_was_caught === 2); + } + + function test_3_debugmode_handler() { + global $debug_callback_worked; + + DB::debugMode('my_debug_handler'); + DB::query("SELECT * FROM accounts WHERE username!=%s", "Charlie's Friend"); + + $this->assert($debug_callback_worked === 1); + + DB::debugMode(false); + } + +} + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest_53.php b/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest_53.php new file mode 100644 index 00000000..8aafe093 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/ErrorTest_53.php @@ -0,0 +1,19 @@ +assert($anonymous_error_callback_worked === 1); + + } + + +} + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/HelperTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/HelperTest.php new file mode 100644 index 00000000..496c4062 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/HelperTest.php @@ -0,0 +1,51 @@ +assert(count($names) === 5); + $this->assert($names[0] === 'Abe'); + + $ages = DBHelper::verticalSlice($all, 'age', 'username'); + $this->assert(count($ages) === 5); + $this->assert($ages['Abe'] === '700'); + } + + function test_2_reindex() { + $all = DB::query("SELECT * FROM accounts ORDER BY id ASC"); + $names = DBHelper::reIndex($all, 'username'); + $this->assert(count($names) === 5); + $this->assert($names['Bart']['username'] === 'Bart'); + $this->assert($names['Bart']['age'] === '15'); + + $names = DBHelper::reIndex($all, 'username', 'age'); + $this->assert($names['Bart']['15']['username'] === 'Bart'); + $this->assert($names['Bart']['15']['age'] === '15'); + } + + function test_3_empty() { + $none = DB::query("SELECT * FROM accounts WHERE username=%s", 'doesnotexist'); + $this->assert(is_array($none) && count($none) === 0); + $names = DBHelper::verticalSlice($none, 'username', 'age'); + $this->assert(is_array($names) && count($names) === 0); + + $names_other = DBHelper::reIndex($none, 'username', 'age'); + $this->assert(is_array($names_other) && count($names_other) === 0); + } + + function test_4_null() { + DB::query("UPDATE accounts SET password = NULL WHERE username=%s", 'Bart'); + + $all = DB::query("SELECT * FROM accounts ORDER BY id ASC"); + $ages = DBHelper::verticalSlice($all, 'age', 'password'); + $this->assert(count($ages) === 5); + $this->assert($ages[''] === '15'); + + $passwords = DBHelper::reIndex($all, 'password'); + $this->assert(count($passwords) === 5); + $this->assert($passwords['']['username'] === 'Bart'); + $this->assert($passwords['']['password'] === NULL); + } + +} +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/ObjectTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/ObjectTest.php new file mode 100644 index 00000000..87c82bb7 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/ObjectTest.php @@ -0,0 +1,312 @@ +mdb = new MeekroDB(); + + foreach ($this->mdb->tableList() as $table) { + $this->mdb->query("DROP TABLE %b", $table); + } + } + + + function test_1_create_table() { + $this->mdb->query("CREATE TABLE `accounts` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `username` VARCHAR( 255 ) NOT NULL , + `password` VARCHAR( 255 ) NULL , + `age` INT NOT NULL DEFAULT '10', + `height` DOUBLE NOT NULL DEFAULT '10.0', + `favorite_word` VARCHAR( 255 ) NULL DEFAULT 'hi' + ) ENGINE = InnoDB"); + } + + function test_1_5_empty_table() { + $counter = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(0)); + + $row = $this->mdb->queryFirstRow("SELECT * FROM accounts"); + $this->assert($row === null); + + $field = $this->mdb->queryFirstField("SELECT * FROM accounts"); + $this->assert($field === null); + + $field = $this->mdb->queryOneField('nothere', "SELECT * FROM accounts"); + $this->assert($field === null); + + $column = $this->mdb->queryFirstColumn("SELECT * FROM accounts"); + $this->assert(is_array($column) && count($column) === 0); + + $column = $this->mdb->queryOneColumn('nothere', "SELECT * FROM accounts"); //TODO: is this what we want? + $this->assert(is_array($column) && count($column) === 0); + } + + function test_2_insert_row() { + $this->mdb->insert('accounts', array( + 'username' => 'Abe', + 'password' => 'hello' + )); + + $this->assert($this->mdb->affectedRows() === 1); + + $counter = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(1)); + } + + function test_3_more_inserts() { + $this->mdb->insert('`accounts`', array( + 'username' => 'Bart', + 'password' => 'hello', + 'age' => 15, + 'height' => 10.371 + )); + $dbname = $this->mdb->dbName; + $this->mdb->insert("`$dbname`.`accounts`", array( + 'username' => 'Charlie\'s Friend', + 'password' => 'goodbye', + 'age' => 30, + 'height' => 155.23, + 'favorite_word' => null, + )); + + $this->assert($this->mdb->insertId() === 3); + + $counter = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts"); + $this->assert($counter === strval(3)); + + $password = $this->mdb->queryFirstField("SELECT password FROM accounts WHERE favorite_word IS NULL"); + $this->assert($password === 'goodbye'); + + $this->mdb->param_char = '###'; + $bart = $this->mdb->queryFirstRow("SELECT * FROM accounts WHERE age IN ###li AND height IN ###ld AND username IN ###ls", + array(15, 25), array(10.371, 150.123), array('Bart', 'Barts')); + $this->assert($bart['username'] === 'Bart'); + $this->mdb->param_char = '%'; + + $charlie_password = $this->mdb->queryFirstField("SELECT password FROM accounts WHERE username IN %ls AND username = %s", + array('Charlie', 'Charlie\'s Friend'), 'Charlie\'s Friend'); + $this->assert($charlie_password === 'goodbye'); + + $charlie_password = $this->mdb->queryOneField('password', "SELECT * FROM accounts WHERE username IN %ls AND username = %s", + array('Charlie', 'Charlie\'s Friend'), 'Charlie\'s Friend'); + $this->assert($charlie_password === 'goodbye'); + + $passwords = $this->mdb->queryFirstColumn("SELECT password FROM accounts WHERE username=%s", 'Bart'); + $this->assert(count($passwords) === 1); + $this->assert($passwords[0] === 'hello'); + + $username = $password = $age = null; + list($age, $username, $password) = $this->mdb->queryOneList("SELECT age,username,password FROM accounts WHERE username=%s", 'Bart'); + $this->assert($username === 'Bart'); + $this->assert($password === 'hello'); + $this->assert($age == 15); + + $mysqli_result = $this->mdb->queryRaw("SELECT * FROM accounts WHERE favorite_word IS NULL"); + $this->assert($mysqli_result instanceof MySQLi_Result); + $row = $mysqli_result->fetch_assoc(); + $this->assert($row['password'] === 'goodbye'); + $this->assert($mysqli_result->fetch_assoc() === null); + } + + function test_4_query() { + $results = $this->mdb->query("SELECT * FROM accounts WHERE username=%s", 'Charlie\'s Friend'); + $this->assert(count($results) === 1); + $this->assert($results[0]['age'] == 30 && $results[0]['password'] == 'goodbye'); + + $results = $this->mdb->query("SELECT * FROM accounts WHERE username!=%s", "Charlie's Friend"); + $this->assert(count($results) === 2); + + $columnlist = $this->mdb->columnList('accounts'); + $this->assert(count($columnlist) === 6); + $this->assert($columnlist[0] === 'id'); + $this->assert($columnlist[4] === 'height'); + + $tablelist = $this->mdb->tableList(); + $this->assert(count($tablelist) === 1); + $this->assert($tablelist[0] === 'accounts'); + + $tablelist = null; + $tablelist = $this->mdb->tableList($this->mdb->dbName); + $this->assert(count($tablelist) === 1); + $this->assert($tablelist[0] === 'accounts'); + } + + function test_4_1_query() { + $this->mdb->insert('accounts', array( + 'username' => 'newguy', + 'password' => $this->mdb->sqleval("REPEAT('blah', %i)", '3'), + 'age' => $this->mdb->sqleval('171+1'), + 'height' => 111.15 + )); + + $row = $this->mdb->queryOneRow("SELECT * FROM accounts WHERE password=%s", 'blahblahblah'); + $this->assert($row['username'] === 'newguy'); + $this->assert($row['age'] === '172'); + + $this->mdb->update('accounts', array( + 'password' => $this->mdb->sqleval("REPEAT('blah', %i)", 4), + 'favorite_word' => null, + ), 'username=%s', 'newguy'); + + $row = null; + $row = $this->mdb->queryOneRow("SELECT * FROM accounts WHERE username=%s", 'newguy'); + $this->assert($row['password'] === 'blahblahblahblah'); + $this->assert($row['favorite_word'] === null); + + $this->mdb->query("DELETE FROM accounts WHERE password=%s", 'blahblahblahblah'); + $this->assert($this->mdb->affectedRows() === 1); + } + + function test_4_2_delete() { + $this->mdb->insert('accounts', array( + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + )); + + $ct = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s AND height=%d", 'gonesoon', 199.194); + $this->assert(intval($ct) === 1); + + $ct = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s1 AND height=%d0 AND height=%d", 199.194, 'gonesoon'); + $this->assert(intval($ct) === 1); + + $this->mdb->delete('accounts', 'username=%s AND age=%i AND height=%d', 'gonesoon', '61', '199.194'); + $this->assert($this->mdb->affectedRows() === 1); + + $ct = $this->mdb->queryFirstField("SELECT COUNT(*) FROM accounts WHERE username=%s AND height=%d", 'gonesoon', '199.194'); + $this->assert(intval($ct) === 0); + } + + function test_4_3_insertmany() { + $ins[] = array( + 'username' => '1ofmany', + 'password' => 'something', + 'age' => 23, + 'height' => 190.194 + ); + $ins[] = array( + 'password' => 'somethingelse', + 'username' => '2ofmany', + 'age' => 25, + 'height' => 190.194 + ); + + $this->mdb->insert('accounts', $ins); + $this->assert($this->mdb->affectedRows() === 2); + + $rows = $this->mdb->query("SELECT * FROM accounts WHERE height=%d ORDER BY age ASC", 190.194); + $this->assert(count($rows) === 2); + $this->assert($rows[0]['username'] === '1ofmany'); + $this->assert($rows[0]['age'] === '23'); + $this->assert($rows[1]['age'] === '25'); + $this->assert($rows[1]['password'] === 'somethingelse'); + $this->assert($rows[1]['username'] === '2ofmany'); + + } + + + + function test_5_insert_blobs() { + $this->mdb->query("CREATE TABLE `storedata` ( + `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , + `picture` BLOB + ) ENGINE = InnoDB"); + + + $smile = file_get_contents('smile1.jpg'); + $this->mdb->insert('storedata', array( + 'picture' => $smile, + )); + $this->mdb->query("INSERT INTO storedata (picture) VALUES (%s)", $smile); + + $getsmile = $this->mdb->queryFirstField("SELECT picture FROM storedata WHERE id=1"); + $getsmile2 = $this->mdb->queryFirstField("SELECT picture FROM storedata WHERE id=2"); + $this->assert($smile === $getsmile); + $this->assert($smile === $getsmile2); + } + + function test_6_insert_ignore() { + $this->mdb->insertIgnore('accounts', array( + 'id' => 1, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + )); + } + + function test_7_insert_update() { + $this->mdb->insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ), 'age = age + %i', 1); + + $this->assert($this->mdb->affectedRows() === 2); // a quirk of MySQL, even though only 1 row was updated + + $result = $this->mdb->query("SELECT * FROM accounts WHERE age = %i", 16); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '10.371'); + + $this->mdb->insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'blahblahdude', + 'age' => 233, + 'height' => 199.194 + )); + + $result = $this->mdb->query("SELECT * FROM accounts WHERE age = %i", 233); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '199.194'); + $this->assert($result[0]['username'] === 'blahblahdude'); + + $this->mdb->insertUpdate('accounts', array( + 'id' => 2, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ), array( + 'age' => 74, + )); + + $result = $this->mdb->query("SELECT * FROM accounts WHERE age = %i", 74); + $this->assert(count($result) === 1); + $this->assert($result[0]['height'] === '199.194'); + $this->assert($result[0]['username'] === 'blahblahdude'); + + $multiples[] = array( + 'id' => 3, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ); + $multiples[] = array( + 'id' => 1, //duplicate primary key + 'username' => 'gonesoon', + 'password' => 'something', + 'age' => 61, + 'height' => 199.194 + ); + + $this->mdb->insertUpdate('accounts', $multiples, array('age' => 914)); + $this->assert($this->mdb->affectedRows() === 4); + + $result = $this->mdb->query("SELECT * FROM accounts WHERE age=914 ORDER BY id ASC"); + $this->assert(count($result) === 2); + $this->assert($result[0]['username'] === 'Abe'); + $this->assert($result[1]['username'] === 'Charlie\'s Friend'); + + $this->mdb->query("UPDATE accounts SET age=15, username='Bart' WHERE age=%i", 74); + $this->assert($this->mdb->affectedRows() === 1); + } + +} + + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest.php new file mode 100644 index 00000000..76f1f231 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest.php @@ -0,0 +1,30 @@ +assert($depth === 1); + + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 700, 'Abe'); + $depth = DB::startTransaction(); + $this->assert($depth === 1); + + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 800, 'Abe'); + $depth = DB::rollback(); + $this->assert($depth === 0); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 700); + + $depth = DB::rollback(); + $this->assert($depth === 0); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 700); + } + +} +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest_55.php b/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest_55.php new file mode 100644 index 00000000..a4090984 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/TransactionTest_55.php @@ -0,0 +1,85 @@ +assert($depth === 1); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 700, 'Abe'); + + $depth = DB::startTransaction(); + $this->assert($depth === 2); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 800, 'Abe'); + + $depth = DB::startTransaction(); + $this->assert($depth === 3); + $this->assert(DB::transactionDepth() === 3); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 500, 'Abe'); + $depth = DB::commit(); + + $this->assert($depth === 2); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 500); + + $depth = DB::rollback(); + $this->assert($depth === 1); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 700); + + $depth = DB::commit(); + $this->assert($depth === 0); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 700); + + + DB::$nested_transactions = false; + } + + function test_2_transactions() { + DB::$nested_transactions = true; + + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 600, 'Abe'); + + DB::startTransaction(); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 700, 'Abe'); + DB::startTransaction(); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 800, 'Abe'); + DB::rollback(); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 700); + + DB::rollback(); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 600); + + DB::$nested_transactions = false; + } + + function test_3_transaction_rollback_all() { + DB::$nested_transactions = true; + + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 200, 'Abe'); + + $depth = DB::startTransaction(); + $this->assert($depth === 1); + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 300, 'Abe'); + $depth = DB::startTransaction(); + $this->assert($depth === 2); + + DB::query("UPDATE accounts SET age=%i WHERE username=%s", 400, 'Abe'); + $depth = DB::rollback(true); + $this->assert($depth === 0); + + $age = DB::queryFirstField("SELECT age FROM accounts WHERE username=%s", 'Abe'); + $this->assert($age == 200); + + DB::$nested_transactions = false; + } + +} +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/WhereClauseTest.php b/vendor/sergeytsalkov/meekrodb/simpletest/WhereClauseTest.php new file mode 100644 index 00000000..45843d16 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/WhereClauseTest.php @@ -0,0 +1,73 @@ +add('username=%s', 'Bart'); + $where->add('password=%s', 'hello'); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where->text()); + $this->assert(count($result) === 1); + $this->assert($result[0]['age'] === '15'); + } + + function test_2_simple_grouping() { + $where = new WhereClause('and'); + $where->add('password=%s', 'hello'); + $subclause = $where->addClause('or'); + $subclause->add('age=%i', 15); + $subclause->add('age=%i', 14); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where->text()); + $this->assert(count($result) === 1); + $this->assert($result[0]['age'] === '15'); + } + + function test_3_negate_last() { + $where = new WhereClause('and'); + $where->add('password=%s', 'hello'); + $subclause = $where->addClause('or'); + $subclause->add('username!=%s', 'Bart'); + $subclause->negateLast(); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where->text()); + $this->assert(count($result) === 1); + $this->assert($result[0]['age'] === '15'); + } + + function test_4_negate_last_query() { + $where = new WhereClause('and'); + $where->add('password=%s', 'hello'); + $subclause = $where->addClause('or'); + $subclause->add('username!=%s', 'Bart'); + $where->negateLast(); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where); + $this->assert(count($result) === 1); + $this->assert($result[0]['age'] === '15'); + } + + function test_5_negate() { + $where = new WhereClause('and'); + $where->add('password=%s', 'hello'); + $subclause = $where->addClause('or'); + $subclause->add('username!=%s', 'Bart'); + $subclause->negate(); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where); + $this->assert(count($result) === 1); + $this->assert($result[0]['age'] === '15'); + } + + function test_6_or() { + $where = new WhereClause('or'); + $where->add('username=%s', 'Bart'); + $where->add('username=%s', 'Abe'); + + $result = DB::query("SELECT * FROM accounts WHERE %l", $where); + $this->assert(count($result) === 2); + } + + +} + +?> diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/smile1.jpg b/vendor/sergeytsalkov/meekrodb/simpletest/smile1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..672649659577b4feb2bcf85a899c0e8ba62a4816 GIT binary patch literal 48874 zcmeFacUTn5vj94Pf)PXn6i}2PB4Nons3ZXa$r%o?9_?gdr?o_E#lTuWDM_ zL18WkfQy4eK!`(7h=cPgC$|tMmk_T2*a`p$UgCZ27l#9Ym-yf5<7>Sn_$z;e2>^t6 z1mAch{8cl~EMK%IQ!7mpqP2knb8-{}3qJMN!!xdNOylF3j)0l>$t0>nop z0Qvx=fQK6fo&aY~oH%jv#F>*P&yb!zb()l%iHR>9UWhMzZ9@7#A%J@ake&cu0xt>h=m30DJOWZY+$bpaDO@d{ zILPI3yrbir$ONFF96L@(bmHWx)1W#0T8RhX6MU~c2jCsUBfvj~f1HT$#BqW%++Zas z!Le)SIgj5~HX@^Qc*sR~A>>v59eM_GmG{QnJn%=I5=4xls$VA7O%S{kNd=FuONOaI zr9LD(@=rd5>7Q#(Dl2$bkbL*>SFiAr}rgc(2m=g`2^60{$pe zLY3SE!L!atc*p?Jb>0tMAQQ=yP$_jjN7Kn4Ed19TF#W{>ZU{I-aMUL$AP%6^LS-45 z8A4^{WTBWp(4C#wJe6Ugrzyjh!_sULUfUHrmMO@&hUF|QDMFD}ue$K#Cc8^-b?7`> zZ3B1A_P##aGm6#>nlZ2O`%Jy zi`u>YNK6BC&@LHa<|naih6CEX5|g#s(JQFOBD4cYO|Hw@_*_DdhyCzG1We-Bs`GX$ z)DwbHhOZp&6BE*3vY)$#-4A%~vamdA;)0zLmoC;6ZN&lgkD>4Z&1HWM-q`6K$z&nW3t-}Ai}7L_Xx_LRGmV3}#+7<*0!pqys73Le;HY(bphKqT3mWX;<>nxfGb;C91SFImx zi}&YQk1k-%GpdV|TafjEw`T2efR7IjQ18G28f*f>w8e{|dJ^pD36xFCm9^}6#>!r^ z_&X*0zFRA3!F}C*9FSIw1CsK(^qKCU>$=>roQ(^mFxH1&#MHJK4F^}Gm_~I=c~@|N zG$t|0%m3v}StU)Yz?XaXoG|k^z*{`&2PVly%)QJdQVmiE$-qGYThu4}dm9Q(=c zEyMVbs|1tS@kV0OXt4Qtw0hAw&Nulh_&v?w_?BE zk8BsurO;VJ%Arf9)Y)cA%-flpF zL>EpBabmM|{{U`)>(c#HLYMpR7Y62-gtkrYkDiSX;87CR6_>>UjaC_5Vg-(3MS5e= zQLR32ejT0pm3o z%G7=T(*(khG&A+sr$%Ylee81UH%NRoqGtD5&3C2QV~GxQ$YvzxUNl6-xlYk;+^>ls z!$8(J;(FPNyn|&`=Hpdz^ST_|!|zjvX}MW&QLQE0>b|O|Vv$(V)Z`bCJO6^==Kbqj zms2kfz6h0z)LjgB3x41Ru#vRocMx^j)(&uZ;HYxgs zOH2~;6*8)=d6(CKl0tU3V<9!2>0+Y^<7xT2?>jy$UR-HJ-hVO<4^VCifXWnNd;TF++O5SP|H{t@S1 zZ|}KGkaAwHVzq_DR!#W_ZoSMRuR4ZMy%w$rrarN- zFqh;$p}W@Z#MhGO42@-KBKPK*M@ctlD z{t>q3!noW{S{;j#?ujU8QKu}*MRWPm z6pZ%!k8f=&IR>roKDulj@0K&QvxpLfEVHG~C7z2jZ%2^%w6GR((r;B6^6x6V^?Sad zGF?+2UZRPTo_!;4TmD+S>D5>oM&Cx?st!HZwX!&_fp{}doySU{_K6`H5olnR&DGv%C$Vc+B9m4s$wOKjC5}j>GOgl5dS0 z+w15d$5+m8Pv7^_@q)|@mUiNR+?+9=-kVF8X-P7A@yeX|K74}m)_O-|;DAS^UUyk& z7f)9=?VG&3NRT>PHh>Dc6!=1{->(C$$)1K~*<=V9DHGPPKz?e%0qFzWfx(@)?uCL< zC^F!Vxs#UY4L)(_;WhRUj1{x4HBp*K%~F5gAISIIY58f5-KIX+u!xO`nyF*0)$}iD zKLyZQ<+G#+aF~I{8ovg%ngql)AFUkA)Yv@E49? z5^#WVJ-Q5gb6v>U)~!m3!K^xxs8@ozr0U&1ttBFE3F*;|p~X13__DmkGPj$&b8|K0 zthLdIQ$9b&nb<-8n)LdTI;f)1nZujSXKX$W@T*izjx~ebYr3dZR=53Wdo2$UT!x}3 z%gx%U67NFxMRfGiW(d$~Xzf!QHMhUDDP(LLB4Bb!Rfl5&I%6?dRA)-=^lqA97%(#z z)pG8Yj)NTMo(c28hR(HfcE#YWJA?i3{{7-jxoUL_mJ{JHnC$LzFYD&G@QtELa3R2R zAJw9yl|L|c^m&*oO`#y!VP;!qgRC3;a&U)!XF>o=gWNgeRxN|;S>U*|;N^~PV$xlD zm!I5JtSeu$z-yPS`0{cvmSZ8m!B!i?*89dARiwXIaWKTLYYjfF1aNTf2Him_a{P${ z$cAyiTboI-2PvVlP%dUhe^g%j^wb~xr_+Rl@>E^x-&>$>RqP!k!m5gmm8*x@2hp^h zIT1X?ftC(#7C>3&b#cLA37wP(dK&viYt*wloS2(F3pfDb--*SC=;$+qDyJUZz7M56 zx}Qg{u$#otXz86Gwz-?wZufaM8u%D{hfoY+tZ9XQtXj=t4~*z{ z9`E)Jk)@H=n)_4Tg!4RYswzf&)xll-qtudOmn=iFT%<4ze0-FV%f9UJ2F`B3;kHGD zVeDi_CMz25HY{pBJhM=S&ST8l3sDI45ox00hpyfm)G^$sRK@1kb-swTa<{E{|z@!IROX{cVu zbYJl4UcnLuRH`YjIl zQnTKSRK~tlM)?Ekh{x`)g=L1Urd+R#7pskL!EnII(!E&Zl3400jCRb;6%pmL=@4|q zoW}X%4R?p>C*l&sS~y_J-`L_yLb=ata0(lvemuh+8o^t|itw;_)D8*B;?l5;%Ewe3 zPy}ye&+Fziae!M>>)P6GBm3c2JH1XUnoAA+r^IqUQ)SpA)fz4LdG(fwhPShHv4M%7 zcaWkmj7PUm4{esFV^G4u>MO`%)m?NMdx88ANma3E$BuhN{Ngn70}iOo5mTidEpyw9 zme~x6xS~r_(#DL2L*vAih;JOS%3$*)SddS!?`=h zB1n33Q{#r&(KUTVix>{T=DM_^cxSR$l2`kYO+3XSOcP&axw*}8w?Jn$m56VvJj`1o z>3o6Ax;}E3?n5L2s(aDEnj1L>>5cDoI@MHyX7228nHvx4+*(2Ix{I$U9l$n6H)Ide z_#?wxR!x#kp4msd-Ix;RVWJ&XOJcZD$=|EA9{aH8Vyj}w?1Wh$;qC2Cs0+JzC-@K_ zfFU_x+9e-(bRs03B@Eq*g$QZtv$xdK6QxIA?>lMwWC>ko2)^o^>F7eHpd!gCmcX}8 zbK9L7JRe0^EuE)#1SEY2IjWmb6wKI!7^{}QIrSGt10Uh`Wl_ zhHl!$V+EolbbE!|j*)o1?T8j{YN)Uq$N1`AKn5Z+OM;O@78_o-aKK#TQ0DY5e=TQ> zNM-8ODe%sCo1TG0GhfyLe2WD!i%HCfU>mtF#Wyz>wJazsSM>V zfBuNg^_hlrO;&GS1(pibQ1X`gt0uT!a9(_)V8F+j8ID9HO7uZu3pO)|S$^h%xNBLB z3O04Nh93*Zn2o~jzwx(7TG4CpHr*-0oYoqj1?N;z&3aAiP7_0+TQv;A8#&T+$LGwo z%bb(-VtTGq`&m<@q~Nn!88XL96~ceLCR6`xcdyWcfUH{)QzoQn>l~L(ljXd5bQ?qk{I>xR(x6l74R;6 z(Fn1QsrMqm94}qSckzpqUJ!_U8A$GZ&3~ zE~cB%&|~)xuD{}w6*a{5AH7uz(CT2b5{mT&qxil2bG9}NA4Ulzw%0e|d)?E;KE_mc z?8;%RAjv4?63Gg;9kG+4@sgIo$TB6II590*)BSCqoprPc4fx6rK402aS-nGdpj2{; zEIVr7es-$7Y+pFQ@GyI7n*V^0H#UA5`DqMXdY#7=_Qo&l8i={ju9`i-7%1)g;s9mO z>&Bkcmh7-JFRM~o9!JBR3qi5HW;Y9v8cnd-VSl&nQY4xQiv(W-6EMg1=_UmeH2K;7 zoN6OD>4+I58GBMA#}?H{Y6Pyn583(eqhnEq=@rhJ3MrM*kZdYF+0~sXsyH05l5GvX zfyne)>&X)<09adRd?HMheoKL@PTe{&;#@l75}mk9ke>Kt4u|guQDE|cDn=vYUFGx` zku@toyKh#m(V=umJ5AUbqL3nTPGXsG4qrHb?|OgX{%KQ&f&+=T=9`}NvLvHZktDmB zq|XPAgAZMq;6vApP-Ne7!mEf?UzAvWkC6Wp?U<`mCXcsrylUEpX8EzjHP~rwbU}Xe zhTC5D<0}_0(RPWy!rSkToKFJnKzCeQtRNv~u^gt5wKD3$KkV~l)EK!UEuGxmkhid3 zow#umm76B9=+i5`MdJbITG=<$ZWl|t-zqxdH5SNCZIK5)XQRD4I=kh))X<56pQz3B zw`o=jBXiB~7s$smxg={WY=Mt79W@i;?=>|gE0E7Txhd&`eDYXvKwQ%}Iv<;?gWwW7 zd|Z9h@O?)Hyyq#f=X91E>eLE&DP4}{A-k4GRkU86MNOe@zOe+Krv2po)=TU0r&UZ< zm-fqrLB%so84tW@Z1P@i7w4eGxBG6comV!W`7-B2XmKWF1+pK8W601s7l}R*%st;vaP{#Bxk<*BL0Ip? zmU{xDwhdWnj|F2PHmD;_wPtdp%%i5xMd?*X;Y%mhF~6NZ6=dehc4cKC+HOaFZ1 zmbjZAB$;5y+<>|FcqDii2k>L~l%r52cS2|NQ62}Tla*ePITLd|JOnor?;c<~)In{& zf59d`W&HN+`vn)*2*Ih~-B!OoM;tIYE<)@>b6_IAzgvf_qNU7`g@c=6Q~6MzKeoy} zPseR`_@sqcg?WSflmV5cq>=rc99GUxj8zv&F@`#s;7j!TE}sM4xfCaXi795}n6%tZ z^5j!rh>=}yp@kjkVLR9TQK;x5=BRrxSm+?<#DYIaTCW# z+CARo5 z{pY$z1XpgHvA;}r(U(cZ7M!!;pkalo;s$XmS0?{*fN-;O00MVp6^=0;?Z2PoH(Qn9LfsHjeqOw`Av&gKqzqJ zB>Ji!s>33|ZSe9{p2H%5ul4l=VF&MsONRpwsDVB<8VgB&AXKLp7bNP-V z%=T;fkQD$>F}L_ue^e$!*jSpFA~bC7A;3z!U-~(IR0o33gD25ZL00l7+C=7Xn3Mf4 zAVL`2(%jO{)XvEkY;#6R^^m&K5ezJ!HF9!<$(Y)i!i^kFp&$TIbF(-7hJ5NP@*(7~ zM%LE+DwzCl%TM40w^5VQQUkmCrrbm2{|Zq+n4A6rAvCgaR5LRF1x9RQ3br$Kb(BTi zRa3ZU41?Jm5 zj-WyP2mCZR#1?-?Kbm9lDmk8Z^OCt3!O?;&+pO z2^PQ;?=yhMdI*;RE`qMt-_F|K&f3}S-_F|K&f4G3+TYIF-_F|K&f4G3+TYIF-_F|K z&f4G3+TYIF-_F|K&f4G3+TYIF-_F|K&f4G3+TYIF-_F|K&f0%+)_(OyTm#(-0H6w< zphp4#NPyb_6o3K7pp)+^a38P$^N!$&ILd)8Owc9v-(y?_B)*dSO8<~30F?afQ9OeD zb@}R{{Hy$P?ilEs`byzvD99^7(0>XLj@vv+k$T|gdtmt^wE#w{Ob=<`0f#up^1YAR9Hxgf!1Tx?^VJth1Ue-_Uhu$A3@;K` zI6B%3K_GSrcB8|O{@6`mwh&h%dk7~x2LuoiceOV%u{L$QYHSL61Vx$FDr%UnT0%vc zGOyXjvL|lbjZS8GM9gVKK+S=G5gj_|Lj))6^ z`9m;->FN=RqqQiLmcsq3j-a2-+S2hV=w)Z)5@5Y*1~;-bb%DXHuX3{UF@Xf(P%|MF zN$GFoz>+A_H@;n5T-aT>*>Q0;+3XPXU~flkSZe)f z_KUcdT1V1?9i6&*)Rm+u!US$gu;HO~DU1|GCq{n(y6Sy()586gu+jse&3e z731L&{ippOo>xpdkC7#`2dz0V_cDa6`aR`M+W0`^T>TJY4qQtA84^A26Z2mIy}}+)Ydb z@}IE(8}=P7&Hf8RJFNMM>BFKB=*%|-XUCy|i*brT{sVSsE=NEu6;lMv#_0%=p9}IG z_h;}AT-w#(f2Dzch5XyPeyi(WY2aTW|F*8*>iSn2_*clk zt?ReC{*?y)74rXA>pJz$qB=4fI~% zd2wiiP(V9Q+&w51)XL=r|Y#kAMIl{}>qKkBE>E?>Ojp!6zU+ zcKkfyH6l(rE;29@-5nKU`U?(V?71Xv3Gx#ULtYiAnjjeRKXg3~E2Q}HzB8Fea$@qM zIv*ut_lu(I8i!Hs05GK838Lf2PaHAxl_D6|j_|fJ9oHQr2Nh$G8rj2;qyl;gFu>gh zZq@f)CWyyhIwzA0KQfSa^QiIu8k;Wh-OsH5N1m8m`Fv)P64e9v8Dd@cm3vf>v1ku# z7bbZMNzH@$-g@7NgWEP0mlYZc=IFLQ#}5maK$=4nGx1m-y`8Q(FX+b0Pww;Rm_f^& zM~X|E-4k9KA7R0#e`fO24NK=e8oFM(RYvpqv}>ksS6YJgJ_`)(AC%w-HS;#N%7%!UThn0p83+43&$|t7}6bJuiekG)k!M%tctUU=S>h_ zxme~F`DQ{#HnAu#RMK$%=H=@Cj?oH*;wObdG2!{edPVD<#p?<4ZeA6$%aeAh6TUcL zkW-#p@(NiAskb(RCQ(m|VrAdVk~^YrJVdW%Rg5gwvjP#Gk?<&EN+!wM$r22Hf$nex zzorhu0Z*B>!SEv5YqXf$sRL&50&Vm%_$_!+UJ(5={d+|x+YAhalf`ZK^fIth-9(%v zyvEmqsYb0c1lrdt!b3yvU}0@P7j?@GH*S*8JKLl=@KBhX@GL~w&bPe6HcT? zH^`eOobF?iQ#el_IV1D(Ekz^wCiQMuG&yzT2VT_=`<50pe3IDwib=PnHw8Mn4hVKJ zsRj9{UaCa4m>9h41eXFvv{+k6cPj&{h9Ju+){&cZJxve(!=Qcz5aB-k*9J()&HMIE ztovZUTkL%Hq@q}7qhGajY0=DXieMQIAa%aava+4yH&Q0RIMb`u@id=Ff1KskvH6_> zzN~3DZ$_QoOcK)^PtM1-oZwQY28U4F-WKG_ifCchq&iHwhPlpggnHlAu8F)%B%n)j zX2SYZwgXdGg(=HMa2&<^k^P6tHmp#sUiGS_FnLmC-kU6=(o7_>brHk*%7_w&To%ui z9urhS27j5cY%~~y#97hQQP+j~a-k5lXxC2gu186y?`E9zUV_n@ZT*ZXR%c?_W#CR# zx4wSuISa`%m$U!030JCRuX#V;SU>8QpK@cgS`64M%dBrI@b_Hu&qGTtUA*bsdx)nMS zDj+F2FGush=rAZPKy<1vPmb<@DRhq9zp8u9`M%QYa*u%lwC3xW5Koyml+uXD_2(VD zEI&6>t;~KL;_q2o=b%eV~2#pbN17i&xBSiUs+vM z!>*w9Zo7@$F}xETN#NP?>~-qh>xwH|iY>|`T62&cC@gA7IM%jB@9B#^wBGZ0|AnSbmK_v~#I=NxQzbZCv1hf26%OP5EbaES-aSi>1h$$lINk9+pS~cAGTQS`xVe zt+*hov=7~tzb+v^l}K=%|Gb*GZn)_=Q+4hP%15oRCCgQ7>jf%x-4>o&$Dea~yAn-K z=C8@b<*;kyi`2#eJouI)!g+YbIr>hq)j@;l;Wk#qAy{eYc=L0LV011hj6z;C6}EaG zqB(9Z>DV%3B79~~=XuC#hh1E-2lrg#So^eHX;un6GmkKBTSqQdDWqGkwxz0pB_~8Z zGonpWGfUI2Ke*5^Fl+MMW_ge*qhV{CE>-`Xab^z={nz>z<#g%t>6%POs55auWrBP_ z_;kCZjHo_+xVkHE&7kGgm4v&qa2>V~zZksO+^>0|sKu7^XxKhQ zD@$5((bBOwCdEa{Nz`?{J4@dE8MNDp*s;V@eVRo*r@2K~b+i8R!2SsIxoO{CrRVb= z4w0fEEy6s6S)@wd&?r4r$NqC*lFa87i$2@N9xLVa=LrmgglW-jvk2~~R$XD!ex{%+ zrl0OA%NuI}cr@uh4Z}}ag4w%M;h9ZT!B$(vO==jXPd5{&@AK&40A^=zgj!&U?#Yp2 zZ8l9gdpXq#edQ!ijSz~N>5|!xWt+yGT+V?~>a^baZs6B=x+y&g_EE+Z!}38PFlQ z@%ZDPOG~PKU8dGArru-he7tdChor33ptaIvv=lMW+;CIg20gDXHQ8T_&6~eI8o&GG zO+}}9MGmH2J;`J1M6R!9{kDTA^6uykVe4>gbWw{|fwpR)uzM&Y%SYWCGcer(3F^|2 zJyvVRs^LO5R0XMCNv@pY^B12-MHn`#XkXarxbRMMEAoy8=`<9c!~twI8Xaq2Lgpls zi=9KvIQLl2G?Q)!cbtPY9-QKrPk5+_vOjAs;*zfgf4h%J@ z`SGlC@l0$~NRJl^iiWod3AYxo#rub;u!Lo=lG{b7XD;>^4=^gkHZQXeJ!P!)jf`BX zGnnqF-xbPnv7X@>cNe&px_Iz8X+}EcZA_hTN`?4>Ox?=8FayKaNae@F!}3HWbgS#m z^Mm9()h-SpO*&mwCpYeWCJgb~F*GUJYi?@sOj(D%2-RYI09^EY@I!6?RmQp^7HT`% zf2xq#qBr4%>4@cPjjit7_)M$ZNYq_w*A1k2X(HPgr+;XDQf6^ys+ozaYGt56p3*(! ztwJMZ@*9=P?)SGHtN-Y*T#+W*D|YM^&EKJY&>)m7x=*Wfv%PWl^~|73!6<{%DqEH; zE0emKm8(Y@JdC?x@oz+S4DEk5X&M(*7l)VqtY`@#Ut$c>|IsqV~Lq-FS=h@>Z~d$ z2a(G^>ZwqduUSPqY~Kybygy#-6zO=*g?(>@@b;%k{zoNaGZu{n%)P!#pW+w2Vk5hj z$vojQEYu8&GWks!Wm#%!hNqa9qB>swhuUay-G4Jbe1Ta_-u2j}E@2jGICSZ+EM>UYo zmXK;z7(>E3kh!n?O>4ipD3qXkO}>ItgwOepifys_js)+FBjenrIR(0a;v?R zgPU!;(+auiAD#RA0HUCyAQk_in12Gea_!ofIXB<)))+0N*kB~jRb-yAF4tLmu=8kM z(LOYeVd_SuTG;!vzUVu}urXz*bC-PBN0z*NHU%ZADIVE5md^C&vrMnY4;n`SUsQCC?i#Ny$QLXa&;EM^r~6NW^7RM8A{nuH1I}K ze0L`Az98jn%^Y=~Pn(~epsj4mjx?qT#o}I7z+2?{3Pol{BJ4k+wOioo|7>JfE?kD! zHECC8dciuZ7AmJ*v=cNnv#Q@-+E1CwBpgM}*BqfHgrO00G@8z4zt6~^nA;s-+w78uIj z#-k!!)SGkR>*|K5;wwC0rY_Fv*Pha{%zBx{x2UUwaQLpgXpyrSzm>Mk*$U+yA!UY` z1X|*-#y+R)>R1i#m0=#NzO~0jOQ&yWdEB_l5@!W{q_eOhp_o3|7!!HOdGJwN3VyBP z0sLSa$(>L!XJ+2O%Aw1l9IPTaP$y+{4xpp_Mauv80-;YUyUx^3U}0{Ka!Fa#@Uk7V zbdyqHOoA2K+sH6ym0z5lpW-#kasfsAQoi+QbMvm}dFhR@nB1L#fwqMpEq3K=)xPAm z5UO}H;o3Dhez!KhK!RwSCV?4*Z3p`{Q?=S&`4Z|LMOW%jP{V#}BE-$de_X34g8VMm z{UpYjm^|&Qg~G1DF>Xg@`q;8EhcXqvC6U17%>GnId8#})?=EKX;anX9y-kwK)%lk6 z>Tjk$OUk#%txIhUP6amHeKG;1H-)PNggS(}zD|^b^1T^o8vyivlA8e6`_n+vV=WO^ zhE0qkSj_qE^$x4EeqQ(#f11a4zO-#C4(}NlEthAom@WR{hsNM`J?bcDgU%?yYsWo z{2|xvVcp^^;Sk|LWr4g9%9Me3f@UyYXS=;wNaTgt?V6F$#lx}wqx333ANiA<|KqGR z^)PgbKbO;%y_2rem%PvAdAKLc5Ff2v(P57A>&5}w2D)~RYMMGwn^85j%m!AgD(3yW zP^IlY-EP(KSZdlT2kT?$A<(N*x-3PCY%VXsQQvFhGti$s3B6u07%>wOyIBrBP)3Og zMA>Ee8kb@>xm#8+LE~D_MsH=1Z`}y2EK;9r*zK-waLcqi&RhrGp=9H~Q$;n;zG9d( zJKEdH>NM%Uz&U2(?@;7o!0j?I(PCoY7c428WY7cKjGErK%+3`snMRm;iB(lsRVnpc zz!%`{5AkVneLu!~zN)gMK}W&MjZVVWt}axYrbxOtL;e04_N~!@mFUNb5YK7NB+HUV zRhFg(Ez}s}gy{mo_?5Q|Rpp3WNS@*Q^O=FLnEJGs`fJg%ihJebu@Ac>zRU8#m~p zi_=`Ex272tRp2|T{uY~qce}@4OL|q%#Oe6OU2aJ3-K)JUubg%*BEfjB0!kk=%+z@? z@(wZlJvAk}vk0|3O=x57&i=DB_n8%5%Ajz5dt&*7_R;v(4sMTnRgZ}IIu{dKPBBhp zxf{TV)OSCm`*#^U+D+j|d)VpY)dkijZ9~N#zCyx%Ojl-=F#K*QEG?ref6i=AsJ)d* z4I3Ys&Y?`@$qjdBTA^3zJ=Y-U<{IfB?rii5YsQl+N5MpyPqq}}+qLb6%_xKCRxZXl zF89+rweJOUZSAUoZ6q|F#N4$<7&Bx{xe2jk23QDcO}F zv%+smvxf$KYYuF?Gfe6GpQx01kZ&Yh%q+06Ot?tPhW^Wv+7ul+KTRu3R}(hA z#=2>%n<*oQ-Ci}7aw2VC5?u`6j2~i)o6=(xEWTK0JUkM5+U_G_hWNeS=-RlOK>zB# z>9(!f1U-fd2b6ZPS}~sY{p7kX&~lGYY@8Z8%D27psn+0THM#n3vj?$4u2pwWp

M z=6ay=VsHw^a@QB7@rp*s;0qw~`0962zNZ(5M?XHOmmh(`OPt}@_Q}Z`@taVD8cKUy z8~TTQwpXjB^J*ra#g)N}nQ;`s#$~T%)bk$|+z<61y&mJgdG|GoGt*1JY#UTE3Ho;^jiI~jam9_Y;u;)oj;NTGSyu|FN4hRpEUHuU$YWSTd=zH_%~6BM?r~PwD^}fc zQ}0Xr@)ca}#Dw*j(cJ-E>}S4W7CBRRG%W8-7b~ z6Iiqu%HkJjIEoGFN8gj?$Yo{>+&MTHTk@;pwwjtros}xjBhRXfzy^m^87ASKMNqqp zzyiBPr>$lR0>{>Z{OhRLNPD(Y4DtowS*CR*_90{K;f>>*v^UYLE)>OLSF)bxg~f7m z?}fJ*6qH;1nv#TOdj z51_m?c8=YzcdC-v_N^DBkKvOi>$*EFiMY}$WgU~DhENw$zMpcesj2#p>h@XDw8(Ic zu8E$8_8q2z@Ff&Wh6kCTdyEGcxMRD@Q*AO6gVozC_q;&EH>l=OpwE@#DC;f;u?SP> zxN@n6o9PqYtMdev9UX0}asbHHI&VtPMCs>BdD_zMK>AC= z{wklG{N?kjoh>WZJVMihwxZU!l!SZ3^lUm_jN7b=MD(`aj;ODZ49Q^(bS=>8FQp0m zQrxzei)yhh-7L`!Bejlt<7D*K_-4MxJtVldFVt!nKfD~*5#>nvdMG>XlIe=8R28ZN z4M#eJS(OIbjs-*k{jD#5(ff(gxZ!KuQHdx*v76KRIqK0=@s_q-nX_LO9Q8{Ml2pJo zXf{jlc@A7z*)=ICbmP)6Tsw19t-2RxHUGl%zPBvhpp+atBqguXZ*1vlYwk!*M1W>kE~JUH429ZMeag$1@~dC)TB6zh@+rO8)AE1`bNP7CjNPW$ zm*M+*che*L8vh(EsB|h8He?fO_@jB&y0z25I5L3EFBA+$ztMmY*<+&Up67pn7k4BF z?YF%^qA;eA;@YWIxMuL(l@$}mf+}}Xs&HmIBwNV1Zh^-Nd+5|PA+E6ta#`B?oYFl? zWU{5}XDc*1E?XC~F{G4MkD-REhL_{t&y_QOba94ZGFsp>)5XaFsk4 z+QFn!rJVH>?m^C#5h^3Su`f#?axf_UR%1CSJk)RD`sMhNiJ`aDHuoI0FUG818S3m3 zE~@mlOaP|($4z&%y$UAdL*Zc?g`dDcpz{C$>HS|u;<(e?v&DP4R-#o_TTZW;)y*_= zl=~ryRTf3tY};P(_mG}SmkufgXc)0(?kub?JsazEtP!e%4TdzqUG)dXaR&MdUQWC- zEq$`9450ii>YAcXg6f``b|R5!S=3N9rbHw2N0@vv46a?M&Xn$6;yTe(btmlbCXGcz?*H-u#isi!zxz z+IPcS<(T^31%+g0b))nbjDzG`FC7o*$;mu@YVK+HKG~Q3(8-5l84kC_UjigFjXz0C zmB+Coj#jlEh0;044qC!Y541&AeY|u@H=N32w!#_PHOus7GBbNMn^ST+Y^L%`8LLUd zSMwd{s>sj#vwh%`xd~C~-H}w5NZ)v!P%vb}ZoSTJ=*zU|t>%5DzxqzKYX^zsXE3@s z7&UY5WrX0h3QEdo?~w{G)(vYdUN+K5HpSeS9MJ*~vG%l@aymq(xeIUj2!F|%)?8^w zLG5-9IZbbm-xGZq#xtubBiT3r{C3Qfk9`_5NO?z*OGRpsQ2cnfkKnWXmiK8=)2!h- zy*+{Ov?8-S5@*c4z3aE8xSzZd)Z~5gas*nQdO7gQ1Arp@C+WfXq4#GMd+e5nDJk-c zDbRxylXYWP)_v;|$N1B4A0&^i4GE|IseiMec~50*CU+tgl}wXf?O&d$y-|P&wgTgs zl?qMgTuN$S(S5#^N*YGDZ^lU0utGK!TYBBfRngrk7@A*@?ZtS|=p~8+o(D!fTgc;P zD}vc%+XU!<8?CJO2)R0a?sKiav_FeHG-1QG0pzc*4CjoL6f{Xnc?M1H;$IGWV)q$Z)557YzVrQ1yJSDorbAkdkuN4M2qiLq%IaK*xF~EYOk4M^x|Wo1Cos6t9uVCG4G91)*%pU6 zQ`?(xQhMOluo+wV=q}~SnHB3&!<9JRrGC{_)|^!L-I4j2T(op>2M^@n z-iPtwoV^k`@p{=7u?_USH$bQCtsndnkeB7go0f9z*f{&VH+7(=sV3rMV(|{~vUk=# z)wkCq<?i}3JWg9TZRM@SNvK-)e9O-5g+0F#Ux zJz}6{HY~rXEcB^jUQB?-DHRO}$~X;D%uKfE+D`!x1^jKd%W|Y`_+&X>>S&QouZL9v z%B=dbL(-x#k~Aj9?rK{^t9C?nWu4MVbwjevl5Pr;s=ji4F&^#8v?97>U-CTvy>J)0sY!=UbSON>aI`syjRdko%`euU z-;|W*I^S8y;o_c=-~z>ek!5@ zE-YGQUgSHJ;~=}5Pv>a8BDWUbyT_O~viH0MJKi|Us3tvhYwvtDC7l!5#@n=5d1}7p zF=vgPv)WawOEr~Ka`~6XT8lH?(kEMN0@d3GE9v$0QZQQC+G_chP7zGu!w$nRi=o?G zEOxoz0$XPFMWb9&fi)>vou@vaCn35lj+Zn?I_;QblD9-yfY~N@>nvOA;8=;BQd7{( z)|DqJezK0BbLFoW=&z=MU$%+T#26Wee~ubRPcXoK_Vd+DOs`ow&6sw)zD{aA4{0wY zqd$WKa6lONUkYsJ*s##bIe?&-^8rWzugO->NW9X9l_uc^h4_~gPs5&@+8~IiVwsi3 zTYy4o9qL)r&&%%e5sX7FW4K5;Qg~ikxALHV2oUT%jHCMXpo-*9+wpoD7uJ9;gJl_{ zM70(5l*JQ)bf>*l6Q;|~aL)ob zYv1~vk8dd+IiertHC1}8{Z4a-Ux;w8WM=mHOwRF;Pz#6W2g0i|GEQzKb4cZdHHsBO zT8Yk+J}kkH*#ax-^^#cm9mFV;Qe8zehp=}tY(4hl!>d-t9W=!17yA0|Rtl9@l!6h( z=i?&d_oC(Da1Z##WbmFd(%I9Hl#G*xA+;a#w3kRBd%3*SZ<05Q!Ag*_G2MmQfd&A+ zZe*StpQIHk5jN{SO_p(8&Z^OO|Au?Z))rMH_$!Kpxsgn7Q>;3lM>wxeNU5iU*{?WR zQnqt=qT4VFRq-a&#Zm!J-_S9wTwYB}%IQ%Do3x862;rMx-q+X{M5^cRNk!8Ic}{d~+6>JM^{jE0p6C~f z^T`137kKJPw^)z{Zi)0-3KljbPV zF`lYxvVqmC#k!4D>7FnxQ%kifT8&9iu?+9tcz`#2^&4KX=9vf4Bc|!AyKh5@< zqe_00lnke18M)Z`<9*<{TLOQ189$Qw*)bO6Ao1M%nVM7kiY5z}a?*Y|R z*7c3YQO8kih=BBwDqTQ&bCiyNl+Z#^s&q-{q1X@s0coMbNGBm+CEgC0)>KZN0i6B5?jqoP`yaXO|8daNcl0%Pf4&Bf!W@V zGsihX;{dHfOM~@@P)0G4#%QjLfr(PP1{I94O+tY(yj_?*2?8`U#zz>=>OGRrlDUmJ zNV9ED*i{v>ypHg^Jm(x`sX~TGXFpaUq}$Ec5+`5EX04$Guz5{vc;oBuoFWeS^P!g+o(_pFXw? zKQnz#`d+7(5hzUqHG=oX`pxOOInKAtO!xDKyvSd4N5RV?dHi#C4$GGIjtcM8u;HAi z{9)4Wl1~POg_d>E-2R{HjnXr02Ce7Y)=2GrduDnh!nNM&nFKSc!Z!Q3XaiauYFMH# ziBitDR)P2&ttt3LcBQ%RdczMjGQW}U)yHE9wmE(4Y7vfNiuP#!PuHzT(zIuiQNb`k za0%6J>rmua9bSbo)~a%NiRuNzeKuSJuD!-fSQ)wSVVG;a1=i(vcJ|n62l_It5L$IX z{$^Zs{mP|C8wSzf5vwd)T3wuL^9Z{weTTF(M0s>2d&8Jk#~@8dq?LB`IBDp>D9UBLVf z&jR3u+V6i6{DsRsDz@5gzGAB_8fDcrmNU;?1uByXyCsu@QYmrkVIRIhRUBgF^MZ{~ zys>Jg^|U`MJPBe&{9as4!;^~qveIMikO-Wd^5EO?y0eeb0vF}J;~#&WyxbnVrLU>Y zZ}6hO+t-?3Vp&~%qf}BpsB=jXd7>9$?tC|o;H=|IP zgK*frLQHexo{ezDRCGX}(zK16&Q_l*v^Fy{tJ!Ds41s2!8KN>8h_ikRqw7&7XpjhG zVYUIQCu&;$o_}xFhSSX_sEgMLViAn=9BoCF2^Shfa7ivY@-Pd$(YWN{(FI!~G)1J#SI+NsHDnx*2F+>C9rX_HuUwLv;|N?bg)gI zJlnXFQGTGsEFzLZ+D$YE>~=ZR{1o`ly|~`MiHb+jCTMh&>TA<-+hNhbCx-~tddMZ2 zB_f-GMh+kH#l;V^#5{Mj#&sr)o`;2S;&2KD8*o6J>j{*2Dnn&)^lZyxyG^eVqn67p z{UJ$B+4*)ibsHi}p@9IMgsDX50>(GGC4h6U{ue3~CtWEg(~)}mF`FAiXs7c5eaCv{ z9y~k44Fr-)pp)alge&kw#@HLrRMTJoZnKgR6`h%BIzw#=xp*J&)3?8_;=f6BsRoV4 z#XPSKPi(1|zz;#qX0VLc`+zdpg5OCxm)?*rhoj>8Q05dXmkBNQ<@2RkMoBiudBU;g{ttssxYnDSJ{Gt(&A;6in)yW}#ug zH}2y?eJnT5Ro%Hka|L9PZC@3zMXGF1kh+Klft?D<)(?ncQ7K0LFT&S1rOkG37q*71 zhf(3DXp88>wVM^>mqdB-tDvKJU_H}jag3U)54YjG|aehv~Ei!H={x(}Y`;Y!?FV#h-gV?h- zu+=J3*HycKEmT-`ct5S|c|pdM;?WgrG_%2dZ{H2aTw2-pt1OLYH05fxcdY_7UN?&a zus_{-^?x(W|NQReY}&Y8dD1He*%>%?iuY%b3=37t6!8p{0R zdf{Qm1fk~`7`hk_QJmgM0h7+s#iMfiE|#A@uw_*Joeg#8$3Ql%Jm#NcO#V*7O&sj* zfcwKv-ig(9t#d<}dt8ea1c5EOALp*LH13g2Pg(k(ScJzgwU^zp{R01Ulv@99N7+7~ zm3JvIEYC&Z?8T@Fl1AO`L^Za#xXR}DU??n$skK(4A;ZaA`}%6a%;N4jAvo_o)Qb{s zg$6a*GtIc~PO~Hj=4R&8DSqeR;MRWHgcL?k744i~Vp<6QxMLZ4bPgNeOT!obwz8qS zwl0m3Te9#y8wHK>NY^-Zv682OgYE>+XAX=p0|{t(RUvfr>A6zB`xYa-+P_DcEX2ov zgY!#9p6_MNkF(id3+$`30AV`^X*CGT2b`|+_;C1DzttunC`49?dMf)=_cWkujia>0vMdOavbo@Oh8sX;b;I(W%}~ z22-k>-*1?;6P?k686aBIVBqFQUga znh3VOxZ$Bq87JAJ{yJFCZ)L_?zE5VurtrGm&Qs!bL5y|JnP&j!yTt!FNSfZ(JU&91 zukRR^X6ykY>FMR*@XYviIsZq`WU65IRZ_?vru_op+(p|rrbx11)|Pe728VcODqv3A z(vGg{AU-b1P3=P-&VKj&+{~QcE^EhktY3d#vDD+-s(kia_9CC_LTZ9+tz|XClAV3% zb2t2HM-2M7uD)$9D+;!E%}1upGFKtcSeGbgI5uio9mW{`TKUYgp(vw>?~xUYLXy$| zj3dsE{&m#51FM|KDH_D^&mvF%Hi-Yyyz+Y&%)l9POBYAZk#3Fs?QEYPuJD4mJT6w0 zd+Oum-zy5?B(suG9dq*Z-C)tb`F)aUB?*r`hOtoV&hw1V8(km!%)kd;#IxcLk(#YV z1{>pECplx6b13~IJx3FEK2&@*V{{y@@vY@}GZZO!tb%bLl|Guz9;i^LH#Glt1@Xmt z;>y0gyEE4=wFi}ij{Nr`Lgo+k(D~By989H4jkwl%fcluF* zRFoflfAiR=xlP{#cLq_S}A$2-Qn zwPg~LU970oAC0rDtWVL|%?}c{uVe_ysY=j>Bxlxn4pkfv^3&jaG=CxdB_<|dUwb-! z;>Eh`5_vCcZaIlSB9H~0D}yC_CYV`WC$=_e)mU-jJ5!p8euVeRBkN9M)qA^zq;Hm! zrTq`SQV869Oxo6M+RW36l{SP2U%CJ;epE&GEVMQrl9-ggkJWW^c=u)G72wPNqOSa9 zanL%?_cg{V$K-TNrKkAQGRz%lJSpLTcJ5#^zY>a5A!FV-7y;btFJ7;P48g&!hF5H? zbK3|}ie?gIF;+oUiWH{0*uWw}+Zv7$Z#NQ|UhVaB(P@iEd4=t`Ohfm$Ke2J;xIQk$ z*Rt5p`bgue`7(+vTZ25VikVmqW_AiWVbu6}ezy zy8spkc5hn+Mb&?ifBR`9Wy^e`LK~H!txHf}ZJSvViRZydN;6cFvzuhX zoh@_3`%#MSNPP98J`9V{lpaTXNFR<2&G4I7;Qs-*GAbjzK!Aq@)Z%WFQVKZx{$gxi zN)!y?lwt`?NH*lDdZRsNb6JZ*tKjJEV>iopr_?H4JJ8}00wT<_-*DWePja&t*ndG( z5d4W(NyV7mqReF4n4?N0%@RS0wZ)s1T0tBkpYm$AMthNGX7ZFw>$+=j3p-KK{#qZ6 zArpgFs}`<6mY^50ONfumSWbqX#8%AkrsS{ZB_7iZ@7|PZ_IBwY#(N=vD~?@tR;kyv z;~lie@(Of|8I@R5fX1`1uyaXHZkOW-8pS1nUhD*e^O-}#IebJH`ZMk?%EWP1RfeDn zZfe)e=3d&Vy=q4nX`D^{fXrdx4XJ%#aNFqE{46EteL+u}ZCV0C5=IeeI%Zlq-h7=S zD#ANG+~_R;xbE}hZ>!}TNGfx3qLg5xc>&q3&R!k^bGzW_^MWMoQ$HxN4jITEBq=Kk zYj!O`Dp&%|xRMeREA)k{ao6v3?=b0iG+z=+=**He^Fu$ao!Sam{qE&zkv%M-!YprC zV1b*H5C(x~wC$6&8LYp!yq?NphuJtt^8_p&NtUJanZ zCHY}?ZDI(TI`%|=6KQR@dsg|ImmN$#&!MlrLY>EOv!hj0x*H5Eb4z@iJ|oE6uYI9B z$`oPKIxu6BOH{el0yYaM1l`1W?k-_QhKI*`fWU+?vo}EE^iR8j$I7g1L%iFt^wmPv z812r1B#~yXNdivQFDw`%uEceIkrHVFfK2_ZYTmEEw~mN(AC z&2qTFYF<7-8u@r33QMdrW{9AHIb^MpkOU7;MtCubN{Vvzkn1VQ&8Z}n)PtRJ5-Jrl z5W=R%d~ZWP1{;TV={oY=!K%Dr8b2Jta4vK>PDW$jyF6&4xL9A+y9%M2`qzh* z4hMT=k+UhXg3u3H{cXGYd(4H!jvDZ?i0Xi#5YIuS9@N_?7BM~t32Cc+EbEYddWoyw zzWB>woJz0f+)6IaSMeCBt*$+jmy@fZXzasdalIycd>^+Pn~0d-Qm`@lSiKv3G?#2E zI4Q8@7UvqETi;Cn8e!!qucKowMTeFrqqn*oSgNe_R_Pgm9K1Kc{R(leu8vmqX>7z( zL?kz5X?Txm)S{Q8MQnw@K-m-jItQ-`_ZPU!R9-_NRqH2J)P1jG_?%cRx8z^g77SLd zrPO_;FhF~;6Beba`+l*I)FFSaGK`tjG%K~=NAEGF&>3c9bduqBO8+s_-IlS?E6p9c z(TH*Zcy;u{ID1A=@5`ztF6Kpuii{%`W3nc?n-!7yKS=>B_VEOvTl+*9aS91BT zL>J$g(XKF(?2nurK#c1etc@TK)!vw`g*h2bOT{*|9ij2e22#d*iK1+_Z)8HG$g^GL zOTJcBmTl66IYPIYOGv|=)HT@6Q0p8EBslRV)|%>Oy5t~?ocL5D;wlkCGe)1jqD2eV zT#=cU5)KMNm8fz!yaE8Y{zjH$<&ym(oJIEU*BCQ?IDW=k#M(am{ozS`PY4lrwwg?N zMo?Q|WX`LPqo|+Wh&%p9vVKU&aCsI4tdO=W+4!uxFB&t4AFo8;HlIb+dUV5!uEQ1U zVsqf?Ly`#D#70r^?zd4}x?fMp&#W)M?9?rR&2TE|>r6;|tioF&pVvhuN=93{=`0>9 zCyschwLMMx%=a#r;<6)M|92L`xk>D|$#tjw=&q3JmL0Wqr}wfAk$vgeMDMkW{h7I& z?=o#I18ysLtcrTDVBn`!E4W~gby{M@UErjm~`N+qrnJm>O+t-dIP&~V_ zZna-z1KiTNyT(kng@ATxjb_}zbWKCs(pAM4bZnW9yKO3)(Hz}Xu~ANAPdsFK>ztoX$2=vCABU2y~aZ0!n`zCv2w4 z?Kc&sX%RiMEL%R}oh0-FAnZSgjs=Z*<@=BBtvoQoN?SmvmXz;@Zz#y=d-6V}w`-s5(@ zxU3wUWx9KOO-L+EI-2Exphaq<2n;Q$xCUi} zcu>_{wSE9poTUx9+LD~g2*Kmy_1xdurum>=aaDGm-o7-SK_rb}S8JIGytz19nJ20$ zEHdo)a?D+>D7H7zX7>_JCHVn3cV$^__8Uf=(kYw(0+QXAD@mfZkXFNfqMXX)gqix} zuFpENK}*;$(}QoT%2>DRmolktv{I%Z_>_r`NTuSkgYC!q^uu&krx-5lq4Cez6+07z zIJ<%~_MninP5zpf>SEcS07{8>2fba~{90p|ewnx1L7Pf19%e@Qfb1k>jQ02ZnD(}f z4Fa!<*cUfkd*Uj%dU2_yX*}Q7R2n5ok49n;gTNR>d%@=^3n12HGL^G`?fep2t+%sjS6~8RWs{UgWCv)^p8I z%wjKvb4G_@_$U;rWB=rr!sAYPG1m2-PJarVvkPi`G~2vE50Rwg5vyVT$s>-wS${$vPSm-fUv)DVSlO*y}LJ%vKqr`YgU}cBYzL#GFQq^xsE9W*^4@@)KOibZGM!DSF%;pS9uEHTl zA5+G;lrEczx$*sU|AT+#;J!a0A{k> z-q~1KYWV>$(_Futd60gm>~6xipNy8HYrBXS4KOd$6LX6XvYZicNe{V>o0#-VsdD+3`xf$Sse$ETBYP@1GjAIr za1`i@XaxrIZ{kNAsPFSK-?vh7v0=mMG>EDG2S6<*q~VuS?)=?Ojs*0VvbB!3k_R0N zs8U~{VQ=?JW6}}YY(L8u!BYlukMxImAk!FY5bE0EGn+-a&s{f`2}iY~mLGDXeo4D< z)!kcd$iW*$BfnPP8?I*fjC^DuyR0hKc;rjg9O)9`i|=f!5fjwckjCKE)7JNQGJ zI@fueamr4Lxa0Rc>H!^yiI07lyK&M)kv}Uj)<8htR5kfRhK=BQX8j^(@NBDqSmkrT zEy5pO?>{2I&xfm-nAn8VNbv^QY}zkDaqA#Iqd^`sp`u4RS*mhL@{ency;seVMWKij zYf(@7AmE4WZw5&%{ioy#h=FT+txSEF7G;!L?T9g1)U1|c#K3UbdO0|5-$9t7V)Fiz zw`O07meR{7f(q@CT|r*URflbKY%V7{N7T3=&XZ8m<%G12ZeQh()xS?NGSVBmMz=Cv z*MDm84*}B7S5@YzFgC;u6|P^C9O_>bs3G#=6>rH-os}5-Gfi}?W|kggCWVal3oU|0 zE%(G7SNy}vT);7!VeTN&MpsKG zGZVr+i?`%fAc`_I5hb~)zU%Lx{%-bi=#I_Jhod!f$1BIB{44PTpbf{e-;By)=sZoK`9YMD9q($P3INL#J#dmb3mbFtRFMz2UX?Gn?NgE4%5 zxER%JGSn6@K@BTz!_|i;yTTEzv^f4Y&yz-c?;U69JI`>$esQvJ*!#w~ejZTRdoByY z=ptu%5Rn#dhF|Tj|1^5|LPBm~mmrl0BE7YbQ3NZ8FjZ|$q5Ka^-^q2k3oDN`SGC?U z6#j+)TJl(aunY-Dm7;AV?s}$G80U(v4hUSdNs3iC%}@$+p)T$6#62Tb*Y4o&$KL8P zZ@k{99%dApA4-mbXO4^4I{LMZexcL^+&|da^WH5;Hi}Kq^qcW-J2k$44v$3pk%c`H zGv`JN1nN829ftk`Tluvt#4{-vouND}vGYW55I`d6XH((=uRyHjH7Lq%Uyn4HJ7423W(VAS0 z17|Z(+jCqJN<7~%jicI1pD1DkCzZV#$7g67cV12i7D>_Wvg3>GZ~bL_){?T@zG<`<7k-O+*X81FW~69+GaIjwz#|%ERzBi^ zi)~&H4iS5M4wUqAj85t0*}Xqrr7xlV;{fSq+I#+=hl|p;+1c3LiglhruT+d{0g@;u zuK+D^8ED-$TfsLcx7tp6&9ym9f}l0bPf!Y(Lg|T7K*ln4vCk#zF%i+@Xe~n2Z=b>$ zMZFA#kQ)o}#mIG*g|ptS)s9Y?SerR*2TS}MHQS;-F1XmMP$fC!<-t{^!B(^)uSxAe z%(~sStV9)`M^zbU^l`E;xuZTy7hxqnJyu%{_v1oTj!4(HqPLFie?9TDx%l36H}wpr z)moO)c1B3Ay1(EfT#R?#I$^puCsZLrQgiI(`)uDjr{TG$ zk%Pyr7uG}=pGjF7k4;?6$c~j$6ex-?^Ti)EBVl%B;W7A1!qWQ4zhXE#s{bOQ~U;AJdW?xG&Ok`*-6qt>?GMYpZ8pm4>q9prCyzT_|HlB z_l9q`l1#tK)Rac^)fZ*75X2aJ%PcWSmYOR)=k~mBatbt#;-QPnS9dF)QP)ac@@Z!) zu7C&WFS&X-nKFP`J-t+&3HagpMeRMe2pD8E+EK36Uf?y)nlkY%1?Cc%j@2^U)q3t_ zX<-#x%7$8$D}&Cbkz*!=k-1>99cxK$kE~x+84{uz5wJ8E@jN|LzIe8hMPzm* z?JBZ)tt@|4Yq$IYjqZ?j&6PW_=-ooPtjKHyyR3EiVfa)S0r>+E!8M)YHo|S;Q-E@R zxHp9|JH#D$r*@c5t@#e#)+=J=0|HGy4Cmfmp=P*=*Gh`CP5o-&;LpNqL*Le7GIYq% zH(a1AkJ{rDceD@|rD4DwPm*fu!G_k8{cJ$%vC4tdqMVVK`1#@8qX(1&Qzj=~9OI5A zsj@#Vv3=hKs1LR2$hNWB+G=++-%oI<>9Uf(wY13a*0`uPs{X2hd}!a;D|tURX+PJ+ zIVlE6=D29%Xl-sSy)-Y34h%Sd?&&|L;~bJkz5Th5N|M*?CkbT{lZ5BHW|mH1e&de0 z8RF>MKu$q2-<@*ddlYR+LbMNor>z!@75(jekvz%DqwJ8qRe{<6za}Uo@J7n$}4`@E81=U$s(pT#5n-~ zv(Vrb_4lT0r9L*@#(G=QO7&*h`kL!LQR?JFmV2Fy4sFVWzB93e>nbUps-S5m9)Vai zex%#puO)#cy%b`VtS|T|b3Fw4X#|?w*D~MEW;bP+%B`B=QOg3`DB9ZTRoXDP7U`ZOc6pJv*a<09^A5q)zcIrVF&Hi*=@U*bdl)l*4c)j;cNXlC8 z7_X+prN#>Vuf+Rxo#eDt(JH*=?WHl@i^OL^fx>(|;1kU{O1z;VBU5pm;nU%Df^AC9 z&vqq5v69xN(>zI+RRe}k=idFBqeLk8kGvQ=D!)PtPdDS zjzv|6DvoH7&qA%V5~!o+R z+d|eMA1X{ADU#)Sy)TxE*VHC|YGQSz?Vlg*joaoGVjfA3v9D4OU=0%&TJht2pmHSp zH84;P+gYX~uhh19x_ExxUjqv6rrDkOwP2tH8!R4ORrZ0ZAz2$doEr9y>T{->i!RE+ z%+XC^v&Z!4+ir9xoOh0~YN=3qcW? zUjZWj9$U;M4&}Bli0|kaiJGq`sQrO!zz?F3U1JNU(>3hqa$u_ky!lzr190HBP>_-0 zf(vh~uNM)8wl0W*rI?ATci>y6*>zj*9t<3weP(v&DDcN_-)v=fUAQx2k@cO%bujEd zvr^qNYp=HZmUMDIWSJH)bfaW7UW&W4fXtDU)lc6j3wU@%_&&hU;G`Js#LNue|VwUE6FKE_`&sjDoMfS2A~UUH0?9 zIqkjSFhRm<@47JSG6srVUuAreplPX`EwnMz9;9B@;#dkvT@Ef&P=gK67VpU`7`KrE zGKotyAF*VD<~VN#;(E(Ex1-lxHMODP&Ef1yt>a{?rqIETQ(`>0jCFS*!4xs7Q*V-7 zvT!#19@TZkwd{IoW21V=C|VNg;nuv`-n5Zcf(hTK@7-f^=MsVP+B?K_>?zZCK~0Nk z&zqrf!R;gY&kz2-YyNpU_ihwwaK08>@gZIaQG3EK}0^YLFjg?<9jIQV{cG_*c6huJ)NMQx_FlDD7$2nV_p9vzXoEgk&r(;elGZ5#7_tOBtaV zJ^rT2LGM(2!b+}pXYVK`9{+rKc96>a+Tb_IHI>H>9=pA0Pig=jjvknb*ZBZXa&rK# z<*03EjnVr#d(C}ert?Te!3Ok&#y8Z(ot{Ga8JqCQ#RhAN*FYznwaU(O+{aVC4nLcG(RV{_>R>^kOtp{+xwsU8YL$*Z4LE!D*NtCzZ7HPZO6YY(DCMBlxrN-0xZK1VQt3LoB z_w^ruKKsVgQB|to$bA(pypI#|$mGgdp|uufz-u-67La_*c#w$t0Vpn0x-r)%o(D#e zYlz1EQT_rw?m7d-KOJmoJZ?>`Kg{Ggp1gaM=F8nRy4`H|b=KXW7Hgn$?_SQf^{rC| ztNN2iAb#}p7q74z&U`Hk6Itx;VTbv*eor&F=fc=P^aHKZ2$!oT6{OV4jz}rKUXI1U z0+C@V=a9Z~m)5TTY?k8@e{%BZafHlVnHitA-$x*XjW-JETAn*j2-W^@2?-kn%X?sh ztAW)6d7P>-dtKlPqX~Y1WU5DfdT$TxAeyCYqR9${0wUEdU7^P!UZqneE8*Ud3LW~` zL+$S=1C}twj~3*slA~Jjk6IHnMQNe=NbR?tU^YHT?lgD|jaSI69T-o*7e}|2#WUAB zr_n2acUk*&4#c$g*C_{K3 zxwtRa)ko;w$MN!22MS~pJxFM-$1JcU=s>L#8mG2v(K9kGGcTT6C2!E6n&j;M# z?fA>n3Lwg!?NpIdEyObC8t*E|!T;8(BGzZ0gX{d*hMPRV~(sBl|}*~YOv2?-B{_Ag1wwwzEi#v zCpP4FbJ3N}rt6QrXNgwxRyH>H@&t7_B6}AOhY?^nAr3@D46hw@v^X|-oIz`bB$m*_ zG%xAR-La$jkRU-dJfXs{vsozsCza z(nwbPb@#S5L()mV?p!lk_I7cKhni#fG-=sT;cmRys`914xtMPDy3Opogb3KuR0Hl= z}?;zh*Io5z7eJMBV72HF~xas#7 z7G(zRA8Tv1R=Hxc@MRVv<4AR&!BqniQ_|u<+x z*)sh`GM`J#Y+fHl@Q&IR^G`Ge)5%*!Tq$3AwE~kIh@s}FpNHe5fD#-I(k_oY`sl`~d9e zcb*pPAJDYMosY|zRfT9oN;cgwFX$+6H@EstcT?xJNakU6U)4IPTh~(87qO|&7pA9D1vEypxkX3t{2IB1C8)WvmH};t)1wW>|5g2S{tvIr{fzfEu;4-i*_|7+`ymc2#esoy`zw@EVzWb9Fx5Yzv&2f|0ge ziTZ+dtepW~4HJt*FO1Gc5o8+T49C}fn0e`0Zo=SsmhzlfqNypByFZwugRI9?SCh;ITf8`M{?P@kSWlU>LBb!6WEEiq+2T|fd%h|cymcrQT}7K~ck z?I~C|ddg?)|32(7|5tiLqmowU&%fp0dickf{(l`D{>(QmoA|oBVxoRYFHbOoOCw#q zf#4G2rw$9d(zy-?XUF=|Yi5K8(Q0Z2dn?J6sV9B7u`NZGXp+Y}dmLTUHeCD?!9ceE z<8D<5n?#9qv*mZV_@<~^B^UQj(NgLP>Nk&xzBo-O>}Q#UhVjNj7sVVY6iI3V?@*5 zkyRS0FFXlUfa&sS=zN&n+MIkBDoFFKgh)CFYIjcc*8TibyVpp&qa&+CshYZpzL4W9 zKBiay63f4(Y5Mcx&%&y&+Sf#aYfj$j!361zqkICN!r6{tWb4mR;pxb2dmzw0tHfGx z%G>(}r!JdIa#cdlmQ3gE4@eqDu?Q%w!_2K5NJm`8vM+81vs|MP2S5k$=`~LDE7r!8+v0SU&lASVJm#K*R!Ys+@a2w! zSQTV;xksyK@0!T)YNx`nuwr36K`YMy5!3LqM$7jh89fGAd2h``=!4n)=~`MQW>`I! zRkI^rk%@HtvF&J%2?QNm3=&043J6int6j4-@eRRAhYc_b#%cYeyAjg%Uy9Vk$?Bxr5<`%oTIxz!h6{?PYsNG((M% zh#y2>QK;S|2q`*e3tZmyvi3n(eGJ>?h)K2ICOi2Nw4{$A&;JO*xXgyVi!+R=|v%cA#c# zd`PLwaT@apW;ayuncw*OS5I6hEy&D|Y!hkWF-A;Rjbq(B)LUYo2lhc~eKIOkCCj3p zq2d}(Wmg&Qx;x|Sm!y9G|4Q4q#uET}?CHVZa4~UW%cV&KIU0quolvdhT0VLoj5a+X zMrGE6(O$X2dzeWZi`z*_rlQ|HWz9^7WwxxxpLB>$=^5$r#3Nk;t@7_S%2O5JFxk`?_-Uq)I@!gCUP{mZsVRq}!9W3pGZ zoc^C`{Dvkb0+oC%x;&rcAp*7_5Va`B8EIo? zSl4-ZU;q|xa8f%nB;&$lpfD61^`eAT~J&EH$9e^0^l*AH$m=`z?SV?ydzM3dum#PZ9v zR{@OM!CTVZ7GSoJpgOBBVPC^%G2N?(y^gHim>DqypB*-q7ELElH(VT*WOL6Im-qY` zMooxN!%7Y&vnH7s#Rv+p@D7d)(t-*+#GnROBzyh7R-)wiAC1xT8cek|l^=BRe^l|O z&#Bh!Ql2sUB(Br8gfMH_+e=;N>3h8&$GdglxwXu4(p>@cDbl&iZfWDRH@049-YXqG z$do<}v^%+OAm4z9u{EA$&$efijN2Jjt`oF>l2iG8U*)`#)GZJn#kLCj{WZE>r7XAK zqZWC~&qs6>&SSgLz__G1^Me2C^=0aD`t1z5Fpl0UwY=7nnDC%Yg#_8Tbp0^(-WkxT zy7=o*2Swi#UEKOc!gB{l>?sGo10XQ``(K6km)?1!(Yj6w)S821b;-alQ@Lk2q0`n@ zXCZF3rdz}Eq=gt5H0z%8o-Q)UgD*OO&85uKV;7Ci^d;Cxi!llj`9 zhLy9LVR+=G!FZ0J$~p^YV0bMZmoP8KM32?kcTKV#y|>JDgc;7)lQVh|pVYr;|KLfe zz}@5;E#&jyt@?mPbs+p;C{f0rPx3G+c3I#ASy^0VGw@m2BP9F{Wg}1IyIa9_0T>9> zBMHP49F`9)Eb~l)UQURM6pW|TX(km2e9Y!GL}58+&CB1c`v5)14eb;{W`N=3MM#Ee+yHuVcJDD9bG3*YjPo0p!#! zm56RBV(TOO#`Z5EsNUAR;W1tI4QDD@MZU{ut=u3d=hJ$S3>2> z)>*M|LVwO=@4@H2T&Gwk@w)WWg0u_Tk@IU~SdB{Y=Ma1DT-V?r=hy~L!LiOC0Fg0N z@KfwX-Z`+}iU! z4xlyF*szx8zdOle8z5Ka&_4j9&n=II`SXLBo5p<$Xbv)3odqMJXA}7s$EhRt6u0jY zYzH+@j2h_tCL|my$S3?)_%g)9E@rrxXxn_4Jt$qp%~Zuyo*aH9=S|Uq9pcl3V$u!l zuZX`6I5sQld=6-w5TCPf3Qp`gOQ|>2ET?(@Wt6zYF-(3M6~o;Nq>#LR!)tK@ooPZ} zV6L5WytT}eq+LzSUYBH-_P!}s)#|8K_c&XMl^HX_O_2XsnWh3%9vFK8C$0)H#E#FR$<$5M-D>wlsa2a~ z%Zwn}%i-1su+zO@RE)i0shXSd=bJ}=owR@TRR2eg@PB?ZSJ7&w*PM8ChgdmyS<7I&9-C%jG_a>w*_8YoI~JNx@h^HJGOVwHSZJXXCxnjuO<~w0#`xRN=MvkkOP3`(mMz9u z%bzR#qKV^6ZamxpdSQMc>?a!~j8eAgiAAci4my$k&i3GmYb?B;wn+){jSqV)&+aBv z)qm|5Y~2_o#kB@&AI%fjC$~=Hv3sN!`$djrkI$=eW1hJC#PrR2-F6KyP#6dGuS_IG z?eWQlbaL%n&3N!XI^LLPnl~P_h_nV%$7~c;v91$*O_Evan7e4 zuAbHRp=**{X+qU_(@h-zwh+2v26dhpV$X#zHr^Uzc43RIv9QFZ}4Af=6 z?QS4FXeImuplHFSYBfm4TThy(qk!e#oW9SPF2={iQ&`KU3xY319hzyrC#694N;6Ie z)H(Ki&zgG!dqWmq!eRXu6ltgeH)J#iW>(+$aCrSNzG2G}cS0msE)l;7JxsE_gwpEd zCu|&l3ib%;rbsMPT<=znfG=IX(so=j#$Dv0bj6@ZYtV&iW0YDw*uxs5xXO{a!x8rBM7pt3Q*4bm;3~OS8=#fTLdn~ZZdy!b_9z6{aA`wxY6}Fk&7|UAt3zeD#;d=|4N?Xx^Bnhk%Pe z0JN%P%qKK6z;@#);9S`M?X|OkiCbJ^Q387-u?J6ofA-VKF%q+qarg=P=jr#a|GaYS fE+O@$#p`SMc>wdVZm<^k|HZ%mFT=U?gZzI0Ld)Cd literal 0 HcmV?d00001 diff --git a/vendor/sergeytsalkov/meekrodb/simpletest/test.php b/vendor/sergeytsalkov/meekrodb/simpletest/test.php new file mode 100644 index 00000000..654e9ae2 --- /dev/null +++ b/vendor/sergeytsalkov/meekrodb/simpletest/test.php @@ -0,0 +1,86 @@ +#!/usr/bin/php +fail(); + } + + protected function fail($msg = '') { + echo "FAILURE! $msg\n"; + debug_print_backtrace(); + die; + } + + +} + +function microtime_float() +{ + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); +} + +if (phpversion() >= '5.3') $is_php_53 = true; +else $is_php_53 = false; + +ini_set('date.timezone', 'America/Los_Angeles'); + +error_reporting(E_ALL | E_STRICT); +require_once '../db.class.php'; +include 'test_setup.php'; //test config values go here +DB::$user = $set_db_user; +DB::$password = $set_password; +DB::$dbName = $set_db; +DB::$host = $set_host; +DB::get(); //connect to mysql + +require_once 'BasicTest.php'; +require_once 'CallTest.php'; +require_once 'ObjectTest.php'; +require_once 'WhereClauseTest.php'; +require_once 'ErrorTest.php'; +require_once 'TransactionTest.php'; +require_once 'HelperTest.php'; + +$classes_to_test = array( + 'BasicTest', + 'CallTest', + 'WhereClauseTest', + 'ObjectTest', + 'ErrorTest', + 'TransactionTest', + 'HelperTest', +); + +if ($is_php_53) { + require_once 'ErrorTest_53.php'; + $classes_to_test[] = 'ErrorTest_53'; +} else { + echo "PHP 5.3 not detected, skipping 5.3 tests..\n"; +} + +$mysql_version = DB::serverVersion(); +if ($mysql_version >= '5.5') { + require_once 'TransactionTest_55.php'; + $classes_to_test[] = 'TransactionTest_55'; +} else { + echo "MySQL 5.5 not available (version is $mysql_version) -- skipping MySQL 5.5 tests\n"; +} + +$time_start = microtime_float(); +foreach ($classes_to_test as $class) { + $object = new $class(); + + foreach (get_class_methods($object) as $method) { + if (substr($method, 0, 4) != 'test') continue; + echo "Running $class::$method..\n"; + $object->$method(); + } +} +$time_end = microtime_float(); +$time = round($time_end - $time_start, 2); + +echo "Completed in $time seconds\n"; + + +?> From 373bcde70b6cb4015f9f7ce390690e85a744eeb2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 21:38:04 +0900 Subject: [PATCH 098/622] =?UTF-8?q?e=5Flib=20=EC=BD=94=EB=93=9C=EB=93=A4?= =?UTF-8?q?=EC=9D=84=20composer=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit func_http 삭제. guzzle로 대체 php 파일에서 include, require 앞에 있는 구문들을 전부 뒤로 이동. --- composer.json | 4 +- composer.lock | 299 +- d_setting/conf.orig.php | 2 - e_lib/includes.php | 4 - e_lib/meekrodb.2.3.class.php | 956 ----- e_lib/phpmailer5/PHPMailerAutoload.php | 49 - e_lib/phpmailer5/VERSION | 1 - e_lib/phpmailer5/class.phpmaileroauth.php | 197 - .../phpmailer5/class.phpmaileroauthgoogle.php | 77 - e_lib/phpmailer5/composer.json | 61 - e_lib/phpmailer5/composer.lock | 3593 ----------------- e_lib/phpmailer5/get_oauth_token.php | 162 - e_lib/plates.php | 16 - e_lib/plates/Engine.php | 279 -- e_lib/plates/Extension/Asset.php | 85 - e_lib/plates/Extension/ExtensionInterface.php | 13 - e_lib/plates/Extension/URI.php | 113 - e_lib/plates/Template/Data.php | 93 - e_lib/plates/Template/Directory.php | 53 - e_lib/plates/Template/FileExtension.php | 45 - e_lib/plates/Template/Folder.php | 109 - e_lib/plates/Template/Folders.php | 75 - e_lib/plates/Template/Func.php | 107 - e_lib/plates/Template/Functions.php | 78 - e_lib/plates/Template/Name.php | 202 - e_lib/plates/Template/Template.php | 346 -- e_lib/plates/example.php | 20 - e_lib/plates/templates/layout.php | 12 - e_lib/plates/templates/profile.php | 12 - e_lib/plates/templates/sidebar.php | 6 - e_lib/src/utilphp/util.php | 2535 ------------ e_lib/util.php | 10 - f_config/config.php | 1 + f_func/class._Chat.php | 1 - f_func/class._JSON.php | 1 + f_func/class._Lock.php | 1 - f_func/class._Log.php | 3 +- f_func/class._Process.php | 1 - f_func/class._Queue.php | 1 + f_func/class._Session.php | 1 + f_func/class._Setting.php | 1 - f_func/class._String.php | 1 + f_func/class._Time.php | 1 + f_func/class._Validation.php | 3 +- f_func/func.php | 2 + f_install/install1Post.php | 3 +- f_install/install2Post.php | 3 +- i_entrance/adminPost.php | 2 - i_entrance/donation/Get.php | 5 +- i_entrance/donation/Post.php | 10 +- i_entrance/donation/calculatePost.php | 3 +- i_entrance/enterPost.php | 9 +- i_entrance/logoutPost.php | 5 +- i_entrance/manage/Get.php | 5 +- i_entrance/manage/deletePost.php | 4 +- i_entrance/manage/iconPost.php | 6 +- i_entrance/manage/passwordPost.php | 12 +- i_entrance/manage/quitPost.php | 8 +- i_entrance/member/Get.php | 9 +- i_entrance/member/Post.php | 12 +- i_entrance/serverListPost.php | 5 +- i_entrance/templates/block_htaccess.php | 4 +- i_login/Post.php | 12 +- i_login/findpw/Post.php | 13 +- i_login/findpw/checkPost.php | 11 +- i_login/findpw/sendCodePost.php | 8 +- i_login/findpw/verifyCodePost.php | 11 +- i_login/join/Post.php | 16 +- i_login/join/checkPost.php | 12 +- i_login/join/sendCodePost.php | 8 +- i_login/join/verifyCodePost.php | 12 +- i_other/help.php | 3 +- install.php | 2 +- twe/_simul.php | 1 - twe/a_history.php | 3 +- twe/c_betting.php | 6 +- twe/c_chiefboard.php | 4 +- twe/c_dipcenter.php | 4 +- twe/c_double.php | 4 +- twe/c_msgsubmit.php | 4 +- twe/c_myBossInfo.php | 4 +- twe/c_nationboard.php | 4 +- twe/c_nationrule.php | 4 +- twe/c_tournament.php | 4 +- twe/c_troop.php | 4 +- twe/d_scout.php | 4 +- twe/event_1.php | 4 +- twe/event_2.php | 4 +- twe/event_3.php | 4 +- twe/event_4.php | 4 +- twe/func_history.php | 24 +- twe/func_http.php | 288 -- twe/func_message.php | 3 +- twe/install2_ok.php | 1 - twe/install_ok.php | 1 - twe/j_msgsubmit.php | 5 +- twe/join_post.php | 1 - twe/lib.php | 1 + twe/login_process.php | 2 +- twe/reset.php | 2 +- twe/scenario_1.php | 5 +- twe/stylesheet.php | 1 - vendor/composer/autoload_files.php | 12 + vendor/composer/autoload_psr4.php | 5 + vendor/composer/autoload_real.php | 18 + vendor/composer/autoload_static.php | 37 + vendor/composer/installed.json | 307 ++ vendor/guzzlehttp/guzzle/CHANGELOG.md | 1264 ++++++ vendor/guzzlehttp/guzzle/LICENSE | 19 + vendor/guzzlehttp/guzzle/README.md | 89 + vendor/guzzlehttp/guzzle/UPGRADING.md | 1203 ++++++ vendor/guzzlehttp/guzzle/composer.json | 44 + vendor/guzzlehttp/guzzle/src/Client.php | 414 ++ .../guzzlehttp/guzzle/src/ClientInterface.php | 84 + .../guzzle/src/Cookie/CookieJar.php | 314 ++ .../guzzle/src/Cookie/CookieJarInterface.php | 84 + .../guzzle/src/Cookie/FileCookieJar.php | 90 + .../guzzle/src/Cookie/SessionCookieJar.php | 71 + .../guzzle/src/Cookie/SetCookie.php | 404 ++ .../src/Exception/BadResponseException.php | 27 + .../guzzle/src/Exception/ClientException.php | 7 + .../guzzle/src/Exception/ConnectException.php | 37 + .../guzzle/src/Exception/GuzzleException.php | 4 + .../guzzle/src/Exception/RequestException.php | 217 + .../guzzle/src/Exception/SeekException.php | 27 + .../guzzle/src/Exception/ServerException.php | 7 + .../Exception/TooManyRedirectsException.php | 4 + .../src/Exception/TransferException.php | 4 + .../guzzle/src/Handler/CurlFactory.php | 559 +++ .../src/Handler/CurlFactoryInterface.php | 27 + .../guzzle/src/Handler/CurlHandler.php | 45 + .../guzzle/src/Handler/CurlMultiHandler.php | 197 + .../guzzle/src/Handler/EasyHandle.php | 92 + .../guzzle/src/Handler/MockHandler.php | 189 + .../guzzlehttp/guzzle/src/Handler/Proxy.php | 55 + .../guzzle/src/Handler/StreamHandler.php | 533 +++ vendor/guzzlehttp/guzzle/src/HandlerStack.php | 273 ++ .../guzzle/src/MessageFormatter.php | 182 + vendor/guzzlehttp/guzzle/src/Middleware.php | 254 ++ vendor/guzzlehttp/guzzle/src/Pool.php | 123 + .../guzzle/src/PrepareBodyMiddleware.php | 106 + .../guzzle/src/RedirectMiddleware.php | 237 ++ .../guzzlehttp/guzzle/src/RequestOptions.php | 255 ++ .../guzzlehttp/guzzle/src/RetryMiddleware.php | 112 + .../guzzlehttp/guzzle/src/TransferStats.php | 126 + vendor/guzzlehttp/guzzle/src/UriTemplate.php | 241 ++ vendor/guzzlehttp/guzzle/src/functions.php | 331 ++ .../guzzle/src/functions_include.php | 6 + vendor/guzzlehttp/promises/CHANGELOG.md | 65 + vendor/guzzlehttp/promises/LICENSE | 19 + vendor/guzzlehttp/promises/Makefile | 13 + vendor/guzzlehttp/promises/README.md | 504 +++ vendor/guzzlehttp/promises/composer.json | 34 + .../promises/src/AggregateException.php | 16 + .../promises/src/CancellationException.php | 9 + vendor/guzzlehttp/promises/src/Coroutine.php | 151 + .../guzzlehttp/promises/src/EachPromise.php | 229 ++ .../promises/src/FulfilledPromise.php | 82 + vendor/guzzlehttp/promises/src/Promise.php | 280 ++ .../promises/src/PromiseInterface.php | 93 + .../promises/src/PromisorInterface.php | 15 + .../promises/src/RejectedPromise.php | 87 + .../promises/src/RejectionException.php | 47 + vendor/guzzlehttp/promises/src/TaskQueue.php | 66 + .../promises/src/TaskQueueInterface.php | 25 + vendor/guzzlehttp/promises/src/functions.php | 457 +++ .../promises/src/functions_include.php | 6 + vendor/guzzlehttp/psr7/CHANGELOG.md | 110 + vendor/guzzlehttp/psr7/LICENSE | 19 + vendor/guzzlehttp/psr7/README.md | 739 ++++ vendor/guzzlehttp/psr7/composer.json | 39 + vendor/guzzlehttp/psr7/src/AppendStream.php | 233 ++ vendor/guzzlehttp/psr7/src/BufferStream.php | 137 + vendor/guzzlehttp/psr7/src/CachingStream.php | 138 + vendor/guzzlehttp/psr7/src/DroppingStream.php | 42 + vendor/guzzlehttp/psr7/src/FnStream.php | 149 + vendor/guzzlehttp/psr7/src/InflateStream.php | 52 + vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 39 + vendor/guzzlehttp/psr7/src/LimitStream.php | 155 + vendor/guzzlehttp/psr7/src/MessageTrait.php | 183 + .../guzzlehttp/psr7/src/MultipartStream.php | 153 + vendor/guzzlehttp/psr7/src/NoSeekStream.php | 22 + vendor/guzzlehttp/psr7/src/PumpStream.php | 165 + vendor/guzzlehttp/psr7/src/Request.php | 142 + vendor/guzzlehttp/psr7/src/Response.php | 132 + vendor/guzzlehttp/psr7/src/ServerRequest.php | 358 ++ vendor/guzzlehttp/psr7/src/Stream.php | 257 ++ .../psr7/src/StreamDecoratorTrait.php | 149 + vendor/guzzlehttp/psr7/src/StreamWrapper.php | 121 + vendor/guzzlehttp/psr7/src/UploadedFile.php | 316 ++ vendor/guzzlehttp/psr7/src/Uri.php | 702 ++++ vendor/guzzlehttp/psr7/src/UriNormalizer.php | 216 + vendor/guzzlehttp/psr7/src/UriResolver.php | 219 + vendor/guzzlehttp/psr7/src/functions.php | 828 ++++ .../guzzlehttp/psr7/src/functions_include.php | 6 + .../phpmailer/phpmailer}/LICENSE | 42 +- vendor/phpmailer/phpmailer/README.md | 219 + vendor/phpmailer/phpmailer/SECURITY.md | 26 + vendor/phpmailer/phpmailer/VERSION | 1 + .../phpmailer/phpmailer/get_oauth_token.php | 144 + .../phpmailer/language/phpmailer.lang-am.php | 26 + .../phpmailer/language/phpmailer.lang-ar.php | 27 + .../phpmailer/language/phpmailer.lang-az.php | 26 + .../phpmailer/language/phpmailer.lang-ba.php | 26 + .../phpmailer/language/phpmailer.lang-be.php | 26 + .../phpmailer/language/phpmailer.lang-bg.php | 26 + .../phpmailer/language/phpmailer.lang-ca.php | 26 + .../phpmailer/language/phpmailer.lang-ch.php | 26 + .../phpmailer/language/phpmailer.lang-cs.php | 25 + .../phpmailer/language/phpmailer.lang-da.php | 26 + .../phpmailer/language/phpmailer.lang-de.php | 25 + .../phpmailer/language/phpmailer.lang-el.php | 25 + .../phpmailer/language/phpmailer.lang-eo.php | 25 + .../phpmailer/language/phpmailer.lang-es.php | 26 + .../phpmailer/language/phpmailer.lang-et.php | 27 + .../phpmailer/language/phpmailer.lang-fa.php | 27 + .../phpmailer/language/phpmailer.lang-fi.php | 27 + .../phpmailer/language/phpmailer.lang-fo.php | 26 + .../phpmailer/language/phpmailer.lang-fr.php | 29 + .../phpmailer/language/phpmailer.lang-gl.php | 26 + .../phpmailer/language/phpmailer.lang-he.php | 26 + .../phpmailer/language/phpmailer.lang-hr.php | 26 + .../phpmailer/language/phpmailer.lang-hu.php | 26 + .../phpmailer/language/phpmailer.lang-id.php | 27 + .../phpmailer/language/phpmailer.lang-it.php | 27 + .../phpmailer/language/phpmailer.lang-ja.php | 27 + .../phpmailer/language/phpmailer.lang-ka.php | 26 + .../phpmailer/language/phpmailer.lang-ko.php | 26 + .../phpmailer/language/phpmailer.lang-lt.php | 26 + .../phpmailer/language/phpmailer.lang-lv.php | 26 + .../phpmailer/language/phpmailer.lang-ms.php | 26 + .../phpmailer/language/phpmailer.lang-nb.php | 25 + .../phpmailer/language/phpmailer.lang-nl.php | 26 + .../phpmailer/language/phpmailer.lang-pl.php | 26 + .../phpmailer/language/phpmailer.lang-pt.php | 26 + .../language/phpmailer.lang-pt_br.php | 29 + .../phpmailer/language/phpmailer.lang-ro.php | 26 + .../phpmailer/language/phpmailer.lang-rs.php | 26 + .../phpmailer/language/phpmailer.lang-ru.php | 27 + .../phpmailer/language/phpmailer.lang-sk.php | 26 + .../phpmailer/language/phpmailer.lang-sl.php | 26 + .../phpmailer/language/phpmailer.lang-sv.php | 26 + .../phpmailer/language/phpmailer.lang-tr.php | 30 + .../phpmailer/language/phpmailer.lang-uk.php | 27 + .../phpmailer/language/phpmailer.lang-vi.php | 26 + .../phpmailer/language/phpmailer.lang-zh.php | 28 + .../language/phpmailer.lang-zh_cn.php | 28 + vendor/phpmailer/phpmailer/src/Exception.php | 39 + vendor/phpmailer/phpmailer/src/OAuth.php | 138 + .../phpmailer/phpmailer/src/PHPMailer.php | 2494 +++++++----- .../phpmailer/phpmailer/src/POP3.php | 252 +- .../phpmailer/phpmailer/src/SMTP.php | 651 +-- vendor/psr/http-message/CHANGELOG.md | 36 + vendor/psr/http-message/LICENSE | 19 + vendor/psr/http-message/README.md | 13 + vendor/psr/http-message/composer.json | 26 + .../psr/http-message/src/MessageInterface.php | 187 + .../psr/http-message/src/RequestInterface.php | 129 + .../http-message/src/ResponseInterface.php | 68 + .../src/ServerRequestInterface.php | 261 ++ .../psr/http-message/src/StreamInterface.php | 158 + .../src/UploadedFileInterface.php | 123 + vendor/psr/http-message/src/UriInterface.php | 323 ++ 263 files changed, 22305 insertions(+), 11284 deletions(-) delete mode 100644 e_lib/includes.php delete mode 100644 e_lib/meekrodb.2.3.class.php delete mode 100644 e_lib/phpmailer5/PHPMailerAutoload.php delete mode 100644 e_lib/phpmailer5/VERSION delete mode 100644 e_lib/phpmailer5/class.phpmaileroauth.php delete mode 100644 e_lib/phpmailer5/class.phpmaileroauthgoogle.php delete mode 100644 e_lib/phpmailer5/composer.json delete mode 100644 e_lib/phpmailer5/composer.lock delete mode 100644 e_lib/phpmailer5/get_oauth_token.php delete mode 100644 e_lib/plates.php delete mode 100644 e_lib/plates/Engine.php delete mode 100644 e_lib/plates/Extension/Asset.php delete mode 100644 e_lib/plates/Extension/ExtensionInterface.php delete mode 100644 e_lib/plates/Extension/URI.php delete mode 100644 e_lib/plates/Template/Data.php delete mode 100644 e_lib/plates/Template/Directory.php delete mode 100644 e_lib/plates/Template/FileExtension.php delete mode 100644 e_lib/plates/Template/Folder.php delete mode 100644 e_lib/plates/Template/Folders.php delete mode 100644 e_lib/plates/Template/Func.php delete mode 100644 e_lib/plates/Template/Functions.php delete mode 100644 e_lib/plates/Template/Name.php delete mode 100644 e_lib/plates/Template/Template.php delete mode 100644 e_lib/plates/example.php delete mode 100644 e_lib/plates/templates/layout.php delete mode 100644 e_lib/plates/templates/profile.php delete mode 100644 e_lib/plates/templates/sidebar.php delete mode 100644 e_lib/src/utilphp/util.php delete mode 100644 e_lib/util.php delete mode 100644 twe/func_http.php create mode 100644 vendor/composer/autoload_files.php create mode 100644 vendor/guzzlehttp/guzzle/CHANGELOG.md create mode 100644 vendor/guzzlehttp/guzzle/LICENSE create mode 100644 vendor/guzzlehttp/guzzle/README.md create mode 100644 vendor/guzzlehttp/guzzle/UPGRADING.md create mode 100644 vendor/guzzlehttp/guzzle/composer.json create mode 100644 vendor/guzzlehttp/guzzle/src/Client.php create mode 100644 vendor/guzzlehttp/guzzle/src/ClientInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php create mode 100644 vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ClientException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/RequestException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/SeekException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/ServerException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Exception/TransferException.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/Proxy.php create mode 100644 vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php create mode 100644 vendor/guzzlehttp/guzzle/src/HandlerStack.php create mode 100644 vendor/guzzlehttp/guzzle/src/MessageFormatter.php create mode 100644 vendor/guzzlehttp/guzzle/src/Middleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/Pool.php create mode 100644 vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/RequestOptions.php create mode 100644 vendor/guzzlehttp/guzzle/src/RetryMiddleware.php create mode 100644 vendor/guzzlehttp/guzzle/src/TransferStats.php create mode 100644 vendor/guzzlehttp/guzzle/src/UriTemplate.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions.php create mode 100644 vendor/guzzlehttp/guzzle/src/functions_include.php create mode 100644 vendor/guzzlehttp/promises/CHANGELOG.md create mode 100644 vendor/guzzlehttp/promises/LICENSE create mode 100644 vendor/guzzlehttp/promises/Makefile create mode 100644 vendor/guzzlehttp/promises/README.md create mode 100644 vendor/guzzlehttp/promises/composer.json create mode 100644 vendor/guzzlehttp/promises/src/AggregateException.php create mode 100644 vendor/guzzlehttp/promises/src/CancellationException.php create mode 100644 vendor/guzzlehttp/promises/src/Coroutine.php create mode 100644 vendor/guzzlehttp/promises/src/EachPromise.php create mode 100644 vendor/guzzlehttp/promises/src/FulfilledPromise.php create mode 100644 vendor/guzzlehttp/promises/src/Promise.php create mode 100644 vendor/guzzlehttp/promises/src/PromiseInterface.php create mode 100644 vendor/guzzlehttp/promises/src/PromisorInterface.php create mode 100644 vendor/guzzlehttp/promises/src/RejectedPromise.php create mode 100644 vendor/guzzlehttp/promises/src/RejectionException.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueue.php create mode 100644 vendor/guzzlehttp/promises/src/TaskQueueInterface.php create mode 100644 vendor/guzzlehttp/promises/src/functions.php create mode 100644 vendor/guzzlehttp/promises/src/functions_include.php create mode 100644 vendor/guzzlehttp/psr7/CHANGELOG.md create mode 100644 vendor/guzzlehttp/psr7/LICENSE create mode 100644 vendor/guzzlehttp/psr7/README.md create mode 100644 vendor/guzzlehttp/psr7/composer.json create mode 100644 vendor/guzzlehttp/psr7/src/AppendStream.php create mode 100644 vendor/guzzlehttp/psr7/src/BufferStream.php create mode 100644 vendor/guzzlehttp/psr7/src/CachingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/DroppingStream.php create mode 100644 vendor/guzzlehttp/psr7/src/FnStream.php create mode 100644 vendor/guzzlehttp/psr7/src/InflateStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LazyOpenStream.php create mode 100644 vendor/guzzlehttp/psr7/src/LimitStream.php create mode 100644 vendor/guzzlehttp/psr7/src/MessageTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/MultipartStream.php create mode 100644 vendor/guzzlehttp/psr7/src/NoSeekStream.php create mode 100644 vendor/guzzlehttp/psr7/src/PumpStream.php create mode 100644 vendor/guzzlehttp/psr7/src/Request.php create mode 100644 vendor/guzzlehttp/psr7/src/Response.php create mode 100644 vendor/guzzlehttp/psr7/src/ServerRequest.php create mode 100644 vendor/guzzlehttp/psr7/src/Stream.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php create mode 100644 vendor/guzzlehttp/psr7/src/StreamWrapper.php create mode 100644 vendor/guzzlehttp/psr7/src/UploadedFile.php create mode 100644 vendor/guzzlehttp/psr7/src/Uri.php create mode 100644 vendor/guzzlehttp/psr7/src/UriNormalizer.php create mode 100644 vendor/guzzlehttp/psr7/src/UriResolver.php create mode 100644 vendor/guzzlehttp/psr7/src/functions.php create mode 100644 vendor/guzzlehttp/psr7/src/functions_include.php rename {e_lib/phpmailer5 => vendor/phpmailer/phpmailer}/LICENSE (97%) create mode 100644 vendor/phpmailer/phpmailer/README.md create mode 100644 vendor/phpmailer/phpmailer/SECURITY.md create mode 100644 vendor/phpmailer/phpmailer/VERSION create mode 100644 vendor/phpmailer/phpmailer/get_oauth_token.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ba.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-eo.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-gl.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-id.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-pt.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-uk.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php create mode 100644 vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php create mode 100644 vendor/phpmailer/phpmailer/src/Exception.php create mode 100644 vendor/phpmailer/phpmailer/src/OAuth.php rename e_lib/phpmailer5/class.phpmailer.php => vendor/phpmailer/phpmailer/src/PHPMailer.php (65%) rename e_lib/phpmailer5/class.pop3.php => vendor/phpmailer/phpmailer/src/POP3.php (62%) rename e_lib/phpmailer5/class.smtp.php => vendor/phpmailer/phpmailer/src/SMTP.php (71%) create mode 100644 vendor/psr/http-message/CHANGELOG.md create mode 100644 vendor/psr/http-message/LICENSE create mode 100644 vendor/psr/http-message/README.md create mode 100644 vendor/psr/http-message/composer.json create mode 100644 vendor/psr/http-message/src/MessageInterface.php create mode 100644 vendor/psr/http-message/src/RequestInterface.php create mode 100644 vendor/psr/http-message/src/ResponseInterface.php create mode 100644 vendor/psr/http-message/src/ServerRequestInterface.php create mode 100644 vendor/psr/http-message/src/StreamInterface.php create mode 100644 vendor/psr/http-message/src/UploadedFileInterface.php create mode 100644 vendor/psr/http-message/src/UriInterface.php diff --git a/composer.json b/composer.json index 7b57b10e..35412e72 100644 --- a/composer.json +++ b/composer.json @@ -2,6 +2,8 @@ "require": { "brandonwamboldt/utilphp": "^1.1", "sergeytsalkov/meekrodb": "^2.3", - "league/plates": "^3.3" + "league/plates": "^3.3", + "phpmailer/phpmailer": "^6.0", + "guzzlehttp/guzzle": "^6.3" } } diff --git a/composer.lock b/composer.lock index 742982da..fb1c4f34 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "08d6fa0a77eca6b860aa39d42081eea9", + "content-hash": "450a6f5772559666e92515aa10280024", "packages": [ { "name": "brandonwamboldt/utilphp", @@ -52,6 +52,187 @@ ], "time": "2015-02-02T17:56:14+00:00" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2017-06-22T18:50:49+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, { "name": "league/plates", "version": "3.3.0", @@ -107,6 +288,122 @@ ], "time": "2016-12-28T00:14:17+00:00" }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.3", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6", + "reference": "44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "time": "2018-01-05T13:19:58+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "sergeytsalkov/meekrodb", "version": "v2.3", diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index a40cbf3c..a2e736e3 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -1,7 +1,5 @@ \ No newline at end of file diff --git a/e_lib/meekrodb.2.3.class.php b/e_lib/meekrodb.2.3.class.php deleted file mode 100644 index 93cba614..00000000 --- a/e_lib/meekrodb.2.3.class.php +++ /dev/null @@ -1,956 +0,0 @@ -. -*/ - - -class DB { - // initial connection - public static $dbName = ''; - public static $user = ''; - public static $password = ''; - public static $host = 'localhost'; - public static $port = null; - public static $encoding = 'latin1'; - - // configure workings - public static $param_char = '%'; - public static $named_param_seperator = '_'; - public static $success_handler = false; - public static $error_handler = true; - public static $throw_exception_on_error = false; - public static $nonsql_error_handler = null; - public static $throw_exception_on_nonsql_error = false; - public static $nested_transactions = false; - public static $usenull = true; - public static $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); - public static $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); - - // internal - protected static $mdb = null; - - public static function getMDB() { - $mdb = DB::$mdb; - - if ($mdb === null) { - $mdb = DB::$mdb = new MeekroDB(); - } - - static $variables_to_sync = array('param_char', 'named_param_seperator', 'success_handler', 'error_handler', 'throw_exception_on_error', - 'nonsql_error_handler', 'throw_exception_on_nonsql_error', 'nested_transactions', 'usenull', 'ssl', 'connect_options'); - - $db_class_vars = get_class_vars('DB'); // the DB::$$var syntax only works in 5.3+ - - foreach ($variables_to_sync as $variable) { - if ($mdb->$variable !== $db_class_vars[$variable]) { - $mdb->$variable = $db_class_vars[$variable]; - } - } - - return $mdb; - } - - // yes, this is ugly. __callStatic() only works in 5.3+ - public static function get() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'get'), $args); } - public static function disconnect() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'disconnect'), $args); } - public static function query() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'query'), $args); } - public static function queryFirstRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstRow'), $args); } - public static function queryOneRow() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneRow'), $args); } - public static function queryAllLists() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryAllLists'), $args); } - public static function queryFullColumns() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFullColumns'), $args); } - public static function queryFirstList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstList'), $args); } - public static function queryOneList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneList'), $args); } - public static function queryFirstColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstColumn'), $args); } - public static function queryOneColumn() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneColumn'), $args); } - public static function queryFirstField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryFirstField'), $args); } - public static function queryOneField() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryOneField'), $args); } - public static function queryRaw() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRaw'), $args); } - public static function queryRawUnbuf() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'queryRawUnbuf'), $args); } - - public static function insert() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insert'), $args); } - public static function insertIgnore() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertIgnore'), $args); } - public static function insertUpdate() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertUpdate'), $args); } - public static function replace() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'replace'), $args); } - public static function update() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'update'), $args); } - public static function delete() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'delete'), $args); } - - public static function insertId() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'insertId'), $args); } - public static function count() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'count'), $args); } - public static function affectedRows() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'affectedRows'), $args); } - - public static function useDB() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'useDB'), $args); } - public static function startTransaction() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'startTransaction'), $args); } - public static function commit() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'commit'), $args); } - public static function rollback() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'rollback'), $args); } - public static function tableList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'tableList'), $args); } - public static function columnList() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'columnList'), $args); } - - public static function sqlEval() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'sqlEval'), $args); } - public static function nonSQLError() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'nonSQLError'), $args); } - - public static function serverVersion() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'serverVersion'), $args); } - public static function transactionDepth() { $args = func_get_args(); return call_user_func_array(array(DB::getMDB(), 'transactionDepth'), $args); } - - - public static function debugMode($handler = true) { - DB::$success_handler = $handler; - } - -} - - -class MeekroDB { - // initial connection - public $dbName = ''; - public $user = ''; - public $password = ''; - public $host = 'localhost'; - public $port = null; - public $encoding = 'latin1'; - - // configure workings - public $param_char = '%'; - public $named_param_seperator = '_'; - public $success_handler = false; - public $error_handler = true; - public $throw_exception_on_error = false; - public $nonsql_error_handler = null; - public $throw_exception_on_nonsql_error = false; - public $nested_transactions = false; - public $usenull = true; - public $ssl = array('key' => '', 'cert' => '', 'ca_cert' => '', 'ca_path' => '', 'cipher' => ''); - public $connect_options = array(MYSQLI_OPT_CONNECT_TIMEOUT => 30); - - // internal - public $internal_mysql = null; - public $server_info = null; - public $insert_id = 0; - public $num_rows = 0; - public $affected_rows = 0; - public $current_db = null; - public $nested_transactions_count = 0; - - - public function __construct($host=null, $user=null, $password=null, $dbName=null, $port=null, $encoding=null) { - if ($host === null) $host = DB::$host; - if ($user === null) $user = DB::$user; - if ($password === null) $password = DB::$password; - if ($dbName === null) $dbName = DB::$dbName; - if ($port === null) $port = DB::$port; - if ($encoding === null) $encoding = DB::$encoding; - - $this->host = $host; - $this->user = $user; - $this->password = $password; - $this->dbName = $dbName; - $this->port = $port; - $this->encoding = $encoding; - } - - public function get() { - $mysql = $this->internal_mysql; - - if (!($mysql instanceof MySQLi)) { - if (! $this->port) $this->port = ini_get('mysqli.default_port'); - $this->current_db = $this->dbName; - $mysql = new mysqli(); - - $connect_flags = 0; - if ($this->ssl['key']) { - $mysql->ssl_set($this->ssl['key'], $this->ssl['cert'], $this->ssl['ca_cert'], $this->ssl['ca_path'], $this->ssl['cipher']); - $connect_flags |= MYSQLI_CLIENT_SSL; - } - foreach ($this->connect_options as $key => $value) { - $mysql->options($key, $value); - } - - // suppress warnings, since we will check connect_error anyway - @$mysql->real_connect($this->host, $this->user, $this->password, $this->dbName, $this->port, null, $connect_flags); - - if ($mysql->connect_error) { - $this->nonSQLError('Unable to connect to MySQL server! Error: ' . $mysql->connect_error); - } - - $mysql->set_charset($this->encoding); - $this->internal_mysql = $mysql; - $this->server_info = $mysql->server_info; - } - - return $mysql; - } - - public function disconnect() { - $mysqli = $this->internal_mysql; - if ($mysqli instanceof MySQLi) { - if ($thread_id = $mysqli->thread_id) $mysqli->kill($thread_id); - $mysqli->close(); - } - $this->internal_mysql = null; - } - - public function nonSQLError($message) { - if ($this->throw_exception_on_nonsql_error) { - $e = new MeekroDBException($message); - throw $e; - } - - $error_handler = is_callable($this->nonsql_error_handler) ? $this->nonsql_error_handler : 'meekrodb_error_handler'; - - call_user_func($error_handler, array( - 'type' => 'nonsql', - 'error' => $message - )); - } - - public function debugMode($handler = true) { - $this->success_handler = $handler; - } - - public function serverVersion() { $this->get(); return $this->server_info; } - public function transactionDepth() { return $this->nested_transactions_count; } - public function insertId() { return $this->insert_id; } - public function affectedRows() { return $this->affected_rows; } - public function count() { $args = func_get_args(); return call_user_func_array(array($this, 'numRows'), $args); } - public function numRows() { return $this->num_rows; } - - public function useDB() { $args = func_get_args(); return call_user_func_array(array($this, 'setDB'), $args); } - public function setDB($dbName) { - $db = $this->get(); - if (! $db->select_db($dbName)) $this->nonSQLError("Unable to set database to $dbName"); - $this->current_db = $dbName; - } - - - public function startTransaction() { - if ($this->nested_transactions && $this->serverVersion() < '5.5') { - return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); - } - - if (!$this->nested_transactions || $this->nested_transactions_count == 0) { - $this->query('START TRANSACTION'); - $this->nested_transactions_count = 1; - } else { - $this->query("SAVEPOINT LEVEL{$this->nested_transactions_count}"); - $this->nested_transactions_count++; - } - - return $this->nested_transactions_count; - } - - public function commit($all=false) { - if ($this->nested_transactions && $this->serverVersion() < '5.5') { - return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); - } - - if ($this->nested_transactions && $this->nested_transactions_count > 0) - $this->nested_transactions_count--; - - if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { - $this->nested_transactions_count = 0; - $this->query('COMMIT'); - } else { - $this->query("RELEASE SAVEPOINT LEVEL{$this->nested_transactions_count}"); - } - - return $this->nested_transactions_count; - } - - public function rollback($all=false) { - if ($this->nested_transactions && $this->serverVersion() < '5.5') { - return $this->nonSQLError("Nested transactions are only available on MySQL 5.5 and greater. You are using MySQL " . $this->serverVersion()); - } - - if ($this->nested_transactions && $this->nested_transactions_count > 0) - $this->nested_transactions_count--; - - if (!$this->nested_transactions || $all || $this->nested_transactions_count == 0) { - $this->nested_transactions_count = 0; - $this->query('ROLLBACK'); - } else { - $this->query("ROLLBACK TO SAVEPOINT LEVEL{$this->nested_transactions_count}"); - } - - return $this->nested_transactions_count; - } - - protected function formatTableName($table) { - $table = trim($table, '`'); - - if (strpos($table, '.')) return implode('.', array_map(array($this, 'formatTableName'), explode('.', $table))); - else return '`' . str_replace('`', '``', $table) . '`'; - } - - public function update() { - $args = func_get_args(); - $table = array_shift($args); - $params = array_shift($args); - $where = array_shift($args); - - $query = str_replace('%', $this->param_char, "UPDATE %b SET %? WHERE ") . $where; - - array_unshift($args, $params); - array_unshift($args, $table); - array_unshift($args, $query); - return call_user_func_array(array($this, 'query'), $args); - } - - public function insertOrReplace($which, $table, $datas, $options=array()) { - $datas = unserialize(serialize($datas)); // break references within array - $keys = $values = array(); - - if (isset($datas[0]) && is_array($datas[0])) { - foreach ($datas as $datum) { - ksort($datum); - if (! $keys) $keys = array_keys($datum); - $values[] = array_values($datum); - } - - } else { - $keys = array_keys($datas); - $values = array_values($datas); - } - - if (isset($options['ignore']) && $options['ignore']) $which = 'INSERT IGNORE'; - - if (isset($options['update']) && is_array($options['update']) && $options['update'] && strtolower($which) == 'insert') { - if (array_values($options['update']) !== $options['update']) { - return $this->query( - str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE %?"), - $table, $keys, $values, $options['update']); - } else { - $update_str = array_shift($options['update']); - $query_param = array( - str_replace('%', $this->param_char, "INSERT INTO %b %lb VALUES %? ON DUPLICATE KEY UPDATE ") . $update_str, - $table, $keys, $values); - $query_param = array_merge($query_param, $options['update']); - return call_user_func_array(array($this, 'query'), $query_param); - } - - } - - return $this->query( - str_replace('%', $this->param_char, "%l INTO %b %lb VALUES %?"), - $which, $table, $keys, $values); - } - - public function insert($table, $data) { return $this->insertOrReplace('INSERT', $table, $data); } - public function insertIgnore($table, $data) { return $this->insertOrReplace('INSERT', $table, $data, array('ignore' => true)); } - public function replace($table, $data) { return $this->insertOrReplace('REPLACE', $table, $data); } - - public function insertUpdate() { - $args = func_get_args(); - $table = array_shift($args); - $data = array_shift($args); - - if (! isset($args[0])) { // update will have all the data of the insert - if (isset($data[0]) && is_array($data[0])) { //multiple insert rows specified -- failing! - $this->nonSQLError("Badly formatted insertUpdate() query -- you didn't specify the update component!"); - } - - $args[0] = $data; - } - - if (is_array($args[0])) $update = $args[0]; - else $update = $args; - - return $this->insertOrReplace('INSERT', $table, $data, array('update' => $update)); - } - - public function delete() { - $args = func_get_args(); - $table = $this->formatTableName(array_shift($args)); - $where = array_shift($args); - $buildquery = "DELETE FROM $table WHERE $where"; - array_unshift($args, $buildquery); - return call_user_func_array(array($this, 'query'), $args); - } - - public function sqleval() { - $args = func_get_args(); - $text = call_user_func_array(array($this, 'parseQueryParams'), $args); - return new MeekroDBEval($text); - } - - public function columnList($table) { - return $this->queryOneColumn('Field', "SHOW COLUMNS FROM %b", $table); - } - - public function tableList($db = null) { - if ($db) { - $olddb = $this->current_db; - $this->useDB($db); - } - - $result = $this->queryFirstColumn('SHOW TABLES'); - if (isset($olddb)) $this->useDB($olddb); - return $result; - } - - protected function preparseQueryParams() { - $args = func_get_args(); - $sql = trim(strval(array_shift($args))); - $args_all = $args; - - if (count($args_all) == 0) return array($sql); - - $param_char_length = strlen($this->param_char); - $named_seperator_length = strlen($this->named_param_seperator); - - $types = array( - $this->param_char . 'll', // list of literals - $this->param_char . 'ls', // list of strings - $this->param_char . 'l', // literal - $this->param_char . 'li', // list of integers - $this->param_char . 'ld', // list of decimals - $this->param_char . 'lb', // list of backticks - $this->param_char . 'lt', // list of timestamps - $this->param_char . 's', // string - $this->param_char . 'i', // integer - $this->param_char . 'd', // double / decimal - $this->param_char . 'b', // backtick - $this->param_char . 't', // timestamp - $this->param_char . '?', // infer type - $this->param_char . 'ss' // search string (like string, surrounded with %'s) - ); - - // generate list of all MeekroDB variables in our query, and their position - // in the form "offset => variable", sorted by offsets - $posList = array(); - foreach ($types as $type) { - $lastPos = 0; - while (($pos = strpos($sql, $type, $lastPos)) !== false) { - $lastPos = $pos + 1; - if (isset($posList[$pos]) && strlen($posList[$pos]) > strlen($type)) continue; - $posList[$pos] = $type; - } - } - - ksort($posList); - - // for each MeekroDB variable, substitute it with array(type: i, value: 53) or whatever - $chunkyQuery = array(); // preparsed query - $pos_adj = 0; // how much we've added or removed from the original sql string - foreach ($posList as $pos => $type) { - $type = substr($type, $param_char_length); // variable, without % in front of it - $length_type = strlen($type) + $param_char_length; // length of variable w/o % - - $new_pos = $pos + $pos_adj; // position of start of variable - $new_pos_back = $new_pos + $length_type; // position of end of variable - $arg_number_length = 0; // length of any named or numbered parameter addition - - // handle numbered parameters - if ($arg_number_length = strspn($sql, '0123456789', $new_pos_back)) { - $arg_number = substr($sql, $new_pos_back, $arg_number_length); - if (! array_key_exists($arg_number, $args_all)) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); - - $arg = $args_all[$arg_number]; - - // handle named parameters - } else if (substr($sql, $new_pos_back, $named_seperator_length) == $this->named_param_seperator) { - $arg_number_length = strspn($sql, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_', - $new_pos_back + $named_seperator_length) + $named_seperator_length; - - $arg_number = substr($sql, $new_pos_back + $named_seperator_length, $arg_number_length - $named_seperator_length); - if (count($args_all) != 1 || !is_array($args_all[0])) $this->nonSQLError("If you use named parameters, the second argument must be an array of parameters"); - if (! array_key_exists($arg_number, $args_all[0])) $this->nonSQLError("Non existent argument reference (arg $arg_number): $sql"); - - $arg = $args_all[0][$arg_number]; - - } else { - $arg_number = 0; - $arg = array_shift($args); - } - - if ($new_pos > 0) $chunkyQuery[] = substr($sql, 0, $new_pos); - - if (is_object($arg) && ($arg instanceof WhereClause)) { - list($clause_sql, $clause_args) = $arg->textAndArgs(); - array_unshift($clause_args, $clause_sql); - $preparsed_sql = call_user_func_array(array($this, 'preparseQueryParams'), $clause_args); - $chunkyQuery = array_merge($chunkyQuery, $preparsed_sql); - } else { - $chunkyQuery[] = array('type' => $type, 'value' => $arg); - } - - $sql = substr($sql, $new_pos_back + $arg_number_length); - $pos_adj -= $new_pos_back + $arg_number_length; - } - - if (strlen($sql) > 0) $chunkyQuery[] = $sql; - - return $chunkyQuery; - } - - protected function escape($str) { return "'" . $this->get()->real_escape_string(strval($str)) . "'"; } - - protected function sanitize($value) { - if (is_object($value)) { - if ($value instanceof MeekroDBEval) return $value->text; - else if ($value instanceof DateTime) return $this->escape($value->format('Y-m-d H:i:s')); - else return ''; - } - - if (is_null($value)) return $this->usenull ? 'NULL' : "''"; - else if (is_bool($value)) return ($value ? 1 : 0); - else if (is_int($value)) return $value; - else if (is_float($value)) return $value; - - else if (is_array($value)) { - // non-assoc array? - if (array_values($value) === $value) { - if (is_array($value[0])) return implode(', ', array_map(array($this, 'sanitize'), $value)); - else return '(' . implode(', ', array_map(array($this, 'sanitize'), $value)) . ')'; - } - - $pairs = array(); - foreach ($value as $k => $v) { - $pairs[] = $this->formatTableName($k) . '=' . $this->sanitize($v); - } - - return implode(', ', $pairs); - } - else return $this->escape($value); - } - - protected function parseTS($ts) { - if (is_string($ts)) return date('Y-m-d H:i:s', strtotime($ts)); - else if (is_object($ts) && ($ts instanceof DateTime)) return $ts->format('Y-m-d H:i:s'); - } - - protected function intval($var) { - if (PHP_INT_SIZE == 8) return intval($var); - return floor(doubleval($var)); - } - - protected function parseQueryParams() { - $args = func_get_args(); - $chunkyQuery = call_user_func_array(array($this, 'preparseQueryParams'), $args); - - $query = ''; - $array_types = array('ls', 'li', 'ld', 'lb', 'll', 'lt'); - - foreach ($chunkyQuery as $chunk) { - if (is_string($chunk)) { - $query .= $chunk; - continue; - } - - $type = $chunk['type']; - $arg = $chunk['value']; - $result = ''; - - if ($type != '?') { - $is_array_type = in_array($type, $array_types, true); - if ($is_array_type && !is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected array, got scalar instead!"); - else if (!$is_array_type && is_array($arg)) $this->nonSQLError("Badly formatted SQL query: Expected scalar, got array instead!"); - } - - if ($type == 's') $result = $this->escape($arg); - else if ($type == 'i') $result = $this->intval($arg); - else if ($type == 'd') $result = doubleval($arg); - else if ($type == 'b') $result = $this->formatTableName($arg); - else if ($type == 'l') $result = $arg; - else if ($type == 'ss') $result = $this->escape("%" . str_replace(array('%', '_'), array('\%', '\_'), $arg) . "%"); - else if ($type == 't') $result = $this->escape($this->parseTS($arg)); - - else if ($type == 'ls') $result = array_map(array($this, 'escape'), $arg); - else if ($type == 'li') $result = array_map(array($this, 'intval'), $arg); - else if ($type == 'ld') $result = array_map('doubleval', $arg); - else if ($type == 'lb') $result = array_map(array($this, 'formatTableName'), $arg); - else if ($type == 'll') $result = $arg; - else if ($type == 'lt') $result = array_map(array($this, 'escape'), array_map(array($this, 'parseTS'), $arg)); - - else if ($type == '?') $result = $this->sanitize($arg); - - else $this->nonSQLError("Badly formatted SQL query: Invalid MeekroDB param $type"); - - if (is_array($result)) $result = '(' . implode(',', $result) . ')'; - - $query .= $result; - } - - return $query; - } - - protected function prependCall($function, $args, $prepend) { array_unshift($args, $prepend); return call_user_func_array($function, $args); } - public function query() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'assoc'); } - public function queryAllLists() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'list'); } - public function queryFullColumns() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'full'); } - - public function queryRaw() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_buf'); } - public function queryRawUnbuf() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'raw_unbuf'); } - - protected function queryHelper() { - $args = func_get_args(); - $type = array_shift($args); - $db = $this->get(); - - $is_buffered = true; - $row_type = 'assoc'; // assoc, list, raw - $full_names = false; - - switch ($type) { - case 'assoc': - break; - case 'list': - $row_type = 'list'; - break; - case 'full': - $row_type = 'list'; - $full_names = true; - break; - case 'raw_buf': - $row_type = 'raw'; - break; - case 'raw_unbuf': - $is_buffered = false; - $row_type = 'raw'; - break; - default: - $this->nonSQLError('Error -- invalid argument to queryHelper!'); - } - - $sql = call_user_func_array(array($this, 'parseQueryParams'), $args); - - if ($this->success_handler) $starttime = microtime(true); - $result = $db->query($sql, $is_buffered ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT); - if ($this->success_handler) $runtime = microtime(true) - $starttime; - else $runtime = 0; - - // ----- BEGIN ERROR HANDLING - if (!$sql || $db->error) { - if ($this->error_handler) { - $error_handler = is_callable($this->error_handler) ? $this->error_handler : 'meekrodb_error_handler'; - - call_user_func($error_handler, array( - 'type' => 'sql', - 'query' => $sql, - 'error' => $db->error, - 'code' => $db->errno - )); - } - - if ($this->throw_exception_on_error) { - $e = new MeekroDBException($db->error, $sql, $db->errno); - throw $e; - } - } else if ($this->success_handler) { - $runtime = sprintf('%f', $runtime * 1000); - $success_handler = is_callable($this->success_handler) ? $this->success_handler : 'meekrodb_debugmode_handler'; - - call_user_func($success_handler, array( - 'query' => $sql, - 'runtime' => $runtime, - 'affected' => $db->affected_rows - )); - } - - // ----- END ERROR HANDLING - - $this->insert_id = $db->insert_id; - $this->affected_rows = $db->affected_rows; - - // mysqli_result->num_rows won't initially show correct results for unbuffered data - if ($is_buffered && ($result instanceof MySQLi_Result)) $this->num_rows = $result->num_rows; - else $this->num_rows = null; - - if ($row_type == 'raw' || !($result instanceof MySQLi_Result)) return $result; - - $return = array(); - - if ($full_names) { - $infos = array(); - foreach ($result->fetch_fields() as $info) { - if (strlen($info->table)) $infos[] = $info->table . '.' . $info->name; - else $infos[] = $info->name; - } - } - - while ($row = ($row_type == 'assoc' ? $result->fetch_assoc() : $result->fetch_row())) { - if ($full_names) $row = array_combine($infos, $row); - $return[] = $row; - } - - // free results - $result->free(); - while ($db->more_results()) { - $db->next_result(); - if ($result = $db->use_result()) $result->free(); - } - - return $return; - } - - public function queryOneRow() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstRow'), $args); } - public function queryFirstRow() { - $args = func_get_args(); - $result = call_user_func_array(array($this, 'query'), $args); - if (!$result || !is_array($result)) return null; - return reset($result); - } - - public function queryOneList() { $args = func_get_args(); return call_user_func_array(array($this, 'queryFirstList'), $args); } - public function queryFirstList() { - $args = func_get_args(); - $result = call_user_func_array(array($this, 'queryAllLists'), $args); - if (!$result || !is_array($result)) return null; - return reset($result); - } - - public function queryFirstColumn() { - $args = func_get_args(); - $results = call_user_func_array(array($this, 'queryAllLists'), $args); - $ret = array(); - - if (!count($results) || !count($results[0])) return $ret; - - foreach ($results as $row) { - $ret[] = $row[0]; - } - - return $ret; - } - - public function queryOneColumn() { - $args = func_get_args(); - $column = array_shift($args); - $results = call_user_func_array(array($this, 'query'), $args); - $ret = array(); - - if (!count($results) || !count($results[0])) return $ret; - if ($column === null) { - $keys = array_keys($results[0]); - $column = $keys[0]; - } - - foreach ($results as $row) { - $ret[] = $row[$column]; - } - - return $ret; - } - - public function queryFirstField() { - $args = func_get_args(); - $row = call_user_func_array(array($this, 'queryFirstList'), $args); - if ($row == null) return null; - return $row[0]; - } - - public function queryOneField() { - $args = func_get_args(); - $column = array_shift($args); - - $row = call_user_func_array(array($this, 'queryOneRow'), $args); - if ($row == null) { - return null; - } else if ($column === null) { - $keys = array_keys($row); - $column = $keys[0]; - } - - return $row[$column]; - } -} - -class WhereClause { - public $type = 'and'; //AND or OR - public $negate = false; - public $clauses = array(); - - function __construct($type) { - $type = strtolower($type); - if ($type !== 'or' && $type !== 'and') DB::nonSQLError('you must use either WhereClause(and) or WhereClause(or)'); - $this->type = $type; - } - - function add() { - $args = func_get_args(); - $sql = array_shift($args); - - if ($sql instanceof WhereClause) { - $this->clauses[] = $sql; - } else { - $this->clauses[] = array('sql' => $sql, 'args' => $args); - } - } - - function negateLast() { - $i = count($this->clauses) - 1; - if (!isset($this->clauses[$i])) return; - - if ($this->clauses[$i] instanceof WhereClause) { - $this->clauses[$i]->negate(); - } else { - $this->clauses[$i]['sql'] = 'NOT (' . $this->clauses[$i]['sql'] . ')'; - } - } - - function negate() { - $this->negate = ! $this->negate; - } - - function addClause($type) { - $r = new WhereClause($type); - $this->add($r); - return $r; - } - - function count() { - return count($this->clauses); - } - - function textAndArgs() { - $sql = array(); - $args = array(); - - if (count($this->clauses) == 0) return array('(1)', $args); - - foreach ($this->clauses as $clause) { - if ($clause instanceof WhereClause) { - list($clause_sql, $clause_args) = $clause->textAndArgs(); - } else { - $clause_sql = $clause['sql']; - $clause_args = $clause['args']; - } - - $sql[] = "($clause_sql)"; - $args = array_merge($args, $clause_args); - } - - if ($this->type == 'and') $sql = implode(' AND ', $sql); - else $sql = implode(' OR ', $sql); - - if ($this->negate) $sql = '(NOT ' . $sql . ')'; - return array($sql, $args); - } - - // backwards compatability - // we now return full WhereClause object here and evaluate it in preparseQueryParams - function text() { return $this; } -} - -class DBTransaction { - private $committed = false; - - function __construct() { - DB::startTransaction(); - } - function __destruct() { - if (! $this->committed) DB::rollback(); - } - function commit() { - DB::commit(); - $this->committed = true; - } - - -} - -class MeekroDBException extends Exception { - protected $query = ''; - - function __construct($message='', $query='', $code = 0) { - parent::__construct($message); - $this->query = $query; - $this->code = $code; - } - - public function getQuery() { return $this->query; } -} - -class DBHelper { - /* - verticalSlice - 1. For an array of assoc rays, return an array of values for a particular key - 2. if $keyfield is given, same as above but use that hash key as the key in new array - */ - - public static function verticalSlice($array, $field, $keyfield = null) { - $array = (array) $array; - - $R = array(); - foreach ($array as $obj) { - if (! array_key_exists($field, $obj)) die("verticalSlice: array doesn't have requested field\n"); - - if ($keyfield) { - if (! array_key_exists($keyfield, $obj)) die("verticalSlice: array doesn't have requested field\n"); - $R[$obj[$keyfield]] = $obj[$field]; - } else { - $R[] = $obj[$field]; - } - } - return $R; - } - - /* - reIndex - For an array of assoc rays, return a new array of assoc rays using a certain field for keys - */ - - public static function reIndex() { - $fields = func_get_args(); - $array = array_shift($fields); - $array = (array) $array; - - $R = array(); - foreach ($array as $obj) { - $target =& $R; - - foreach ($fields as $field) { - if (! array_key_exists($field, $obj)) die("reIndex: array doesn't have requested field\n"); - - $nextkey = $obj[$field]; - $target =& $target[$nextkey]; - } - $target = $obj; - } - return $R; - } -} - -function meekrodb_error_handler($params) { - if (isset($params['query'])) $out[] = "QUERY: " . $params['query']; - if (isset($params['error'])) $out[] = "ERROR: " . $params['error']; - $out[] = ""; - - if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { - echo implode("\n", $out); - } else { - echo implode("
\n", $out); - } - - die; -} - -function meekrodb_debugmode_handler($params) { - echo "QUERY: " . $params['query'] . " [" . $params['runtime'] . " ms]"; - if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) { - echo "\n"; - } else { - echo "
\n"; - } -} - -class MeekroDBEval { - public $text = ''; - - function __construct($text) { - $this->text = $text; - } -} - - diff --git a/e_lib/phpmailer5/PHPMailerAutoload.php b/e_lib/phpmailer5/PHPMailerAutoload.php deleted file mode 100644 index eaa2e303..00000000 --- a/e_lib/phpmailer5/PHPMailerAutoload.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailer SPL autoloader. - * @param string $classname The name of the class to load - */ -function PHPMailerAutoload($classname) -{ - //Can't use __DIR__ as it's only in PHP 5.3+ - $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; - if (is_readable($filename)) { - require $filename; - } -} - -if (version_compare(PHP_VERSION, '5.1.2', '>=')) { - //SPL autoloading was introduced in PHP 5.1.2 - if (version_compare(PHP_VERSION, '5.3.0', '>=')) { - spl_autoload_register('PHPMailerAutoload', true, true); - } else { - spl_autoload_register('PHPMailerAutoload'); - } -} else { - /** - * Fall back to traditional autoload for old PHP versions - * @param string $classname The name of the class to load - */ - function __autoload($classname) - { - PHPMailerAutoload($classname); - } -} diff --git a/e_lib/phpmailer5/VERSION b/e_lib/phpmailer5/VERSION deleted file mode 100644 index f0fb1a22..00000000 --- a/e_lib/phpmailer5/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.2.26 diff --git a/e_lib/phpmailer5/class.phpmaileroauth.php b/e_lib/phpmailer5/class.phpmaileroauth.php deleted file mode 100644 index b1bb09f0..00000000 --- a/e_lib/phpmailer5/class.phpmaileroauth.php +++ /dev/null @@ -1,197 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailerOAuth - PHPMailer subclass adding OAuth support. - * @package PHPMailer - * @author @sherryl4george - * @author Marcus Bointon (@Synchro) - */ -class PHPMailerOAuth extends PHPMailer -{ - /** - * The OAuth user's email address - * @var string - */ - public $oauthUserEmail = ''; - - /** - * The OAuth refresh token - * @var string - */ - public $oauthRefreshToken = ''; - - /** - * The OAuth client ID - * @var string - */ - public $oauthClientId = ''; - - /** - * The OAuth client secret - * @var string - */ - public $oauthClientSecret = ''; - - /** - * An instance of the PHPMailerOAuthGoogle class. - * @var PHPMailerOAuthGoogle - * @access protected - */ - protected $oauth = null; - - /** - * Get a PHPMailerOAuthGoogle instance to use. - * @return PHPMailerOAuthGoogle - */ - public function getOAUTHInstance() - { - if (!is_object($this->oauth)) { - $this->oauth = new PHPMailerOAuthGoogle( - $this->oauthUserEmail, - $this->oauthClientSecret, - $this->oauthClientId, - $this->oauthRefreshToken - ); - } - return $this->oauth; - } - - /** - * Initiate a connection to an SMTP server. - * Overrides the original smtpConnect method to add support for OAuth. - * @param array $options An array of options compatible with stream_context_create() - * @uses SMTP - * @access public - * @return bool - * @throws phpmailerException - */ - public function smtpConnect($options = array()) - { - if (is_null($this->smtp)) { - $this->smtp = $this->getSMTPInstance(); - } - - if (is_null($this->oauth)) { - $this->oauth = $this->getOAUTHInstance(); - } - - // Already connected? - if ($this->smtp->connected()) { - return true; - } - - $this->smtp->setTimeout($this->Timeout); - $this->smtp->setDebugLevel($this->SMTPDebug); - $this->smtp->setDebugOutput($this->Debugoutput); - $this->smtp->setVerp($this->do_verp); - $hosts = explode(';', $this->Host); - $lastexception = null; - - foreach ($hosts as $hostentry) { - $hostinfo = array(); - if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { - // Not a valid host entry - continue; - } - // $hostinfo[2]: optional ssl or tls prefix - // $hostinfo[3]: the hostname - // $hostinfo[4]: optional port number - // The host string prefix can temporarily override the current setting for SMTPSecure - // If it's not specified, the default value is used - $prefix = ''; - $secure = $this->SMTPSecure; - $tls = ($this->SMTPSecure == 'tls'); - if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { - $prefix = 'ssl://'; - $tls = false; // Can't have SSL and TLS at the same time - $secure = 'ssl'; - } elseif ($hostinfo[2] == 'tls') { - $tls = true; - // tls doesn't use a prefix - $secure = 'tls'; - } - //Do we need the OpenSSL extension? - $sslext = defined('OPENSSL_ALGO_SHA1'); - if ('tls' === $secure or 'ssl' === $secure) { - //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled - if (!$sslext) { - throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); - } - } - $host = $hostinfo[3]; - $port = $this->Port; - $tport = (integer)$hostinfo[4]; - if ($tport > 0 and $tport < 65536) { - $port = $tport; - } - if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { - try { - if ($this->Helo) { - $hello = $this->Helo; - } else { - $hello = $this->serverHostname(); - } - $this->smtp->hello($hello); - //Automatically enable TLS encryption if: - // * it's not disabled - // * we have openssl extension - // * we are not already using SSL - // * the server offers STARTTLS - if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { - $tls = true; - } - if ($tls) { - if (!$this->smtp->startTLS()) { - throw new phpmailerException($this->lang('connect_host')); - } - // We must resend HELO after tls negotiation - $this->smtp->hello($hello); - } - if ($this->SMTPAuth) { - if (!$this->smtp->authenticate( - $this->Username, - $this->Password, - $this->AuthType, - $this->Realm, - $this->Workstation, - $this->oauth - ) - ) { - throw new phpmailerException($this->lang('authenticate')); - } - } - return true; - } catch (phpmailerException $exc) { - $lastexception = $exc; - $this->edebug($exc->getMessage()); - // We must have connected, but then failed TLS or Auth, so close connection nicely - $this->smtp->quit(); - } - } - } - // If we get here, all connection attempts have failed, so close connection hard - $this->smtp->close(); - // As we've caught all exceptions, just report whatever the last one was - if ($this->exceptions and !is_null($lastexception)) { - throw $lastexception; - } - return false; - } -} diff --git a/e_lib/phpmailer5/class.phpmaileroauthgoogle.php b/e_lib/phpmailer5/class.phpmaileroauthgoogle.php deleted file mode 100644 index 71c9bd32..00000000 --- a/e_lib/phpmailer5/class.phpmaileroauthgoogle.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -/** - * PHPMailerOAuthGoogle - Wrapper for League OAuth2 Google provider. - * @package PHPMailer - * @author @sherryl4george - * @author Marcus Bointon (@Synchro) - * @link https://github.com/thephpleague/oauth2-client - */ -class PHPMailerOAuthGoogle -{ - private $oauthUserEmail = ''; - private $oauthRefreshToken = ''; - private $oauthClientId = ''; - private $oauthClientSecret = ''; - - /** - * @param string $UserEmail - * @param string $ClientSecret - * @param string $ClientId - * @param string $RefreshToken - */ - public function __construct( - $UserEmail, - $ClientSecret, - $ClientId, - $RefreshToken - ) { - $this->oauthClientId = $ClientId; - $this->oauthClientSecret = $ClientSecret; - $this->oauthRefreshToken = $RefreshToken; - $this->oauthUserEmail = $UserEmail; - } - - private function getProvider() - { - return new League\OAuth2\Client\Provider\Google([ - 'clientId' => $this->oauthClientId, - 'clientSecret' => $this->oauthClientSecret - ]); - } - - private function getGrant() - { - return new \League\OAuth2\Client\Grant\RefreshToken(); - } - - private function getToken() - { - $provider = $this->getProvider(); - $grant = $this->getGrant(); - return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]); - } - - public function getOauth64() - { - $token = $this->getToken(); - return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001"); - } -} diff --git a/e_lib/phpmailer5/composer.json b/e_lib/phpmailer5/composer.json deleted file mode 100644 index a0ac2964..00000000 --- a/e_lib/phpmailer5/composer.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "phpmailer/phpmailer", - "type": "library", - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "require": { - "ext-ctype": "*", - "php": ">=5.0.0" - }, - "require-dev": { - "doctrine/annotations": "1.2.*", - "jms/serializer": "0.16.*", - "phpdocumentor/phpdocumentor": "2.*", - "phpunit/phpunit": "4.8.*", - "symfony/debug": "2.8.*", - "symfony/filesystem": "2.8.*", - "symfony/translation": "2.8.*", - "symfony/yaml": "2.8.*", - "zendframework/zend-cache": "2.5.1", - "zendframework/zend-config": "2.5.1", - "zendframework/zend-eventmanager": "2.5.1", - "zendframework/zend-filter": "2.5.1", - "zendframework/zend-i18n": "2.5.1", - "zendframework/zend-json": "2.5.1", - "zendframework/zend-math": "2.5.1", - "zendframework/zend-serializer": "2.5.*", - "zendframework/zend-servicemanager": "2.5.*", - "zendframework/zend-stdlib": "2.5.1" - }, - "suggest": { - "league/oauth2-google": "Needed for Google XOAUTH2 authentication" - }, - "autoload": { - "classmap": [ - "class.phpmailer.php", - "class.phpmaileroauth.php", - "class.phpmaileroauthgoogle.php", - "class.smtp.php", - "class.pop3.php", - "extras/EasyPeasyICS.php", - "extras/ntlm_sasl_client.php" - ] - }, - "license": "LGPL-2.1" -} diff --git a/e_lib/phpmailer5/composer.lock b/e_lib/phpmailer5/composer.lock deleted file mode 100644 index 9808f283..00000000 --- a/e_lib/phpmailer5/composer.lock +++ /dev/null @@ -1,3593 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "7e4b1bef833056eed0df39fad5399d7a", - "packages": [], - "packages-dev": [ - { - "name": "cilex/cilex", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/Cilex.git", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5", - "shasum": "" - }, - "require": { - "cilex/console-service-provider": "1.*", - "php": ">=5.3.3", - "pimple/pimple": "~1.0", - "symfony/finder": "~2.1", - "symfony/process": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "symfony/validator": "~2.1" - }, - "suggest": { - "monolog/monolog": ">=1.0.0", - "symfony/validator": ">=1.0.0", - "symfony/yaml": ">=1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components", - "homepage": "http://cilex.github.com", - "keywords": [ - "cli", - "microframework" - ], - "time": "2014-03-29T14:03:13+00:00" - }, - { - "name": "cilex/console-service-provider", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/console-service-provider.git", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*@dev", - "symfony/console": "~2.1" - }, - "require-dev": { - "cilex/cilex": "1.*@dev", - "silex/silex": "1.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex\\Provider\\Console": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - }, - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "Console Service Provider", - "keywords": [ - "cilex", - "console", - "pimple", - "service-provider", - "silex" - ], - "time": "2012-12-19T10:50:58+00:00" - }, - { - "name": "doctrine/annotations", - "version": "v1.2.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2015-08-31T12:32:49+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "erusev/parsedown", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", - "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2016-11-02T15:56:58+00:00" - }, - { - "name": "herrera-io/json", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/kherge-php/json.git", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-php/json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "justinrainbow/json-schema": ">=1.0,<2.0-dev", - "php": ">=5.3.3", - "seld/jsonlint": ">=1.0,<2.0-dev" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/json_version.php" - ], - "psr-0": { - "Herrera\\Json": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for simplifying JSON linting and validation.", - "homepage": "http://herrera-io.github.com/php-json", - "keywords": [ - "json", - "lint", - "schema", - "validate" - ], - "abandoned": "kherge/json", - "time": "2013-10-30T16:51:34+00:00" - }, - { - "name": "herrera-io/phar-update", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/php-phar-update.git", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "shasum": "" - }, - "require": { - "herrera-io/json": "1.*", - "kherge/version": "1.*", - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/constants.php" - ], - "psr-0": { - "Herrera\\Phar\\Update": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for self-updating Phars.", - "homepage": "http://herrera-io.github.com/php-phar-update", - "keywords": [ - "phar", - "update" - ], - "abandoned": true, - "time": "2013-10-30T17:23:01+00:00" - }, - { - "name": "jms/metadata", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab", - "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "doctrine/cache": "~1.0", - "symfony/cache": "~3.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Metadata\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "time": "2016-12-05T10:18:33+00:00" - }, - { - "name": "jms/parser-lib", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/parser-lib.git", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "shasum": "" - }, - "require": { - "phpoption/phpoption": ">=0.9,<2.0-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "description": "A library for easily creating recursive-descent parsers.", - "time": "2012-11-18T18:08:43+00:00" - }, - { - "name": "jms/serializer", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "jms/metadata": "~1.1", - "jms/parser-lib": "1.*", - "php": ">=5.3.2", - "phpcollection/phpcollection": "~0.1" - }, - "require-dev": { - "doctrine/orm": "~2.1", - "doctrine/phpcr-odm": "~1.0.1", - "jackalope/jackalope-doctrine-dbal": "1.0.*", - "propel/propel1": "~1.7", - "symfony/filesystem": "2.*", - "symfony/form": "~2.1", - "symfony/translation": "~2.0", - "symfony/validator": "~2.0", - "symfony/yaml": "2.*", - "twig/twig": ">=1.8,<2.0-dev" - }, - "suggest": { - "symfony/yaml": "Required if you'd like to serialize data to YAML format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.15-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\Serializer": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", - "homepage": "http://jmsyst.com/libs/serializer", - "keywords": [ - "deserialization", - "jaxb", - "json", - "serialization", - "xml" - ], - "time": "2014-03-18T08:39:00+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", - "shasum": "" - }, - "require": { - "php": ">=5.3.29" - }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2016-01-25T15:43:01+00:00" - }, - { - "name": "kherge/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/kherge-abandoned/Version.git", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-abandoned/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "KevinGH\\Version": "src/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "me@kevingh.com", - "homepage": "http://www.kevingh.com/" - } - ], - "description": "A parsing and comparison library for semantic versioning.", - "homepage": "http://github.com/kherge/Version", - "abandoned": true, - "time": "2012-08-16T17:13:03+00:00" - }, - { - "name": "monolog/monolog", - "version": "1.22.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", - "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "~5.3" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2017-03-13T07:08:03+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", - "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "files": [ - "lib/bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2015-09-19T14:15:08+00:00" - }, - { - "name": "phpcollection/phpcollection", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", - "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", - "shasum": "" - }, - "require": { - "phpoption/phpoption": "1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, - "autoload": { - "psr-0": { - "PhpCollection": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "General-Purpose Collection Library for PHP", - "keywords": [ - "collection", - "list", - "map", - "sequence", - "set" - ], - "time": "2015-05-17T12:39:23+00:00" - }, - { - "name": "phpdocumentor/fileset", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Fileset.git", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/finder": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Fileset component for collecting a set of files given directories and file paths", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "files", - "fileset", - "phpdoc" - ], - "time": "2013-08-06T21:07:42+00:00" - }, - { - "name": "phpdocumentor/graphviz", - "version": "1.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/GraphViz.git", - "reference": "a906a90a9f230535f25ea31caf81b2323956283f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/a906a90a9f230535f25ea31caf81b2323956283f", - "reference": "a906a90a9f230535f25ea31caf81b2323956283f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2016-02-02T13:00:08+00:00" - }, - { - "name": "phpdocumentor/phpdocumentor", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/phpDocumentor2.git", - "reference": "be607da0eef9b9249c43c5b4820d25d631c73667" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/be607da0eef9b9249c43c5b4820d25d631c73667", - "reference": "be607da0eef9b9249c43c5b4820d25d631c73667", - "shasum": "" - }, - "require": { - "cilex/cilex": "~1.0", - "erusev/parsedown": "~1.0", - "herrera-io/phar-update": "1.0.3", - "jms/serializer": ">=0.12", - "monolog/monolog": "~1.6", - "php": ">=5.3.3", - "phpdocumentor/fileset": "~1.0", - "phpdocumentor/graphviz": "~1.0", - "phpdocumentor/reflection": "^3.0", - "phpdocumentor/reflection-docblock": "~2.0", - "symfony/config": "~2.3", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.0", - "symfony/stopwatch": "~2.3", - "symfony/validator": "~2.2", - "twig/twig": "~1.3", - "zendframework/zend-cache": "~2.1", - "zendframework/zend-config": "~2.1", - "zendframework/zend-filter": "~2.1", - "zendframework/zend-i18n": "~2.1", - "zendframework/zend-serializer": "~2.1", - "zendframework/zend-servicemanager": "~2.1", - "zendframework/zend-stdlib": "~2.1", - "zetacomponents/document": ">=1.3.1" - }, - "require-dev": { - "behat/behat": "~3.0", - "mikey179/vfsstream": "~1.2", - "mockery/mockery": "~0.9@dev", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.4", - "symfony/expression-language": "~2.4" - }, - "suggest": { - "ext-twig": "Enabling the twig extension improves the generation of twig based templates.", - "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates." - }, - "bin": [ - "bin/phpdoc.php", - "bin/phpdoc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "2.9-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ], - "Cilex\\Provider": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Documentation Generator for PHP", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "api", - "application", - "dga", - "documentation", - "phpdoc" - ], - "time": "2016-05-22T09:50:56+00:00" - }, - { - "name": "phpdocumentor/reflection", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Reflection.git", - "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", - "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^1.0", - "php": ">=5.3.3", - "phpdocumentor/reflection-docblock": "~2.0", - "psr/log": "~1.0" - }, - "require-dev": { - "behat/behat": "~2.4", - "mockery/mockery": "~0.8", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/", - "tests/mocks/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Reflection library to do Static Analysis for PHP Projects", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2016-05-21T08:42:32+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03T12:10:50+00:00" - }, - { - "name": "phpoption/phpoption", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpOption\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2015-07-25T16:39:46+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2017-03-02T20:05:34+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2016-10-03T07:40:28+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-02-27T10:12:30+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.35", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-02-06T05:18:07+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "pimple/pimple", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - } - ], - "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2013-11-22T08:30:29+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08T07:14:41+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "seld/jsonlint", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/791f8c594f300d246cdf01c6b3e1e19611e301d8", - "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "time": "2017-03-06T16:42:24+00:00" - }, - { - "name": "symfony/config", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/06ce6bb46c24963ec09323da45d0f4f85d3cecd2", - "reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" - }, - "require-dev": { - "symfony/yaml": "~2.7|~3.0.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2017-03-01T18:13:50+00:00" - }, - { - "name": "symfony/console", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa", - "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T11:00:12+00:00" - }, - { - "name": "symfony/debug", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e90099a2958d4833a02d05b504cc06e1c234abcc", - "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T19:13:35+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", - "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2017-02-21T08:33:48+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "e542d4765092d22552b1bf01ddccfb01d98ee325" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e542d4765092d22552b1bf01ddccfb01d98ee325", - "reference": "e542d4765092d22552b1bf01ddccfb01d98ee325", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T17:06:33+00:00" - }, - { - "name": "symfony/finder", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5fc4b5cab38b9d28be318fcffd8066988e7d9451", - "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-02-21T08:33:48+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/process", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/9e4369666d02ee9b8830da878b7f6a769eb96f4b", - "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T17:06:33+00:00" - }, - { - "name": "symfony/translation", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256", - "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8", - "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", - "symfony/yaml": "~2.2|~3.0.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/validator", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/validator.git", - "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", - "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation": "~2.4|~3.0.0" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "egulias/email-validator": "^1.2.1", - "symfony/config": "~2.2|~3.0.0", - "symfony/expression-language": "~2.4|~3.0.0", - "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", - "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "^2.0.5|~3.0.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Validator\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Validator Component", - "homepage": "https://symfony.com", - "time": "2017-02-28T02:24:56+00:00" - }, - { - "name": "symfony/yaml", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", - "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-03-01T18:13:50+00:00" - }, - { - "name": "twig/twig", - "version": "v1.32.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "9935b662e24d6e634da88901ab534cc12e8c728f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/9935b662e24d6e634da88901ab534cc12e8c728f", - "reference": "9935b662e24d6e634da88901ab534cc12e8c728f", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.32-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2017-02-27T00:07:03+00:00" - }, - { - "name": "zendframework/zend-cache", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-cache.git", - "reference": "5999e5a03f7dcf82abbbe67eea74da641f959684" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/5999e5a03f7dcf82abbbe67eea74da641f959684", - "reference": "5999e5a03f7dcf82abbbe67eea74da641f959684", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-session": "~2.5" - }, - "suggest": { - "ext-apc": "APC >= 3.1.6 to use the APC storage adapter", - "ext-dba": "DBA, to use the DBA storage adapter", - "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", - "ext-mongo": "Mongo, to use MongoDb storage adapter", - "ext-wincache": "WinCache, to use the WinCache storage adapter", - "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-session": "Zend\\Session component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a generic way to cache any data", - "homepage": "https://github.com/zendframework/zend-cache", - "keywords": [ - "cache", - "zf2" - ], - "time": "2015-06-03T15:31:59+00:00" - }, - { - "name": "zendframework/zend-config", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-config.git", - "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-config/zipball/ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", - "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-i18n": "~2.5", - "zendframework/zend-json": "~2.5", - "zendframework/zend-mvc": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", - "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Config\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://github.com/zendframework/zend-config", - "keywords": [ - "config", - "zf2" - ], - "time": "2015-06-03T15:32:00+00:00" - }, - { - "name": "zendframework/zend-eventmanager", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "d94a16039144936f107f906896349900fd634443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/d94a16039144936f107f906896349900fd634443", - "reference": "d94a16039144936f107f906896349900fd634443", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-eventmanager", - "keywords": [ - "eventmanager", - "zf2" - ], - "time": "2015-06-03T15:32:01+00:00" - }, - { - "name": "zendframework/zend-filter", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-filter.git", - "reference": "93e6990a198e6cdd811064083acac4693f4b29ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/93e6990a198e6cdd811064083acac4693f4b29ae", - "reference": "93e6990a198e6cdd811064083acac4693f4b29ae", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-crypt": "~2.5", - "zendframework/zend-i18n": "~2.5", - "zendframework/zend-loader": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-uri": "~2.5" - }, - "suggest": { - "zendframework/zend-crypt": "Zend\\Crypt component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Filter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a set of commonly needed data filters", - "homepage": "https://github.com/zendframework/zend-filter", - "keywords": [ - "filter", - "zf2" - ], - "time": "2015-06-03T15:32:01+00:00" - }, - { - "name": "zendframework/zend-i18n", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-i18n.git", - "reference": "509271eb7947e4aabebfc376104179cffea42696" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/509271eb7947e4aabebfc376104179cffea42696", - "reference": "509271eb7947e4aabebfc376104179cffea42696", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-cache": "~2.5", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-validator": "~2.5", - "zendframework/zend-view": "~2.5" - }, - "suggest": { - "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", - "zendframework/zend-filter": "You should install this package to use the provided filters", - "zendframework/zend-resources": "Translation resources", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-validator": "You should install this package to use the provided validators", - "zendframework/zend-view": "You should install this package to use the provided view helpers" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\I18n\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-i18n", - "keywords": [ - "i18n", - "zf2" - ], - "time": "2015-06-03T15:32:01+00:00" - }, - { - "name": "zendframework/zend-json", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-json.git", - "reference": "c74eaf17d2dd37dc1e964be8dfde05706a821ebc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-json/zipball/c74eaf17d2dd37dc1e964be8dfde05706a821ebc", - "reference": "c74eaf17d2dd37dc1e964be8dfde05706a821ebc", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-http": "~2.5", - "zendframework/zend-server": "~2.5", - "zendframework/zendxml": "~1.0" - }, - "suggest": { - "zendframework/zend-http": "Zend\\Http component", - "zendframework/zend-server": "Zend\\Server component", - "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://github.com/zendframework/zend-json", - "keywords": [ - "json", - "zf2" - ], - "time": "2015-06-03T15:32:01+00:00" - }, - { - "name": "zendframework/zend-math", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-math.git", - "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-math/zipball/9f02a1ac4d3374d3332c80f9215deec9c71558fc", - "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "ircmaxell/random-lib": "~1.1", - "phpunit/phpunit": "~4.0", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "ext-bcmath": "If using the bcmath functionality", - "ext-gmp": "If using the gmp functionality", - "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", - "zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-math", - "keywords": [ - "math", - "zf2" - ], - "time": "2015-06-03T15:32:02+00:00" - }, - { - "name": "zendframework/zend-serializer", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-serializer.git", - "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", - "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-json": "~2.5", - "zendframework/zend-math": "~2.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-servicemanager": "To support plugin manager support" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Serializer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zend-serializer", - "keywords": [ - "serializer", - "zf2" - ], - "time": "2015-06-03T15:32:02+00:00" - }, - { - "name": "zendframework/zend-servicemanager", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-servicemanager.git", - "reference": "3b22c403e351d92526c642cba0bd810bc22e1c56" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/3b22c403e351d92526c642cba0bd810bc22e1c56", - "reference": "3b22c403e351d92526c642cba0bd810bc22e1c56", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-di": "~2.5", - "zendframework/zend-mvc": "~2.5" - }, - "suggest": { - "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", - "zendframework/zend-di": "Zend\\Di component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\ServiceManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-servicemanager", - "keywords": [ - "servicemanager", - "zf2" - ], - "time": "2015-06-03T15:32:02+00:00" - }, - { - "name": "zendframework/zend-stdlib", - "version": "2.5.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cc8e90a60dd5d44b9730b77d07b97550091da1ae", - "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-stdlib", - "keywords": [ - "stdlib", - "zf2" - ], - "time": "2015-06-03T15:32:03+00:00" - }, - { - "name": "zetacomponents/base", - "version": "1.9", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Base.git", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", - "shasum": "" - }, - "require-dev": { - "zetacomponents/unit-test": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sergey Alexeev" - }, - { - "name": "Sebastian Bergmann" - }, - { - "name": "Jan Borsodi" - }, - { - "name": "Raymond Bosman" - }, - { - "name": "Frederik Holljen" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Vadym Savchuk" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", - "homepage": "https://github.com/zetacomponents", - "time": "2014-09-19T03:28:34+00:00" - }, - { - "name": "zetacomponents/document", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Document.git", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "shasum": "" - }, - "require": { - "zetacomponents/base": "*" - }, - "require-dev": { - "zetacomponents/unit-test": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sebastian Bergmann" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", - "homepage": "https://github.com/zetacomponents", - "time": "2013-12-19T11:40:00+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.0.0" - }, - "platform-dev": [] -} diff --git a/e_lib/phpmailer5/get_oauth_token.php b/e_lib/phpmailer5/get_oauth_token.php deleted file mode 100644 index 2c26d0fa..00000000 --- a/e_lib/phpmailer5/get_oauth_token.php +++ /dev/null @@ -1,162 +0,0 @@ -//get_oauth_token.php - * e.g.: http://localhost/phpmail/get_oauth_token.php - * * Ensure dependencies are installed with 'composer install' - * * Set up an app in your Google developer console - * * Set the script address as the app's redirect URL - * If no refresh token is obtained when running this file, revoke access to your app - * using link: https://accounts.google.com/b/0/IssuedAuthSubTokens and run the script again. - * This script requires PHP 5.4 or later - * PHP Version 5.4 - */ - -namespace League\OAuth2\Client\Provider; - -require 'vendor/autoload.php'; - -use League\OAuth2\Client\Provider\Exception\IdentityProviderException; -use League\OAuth2\Client\Token\AccessToken; -use League\OAuth2\Client\Tool\BearerAuthorizationTrait; -use Psr\Http\Message\ResponseInterface; - -session_start(); - -//If this automatic URL doesn't work, set it yourself manually -$redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; -//$redirectUri = 'http://localhost/phpmailer/get_oauth_token.php'; - -//These details obtained are by setting up app in Google developer console. -$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com'; -$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP'; - -class Google extends AbstractProvider -{ - use BearerAuthorizationTrait; - - const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id'; - - /** - * @var string If set, this will be sent to google as the "access_type" parameter. - * @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline - */ - protected $accessType; - - /** - * @var string If set, this will be sent to google as the "hd" parameter. - * @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param - */ - protected $hostedDomain; - - /** - * @var string If set, this will be sent to google as the "scope" parameter. - * @link https://developers.google.com/gmail/api/auth/scopes - */ - protected $scope; - - public function getBaseAuthorizationUrl() - { - return 'https://accounts.google.com/o/oauth2/auth'; - } - - public function getBaseAccessTokenUrl(array $params) - { - return 'https://accounts.google.com/o/oauth2/token'; - } - - public function getResourceOwnerDetailsUrl(AccessToken $token) - { - return ' '; - } - - protected function getAuthorizationParameters(array $options) - { - if (is_array($this->scope)) { - $separator = $this->getScopeSeparator(); - $this->scope = implode($separator, $this->scope); - } - - $params = array_merge( - parent::getAuthorizationParameters($options), - array_filter([ - 'hd' => $this->hostedDomain, - 'access_type' => $this->accessType, - 'scope' => $this->scope, - // if the user is logged in with more than one account ask which one to use for the login! - 'authuser' => '-1' - ]) - ); - return $params; - } - - protected function getDefaultScopes() - { - return [ - 'email', - 'openid', - 'profile', - ]; - } - - protected function getScopeSeparator() - { - return ' '; - } - - protected function checkResponse(ResponseInterface $response, $data) - { - if (!empty($data['error'])) { - $code = 0; - $error = $data['error']; - - if (is_array($error)) { - $code = $error['code']; - $error = $error['message']; - } - - throw new IdentityProviderException($error, $code, $data); - } - } - - protected function createResourceOwner(array $response, AccessToken $token) - { - return new GoogleUser($response); - } -} - - -//Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php -$provider = new Google( - array( - 'clientId' => $clientId, - 'clientSecret' => $clientSecret, - 'redirectUri' => $redirectUri, - 'scope' => array('https://mail.google.com/'), - 'accessType' => 'offline' - ) -); - -if (!isset($_GET['code'])) { - // If we don't have an authorization code then get one - $authUrl = $provider->getAuthorizationUrl(); - $_SESSION['oauth2state'] = $provider->getState(); - header('Location: ' . $authUrl); - exit; -// Check given state against previously stored one to mitigate CSRF attack -} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { - unset($_SESSION['oauth2state']); - exit('Invalid state'); -} else { - // Try to get an access token (using the authorization code grant) - $token = $provider->getAccessToken( - 'authorization_code', - array( - 'code' => $_GET['code'] - ) - ); - - // Use this to get a new access token if the old one expires - echo 'Refresh Token: ' . $token->getRefreshToken(); -} diff --git a/e_lib/plates.php b/e_lib/plates.php deleted file mode 100644 index 88f1d1c8..00000000 --- a/e_lib/plates.php +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/e_lib/plates/Engine.php b/e_lib/plates/Engine.php deleted file mode 100644 index 6c89642b..00000000 --- a/e_lib/plates/Engine.php +++ /dev/null @@ -1,279 +0,0 @@ -directory = new Directory($directory); - $this->fileExtension = new FileExtension($fileExtension); - $this->folders = new Folders(); - $this->functions = new Functions(); - $this->data = new Data(); - } - - /** - * Set path to templates directory. - * @param string|null $directory Pass null to disable the default directory. - * @return Engine - */ - public function setDirectory($directory) - { - $this->directory->set($directory); - - return $this; - } - - /** - * Get path to templates directory. - * @return string - */ - public function getDirectory() - { - return $this->directory->get(); - } - - /** - * Set the template file extension. - * @param string|null $fileExtension Pass null to manually set it. - * @return Engine - */ - public function setFileExtension($fileExtension) - { - $this->fileExtension->set($fileExtension); - - return $this; - } - - /** - * Get the template file extension. - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension->get(); - } - - /** - * Add a new template folder for grouping templates under different namespaces. - * @param string $name - * @param string $directory - * @param boolean $fallback - * @return Engine - */ - public function addFolder($name, $directory, $fallback = false) - { - $this->folders->add($name, $directory, $fallback); - - return $this; - } - - /** - * Remove a template folder. - * @param string $name - * @return Engine - */ - public function removeFolder($name) - { - $this->folders->remove($name); - - return $this; - } - - /** - * Get collection of all template folders. - * @return Folders - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Add preassigned template data. - * @param array $data; - * @param null|string|array $templates; - * @return Engine - */ - public function addData(array $data, $templates = null) - { - $this->data->add($data, $templates); - - return $this; - } - - /** - * Get all preassigned template data. - * @param null|string $template; - * @return array - */ - public function getData($template = null) - { - return $this->data->get($template); - } - - /** - * Register a new template function. - * @param string $name; - * @param callback $callback; - * @return Engine - */ - public function registerFunction($name, $callback) - { - $this->functions->add($name, $callback); - - return $this; - } - - /** - * Remove a template function. - * @param string $name; - * @return Engine - */ - public function dropFunction($name) - { - $this->functions->remove($name); - - return $this; - } - - /** - * Get a template function. - * @param string $name - * @return Func - */ - public function getFunction($name) - { - return $this->functions->get($name); - } - - /** - * Check if a template function exists. - * @param string $name - * @return boolean - */ - public function doesFunctionExist($name) - { - return $this->functions->exists($name); - } - - /** - * Load an extension. - * @param ExtensionInterface $extension - * @return Engine - */ - public function loadExtension(ExtensionInterface $extension) - { - $extension->register($this); - - return $this; - } - - /** - * Load multiple extensions. - * @param array $extensions - * @return Engine - */ - public function loadExtensions(array $extensions = array()) - { - foreach ($extensions as $extension) { - $this->loadExtension($extension); - } - - return $this; - } - - /** - * Get a template path. - * @param string $name - * @return string - */ - public function path($name) - { - $name = new Name($this, $name); - - return $name->getPath(); - } - - /** - * Check if a template exists. - * @param string $name - * @return boolean - */ - public function exists($name) - { - $name = new Name($this, $name); - - return $name->doesPathExist(); - } - - /** - * Create a new template. - * @param string $name - * @return Template - */ - public function make($name) - { - return new Template($this, $name); - } - - /** - * Create a new template and render it. - * @param string $name - * @param array $data - * @return string - */ - public function render($name, array $data = array()) - { - return $this->make($name)->render($data); - } -} diff --git a/e_lib/plates/Extension/Asset.php b/e_lib/plates/Extension/Asset.php deleted file mode 100644 index 91d39f66..00000000 --- a/e_lib/plates/Extension/Asset.php +++ /dev/null @@ -1,85 +0,0 @@ -path = rtrim($path, '/'); - $this->filenameMethod = $filenameMethod; - } - - /** - * Register extension function. - * @param Engine $engine - * @return null - */ - public function register(Engine $engine) - { - $engine->registerFunction('asset', array($this, 'cachedAssetUrl')); - } - - /** - * Create "cache busted" asset URL. - * @param string $url - * @return string - */ - public function cachedAssetUrl($url) - { - $filePath = $this->path . '/' . ltrim($url, '/'); - - if (!file_exists($filePath)) { - throw new LogicException( - 'Unable to locate the asset "' . $url . '" in the "' . $this->path . '" directory.' - ); - } - - $lastUpdated = filemtime($filePath); - $pathInfo = pathinfo($url); - - if ($pathInfo['dirname'] === '.') { - $directory = ''; - } elseif ($pathInfo['dirname'] === '/') { - $directory = '/'; - } else { - $directory = $pathInfo['dirname'] . '/'; - } - - if ($this->filenameMethod) { - return $directory . $pathInfo['filename'] . '.' . $lastUpdated . '.' . $pathInfo['extension']; - } - - return $directory . $pathInfo['filename'] . '.' . $pathInfo['extension'] . '?v=' . $lastUpdated; - } -} diff --git a/e_lib/plates/Extension/ExtensionInterface.php b/e_lib/plates/Extension/ExtensionInterface.php deleted file mode 100644 index 0164d1ea..00000000 --- a/e_lib/plates/Extension/ExtensionInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -uri = $uri; - $this->parts = explode('/', $this->uri); - } - - /** - * Register extension functions. - * @param Engine $engine - * @return null - */ - public function register(Engine $engine) - { - $engine->registerFunction('uri', array($this, 'runUri')); - } - - /** - * Perform URI check. - * @param null|integer|string $var1 - * @param mixed $var2 - * @param mixed $var3 - * @param mixed $var4 - * @return mixed - */ - public function runUri($var1 = null, $var2 = null, $var3 = null, $var4 = null) - { - if (is_null($var1)) { - return $this->uri; - } - - if (is_numeric($var1) and is_null($var2)) { - return array_key_exists($var1, $this->parts) ? $this->parts[$var1] : null; - } - - if (is_numeric($var1) and is_string($var2)) { - return $this->checkUriSegmentMatch($var1, $var2, $var3, $var4); - } - - if (is_string($var1)) { - return $this->checkUriRegexMatch($var1, $var2, $var3); - } - - throw new LogicException('Invalid use of the uri function.'); - } - - /** - * Perform a URI segment match. - * @param integer $key - * @param string $string - * @param mixed $returnOnTrue - * @param mixed $returnOnFalse - * @return mixed - */ - protected function checkUriSegmentMatch($key, $string, $returnOnTrue = null, $returnOnFalse = null) - { - if (array_key_exists($key, $this->parts) && $this->parts[$key] === $string) { - return is_null($returnOnTrue) ? true : $returnOnTrue; - } - - return is_null($returnOnFalse) ? false : $returnOnFalse; - } - - /** - * Perform a regular express match. - * @param string $regex - * @param mixed $returnOnTrue - * @param mixed $returnOnFalse - * @return mixed - */ - protected function checkUriRegexMatch($regex, $returnOnTrue = null, $returnOnFalse = null) - { - if (preg_match('#^' . $regex . '$#', $this->uri) === 1) { - return is_null($returnOnTrue) ? true : $returnOnTrue; - } - - return is_null($returnOnFalse) ? false : $returnOnFalse; - } -} diff --git a/e_lib/plates/Template/Data.php b/e_lib/plates/Template/Data.php deleted file mode 100644 index aa4d1e1e..00000000 --- a/e_lib/plates/Template/Data.php +++ /dev/null @@ -1,93 +0,0 @@ -shareWithAll($data); - } - - if (is_array($templates)) { - return $this->shareWithSome($data, $templates); - } - - if (is_string($templates)) { - return $this->shareWithSome($data, array($templates)); - } - - throw new LogicException( - 'The templates variable must be null, an array or a string, ' . gettype($templates) . ' given.' - ); - } - - /** - * Add data shared with all templates. - * @param array $data; - * @return Data - */ - public function shareWithAll($data) - { - $this->sharedVariables = array_merge($this->sharedVariables, $data); - - return $this; - } - - /** - * Add data shared with some templates. - * @param array $data; - * @param array $templates; - * @return Data - */ - public function shareWithSome($data, array $templates) - { - foreach ($templates as $template) { - if (isset($this->templateVariables[$template])) { - $this->templateVariables[$template] = array_merge($this->templateVariables[$template], $data); - } else { - $this->templateVariables[$template] = $data; - } - } - - return $this; - } - - /** - * Get template data. - * @param null|string $template; - * @return array - */ - public function get($template = null) - { - if (isset($template, $this->templateVariables[$template])) { - return array_merge($this->sharedVariables, $this->templateVariables[$template]); - } - - return $this->sharedVariables; - } -} diff --git a/e_lib/plates/Template/Directory.php b/e_lib/plates/Template/Directory.php deleted file mode 100644 index f5de5374..00000000 --- a/e_lib/plates/Template/Directory.php +++ /dev/null @@ -1,53 +0,0 @@ -set($path); - } - - /** - * Set path to templates directory. - * @param string|null $path Pass null to disable the default directory. - * @return Directory - */ - public function set($path) - { - if (!is_null($path) and !is_dir($path)) { - throw new LogicException( - 'The specified path "' . $path . '" does not exist.' - ); - } - - $this->path = $path; - - return $this; - } - - /** - * Get path to templates directory. - * @return string - */ - public function get() - { - return $this->path; - } -} diff --git a/e_lib/plates/Template/FileExtension.php b/e_lib/plates/Template/FileExtension.php deleted file mode 100644 index 57646bdd..00000000 --- a/e_lib/plates/Template/FileExtension.php +++ /dev/null @@ -1,45 +0,0 @@ -set($fileExtension); - } - - /** - * Set the template file extension. - * @param null|string $fileExtension - * @return FileExtension - */ - public function set($fileExtension) - { - $this->fileExtension = $fileExtension; - - return $this; - } - - /** - * Get the template file extension. - * @return string - */ - public function get() - { - return $this->fileExtension; - } -} diff --git a/e_lib/plates/Template/Folder.php b/e_lib/plates/Template/Folder.php deleted file mode 100644 index 01fcbdd2..00000000 --- a/e_lib/plates/Template/Folder.php +++ /dev/null @@ -1,109 +0,0 @@ -setName($name); - $this->setPath($path); - $this->setFallback($fallback); - } - - /** - * Set the folder name. - * @param string $name - * @return Folder - */ - public function setName($name) - { - $this->name = $name; - - return $this; - } - - /** - * Get the folder name. - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set the folder path. - * @param string $path - * @return Folder - */ - public function setPath($path) - { - if (!is_dir($path)) { - throw new LogicException('The specified directory path "' . $path . '" does not exist.'); - } - - $this->path = $path; - - return $this; - } - - /** - * Get the folder path. - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Set the folder fallback status. - * @param boolean $fallback - * @return Folder - */ - public function setFallback($fallback) - { - $this->fallback = $fallback; - - return $this; - } - - /** - * Get the folder fallback status. - * @return boolean - */ - public function getFallback() - { - return $this->fallback; - } -} diff --git a/e_lib/plates/Template/Folders.php b/e_lib/plates/Template/Folders.php deleted file mode 100644 index 9bf266a7..00000000 --- a/e_lib/plates/Template/Folders.php +++ /dev/null @@ -1,75 +0,0 @@ -exists($name)) { - throw new LogicException('The template folder "' . $name . '" is already being used.'); - } - - $this->folders[$name] = new Folder($name, $path, $fallback); - - return $this; - } - - /** - * Remove a template folder. - * @param string $name - * @return Folders - */ - public function remove($name) - { - if (!$this->exists($name)) { - throw new LogicException('The template folder "' . $name . '" was not found.'); - } - - unset($this->folders[$name]); - - return $this; - } - - /** - * Get a template folder. - * @param string $name - * @return Folder - */ - public function get($name) - { - if (!$this->exists($name)) { - throw new LogicException('The template folder "' . $name . '" was not found.'); - } - - return $this->folders[$name]; - } - - /** - * Check if a template folder exists. - * @param string $name - * @return boolean - */ - public function exists($name) - { - return isset($this->folders[$name]); - } -} diff --git a/e_lib/plates/Template/Func.php b/e_lib/plates/Template/Func.php deleted file mode 100644 index 79141f46..00000000 --- a/e_lib/plates/Template/Func.php +++ /dev/null @@ -1,107 +0,0 @@ -setName($name); - $this->setCallback($callback); - } - - /** - * Set the function name. - * @param string $name - * @return Func - */ - public function setName($name) - { - if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $name) !== 1) { - throw new LogicException( - 'Not a valid function name.' - ); - } - - $this->name = $name; - - return $this; - } - - /** - * Get the function name. - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set the function callback - * @param callable $callback - * @return Func - */ - public function setCallback($callback) - { - if (!is_callable($callback, true)) { - throw new LogicException( - 'Not a valid function callback.' - ); - } - - $this->callback = $callback; - - return $this; - } - - /** - * Get the function callback. - * @return callable - */ - public function getCallback() - { - return $this->callback; - } - - /** - * Call the function. - * @param Template $template - * @param array $arguments - * @return mixed - */ - public function call(Template $template = null, $arguments = array()) - { - if (is_array($this->callback) and - isset($this->callback[0]) and - $this->callback[0] instanceof ExtensionInterface - ) { - $this->callback[0]->template = $template; - } - - return call_user_func_array($this->callback, $arguments); - } -} diff --git a/e_lib/plates/Template/Functions.php b/e_lib/plates/Template/Functions.php deleted file mode 100644 index e0e4c2c1..00000000 --- a/e_lib/plates/Template/Functions.php +++ /dev/null @@ -1,78 +0,0 @@ -exists($name)) { - throw new LogicException( - 'The template function name "' . $name . '" is already registered.' - ); - } - - $this->functions[$name] = new Func($name, $callback); - - return $this; - } - - /** - * Remove a template function. - * @param string $name; - * @return Functions - */ - public function remove($name) - { - if (!$this->exists($name)) { - throw new LogicException( - 'The template function "' . $name . '" was not found.' - ); - } - - unset($this->functions[$name]); - - return $this; - } - - /** - * Get a template function. - * @param string $name - * @return Func - */ - public function get($name) - { - if (!$this->exists($name)) { - throw new LogicException('The template function "' . $name . '" was not found.'); - } - - return $this->functions[$name]; - } - - /** - * Check if a template function exists. - * @param string $name - * @return boolean - */ - public function exists($name) - { - return isset($this->functions[$name]); - } -} diff --git a/e_lib/plates/Template/Name.php b/e_lib/plates/Template/Name.php deleted file mode 100644 index a999d74d..00000000 --- a/e_lib/plates/Template/Name.php +++ /dev/null @@ -1,202 +0,0 @@ -setEngine($engine); - $this->setName($name); - } - - /** - * Set the engine. - * @param Engine $engine - * @return Name - */ - public function setEngine(Engine $engine) - { - $this->engine = $engine; - - return $this; - } - - /** - * Get the engine. - * @return Engine - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Set the original name and parse it. - * @param string $name - * @return Name - */ - public function setName($name) - { - $this->name = $name; - - $parts = explode('::', $this->name); - - if (count($parts) === 1) { - $this->setFile($parts[0]); - } elseif (count($parts) === 2) { - $this->setFolder($parts[0]); - $this->setFile($parts[1]); - } else { - throw new LogicException( - 'The template name "' . $this->name . '" is not valid. ' . - 'Do not use the folder namespace separator "::" more than once.' - ); - } - - return $this; - } - - /** - * Get the original name. - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set the parsed template folder. - * @param string $folder - * @return Name - */ - public function setFolder($folder) - { - $this->folder = $this->engine->getFolders()->get($folder); - - return $this; - } - - /** - * Get the parsed template folder. - * @return string - */ - public function getFolder() - { - return $this->folder; - } - - /** - * Set the parsed template file. - * @param string $file - * @return Name - */ - public function setFile($file) - { - if ($file === '') { - throw new LogicException( - 'The template name "' . $this->name . '" is not valid. ' . - 'The template name cannot be empty.' - ); - } - - $this->file = $file; - - if (!is_null($this->engine->getFileExtension())) { - $this->file .= '.' . $this->engine->getFileExtension(); - } - - return $this; - } - - /** - * Get the parsed template file. - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Resolve template path. - * @return string - */ - public function getPath() - { - if (is_null($this->folder)) { - return $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; - } - - $path = $this->folder->getPath() . DIRECTORY_SEPARATOR . $this->file; - - if (!is_file($path) and $this->folder->getFallback() and is_file($this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file)) { - $path = $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file; - } - - return $path; - } - - /** - * Check if template path exists. - * @return boolean - */ - public function doesPathExist() - { - return is_file($this->getPath()); - } - - /** - * Get the default templates directory. - * @return string - */ - protected function getDefaultDirectory() - { - $directory = $this->engine->getDirectory(); - - if (is_null($directory)) { - throw new LogicException( - 'The template name "' . $this->name . '" is not valid. '. - 'The default directory has not been defined.' - ); - } - - return $directory; - } -} diff --git a/e_lib/plates/Template/Template.php b/e_lib/plates/Template/Template.php deleted file mode 100644 index 0a88c8cf..00000000 --- a/e_lib/plates/Template/Template.php +++ /dev/null @@ -1,346 +0,0 @@ -engine = $engine; - $this->name = new Name($engine, $name); - - $this->data($this->engine->getData($name)); - } - - /** - * Magic method used to call extension functions. - * @param string $name - * @param array $arguments - * @return mixed - */ - public function __call($name, $arguments) - { - return $this->engine->getFunction($name)->call($this, $arguments); - } - - /** - * Alias for render() method. - * @throws \Throwable - * @throws \Exception - * @return string - */ - public function __toString() - { - return $this->render(); - } - - /** - * Assign or get template data. - * @param array $data - * @return mixed - */ - public function data(array $data = null) - { - if (is_null($data)) { - return $this->data; - } - - $this->data = array_merge($this->data, $data); - } - - /** - * Check if the template exists. - * @return boolean - */ - public function exists() - { - return $this->name->doesPathExist(); - } - - /** - * Get the template path. - * @return string - */ - public function path() - { - return $this->name->getPath(); - } - - /** - * Render the template and layout. - * @param array $data - * @throws \Throwable - * @throws \Exception - * @return string - */ - public function render(array $data = array()) - { - $this->data($data); - unset($data); - extract($this->data); - - if (!$this->exists()) { - throw new LogicException( - 'The template "' . $this->name->getName() . '" could not be found at "' . $this->path() . '".' - ); - } - - try { - $level = ob_get_level(); - ob_start(); - - include $this->path(); - - $content = ob_get_clean(); - - if (isset($this->layoutName)) { - $layout = $this->engine->make($this->layoutName); - $layout->sections = array_merge($this->sections, array('content' => $content)); - $content = $layout->render($this->layoutData); - } - - return $content; - } catch (Throwable $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } catch (Exception $e) { - while (ob_get_level() > $level) { - ob_end_clean(); - } - - throw $e; - } - } - - /** - * Set the template's layout. - * @param string $name - * @param array $data - * @return null - */ - public function layout($name, array $data = array()) - { - $this->layoutName = $name; - $this->layoutData = $data; - } - - /** - * Start a new section block. - * @param string $name - * @return null - */ - public function start($name) - { - if ($name === 'content') { - throw new LogicException( - 'The section name "content" is reserved.' - ); - } - - if ($this->sectionName) { - throw new LogicException('You cannot nest sections within other sections.'); - } - - $this->sectionName = $name; - - ob_start(); - } - - /** - * Start a new append section block. - * @param string $name - * @return null - */ - public function push($name) - { - $this->appendSection = true; - - $this->start($name); - } - - /** - * Stop the current section block. - * @return null - */ - public function stop() - { - if (is_null($this->sectionName)) { - throw new LogicException( - 'You must start a section before you can stop it.' - ); - } - - if (!isset($this->sections[$this->sectionName])) { - $this->sections[$this->sectionName] = ''; - } - - $this->sections[$this->sectionName] = $this->appendSection ? $this->sections[$this->sectionName] . ob_get_clean() : ob_get_clean(); - $this->sectionName = null; - $this->appendSection = false; - } - - /** - * Alias of stop(). - * @return null - */ - public function end() - { - $this->stop(); - } - - /** - * Returns the content for a section block. - * @param string $name Section name - * @param string $default Default section content - * @return string|null - */ - public function section($name, $default = null) - { - if (!isset($this->sections[$name])) { - return $default; - } - - return $this->sections[$name]; - } - - /** - * Fetch a rendered template. - * @param string $name - * @param array $data - * @return string - */ - public function fetch($name, array $data = array()) - { - return $this->engine->render($name, $data); - } - - /** - * Output a rendered template. - * @param string $name - * @param array $data - * @return null - */ - public function insert($name, array $data = array()) - { - echo $this->engine->render($name, $data); - } - - /** - * Apply multiple functions to variable. - * @param mixed $var - * @param string $functions - * @return mixed - */ - public function batch($var, $functions) - { - foreach (explode('|', $functions) as $function) { - if ($this->engine->doesFunctionExist($function)) { - $var = call_user_func(array($this, $function), $var); - } elseif (is_callable($function)) { - $var = call_user_func($function, $var); - } else { - throw new LogicException( - 'The batch function could not find the "' . $function . '" function.' - ); - } - } - - return $var; - } - - /** - * Escape string. - * @param string $string - * @param null|string $functions - * @return string - */ - public function escape($string, $functions = null) - { - static $flags; - - if (!isset($flags)) { - $flags = ENT_QUOTES | (defined('ENT_SUBSTITUTE') ? ENT_SUBSTITUTE : 0); - } - - if ($functions) { - $string = $this->batch($string, $functions); - } - - return htmlspecialchars($string, $flags, 'UTF-8'); - } - - /** - * Alias to escape function. - * @param string $string - * @param null|string $functions - * @return string - */ - public function e($string, $functions = null) - { - return $this->escape($string, $functions); - } -} diff --git a/e_lib/plates/example.php b/e_lib/plates/example.php deleted file mode 100644 index 7e30a6a1..00000000 --- a/e_lib/plates/example.php +++ /dev/null @@ -1,20 +0,0 @@ -addData(['company' => 'The Company Name'], 'layout'); - -// Render a template -echo $templates->render('profile', ['name' => 'Jonathan']); diff --git a/e_lib/plates/templates/layout.php b/e_lib/plates/templates/layout.php deleted file mode 100644 index 5b5847cf..00000000 --- a/e_lib/plates/templates/layout.php +++ /dev/null @@ -1,12 +0,0 @@ - - - <?=$this->e($title)?> | <?=$this->e($company)?> - - - -section('content')?> - -section('scripts')?> - - - \ No newline at end of file diff --git a/e_lib/plates/templates/profile.php b/e_lib/plates/templates/profile.php deleted file mode 100644 index 0797e463..00000000 --- a/e_lib/plates/templates/profile.php +++ /dev/null @@ -1,12 +0,0 @@ -layout('layout', ['title' => 'User Profile']) ?> - -

User Profile

-

Hello, e($name)?>!

- -insert('sidebar') ?> - -push('scripts') ?> - -end() ?> \ No newline at end of file diff --git a/e_lib/plates/templates/sidebar.php b/e_lib/plates/templates/sidebar.php deleted file mode 100644 index 13d9ea83..00000000 --- a/e_lib/plates/templates/sidebar.php +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/e_lib/src/utilphp/util.php b/e_lib/src/utilphp/util.php deleted file mode 100644 index 0932d7d1..00000000 --- a/e_lib/src/utilphp/util.php +++ /dev/null @@ -1,2535 +0,0 @@ - - * @link http://github.com/brandonwamboldt/utilphp/ Official Documentation - */ -class util -{ - /** - * A constant representing the number of seconds in a minute, for - * making code more verbose - * - * @var integer - */ - const SECONDS_IN_A_MINUTE = 60; - - /** - * A constant representing the number of seconds in an hour, for making - * code more verbose - * - * @var integer - */ - const SECONDS_IN_A_HOUR = 3600; - const SECONDS_IN_AN_HOUR = 3600; - - /** - * A constant representing the number of seconds in a day, for making - * code more verbose - * - * @var integer - */ - const SECONDS_IN_A_DAY = 86400; - - /** - * A constant representing the number of seconds in a week, for making - * code more verbose - * - * @var integer - */ - const SECONDS_IN_A_WEEK = 604800; - - /** - * A constant representing the number of seconds in a month (30 days), - * for making code more verbose - * - * @var integer - */ - const SECONDS_IN_A_MONTH = 2592000; - - /** - * A constant representing the number of seconds in a year (365 days), - * for making code more verbose - * - * @var integer - */ - const SECONDS_IN_A_YEAR = 31536000; - - /** - * URL constants as defined in the PHP Manual under "Constants usable with - * http_build_url()". - * - * @see http://us2.php.net/manual/en/http.constants.php#http.constants.url - */ - const HTTP_URL_REPLACE = 1; - const HTTP_URL_JOIN_PATH = 2; - const HTTP_URL_JOIN_QUERY = 4; - const HTTP_URL_STRIP_USER = 8; - const HTTP_URL_STRIP_PASS = 16; - const HTTP_URL_STRIP_AUTH = 32; - const HTTP_URL_STRIP_PORT = 64; - const HTTP_URL_STRIP_PATH = 128; - const HTTP_URL_STRIP_QUERY = 256; - const HTTP_URL_STRIP_FRAGMENT = 512; - const HTTP_URL_STRIP_ALL = 1024; - - /** - * A collapse icon, using in the dump_var function to allow collapsing - * an array or object - * - * @var string - */ - public static $icon_collapse = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFNzFDNDQyNEMyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFNzFDNDQyM0MyQzkxMUUxOTU4MEM4M0UxRDA0MUVGNSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NDlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MjlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuF4AWkAAAA2UExURU9t2DBStczM/1h16DNmzHiW7iNFrypMvrnD52yJ4ezs7Onp6ejo6P///+Tk5GSG7D9h5SRGq0Q2K74AAAA/SURBVHjaLMhZDsAgDANRY3ZISnP/y1ZWeV+jAeuRSky6cKL4ryDdSggP8UC7r6GvR1YHxjazPQDmVzI/AQYAnFQDdVSJ80EAAAAASUVORK5CYII='; - - /** - * A collapse icon, using in the dump_var function to allow collapsing - * an array or object - * - * @var string - */ - public static $icon_expand = 'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAMAAADXT/YiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQzZERTJDNEMyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQzZERTJDM0MyQzkxMUUxODRCQzgyRUNDMzZEQkZFQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3MzlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3MTlFRjQ2NkM5QzJFMTExOTA0MzkwRkI0M0ZCODY4RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkmDvWIAAABIUExURU9t2MzM/3iW7ubm59/f5urq85mZzOvr6////9ra38zMzObm5rfB8FZz5myJ4SNFrypMvjBStTNmzOvr+mSG7OXl8T9h5SRGq/OfqCEAAABKSURBVHjaFMlbEoAwCEPRULXF2jdW9r9T4czcyUdA4XWB0IgdNSybxU9amMzHzDlPKKu7Fd1e6+wY195jW0ARYZECxPq5Gn8BBgCr0gQmxpjKAwAAAABJRU5ErkJggg=='; - - private static $hasArray = false; - - /** - * Map of special non-ASCII characters and suitable ASCII replacement - * characters. - * - * Part of the URLify.php Project - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - public static $maps = array( - 'de' => array(/* German */ - 'Ä' => 'Ae', 'Ö' => 'Oe', 'Ü' => 'Ue', 'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss', - 'ẞ' => 'SS' - ), - 'latin' => array( - 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A','Ă' => 'A', 'Æ' => 'AE', 'Ç' => - 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', - 'Ï' => 'I', 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => - 'O', 'Ő' => 'O', 'Ø' => 'O','Ș' => 'S','Ț' => 'T', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', - 'Ý' => 'Y', 'Þ' => 'TH', 'ß' => 'ss', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => - 'a', 'å' => 'a', 'ă' => 'a', 'æ' => 'ae', 'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', - 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => - 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', 'ø' => 'o', 'ș' => 's', 'ț' => 't', 'ù' => 'u', 'ú' => 'u', - 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', 'ÿ' => 'y' - ), - 'latin_symbols' => array( - '©' => '(c)' - ), - 'el' => array(/* Greek */ - 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8', - 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p', - 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w', - 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's', - 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', - 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8', - 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P', - 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W', - 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I', - 'Ϋ' => 'Y' - ), - 'tr' => array(/* Turkish */ - 'ş' => 's', 'Ş' => 'S', 'ı' => 'i', 'İ' => 'I', 'ç' => 'c', 'Ç' => 'C', 'ü' => 'u', 'Ü' => 'U', - 'ö' => 'o', 'Ö' => 'O', 'ğ' => 'g', 'Ğ' => 'G' - ), - 'ru' => array(/* Russian */ - 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh', - 'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', - 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', - 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu', - 'я' => 'ya', - 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh', - 'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', - 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', - 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu', - 'Я' => 'Ya', - '№' => '' - ), - 'uk' => array(/* Ukrainian */ - 'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G', 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g' - ), - 'cs' => array(/* Czech */ - 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u', - 'ž' => 'z', 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', - 'Ů' => 'U', 'Ž' => 'Z' - ), - 'pl' => array(/* Polish */ - 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', - 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', - 'Ź' => 'Z', 'Ż' => 'Z' - ), - 'ro' => array(/* Romanian */ - 'ă' => 'a', 'â' => 'a', 'î' => 'i', 'ș' => 's', 'ț' => 't', 'Ţ' => 'T', 'ţ' => 't' - ), - 'lv' => array(/* Latvian */ - 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n', - 'š' => 's', 'ū' => 'u', 'ž' => 'z', 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', - 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z' - ), - 'lt' => array(/* Lithuanian */ - 'ą' => 'a', 'č' => 'c', 'ę' => 'e', 'ė' => 'e', 'į' => 'i', 'š' => 's', 'ų' => 'u', 'ū' => 'u', 'ž' => 'z', - 'Ą' => 'A', 'Č' => 'C', 'Ę' => 'E', 'Ė' => 'E', 'Į' => 'I', 'Š' => 'S', 'Ų' => 'U', 'Ū' => 'U', 'Ž' => 'Z' - ), - 'vn' => array(/* Vietnamese */ - 'Á' => 'A', 'À' => 'A', 'Ả' => 'A', 'Ã' => 'A', 'Ạ' => 'A', 'Ă' => 'A', 'Ắ' => 'A', 'Ằ' => 'A', 'Ẳ' => 'A', 'Ẵ' => 'A', 'Ặ' => 'A', 'Â' => 'A', 'Ấ' => 'A', 'Ầ' => 'A', 'Ẩ' => 'A', 'Ẫ' => 'A', 'Ậ' => 'A', - 'á' => 'a', 'à' => 'a', 'ả' => 'a', 'ã' => 'a', 'ạ' => 'a', 'ă' => 'a', 'ắ' => 'a', 'ằ' => 'a', 'ẳ' => 'a', 'ẵ' => 'a', 'ặ' => 'a', 'â' => 'a', 'ấ' => 'a', 'ầ' => 'a', 'ẩ' => 'a', 'ẫ' => 'a', 'ậ' => 'a', - 'É' => 'E', 'È' => 'E', 'Ẻ' => 'E', 'Ẽ' => 'E', 'Ẹ' => 'E', 'Ê' => 'E', 'Ế' => 'E', 'Ề' => 'E', 'Ể' => 'E', 'Ễ' => 'E', 'Ệ' => 'E', - 'é' => 'e', 'è' => 'e', 'ẻ' => 'e', 'ẽ' => 'e', 'ẹ' => 'e', 'ê' => 'e', 'ế' => 'e', 'ề' => 'e', 'ể' => 'e', 'ễ' => 'e', 'ệ' => 'e', - 'Í' => 'I', 'Ì' => 'I', 'Ỉ' => 'I', 'Ĩ' => 'I', 'Ị' => 'I', 'í' => 'i', 'ì' => 'i', 'ỉ' => 'i', 'ĩ' => 'i', 'ị' => 'i', - 'Ó' => 'O', 'Ò' => 'O', 'Ỏ' => 'O', 'Õ' => 'O', 'Ọ' => 'O', 'Ô' => 'O', 'Ố' => 'O', 'Ồ' => 'O', 'Ổ' => 'O', 'Ỗ' => 'O', 'Ộ' => 'O', 'Ơ' => 'O', 'Ớ' => 'O', 'Ờ' => 'O', 'Ở' => 'O', 'Ỡ' => 'O', 'Ợ' => 'O', - 'ó' => 'o', 'ò' => 'o', 'ỏ' => 'o', 'õ' => 'o', 'ọ' => 'o', 'ô' => 'o', 'ố' => 'o', 'ồ' => 'o', 'ổ' => 'o', 'ỗ' => 'o', 'ộ' => 'o', 'ơ' => 'o', 'ớ' => 'o', 'ờ' => 'o', 'ở' => 'o', 'ỡ' => 'o', 'ợ' => 'o', - 'Ú' => 'U', 'Ù' => 'U', 'Ủ' => 'U', 'Ũ' => 'U', 'Ụ' => 'U', 'Ư' => 'U', 'Ứ' => 'U', 'Ừ' => 'U', 'Ử' => 'U', 'Ữ' => 'U', 'Ự' => 'U', - 'ú' => 'u', 'ù' => 'u', 'ủ' => 'u', 'ũ' => 'u', 'ụ' => 'u', 'ư' => 'u', 'ứ' => 'u', 'ừ' => 'u', 'ử' => 'u', 'ữ' => 'u', 'ự' => 'u', - 'Ý' => 'Y', 'Ỳ' => 'Y', 'Ỷ' => 'Y', 'Ỹ' => 'Y', 'Ỵ' => 'Y', 'ý' => 'y', 'ỳ' => 'y', 'ỷ' => 'y', 'ỹ' => 'y', 'ỵ' => 'y', - 'Đ' => 'D', 'đ' => 'd' - ), - 'ar' => array(/* Arabic */ - 'أ' => 'a', 'ب' => 'b', 'ت' => 't', 'ث' => 'th', 'ج' => 'g', 'ح' => 'h', 'خ' => 'kh', 'د' => 'd', - 'ذ' => 'th', 'ر' => 'r', 'ز' => 'z', 'س' => 's', 'ش' => 'sh', 'ص' => 's', 'ض' => 'd', 'ط' => 't', - 'ظ' => 'th', 'ع' => 'aa', 'غ' => 'gh', 'ف' => 'f', 'ق' => 'k', 'ك' => 'k', 'ل' => 'l', 'م' => 'm', - 'ن' => 'n', 'ه' => 'h', 'و' => 'o', 'ي' => 'y' - ), - 'sr' => array(/* Serbian */ - 'ђ' => 'dj', 'ј' => 'j', 'љ' => 'lj', 'њ' => 'nj', 'ћ' => 'c', 'џ' => 'dz', 'đ' => 'dj', - 'Ђ' => 'Dj', 'Ј' => 'j', 'Љ' => 'Lj', 'Њ' => 'Nj', 'Ћ' => 'C', 'Џ' => 'Dz', 'Đ' => 'Dj' - ), - 'az' => array(/* Azerbaijani */ - 'ç' => 'c', 'ə' => 'e', 'ğ' => 'g', 'ı' => 'i', 'ö' => 'o', 'ş' => 's', 'ü' => 'u', - 'Ç' => 'C', 'Ə' => 'E', 'Ğ' => 'G', 'İ' => 'I', 'Ö' => 'O', 'Ş' => 'S', 'Ü' => 'U' - ), - ); - - /** - * The character map for the designated language - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - private static $map = array(); - - /** - * The character list as a string. - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - private static $chars = ''; - - /** - * The character list as a regular expression. - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - private static $regex = ''; - - /** - * The current language - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - private static $language = ''; - - /** - * Initializes the character map. - * - * Part of the URLify.php Project - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - */ - private static function initLanguageMap($language = '') - { - if (count(self::$map) > 0 && (($language == '') || ($language == self::$language))) { - return; - } - - // Is a specific map associated with $language? - if (isset(self::$maps[$language]) && is_array(self::$maps[$language])) { - // Move this map to end. This means it will have priority over others - $m = self::$maps[$language]; - unset(self::$maps[$language]); - self::$maps[$language] = $m; - } - - // Reset static vars - self::$language = $language; - self::$map = array(); - self::$chars = ''; - - foreach (self::$maps as $map) { - foreach ($map as $orig => $conv) { - self::$map[$orig] = $conv; - self::$chars .= $orig; - } - } - - self::$regex = '/[' . self::$chars . ']/u'; - } - - - /** - * Access an array index, retrieving the value stored there if it - * exists or a default if it does not. This function allows you to - * concisely access an index which may or may not exist without - * raising a warning. - * - * @param array $var Array value to access - * @param mixed $default Default value to return if the key is not - * present in the array - * @return mixed - */ - public static function array_get(&$var, $default = null) - { - if (isset($var)) { - return $var; - } - - return $default; - } - - /** - * Display a variable's contents using nice HTML formatting and will - * properly display the value of booleans as true or false - * - * @see var_dump_plain() - * - * @param mixed $var The variable to dump - * @return string - */ - public static function var_dump($var, $return = false, $expandLevel = 1) - { - self::$hasArray = false; - $toggScript = 'var colToggle = function(toggID) {var img = document.getElementById(toggID);if (document.getElementById(toggID + "-collapsable").style.display == "none") {document.getElementById(toggID + "-collapsable").style.display = "inline";setImg(toggID, 0);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling;while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}} else {document.getElementById(toggID + "-collapsable").style.display = "none";setImg(toggID, 1);var previousSibling = document.getElementById(toggID + "-collapsable").previousSibling; while (previousSibling != null && (previousSibling.nodeType != 1 || previousSibling.tagName.toLowerCase() != "br")) {previousSibling = previousSibling.previousSibling;}}};'; - $imgScript = 'var setImg = function(objID,imgID,addStyle) {var imgStore = ["data:image/png;base64,' . self::$icon_collapse . '", "data:image/png;base64,' . self::$icon_expand . '"];if (objID) {document.getElementById(objID).setAttribute("src", imgStore[imgID]);if (addStyle){document.getElementById(objID).setAttribute("style", "position:relative;left:-5px;top:-1px;cursor:pointer;");}}};'; - $jsCode = preg_replace('/ +/', ' ', ''); - $html = '
';
-        $done  = array();
-        $html .= self::var_dump_plain($var, intval($expandLevel), 0, $done);
-        $html .= '
'; - - if (self::$hasArray) { - $html = $jsCode . $html; - } - - if (!$return) { - echo $html; - } - - return $html; - } - - /** - * Display a variable's contents using nice HTML formatting (Without - * the
 tag) and will properly display the values of variables
-     * like booleans and resources. Supports collapsable arrays and objects
-     * as well.
-     *
-     * @param  mixed $var The variable to dump
-     * @return string
-     */
-    public static function var_dump_plain($var, $expLevel, $depth = 0, $done = array())
-    {
-        $html = '';
-
-        if ($expLevel > 0) {
-            $expLevel--;
-            $setImg = 0;
-            $setStyle = 'display:inline;';
-        } elseif ($expLevel == 0) {
-            $setImg = 1;
-            $setStyle='display:none;';
-        } elseif ($expLevel < 0) {
-            $setImg = 0;
-            $setStyle = 'display:inline;';
-        }
-
-        if (is_bool($var)) {
-            $html .= 'bool(' . (($var) ? 'true' : 'false') . ')';
-        } elseif (is_int($var)) {
-            $html .= 'int(' . $var . ')';
-        } elseif (is_float($var)) {
-            $html .= 'float(' . $var . ')';
-        } elseif (is_string($var)) {
-            $html .= 'string(' . strlen($var) . ') "' . self::htmlentities($var) . '"';
-        } elseif (is_null($var)) {
-            $html .= 'NULL';
-        } elseif (is_resource($var)) {
-            $html .= 'resource("' . get_resource_type($var) . '") "' . $var . '"';
-        } elseif (is_array($var)) {
-            // Check for recursion
-            if ($depth > 0) {
-                foreach ($done as $prev) {
-                    if ($prev === $var) {
-                        $html .= 'array(' . count($var) . ') *RECURSION DETECTED*';
-                        return $html;
-                    }
-                }
-
-                // Keep track of variables we have already processed to detect recursion
-                $done[] = &$var;
-            }
-
-            self::$hasArray = true;
-            $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000);
-
-            $html .= (!empty($var) ? ' ' : '') . 'array(' . count($var) . ')';
-            if (!empty($var)) {
-                $html .= ' 
[
'; - - $indent = 4; - $longest_key = 0; - - foreach ($var as $key => $value) { - if (is_string($key)) { - $longest_key = max($longest_key, strlen($key) + 2); - } else { - $longest_key = max($longest_key, strlen($key)); - } - } - - foreach ($var as $key => $value) { - if (is_numeric($key)) { - $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); - } else { - $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); - } - - $html .= ' => '; - - $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); - - foreach ($value as $line => $val) { - if ($line != 0) { - $value[$line] = str_repeat(' ', $indent * 2) . $val; - } - } - - $html .= implode('
', $value) . '
'; - } - - $html .= ']
'; - } - } elseif (is_object($var)) { - // Check for recursion - foreach ($done as $prev) { - if ($prev === $var) { - $html .= 'object(' . get_class($var) . ') *RECURSION DETECTED*'; - return $html; - } - } - - // Keep track of variables we have already processed to detect recursion - $done[] = &$var; - - self::$hasArray=true; - $uuid = 'include-php-' . uniqid() . mt_rand(1, 1000000); - - $html .= ' object(' . get_class($var) . ')
[
'; - - $varArray = (array) $var; - - $indent = 4; - $longest_key = 0; - - foreach ($varArray as $key => $value) { - if (substr($key, 0, 2) == "\0*") { - unset($varArray[$key]); - $key = 'protected:' . substr($key, 3); - $varArray[$key] = $value; - } elseif (substr($key, 0, 1) == "\0") { - unset($varArray[$key]); - $key = 'private:' . substr($key, 1, strpos(substr($key, 1), "\0")) . ':' . substr($key, strpos(substr($key, 1), "\0") + 2); - $varArray[$key] = $value; - } - - if (is_string($key)) { - $longest_key = max($longest_key, strlen($key) + 2); - } else { - $longest_key = max($longest_key, strlen($key)); - } - } - - foreach ($varArray as $key => $value) { - if (is_numeric($key)) { - $html .= str_repeat(' ', $indent) . str_pad($key, $longest_key, ' '); - } else { - $html .= str_repeat(' ', $indent) . str_pad('"' . self::htmlentities($key) . '"', $longest_key, ' '); - } - - $html .= ' => '; - - $value = explode('
', self::var_dump_plain($value, $expLevel, $depth + 1, $done)); - - foreach ($value as $line => $val) { - if ($line != 0) { - $value[$line] = str_repeat(' ', $indent * 2) . $val; - } - } - - $html .= implode('
', $value) . '
'; - } - - $html .= ']
'; - } - - return $html; - } - - /** - * Converts any accent characters to their equivalent normal characters - * and converts any other non-alphanumeric characters to dashes, then - * converts any sequence of two or more dashes to a single dash. This - * function generates slugs safe for use as URLs, and if you pass true - * as the second parameter, it will create strings safe for use as CSS - * classes or IDs. - * - * @param string $string A string to convert to a slug - * @param string $separator The string to separate words with - * @param boolean $css_mode Whether or not to generate strings safe for - * CSS classes/IDs (Default to false) - * @return string - */ - public static function slugify($string, $separator = '-', $css_mode = false) - { - // Compatibility with 1.0.* parameter ordering for semvar - if ($separator === true || $separator === false) { - $css_mode = $separator; - $separator = '-'; - - // Raise deprecation error - trigger_error( - 'util::slugify() now takes $css_mode as the third parameter, please update your code', - E_USER_DEPRECATED - ); - } - - $slug = preg_replace('/([^a-z0-9]+)/', $separator, strtolower(self::remove_accents($string))); - - if ($css_mode) { - $digits = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'); - - if (is_numeric(substr($slug, 0, 1))) { - $slug = $digits[substr($slug, 0, 1)] . substr($slug, 1); - } - } - - return $slug; - } - - /** - * Checks to see if a string is utf8 encoded. - * - * NOTE: This function checks for 5-Byte sequences, UTF8 - * has Bytes Sequences with a maximum length of 4. - * - * Written by Tony Ferrara - * - * @param string $string The string to be checked - * @return boolean - */ - public static function seems_utf8($string) - { - if (function_exists('mb_check_encoding')) { - // If mbstring is available, this is significantly faster than - // using PHP regexps. - return mb_check_encoding($string, 'UTF-8'); - } - - // @codeCoverageIgnoreStart - return self::seemsUtf8Regex($string); - // @codeCoverageIgnoreEnd - } - - /** - * A non-Mbstring UTF-8 checker. - * - * @param $string - * @return bool - */ - protected static function seemsUtf8Regex($string) - { - // Obtained from http://stackoverflow.com/a/11709412/430062 with permission. - $regex = '/( - [\xC0-\xC1] # Invalid UTF-8 Bytes - | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0[\x80-\x9F] # Overlong encoding of prior code point - | \xF0[\x80-\x8F] # Overlong encoding of prior code point - | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start - | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start - | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start - | (?<=[\x0-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle - | (? - * - * @param string $brokenSerializedData - * @return string - */ - public static function fix_broken_serialization($brokenSerializedData) - { - $fixdSerializedData = preg_replace_callback('!s:(\d+):"(.*?)";!', function($matches) { - $snip = $matches[2]; - return 's:' . strlen($snip) . ':"' . $snip . '";'; - }, $brokenSerializedData); - - return $fixdSerializedData; - } - - /** - * Checks to see if the page is being server over SSL or not - * - * @return boolean - */ - public static function is_https() - { - return isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'; - } - - /** - * Add or remove query arguments to the URL. - * - * @param mixed $newKey Either newkey or an associative array - * @param mixed $newValue Either newvalue or oldquery or uri - * @param mixed $uri URI or URL to append the queru/queries to. - * @return string - */ - public static function add_query_arg($newKey, $newValue = null, $uri = null) - { - // Was an associative array of key => value pairs passed? - if (is_array($newKey)) { - $newParams = $newKey; - - // Was the URL passed as an argument? - if (!is_null($newValue)) { - $uri = $newValue; - } elseif (!is_null($uri)) { - $uri = $uri; - } else { - $uri = self::array_get($_SERVER['REQUEST_URI'], ''); - } - } else { - $newParams = array($newKey => $newValue); - - // Was the URL passed as an argument? - $uri = is_null($uri) ? self::array_get($_SERVER['REQUEST_URI'], '') : $uri; - } - - // Parse the URI into it's components - $puri = parse_url($uri); - - if (isset($puri['query'])) { - parse_str($puri['query'], $queryParams); - $queryParams = array_merge($queryParams, $newParams); - } elseif (isset($puri['path']) && strstr($puri['path'], '=') !== false) { - $puri['query'] = $puri['path']; - unset($puri['path']); - parse_str($puri['query'], $queryParams); - $queryParams = array_merge($queryParams, $newParams); - } else { - $queryParams = $newParams; - } - - // Strip out any query params that are set to false - foreach ($queryParams as $param => $value) { - if ($value === false) { - unset($queryParams[$param]); - } - } - - // Re-construct the query string - $puri['query'] = http_build_query($queryParams); - - // Re-construct the entire URL - $nuri = self::http_build_url($puri); - - // Make the URI consistent with our input - if ($nuri[0] === '/' && strstr($uri, '/') === false) { - $nuri = substr($nuri, 1); - } - - if ($nuri[0] === '?' && strstr($uri, '?') === false) { - $nuri = substr($nuri, 1); - } - - return rtrim($nuri, '?'); - } - - /** - * Removes an item or list from the query string. - * - * @param string|array $keys Query key or keys to remove. - * @param bool $uri When false uses the $_SERVER value - * @return string - */ - public static function remove_query_arg($keys, $uri = null) - { - if (is_array($keys)) { - return self::add_query_arg(array_combine($keys, array_fill(0, count($keys), null)), $uri); - } - - return self::add_query_arg(array($keys => null), $uri); - } - - /** - * Build a URL. - * - * The parts of the second URL will be merged into the first according to - * the flags argument. - * - * @author Jake Smith - * @see https://github.com/jakeasmith/http_build_url/ - * - * @param mixed $url (part(s) of) an URL in form of a string or - * associative array like parse_url() returns - * @param mixed $parts same as the first argument - * @param int $flags a bitmask of binary or'ed HTTP_URL constants; - * HTTP_URL_REPLACE is the default - * @param array $new_url if set, it will be filled with the parts of the - * composed url like parse_url() would return - * @return string - */ - public static function http_build_url($url, $parts = array(), $flags = self::HTTP_URL_REPLACE, &$new_url = array()) - { - is_array($url) || $url = parse_url($url); - is_array($parts) || $parts = parse_url($parts); - - isset($url['query']) && is_string($url['query']) || $url['query'] = null; - isset($parts['query']) && is_string($parts['query']) || $parts['query'] = null; - - $keys = array('user', 'pass', 'port', 'path', 'query', 'fragment'); - - // HTTP_URL_STRIP_ALL and HTTP_URL_STRIP_AUTH cover several other flags. - if ($flags & self::HTTP_URL_STRIP_ALL) { - $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS - | self::HTTP_URL_STRIP_PORT | self::HTTP_URL_STRIP_PATH - | self::HTTP_URL_STRIP_QUERY | self::HTTP_URL_STRIP_FRAGMENT; - } elseif ($flags & self::HTTP_URL_STRIP_AUTH) { - $flags |= self::HTTP_URL_STRIP_USER | self::HTTP_URL_STRIP_PASS; - } - - // Schema and host are alwasy replaced - foreach (array('scheme', 'host') as $part) { - if (isset($parts[$part])) { - $url[$part] = $parts[$part]; - } - } - - if ($flags & self::HTTP_URL_REPLACE) { - foreach ($keys as $key) { - if (isset($parts[$key])) { - $url[$key] = $parts[$key]; - } - } - } else { - if (isset($parts['path']) && ($flags & self::HTTP_URL_JOIN_PATH)) { - if (isset($url['path']) && substr($parts['path'], 0, 1) !== '/') { - $url['path'] = rtrim( - str_replace(basename($url['path']), '', $url['path']), - '/' - ) . '/' . ltrim($parts['path'], '/'); - } else { - $url['path'] = $parts['path']; - } - } - - if (isset($parts['query']) && ($flags & self::HTTP_URL_JOIN_QUERY)) { - if (isset($url['query'])) { - parse_str($url['query'], $url_query); - parse_str($parts['query'], $parts_query); - - $url['query'] = http_build_query( - array_replace_recursive( - $url_query, - $parts_query - ) - ); - } else { - $url['query'] = $parts['query']; - } - } - } - - if (isset($url['path']) && substr($url['path'], 0, 1) !== '/') { - $url['path'] = '/' . $url['path']; - } - - foreach ($keys as $key) { - $strip = 'HTTP_URL_STRIP_' . strtoupper($key); - if ($flags & constant('utilphp\\util::' . $strip)) { - unset($url[$key]); - } - } - - $parsed_string = ''; - - if (isset($url['scheme'])) { - $parsed_string .= $url['scheme'] . '://'; - } - - if (isset($url['user'])) { - $parsed_string .= $url['user']; - - if (isset($url['pass'])) { - $parsed_string .= ':' . $url['pass']; - } - - $parsed_string .= '@'; - } - - if (isset($url['host'])) { - $parsed_string .= $url['host']; - } - - if (isset($url['port'])) { - $parsed_string .= ':' . $url['port']; - } - - if (!empty($url['path'])) { - $parsed_string .= $url['path']; - } else { - $parsed_string .= '/'; - } - - if (isset($url['query'])) { - $parsed_string .= '?' . $url['query']; - } - - if (isset($url['fragment'])) { - $parsed_string .= '#' . $url['fragment']; - } - - $new_url = $url; - - return $parsed_string; - } - - /** - * Converts many english words that equate to true or false to boolean. - * - * Supports 'y', 'n', 'yes', 'no' and a few other variations. - * - * @param string $string The string to convert to boolean - * @param bool $default The value to return if we can't match any - * yes/no words - * @return boolean - */ - public static function str_to_bool($string, $default = false) - { - $yes_words = 'affirmative|all right|aye|indubitably|most assuredly|ok|of course|okay|sure thing|y|yes+|yea|yep|sure|yeah|true|t|on|1|oui|vrai'; - $no_words = 'no*|no way|nope|nah|na|never|absolutely not|by no means|negative|never ever|false|f|off|0|non|faux'; - - if (preg_match('/^(' . $yes_words . ')$/i', $string)) { - return true; - } elseif (preg_match('/^(' . $no_words . ')$/i', $string)) { - return false; - } - - return $default; - } - - /** - * Check if a string starts with the given string. - * - * @param string $string - * @param string $starts_with - * @return boolean - */ - public static function starts_with($string, $starts_with) - { - return strpos($string, $starts_with) === 0; - } - - /** - * Check if a string ends with the given string. - * - * @param string $string - * @param string $starts_with - * @return boolean - */ - public static function ends_with($string, $ends_with) - { - return substr($string, -strlen($ends_with)) === $ends_with; - } - - /** - * Check if a string contains another string. - * - * @param string $haystack - * @param string $needle - * @return boolean - */ - public static function str_contains($haystack, $needle) - { - return strpos($haystack, $needle) !== false; - } - - /** - * Check if a string contains another string. This version is case - * insensitive. - * - * @param string $haystack - * @param string $needle - * @return boolean - */ - public static function str_icontains($haystack, $needle) - { - return stripos($haystack, $needle) !== false; - } - - /** - * Return the file extension of the given filename. - * - * @param string $filename - * @return string - */ - public static function get_file_ext($filename) - { - return pathinfo($filename, PATHINFO_EXTENSION); - } - - /** - * Removes a directory (and its contents) recursively. - * - * Contributed by Askar (ARACOOL) - * - * @param string $dir The directory to be deleted recursively - * @param bool $traverseSymlinks Delete contents of symlinks recursively - * @return bool - * @throws \RuntimeException - */ - public static function rmdir($dir, $traverseSymlinks = false) - { - if (!file_exists($dir)) { - return true; - } elseif (!is_dir($dir)) { - throw new \RuntimeException('Given path is not a directory'); - } - - if (!is_link($dir) || $traverseSymlinks) { - foreach (scandir($dir) as $file) { - if ($file === '.' || $file === '..') { - continue; - } - - $currentPath = $dir . '/' . $file; - - if (is_dir($currentPath)) { - self::rmdir($currentPath, $traverseSymlinks); - } elseif (!unlink($currentPath)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException('Unable to delete ' . $currentPath); - // @codeCoverageIgnoreEnd - } - } - } - - // Windows treats removing directory symlinks identically to removing directories. - if (is_link($dir) && !defined('PHP_WINDOWS_VERSION_MAJOR')) { - if (!unlink($dir)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException('Unable to delete ' . $dir); - // @codeCoverageIgnoreEnd - } - } else { - if (!rmdir($dir)) { - // @codeCoverageIgnoreStart - throw new \RuntimeException('Unable to delete ' . $dir); - // @codeCoverageIgnoreEnd - } - } - - return true; - } - - /** - * Convert entities, while preserving already-encoded entities. - * - * @param string $string The text to be converted - * @return string - */ - public static function htmlentities($string, $preserve_encoded_entities = false) - { - if ($preserve_encoded_entities) { - // @codeCoverageIgnoreStart - if (defined('HHVM_VERSION')) { - $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); - } else { - $translation_table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, self::mbInternalEncoding()); - } - // @codeCoverageIgnoreEnd - - $translation_table[chr(38)] = '&'; - return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); - } - - return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); - } - - /** - * Convert >, <, ', " and & to html entities, but preserves entities that - * are already encoded. - * - * @param string $string The text to be converted - * @return string - */ - public static function htmlspecialchars($string, $preserve_encoded_entities = false) - { - if ($preserve_encoded_entities) { - // @codeCoverageIgnoreStart - if (defined('HHVM_VERSION')) { - $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES); - } else { - $translation_table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES, self::mbInternalEncoding()); - } - // @codeCoverageIgnoreEnd - - $translation_table[chr(38)] = '&'; - - return preg_replace('/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/', '&', strtr($string, $translation_table)); - } - - return htmlentities($string, ENT_QUOTES, self::mbInternalEncoding()); - } - - /** - * Transliterates characters to their ASCII equivalents. - * - * Part of the URLify.php Project - * - * @see https://github.com/jbroadway/urlify/blob/master/URLify.php - * - * @param string $text Text that might have not-ASCII characters - * @param string $language Specifies a priority for a specific language. - * @return string Filtered string with replaced "nice" characters - */ - public static function downcode($text, $language = '') - { - self::initLanguageMap($language); - - if (self::seems_utf8($text)) { - if (preg_match_all(self::$regex, $text, $matches)) { - for ($i = 0; $i < count($matches[0]); $i++) { - $char = $matches[0][$i]; - if (isset(self::$map[$char])) { - $text = str_replace($char, self::$map[$char], $text); - } - } - } - } else { - // Not a UTF-8 string so we assume its ISO-8859-1 - $search = "\x80\x83\x8a\x8e\x9a\x9e\x9f\xa2\xa5\xb5\xc0\xc1\xc2\xc3\xc4\xc5\xc7\xc8\xc9\xca\xcb\xcc\xcd"; - $search .= "\xce\xcf\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9"; - $search .= "\xea\xeb\xec\xed\xee\xef\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xff"; - $text = strtr($text, $search, 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'); - - // These latin characters should be represented by two characters so - // we can't use strtr - $complexSearch = array("\x8c", "\x9c", "\xc6", "\xd0", "\xde", "\xdf", "\xe6", "\xf0", "\xfe"); - $complexReplace = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'); - $text = str_replace($complexSearch, $complexReplace, $text); - } - - return $text; - } - - /** - * Converts all accent characters to ASCII characters. - * - * If there are no accent characters, then the string given is just - * returned. - * - * @param string $string Text that might have accent characters - * @param string $language Specifies a priority for a specific language. - * @return string Filtered string with replaced "nice" characters - */ - public static function remove_accents($string, $language = '') - { - if (!preg_match('/[\x80-\xff]/', $string)) { - return $string; - } - - return self::downcode($string, $language); - } - - /** - * Strip all witespaces from the given string. - * - * @param string $string The string to strip - * @return string - */ - public static function strip_space($string) - { - return preg_replace('/\s+/', '', $string); - } - - /** - * Sanitize a string by performing the following operation : - * - Remove accents - * - Lower the string - * - Remove punctuation characters - * - Strip whitespaces - * - * @param string $string the string to sanitize - * @return string - */ - public static function sanitize_string($string) - { - $string = self::remove_accents($string); - $string = strtolower($string); - $string = preg_replace('/[^a-zA-Z 0-9]+/', '', $string); - $string = self::strip_space($string); - - return $string; - } - - /** - * Pads a given string with zeroes on the left. - * - * @param int $number The number to pad - * @param int $length The total length of the desired string - * @return string - */ - public static function zero_pad($number, $length) - { - return str_pad($number, $length, '0', STR_PAD_LEFT); - } - - /** - * Converts a unix timestamp to a relative time string, such as "3 days ago" - * or "2 weeks ago". - * - * @param int $from The date to use as a starting point - * @param int $to The date to compare to, defaults to now - * @param string $suffix The string to add to the end, defaults to " ago" - * @return string - */ - public static function human_time_diff($from, $to = '', $as_text = false, $suffix = ' ago') - { - if ($to == '') { - $to = time(); - } - - $from = new \DateTime(date('Y-m-d H:i:s', $from)); - $to = new \DateTime(date('Y-m-d H:i:s', $to)); - $diff = $from->diff($to); - - if ($diff->y > 1) { - $text = $diff->y . ' years'; - } elseif ($diff->y == 1) { - $text = '1 year'; - } elseif ($diff->m > 1) { - $text = $diff->m . ' months'; - } elseif ($diff->m == 1) { - $text = '1 month'; - } elseif ($diff->d > 7) { - $text = ceil($diff->d / 7) . ' weeks'; - } elseif ($diff->d == 7) { - $text = '1 week'; - } elseif ($diff->d > 1) { - $text = $diff->d . ' days'; - } elseif ($diff->d == 1) { - $text = '1 day'; - } elseif ($diff->h > 1) { - $text = $diff->h . ' hours'; - } elseif ($diff->h == 1) { - $text = ' 1 hour'; - } elseif ($diff->i > 1) { - $text = $diff->i . ' minutes'; - } elseif ($diff->i == 1) { - $text = '1 minute'; - } elseif ($diff->s > 1) { - $text = $diff->s . ' seconds'; - } else { - $text = '1 second'; - } - - if ($as_text) { - $text = explode(' ', $text, 2); - $text = self::number_to_word($text[0]) . ' ' . $text[1]; - } - - return trim($text) . $suffix; - } - - /** - * Converts a number into the text equivalent. For example, 456 becomes four - * hundred and fifty-six. - * - * Part of the IntToWords Project. - * - * @param int|float $number The number to convert into text - * @return string - */ - public static function number_to_word($number) - { - $number = (string) $number; - - if (strpos($number, '.') !== false) { - list($number, $decimal) = explode('.', $number); - } else { - $decimal = false; - } - - $output = ''; - - if ($number[0] == '-') { - $output = 'negative '; - $number = ltrim($number, '-'); - } elseif ($number[0] == '+') { - $output = 'positive '; - $number = ltrim($number, '+'); - } - - if ($number[0] == '0') { - $output .= 'zero'; - } else { - $length = 19; - $number = str_pad($number, 60, '0', STR_PAD_LEFT); - $group = rtrim(chunk_split($number, 3, ' '), ' '); - $groups = explode(' ', $group); - $groups2 = array(); - - foreach ($groups as $group) { - $group[1] = isset($group[1]) ? $group[1] : null; - $group[2] = isset($group[2]) ? $group[2] : null; - $groups2[] = self::numberToWordThreeDigits($group[0], $group[1], $group[2]); - } - - for ($z = 0; $z < count($groups2); $z++) { - if ($groups2[$z] != '') { - $output .= $groups2[$z] . self::numberToWordConvertGroup($length - $z); - $output .= ($z < $length && ! array_search('', array_slice($groups2, $z + 1, -1)) && $groups2[$length] != '' && $groups[$length][0] == '0' ? ' and ' : ', '); - } - } - - $output = rtrim($output, ', '); - } - - if ($decimal > 0) { - $output .= ' point'; - - for ($i = 0; $i < strlen($decimal); $i++) { - $output .= ' ' . self::numberToWordConvertDigit($decimal[$i]); - } - } - - return $output; - } - - protected static function numberToWordConvertGroup($index) - { - switch($index) { - case 11: - return ' decillion'; - case 10: - return ' nonillion'; - case 9: - return ' octillion'; - case 8: - return ' septillion'; - case 7: - return ' sextillion'; - case 6: - return ' quintrillion'; - case 5: - return ' quadrillion'; - case 4: - return ' trillion'; - case 3: - return ' billion'; - case 2: - return ' million'; - case 1: - return ' thousand'; - case 0: - return ''; - } - - return ''; - } - - protected static function numberToWordThreeDigits($digit1, $digit2, $digit3) - { - $output = ''; - - if ($digit1 == '0' && $digit2 == '0' && $digit3 == '0') { - return ''; - } - - if ($digit1 != '0') { - $output .= self::numberToWordConvertDigit($digit1) . ' hundred'; - - if ($digit2 != '0' || $digit3 != '0') { - $output .= ' and '; - } - } - if ($digit2 != '0') { - $output .= self::numberToWordTwoDigits($digit2, $digit3); - } elseif ($digit3 != '0') { - $output .= self::numberToWordConvertDigit($digit3); - } - - return $output; - } - - protected static function numberToWordTwoDigits($digit1, $digit2) - { - if ($digit2 == '0') { - switch ($digit1) { - case '1': - return 'ten'; - case '2': - return 'twenty'; - case '3': - return 'thirty'; - case '4': - return 'forty'; - case '5': - return 'fifty'; - case '6': - return 'sixty'; - case '7': - return 'seventy'; - case '8': - return 'eighty'; - case '9': - return 'ninety'; - } - } elseif ($digit1 == '1') { - switch ($digit2) { - case '1': - return 'eleven'; - case '2': - return 'twelve'; - case '3': - return 'thirteen'; - case '4': - return 'fourteen'; - case '5': - return 'fifteen'; - case '6': - return 'sixteen'; - case '7': - return 'seventeen'; - case '8': - return 'eighteen'; - case '9': - return 'nineteen'; - } - } else { - $second_digit = self::numberToWordConvertDigit($digit2); - - switch ($digit1) { - case '2': - return "twenty-{$second_digit}"; - case '3': - return "thirty-{$second_digit}"; - case '4': - return "forty-{$second_digit}"; - case '5': - return "fifty-{$second_digit}"; - case '6': - return "sixty-{$second_digit}"; - case '7': - return "seventy-{$second_digit}"; - case '8': - return "eighty-{$second_digit}"; - case '9': - return "ninety-{$second_digit}"; - } - } - } - - /** - * @param $digit - * @return string - * @throws \LogicException - */ - protected static function numberToWordConvertDigit($digit) - { - switch ($digit) { - case '0': - return 'zero'; - case '1': - return 'one'; - case '2': - return 'two'; - case '3': - return 'three'; - case '4': - return 'four'; - case '5': - return 'five'; - case '6': - return 'six'; - case '7': - return 'seven'; - case '8': - return 'eight'; - case '9': - return 'nine'; - default: - throw new \LogicException('Not a number'); - } - } - - /** - * Transmit UTF-8 content headers if the headers haven't already been sent. - * - * @param string $content_type The content type to send out - * @return boolean - */ - public static function utf8_headers($content_type = 'text/html') - { - // @codeCoverageIgnoreStart - if (!headers_sent()) { - header('Content-type: ' . $content_type . '; charset=utf-8'); - - return true; - } - - return false; - // @codeCoverageIgnoreEnd - } - - /** - * Transmit headers that force a browser to display the download file - * dialog. Cross browser compatible. Only fires if headers have not - * already been sent. - * - * @param string $filename The name of the filename to display to - * browsers - * @param string $content The content to output for the download. - * If you don't specify this, just the - * headers will be sent - * @return boolean - */ - public static function force_download($filename, $content = false) - { - // @codeCoverageIgnoreStart - if (!headers_sent()) { - // Required for some browsers - if (ini_get('zlib.output_compression')) { - @ini_set('zlib.output_compression', 'Off'); - } - - header('Pragma: public'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - - // Required for certain browsers - header('Cache-Control: private', false); - - header('Content-Disposition: attachment; filename="' . basename(str_replace('"', '', $filename)) . '";'); - header('Content-Type: application/force-download'); - header('Content-Transfer-Encoding: binary'); - - if ($content) { - header('Content-Length: ' . strlen($content)); - } - - ob_clean(); - flush(); - - if ($content) { - echo $content; - } - - return true; - } - - return false; - // @codeCoverageIgnoreEnd - } - - /** - * Sets the headers to prevent caching for the different browsers. - * - * Different browsers support different nocache headers, so several - * headers must be sent so that all of them get the point that no - * caching should occur - * - * @return boolean - */ - public static function nocache_headers() - { - // @codeCoverageIgnoreStart - if (!headers_sent()) { - header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate, max-age=0'); - header('Pragma: no-cache'); - - return true; - } - - return false; - // @codeCoverageIgnoreEnd - } - - /** - * Generates a string of random characters. - * - * @throws LengthException If $length is bigger than the available - * character pool and $no_duplicate_chars is - * enabled - * - * @param integer $length The length of the string to - * generate - * @param boolean $human_friendly Whether or not to make the - * string human friendly by - * removing characters that can be - * confused with other characters ( - * O and 0, l and 1, etc) - * @param boolean $include_symbols Whether or not to include - * symbols in the string. Can not - * be enabled if $human_friendly is - * true - * @param boolean $no_duplicate_chars Whether or not to only use - * characters once in the string. - * @return string - */ - public static function random_string($length = 16, $human_friendly = true, $include_symbols = false, $no_duplicate_chars = false) - { - $nice_chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefhjkmnprstuvwxyz23456789'; - $all_an = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'; - $symbols = '!@#$%^&*()~_-=+{}[]|:;<>,.?/"\'\\`'; - $string = ''; - - // Determine the pool of available characters based on the given parameters - if ($human_friendly) { - $pool = $nice_chars; - } else { - $pool = $all_an; - - if ($include_symbols) { - $pool .= $symbols; - } - } - - if (!$no_duplicate_chars) { - return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); - } - - // Don't allow duplicate letters to be disabled if the length is - // longer than the available characters - if ($no_duplicate_chars && strlen($pool) < $length) { - throw new \LengthException('$length exceeds the size of the pool and $no_duplicate_chars is enabled'); - } - - // Convert the pool of characters into an array of characters and - // shuffle the array - $pool = str_split($pool); - $poolLength = count($pool); - $rand = mt_rand(0, $poolLength - 1); - - // Generate our string - for ($i = 0; $i < $length; $i++) { - $string .= $pool[$rand]; - - // Remove the character from the array to avoid duplicates - array_splice($pool, $rand, 1); - - // Generate a new number - if (($poolLength - 2 - $i) > 0) { - $rand = mt_rand(0, $poolLength - 2 - $i); - } else { - $rand = 0; - } - } - - return $string; - } - - /** - * Generate secure random string of given length - * If 'openssl_random_pseudo_bytes' is not available - * then generate random string using default function - * - * Part of the Laravel Project - * - * @param int $length length of string - * @return bool - */ - public static function secure_random_string($length = 16) - { - if (function_exists('openssl_random_pseudo_bytes')) { - $bytes = openssl_random_pseudo_bytes($length * 2); - - if ($bytes === false) { - throw new \LengthException('$length is not accurate, unable to generate random string'); - } - - return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length); - } - - // @codeCoverageIgnoreStart - return static::random_string($length); - // @codeCoverageIgnoreEnd - } - - /** - * Check if a given string matches a given pattern. - * - * Contributed by Abhimanyu Sharma - * - * @param string $pattern Parttern of string exptected - * @param string $string String that need to be matched - * @return bool - */ - public static function match_string($pattern, $string, $caseSensitive = true) - { - if ($pattern == $string) { - return true; - } - - // Preg flags - $flags = $caseSensitive ? '' : 'i'; - - // Escape any regex special characters - $pattern = preg_quote($pattern, '#'); - - // Unescape * which is our wildcard character and change it to .* - $pattern = str_replace('\*', '.*', $pattern); - - return (bool) preg_match('#^' . $pattern . '$#' . $flags, $string); - } - - /** - * Validate an email address. - * - * @param string $possible_email An email address to validate - * @return bool - */ - public static function validate_email($possible_email) - { - return (bool) filter_var($possible_email, FILTER_VALIDATE_EMAIL); - } - - /** - * Return the URL to a user's gravatar. - * - * @param string $email The email of the user - * @param integer $size The size of the gravatar - * @return string - */ - public static function get_gravatar($email, $size = 32) - { - if (self::is_https()) { - $url = 'https://secure.gravatar.com/'; - } else { - $url = 'http://www.gravatar.com/'; - } - - $url .= 'avatar/' . md5($email) . '?s=' . (int) abs($size); - - return $url; - } - - /** - * Turns all of the links in a string into HTML links. - * - * Part of the LinkifyURL Project - * - * @param string $text The string to parse - * @return string - */ - public static function linkify($text) - { - $text = preg_replace('/'/', ''', $text); // IE does not handle ' entity! - $section_html_pattern = '%# Rev:20100913_0900 github.com/jmrware/LinkifyURL - # Section text into HTML tags and everything else. - ( # $1: Everything not HTML tag. - [^<]+(?:(?!... tag. - ]*> # opening tag. - [^<]*(?:(?! # closing tag. - ) # End $2: - %ix'; - - return preg_replace_callback($section_html_pattern, array(__CLASS__, 'linkifyCallback'), $text); - } - - /** - * Callback for the preg_replace in the linkify() method. - * - * Part of the LinkifyURL Project - * - * @param array $matches Matches from the preg_ function - * @return string - */ - protected static function linkifyRegex($text) - { - $url_pattern = '/# Rev:20100913_0900 github.com\/jmrware\/LinkifyURL - # Match http & ftp URL that is not already linkified. - # Alternative 1: URL delimited by (parentheses). - (\() # $1 "(" start delimiter. - ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $2: URL. - (\)) # $3: ")" end delimiter. - | # Alternative 2: URL delimited by [square brackets]. - (\[) # $4: "[" start delimiter. - ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $5: URL. - (\]) # $6: "]" end delimiter. - | # Alternative 3: URL delimited by {curly braces}. - (\{) # $7: "{" start delimiter. - ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $8: URL. - (\}) # $9: "}" end delimiter. - | # Alternative 4: URL delimited by . - (<|&(?:lt|\#60|\#x3c);) # $10: "<" start delimiter (or HTML entity). - ((?:ht|f)tps?:\/\/[a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]+) # $11: URL. - (>|&(?:gt|\#62|\#x3e);) # $12: ">" end delimiter (or HTML entity). - | # Alternative 5: URL not delimited by (), [], {} or <>. - (# $13: Prefix proving URL not already linked. - (?: ^ # Can be a beginning of line or string, or - | [^=\s\'"\]] # a non-"=", non-quote, non-"]", followed by - ) \s*[\'"]? # optional whitespace and optional quote; - | [^=\s]\s+ # or... a non-equals sign followed by whitespace. - ) # End $13. Non-prelinkified-proof prefix. - (\b # $14: Other non-delimited URL. - (?:ht|f)tps?:\/\/ # Required literal http, https, ftp or ftps prefix. - [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]+ # All URI chars except "&" (normal*). - (?: # Either on a "&" or at the end of URI. - (?! # Allow a "&" char only if not start of an... - &(?:gt|\#0*62|\#x0*3e); # HTML ">" entity, or - | &(?:amp|apos|quot|\#0*3[49]|\#x0*2[27]); # a [&\'"] entity if - [.!&\',:?;]? # followed by optional punctuation then - (?:[^a-z0-9\-._~!$&\'()*+,;=:\/?#[\]@%]|$) # a non-URI char or EOS. - ) & # If neg-assertion true, match "&" (special). - [a-z0-9\-._~!$\'()*+,;=:\/?#[\]@%]* # More non-& URI chars (normal*). - )* # Unroll-the-loop (special normal*)*. - [a-z0-9\-_~$()*+=\/#[\]@%] # Last char can\'t be [.!&\',;:?] - ) # End $14. Other non-delimited URL. - /imx'; - - $url_replace = '$1$4$7$10$13$2$5$8$11$14$3$6$9$12'; - - return preg_replace($url_pattern, $url_replace, $text); - } - - /** - * Callback for the preg_replace in the linkify() method. - * - * Part of the LinkifyURL Project - * - * @param array $matches Matches from the preg_ function - * @return string - */ - protected static function linkifyCallback($matches) - { - if (isset($matches[2])) { - return $matches[2]; - } - - return self::linkifyRegex($matches[1]); - } - - /** - * Return the current URL. - * - * @return string - */ - public static function get_current_url() - { - $url = ''; - - // Check to see if it's over https - $is_https = self::is_https(); - if ($is_https) { - $url .= 'https://'; - } else { - $url .= 'http://'; - } - - // Was a username or password passed? - if (isset($_SERVER['PHP_AUTH_USER'])) { - $url .= $_SERVER['PHP_AUTH_USER']; - - if (isset($_SERVER['PHP_AUTH_PW'])) { - $url .= ':' . $_SERVER['PHP_AUTH_PW']; - } - - $url .= '@'; - } - - - // We want the user to stay on the same host they are currently on, - // but beware of security issues - // see http://shiflett.org/blog/2006/mar/server-name-versus-http-host - $url .= $_SERVER['HTTP_HOST']; - - $port = $_SERVER['SERVER_PORT']; - - // Is it on a non standard port? - if ($is_https && ($port != 443)) { - $url .= ':' . $_SERVER['SERVER_PORT']; - } elseif (!$is_https && ($port != 80)) { - $url .= ':' . $_SERVER['SERVER_PORT']; - } - - // Get the rest of the URL - if (!isset($_SERVER['REQUEST_URI'])) { - // Microsoft IIS doesn't set REQUEST_URI by default - $url .= $_SERVER['PHP_SELF']; - - if (isset($_SERVER['QUERY_STRING'])) { - $url .= '?' . $_SERVER['QUERY_STRING']; - } - } else { - $url .= $_SERVER['REQUEST_URI']; - } - - return $url; - } - - /** - * Returns the IP address of the client. - * - * @param boolean $trust_proxy_headers Whether or not to trust the - * proxy headers HTTP_CLIENT_IP - * and HTTP_X_FORWARDED_FOR. ONLY - * use if your server is behind a - * proxy that sets these values - * @return string - */ - public static function get_client_ip($trust_proxy_headers = false) - { - if (!$trust_proxy_headers) { - return $_SERVER['REMOTE_ADDR']; - } - - if (!empty($_SERVER['HTTP_CLIENT_IP'])) { - $ip = $_SERVER['HTTP_CLIENT_IP']; - } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { - $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; - } else { - $ip = $_SERVER['REMOTE_ADDR']; - } - - return $ip; - } - - /** - * Truncate a string to a specified length without cutting a word off. - * - * @param string $string The string to truncate - * @param integer $length The length to truncate the string to - * @param string $append Text to append to the string IF it gets - * truncated, defaults to '...' - * @return string - */ - public static function safe_truncate($string, $length, $append = '...') - { - $ret = substr($string, 0, $length); - $last_space = strrpos($ret, ' '); - - if ($last_space !== false && $string != $ret) { - $ret = substr($ret, 0, $last_space); - } - - if ($ret != $string) { - $ret .= $append; - } - - return $ret; - } - - - /** - * Truncate the string to given length of charactes. - * - * @param $string - * @param $limit - * @param string $append - * @return string - */ - public static function limit_characters($string, $limit = 100, $append = '...') - { - if (mb_strlen($string) <= $limit) { - return $string; - } - - return rtrim(mb_substr($string, 0, $limit, 'UTF-8')) . $append; - } - - /** - * Truncate the string to given length of words. - * - * @param $string - * @param $limit - * @param string $append - * @return string - */ - public static function limit_words($string, $limit = 100, $append = '...') - { - preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $string, $matches); - - if (!isset($matches[0]) || strlen($string) === strlen($matches[0])) { - return $string; - } - - return rtrim($matches[0]).$append; - } - - /** - * Returns the ordinal version of a number (appends th, st, nd, rd). - * - * @param string $number The number to append an ordinal suffix to - * @return string - */ - public static function ordinal($number) - { - $test_c = abs($number) % 10; - $ext = ((abs($number) % 100 < 21 && abs($number) % 100 > 4) ? 'th' : (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th')); - - return $number . $ext; - } - - /** - * Returns the file permissions as a nice string, like -rw-r--r-- or false - * if the file is not found. - * - * @param string $file The name of the file to get permissions form - * @param int $perms Numerical value of permissions to display as text. - * @return string - */ - public static function full_permissions($file, $perms = null) - { - if (is_null($perms)) { - if (!file_exists($file)) { - return false; - } - $perms = fileperms($file); - } - - if (($perms & 0xC000) == 0xC000) { - // Socket - $info = 's'; - } elseif (($perms & 0xA000) == 0xA000) { - // Symbolic Link - $info = 'l'; - } elseif (($perms & 0x8000) == 0x8000) { - // Regular - $info = '-'; - } elseif (($perms & 0x6000) == 0x6000) { - // Block special - $info = 'b'; - } elseif (($perms & 0x4000) == 0x4000) { - // Directory - $info = 'd'; - } elseif (($perms & 0x2000) == 0x2000) { - // Character special - $info = 'c'; - } elseif (($perms & 0x1000) == 0x1000) { - // FIFO pipe - $info = 'p'; - } else { - // Unknown - $info = 'u'; - } - - // Owner - $info .= (($perms & 0x0100) ? 'r' : '-'); - $info .= (($perms & 0x0080) ? 'w' : '-'); - $info .= (($perms & 0x0040) ? - (($perms & 0x0800) ? 's' : 'x') : - (($perms & 0x0800) ? 'S' : '-')); - - // Group - $info .= (($perms & 0x0020) ? 'r' : '-'); - $info .= (($perms & 0x0010) ? 'w' : '-'); - $info .= (($perms & 0x0008) ? - (($perms & 0x0400) ? 's' : 'x') : - (($perms & 0x0400) ? 'S' : '-')); - - // World - $info .= (($perms & 0x0004) ? 'r' : '-'); - $info .= (($perms & 0x0002) ? 'w' : '-'); - $info .= (($perms & 0x0001) ? - (($perms & 0x0200) ? 't' : 'x') : - (($perms & 0x0200) ? 'T' : '-')); - - return $info; - } - - /** - * Returns the first element in an array. - * - * @param array $array - * @return mixed - */ - public static function array_first(array $array) - { - return reset($array); - } - - /** - * Returns the last element in an array. - * - * @param array $array - * @return mixed - */ - public static function array_last(array $array) - { - return end($array); - } - - /** - * Returns the first key in an array. - * - * @param array $array - * @return int|string - */ - public static function array_first_key(array $array) - { - reset($array); - - return key($array); - } - - /** - * Returns the last key in an array. - * - * @param array $array - * @return int|string - */ - public static function array_last_key(array $array) - { - end($array); - - return key($array); - } - - /** - * Flatten a multi-dimensional array into a one dimensional array. - * - * Contributed by Theodore R. Smith of PHP Experts, Inc. - * - * @param array $array The array to flatten - * @param boolean $preserve_keys Whether or not to preserve array keys. - * Keys from deeply nested arrays will - * overwrite keys from shallowy nested arrays - * @return array - */ - public static function array_flatten(array $array, $preserve_keys = true) - { - $flattened = array(); - - array_walk_recursive($array, function($value, $key) use (&$flattened, $preserve_keys) { - if ($preserve_keys && !is_int($key)) { - $flattened[$key] = $value; - } else { - $flattened[] = $value; - } - }); - - return $flattened; - } - - /** - * Accepts an array, and returns an array of values from that array as - * specified by $field. For example, if the array is full of objects - * and you call util::array_pluck($array, 'name'), the function will - * return an array of values from $array[]->name. - * - * @param array $array An array - * @param string $field The field to get values from - * @param boolean $preserve_keys Whether or not to preserve the - * array keys - * @param boolean $remove_nomatches If the field doesn't appear to be set, - * remove it from the array - * @return array - */ - public static function array_pluck(array $array, $field, $preserve_keys = true, $remove_nomatches = true) - { - $new_list = array(); - - foreach ($array as $key => $value) { - if (is_object($value)) { - if (isset($value->{$field})) { - if ($preserve_keys) { - $new_list[$key] = $value->{$field}; - } else { - $new_list[] = $value->{$field}; - } - } elseif (!$remove_nomatches) { - $new_list[$key] = $value; - } - } else { - if (isset($value[$field])) { - if ($preserve_keys) { - $new_list[$key] = $value[$field]; - } else { - $new_list[] = $value[$field]; - } - } elseif (!$remove_nomatches) { - $new_list[$key] = $value; - } - } - } - - return $new_list; - } - - /** - * Searches for a given value in an array of arrays, objects and scalar - * values. You can optionally specify a field of the nested arrays and - * objects to search in. - * - * @param array $array The array to search - * @param scalar $search The value to search for - * @param string $field The field to search in, if not specified - * all fields will be searched - * @return boolean|scalar False on failure or the array key on success - */ - public static function array_search_deep(array $array, $search, $field = false) - { - // *grumbles* stupid PHP type system - $search = (string) $search; - - foreach ($array as $key => $elem) { - // *grumbles* stupid PHP type system - $key = (string) $key; - - if ($field) { - if (is_object($elem) && $elem->{$field} === $search) { - return $key; - } elseif (is_array($elem) && $elem[$field] === $search) { - return $key; - } elseif (is_scalar($elem) && $elem === $search) { - return $key; - } - } else { - if (is_object($elem)) { - $elem = (array) $elem; - - if (in_array($search, $elem)) { - return $key; - } - } elseif (is_array($elem) && in_array($search, $elem)) { - return $key; - } elseif (is_scalar($elem) && $elem === $search) { - return $key; - } - } - } - - return false; - } - - /** - * Returns an array containing all the elements of arr1 after applying - * the callback function to each one. - * - * @param string $callback Callback function to run for each - * element in each array - * @param array $array An array to run through the callback - * function - * @param boolean $on_nonscalar Whether or not to call the callback - * function on nonscalar values - * (Objects, resources, etc) - * @return array - */ - public static function array_map_deep(array $array, $callback, $on_nonscalar = false) - { - foreach ($array as $key => $value) { - if (is_array($value)) { - $args = array($value, $callback, $on_nonscalar); - $array[$key] = call_user_func_array(array(__CLASS__, __FUNCTION__), $args); - } elseif (is_scalar($value) || $on_nonscalar) { - $array[$key] = call_user_func($callback, $value); - } - } - - return $array; - } - - public static function array_clean(array $array) - { - return array_filter($array); - } - - /** - * Wrapper to prevent errors if the user doesn't have the mbstring - * extension installed. - * - * @param string $encoding - * @return string - */ - protected static function mbInternalEncoding($encoding = null) - { - if (function_exists('mb_internal_encoding')) { - return $encoding ? mb_internal_encoding($encoding) : mb_internal_encoding(); - } - - // @codeCoverageIgnoreStart - return 'UTF-8'; - // @codeCoverageIgnoreEnd - } - - /** - * Set the writable bit on a file to the minimum value that allows the user - * running PHP to write to it. - * - * @param string $filename The filename to set the writable bit on - * @param boolean $writable Whether to make the file writable or not - * @return boolean - */ - public static function set_writable($filename, $writable = true) - { - $stat = @stat($filename); - - if ($stat === false) { - return false; - } - - // We're on Windows - if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { - return true; - } - - list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); - - if ($writable) { - // Set only the user writable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, fileperms($filename) | 0200); - } - - // Set only the group writable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, fileperms($filename) | 0220); - } - - // Set the world writable bit (file isn't owned or grouped by us) - return chmod($filename, fileperms($filename) | 0222); - } else { - // Set only the user writable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, (fileperms($filename) | 0222) ^ 0222); - } - - // Set only the group writable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, (fileperms($filename) | 0222) ^ 0022); - } - - // Set the world writable bit (file isn't owned or grouped by us) - return chmod($filename, (fileperms($filename) | 0222) ^ 0002); - } - } - - /** - * Set the readable bit on a file to the minimum value that allows the user - * running PHP to read to it. - * - * @param string $filename The filename to set the readable bit on - * @param boolean $readable Whether to make the file readable or not - * @return boolean - */ - public static function set_readable($filename, $readable = true) - { - $stat = @stat($filename); - - if ($stat === false) { - return false; - } - - // We're on Windows - if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { - return true; - } - - list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); - - if ($readable) { - // Set only the user readable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, fileperms($filename) | 0400); - } - - // Set only the group readable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, fileperms($filename) | 0440); - } - - // Set the world readable bit (file isn't owned or grouped by us) - return chmod($filename, fileperms($filename) | 0444); - } else { - // Set only the user readable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, (fileperms($filename) | 0444) ^ 0444); - } - - // Set only the group readable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, (fileperms($filename) | 0444) ^ 0044); - } - - // Set the world readable bit (file isn't owned or grouped by us) - return chmod($filename, (fileperms($filename) | 0444) ^ 0004); - } - } - - /** - * Set the executable bit on a file to the minimum value that allows the - * user running PHP to read to it. - * - * @param string $filename The filename to set the executable bit on - * @param boolean $executable Whether to make the file executable or not - * @return boolean - */ - public static function set_executable($filename, $executable = true) - { - $stat = @stat($filename); - - if ($stat === false) { - return false; - } - - // We're on Windows - if (strncasecmp(PHP_OS, 'WIN', 3) === 0) { - return true; - } - - list($myuid, $mygid) = array(posix_geteuid(), posix_getgid()); - - if ($executable) { - // Set only the user readable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, fileperms($filename) | 0100); - } - - // Set only the group readable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, fileperms($filename) | 0110); - } - - // Set the world readable bit (file isn't owned or grouped by us) - return chmod($filename, fileperms($filename) | 0111); - } else { - // Set only the user readable bit (file is owned by us) - if ($stat['uid'] == $myuid) { - return chmod($filename, (fileperms($filename) | 0111) ^ 0111); - } - - // Set only the group readable bit (file group is the same as us) - if ($stat['gid'] == $mygid) { - return chmod($filename, (fileperms($filename) | 0111) ^ 0011); - } - - // Set the world readable bit (file isn't owned or grouped by us) - return chmod($filename, (fileperms($filename) | 0111) ^ 0001); - } - } - - /** - * Returns size of a given directory in bytes. - * - * @param string $dir - * @return integer - */ - public static function directory_size($dir) - { - $size = 0; - foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $file => $key) { - if ($key->isFile()) { - $size += $key->getSize(); - } - } - return $size; - } - - /** - * Returns a home directory of current user. - * - * @return string - */ - public static function get_user_directory() - { - if (isset($_SERVER['HOMEDRIVE'])) return $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']; - else return $_SERVER['HOME']; - } - - /** - * Returns all paths inside a directory. - * - * @param string $dir - * @return array - */ - public static function directory_contents($dir) - { - $contents = array(); - foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $pathname => $fi) { - $contents[] = $pathname; - } - natsort($contents); - return $contents; - } -} diff --git a/e_lib/util.php b/e_lib/util.php deleted file mode 100644 index 1b209796..00000000 --- a/e_lib/util.php +++ /dev/null @@ -1,10 +0,0 @@ - - */ -class util extends \utilphp\util { } diff --git a/f_config/config.php b/f_config/config.php index fa5167e5..4d2d4897 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -1,4 +1,5 @@ Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/donation/Post.php b/i_entrance/donation/Post.php index 260a736d..0ca5eec5 100644 --- a/i_entrance/donation/Post.php +++ b/i_entrance/donation/Post.php @@ -1,4 +1,9 @@ Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/donation/calculatePost.php b/i_entrance/donation/calculatePost.php index 2970d44e..24f5c5dc 100644 --- a/i_entrance/donation/calculatePost.php +++ b/i_entrance/donation/calculatePost.php @@ -1,11 +1,10 @@ Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/enterPost.php b/i_entrance/enterPost.php index 8545be83..eb7e8b0b 100644 --- a/i_entrance/enterPost.php +++ b/i_entrance/enterPost.php @@ -1,13 +1,14 @@ Select('ID, PW, CONMSG', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/logoutPost.php b/i_entrance/logoutPost.php index 990d48c8..6635cce4 100644 --- a/i_entrance/logoutPost.php +++ b/i_entrance/logoutPost.php @@ -1,11 +1,12 @@ Logout(); $response['result'] = 'SUCCESS'; diff --git a/i_entrance/manage/Get.php b/i_entrance/manage/Get.php index eb69c290..f84d425f 100644 --- a/i_entrance/manage/Get.php +++ b/i_entrance/manage/Get.php @@ -1,11 +1,12 @@ Select('ID, NAME, GRADE, PICTURE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/manage/deletePost.php b/i_entrance/manage/deletePost.php index aa08f78c..724f5509 100644 --- a/i_entrance/manage/deletePost.php +++ b/i_entrance/manage/deletePost.php @@ -1,6 +1,4 @@ NoMember()}.jpg"; $rs = $DB->Select('ID, PICTURE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); diff --git a/i_entrance/manage/iconPost.php b/i_entrance/manage/iconPost.php index 56769534..0f508b45 100644 --- a/i_entrance/manage/iconPost.php +++ b/i_entrance/manage/iconPost.php @@ -1,13 +1,13 @@ Select('ID, PW', 'MEMBER', "NO='{$SESSION->NoMember()}'"); diff --git a/i_entrance/manage/quitPost.php b/i_entrance/manage/quitPost.php index fc505b41..58a915aa 100644 --- a/i_entrance/manage/quitPost.php +++ b/i_entrance/manage/quitPost.php @@ -1,14 +1,14 @@ Select('PW', 'MEMBER', "NO='{$SESSION->NoMember()}'"); diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index 6e96756a..3be69857 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -1,13 +1,12 @@ Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/member/Post.php b/i_entrance/member/Post.php index 5f751122..acd8e02f 100644 --- a/i_entrance/member/Post.php +++ b/i_entrance/member/Post.php @@ -1,10 +1,4 @@ Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/serverListPost.php b/i_entrance/serverListPost.php index f6d8f2a3..aefd0361 100644 --- a/i_entrance/serverListPost.php +++ b/i_entrance/serverListPost.php @@ -1,6 +1,4 @@ Select('ID, GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/i_entrance/templates/block_htaccess.php b/i_entrance/templates/block_htaccess.php index 27315b31..1b3f4758 100644 --- a/i_entrance/templates/block_htaccess.php +++ b/i_entrance/templates/block_htaccess.php @@ -1,6 +1,6 @@ Deny from all -SetEnvIf X-Forwarded-For ^192\.168\.0\.1 env_allow_1 +SetEnvIf X-Forwarded-For ^ env_allow_1 Allow from env=env_allow_1 -Allow from 192.168.0.1 +Allow from \ No newline at end of file diff --git a/i_login/Post.php b/i_login/Post.php index 6043d352..4e1eeadc 100644 --- a/i_login/Post.php +++ b/i_login/Post.php @@ -1,4 +1,10 @@ diff --git a/install.php b/install.php index 09e0de36..0a17d3fe 100644 --- a/install.php +++ b/install.php @@ -5,4 +5,4 @@ require_once('_common.php'); Go to f_install/install.php
-Todo : Back to replace code +Todo: Back to replace code diff --git a/twe/_simul.php b/twe/_simul.php index 62611eb1..53fe7979 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -1,7 +1,6 @@ location.replace('msglist.php');"); +header('Location:msglist.php'); +die(); include "lib.php"; include "func.php"; diff --git a/twe/event_1.php b/twe/event_1.php index bc0d99b5..5e7ba2db 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -1,10 +1,10 @@ GetError()); - if($http->GetErr() == true) { return false; } - $http->setHttpVersion("1.1"); - $cookie = ""; - $http->Get($map_path, $cookie); - if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Response end, '.$http->GetError()); - if($http->GetErr() == true) { return false; } - $map = $http->Response["body"]; + $client = new GuzzleHttp\Client(); + $response = $client->get($map_path); + + $map = (string)$response->getBody(); $map = str_replace("'", '<_quot_>', $map); $map = str_replace('"', '<_dquot_>', $map); - $http->Close(); - if($http->GetErr() == true) { return false; } $log = getHistory(20, $admin['year'], $admin['month'], $isFirst); $genlog = getGenHistory(50, $admin['year'], $admin['month'], $isFirst); diff --git a/twe/func_http.php b/twe/func_http.php deleted file mode 100644 index 2afb45bc..00000000 --- a/twe/func_http.php +++ /dev/null @@ -1,288 +0,0 @@ -Server = $Server; - $this->Port = $Port; - $this->Timeout = $Timeout; - - $this->Socket = @fsockopen ($this->Server, $this->Port, $errno, $errstr, $this->Timeout); - if(!$this->Socket){ - $this->Error(0, "Socket Connection Fail"); - } - } - - function setTimeout($Timeout){ - $this->Timeout = $Timeout; - } - - function setHttpVersion($HttpVersion){ - $this->HttpVersion = $HttpVersion; - } - - function Head($Url = "/") { - $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - - return $this->Read(); - } - - function isHead($Url = "/"){ - $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - - return $this->isOK(); - } - - function GetHead($Url = "/") { - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - $out = $this->ReadHeader(); - return $out; - } - - function Get($Url = "/", $Cookie="") { - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - return $this->Read(); - } - - function isGet($Url = "/", $Cookie=""){ - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - return $this->isOK(); - } - - function isGetAll($Url = "/", $Cookie=""){ - $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); - if($Cookie != ""){ - $msg .= $this->PutCookie($Cookie); - } - $msg .= $this->PutHead(); - $msg .= "\r\n\r\n"; - fputs($this->Socket, $msg); - - $data = $this->Read(); - $this->Length = strlen($data); - return $this->isOK($data); - } - - function Post($Url, $Data, $Cookie = ""){ - $this->Url = $Url; - fputs($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); - if($Cookie != ""){ - $this->PutCookie($Cookie); - } - $this->PutHead(); - fputs($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); - $out = ""; - while (list ($k, $v) = each ($Data)) { - if(strlen($out) != 0) $out .= "&"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - fputs($this->Socket, "Content-length: ".strlen($out)."\r\n"); - fputs($this->Socket, "$out"); - fputs($this->Socket, "\r\n"); - return $this->Read(); - } - - function IsPost($Url, $Data, $Cookie = ""){ - $this->Url = $Url; - fputs($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); - if($Cookie != ""){ - $this->PutCookie($Cookie); - } - $this->PutHead(); - fputs($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); - $out = ""; - while (list ($k, $v) = each ($Data)) { - if(strlen($out) != 0) $out .= "&"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - fputs($this->Socket, "Content-length: ".strlen($out)."\r\n\r\n"); - fputs($this->Socket, "$out"); - fputs($this->Socket, "\r\n"); - return $this->isOk(); - } - - function PutHead(){ - $msg = ""; - $msg .= "Accept: */*\r\n"; - $msg .= "Accept-Language: ko\r\n"; - $msg .= "Accept-Encoding: gzip, deflate\r\n"; - $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\r\n"; - while (list($name, $value) = each ($this->headers)) { - $msg .= "$name: $value\r\n"; - } - $msg .= "Host: ".$this->Server.":".$this->Port."\r\n"; - $msg .= "Connection: close\r\n"; - return $msg; - } - - function AddHeader($name, $value){ - $this->headers[$name] = $value; - } - - function PutCookie($cookie){ - $msg = ""; - if(is_array($cookie)){ - $out = ""; - while (list ($k, $v) = each ($cookie)) { - if(strlen($out) != 0) $out .= ";"; - $out .= rawurlencode($k). "=" .rawurlencode($v); - } - $msg = "Cookie: $out\n"; - } else { - $msg = "Cookie: $cookie\n"; - } - return $msg; - } - - function Read(){ - $out = $this->ReadHeader(); - $chunked = isset($this->Response['transfer-encoding']) && ('chunked' == $this->Response['transfer-encoding']); - $gzipped = isset($this->Response['content-encoding']) && ('gzip' == $this->Response['content-encoding']); - $body = ''; - $this->_chunkLength = 0; - while(!feof($this->Socket)){ - if ($chunked) { - $buf = $this->_readChunked(); - } else { - $buf = fread($this->Socket, 4096); - } - $body .= $buf; - } - if($gzipped){ - $body = gzinflate(substr($body, 10)); - } - $this->Response['body'] = $body; - $out .= $body; - return $out; - } - - function ReadHeader(){ - $out = ''; - $buf = $this->_readLine(); - if (sscanf($buf, 'HTTP/%s %s', $http_version, $returncode) != 2) { - $this->Error(0,"Malformed response"); - return false; - } else { - $this->Response["protocol"] = 'HTTP/' . $http_version; - $this->Response["code"] = intval($returncode); - } - $out .= $buf; - while(!feof($this->Socket)){ - $buf = $this->_readLine(); - $out .= $buf; - - if($buf == "\n" || $buf == "\r\n"){ - break; - } - - list($name,$value) = split(":",rtrim($buf,"\r\n"),2); - $this->Response[strtolower($name)] = trim($value); - } - $this->Response["header"] = $out; - return $out; - } - - function isOk($buffer = ""){ - if($buffer == "") $buffer .= fgets($this->Socket, 128); - if(preg_match('/^HTTP\/.* (2\d{2}|3\d{2}).*/', $buffer)){ - return true; - } - return false; - } - - function _readLine(){ - $line = ''; - while(!feof($this->Socket)){ - $line .= fgets($this->Socket, 4096); - if (substr($line, -2) == "\r\n" || substr($line, -1) == "\n") { - return $line; - } - } - return $line; - } - - function _readAll(){ - $data = ''; - while(!feof($this->Socket)){ - $data .= fread($this->Socket, 4096); - } - return $data; - } - - function _readChunked(){ - // at start of the next chunk? - if (0 == $this->_chunkLength) { - $line = $this->_readLine(); - if (preg_match('/^([0-9a-f]+)/i', $line, $matches)) { - $this->_chunkLength = hexdec($matches[1]); - // Chunk with zero length indicates the end - if (0 == $this->_chunkLength) { - $this->_readAll(); // make this an eof() - return ''; - } - } - } - $data = fread($this->Socket, $this->_chunkLength); - $this->_chunkLength -= strlen($data); - if (0 == $this->_chunkLength) { - $this->_readLine(); // Trailing CRLF - } - return $data; - } - - function Close(){ - fclose($this->Socket); - } - - function Error($errnum, $errmsg){ - $this->Err = true; - $this->ErrNum = $errnum; - $this->ErrMsg = $errmsg; - } - - function GetErr() { - return $this->Err; - } - - function GetError() { - if($this->Err == true) { - return "{$this->ErrNum}, {$this->ErrMsg}"; - } else { - return "No Err"; - } - } -} diff --git a/twe/func_message.php b/twe/func_message.php index a285665b..791af99d 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -1,7 +1,6 @@
재설치하려면 해당 파일을 지우세요"); diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 083ad480..fbf13863 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -1,11 +1,10 @@ $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index f44fc383..97a8bfa5 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,5 +6,10 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'League\\Plates\\' => array($vendorDir . '/league/plates/src'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index afca66f6..74abef3a 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -47,6 +47,24 @@ class ComposerAutoloaderInit67b09c83b85c3bc0027caefe5bba171a $loader->register(true); + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire67b09c83b85c3bc0027caefe5bba171a($fileIdentifier, $file); + } + return $loader; } } + +function composerRequire67b09c83b85c3bc0027caefe5bba171a($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index ac3cfb2c..e7cb628a 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -6,18 +6,55 @@ namespace Composer\Autoload; class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a { + public static $files = array ( + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + ); + public static $prefixLengthsPsr4 = array ( + 'P' => + array ( + 'Psr\\Http\\Message\\' => 17, + 'PHPMailer\\PHPMailer\\' => 20, + ), 'L' => array ( 'League\\Plates\\' => 14, ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + 'GuzzleHttp\\Promise\\' => 19, + 'GuzzleHttp\\' => 11, + ), ); public static $prefixDirsPsr4 = array ( + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'PHPMailer\\PHPMailer\\' => + array ( + 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', + ), 'League\\Plates\\' => array ( 0 => __DIR__ . '/..' . '/league/plates/src', ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + 'GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), ); public static $prefixesPsr0 = array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index b52416a5..46d72d9d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -47,6 +47,193 @@ "utility" ] }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.0", + "version_normalized": "6.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "time": "2017-06-22T18:50:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ] + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "time": "2016-12-20T10:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "version_normalized": "1.4.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2017-03-20T17:10:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ] + }, { "name": "league/plates", "version": "3.3.0", @@ -104,6 +291,126 @@ "views" ] }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.3", + "version_normalized": "6.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6", + "reference": "44d49bab5ab1fef721d3ee07e75dc0865ddf4cc6", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2018-01-05T13:19:58+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ] + }, { "name": "sergeytsalkov/meekrodb", "version": "v2.3", diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md new file mode 100644 index 00000000..b265cbcd --- /dev/null +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -0,0 +1,1264 @@ +# CHANGELOG + +## 6.3.0 - 2017-06-22 + +* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659) +* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621) +* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580) +* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609) +* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641) +* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611) +* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811) +* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642) +* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569) +* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711) +* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745) +* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721) +* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318) +* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) +* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) + + ++ Minor code cleanups, documentation fixes and clarifications. + +## 6.2.3 - 2017-02-28 + +* Fix deprecations with guzzle/psr7 version 1.4 + +## 6.2.2 - 2016-10-08 + +* Allow to pass nullable Response to delay callable +* Only add scheme when host is present +* Fix drain case where content-length is the literal string zero +* Obfuscate in-URL credentials in exceptions + +## 6.2.1 - 2016-07-18 + +* Address HTTP_PROXY security vulnerability, CVE-2016-5385: + https://httpoxy.org/ +* Fixing timeout bug with StreamHandler: + https://github.com/guzzle/guzzle/pull/1488 +* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when + a server does not honor `Connection: close`. +* Ignore URI fragment when sending requests. + +## 6.2.0 - 2016-03-21 + +* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. + https://github.com/guzzle/guzzle/pull/1389 +* Bug fix: Fix sleep calculation when waiting for delayed requests. + https://github.com/guzzle/guzzle/pull/1324 +* Feature: More flexible history containers. + https://github.com/guzzle/guzzle/pull/1373 +* Bug fix: defer sink stream opening in StreamHandler. + https://github.com/guzzle/guzzle/pull/1377 +* Bug fix: do not attempt to escape cookie values. + https://github.com/guzzle/guzzle/pull/1406 +* Feature: report original content encoding and length on decoded responses. + https://github.com/guzzle/guzzle/pull/1409 +* Bug fix: rewind seekable request bodies before dispatching to cURL. + https://github.com/guzzle/guzzle/pull/1422 +* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. + https://github.com/guzzle/guzzle/pull/1367 + +## 6.1.1 - 2015-11-22 + +* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler + https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 +* Feature: HandlerStack is now more generic. + https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e +* Bug fix: setting verify to false in the StreamHandler now disables peer + verification. https://github.com/guzzle/guzzle/issues/1256 +* Feature: Middleware now uses an exception factory, including more error + context. https://github.com/guzzle/guzzle/pull/1282 +* Feature: better support for disabled functions. + https://github.com/guzzle/guzzle/pull/1287 +* Bug fix: fixed regression where MockHandler was not using `sink`. + https://github.com/guzzle/guzzle/pull/1292 + +## 6.1.0 - 2015-09-08 + +* Feature: Added the `on_stats` request option to provide access to transfer + statistics for requests. https://github.com/guzzle/guzzle/pull/1202 +* Feature: Added the ability to persist session cookies in CookieJars. + https://github.com/guzzle/guzzle/pull/1195 +* Feature: Some compatibility updates for Google APP Engine + https://github.com/guzzle/guzzle/pull/1216 +* Feature: Added support for NO_PROXY to prevent the use of a proxy based on + a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 +* Feature: Cookies can now contain square brackets. + https://github.com/guzzle/guzzle/pull/1237 +* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. + https://github.com/guzzle/guzzle/pull/1232 +* Bug fix: Cusotm cURL options now correctly override curl options of the + same name. https://github.com/guzzle/guzzle/pull/1221 +* Bug fix: Content-Type header is now added when using an explicitly provided + multipart body. https://github.com/guzzle/guzzle/pull/1218 +* Bug fix: Now ignoring Set-Cookie headers that have no name. +* Bug fix: Reason phrase is no longer cast to an int in some cases in the + cURL handler. https://github.com/guzzle/guzzle/pull/1187 +* Bug fix: Remove the Authorization header when redirecting if the Host + header changes. https://github.com/guzzle/guzzle/pull/1207 +* Bug fix: Cookie path matching fixes + https://github.com/guzzle/guzzle/issues/1129 +* Bug fix: Fixing the cURL `body_as_string` setting + https://github.com/guzzle/guzzle/pull/1201 +* Bug fix: quotes are no longer stripped when parsing cookies. + https://github.com/guzzle/guzzle/issues/1172 +* Bug fix: `form_params` and `query` now always uses the `&` separator. + https://github.com/guzzle/guzzle/pull/1163 +* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. + https://github.com/guzzle/guzzle/pull/1189 + +## 6.0.2 - 2015-07-04 + +* Fixed a memory leak in the curl handlers in which references to callbacks + were not being removed by `curl_reset`. +* Cookies are now extracted properly before redirects. +* Cookies now allow more character ranges. +* Decoded Content-Encoding responses are now modified to correctly reflect + their state if the encoding was automatically removed by a handler. This + means that the `Content-Encoding` header may be removed an the + `Content-Length` modified to reflect the message size after removing the + encoding. +* Added a more explicit error message when trying to use `form_params` and + `multipart` in the same request. +* Several fixes for HHVM support. +* Functions are now conditionally required using an additional level of + indirection to help with global Composer installations. + +## 6.0.1 - 2015-05-27 + +* Fixed a bug with serializing the `query` request option where the `&` + separator was missing. +* Added a better error message for when `body` is provided as an array. Please + use `form_params` or `multipart` instead. +* Various doc fixes. + +## 6.0.0 - 2015-05-26 + +* See the UPGRADING.md document for more information. +* Added `multipart` and `form_params` request options. +* Added `synchronous` request option. +* Added the `on_headers` request option. +* Fixed `expect` handling. +* No longer adding default middlewares in the client ctor. These need to be + present on the provided handler in order to work. +* Requests are no longer initiated when sending async requests with the + CurlMultiHandler. This prevents unexpected recursion from requests completing + while ticking the cURL loop. +* Removed the semantics of setting `default` to `true`. This is no longer + required now that the cURL loop is not ticked for async requests. +* Added request and response logging middleware. +* No longer allowing self signed certificates when using the StreamHandler. +* Ensuring that `sink` is valid if saving to a file. +* Request exceptions now include a "handler context" which provides handler + specific contextual information. +* Added `GuzzleHttp\RequestOptions` to allow request options to be applied + using constants. +* `$maxHandles` has been removed from CurlMultiHandler. +* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + +## 5.3.0 - 2015-05-19 + +* Mock now supports `save_to` +* Marked `AbstractRequestEvent::getTransaction()` as public. +* Fixed a bug in which multiple headers using different casing would overwrite + previous headers in the associative array. +* Added `Utils::getDefaultHandler()` +* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. +* URL scheme is now always lowercased. + +## 6.0.0-beta.1 + +* Requires PHP >= 5.5 +* Updated to use PSR-7 + * Requires immutable messages, which basically means an event based system + owned by a request instance is no longer possible. + * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). + * Removed the dependency on `guzzlehttp/streams`. These stream abstractions + are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` + namespace. +* Added middleware and handler system + * Replaced the Guzzle event and subscriber system with a middleware system. + * No longer depends on RingPHP, but rather places the HTTP handlers directly + in Guzzle, operating on PSR-7 messages. + * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which + means the `guzzlehttp/retry-subscriber` is now obsolete. + * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. +* Asynchronous responses + * No longer supports the `future` request option to send an async request. + Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, + `getAsync`, etc.). + * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid + recursion required by chaining and forwarding react promises. See + https://github.com/guzzle/promises + * Added `requestAsync` and `sendAsync` to send request asynchronously. + * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests + asynchronously. +* Request options + * POST and form updates + * Added the `form_fields` and `form_files` request options. + * Removed the `GuzzleHttp\Post` namespace. + * The `body` request option no longer accepts an array for POST requests. + * The `exceptions` request option has been deprecated in favor of the + `http_errors` request options. + * The `save_to` request option has been deprecated in favor of `sink` request + option. +* Clients no longer accept an array of URI template string and variables for + URI variables. You will need to expand URI templates before passing them + into a client constructor or request method. +* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are + now magic methods that will send synchronous requests. +* Replaced `Utils.php` with plain functions in `functions.php`. +* Removed `GuzzleHttp\Collection`. +* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as + an array. +* Removed `GuzzleHttp\Query`. Query string handling is now handled using an + associative array passed into the `query` request option. The query string + is serialized using PHP's `http_build_query`. If you need more control, you + can pass the query string in as a string. +* `GuzzleHttp\QueryParser` has been replaced with the + `GuzzleHttp\Psr7\parse_query`. + +## 5.2.0 - 2015-01-27 + +* Added `AppliesHeadersInterface` to make applying headers to a request based + on the body more generic and not specific to `PostBodyInterface`. +* Reduced the number of stack frames needed to send requests. +* Nested futures are now resolved in the client rather than the RequestFsm +* Finishing state transitions is now handled in the RequestFsm rather than the + RingBridge. +* Added a guard in the Pool class to not use recursion for request retries. + +## 5.1.0 - 2014-12-19 + +* Pool class no longer uses recursion when a request is intercepted. +* The size of a Pool can now be dynamically adjusted using a callback. + See https://github.com/guzzle/guzzle/pull/943. +* Setting a request option to `null` when creating a request with a client will + ensure that the option is not set. This allows you to overwrite default + request options on a per-request basis. + See https://github.com/guzzle/guzzle/pull/937. +* Added the ability to limit which protocols are allowed for redirects by + specifying a `protocols` array in the `allow_redirects` request option. +* Nested futures due to retries are now resolved when waiting for synchronous + responses. See https://github.com/guzzle/guzzle/pull/947. +* `"0"` is now an allowed URI path. See + https://github.com/guzzle/guzzle/pull/935. +* `Query` no longer typehints on the `$query` argument in the constructor, + allowing for strings and arrays. +* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle + specific exceptions if necessary. + +## 5.0.3 - 2014-11-03 + +This change updates query strings so that they are treated as un-encoded values +by default where the value represents an un-encoded value to send over the +wire. A Query object then encodes the value before sending over the wire. This +means that even value query string values (e.g., ":") are url encoded. This +makes the Query class match PHP's http_build_query function. However, if you +want to send requests over the wire using valid query string characters that do +not need to be encoded, then you can provide a string to Url::setQuery() and +pass true as the second argument to specify that the query string is a raw +string that should not be parsed or encoded (unless a call to getQuery() is +subsequently made, forcing the query-string to be converted into a Query +object). + +## 5.0.2 - 2014-10-30 + +* Added a trailing `\r\n` to multipart/form-data payloads. See + https://github.com/guzzle/guzzle/pull/871 +* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. +* Status codes are now returned as integers. See + https://github.com/guzzle/guzzle/issues/881 +* No longer overwriting an existing `application/x-www-form-urlencoded` header + when sending POST requests, allowing for customized headers. See + https://github.com/guzzle/guzzle/issues/877 +* Improved path URL serialization. + + * No longer double percent-encoding characters in the path or query string if + they are already encoded. + * Now properly encoding the supplied path to a URL object, instead of only + encoding ' ' and '?'. + * Note: This has been changed in 5.0.3 to now encode query string values by + default unless the `rawString` argument is provided when setting the query + string on a URL: Now allowing many more characters to be present in the + query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A + +## 5.0.1 - 2014-10-16 + +Bugfix release. + +* Fixed an issue where connection errors still returned response object in + error and end events event though the response is unusable. This has been + corrected so that a response is not returned in the `getResponse` method of + these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 +* Fixed an issue where transfer statistics were not being populated in the + RingBridge. https://github.com/guzzle/guzzle/issues/866 + +## 5.0.0 - 2014-10-12 + +Adding support for non-blocking responses and some minor API cleanup. + +### New Features + +* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. +* Added a public API for creating a default HTTP adapter. +* Updated the redirect plugin to be non-blocking so that redirects are sent + concurrently. Other plugins like this can now be updated to be non-blocking. +* Added a "progress" event so that you can get upload and download progress + events. +* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers + requests concurrently using a capped pool size as efficiently as possible. +* Added `hasListeners()` to EmitterInterface. +* Removed `GuzzleHttp\ClientInterface::sendAll` and marked + `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the + recommended way). + +### Breaking changes + +The breaking changes in this release are relatively minor. The biggest thing to +look out for is that request and response objects no longer implement fluent +interfaces. + +* Removed the fluent interfaces (i.e., `return $this`) from requests, + responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, + `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and + `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of + why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. + This also makes the Guzzle message interfaces compatible with the current + PSR-7 message proposal. +* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except + for the HTTP request functions from function.php, these functions are now + implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` + moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to + `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to + `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be + `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php + caused problems for many users: they aren't PSR-4 compliant, require an + explicit include, and needed an if-guard to ensure that the functions are not + declared multiple times. +* Rewrote adapter layer. + * Removing all classes from `GuzzleHttp\Adapter`, these are now + implemented as callables that are stored in `GuzzleHttp\Ring\Client`. + * Removed the concept of "parallel adapters". Sending requests serially or + concurrently is now handled using a single adapter. + * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The + Transaction object now exposes the request, response, and client as public + properties. The getters and setters have been removed. +* Removed the "headers" event. This event was only useful for changing the + body a response once the headers of the response were known. You can implement + a similar behavior in a number of ways. One example might be to use a + FnStream that has access to the transaction being sent. For example, when the + first byte is written, you could check if the response headers match your + expectations, and if so, change the actual stream body that is being + written to. +* Removed the `asArray` parameter from + `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header + value as an array, then use the newly added `getHeaderAsArray()` method of + `MessageInterface`. This change makes the Guzzle interfaces compatible with + the PSR-7 interfaces. +* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add + custom request options using double-dispatch (this was an implementation + detail). Instead, you should now provide an associative array to the + constructor which is a mapping of the request option name mapping to a + function that applies the option value to a request. +* Removed the concept of "throwImmediately" from exceptions and error events. + This control mechanism was used to stop a transfer of concurrent requests + from completing. This can now be handled by throwing the exception or by + cancelling a pool of requests or each outstanding future request individually. +* Updated to "GuzzleHttp\Streams" 3.0. + * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a + `maxLen` parameter. This update makes the Guzzle streams project + compatible with the current PSR-7 proposal. + * `GuzzleHttp\Stream\Stream::__construct`, + `GuzzleHttp\Stream\Stream::factory`, and + `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second + argument. They now accept an associative array of options, including the + "size" key and "metadata" key which can be used to provide custom metadata. + +## 4.2.2 - 2014-09-08 + +* Fixed a memory leak in the CurlAdapter when reusing cURL handles. +* No longer using `request_fulluri` in stream adapter proxies. +* Relative redirects are now based on the last response, not the first response. + +## 4.2.1 - 2014-08-19 + +* Ensuring that the StreamAdapter does not always add a Content-Type header +* Adding automated github releases with a phar and zip + +## 4.2.0 - 2014-08-17 + +* Now merging in default options using a case-insensitive comparison. + Closes https://github.com/guzzle/guzzle/issues/767 +* Added the ability to automatically decode `Content-Encoding` response bodies + using the `decode_content` request option. This is set to `true` by default + to decode the response body if it comes over the wire with a + `Content-Encoding`. Set this value to `false` to disable decoding the + response content, and pass a string to provide a request `Accept-Encoding` + header and turn on automatic response decoding. This feature now allows you + to pass an `Accept-Encoding` header in the headers of a request but still + disable automatic response decoding. + Closes https://github.com/guzzle/guzzle/issues/764 +* Added the ability to throw an exception immediately when transferring + requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 +* Updating guzzlehttp/streams dependency to ~2.1 +* No longer utilizing the now deprecated namespaced methods from the stream + package. + +## 4.1.8 - 2014-08-14 + +* Fixed an issue in the CurlFactory that caused setting the `stream=false` + request option to throw an exception. + See: https://github.com/guzzle/guzzle/issues/769 +* TransactionIterator now calls rewind on the inner iterator. + See: https://github.com/guzzle/guzzle/pull/765 +* You can now set the `Content-Type` header to `multipart/form-data` + when creating POST requests to force multipart bodies. + See https://github.com/guzzle/guzzle/issues/768 + +## 4.1.7 - 2014-08-07 + +* Fixed an error in the HistoryPlugin that caused the same request and response + to be logged multiple times when an HTTP protocol error occurs. +* Ensuring that cURL does not add a default Content-Type when no Content-Type + has been supplied by the user. This prevents the adapter layer from modifying + the request that is sent over the wire after any listeners may have already + put the request in a desired state (e.g., signed the request). +* Throwing an exception when you attempt to send requests that have the + "stream" set to true in parallel using the MultiAdapter. +* Only calling curl_multi_select when there are active cURL handles. This was + previously changed and caused performance problems on some systems due to PHP + always selecting until the maximum select timeout. +* Fixed a bug where multipart/form-data POST fields were not correctly + aggregated (e.g., values with "&"). + +## 4.1.6 - 2014-08-03 + +* Added helper methods to make it easier to represent messages as strings, + including getting the start line and getting headers as a string. + +## 4.1.5 - 2014-08-02 + +* Automatically retrying cURL "Connection died, retrying a fresh connect" + errors when possible. +* cURL implementation cleanup +* Allowing multiple event subscriber listeners to be registered per event by + passing an array of arrays of listener configuration. + +## 4.1.4 - 2014-07-22 + +* Fixed a bug that caused multi-part POST requests with more than one field to + serialize incorrectly. +* Paths can now be set to "0" +* `ResponseInterface::xml` now accepts a `libxml_options` option and added a + missing default argument that was required when parsing XML response bodies. +* A `save_to` stream is now created lazily, which means that files are not + created on disk unless a request succeeds. + +## 4.1.3 - 2014-07-15 + +* Various fixes to multipart/form-data POST uploads +* Wrapping function.php in an if-statement to ensure Guzzle can be used + globally and in a Composer install +* Fixed an issue with generating and merging in events to an event array +* POST headers are only applied before sending a request to allow you to change + the query aggregator used before uploading +* Added much more robust query string parsing +* Fixed various parsing and normalization issues with URLs +* Fixing an issue where multi-valued headers were not being utilized correctly + in the StreamAdapter + +## 4.1.2 - 2014-06-18 + +* Added support for sending payloads with GET requests + +## 4.1.1 - 2014-06-08 + +* Fixed an issue related to using custom message factory options in subclasses +* Fixed an issue with nested form fields in a multi-part POST +* Fixed an issue with using the `json` request option for POST requests +* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` + +## 4.1.0 - 2014-05-27 + +* Added a `json` request option to easily serialize JSON payloads. +* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. +* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. +* Added the ability to provide an emitter to a client in the client constructor. +* Added the ability to persist a cookie session using $_SESSION. +* Added a trait that can be used to add event listeners to an iterator. +* Removed request method constants from RequestInterface. +* Fixed warning when invalid request start-lines are received. +* Updated MessageFactory to work with custom request option methods. +* Updated cacert bundle to latest build. + +4.0.2 (2014-04-16) +------------------ + +* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) +* Added the ability to set scalars as POST fields (#628) + +## 4.0.1 - 2014-04-04 + +* The HTTP status code of a response is now set as the exception code of + RequestException objects. +* 303 redirects will now correctly switch from POST to GET requests. +* The default parallel adapter of a client now correctly uses the MultiAdapter. +* HasDataTrait now initializes the internal data array as an empty array so + that the toArray() method always returns an array. + +## 4.0.0 - 2014-03-29 + +* For more information on the 4.0 transition, see: + http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ +* For information on changes and upgrading, see: + https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 +* Added `GuzzleHttp\batch()` as a convenience function for sending requests in + parallel without needing to write asynchronous code. +* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. + You can now pass a callable or an array of associative arrays where each + associative array contains the "fn", "priority", and "once" keys. + +## 4.0.0.rc-2 - 2014-03-25 + +* Removed `getConfig()` and `setConfig()` from clients to avoid confusion + around whether things like base_url, message_factory, etc. should be able to + be retrieved or modified. +* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface +* functions.php functions were renamed using snake_case to match PHP idioms +* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and + `GUZZLE_CURL_SELECT_TIMEOUT` environment variables +* Added the ability to specify custom `sendAll()` event priorities +* Added the ability to specify custom stream context options to the stream + adapter. +* Added a functions.php function for `get_path()` and `set_path()` +* CurlAdapter and MultiAdapter now use a callable to generate curl resources +* MockAdapter now properly reads a body and emits a `headers` event +* Updated Url class to check if a scheme and host are set before adding ":" + and "//". This allows empty Url (e.g., "") to be serialized as "". +* Parsing invalid XML no longer emits warnings +* Curl classes now properly throw AdapterExceptions +* Various performance optimizations +* Streams are created with the faster `Stream\create()` function +* Marked deprecation_proxy() as internal +* Test server is now a collection of static methods on a class + +## 4.0.0-rc.1 - 2014-03-15 + +* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 + +## 3.8.1 - 2014-01-28 + +* Bug: Always using GET requests when redirecting from a 303 response +* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in + `Guzzle\Http\ClientInterface::setSslVerification()` +* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL +* Bug: The body of a request can now be set to `"0"` +* Sending PHP stream requests no longer forces `HTTP/1.0` +* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of + each sub-exception +* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than + clobbering everything). +* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) +* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. + For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. +* Now properly escaping the regular expression delimiter when matching Cookie domains. +* Network access is now disabled when loading XML documents + +## 3.8.0 - 2013-12-05 + +* Added the ability to define a POST name for a file +* JSON response parsing now properly walks additionalProperties +* cURL error code 18 is now retried automatically in the BackoffPlugin +* Fixed a cURL error when URLs contain fragments +* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were + CurlExceptions +* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) +* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` +* Fixed a bug that was encountered when parsing empty header parameters +* UriTemplate now has a `setRegex()` method to match the docs +* The `debug` request parameter now checks if it is truthy rather than if it exists +* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin +* Added the ability to combine URLs using strict RFC 3986 compliance +* Command objects can now return the validation errors encountered by the command +* Various fixes to cache revalidation (#437 and 29797e5) +* Various fixes to the AsyncPlugin +* Cleaned up build scripts + +## 3.7.4 - 2013-10-02 + +* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) +* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp + (see https://github.com/aws/aws-sdk-php/issues/147) +* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots +* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) +* Updated the bundled cacert.pem (#419) +* OauthPlugin now supports adding authentication to headers or query string (#425) + +## 3.7.3 - 2013-09-08 + +* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and + `CommandTransferException`. +* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description +* Schemas are only injected into response models when explicitly configured. +* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of + an EntityBody. +* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. +* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. +* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() +* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin +* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests +* Bug fix: Properly parsing headers that contain commas contained in quotes +* Bug fix: mimetype guessing based on a filename is now case-insensitive + +## 3.7.2 - 2013-08-02 + +* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander + See https://github.com/guzzle/guzzle/issues/371 +* Bug fix: Cookie domains are now matched correctly according to RFC 6265 + See https://github.com/guzzle/guzzle/issues/377 +* Bug fix: GET parameters are now used when calculating an OAuth signature +* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted +* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched +* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. + See https://github.com/guzzle/guzzle/issues/379 +* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See + https://github.com/guzzle/guzzle/pull/380 +* cURL multi cleanup and optimizations + +## 3.7.1 - 2013-07-05 + +* Bug fix: Setting default options on a client now works +* Bug fix: Setting options on HEAD requests now works. See #352 +* Bug fix: Moving stream factory before send event to before building the stream. See #353 +* Bug fix: Cookies no longer match on IP addresses per RFC 6265 +* Bug fix: Correctly parsing header parameters that are in `<>` and quotes +* Added `cert` and `ssl_key` as request options +* `Host` header can now diverge from the host part of a URL if the header is set manually +* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter +* OAuth parameters are only added via the plugin if they aren't already set +* Exceptions are now thrown when a URL cannot be parsed +* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails +* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin + +## 3.7.0 - 2013-06-10 + +* See UPGRADING.md for more information on how to upgrade. +* Requests now support the ability to specify an array of $options when creating a request to more easily modify a + request. You can pass a 'request.options' configuration setting to a client to apply default request options to + every request created by a client (e.g. default query string variables, headers, curl options, etc.). +* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. + See `Guzzle\Http\StaticClient::mount`. +* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests + created by a command (e.g. custom headers, query string variables, timeout settings, etc.). +* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the + headers of a response +* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key + (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) +* ServiceBuilders now support storing and retrieving arbitrary data +* CachePlugin can now purge all resources for a given URI +* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource +* CachePlugin now uses the Vary header to determine if a resource is a cache hit +* `Guzzle\Http\Message\Response` now implements `\Serializable` +* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters +* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable +* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` +* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size +* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message +* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older + Symfony users can still use the old version of Monolog. +* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. + Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. +* Several performance improvements to `Guzzle\Common\Collection` +* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +* Added `Guzzle\Stream\StreamInterface::isRepeatable` +* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. +* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. +* Removed `Guzzle\Http\ClientInterface::expandTemplate()` +* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` +* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` +* Removed `Guzzle\Http\Message\RequestInterface::canCache` +* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` +* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` +* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. +* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting + `Guzzle\Common\Version::$emitWarnings` to true. +* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use + `$request->getResponseBody()->isRepeatable()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. + These will work through Guzzle 4.0 +* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. +* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. +* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. +* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +* Marked `Guzzle\Common\Collection::inject()` as deprecated. +* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` +* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +* Always setting X-cache headers on cached responses +* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +* Added `CacheStorageInterface::purge($url)` +* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +## 3.6.0 - 2013-05-29 + +* ServiceDescription now implements ToArrayInterface +* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters +* Guzzle can now correctly parse incomplete URLs +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess +* Added the ability to cast Model objects to a string to view debug information. + +## 3.5.0 - 2013-05-13 + +* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times +* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove + itself from the EventDispatcher) +* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values +* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too +* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a + non-existent key +* Bug: All __call() method arguments are now required (helps with mocking frameworks) +* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference + to help with refcount based garbage collection of resources created by sending a request +* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the + HistoryPlugin for a history. +* Added a `responseBody` alias for the `response_body` location +* Refactored internals to no longer rely on Response::getRequest() +* HistoryPlugin can now be cast to a string +* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests + and responses that are sent over the wire +* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects + +## 3.4.3 - 2013-04-30 + +* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response +* Added a check to re-extract the temp cacert bundle from the phar before sending each request + +## 3.4.2 - 2013-04-29 + +* Bug fix: Stream objects now work correctly with "a" and "a+" modes +* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present +* Bug fix: AsyncPlugin no longer forces HEAD requests +* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter +* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails +* Setting a response on a request will write to the custom request body from the response body if one is specified +* LogPlugin now writes to php://output when STDERR is undefined +* Added the ability to set multiple POST files for the same key in a single call +* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default +* Added the ability to queue CurlExceptions to the MockPlugin +* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) +* Configuration loading now allows remote files + +## 3.4.1 - 2013-04-16 + +* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti + handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. +* Exceptions are now properly grouped when sending requests in parallel +* Redirects are now properly aggregated when a multi transaction fails +* Redirects now set the response on the original object even in the event of a failure +* Bug fix: Model names are now properly set even when using $refs +* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax +* Added support for oauth_callback in OAuth signatures +* Added support for oauth_verifier in OAuth signatures +* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection + +## 3.4.0 - 2013-04-11 + +* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 +* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 +* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 +* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. +* Bug fix: Added `number` type to service descriptions. +* Bug fix: empty parameters are removed from an OAuth signature +* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header +* Bug fix: Fixed "array to string" error when validating a union of types in a service description +* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream +* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. +* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. +* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. +* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if + the Content-Type can be determined based on the entity body or the path of the request. +* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. +* Added support for a PSR-3 LogAdapter. +* Added a `command.after_prepare` event +* Added `oauth_callback` parameter to the OauthPlugin +* Added the ability to create a custom stream class when using a stream factory +* Added a CachingEntityBody decorator +* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. +* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. +* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies +* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This + means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use + POST fields or files (the latter is only used when emulating a form POST in the browser). +* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest + +## 3.3.1 - 2013-03-10 + +* Added the ability to create PHP streaming responses from HTTP requests +* Bug fix: Running any filters when parsing response headers with service descriptions +* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing +* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across + response location visitors. +* Bug fix: Removed the possibility of creating configuration files with circular dependencies +* RequestFactory::create() now uses the key of a POST file when setting the POST file name +* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set + +## 3.3.0 - 2013-03-03 + +* A large number of performance optimizations have been made +* Bug fix: Added 'wb' as a valid write mode for streams +* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned +* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` +* BC: Removed `Guzzle\Http\Utils` class +* BC: Setting a service description on a client will no longer modify the client's command factories. +* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using + the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' +* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to + lowercase +* Operation parameter objects are now lazy loaded internally +* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses +* Added support for instantiating responseType=class responseClass classes. Classes must implement + `Guzzle\Service\Command\ResponseClassInterface` +* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These + additional properties also support locations and can be used to parse JSON responses where the outermost part of the + JSON is an array +* Added support for nested renaming of JSON models (rename sentAs to name) +* CachePlugin + * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error + * Debug headers can now added to cached response in the CachePlugin + +## 3.2.0 - 2013-02-14 + +* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. +* URLs with no path no longer contain a "/" by default +* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. +* BadResponseException no longer includes the full request and response message +* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface +* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface +* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription +* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list +* xmlEncoding can now be customized for the XML declaration of a XML service description operation +* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value + aggregation and no longer uses callbacks +* The URL encoding implementation of Guzzle\Http\QueryString can now be customized +* Bug fix: Filters were not always invoked for array service description parameters +* Bug fix: Redirects now use a target response body rather than a temporary response body +* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded +* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives + +## 3.1.2 - 2013-01-27 + +* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the + response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. +* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent +* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) +* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() +* Setting default headers on a client after setting the user-agent will not erase the user-agent setting + +## 3.1.1 - 2013-01-20 + +* Adding wildcard support to Guzzle\Common\Collection::getPath() +* Adding alias support to ServiceBuilder configs +* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface + +## 3.1.0 - 2013-01-12 + +* BC: CurlException now extends from RequestException rather than BadResponseException +* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() +* Added getData to ServiceDescriptionInterface +* Added context array to RequestInterface::setState() +* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http +* Bug: Adding required content-type when JSON request visitor adds JSON to a command +* Bug: Fixing the serialization of a service description with custom data +* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing + an array of successful and failed responses +* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection +* Added Guzzle\Http\IoEmittingEntityBody +* Moved command filtration from validators to location visitors +* Added `extends` attributes to service description parameters +* Added getModels to ServiceDescriptionInterface + +## 3.0.7 - 2012-12-19 + +* Fixing phar detection when forcing a cacert to system if null or true +* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` +* Cleaning up `Guzzle\Common\Collection::inject` method +* Adding a response_body location to service descriptions + +## 3.0.6 - 2012-12-09 + +* CurlMulti performance improvements +* Adding setErrorResponses() to Operation +* composer.json tweaks + +## 3.0.5 - 2012-11-18 + +* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin +* Bug: Response body can now be a string containing "0" +* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert +* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs +* Added support for XML attributes in service description responses +* DefaultRequestSerializer now supports array URI parameter values for URI template expansion +* Added better mimetype guessing to requests and post files + +## 3.0.4 - 2012-11-11 + +* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value +* Bug: Cookies can now be added that have a name, domain, or value set to "0" +* Bug: Using the system cacert bundle when using the Phar +* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures +* Enhanced cookie jar de-duplication +* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added +* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies +* Added the ability to create any sort of hash for a stream rather than just an MD5 hash + +## 3.0.3 - 2012-11-04 + +* Implementing redirects in PHP rather than cURL +* Added PECL URI template extension and using as default parser if available +* Bug: Fixed Content-Length parsing of Response factory +* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. +* Adding ToArrayInterface throughout library +* Fixing OauthPlugin to create unique nonce values per request + +## 3.0.2 - 2012-10-25 + +* Magic methods are enabled by default on clients +* Magic methods return the result of a command +* Service clients no longer require a base_url option in the factory +* Bug: Fixed an issue with URI templates where null template variables were being expanded + +## 3.0.1 - 2012-10-22 + +* Models can now be used like regular collection objects by calling filter, map, etc. +* Models no longer require a Parameter structure or initial data in the constructor +* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` + +## 3.0.0 - 2012-10-15 + +* Rewrote service description format to be based on Swagger + * Now based on JSON schema + * Added nested input structures and nested response models + * Support for JSON and XML input and output models + * Renamed `commands` to `operations` + * Removed dot class notation + * Removed custom types +* Broke the project into smaller top-level namespaces to be more component friendly +* Removed support for XML configs and descriptions. Use arrays or JSON files. +* Removed the Validation component and Inspector +* Moved all cookie code to Guzzle\Plugin\Cookie +* Magic methods on a Guzzle\Service\Client now return the command un-executed. +* Calling getResult() or getResponse() on a command will lazily execute the command if needed. +* Now shipping with cURL's CA certs and using it by default +* Added previousResponse() method to response objects +* No longer sending Accept and Accept-Encoding headers on every request +* Only sending an Expect header by default when a payload is greater than 1MB +* Added/moved client options: + * curl.blacklist to curl.option.blacklist + * Added ssl.certificate_authority +* Added a Guzzle\Iterator component +* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin +* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) +* Added a more robust caching plugin +* Added setBody to response objects +* Updating LogPlugin to use a more flexible MessageFormatter +* Added a completely revamped build process +* Cleaning up Collection class and removing default values from the get method +* Fixed ZF2 cache adapters + +## 2.8.8 - 2012-10-15 + +* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did + +## 2.8.7 - 2012-09-30 + +* Bug: Fixed config file aliases for JSON includes +* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests +* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload +* Bug: Hardening request and response parsing to account for missing parts +* Bug: Fixed PEAR packaging +* Bug: Fixed Request::getInfo +* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail +* Adding the ability for the namespace Iterator factory to look in multiple directories +* Added more getters/setters/removers from service descriptions +* Added the ability to remove POST fields from OAuth signatures +* OAuth plugin now supports 2-legged OAuth + +## 2.8.6 - 2012-09-05 + +* Added the ability to modify and build service descriptions +* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command +* Added a `json` parameter location +* Now allowing dot notation for classes in the CacheAdapterFactory +* Using the union of two arrays rather than an array_merge when extending service builder services and service params +* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references + in service builder config files. +* Services defined in two different config files that include one another will by default replace the previously + defined service, but you can now create services that extend themselves and merge their settings over the previous +* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like + '_default' with a default JSON configuration file. + +## 2.8.5 - 2012-08-29 + +* Bug: Suppressed empty arrays from URI templates +* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching +* Added support for HTTP responses that do not contain a reason phrase in the start-line +* AbstractCommand commands are now invokable +* Added a way to get the data used when signing an Oauth request before a request is sent + +## 2.8.4 - 2012-08-15 + +* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin +* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. +* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream +* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream +* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) +* Added additional response status codes +* Removed SSL information from the default User-Agent header +* DELETE requests can now send an entity body +* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries +* Added the ability of the MockPlugin to consume mocked request bodies +* LogPlugin now exposes request and response objects in the extras array + +## 2.8.3 - 2012-07-30 + +* Bug: Fixed a case where empty POST requests were sent as GET requests +* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body +* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new +* Added multiple inheritance to service description commands +* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` +* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything +* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles + +## 2.8.2 - 2012-07-24 + +* Bug: Query string values set to 0 are no longer dropped from the query string +* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` +* Bug: `+` is now treated as an encoded space when parsing query strings +* QueryString and Collection performance improvements +* Allowing dot notation for class paths in filters attribute of a service descriptions + +## 2.8.1 - 2012-07-16 + +* Loosening Event Dispatcher dependency +* POST redirects can now be customized using CURLOPT_POSTREDIR + +## 2.8.0 - 2012-07-15 + +* BC: Guzzle\Http\Query + * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) + * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() + * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) + * Changed the aggregation functions of QueryString to be static methods + * Can now use fromString() with querystrings that have a leading ? +* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters +* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body +* Cookies are no longer URL decoded by default +* Bug: URI template variables set to null are no longer expanded + +## 2.7.2 - 2012-07-02 + +* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. +* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() +* CachePlugin now allows for a custom request parameter function to check if a request can be cached +* Bug fix: CachePlugin now only caches GET and HEAD requests by default +* Bug fix: Using header glue when transferring headers over the wire +* Allowing deeply nested arrays for composite variables in URI templates +* Batch divisors can now return iterators or arrays + +## 2.7.1 - 2012-06-26 + +* Minor patch to update version number in UA string +* Updating build process + +## 2.7.0 - 2012-06-25 + +* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. +* BC: Removed magic setX methods from commands +* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method +* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. +* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) +* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace +* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin +* Added the ability to set POST fields and files in a service description +* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method +* Adding a command.before_prepare event to clients +* Added BatchClosureTransfer and BatchClosureDivisor +* BatchTransferException now includes references to the batch divisor and transfer strategies +* Fixed some tests so that they pass more reliably +* Added Guzzle\Common\Log\ArrayLogAdapter + +## 2.6.6 - 2012-06-10 + +* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin +* BC: Removing Guzzle\Service\Command\CommandSet +* Adding generic batching system (replaces the batch queue plugin and command set) +* Updating ZF cache and log adapters and now using ZF's composer repository +* Bug: Setting the name of each ApiParam when creating through an ApiCommand +* Adding result_type, result_doc, deprecated, and doc_url to service descriptions +* Bug: Changed the default cookie header casing back to 'Cookie' + +## 2.6.5 - 2012-06-03 + +* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() +* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from +* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data +* BC: Renaming methods in the CookieJarInterface +* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations +* Making the default glue for HTTP headers ';' instead of ',' +* Adding a removeValue to Guzzle\Http\Message\Header +* Adding getCookies() to request interface. +* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() + +## 2.6.4 - 2012-05-30 + +* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. +* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand +* Bug: Fixing magic method command calls on clients +* Bug: Email constraint only validates strings +* Bug: Aggregate POST fields when POST files are present in curl handle +* Bug: Fixing default User-Agent header +* Bug: Only appending or prepending parameters in commands if they are specified +* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes +* Allowing the use of dot notation for class namespaces when using instance_of constraint +* Added any_match validation constraint +* Added an AsyncPlugin +* Passing request object to the calculateWait method of the ExponentialBackoffPlugin +* Allowing the result of a command object to be changed +* Parsing location and type sub values when instantiating a service description rather than over and over at runtime + +## 2.6.3 - 2012-05-23 + +* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. +* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. +* You can now use an array of data when creating PUT request bodies in the request factory. +* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. +* [Http] Adding support for Content-Type in multipart POST uploads per upload +* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) +* Adding more POST data operations for easier manipulation of POST data. +* You can now set empty POST fields. +* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. +* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. +* CS updates + +## 2.6.2 - 2012-05-19 + +* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. + +## 2.6.1 - 2012-05-19 + +* [BC] Removing 'path' support in service descriptions. Use 'uri'. +* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. +* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. +* [BC] Removing Guzzle\Common\XmlElement. +* All commands, both dynamic and concrete, have ApiCommand objects. +* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. +* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. +* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. + +## 2.6.0 - 2012-05-15 + +* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder +* [BC] Executing a Command returns the result of the command rather than the command +* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. +* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. +* [BC] Moving ResourceIterator* to Guzzle\Service\Resource +* [BC] Completely refactored ResourceIterators to iterate over a cloned command object +* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate +* [BC] Guzzle\Guzzle is now deprecated +* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject +* Adding Guzzle\Version class to give version information about Guzzle +* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() +* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data +* ServiceDescription and ServiceBuilder are now cacheable using similar configs +* Changing the format of XML and JSON service builder configs. Backwards compatible. +* Cleaned up Cookie parsing +* Trimming the default Guzzle User-Agent header +* Adding a setOnComplete() method to Commands that is called when a command completes +* Keeping track of requests that were mocked in the MockPlugin +* Fixed a caching bug in the CacheAdapterFactory +* Inspector objects can be injected into a Command object +* Refactoring a lot of code and tests to be case insensitive when dealing with headers +* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL +* Adding the ability to set global option overrides to service builder configs +* Adding the ability to include other service builder config files from within XML and JSON files +* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. + +## 2.5.0 - 2012-05-08 + +* Major performance improvements +* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. +* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. +* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" +* Added the ability to passed parameters to all requests created by a client +* Added callback functionality to the ExponentialBackoffPlugin +* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. +* Rewinding request stream bodies when retrying requests +* Exception is thrown when JSON response body cannot be decoded +* Added configurable magic method calls to clients and commands. This is off by default. +* Fixed a defect that added a hash to every parsed URL part +* Fixed duplicate none generation for OauthPlugin. +* Emitting an event each time a client is generated by a ServiceBuilder +* Using an ApiParams object instead of a Collection for parameters of an ApiCommand +* cache.* request parameters should be renamed to params.cache.* +* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. +* Added the ability to disable type validation of service descriptions +* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/vendor/guzzlehttp/guzzle/LICENSE b/vendor/guzzlehttp/guzzle/LICENSE new file mode 100644 index 00000000..ea7f07c5 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2016 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md new file mode 100644 index 00000000..2f614d6f --- /dev/null +++ b/vendor/guzzlehttp/guzzle/README.md @@ -0,0 +1,89 @@ +Guzzle, PHP HTTP client +======================= + +[![Build Status](https://travis-ci.org/guzzle/guzzle.svg?branch=master)](https://travis-ci.org/guzzle/guzzle) + +Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and +trivial to integrate with web services. + +- Simple interface for building query strings, POST requests, streaming large + uploads, streaming large downloads, using HTTP cookies, uploading JSON data, + etc... +- Can send both synchronous and asynchronous requests using the same interface. +- Uses PSR-7 interfaces for requests, responses, and streams. This allows you + to utilize other PSR-7 compatible libraries with Guzzle. +- Abstracts away the underlying HTTP transport, allowing you to write + environment and transport agnostic code; i.e., no hard dependency on cURL, + PHP streams, sockets, or non-blocking event loops. +- Middleware system allows you to augment and compose client behavior. + +```php +$client = new \GuzzleHttp\Client(); +$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); +echo $res->getStatusCode(); +// 200 +echo $res->getHeaderLine('content-type'); +// 'application/json; charset=utf8' +echo $res->getBody(); +// '{"id": 1420053, "name": "guzzle", ...}' + +// Send an asynchronous request. +$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); +$promise = $client->sendAsync($request)->then(function ($response) { + echo 'I completed! ' . $response->getBody(); +}); +$promise->wait(); +``` + +## Help and docs + +- [Documentation](http://guzzlephp.org/) +- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) +- [Gitter](https://gitter.im/guzzle/guzzle) + + +## Installing Guzzle + +The recommended way to install Guzzle is through +[Composer](http://getcomposer.org). + +```bash +# Install Composer +curl -sS https://getcomposer.org/installer | php +``` + +Next, run the Composer command to install the latest stable version of Guzzle: + +```bash +php composer.phar require guzzlehttp/guzzle +``` + +After installing, you need to require Composer's autoloader: + +```php +require 'vendor/autoload.php'; +``` + +You can then later update Guzzle using composer: + + ```bash +composer.phar update + ``` + + +## Version Guidance + +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | +| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | +| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | + +[guzzle-3-repo]: https://github.com/guzzle/guzzle3 +[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x +[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 +[guzzle-6-repo]: https://github.com/guzzle/guzzle +[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/ +[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ +[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md new file mode 100644 index 00000000..91d1dcc9 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -0,0 +1,1203 @@ +Guzzle Upgrade Guide +==================== + +5.0 to 6.0 +---------- + +Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. +Due to the fact that these messages are immutable, this prompted a refactoring +of Guzzle to use a middleware based system rather than an event system. Any +HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be +updated to work with the new immutable PSR-7 request and response objects. Any +event listeners or subscribers need to be updated to become middleware +functions that wrap handlers (or are injected into a +`GuzzleHttp\HandlerStack`). + +- Removed `GuzzleHttp\BatchResults` +- Removed `GuzzleHttp\Collection` +- Removed `GuzzleHttp\HasDataTrait` +- Removed `GuzzleHttp\ToArrayInterface` +- The `guzzlehttp/streams` dependency has been removed. Stream functionality + is now present in the `GuzzleHttp\Psr7` namespace provided by the + `guzzlehttp/psr7` package. +- Guzzle no longer uses ReactPHP promises and now uses the + `guzzlehttp/promises` library. We use a custom promise library for three + significant reasons: + 1. React promises (at the time of writing this) are recursive. Promise + chaining and promise resolution will eventually blow the stack. Guzzle + promises are not recursive as they use a sort of trampolining technique. + Note: there has been movement in the React project to modify promises to + no longer utilize recursion. + 2. Guzzle needs to have the ability to synchronously block on a promise to + wait for a result. Guzzle promises allows this functionality (and does + not require the use of recursion). + 3. Because we need to be able to wait on a result, doing so using React + promises requires wrapping react promises with RingPHP futures. This + overhead is no longer needed, reducing stack sizes, reducing complexity, + and improving performance. +- `GuzzleHttp\Mimetypes` has been moved to a function in + `GuzzleHttp\Psr7\mimetype_from_extension` and + `GuzzleHttp\Psr7\mimetype_from_filename`. +- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query + strings must now be passed into request objects as strings, or provided to + the `query` request option when creating requests with clients. The `query` + option uses PHP's `http_build_query` to convert an array to a string. If you + need a different serialization technique, you will need to pass the query + string in as a string. There are a couple helper functions that will make + working with query strings easier: `GuzzleHttp\Psr7\parse_query` and + `GuzzleHttp\Psr7\build_query`. +- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware + system based on PSR-7, using RingPHP and it's middleware system as well adds + more complexity than the benefits it provides. All HTTP handlers that were + present in RingPHP have been modified to work directly with PSR-7 messages + and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces + complexity in Guzzle, removes a dependency, and improves performance. RingPHP + will be maintained for Guzzle 5 support, but will no longer be a part of + Guzzle 6. +- As Guzzle now uses a middleware based systems the event system and RingPHP + integration has been removed. Note: while the event system has been removed, + it is possible to add your own type of event system that is powered by the + middleware system. + - Removed the `Event` namespace. + - Removed the `Subscriber` namespace. + - Removed `Transaction` class + - Removed `RequestFsm` + - Removed `RingBridge` + - `GuzzleHttp\Subscriber\Cookie` is now provided by + `GuzzleHttp\Middleware::cookies` + - `GuzzleHttp\Subscriber\HttpError` is now provided by + `GuzzleHttp\Middleware::httpError` + - `GuzzleHttp\Subscriber\History` is now provided by + `GuzzleHttp\Middleware::history` + - `GuzzleHttp\Subscriber\Mock` is now provided by + `GuzzleHttp\Handler\MockHandler` + - `GuzzleHttp\Subscriber\Prepare` is now provided by + `GuzzleHttp\PrepareBodyMiddleware` + - `GuzzleHttp\Subscriber\Redirect` is now provided by + `GuzzleHttp\RedirectMiddleware` +- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in + `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. +- Static functions in `GuzzleHttp\Utils` have been moved to namespaced + functions under the `GuzzleHttp` namespace. This requires either a Composer + based autoloader or you to include functions.php. +- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to + `GuzzleHttp\ClientInterface::getConfig`. +- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. +- The `json` and `xml` methods of response objects has been removed. With the + migration to strictly adhering to PSR-7 as the interface for Guzzle messages, + adding methods to message interfaces would actually require Guzzle messages + to extend from PSR-7 messages rather then work with them directly. + +## Migrating to middleware + +The change to PSR-7 unfortunately required significant refactoring to Guzzle +due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event +system from plugins. The event system relied on mutability of HTTP messages and +side effects in order to work. With immutable messages, you have to change your +workflow to become more about either returning a value (e.g., functional +middlewares) or setting a value on an object. Guzzle v6 has chosen the +functional middleware approach. + +Instead of using the event system to listen for things like the `before` event, +you now create a stack based middleware function that intercepts a request on +the way in and the promise of the response on the way out. This is a much +simpler and more predictable approach than the event system and works nicely +with PSR-7 middleware. Due to the use of promises, the middleware system is +also asynchronous. + +v5: + +```php +use GuzzleHttp\Event\BeforeEvent; +$client = new GuzzleHttp\Client(); +// Get the emitter and listen to the before event. +$client->getEmitter()->on('before', function (BeforeEvent $e) { + // Guzzle v5 events relied on mutation + $e->getRequest()->setHeader('X-Foo', 'Bar'); +}); +``` + +v6: + +In v6, you can modify the request before it is sent using the `mapRequest` +middleware. The idiomatic way in v6 to modify the request/response lifecycle is +to setup a handler middleware stack up front and inject the handler into a +client. + +```php +use GuzzleHttp\Middleware; +// Create a handler stack that has all of the default middlewares attached +$handler = GuzzleHttp\HandlerStack::create(); +// Push the handler onto the handler stack +$handler->push(Middleware::mapRequest(function (RequestInterface $request) { + // Notice that we have to return a request object + return $request->withHeader('X-Foo', 'Bar'); +})); +// Inject the handler into the client +$client = new GuzzleHttp\Client(['handler' => $handler]); +``` + +## POST Requests + +This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) +and `multipart` request options. `form_params` is an associative array of +strings or array of strings and is used to serialize an +`application/x-www-form-urlencoded` POST request. The +[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) +option is now used to send a multipart/form-data POST request. + +`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add +POST files to a multipart/form-data request. + +The `body` option no longer accepts an array to send POST requests. Please use +`multipart` or `form_params` instead. + +The `base_url` option has been renamed to `base_uri`. + +4.x to 5.0 +---------- + +## Rewritten Adapter Layer + +Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send +HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor +is still supported, but it has now been renamed to `handler`. Instead of +passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP +`callable` that follows the RingPHP specification. + +## Removed Fluent Interfaces + +[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) +from the following classes: + +- `GuzzleHttp\Collection` +- `GuzzleHttp\Url` +- `GuzzleHttp\Query` +- `GuzzleHttp\Post\PostBody` +- `GuzzleHttp\Cookie\SetCookie` + +## Removed functions.php + +Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following +functions can be used as replacements. + +- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` +- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` +- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` +- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, + deprecated in favor of using `GuzzleHttp\Pool::batch()`. + +The "procedural" global client has been removed with no replacement (e.g., +`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` +object as a replacement. + +## `throwImmediately` has been removed + +The concept of "throwImmediately" has been removed from exceptions and error +events. This control mechanism was used to stop a transfer of concurrent +requests from completing. This can now be handled by throwing the exception or +by cancelling a pool of requests or each outstanding future request +individually. + +## headers event has been removed + +Removed the "headers" event. This event was only useful for changing the +body a response once the headers of the response were known. You can implement +a similar behavior in a number of ways. One example might be to use a +FnStream that has access to the transaction being sent. For example, when the +first byte is written, you could check if the response headers match your +expectations, and if so, change the actual stream body that is being +written to. + +## Updates to HTTP Messages + +Removed the `asArray` parameter from +`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header +value as an array, then use the newly added `getHeaderAsArray()` method of +`MessageInterface`. This change makes the Guzzle interfaces compatible with +the PSR-7 interfaces. + +3.x to 4.0 +---------- + +## Overarching changes: + +- Now requires PHP 5.4 or greater. +- No longer requires cURL to send requests. +- Guzzle no longer wraps every exception it throws. Only exceptions that are + recoverable are now wrapped by Guzzle. +- Various namespaces have been removed or renamed. +- No longer requiring the Symfony EventDispatcher. A custom event dispatcher + based on the Symfony EventDispatcher is + now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant + speed and functionality improvements). + +Changes per Guzzle 3.x namespace are described below. + +## Batch + +The `Guzzle\Batch` namespace has been removed. This is best left to +third-parties to implement on top of Guzzle's core HTTP library. + +## Cache + +The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement +has been implemented yet, but hoping to utilize a PSR cache interface). + +## Common + +- Removed all of the wrapped exceptions. It's better to use the standard PHP + library for unrecoverable exceptions. +- `FromConfigInterface` has been removed. +- `Guzzle\Common\Version` has been removed. The VERSION constant can be found + at `GuzzleHttp\ClientInterface::VERSION`. + +### Collection + +- `getAll` has been removed. Use `toArray` to convert a collection to an array. +- `inject` has been removed. +- `keySearch` has been removed. +- `getPath` no longer supports wildcard expressions. Use something better like + JMESPath for this. +- `setPath` now supports appending to an existing array via the `[]` notation. + +### Events + +Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses +`GuzzleHttp\Event\Emitter`. + +- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by + `GuzzleHttp\Event\EmitterInterface`. +- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by + `GuzzleHttp\Event\Emitter`. +- `Symfony\Component\EventDispatcher\Event` is replaced by + `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in + `GuzzleHttp\Event\EventInterface`. +- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and + `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the + event emitter of a request, client, etc. now uses the `getEmitter` method + rather than the `getDispatcher` method. + +#### Emitter + +- Use the `once()` method to add a listener that automatically removes itself + the first time it is invoked. +- Use the `listeners()` method to retrieve a list of event listeners rather than + the `getListeners()` method. +- Use `emit()` instead of `dispatch()` to emit an event from an emitter. +- Use `attach()` instead of `addSubscriber()` and `detach()` instead of + `removeSubscriber()`. + +```php +$mock = new Mock(); +// 3.x +$request->getEventDispatcher()->addSubscriber($mock); +$request->getEventDispatcher()->removeSubscriber($mock); +// 4.x +$request->getEmitter()->attach($mock); +$request->getEmitter()->detach($mock); +``` + +Use the `on()` method to add a listener rather than the `addListener()` method. + +```php +// 3.x +$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); +// 4.x +$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); +``` + +## Http + +### General changes + +- The cacert.pem certificate has been moved to `src/cacert.pem`. +- Added the concept of adapters that are used to transfer requests over the + wire. +- Simplified the event system. +- Sending requests in parallel is still possible, but batching is no longer a + concept of the HTTP layer. Instead, you must use the `complete` and `error` + events to asynchronously manage parallel request transfers. +- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. +- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. +- QueryAggregators have been rewritten so that they are simply callable + functions. +- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in + `functions.php` for an easy to use static client instance. +- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from + `GuzzleHttp\Exception\TransferException`. + +### Client + +Calling methods like `get()`, `post()`, `head()`, etc. no longer create and +return a request, but rather creates a request, sends the request, and returns +the response. + +```php +// 3.0 +$request = $client->get('/'); +$response = $request->send(); + +// 4.0 +$response = $client->get('/'); + +// or, to mirror the previous behavior +$request = $client->createRequest('GET', '/'); +$response = $client->send($request); +``` + +`GuzzleHttp\ClientInterface` has changed. + +- The `send` method no longer accepts more than one request. Use `sendAll` to + send multiple requests in parallel. +- `setUserAgent()` has been removed. Use a default request option instead. You + could, for example, do something like: + `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. +- `setSslVerification()` has been removed. Use default request options instead, + like `$client->setConfig('defaults/verify', true)`. + +`GuzzleHttp\Client` has changed. + +- The constructor now accepts only an associative array. You can include a + `base_url` string or array to use a URI template as the base URL of a client. + You can also specify a `defaults` key that is an associative array of default + request options. You can pass an `adapter` to use a custom adapter, + `batch_adapter` to use a custom adapter for sending requests in parallel, or + a `message_factory` to change the factory used to create HTTP requests and + responses. +- The client no longer emits a `client.create_request` event. +- Creating requests with a client no longer automatically utilize a URI + template. You must pass an array into a creational method (e.g., + `createRequest`, `get`, `put`, etc.) in order to expand a URI template. + +### Messages + +Messages no longer have references to their counterparts (i.e., a request no +longer has a reference to it's response, and a response no loger has a +reference to its request). This association is now managed through a +`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to +these transaction objects using request events that are emitted over the +lifecycle of a request. + +#### Requests with a body + +- `GuzzleHttp\Message\EntityEnclosingRequest` and + `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The + separation between requests that contain a body and requests that do not + contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` + handles both use cases. +- Any method that previously accepts a `GuzzleHttp\Response` object now accept a + `GuzzleHttp\Message\ResponseInterface`. +- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to + `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create + both requests and responses and is implemented in + `GuzzleHttp\Message\MessageFactory`. +- POST field and file methods have been removed from the request object. You + must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` + to control the format of a POST body. Requests that are created using a + standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use + a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if + the method is POST and no body is provided. + +```php +$request = $client->createRequest('POST', '/'); +$request->getBody()->setField('foo', 'bar'); +$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); +``` + +#### Headers + +- `GuzzleHttp\Message\Header` has been removed. Header values are now simply + represented by an array of values or as a string. Header values are returned + as a string by default when retrieving a header value from a message. You can + pass an optional argument of `true` to retrieve a header value as an array + of strings instead of a single concatenated string. +- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to + `GuzzleHttp\Post`. This interface has been simplified and now allows the + addition of arbitrary headers. +- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most + of the custom headers are now handled separately in specific + subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has + been updated to properly handle headers that contain parameters (like the + `Link` header). + +#### Responses + +- `GuzzleHttp\Message\Response::getInfo()` and + `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event + system to retrieve this type of information. +- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. +- `GuzzleHttp\Message\Response::getMessage()` has been removed. +- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific + methods have moved to the CacheSubscriber. +- Header specific helper functions like `getContentMd5()` have been removed. + Just use `getHeader('Content-MD5')` instead. +- `GuzzleHttp\Message\Response::setRequest()` and + `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event + system to work with request and response objects as a transaction. +- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the + Redirect subscriber instead. +- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have + been removed. Use `getStatusCode()` instead. + +#### Streaming responses + +Streaming requests can now be created by a client directly, returning a +`GuzzleHttp\Message\ResponseInterface` object that contains a body stream +referencing an open PHP HTTP stream. + +```php +// 3.0 +use Guzzle\Stream\PhpStreamRequestFactory; +$request = $client->get('/'); +$factory = new PhpStreamRequestFactory(); +$stream = $factory->fromRequest($request); +$data = $stream->read(1024); + +// 4.0 +$response = $client->get('/', ['stream' => true]); +// Read some data off of the stream in the response body +$data = $response->getBody()->read(1024); +``` + +#### Redirects + +The `configureRedirects()` method has been removed in favor of a +`allow_redirects` request option. + +```php +// Standard redirects with a default of a max of 5 redirects +$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); + +// Strict redirects with a custom number of redirects +$request = $client->createRequest('GET', '/', [ + 'allow_redirects' => ['max' => 5, 'strict' => true] +]); +``` + +#### EntityBody + +EntityBody interfaces and classes have been removed or moved to +`GuzzleHttp\Stream`. All classes and interfaces that once required +`GuzzleHttp\EntityBodyInterface` now require +`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no +longer uses `GuzzleHttp\EntityBody::factory` but now uses +`GuzzleHttp\Stream\Stream::factory` or even better: +`GuzzleHttp\Stream\create()`. + +- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` +- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` +- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` +- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` +- `Guzzle\Http\IoEmittyinEntityBody` has been removed. + +#### Request lifecycle events + +Requests previously submitted a large number of requests. The number of events +emitted over the lifecycle of a request has been significantly reduced to make +it easier to understand how to extend the behavior of a request. All events +emitted during the lifecycle of a request now emit a custom +`GuzzleHttp\Event\EventInterface` object that contains context providing +methods and a way in which to modify the transaction at that specific point in +time (e.g., intercept the request and set a response on the transaction). + +- `request.before_send` has been renamed to `before` and now emits a + `GuzzleHttp\Event\BeforeEvent` +- `request.complete` has been renamed to `complete` and now emits a + `GuzzleHttp\Event\CompleteEvent`. +- `request.sent` has been removed. Use `complete`. +- `request.success` has been removed. Use `complete`. +- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. +- `request.exception` has been removed. Use `error`. +- `request.receive.status_line` has been removed. +- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to + maintain a status update. +- `curl.callback.write` has been removed. Use a custom `StreamInterface` to + intercept writes. +- `curl.callback.read` has been removed. Use a custom `StreamInterface` to + intercept reads. + +`headers` is a new event that is emitted after the response headers of a +request have been received before the body of the response is downloaded. This +event emits a `GuzzleHttp\Event\HeadersEvent`. + +You can intercept a request and inject a response using the `intercept()` event +of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and +`GuzzleHttp\Event\ErrorEvent` event. + +See: http://docs.guzzlephp.org/en/latest/events.html + +## Inflection + +The `Guzzle\Inflection` namespace has been removed. This is not a core concern +of Guzzle. + +## Iterator + +The `Guzzle\Iterator` namespace has been removed. + +- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and + `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of + Guzzle itself. +- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent + class is shipped with PHP 5.4. +- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because + it's easier to just wrap an iterator in a generator that maps values. + +For a replacement of these iterators, see https://github.com/nikic/iter + +## Log + +The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The +`Guzzle\Log` namespace has been removed. Guzzle now relies on +`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been +moved to `GuzzleHttp\Subscriber\Log\Formatter`. + +## Parser + +The `Guzzle\Parser` namespace has been removed. This was previously used to +make it possible to plug in custom parsers for cookies, messages, URI +templates, and URLs; however, this level of complexity is not needed in Guzzle +so it has been removed. + +- Cookie: Cookie parsing logic has been moved to + `GuzzleHttp\Cookie\SetCookie::fromString`. +- Message: Message parsing logic for both requests and responses has been moved + to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only + used in debugging or deserializing messages, so it doesn't make sense for + Guzzle as a library to add this level of complexity to parsing messages. +- UriTemplate: URI template parsing has been moved to + `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL + URI template library if it is installed. +- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously + it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, + then developers are free to subclass `GuzzleHttp\Url`. + +## Plugin + +The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. +Several plugins are shipping with the core Guzzle library under this namespace. + +- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar + code has moved to `GuzzleHttp\Cookie`. +- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. +- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is + received. +- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. +- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before + sending. This subscriber is attached to all requests by default. +- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. + +The following plugins have been removed (third-parties are free to re-implement +these if needed): + +- `GuzzleHttp\Plugin\Async` has been removed. +- `GuzzleHttp\Plugin\CurlAuth` has been removed. +- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This + functionality should instead be implemented with event listeners that occur + after normal response parsing occurs in the guzzle/command package. + +The following plugins are not part of the core Guzzle package, but are provided +in separate repositories: + +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler + to build custom retry policies using simple functions rather than various + chained classes. See: https://github.com/guzzle/retry-subscriber +- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to + https://github.com/guzzle/cache-subscriber +- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to + https://github.com/guzzle/log-subscriber +- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to + https://github.com/guzzle/message-integrity-subscriber +- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to + `GuzzleHttp\Subscriber\MockSubscriber`. +- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to + https://github.com/guzzle/oauth-subscriber + +## Service + +The service description layer of Guzzle has moved into two separate packages: + +- http://github.com/guzzle/command Provides a high level abstraction over web + services by representing web service operations using commands. +- http://github.com/guzzle/guzzle-services Provides an implementation of + guzzle/command that provides request serialization and response parsing using + Guzzle service descriptions. + +## Stream + +Stream have moved to a separate package available at +https://github.com/guzzle/streams. + +`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take +on the responsibilities of `Guzzle\Http\EntityBody` and +`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number +of methods implemented by the `StreamInterface` has been drastically reduced to +allow developers to more easily extend and decorate stream behavior. + +## Removed methods from StreamInterface + +- `getStream` and `setStream` have been removed to better encapsulate streams. +- `getMetadata` and `setMetadata` have been removed in favor of + `GuzzleHttp\Stream\MetadataStreamInterface`. +- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been + removed. This data is accessible when + using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. +- `rewind` has been removed. Use `seek(0)` for a similar behavior. + +## Renamed methods + +- `detachStream` has been renamed to `detach`. +- `feof` has been renamed to `eof`. +- `ftell` has been renamed to `tell`. +- `readLine` has moved from an instance method to a static class method of + `GuzzleHttp\Stream\Stream`. + +## Metadata streams + +`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams +that contain additional metadata accessible via `getMetadata()`. +`GuzzleHttp\Stream\StreamInterface::getMetadata` and +`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. + +## StreamRequestFactory + +The entire concept of the StreamRequestFactory has been removed. The way this +was used in Guzzle 3 broke the actual interface of sending streaming requests +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. + +3.6 to 3.7 +---------- + +### Deprecations + +- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: + +```php +\Guzzle\Common\Version::$emitWarnings = true; +``` + +The following APIs and options have been marked as deprecated: + +- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +- Marked `Guzzle\Common\Collection::inject()` as deprecated. +- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use + `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or + `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` + +3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational +request methods. When paired with a client's configuration settings, these options allow you to specify default settings +for various aspects of a request. Because these options make other previous configuration options redundant, several +configuration options and methods of a client and AbstractCommand have been deprecated. + +- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. +- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. +- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` +- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 + + $command = $client->getCommand('foo', array( + 'command.headers' => array('Test' => '123'), + 'command.response_body' => '/path/to/file' + )); + + // Should be changed to: + + $command = $client->getCommand('foo', array( + 'command.request_options' => array( + 'headers' => array('Test' => '123'), + 'save_as' => '/path/to/file' + ) + )); + +### Interface changes + +Additions and changes (you will need to update any implementations or subclasses you may have created): + +- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +- Added `Guzzle\Stream\StreamInterface::isRepeatable` +- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. + +The following methods were removed from interfaces. All of these methods are still available in the concrete classes +that implement them, but you should update your code to use alternative methods: + +- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or + `$client->setDefaultOption('headers/{header_name}', 'value')`. or + `$client->setDefaultOption('headers', array('header_name' => 'value'))`. +- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. +- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. +- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. +- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. +- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. + +### Cache plugin breaking changes + +- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +- Always setting X-cache headers on cached responses +- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +- Added `CacheStorageInterface::purge($url)` +- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +3.5 to 3.6 +---------- + +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). + For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). + Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Moved getLinks() from Response to just be used on a Link header object. + +If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the +HeaderInterface (e.g. toArray(), getAll(), etc.). + +### Interface changes + +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() + +### Removed deprecated functions + +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). + +### Deprecations + +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. + +### Other changes + +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess + +3.3 to 3.4 +---------- + +Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. + +3.2 to 3.3 +---------- + +### Response::getEtag() quote stripping removed + +`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header + +### Removed `Guzzle\Http\Utils` + +The `Guzzle\Http\Utils` class was removed. This class was only used for testing. + +### Stream wrapper and type + +`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. + +### curl.emit_io became emit_io + +Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the +'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' + +3.1 to 3.2 +---------- + +### CurlMulti is no longer reused globally + +Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added +to a single client can pollute requests dispatched from other clients. + +If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the +ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is +created. + +```php +$multi = new Guzzle\Http\Curl\CurlMulti(); +$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); +$builder->addListener('service_builder.create_client', function ($event) use ($multi) { + $event['client']->setCurlMulti($multi); +} +}); +``` + +### No default path + +URLs no longer have a default path value of '/' if no path was specified. + +Before: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com/ +``` + +After: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com +``` + +### Less verbose BadResponseException + +The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and +response information. You can, however, get access to the request and response object by calling `getRequest()` or +`getResponse()` on the exception object. + +### Query parameter aggregation + +Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a +setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is +responsible for handling the aggregation of multi-valued query string variables into a flattened hash. + +2.8 to 3.x +---------- + +### Guzzle\Service\Inspector + +Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` + +**Before** + +```php +use Guzzle\Service\Inspector; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Inspector::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +**After** + +```php +use Guzzle\Common\Collection; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Collection::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +### Convert XML Service Descriptions to JSON + +**Before** + +```xml + + + + + + Get a list of groups + + + Uses a search query to get a list of groups + + + + Create a group + + + + + Delete a group by ID + + + + + + + Update a group + + + + + + +``` + +**After** + +```json +{ + "name": "Zendesk REST API v2", + "apiVersion": "2012-12-31", + "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", + "operations": { + "list_groups": { + "httpMethod":"GET", + "uri": "groups.json", + "summary": "Get a list of groups" + }, + "search_groups":{ + "httpMethod":"GET", + "uri": "search.json?query=\"{query} type:group\"", + "summary": "Uses a search query to get a list of groups", + "parameters":{ + "query":{ + "location": "uri", + "description":"Zendesk Search Query", + "type": "string", + "required": true + } + } + }, + "create_group": { + "httpMethod":"POST", + "uri": "groups.json", + "summary": "Create a group", + "parameters":{ + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + }, + "delete_group": { + "httpMethod":"DELETE", + "uri": "groups/{id}.json", + "summary": "Delete a group", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to delete by ID", + "type": "integer", + "required": true + } + } + }, + "get_group": { + "httpMethod":"GET", + "uri": "groups/{id}.json", + "summary": "Get a ticket", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to get by ID", + "type": "integer", + "required": true + } + } + }, + "update_group": { + "httpMethod":"PUT", + "uri": "groups/{id}.json", + "summary": "Update a group", + "parameters":{ + "id": { + "location": "uri", + "description":"Group to update by ID", + "type": "integer", + "required": true + }, + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + } +} +``` + +### Guzzle\Service\Description\ServiceDescription + +Commands are now called Operations + +**Before** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getCommands(); // @returns ApiCommandInterface[] +$sd->hasCommand($name); +$sd->getCommand($name); // @returns ApiCommandInterface|null +$sd->addCommand($command); // @param ApiCommandInterface $command +``` + +**After** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getOperations(); // @returns OperationInterface[] +$sd->hasOperation($name); +$sd->getOperation($name); // @returns OperationInterface|null +$sd->addOperation($operation); // @param OperationInterface $operation +``` + +### Guzzle\Common\Inflection\Inflector + +Namespace is now `Guzzle\Inflection\Inflector` + +### Guzzle\Http\Plugin + +Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. + +### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log + +Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. + +**Before** + +```php +use Guzzle\Common\Log\ClosureLogAdapter; +use Guzzle\Http\Plugin\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $verbosity is an integer indicating desired message verbosity level +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); +``` + +**After** + +```php +use Guzzle\Log\ClosureLogAdapter; +use Guzzle\Log\MessageFormatter; +use Guzzle\Plugin\Log\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $format is a string indicating desired message format -- @see MessageFormatter +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); +``` + +### Guzzle\Http\Plugin\CurlAuthPlugin + +Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. + +### Guzzle\Http\Plugin\ExponentialBackoffPlugin + +Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. + +**Before** + +```php +use Guzzle\Http\Plugin\ExponentialBackoffPlugin; + +$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( + ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) + )); + +$client->addSubscriber($backoffPlugin); +``` + +**After** + +```php +use Guzzle\Plugin\Backoff\BackoffPlugin; +use Guzzle\Plugin\Backoff\HttpBackoffStrategy; + +// Use convenient factory method instead -- see implementation for ideas of what +// you can do with chaining backoff strategies +$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( + HttpBackoffStrategy::getDefaultFailureCodes(), array(429) + )); +$client->addSubscriber($backoffPlugin); +``` + +### Known Issues + +#### [BUG] Accept-Encoding header behavior changed unintentionally. + +(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) + +In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to +properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. +See issue #217 for a workaround, or use a version containing the fix. diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json new file mode 100644 index 00000000..65687a58 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -0,0 +1,44 @@ +{ + "name": "guzzlehttp/guzzle", + "type": "library", + "description": "Guzzle is a PHP HTTP client library", + "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], + "homepage": "http://guzzlephp.org/", + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5", + "guzzlehttp/psr7": "^1.4", + "guzzlehttp/promises": "^1.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" + }, + "autoload": { + "files": ["src/functions_include.php"], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\": "tests/" + } + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php new file mode 100644 index 00000000..de4df8a5 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -0,0 +1,414 @@ + 'http://www.foo.com/1.0/', + * 'timeout' => 0, + * 'allow_redirects' => false, + * 'proxy' => '192.168.16.1:10' + * ]); + * + * Client configuration settings include the following options: + * + * - handler: (callable) Function that transfers HTTP requests over the + * wire. The function is called with a Psr7\Http\Message\RequestInterface + * and array of transfer options, and must return a + * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a + * Psr7\Http\Message\ResponseInterface on success. "handler" is a + * constructor only option that cannot be overridden in per/request + * options. If no handler is provided, a default handler will be created + * that enables all of the request options below by attaching all of the + * default middleware to the handler. + * - base_uri: (string|UriInterface) Base URI of the client that is merged + * into relative URIs. Can be a string or instance of UriInterface. + * - **: any request option + * + * @param array $config Client configuration settings. + * + * @see \GuzzleHttp\RequestOptions for a list of available request options. + */ + public function __construct(array $config = []) + { + if (!isset($config['handler'])) { + $config['handler'] = HandlerStack::create(); + } elseif (!is_callable($config['handler'])) { + throw new \InvalidArgumentException('handler must be a callable'); + } + + // Convert the base_uri to a UriInterface + if (isset($config['base_uri'])) { + $config['base_uri'] = Psr7\uri_for($config['base_uri']); + } + + $this->configureDefaults($config); + } + + public function __call($method, $args) + { + if (count($args) < 1) { + throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); + } + + $uri = $args[0]; + $opts = isset($args[1]) ? $args[1] : []; + + return substr($method, -5) === 'Async' + ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) + : $this->request($method, $uri, $opts); + } + + public function sendAsync(RequestInterface $request, array $options = []) + { + // Merge the base URI into the request URI if needed. + $options = $this->prepareDefaults($options); + + return $this->transfer( + $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), + $options + ); + } + + public function send(RequestInterface $request, array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->sendAsync($request, $options)->wait(); + } + + public function requestAsync($method, $uri = '', array $options = []) + { + $options = $this->prepareDefaults($options); + // Remove request modifying parameter because it can be done up-front. + $headers = isset($options['headers']) ? $options['headers'] : []; + $body = isset($options['body']) ? $options['body'] : null; + $version = isset($options['version']) ? $options['version'] : '1.1'; + // Merge the URI into the base URI. + $uri = $this->buildUri($uri, $options); + if (is_array($body)) { + $this->invalidBody(); + } + $request = new Psr7\Request($method, $uri, $headers, $body, $version); + // Remove the option so that they are not doubly-applied. + unset($options['headers'], $options['body'], $options['version']); + + return $this->transfer($request, $options); + } + + public function request($method, $uri = '', array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->requestAsync($method, $uri, $options)->wait(); + } + + public function getConfig($option = null) + { + return $option === null + ? $this->config + : (isset($this->config[$option]) ? $this->config[$option] : null); + } + + private function buildUri($uri, array $config) + { + // for BC we accept null which would otherwise fail in uri_for + $uri = Psr7\uri_for($uri === null ? '' : $uri); + + if (isset($config['base_uri'])) { + $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); + } + + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; + } + + /** + * Configures the default options for a client. + * + * @param array $config + */ + private function configureDefaults(array $config) + { + $defaults = [ + 'allow_redirects' => RedirectMiddleware::$defaultSettings, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false + ]; + + // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. + + // We can only trust the HTTP_PROXY environment variable in a CLI + // process due to the fact that PHP has no reliable mechanism to + // get environment variables that start with "HTTP_". + if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) { + $defaults['proxy']['http'] = getenv('HTTP_PROXY'); + } + + if ($proxy = getenv('HTTPS_PROXY')) { + $defaults['proxy']['https'] = $proxy; + } + + if ($noProxy = getenv('NO_PROXY')) { + $cleanedNoProxy = str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); + } + + $this->config = $config + $defaults; + + if (!empty($config['cookies']) && $config['cookies'] === true) { + $this->config['cookies'] = new CookieJar(); + } + + // Add the default user-agent header. + if (!isset($this->config['headers'])) { + $this->config['headers'] = ['User-Agent' => default_user_agent()]; + } else { + // Add the User-Agent header if one was not already set. + foreach (array_keys($this->config['headers']) as $name) { + if (strtolower($name) === 'user-agent') { + return; + } + } + $this->config['headers']['User-Agent'] = default_user_agent(); + } + } + + /** + * Merges default options into the array. + * + * @param array $options Options to modify by reference + * + * @return array + */ + private function prepareDefaults($options) + { + $defaults = $this->config; + + if (!empty($defaults['headers'])) { + // Default headers are only added if they are not present. + $defaults['_conditional'] = $defaults['headers']; + unset($defaults['headers']); + } + + // Special handling for headers is required as they are added as + // conditional headers and as headers passed to a request ctor. + if (array_key_exists('headers', $options)) { + // Allows default headers to be unset. + if ($options['headers'] === null) { + $defaults['_conditional'] = null; + unset($options['headers']); + } elseif (!is_array($options['headers'])) { + throw new \InvalidArgumentException('headers must be an array'); + } + } + + // Shallow merge defaults underneath options. + $result = $options + $defaults; + + // Remove null values. + foreach ($result as $k => $v) { + if ($v === null) { + unset($result[$k]); + } + } + + return $result; + } + + /** + * Transfers the given request and applies request options. + * + * The URI of the request is not modified and the request options are used + * as-is without merging in default options. + * + * @param RequestInterface $request + * @param array $options + * + * @return Promise\PromiseInterface + */ + private function transfer(RequestInterface $request, array $options) + { + // save_to -> sink + if (isset($options['save_to'])) { + $options['sink'] = $options['save_to']; + unset($options['save_to']); + } + + // exceptions -> http_errors + if (isset($options['exceptions'])) { + $options['http_errors'] = $options['exceptions']; + unset($options['exceptions']); + } + + $request = $this->applyOptions($request, $options); + $handler = $options['handler']; + + try { + return Promise\promise_for($handler($request, $options)); + } catch (\Exception $e) { + return Promise\rejection_for($e); + } + } + + /** + * Applies the array of request options to a request. + * + * @param RequestInterface $request + * @param array $options + * + * @return RequestInterface + */ + private function applyOptions(RequestInterface $request, array &$options) + { + $modify = []; + + if (isset($options['form_params'])) { + if (isset($options['multipart'])) { + throw new \InvalidArgumentException('You cannot use ' + . 'form_params and multipart at the same time. Use the ' + . 'form_params option if you want to send application/' + . 'x-www-form-urlencoded requests, and the multipart ' + . 'option to send multipart/form-data requests.'); + } + $options['body'] = http_build_query($options['form_params'], '', '&'); + unset($options['form_params']); + $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + if (isset($options['multipart'])) { + $options['body'] = new Psr7\MultipartStream($options['multipart']); + unset($options['multipart']); + } + + if (isset($options['json'])) { + $options['body'] = \GuzzleHttp\json_encode($options['json']); + unset($options['json']); + $options['_conditional']['Content-Type'] = 'application/json'; + } + + if (!empty($options['decode_content']) + && $options['decode_content'] !== true + ) { + $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; + } + + if (isset($options['headers'])) { + if (isset($modify['set_headers'])) { + $modify['set_headers'] = $options['headers'] + $modify['set_headers']; + } else { + $modify['set_headers'] = $options['headers']; + } + unset($options['headers']); + } + + if (isset($options['body'])) { + if (is_array($options['body'])) { + $this->invalidBody(); + } + $modify['body'] = Psr7\stream_for($options['body']); + unset($options['body']); + } + + if (!empty($options['auth']) && is_array($options['auth'])) { + $value = $options['auth']; + $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; + switch ($type) { + case 'basic': + $modify['set_headers']['Authorization'] = 'Basic ' + . base64_encode("$value[0]:$value[1]"); + break; + case 'digest': + // @todo: Do not rely on curl + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + case 'ntlm': + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + } + } + + if (isset($options['query'])) { + $value = $options['query']; + if (is_array($value)) { + $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); + } + if (!is_string($value)) { + throw new \InvalidArgumentException('query must be a string or array'); + } + $modify['query'] = $value; + unset($options['query']); + } + + // Ensure that sink is not an invalid value. + if (isset($options['sink'])) { + // TODO: Add more sink validation? + if (is_bool($options['sink'])) { + throw new \InvalidArgumentException('sink must not be a boolean'); + } + } + + $request = Psr7\modify_request($request, $modify); + if ($request->getBody() instanceof Psr7\MultipartStream) { + // Use a multipart/form-data POST if a Content-Type is not set. + $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' + . $request->getBody()->getBoundary(); + } + + // Merge in conditional headers if they are not present. + if (isset($options['_conditional'])) { + // Build up the changes so it's in a single clone of the message. + $modify = []; + foreach ($options['_conditional'] as $k => $v) { + if (!$request->hasHeader($k)) { + $modify['set_headers'][$k] = $v; + } + } + $request = Psr7\modify_request($request, $modify); + // Don't pass this internal value along to middleware/handlers. + unset($options['_conditional']); + } + + return $request; + } + + private function invalidBody() + { + throw new \InvalidArgumentException('Passing in the "body" request ' + . 'option as an array to send a POST request has been deprecated. ' + . 'Please use the "form_params" request option to send a ' + . 'application/x-www-form-urlencoded request, or the "multipart" ' + . 'request option to send a multipart/form-data request.'); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php new file mode 100644 index 00000000..5a67b66b --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -0,0 +1,84 @@ +strictMode = $strictMode; + + foreach ($cookieArray as $cookie) { + if (!($cookie instanceof SetCookie)) { + $cookie = new SetCookie($cookie); + } + $this->setCookie($cookie); + } + } + + /** + * Create a new Cookie jar from an associative array and domain. + * + * @param array $cookies Cookies to create the jar from + * @param string $domain Domain to set the cookies to + * + * @return self + */ + public static function fromArray(array $cookies, $domain) + { + $cookieJar = new self(); + foreach ($cookies as $name => $value) { + $cookieJar->setCookie(new SetCookie([ + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true + ])); + } + + return $cookieJar; + } + + /** + * @deprecated + */ + public static function getCookieValue($value) + { + return $value; + } + + /** + * Evaluate if this cookie should be persisted to storage + * that survives between requests. + * + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + * @return bool + */ + public static function shouldPersist( + SetCookie $cookie, + $allowSessionCookies = false + ) { + if ($cookie->getExpires() || $allowSessionCookies) { + if (!$cookie->getDiscard()) { + return true; + } + } + + return false; + } + + /** + * Finds and returns the cookie based on the name + * + * @param string $name cookie name to search for + * @return SetCookie|null cookie that was found or null if not found + */ + public function getCookieByName($name) + { + // don't allow a null name + if($name === null) { + return null; + } + foreach($this->cookies as $cookie) { + if($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) { + return $cookie; + } + } + } + + public function toArray() + { + return array_map(function (SetCookie $cookie) { + return $cookie->toArray(); + }, $this->getIterator()->getArrayCopy()); + } + + public function clear($domain = null, $path = null, $name = null) + { + if (!$domain) { + $this->cookies = []; + return; + } elseif (!$path) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain) { + return !$cookie->matchesDomain($domain); + } + ); + } elseif (!$name) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain) { + return !($cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } else { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain, $name) { + return !($cookie->getName() == $name && + $cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } + } + + public function clearSessionCookies() + { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) { + return !$cookie->getDiscard() && $cookie->getExpires(); + } + ); + } + + public function setCookie(SetCookie $cookie) + { + // If the name string is empty (but not 0), ignore the set-cookie + // string entirely. + $name = $cookie->getName(); + if (!$name && $name !== '0') { + return false; + } + + // Only allow cookies with set and valid domain, name, value + $result = $cookie->validate(); + if ($result !== true) { + if ($this->strictMode) { + throw new \RuntimeException('Invalid cookie: ' . $result); + } else { + $this->removeCookieIfEmpty($cookie); + return false; + } + } + + // Resolve conflicts with previously set cookies + foreach ($this->cookies as $i => $c) { + + // Two cookies are identical, when their path, and domain are + // identical. + if ($c->getPath() != $cookie->getPath() || + $c->getDomain() != $cookie->getDomain() || + $c->getName() != $cookie->getName() + ) { + continue; + } + + // The previously set cookie is a discard cookie and this one is + // not so allow the new cookie to be set + if (!$cookie->getDiscard() && $c->getDiscard()) { + unset($this->cookies[$i]); + continue; + } + + // If the new cookie's expiration is further into the future, then + // replace the old cookie + if ($cookie->getExpires() > $c->getExpires()) { + unset($this->cookies[$i]); + continue; + } + + // If the value has changed, we better change it + if ($cookie->getValue() !== $c->getValue()) { + unset($this->cookies[$i]); + continue; + } + + // The cookie exists, so no need to continue + return false; + } + + $this->cookies[] = $cookie; + + return true; + } + + public function count() + { + return count($this->cookies); + } + + public function getIterator() + { + return new \ArrayIterator(array_values($this->cookies)); + } + + public function extractCookies( + RequestInterface $request, + ResponseInterface $response + ) { + if ($cookieHeader = $response->getHeader('Set-Cookie')) { + foreach ($cookieHeader as $cookie) { + $sc = SetCookie::fromString($cookie); + if (!$sc->getDomain()) { + $sc->setDomain($request->getUri()->getHost()); + } + if (0 !== strpos($sc->getPath(), '/')) { + $sc->setPath($this->getCookiePathFromRequest($request)); + } + $this->setCookie($sc); + } + } + } + + /** + * Computes cookie path following RFC 6265 section 5.1.4 + * + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * + * @param RequestInterface $request + * @return string + */ + private function getCookiePathFromRequest(RequestInterface $request) + { + $uriPath = $request->getUri()->getPath(); + if ('' === $uriPath) { + return '/'; + } + if (0 !== strpos($uriPath, '/')) { + return '/'; + } + if ('/' === $uriPath) { + return '/'; + } + if (0 === $lastSlashPos = strrpos($uriPath, '/')) { + return '/'; + } + + return substr($uriPath, 0, $lastSlashPos); + } + + public function withCookieHeader(RequestInterface $request) + { + $values = []; + $uri = $request->getUri(); + $scheme = $uri->getScheme(); + $host = $uri->getHost(); + $path = $uri->getPath() ?: '/'; + + foreach ($this->cookies as $cookie) { + if ($cookie->matchesPath($path) && + $cookie->matchesDomain($host) && + !$cookie->isExpired() && + (!$cookie->getSecure() || $scheme === 'https') + ) { + $values[] = $cookie->getName() . '=' + . $cookie->getValue(); + } + } + + return $values + ? $request->withHeader('Cookie', implode('; ', $values)) + : $request; + } + + /** + * If a cookie already exists and the server asks to set it again with a + * null value, the cookie must be deleted. + * + * @param SetCookie $cookie + */ + private function removeCookieIfEmpty(SetCookie $cookie) + { + $cookieValue = $cookie->getValue(); + if ($cookieValue === null || $cookieValue === '') { + $this->clear( + $cookie->getDomain(), + $cookie->getPath(), + $cookie->getName() + ); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php new file mode 100644 index 00000000..2cf298a8 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -0,0 +1,84 @@ +filename = $cookieFile; + $this->storeSessionCookies = $storeSessionCookies; + + if (file_exists($cookieFile)) { + $this->load($cookieFile); + } + } + + /** + * Saves the file when shutting down + */ + public function __destruct() + { + $this->save($this->filename); + } + + /** + * Saves the cookies to a file. + * + * @param string $filename File to save + * @throws \RuntimeException if the file cannot be found or created + */ + public function save($filename) + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $jsonStr = \GuzzleHttp\json_encode($json); + if (false === file_put_contents($filename, $jsonStr)) { + throw new \RuntimeException("Unable to save file {$filename}"); + } + } + + /** + * Load cookies from a JSON formatted file. + * + * Old cookies are kept unless overwritten by newly loaded ones. + * + * @param string $filename Cookie file to load. + * @throws \RuntimeException if the file cannot be loaded. + */ + public function load($filename) + { + $json = file_get_contents($filename); + if (false === $json) { + throw new \RuntimeException("Unable to load file {$filename}"); + } elseif ($json === '') { + return; + } + + $data = \GuzzleHttp\json_decode($json, true); + if (is_array($data)) { + foreach (json_decode($json, true) as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie file: {$filename}"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php new file mode 100644 index 00000000..e4bfafd4 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -0,0 +1,71 @@ +sessionKey = $sessionKey; + $this->storeSessionCookies = $storeSessionCookies; + $this->load(); + } + + /** + * Saves cookies to session when shutting down + */ + public function __destruct() + { + $this->save(); + } + + /** + * Save cookies to the client session + */ + public function save() + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $_SESSION[$this->sessionKey] = json_encode($json); + } + + /** + * Load the contents of the client session into the data array + */ + protected function load() + { + if (!isset($_SESSION[$this->sessionKey])) { + return; + } + $data = json_decode($_SESSION[$this->sessionKey], true); + if (is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie data"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new file mode 100644 index 00000000..c911e2a3 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -0,0 +1,404 @@ + null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false + ]; + + /** @var array Cookie data */ + private $data; + + /** + * Create a new SetCookie object from a string + * + * @param string $cookie Set-Cookie header string + * + * @return self + */ + public static function fromString($cookie) + { + // Create the default return array + $data = self::$defaults; + // Explode the cookie string using a series of semicolons + $pieces = array_filter(array_map('trim', explode(';', $cookie))); + // The name of the cookie (first kvp) must include an equal sign. + if (empty($pieces) || !strpos($pieces[0], '=')) { + return new self($data); + } + + // Add the cookie pieces into the parsed data array + foreach ($pieces as $part) { + + $cookieParts = explode('=', $part, 2); + $key = trim($cookieParts[0]); + $value = isset($cookieParts[1]) + ? trim($cookieParts[1], " \n\r\t\0\x0B") + : true; + + // Only check for non-cookies when cookies have been found + if (empty($data['Name'])) { + $data['Name'] = $key; + $data['Value'] = $value; + } else { + foreach (array_keys(self::$defaults) as $search) { + if (!strcasecmp($search, $key)) { + $data[$search] = $value; + continue 2; + } + } + $data[$key] = $value; + } + } + + return new self($data); + } + + /** + * @param array $data Array of cookie data provided by a Cookie parser + */ + public function __construct(array $data = []) + { + $this->data = array_replace(self::$defaults, $data); + // Extract the Expires value and turn it into a UNIX timestamp if needed + if (!$this->getExpires() && $this->getMaxAge()) { + // Calculate the Expires date + $this->setExpires(time() + $this->getMaxAge()); + } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { + $this->setExpires($this->getExpires()); + } + } + + public function __toString() + { + $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; + foreach ($this->data as $k => $v) { + if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { + if ($k === 'Expires') { + $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; + } else { + $str .= ($v === true ? $k : "{$k}={$v}") . '; '; + } + } + } + + return rtrim($str, '; '); + } + + public function toArray() + { + return $this->data; + } + + /** + * Get the cookie name + * + * @return string + */ + public function getName() + { + return $this->data['Name']; + } + + /** + * Set the cookie name + * + * @param string $name Cookie name + */ + public function setName($name) + { + $this->data['Name'] = $name; + } + + /** + * Get the cookie value + * + * @return string + */ + public function getValue() + { + return $this->data['Value']; + } + + /** + * Set the cookie value + * + * @param string $value Cookie value + */ + public function setValue($value) + { + $this->data['Value'] = $value; + } + + /** + * Get the domain + * + * @return string|null + */ + public function getDomain() + { + return $this->data['Domain']; + } + + /** + * Set the domain of the cookie + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->data['Domain'] = $domain; + } + + /** + * Get the path + * + * @return string + */ + public function getPath() + { + return $this->data['Path']; + } + + /** + * Set the path of the cookie + * + * @param string $path Path of the cookie + */ + public function setPath($path) + { + $this->data['Path'] = $path; + } + + /** + * Maximum lifetime of the cookie in seconds + * + * @return int|null + */ + public function getMaxAge() + { + return $this->data['Max-Age']; + } + + /** + * Set the max-age of the cookie + * + * @param int $maxAge Max age of the cookie in seconds + */ + public function setMaxAge($maxAge) + { + $this->data['Max-Age'] = $maxAge; + } + + /** + * The UNIX timestamp when the cookie Expires + * + * @return mixed + */ + public function getExpires() + { + return $this->data['Expires']; + } + + /** + * Set the unix timestamp for which the cookie will expire + * + * @param int $timestamp Unix timestamp + */ + public function setExpires($timestamp) + { + $this->data['Expires'] = is_numeric($timestamp) + ? (int) $timestamp + : strtotime($timestamp); + } + + /** + * Get whether or not this is a secure cookie + * + * @return null|bool + */ + public function getSecure() + { + return $this->data['Secure']; + } + + /** + * Set whether or not the cookie is secure + * + * @param bool $secure Set to true or false if secure + */ + public function setSecure($secure) + { + $this->data['Secure'] = $secure; + } + + /** + * Get whether or not this is a session cookie + * + * @return null|bool + */ + public function getDiscard() + { + return $this->data['Discard']; + } + + /** + * Set whether or not this is a session cookie + * + * @param bool $discard Set to true or false if this is a session cookie + */ + public function setDiscard($discard) + { + $this->data['Discard'] = $discard; + } + + /** + * Get whether or not this is an HTTP only cookie + * + * @return bool + */ + public function getHttpOnly() + { + return $this->data['HttpOnly']; + } + + /** + * Set whether or not this is an HTTP only cookie + * + * @param bool $httpOnly Set to true or false if this is HTTP only + */ + public function setHttpOnly($httpOnly) + { + $this->data['HttpOnly'] = $httpOnly; + } + + /** + * Check if the cookie matches a path value. + * + * A request-path path-matches a given cookie-path if at least one of + * the following conditions holds: + * + * - The cookie-path and the request-path are identical. + * - The cookie-path is a prefix of the request-path, and the last + * character of the cookie-path is %x2F ("/"). + * - The cookie-path is a prefix of the request-path, and the first + * character of the request-path that is not included in the cookie- + * path is a %x2F ("/") character. + * + * @param string $requestPath Path to check against + * + * @return bool + */ + public function matchesPath($requestPath) + { + $cookiePath = $this->getPath(); + + // Match on exact matches or when path is the default empty "/" + if ($cookiePath === '/' || $cookiePath == $requestPath) { + return true; + } + + // Ensure that the cookie-path is a prefix of the request path. + if (0 !== strpos($requestPath, $cookiePath)) { + return false; + } + + // Match if the last character of the cookie-path is "/" + if (substr($cookiePath, -1, 1) === '/') { + return true; + } + + // Match if the first character not included in cookie path is "/" + return substr($requestPath, strlen($cookiePath), 1) === '/'; + } + + /** + * Check if the cookie matches a domain value + * + * @param string $domain Domain to check against + * + * @return bool + */ + public function matchesDomain($domain) + { + // Remove the leading '.' as per spec in RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.2.3 + $cookieDomain = ltrim($this->getDomain(), '.'); + + // Domain not set or exact match. + if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { + return true; + } + + // Matching the subdomain according to RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.1.3 + if (filter_var($domain, FILTER_VALIDATE_IP)) { + return false; + } + + return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/', $domain); + } + + /** + * Check if the cookie is expired + * + * @return bool + */ + public function isExpired() + { + return $this->getExpires() && time() > $this->getExpires(); + } + + /** + * Check if the cookie is valid according to RFC 6265 + * + * @return bool|string Returns true if valid or an error message if invalid + */ + public function validate() + { + // Names must not be empty, but can be 0 + $name = $this->getName(); + if (empty($name) && !is_numeric($name)) { + return 'The cookie name must not be empty'; + } + + // Check if any of the invalid characters are present in the cookie name + if (preg_match( + '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', + $name) + ) { + return 'Cookie name must not contain invalid characters: ASCII ' + . 'Control characters (0-31;127), space, tab and the ' + . 'following characters: ()<>@,;:\"/?={}'; + } + + // Value must not be empty, but can be 0 + $value = $this->getValue(); + if (empty($value) && !is_numeric($value)) { + return 'The cookie value must not be empty'; + } + + // Domains must not be empty, but can be 0 + // A "0" is not a valid internet domain, but may be used as server name + // in a private network. + $domain = $this->getDomain(); + if (empty($domain) && !is_numeric($domain)) { + return 'The cookie domain must not be empty'; + } + + return true; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php new file mode 100644 index 00000000..427d896f --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -0,0 +1,27 @@ +getStatusCode() + : 0; + parent::__construct($message, $code, $previous); + $this->request = $request; + $this->response = $response; + $this->handlerContext = $handlerContext; + } + + /** + * Wrap non-RequestExceptions with a RequestException + * + * @param RequestInterface $request + * @param \Exception $e + * + * @return RequestException + */ + public static function wrapException(RequestInterface $request, \Exception $e) + { + return $e instanceof RequestException + ? $e + : new RequestException($e->getMessage(), $request, null, $e); + } + + /** + * Factory method to create a new exception with a normalized error message + * + * @param RequestInterface $request Request + * @param ResponseInterface $response Response received + * @param \Exception $previous Previous exception + * @param array $ctx Optional handler context. + * + * @return self + */ + public static function create( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $previous = null, + array $ctx = [] + ) { + if (!$response) { + return new self( + 'Error completing request', + $request, + null, + $previous, + $ctx + ); + } + + $level = (int) floor($response->getStatusCode() / 100); + if ($level === 4) { + $label = 'Client error'; + $className = ClientException::class; + } elseif ($level === 5) { + $label = 'Server error'; + $className = ServerException::class; + } else { + $label = 'Unsuccessful request'; + $className = __CLASS__; + } + + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); + + // Client Error: `GET /` resulted in a `404 Not Found` response: + // ... (truncated) + $message = sprintf( + '%s: `%s %s` resulted in a `%s %s` response', + $label, + $request->getMethod(), + $uri, + $response->getStatusCode(), + $response->getReasonPhrase() + ); + + $summary = static::getResponseBodySummary($response); + + if ($summary !== null) { + $message .= ":\n{$summary}\n"; + } + + return new $className($message, $request, $response, $previous, $ctx); + } + + /** + * Get a short summary of the response + * + * Will return `null` if the response is not printable. + * + * @param ResponseInterface $response + * + * @return string|null + */ + public static function getResponseBodySummary(ResponseInterface $response) + { + $body = $response->getBody(); + + if (!$body->isSeekable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read(120); + $body->rewind(); + + if ($size > 120) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; + } + + /** + * Obfuscates URI if there is an username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri($uri) + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = strpos($userInfo, ':'))) { + return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); + } + + return $uri; + } + + /** + * Get the request that caused the exception + * + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Get the associated response + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Check if a response was received + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + * + * @return array + */ + public function getHandlerContext() + { + return $this->handlerContext; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php new file mode 100644 index 00000000..a77c2892 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @@ -0,0 +1,27 @@ +stream = $stream; + $msg = $msg ?: 'Could not seek the stream to position ' . $pos; + parent::__construct($msg); + } + + /** + * @return StreamInterface + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php new file mode 100644 index 00000000..7cdd3408 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -0,0 +1,7 @@ +maxHandles = $maxHandles; + } + + public function create(RequestInterface $request, array $options) + { + if (isset($options['curl']['body_as_string'])) { + $options['_body_as_string'] = $options['curl']['body_as_string']; + unset($options['curl']['body_as_string']); + } + + $easy = new EasyHandle; + $easy->request = $request; + $easy->options = $options; + $conf = $this->getDefaultConf($easy); + $this->applyMethod($easy, $conf); + $this->applyHandlerOptions($easy, $conf); + $this->applyHeaders($easy, $conf); + unset($conf['_headers']); + + // Add handler options from the request configuration options + if (isset($options['curl'])) { + $conf = array_replace($conf, $options['curl']); + } + + $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles + ? array_pop($this->handles) + : curl_init(); + curl_setopt_array($easy->handle, $conf); + + return $easy; + } + + public function release(EasyHandle $easy) + { + $resource = $easy->handle; + unset($easy->handle); + + if (count($this->handles) >= $this->maxHandles) { + curl_close($resource); + } else { + // Remove all callback functions as they can hold onto references + // and are not cleaned up by curl_reset. Using curl_setopt_array + // does not work for some reason, so removing each one + // individually. + curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); + curl_setopt($resource, CURLOPT_READFUNCTION, null); + curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); + curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); + curl_reset($resource); + $this->handles[] = $resource; + } + } + + /** + * Completes a cURL transaction, either returning a response promise or a + * rejected promise. + * + * @param callable $handler + * @param EasyHandle $easy + * @param CurlFactoryInterface $factory Dictates how the handle is released + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public static function finish( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + if (isset($easy->options['on_stats'])) { + self::invokeStats($easy); + } + + if (!$easy->response || $easy->errno) { + return self::finishError($handler, $easy, $factory); + } + + // Return the response if it is present and there is no error. + $factory->release($easy); + + // Rewind the body of the response if possible. + $body = $easy->response->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + + return new FulfilledPromise($easy->response); + } + + private static function invokeStats(EasyHandle $easy) + { + $curlStats = curl_getinfo($easy->handle); + $stats = new TransferStats( + $easy->request, + $easy->response, + $curlStats['total_time'], + $easy->errno, + $curlStats + ); + call_user_func($easy->options['on_stats'], $stats); + } + + private static function finishError( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + // Get error information and release the handle to the factory. + $ctx = [ + 'errno' => $easy->errno, + 'error' => curl_error($easy->handle), + ] + curl_getinfo($easy->handle); + $factory->release($easy); + + // Retry when nothing is present or when curl failed to rewind. + if (empty($easy->options['_err_message']) + && (!$easy->errno || $easy->errno == 65) + ) { + return self::retryFailedRewind($handler, $easy, $ctx); + } + + return self::createRejection($easy, $ctx); + } + + private static function createRejection(EasyHandle $easy, array $ctx) + { + static $connectionErrors = [ + CURLE_OPERATION_TIMEOUTED => true, + CURLE_COULDNT_RESOLVE_HOST => true, + CURLE_COULDNT_CONNECT => true, + CURLE_SSL_CONNECT_ERROR => true, + CURLE_GOT_NOTHING => true, + ]; + + // If an exception was encountered during the onHeaders event, then + // return a rejected promise that wraps that exception. + if ($easy->onHeadersException) { + return \GuzzleHttp\Promise\rejection_for( + new RequestException( + 'An error was encountered during the on_headers event', + $easy->request, + $easy->response, + $easy->onHeadersException, + $ctx + ) + ); + } + + $message = sprintf( + 'cURL error %s: %s (%s)', + $ctx['errno'], + $ctx['error'], + 'see http://curl.haxx.se/libcurl/c/libcurl-errors.html' + ); + + // Create a connection exception if it was a specific error code. + $error = isset($connectionErrors[$easy->errno]) + ? new ConnectException($message, $easy->request, null, $ctx) + : new RequestException($message, $easy->request, $easy->response, null, $ctx); + + return \GuzzleHttp\Promise\rejection_for($error); + } + + private function getDefaultConf(EasyHandle $easy) + { + $conf = [ + '_headers' => $easy->request->getHeaders(), + CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + CURLOPT_RETURNTRANSFER => false, + CURLOPT_HEADER => false, + CURLOPT_CONNECTTIMEOUT => 150, + ]; + + if (defined('CURLOPT_PROTOCOLS')) { + $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; + } + + $version = $easy->request->getProtocolVersion(); + if ($version == 1.1) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; + } elseif ($version == 2.0) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; + } else { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; + } + + return $conf; + } + + private function applyMethod(EasyHandle $easy, array &$conf) + { + $body = $easy->request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size > 0) { + $this->applyBody($easy->request, $easy->options, $conf); + return; + } + + $method = $easy->request->getMethod(); + if ($method === 'PUT' || $method === 'POST') { + // See http://tools.ietf.org/html/rfc7230#section-3.3.2 + if (!$easy->request->hasHeader('Content-Length')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + } + } elseif ($method === 'HEAD') { + $conf[CURLOPT_NOBODY] = true; + unset( + $conf[CURLOPT_WRITEFUNCTION], + $conf[CURLOPT_READFUNCTION], + $conf[CURLOPT_FILE], + $conf[CURLOPT_INFILE] + ); + } + } + + private function applyBody(RequestInterface $request, array $options, array &$conf) + { + $size = $request->hasHeader('Content-Length') + ? (int) $request->getHeaderLine('Content-Length') + : null; + + // Send the body as a string if the size is less than 1MB OR if the + // [curl][body_as_string] request value is set. + if (($size !== null && $size < 1000000) || + !empty($options['_body_as_string']) + ) { + $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); + // Don't duplicate the Content-Length header + $this->removeHeader('Content-Length', $conf); + $this->removeHeader('Transfer-Encoding', $conf); + } else { + $conf[CURLOPT_UPLOAD] = true; + if ($size !== null) { + $conf[CURLOPT_INFILESIZE] = $size; + $this->removeHeader('Content-Length', $conf); + } + $body = $request->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { + return $body->read($length); + }; + } + + // If the Expect header is not present, prevent curl from adding it + if (!$request->hasHeader('Expect')) { + $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; + } + + // cURL sometimes adds a content-type by default. Prevent this. + if (!$request->hasHeader('Content-Type')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; + } + } + + private function applyHeaders(EasyHandle $easy, array &$conf) + { + foreach ($conf['_headers'] as $name => $values) { + foreach ($values as $value) { + $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; + } + } + + // Remove the Accept header if one was not set + if (!$easy->request->hasHeader('Accept')) { + $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; + } + } + + /** + * Remove a header from the options array. + * + * @param string $name Case-insensitive header to remove + * @param array $options Array of options to modify + */ + private function removeHeader($name, array &$options) + { + foreach (array_keys($options['_headers']) as $key) { + if (!strcasecmp($key, $name)) { + unset($options['_headers'][$key]); + return; + } + } + } + + private function applyHandlerOptions(EasyHandle $easy, array &$conf) + { + $options = $easy->options; + if (isset($options['verify'])) { + if ($options['verify'] === false) { + unset($conf[CURLOPT_CAINFO]); + $conf[CURLOPT_SSL_VERIFYHOST] = 0; + $conf[CURLOPT_SSL_VERIFYPEER] = false; + } else { + $conf[CURLOPT_SSL_VERIFYHOST] = 2; + $conf[CURLOPT_SSL_VERIFYPEER] = true; + if (is_string($options['verify'])) { + // Throw an error if the file/folder/link path is not valid or doesn't exist. + if (!file_exists($options['verify'])) { + throw new \InvalidArgumentException( + "SSL CA bundle not found: {$options['verify']}" + ); + } + // If it's a directory or a link to a directory use CURLOPT_CAPATH. + // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. + if (is_dir($options['verify']) || + (is_link($options['verify']) && is_dir(readlink($options['verify'])))) { + $conf[CURLOPT_CAPATH] = $options['verify']; + } else { + $conf[CURLOPT_CAINFO] = $options['verify']; + } + } + } + } + + if (!empty($options['decode_content'])) { + $accept = $easy->request->getHeaderLine('Accept-Encoding'); + if ($accept) { + $conf[CURLOPT_ENCODING] = $accept; + } else { + $conf[CURLOPT_ENCODING] = ''; + // Don't let curl send the header over the wire + $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + } + } + + if (isset($options['sink'])) { + $sink = $options['sink']; + if (!is_string($sink)) { + $sink = \GuzzleHttp\Psr7\stream_for($sink); + } elseif (!is_dir(dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(sprintf( + 'Directory %s does not exist for sink value of %s', + dirname($sink), + $sink + )); + } else { + $sink = new LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { + return $sink->write($write); + }; + } else { + // Use a default temp stream if no sink was set. + $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); + $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); + } + $timeoutRequiresNoSignal = false; + if (isset($options['timeout'])) { + $timeoutRequiresNoSignal |= $options['timeout'] < 1; + $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + } + + // CURL default value is CURL_IPRESOLVE_WHATEVER + if (isset($options['force_ip_resolve'])) { + if ('v4' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; + } else if ('v6' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6; + } + } + + if (isset($options['connect_timeout'])) { + $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; + $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + } + + if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { + $conf[CURLOPT_NOSIGNAL] = true; + } + + if (isset($options['proxy'])) { + if (!is_array($options['proxy'])) { + $conf[CURLOPT_PROXY] = $options['proxy']; + } else { + $scheme = $easy->request->getUri()->getScheme(); + if (isset($options['proxy'][$scheme])) { + $host = $easy->request->getUri()->getHost(); + if (!isset($options['proxy']['no']) || + !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) + ) { + $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; + } + } + } + } + + if (isset($options['cert'])) { + $cert = $options['cert']; + if (is_array($cert)) { + $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; + $cert = $cert[0]; + } + if (!file_exists($cert)) { + throw new \InvalidArgumentException( + "SSL certificate not found: {$cert}" + ); + } + $conf[CURLOPT_SSLCERT] = $cert; + } + + if (isset($options['ssl_key'])) { + $sslKey = $options['ssl_key']; + if (is_array($sslKey)) { + $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1]; + $sslKey = $sslKey[0]; + } + if (!file_exists($sslKey)) { + throw new \InvalidArgumentException( + "SSL private key not found: {$sslKey}" + ); + } + $conf[CURLOPT_SSLKEY] = $sslKey; + } + + if (isset($options['progress'])) { + $progress = $options['progress']; + if (!is_callable($progress)) { + throw new \InvalidArgumentException( + 'progress client option must be callable' + ); + } + $conf[CURLOPT_NOPROGRESS] = false; + $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { + $args = func_get_args(); + // PHP 5.5 pushed the handle onto the start of the args + if (is_resource($args[0])) { + array_shift($args); + } + call_user_func_array($progress, $args); + }; + } + + if (!empty($options['debug'])) { + $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']); + $conf[CURLOPT_VERBOSE] = true; + } + } + + /** + * This function ensures that a response was set on a transaction. If one + * was not set, then the request is retried if possible. This error + * typically means you are sending a payload, curl encountered a + * "Connection died, retrying a fresh connect" error, tried to rewind the + * stream, and then encountered a "necessary data rewind wasn't possible" + * error, causing the request to be sent through curl_multi_info_read() + * without an error status. + */ + private static function retryFailedRewind( + callable $handler, + EasyHandle $easy, + array $ctx + ) { + try { + // Only rewind if the body has been read from. + $body = $easy->request->getBody(); + if ($body->tell() > 0) { + $body->rewind(); + } + } catch (\RuntimeException $e) { + $ctx['error'] = 'The connection unexpectedly failed without ' + . 'providing an error. The request would have been retried, ' + . 'but attempting to rewind the request body failed. ' + . 'Exception: ' . $e; + return self::createRejection($easy, $ctx); + } + + // Retry no more than 3 times before giving up. + if (!isset($easy->options['_curl_retries'])) { + $easy->options['_curl_retries'] = 1; + } elseif ($easy->options['_curl_retries'] == 2) { + $ctx['error'] = 'The cURL request was retried 3 times ' + . 'and did not succeed. The most likely reason for the failure ' + . 'is that cURL was unable to rewind the body of the request ' + . 'and subsequent retries resulted in the same error. Turn on ' + . 'the debug option to see what went wrong. See ' + . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); + } else { + $easy->options['_curl_retries']++; + } + + return $handler($easy->request, $easy->options); + } + + private function createHeaderFn(EasyHandle $easy) + { + if (isset($easy->options['on_headers'])) { + $onHeaders = $easy->options['on_headers']; + + if (!is_callable($onHeaders)) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + } else { + $onHeaders = null; + } + + return function ($ch, $h) use ( + $onHeaders, + $easy, + &$startingResponse + ) { + $value = trim($h); + if ($value === '') { + $startingResponse = true; + $easy->createResponse(); + if ($onHeaders !== null) { + try { + $onHeaders($easy->response); + } catch (\Exception $e) { + // Associate the exception with the handle and trigger + // a curl header write error by returning 0. + $easy->onHeadersException = $e; + return -1; + } + } + } elseif ($startingResponse) { + $startingResponse = false; + $easy->headers = [$value]; + } else { + $easy->headers[] = $value; + } + return strlen($h); + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php new file mode 100644 index 00000000..b0fc2368 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -0,0 +1,27 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] + : new CurlFactory(3); + } + + public function __invoke(RequestInterface $request, array $options) + { + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $easy = $this->factory->create($request, $options); + curl_exec($easy->handle); + $easy->errno = curl_errno($easy->handle); + + return CurlFactory::finish($this, $easy, $this->factory); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php new file mode 100644 index 00000000..945d06ee --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -0,0 +1,197 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] : new CurlFactory(50); + $this->selectTimeout = isset($options['select_timeout']) + ? $options['select_timeout'] : 1; + } + + public function __get($name) + { + if ($name === '_mh') { + return $this->_mh = curl_multi_init(); + } + + throw new \BadMethodCallException(); + } + + public function __destruct() + { + if (isset($this->_mh)) { + curl_multi_close($this->_mh); + unset($this->_mh); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + $easy = $this->factory->create($request, $options); + $id = (int) $easy->handle; + + $promise = new Promise( + [$this, 'execute'], + function () use ($id) { return $this->cancel($id); } + ); + + $this->addRequest(['easy' => $easy, 'deferred' => $promise]); + + return $promise; + } + + /** + * Ticks the curl event loop. + */ + public function tick() + { + // Add any delayed handles if needed. + if ($this->delays) { + $currentTime = microtime(true); + foreach ($this->delays as $id => $delay) { + if ($currentTime >= $delay) { + unset($this->delays[$id]); + curl_multi_add_handle( + $this->_mh, + $this->handles[$id]['easy']->handle + ); + } + } + } + + // Step through the task queue which may add additional requests. + P\queue()->run(); + + if ($this->active && + curl_multi_select($this->_mh, $this->selectTimeout) === -1 + ) { + // Perform a usleep if a select returns -1. + // See: https://bugs.php.net/bug.php?id=61141 + usleep(250); + } + + while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); + + $this->processMessages(); + } + + /** + * Runs until all outstanding connections have completed. + */ + public function execute() + { + $queue = P\queue(); + + while ($this->handles || !$queue->isEmpty()) { + // If there are no transfers, then sleep for the next delay + if (!$this->active && $this->delays) { + usleep($this->timeToNext()); + } + $this->tick(); + } + } + + private function addRequest(array $entry) + { + $easy = $entry['easy']; + $id = (int) $easy->handle; + $this->handles[$id] = $entry; + if (empty($easy->options['delay'])) { + curl_multi_add_handle($this->_mh, $easy->handle); + } else { + $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000); + } + } + + /** + * Cancels a handle from sending and removes references to it. + * + * @param int $id Handle ID to cancel and remove. + * + * @return bool True on success, false on failure. + */ + private function cancel($id) + { + // Cannot cancel if it has been processed. + if (!isset($this->handles[$id])) { + return false; + } + + $handle = $this->handles[$id]['easy']->handle; + unset($this->delays[$id], $this->handles[$id]); + curl_multi_remove_handle($this->_mh, $handle); + curl_close($handle); + + return true; + } + + private function processMessages() + { + while ($done = curl_multi_info_read($this->_mh)) { + $id = (int) $done['handle']; + curl_multi_remove_handle($this->_mh, $done['handle']); + + if (!isset($this->handles[$id])) { + // Probably was cancelled. + continue; + } + + $entry = $this->handles[$id]; + unset($this->handles[$id], $this->delays[$id]); + $entry['easy']->errno = $done['result']; + $entry['deferred']->resolve( + CurlFactory::finish( + $this, + $entry['easy'], + $this->factory + ) + ); + } + } + + private function timeToNext() + { + $currentTime = microtime(true); + $nextTime = PHP_INT_MAX; + foreach ($this->delays as $time) { + if ($time < $nextTime) { + $nextTime = $time; + } + } + + return max(0, $nextTime - $currentTime) * 1000000; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php new file mode 100644 index 00000000..7754e911 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -0,0 +1,92 @@ +headers)) { + throw new \RuntimeException('No headers have been received'); + } + + // HTTP-version SP status-code SP reason-phrase + $startLine = explode(' ', array_shift($this->headers), 3); + $headers = \GuzzleHttp\headers_from_lines($this->headers); + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + + if (!empty($this->options['decode_content']) + && isset($normalizedKeys['content-encoding']) + ) { + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + unset($headers[$normalizedKeys['content-encoding']]); + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $bodyLength = (int) $this->sink->getSize(); + if ($bodyLength) { + $headers[$normalizedKeys['content-length']] = $bodyLength; + } else { + unset($headers[$normalizedKeys['content-length']]); + } + } + } + + // Attach a response to the easy handle with the parsed headers. + $this->response = new Response( + $startLine[1], + $headers, + $this->sink, + substr($startLine[0], 5), + isset($startLine[2]) ? (string) $startLine[2] : null + ); + } + + public function __get($name) + { + $msg = $name === 'handle' + ? 'The EasyHandle has been released' + : 'Invalid property: ' . $name; + throw new \BadMethodCallException($msg); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php new file mode 100644 index 00000000..d892061c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -0,0 +1,189 @@ +onFulfilled = $onFulfilled; + $this->onRejected = $onRejected; + + if ($queue) { + call_user_func_array([$this, 'append'], $queue); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + if (!$this->queue) { + throw new \OutOfBoundsException('Mock queue is empty'); + } + + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $this->lastRequest = $request; + $this->lastOptions = $options; + $response = array_shift($this->queue); + + if (isset($options['on_headers'])) { + if (!is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $response = new RequestException($msg, $request, $response, $e); + } + } + + if (is_callable($response)) { + $response = call_user_func($response, $request, $options); + } + + $response = $response instanceof \Exception + ? \GuzzleHttp\Promise\rejection_for($response) + : \GuzzleHttp\Promise\promise_for($response); + + return $response->then( + function ($value) use ($request, $options) { + $this->invokeStats($request, $options, $value); + if ($this->onFulfilled) { + call_user_func($this->onFulfilled, $value); + } + if (isset($options['sink'])) { + $contents = (string) $value->getBody(); + $sink = $options['sink']; + + if (is_resource($sink)) { + fwrite($sink, $contents); + } elseif (is_string($sink)) { + file_put_contents($sink, $contents); + } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { + $sink->write($contents); + } + } + + return $value; + }, + function ($reason) use ($request, $options) { + $this->invokeStats($request, $options, null, $reason); + if ($this->onRejected) { + call_user_func($this->onRejected, $reason); + } + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + } + + /** + * Adds one or more variadic requests, exceptions, callables, or promises + * to the queue. + */ + public function append() + { + foreach (func_get_args() as $value) { + if ($value instanceof ResponseInterface + || $value instanceof \Exception + || $value instanceof PromiseInterface + || is_callable($value) + ) { + $this->queue[] = $value; + } else { + throw new \InvalidArgumentException('Expected a response or ' + . 'exception. Found ' . \GuzzleHttp\describe_type($value)); + } + } + } + + /** + * Get the last received request. + * + * @return RequestInterface + */ + public function getLastRequest() + { + return $this->lastRequest; + } + + /** + * Get the last received request options. + * + * @return array + */ + public function getLastOptions() + { + return $this->lastOptions; + } + + /** + * Returns the number of remaining items in the queue. + * + * @return int + */ + public function count() + { + return count($this->queue); + } + + private function invokeStats( + RequestInterface $request, + array $options, + ResponseInterface $response = null, + $reason = null + ) { + if (isset($options['on_stats'])) { + $stats = new TransferStats($request, $response, 0, $reason); + call_user_func($options['on_stats'], $stats); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php new file mode 100644 index 00000000..f8b00be0 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -0,0 +1,55 @@ +withoutHeader('Expect'); + + // Append a content-length header if body size is zero to match + // cURL's behavior. + if (0 === $request->getBody()->getSize()) { + $request = $request->withHeader('Content-Length', 0); + } + + return $this->createResponse( + $request, + $options, + $this->createStream($request, $options), + $startTime + ); + } catch (\InvalidArgumentException $e) { + throw $e; + } catch (\Exception $e) { + // Determine if the error was a networking error. + $message = $e->getMessage(); + // This list can probably get more comprehensive. + if (strpos($message, 'getaddrinfo') // DNS lookup failed + || strpos($message, 'Connection refused') + || strpos($message, "couldn't connect to host") // error on HHVM + ) { + $e = new ConnectException($e->getMessage(), $request, $e); + } + $e = RequestException::wrapException($request, $e); + $this->invokeStats($options, $request, $startTime, null, $e); + + return \GuzzleHttp\Promise\rejection_for($e); + } + } + + private function invokeStats( + array $options, + RequestInterface $request, + $startTime, + ResponseInterface $response = null, + $error = null + ) { + if (isset($options['on_stats'])) { + $stats = new TransferStats( + $request, + $response, + microtime(true) - $startTime, + $error, + [] + ); + call_user_func($options['on_stats'], $stats); + } + } + + private function createResponse( + RequestInterface $request, + array $options, + $stream, + $startTime + ) { + $hdrs = $this->lastHeaders; + $this->lastHeaders = []; + $parts = explode(' ', array_shift($hdrs), 3); + $ver = explode('/', $parts[0])[1]; + $status = $parts[1]; + $reason = isset($parts[2]) ? $parts[2] : null; + $headers = \GuzzleHttp\headers_from_lines($hdrs); + list ($stream, $headers) = $this->checkDecode($options, $headers, $stream); + $stream = Psr7\stream_for($stream); + $sink = $stream; + + if (strcasecmp('HEAD', $request->getMethod())) { + $sink = $this->createSink($stream, $options); + } + + $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); + + if (isset($options['on_headers'])) { + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $ex = new RequestException($msg, $request, $response, $e); + return \GuzzleHttp\Promise\rejection_for($ex); + } + } + + // Do not drain when the request is a HEAD request because they have + // no body. + if ($sink !== $stream) { + $this->drain( + $stream, + $sink, + $response->getHeaderLine('Content-Length') + ); + } + + $this->invokeStats($options, $request, $startTime, $response, null); + + return new FulfilledPromise($response); + } + + private function createSink(StreamInterface $stream, array $options) + { + if (!empty($options['stream'])) { + return $stream; + } + + $sink = isset($options['sink']) + ? $options['sink'] + : fopen('php://temp', 'r+'); + + return is_string($sink) + ? new Psr7\LazyOpenStream($sink, 'w+') + : Psr7\stream_for($sink); + } + + private function checkDecode(array $options, array $headers, $stream) + { + // Automatically decode responses when instructed. + if (!empty($options['decode_content'])) { + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + if (isset($normalizedKeys['content-encoding'])) { + $encoding = $headers[$normalizedKeys['content-encoding']]; + if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { + $stream = new Psr7\InflateStream( + Psr7\stream_for($stream) + ); + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + // Remove content-encoding header + unset($headers[$normalizedKeys['content-encoding']]); + // Fix content-length header + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $length = (int) $stream->getSize(); + if ($length === 0) { + unset($headers[$normalizedKeys['content-length']]); + } else { + $headers[$normalizedKeys['content-length']] = [$length]; + } + } + } + } + } + + return [$stream, $headers]; + } + + /** + * Drains the source stream into the "sink" client option. + * + * @param StreamInterface $source + * @param StreamInterface $sink + * @param string $contentLength Header specifying the amount of + * data to read. + * + * @return StreamInterface + * @throws \RuntimeException when the sink option is invalid. + */ + private function drain( + StreamInterface $source, + StreamInterface $sink, + $contentLength + ) { + // If a content-length header is provided, then stop reading once + // that number of bytes has been read. This can prevent infinitely + // reading from a stream when dealing with servers that do not honor + // Connection: Close headers. + Psr7\copy_to_stream( + $source, + $sink, + (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 + ); + + $sink->seek(0); + $source->close(); + + return $sink; + } + + /** + * Create a resource and check to ensure it was created successfully + * + * @param callable $callback Callable that returns stream resource + * + * @return resource + * @throws \RuntimeException on error + */ + private function createResource(callable $callback) + { + $errors = null; + set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { + $errors[] = [ + 'message' => $msg, + 'file' => $file, + 'line' => $line + ]; + return true; + }); + + $resource = $callback(); + restore_error_handler(); + + if (!$resource) { + $message = 'Error creating resource: '; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[$key] $value" . PHP_EOL; + } + } + throw new \RuntimeException(trim($message)); + } + + return $resource; + } + + private function createStream(RequestInterface $request, array $options) + { + static $methods; + if (!$methods) { + $methods = array_flip(get_class_methods(__CLASS__)); + } + + // HTTP/1.1 streams using the PHP stream wrapper require a + // Connection: close header + if ($request->getProtocolVersion() == '1.1' + && !$request->hasHeader('Connection') + ) { + $request = $request->withHeader('Connection', 'close'); + } + + // Ensure SSL is verified by default + if (!isset($options['verify'])) { + $options['verify'] = true; + } + + $params = []; + $context = $this->getDefaultContext($request, $options); + + if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + + if (!empty($options)) { + foreach ($options as $key => $value) { + $method = "add_{$key}"; + if (isset($methods[$method])) { + $this->{$method}($request, $context, $value, $params); + } + } + } + + if (isset($options['stream_context'])) { + if (!is_array($options['stream_context'])) { + throw new \InvalidArgumentException('stream_context must be an array'); + } + $context = array_replace_recursive( + $context, + $options['stream_context'] + ); + } + + // Microsoft NTLM authentication only supported with curl handler + if (isset($options['auth']) + && is_array($options['auth']) + && isset($options['auth'][2]) + && 'ntlm' == $options['auth'][2] + ) { + + throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); + } + + $uri = $this->resolveHost($request, $options); + + $context = $this->createResource( + function () use ($context, $params) { + return stream_context_create($context, $params); + } + ); + + return $this->createResource( + function () use ($uri, &$http_response_header, $context, $options) { + $resource = fopen((string) $uri, 'r', null, $context); + $this->lastHeaders = $http_response_header; + + if (isset($options['read_timeout'])) { + $readTimeout = $options['read_timeout']; + $sec = (int) $readTimeout; + $usec = ($readTimeout - $sec) * 100000; + stream_set_timeout($resource, $sec, $usec); + } + + return $resource; + } + ); + } + + private function resolveHost(RequestInterface $request, array $options) + { + $uri = $request->getUri(); + + if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) { + if ('v4' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_A); + if (!isset($records[0]['ip'])) { + throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost($records[0]['ip']); + } elseif ('v6' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_AAAA); + if (!isset($records[0]['ipv6'])) { + throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); + } + } + + return $uri; + } + + private function getDefaultContext(RequestInterface $request) + { + $headers = ''; + foreach ($request->getHeaders() as $name => $value) { + foreach ($value as $val) { + $headers .= "$name: $val\r\n"; + } + } + + $context = [ + 'http' => [ + 'method' => $request->getMethod(), + 'header' => $headers, + 'protocol_version' => $request->getProtocolVersion(), + 'ignore_errors' => true, + 'follow_location' => 0, + ], + ]; + + $body = (string) $request->getBody(); + + if (!empty($body)) { + $context['http']['content'] = $body; + // Prevent the HTTP handler from adding a Content-Type header. + if (!$request->hasHeader('Content-Type')) { + $context['http']['header'] .= "Content-Type:\r\n"; + } + } + + $context['http']['header'] = rtrim($context['http']['header']); + + return $context; + } + + private function add_proxy(RequestInterface $request, &$options, $value, &$params) + { + if (!is_array($value)) { + $options['http']['proxy'] = $value; + } else { + $scheme = $request->getUri()->getScheme(); + if (isset($value[$scheme])) { + if (!isset($value['no']) + || !\GuzzleHttp\is_host_in_noproxy( + $request->getUri()->getHost(), + $value['no'] + ) + ) { + $options['http']['proxy'] = $value[$scheme]; + } + } + } + } + + private function add_timeout(RequestInterface $request, &$options, $value, &$params) + { + if ($value > 0) { + $options['http']['timeout'] = $value; + } + } + + private function add_verify(RequestInterface $request, &$options, $value, &$params) + { + if ($value === true) { + // PHP 5.6 or greater will find the system cert by default. When + // < 5.6, use the Guzzle bundled cacert. + if (PHP_VERSION_ID < 50600) { + $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle(); + } + } elseif (is_string($value)) { + $options['ssl']['cafile'] = $value; + if (!file_exists($value)) { + throw new \RuntimeException("SSL CA bundle not found: $value"); + } + } elseif ($value === false) { + $options['ssl']['verify_peer'] = false; + $options['ssl']['verify_peer_name'] = false; + return; + } else { + throw new \InvalidArgumentException('Invalid verify request option'); + } + + $options['ssl']['verify_peer'] = true; + $options['ssl']['verify_peer_name'] = true; + $options['ssl']['allow_self_signed'] = false; + } + + private function add_cert(RequestInterface $request, &$options, $value, &$params) + { + if (is_array($value)) { + $options['ssl']['passphrase'] = $value[1]; + $value = $value[0]; + } + + if (!file_exists($value)) { + throw new \RuntimeException("SSL certificate not found: {$value}"); + } + + $options['ssl']['local_cert'] = $value; + } + + private function add_progress(RequestInterface $request, &$options, $value, &$params) + { + $this->addNotification( + $params, + function ($code, $a, $b, $c, $transferred, $total) use ($value) { + if ($code == STREAM_NOTIFY_PROGRESS) { + $value($total, $transferred, null, null); + } + } + ); + } + + private function add_debug(RequestInterface $request, &$options, $value, &$params) + { + if ($value === false) { + return; + } + + static $map = [ + STREAM_NOTIFY_CONNECT => 'CONNECT', + STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', + STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + STREAM_NOTIFY_PROGRESS => 'PROGRESS', + STREAM_NOTIFY_FAILURE => 'FAILURE', + STREAM_NOTIFY_COMPLETED => 'COMPLETED', + STREAM_NOTIFY_RESOLVE => 'RESOLVE', + ]; + static $args = ['severity', 'message', 'message_code', + 'bytes_transferred', 'bytes_max']; + + $value = \GuzzleHttp\debug_resource($value); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $this->addNotification( + $params, + function () use ($ident, $value, $map, $args) { + $passed = func_get_args(); + $code = array_shift($passed); + fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (array_filter($passed) as $i => $v) { + fwrite($value, $args[$i] . ': "' . $v . '" '); + } + fwrite($value, "\n"); + } + ); + } + + private function addNotification(array &$params, callable $notify) + { + // Wrap the existing function if needed. + if (!isset($params['notification'])) { + $params['notification'] = $notify; + } else { + $params['notification'] = $this->callArray([ + $params['notification'], + $notify + ]); + } + } + + private function callArray(array $functions) + { + return function () use ($functions) { + $args = func_get_args(); + foreach ($functions as $fn) { + call_user_func_array($fn, $args); + } + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php new file mode 100644 index 00000000..a72e38a5 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -0,0 +1,273 @@ +push(Middleware::httpErrors(), 'http_errors'); + $stack->push(Middleware::redirect(), 'allow_redirects'); + $stack->push(Middleware::cookies(), 'cookies'); + $stack->push(Middleware::prepareBody(), 'prepare_body'); + + return $stack; + } + + /** + * @param callable $handler Underlying HTTP handler. + */ + public function __construct(callable $handler = null) + { + $this->handler = $handler; + } + + /** + * Invokes the handler stack as a composed handler + * + * @param RequestInterface $request + * @param array $options + */ + public function __invoke(RequestInterface $request, array $options) + { + $handler = $this->resolve(); + + return $handler($request, $options); + } + + /** + * Dumps a string representation of the stack. + * + * @return string + */ + public function __toString() + { + $depth = 0; + $stack = []; + if ($this->handler) { + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + } + + $result = ''; + foreach (array_reverse($this->stack) as $tuple) { + $depth++; + $str = "{$depth}) Name: '{$tuple[1]}', "; + $str .= "Function: " . $this->debugCallable($tuple[0]); + $result = "> {$str}\n{$result}"; + $stack[] = $str; + } + + foreach (array_keys($stack) as $k) { + $result .= "< {$stack[$k]}\n"; + } + + return $result; + } + + /** + * Set the HTTP handler that actually returns a promise. + * + * @param callable $handler Accepts a request and array of options and + * returns a Promise. + */ + public function setHandler(callable $handler) + { + $this->handler = $handler; + $this->cached = null; + } + + /** + * Returns true if the builder has a handler. + * + * @return bool + */ + public function hasHandler() + { + return (bool) $this->handler; + } + + /** + * Unshift a middleware to the bottom of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function unshift(callable $middleware, $name = null) + { + array_unshift($this->stack, [$middleware, $name]); + $this->cached = null; + } + + /** + * Push a middleware to the top of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function push(callable $middleware, $name = '') + { + $this->stack[] = [$middleware, $name]; + $this->cached = null; + } + + /** + * Add a middleware before another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function before($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, true); + } + + /** + * Add a middleware after another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function after($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, false); + } + + /** + * Remove a middleware by instance or name from the stack. + * + * @param callable|string $remove Middleware to remove by instance or name. + */ + public function remove($remove) + { + $this->cached = null; + $idx = is_callable($remove) ? 0 : 1; + $this->stack = array_values(array_filter( + $this->stack, + function ($tuple) use ($idx, $remove) { + return $tuple[$idx] !== $remove; + } + )); + } + + /** + * Compose the middleware and handler into a single callable function. + * + * @return callable + */ + public function resolve() + { + if (!$this->cached) { + if (!($prev = $this->handler)) { + throw new \LogicException('No handler has been specified'); + } + + foreach (array_reverse($this->stack) as $fn) { + $prev = $fn[0]($prev); + } + + $this->cached = $prev; + } + + return $this->cached; + } + + /** + * @param $name + * @return int + */ + private function findByName($name) + { + foreach ($this->stack as $k => $v) { + if ($v[1] === $name) { + return $k; + } + } + + throw new \InvalidArgumentException("Middleware not found: $name"); + } + + /** + * Splices a function into the middleware list at a specific position. + * + * @param $findName + * @param $withName + * @param callable $middleware + * @param $before + */ + private function splice($findName, $withName, callable $middleware, $before) + { + $this->cached = null; + $idx = $this->findByName($findName); + $tuple = [$middleware, $withName]; + + if ($before) { + if ($idx === 0) { + array_unshift($this->stack, $tuple); + } else { + $replacement = [$tuple, $this->stack[$idx]]; + array_splice($this->stack, $idx, 1, $replacement); + } + } elseif ($idx === count($this->stack) - 1) { + $this->stack[] = $tuple; + } else { + $replacement = [$this->stack[$idx], $tuple]; + array_splice($this->stack, $idx, 1, $replacement); + } + } + + /** + * Provides a debug string for a given callable. + * + * @param array|callable $fn Function to write as a string. + * + * @return string + */ + private function debugCallable($fn) + { + if (is_string($fn)) { + return "callable({$fn})"; + } + + if (is_array($fn)) { + return is_string($fn[0]) + ? "callable({$fn[0]}::{$fn[1]})" + : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; + } + + return 'callable(' . spl_object_hash($fn) . ')'; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php new file mode 100644 index 00000000..6b090a97 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -0,0 +1,182 @@ +>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + + /** @var string Template used to format log messages */ + private $template; + + /** + * @param string $template Log message template + */ + public function __construct($template = self::CLF) + { + $this->template = $template ?: self::CLF; + } + + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param \Exception $error Exception that was received + * + * @return string + */ + public function format( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $error = null + ) { + $cache = []; + + return preg_replace_callback( + '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', + function (array $matches) use ($request, $response, $error, &$cache) { + + if (isset($cache[$matches[1]])) { + return $cache[$matches[1]]; + } + + $result = ''; + switch ($matches[1]) { + case 'request': + $result = Psr7\str($request); + break; + case 'response': + $result = $response ? Psr7\str($response) : ''; + break; + case 'req_headers': + $result = trim($request->getMethod() + . ' ' . $request->getRequestTarget()) + . ' HTTP/' . $request->getProtocolVersion() . "\r\n" + . $this->headers($request); + break; + case 'res_headers': + $result = $response ? + sprintf( + 'HTTP/%s %d %s', + $response->getProtocolVersion(), + $response->getStatusCode(), + $response->getReasonPhrase() + ) . "\r\n" . $this->headers($response) + : 'NULL'; + break; + case 'req_body': + $result = $request->getBody(); + break; + case 'res_body': + $result = $response ? $response->getBody() : 'NULL'; + break; + case 'ts': + case 'date_iso_8601': + $result = gmdate('c'); + break; + case 'date_common_log': + $result = date('d/M/Y:H:i:s O'); + break; + case 'method': + $result = $request->getMethod(); + break; + case 'version': + $result = $request->getProtocolVersion(); + break; + case 'uri': + case 'url': + $result = $request->getUri(); + break; + case 'target': + $result = $request->getRequestTarget(); + break; + case 'req_version': + $result = $request->getProtocolVersion(); + break; + case 'res_version': + $result = $response + ? $response->getProtocolVersion() + : 'NULL'; + break; + case 'host': + $result = $request->getHeaderLine('Host'); + break; + case 'hostname': + $result = gethostname(); + break; + case 'code': + $result = $response ? $response->getStatusCode() : 'NULL'; + break; + case 'phrase': + $result = $response ? $response->getReasonPhrase() : 'NULL'; + break; + case 'error': + $result = $error ? $error->getMessage() : 'NULL'; + break; + default: + // handle prefixed dynamic headers + if (strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(substr($matches[1], 11)); + } elseif (strpos($matches[1], 'res_header_') === 0) { + $result = $response + ? $response->getHeaderLine(substr($matches[1], 11)) + : 'NULL'; + } + } + + $cache[$matches[1]] = $result; + return $result; + }, + $this->template + ); + } + + private function headers(MessageInterface $message) + { + $result = ''; + foreach ($message->getHeaders() as $name => $values) { + $result .= $name . ': ' . implode(', ', $values) . "\r\n"; + } + + return trim($result); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php new file mode 100644 index 00000000..9d79bd26 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -0,0 +1,254 @@ +withCookieHeader($request); + return $handler($request, $options) + ->then(function ($response) use ($cookieJar, $request) { + $cookieJar->extractCookies($request, $response); + return $response; + } + ); + }; + }; + } + + /** + * Middleware that throws exceptions for 4xx or 5xx responses when the + * "http_error" request option is set to true. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function httpErrors() + { + return function (callable $handler) { + return function ($request, array $options) use ($handler) { + if (empty($options['http_errors'])) { + return $handler($request, $options); + } + return $handler($request, $options)->then( + function (ResponseInterface $response) use ($request, $handler) { + $code = $response->getStatusCode(); + if ($code < 400) { + return $response; + } + throw RequestException::create($request, $response); + } + ); + }; + }; + } + + /** + * Middleware that pushes history data to an ArrayAccess container. + * + * @param array $container Container to hold the history (by reference). + * + * @return callable Returns a function that accepts the next handler. + * @throws \InvalidArgumentException if container is not an array or ArrayAccess. + */ + public static function history(&$container) + { + if (!is_array($container) && !$container instanceof \ArrayAccess) { + throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); + } + + return function (callable $handler) use (&$container) { + return function ($request, array $options) use ($handler, &$container) { + return $handler($request, $options)->then( + function ($value) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => $value, + 'error' => null, + 'options' => $options + ]; + return $value; + }, + function ($reason) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => null, + 'error' => $reason, + 'options' => $options + ]; + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * Middleware that invokes a callback before and after sending a request. + * + * The provided listener cannot modify or alter the response. It simply + * "taps" into the chain to be notified before returning the promise. The + * before listener accepts a request and options array, and the after + * listener accepts a request, options array, and response promise. + * + * @param callable $before Function to invoke before forwarding the request. + * @param callable $after Function invoked after forwarding. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function tap(callable $before = null, callable $after = null) + { + return function (callable $handler) use ($before, $after) { + return function ($request, array $options) use ($handler, $before, $after) { + if ($before) { + $before($request, $options); + } + $response = $handler($request, $options); + if ($after) { + $after($request, $options, $response); + } + return $response; + }; + }; + } + + /** + * Middleware that handles request redirects. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function redirect() + { + return function (callable $handler) { + return new RedirectMiddleware($handler); + }; + } + + /** + * Middleware that retries requests based on the boolean result of + * invoking the provided "decider" function. + * + * If no delay function is provided, a simple implementation of exponential + * backoff will be utilized. + * + * @param callable $decider Function that accepts the number of retries, + * a request, [response], and [exception] and + * returns true if the request is to be retried. + * @param callable $delay Function that accepts the number of retries and + * returns the number of milliseconds to delay. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function retry(callable $decider, callable $delay = null) + { + return function (callable $handler) use ($decider, $delay) { + return new RetryMiddleware($decider, $handler, $delay); + }; + } + + /** + * Middleware that logs requests, responses, and errors using a message + * formatter. + * + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) + { + return function (callable $handler) use ($logger, $formatter, $logLevel) { + return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { + return $handler($request, $options)->then( + function ($response) use ($logger, $request, $formatter, $logLevel) { + $message = $formatter->format($request, $response); + $logger->log($logLevel, $message); + return $response; + }, + function ($reason) use ($logger, $request, $formatter) { + $response = $reason instanceof RequestException + ? $reason->getResponse() + : null; + $message = $formatter->format($request, $response, $reason); + $logger->notice($message); + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * This middleware adds a default content-type if possible, a default + * content-length or transfer-encoding header, and the expect header. + * + * @return callable + */ + public static function prepareBody() + { + return function (callable $handler) { + return new PrepareBodyMiddleware($handler); + }; + } + + /** + * Middleware that applies a map function to the request before passing to + * the next handler. + * + * @param callable $fn Function that accepts a RequestInterface and returns + * a RequestInterface. + * @return callable + */ + public static function mapRequest(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($fn($request), $options); + }; + }; + } + + /** + * Middleware that applies a map function to the resolved promise's + * response. + * + * @param callable $fn Function that accepts a ResponseInterface and + * returns a ResponseInterface. + * @return callable + */ + public static function mapResponse(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($request, $options)->then($fn); + }; + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php new file mode 100644 index 00000000..8f1be33c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Pool.php @@ -0,0 +1,123 @@ + $rfn) { + if ($rfn instanceof RequestInterface) { + yield $key => $client->sendAsync($rfn, $opts); + } elseif (is_callable($rfn)) { + yield $key => $rfn($opts); + } else { + throw new \InvalidArgumentException('Each value yielded by ' + . 'the iterator must be a Psr7\Http\Message\RequestInterface ' + . 'or a callable that returns a promise that fulfills ' + . 'with a Psr7\Message\Http\ResponseInterface object.'); + } + } + }; + + $this->each = new EachPromise($requests(), $config); + } + + public function promise() + { + return $this->each->promise(); + } + + /** + * Sends multiple requests concurrently and returns an array of responses + * and exceptions that uses the same ordering as the provided requests. + * + * IMPORTANT: This method keeps every request and response in memory, and + * as such, is NOT recommended when sending a large number or an + * indeterminate number of requests concurrently. + * + * @param ClientInterface $client Client used to send the requests + * @param array|\Iterator $requests Requests to send concurrently. + * @param array $options Passes through the options available in + * {@see GuzzleHttp\Pool::__construct} + * + * @return array Returns an array containing the response or an exception + * in the same order that the requests were sent. + * @throws \InvalidArgumentException if the event format is incorrect. + */ + public static function batch( + ClientInterface $client, + $requests, + array $options = [] + ) { + $res = []; + self::cmpCallback($options, 'fulfilled', $res); + self::cmpCallback($options, 'rejected', $res); + $pool = new static($client, $requests, $options); + $pool->promise()->wait(); + ksort($res); + + return $res; + } + + private static function cmpCallback(array &$options, $name, array &$results) + { + if (!isset($options[$name])) { + $options[$name] = function ($v, $k) use (&$results) { + $results[$k] = $v; + }; + } else { + $currentFn = $options[$name]; + $options[$name] = function ($v, $k) use (&$results, $currentFn) { + $currentFn($v, $k); + $results[$k] = $v; + }; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php new file mode 100644 index 00000000..2eb95f9b --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -0,0 +1,106 @@ +nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + // Don't do anything if the request has no body. + if ($request->getBody()->getSize() === 0) { + return $fn($request, $options); + } + + $modify = []; + + // Add a default content-type if possible. + if (!$request->hasHeader('Content-Type')) { + if ($uri = $request->getBody()->getMetadata('uri')) { + if ($type = Psr7\mimetype_from_filename($uri)) { + $modify['set_headers']['Content-Type'] = $type; + } + } + } + + // Add a default content-length or transfer-encoding header. + if (!$request->hasHeader('Content-Length') + && !$request->hasHeader('Transfer-Encoding') + ) { + $size = $request->getBody()->getSize(); + if ($size !== null) { + $modify['set_headers']['Content-Length'] = $size; + } else { + $modify['set_headers']['Transfer-Encoding'] = 'chunked'; + } + } + + // Add the expect header if needed. + $this->addExpectHeader($request, $options, $modify); + + return $fn(Psr7\modify_request($request, $modify), $options); + } + + private function addExpectHeader( + RequestInterface $request, + array $options, + array &$modify + ) { + // Determine if the Expect header should be used + if ($request->hasHeader('Expect')) { + return; + } + + $expect = isset($options['expect']) ? $options['expect'] : null; + + // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 + if ($expect === false || $request->getProtocolVersion() < 1.1) { + return; + } + + // The expect header is unconditionally enabled + if ($expect === true) { + $modify['set_headers']['Expect'] = '100-Continue'; + return; + } + + // By default, send the expect header when the payload is > 1mb + if ($expect === null) { + $expect = 1048576; + } + + // Always add if the body cannot be rewound, the size cannot be + // determined, or the size is greater than the cutoff threshold + $body = $request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { + $modify['set_headers']['Expect'] = '100-Continue'; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php new file mode 100644 index 00000000..131b7717 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -0,0 +1,237 @@ + 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, + 'track_redirects' => false, + ]; + + /** @var callable */ + private $nextHandler; + + /** + * @param callable $nextHandler Next handler to invoke. + */ + public function __construct(callable $nextHandler) + { + $this->nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + if (empty($options['allow_redirects'])) { + return $fn($request, $options); + } + + if ($options['allow_redirects'] === true) { + $options['allow_redirects'] = self::$defaultSettings; + } elseif (!is_array($options['allow_redirects'])) { + throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); + } else { + // Merge the default settings with the provided settings + $options['allow_redirects'] += self::$defaultSettings; + } + + if (empty($options['allow_redirects']['max'])) { + return $fn($request, $options); + } + + return $fn($request, $options) + ->then(function (ResponseInterface $response) use ($request, $options) { + return $this->checkRedirect($request, $options, $response); + }); + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface|PromiseInterface $response + * + * @return ResponseInterface|PromiseInterface + */ + public function checkRedirect( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + if (substr($response->getStatusCode(), 0, 1) != '3' + || !$response->hasHeader('Location') + ) { + return $response; + } + + $this->guardMax($request, $options); + $nextRequest = $this->modifyRequest($request, $options, $response); + + if (isset($options['allow_redirects']['on_redirect'])) { + call_user_func( + $options['allow_redirects']['on_redirect'], + $request, + $response, + $nextRequest->getUri() + ); + } + + /** @var PromiseInterface|ResponseInterface $promise */ + $promise = $this($nextRequest, $options); + + // Add headers to be able to track history of redirects. + if (!empty($options['allow_redirects']['track_redirects'])) { + return $this->withTracking( + $promise, + (string) $nextRequest->getUri(), + $response->getStatusCode() + ); + } + + return $promise; + } + + private function withTracking(PromiseInterface $promise, $uri, $statusCode) + { + return $promise->then( + function (ResponseInterface $response) use ($uri, $statusCode) { + // Note that we are pushing to the front of the list as this + // would be an earlier response than what is currently present + // in the history header. + $historyHeader = $response->getHeader(self::HISTORY_HEADER); + $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); + array_unshift($historyHeader, $uri); + array_unshift($statusHeader, $statusCode); + return $response->withHeader(self::HISTORY_HEADER, $historyHeader) + ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); + } + ); + } + + private function guardMax(RequestInterface $request, array &$options) + { + $current = isset($options['__redirect_count']) + ? $options['__redirect_count'] + : 0; + $options['__redirect_count'] = $current + 1; + $max = $options['allow_redirects']['max']; + + if ($options['__redirect_count'] > $max) { + throw new TooManyRedirectsException( + "Will not follow more than {$max} redirects", + $request + ); + } + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * + * @return RequestInterface + */ + public function modifyRequest( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + // Request modifications to apply. + $modify = []; + $protocols = $options['allow_redirects']['protocols']; + + // Use a GET request if this is an entity enclosing request and we are + // not forcing RFC compliance, but rather emulating what all browsers + // would do. + $statusCode = $response->getStatusCode(); + if ($statusCode == 303 || + ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) + ) { + $modify['method'] = 'GET'; + $modify['body'] = ''; + } + + $modify['uri'] = $this->redirectUri($request, $response, $protocols); + Psr7\rewind_body($request); + + // Add the Referer header if it is told to do so and only + // add the header if we are not redirecting from https to http. + if ($options['allow_redirects']['referer'] + && $modify['uri']->getScheme() === $request->getUri()->getScheme() + ) { + $uri = $request->getUri()->withUserInfo('', ''); + $modify['set_headers']['Referer'] = (string) $uri; + } else { + $modify['remove_headers'][] = 'Referer'; + } + + // Remove Authorization header if host is different. + if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + $modify['remove_headers'][] = 'Authorization'; + } + + return Psr7\modify_request($request, $modify); + } + + /** + * Set the appropriate URL on the request based on the location header + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param array $protocols + * + * @return UriInterface + */ + private function redirectUri( + RequestInterface $request, + ResponseInterface $response, + array $protocols + ) { + $location = Psr7\UriResolver::resolve( + $request->getUri(), + new Psr7\Uri($response->getHeaderLine('Location')) + ); + + // Ensure that the redirect URI is allowed based on the protocols. + if (!in_array($location->getScheme(), $protocols)) { + throw new BadResponseException( + sprintf( + 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', + $location, + implode(', ', $protocols) + ), + $request, + $response + ); + } + + return $location; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php new file mode 100644 index 00000000..c6aacfb1 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -0,0 +1,255 @@ +decider = $decider; + $this->nextHandler = $nextHandler; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + } + + /** + * Default exponential backoff delay function. + * + * @param $retries + * + * @return int + */ + public static function exponentialDelay($retries) + { + return (int) pow(2, $retries - 1); + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + if (!isset($options['retries'])) { + $options['retries'] = 0; + } + + $fn = $this->nextHandler; + return $fn($request, $options) + ->then( + $this->onFulfilled($request, $options), + $this->onRejected($request, $options) + ); + } + + private function onFulfilled(RequestInterface $req, array $options) + { + return function ($value) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + $value, + null + )) { + return $value; + } + return $this->doRetry($req, $options, $value); + }; + } + + private function onRejected(RequestInterface $req, array $options) + { + return function ($reason) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + null, + $reason + )) { + return \GuzzleHttp\Promise\rejection_for($reason); + } + return $this->doRetry($req, $options); + }; + } + + private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) + { + $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); + + return $this($request, $options); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php new file mode 100644 index 00000000..15f717e1 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -0,0 +1,126 @@ +request = $request; + $this->response = $response; + $this->transferTime = $transferTime; + $this->handlerErrorData = $handlerErrorData; + $this->handlerStats = $handlerStats; + } + + /** + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Returns the response that was received (if any). + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Returns true if a response was received. + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Gets handler specific error data. + * + * This might be an exception, a integer representing an error code, or + * anything else. Relying on this value assumes that you know what handler + * you are using. + * + * @return mixed + */ + public function getHandlerErrorData() + { + return $this->handlerErrorData; + } + + /** + * Get the effective URI the request was sent to. + * + * @return UriInterface + */ + public function getEffectiveUri() + { + return $this->request->getUri(); + } + + /** + * Get the estimated time the request was being transferred by the handler. + * + * @return float Time in seconds. + */ + public function getTransferTime() + { + return $this->transferTime; + } + + /** + * Gets an array of all of the handler specific transfer data. + * + * @return array + */ + public function getHandlerStats() + { + return $this->handlerStats; + } + + /** + * Get a specific handler statistic from the handler by name. + * + * @param string $stat Handler specific transfer stat to retrieve. + * + * @return mixed|null + */ + public function getHandlerStat($stat) + { + return isset($this->handlerStats[$stat]) + ? $this->handlerStats[$stat] + : null; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/vendor/guzzlehttp/guzzle/src/UriTemplate.php new file mode 100644 index 00000000..0b1623ec --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/UriTemplate.php @@ -0,0 +1,241 @@ + ['prefix' => '', 'joiner' => ',', 'query' => false], + '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], + '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], + '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], + ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], + '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], + '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] + ]; + + /** @var array Delimiters */ + private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', + '&', '\'', '(', ')', '*', '+', ',', ';', '=']; + + /** @var array Percent encoded delimiters */ + private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', + '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', + '%3B', '%3D']; + + public function expand($template, array $variables) + { + if (false === strpos($template, '{')) { + return $template; + } + + $this->template = $template; + $this->variables = $variables; + + return preg_replace_callback( + '/\{([^\}]+)\}/', + [$this, 'expandMatch'], + $this->template + ); + } + + /** + * Parse an expression into parts + * + * @param string $expression Expression to parse + * + * @return array Returns an associative array of parts + */ + private function parseExpression($expression) + { + $result = []; + + if (isset(self::$operatorHash[$expression[0]])) { + $result['operator'] = $expression[0]; + $expression = substr($expression, 1); + } else { + $result['operator'] = ''; + } + + foreach (explode(',', $expression) as $value) { + $value = trim($value); + $varspec = []; + if ($colonPos = strpos($value, ':')) { + $varspec['value'] = substr($value, 0, $colonPos); + $varspec['modifier'] = ':'; + $varspec['position'] = (int) substr($value, $colonPos + 1); + } elseif (substr($value, -1) === '*') { + $varspec['modifier'] = '*'; + $varspec['value'] = substr($value, 0, -1); + } else { + $varspec['value'] = (string) $value; + $varspec['modifier'] = ''; + } + $result['values'][] = $varspec; + } + + return $result; + } + + /** + * Process an expansion + * + * @param array $matches Matches met in the preg_replace_callback + * + * @return string Returns the replacement string + */ + private function expandMatch(array $matches) + { + static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; + + $replacements = []; + $parsed = self::parseExpression($matches[1]); + $prefix = self::$operatorHash[$parsed['operator']]['prefix']; + $joiner = self::$operatorHash[$parsed['operator']]['joiner']; + $useQuery = self::$operatorHash[$parsed['operator']]['query']; + + foreach ($parsed['values'] as $value) { + + if (!isset($this->variables[$value['value']])) { + continue; + } + + $variable = $this->variables[$value['value']]; + $actuallyUseQuery = $useQuery; + $expanded = ''; + + if (is_array($variable)) { + + $isAssoc = $this->isAssoc($variable); + $kvp = []; + foreach ($variable as $key => $var) { + + if ($isAssoc) { + $key = rawurlencode($key); + $isNestedArray = is_array($var); + } else { + $isNestedArray = false; + } + + if (!$isNestedArray) { + $var = rawurlencode($var); + if ($parsed['operator'] === '+' || + $parsed['operator'] === '#' + ) { + $var = $this->decodeReserved($var); + } + } + + if ($value['modifier'] === '*') { + if ($isAssoc) { + if ($isNestedArray) { + // Nested arrays must allow for deeply nested + // structures. + $var = strtr( + http_build_query([$key => $var]), + $rfc1738to3986 + ); + } else { + $var = $key . '=' . $var; + } + } elseif ($key > 0 && $actuallyUseQuery) { + $var = $value['value'] . '=' . $var; + } + } + + $kvp[$key] = $var; + } + + if (empty($variable)) { + $actuallyUseQuery = false; + } elseif ($value['modifier'] === '*') { + $expanded = implode($joiner, $kvp); + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $actuallyUseQuery = false; + } + } else { + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($kvp as $k => &$v) { + $v = $k . ',' . $v; + } + } + $expanded = implode(',', $kvp); + } + + } else { + if ($value['modifier'] === ':') { + $variable = substr($variable, 0, $value['position']); + } + $expanded = rawurlencode($variable); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $expanded = $this->decodeReserved($expanded); + } + } + + if ($actuallyUseQuery) { + if (!$expanded && $joiner !== '&') { + $expanded = $value['value']; + } else { + $expanded = $value['value'] . '=' . $expanded; + } + } + + $replacements[] = $expanded; + } + + $ret = implode($joiner, $replacements); + if ($ret && $prefix) { + return $prefix . $ret; + } + + return $ret; + } + + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a tradeoff for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + * + * @param array $array Array to check + * + * @return bool + */ + private function isAssoc(array $array) + { + return $array && array_keys($array)[0] !== 0; + } + + /** + * Removes percent encoding on reserved characters (used with + and # + * modifiers). + * + * @param string $string String to fix + * + * @return string + */ + private function decodeReserved($string) + { + return str_replace(self::$delimsPct, self::$delims, $string); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php new file mode 100644 index 00000000..59e212ed --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -0,0 +1,331 @@ +expand($template, $variables); +} + +/** + * Debug function used to describe the provided value type and class. + * + * @param mixed $input + * + * @return string Returns a string containing the type of the variable and + * if a class is provided, the class name. + */ +function describe_type($input) +{ + switch (gettype($input)) { + case 'object': + return 'object(' . get_class($input) . ')'; + case 'array': + return 'array(' . count($input) . ')'; + default: + ob_start(); + var_dump($input); + // normalize float vs double + return str_replace('double(', 'float(', rtrim(ob_get_clean())); + } +} + +/** + * Parses an array of header lines into an associative array of headers. + * + * @param array $lines Header lines array of strings in the following + * format: "Name: Value" + * @return array + */ +function headers_from_lines($lines) +{ + $headers = []; + + foreach ($lines as $line) { + $parts = explode(':', $line, 2); + $headers[trim($parts[0])][] = isset($parts[1]) + ? trim($parts[1]) + : null; + } + + return $headers; +} + +/** + * Returns a debug stream based on the provided variable. + * + * @param mixed $value Optional value + * + * @return resource + */ +function debug_resource($value = null) +{ + if (is_resource($value)) { + return $value; + } elseif (defined('STDOUT')) { + return STDOUT; + } + + return fopen('php://output', 'w'); +} + +/** + * Chooses and creates a default handler to use based on the environment. + * + * The returned handler is not wrapped by any default middlewares. + * + * @throws \RuntimeException if no viable Handler is available. + * @return callable Returns the best handler for the given system. + */ +function choose_handler() +{ + $handler = null; + if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } + + if (ini_get('allow_url_fopen')) { + $handler = $handler + ? Proxy::wrapStreaming($handler, new StreamHandler()) + : new StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the ' + . 'allow_url_fopen ini setting, or a custom HTTP handler.'); + } + + return $handler; +} + +/** + * Get the default User-Agent string to use with Guzzle + * + * @return string + */ +function default_user_agent() +{ + static $defaultAgent = ''; + + if (!$defaultAgent) { + $defaultAgent = 'GuzzleHttp/' . Client::VERSION; + if (extension_loaded('curl') && function_exists('curl_version')) { + $defaultAgent .= ' curl/' . \curl_version()['version']; + } + $defaultAgent .= ' PHP/' . PHP_VERSION; + } + + return $defaultAgent; +} + +/** + * Returns the default cacert bundle for the current system. + * + * First, the openssl.cafile and curl.cainfo php.ini settings are checked. + * If those settings are not configured, then the common locations for + * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X + * and Windows are checked. If any of these file locations are found on + * disk, they will be utilized. + * + * Note: the result of this function is cached for subsequent calls. + * + * @return string + * @throws \RuntimeException if no bundle can be found. + */ +function default_ca_bundle() +{ + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + + if ($cached) { + return $cached; + } + + if ($ca = ini_get('openssl.cafile')) { + return $cached = $ca; + } + + if ($ca = ini_get('curl.cainfo')) { + return $cached = $ca; + } + + foreach ($cafiles as $filename) { + if (file_exists($filename)) { + return $cached = $filename; + } + } + + throw new \RuntimeException(<<< EOT +No system CA bundle could be found in any of the the common system locations. +PHP versions earlier than 5.6 are not properly configured to use the system's +CA bundle by default. In order to verify peer certificates, you will need to +supply the path on disk to a certificate bundle to the 'verify' request +option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not +need a specific certificate bundle, then Mozilla provides a commonly used CA +bundle which can be downloaded here (provided by the maintainer of cURL): +https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once +you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP +ini setting to point to the path to the file, allowing you to omit the 'verify' +request option. See http://curl.haxx.se/docs/sslcerts.html for more +information. +EOT + ); +} + +/** + * Creates an associative array of lowercase header names to the actual + * header casing. + * + * @param array $headers + * + * @return array + */ +function normalize_header_keys(array $headers) +{ + $result = []; + foreach (array_keys($headers) as $key) { + $result[strtolower($key)] = $key; + } + + return $result; +} + +/** + * Returns true if the provided host matches any of the no proxy areas. + * + * This method will strip a port from the host if it is present. Each pattern + * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a + * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == + * "baz.foo.com", but ".foo.com" != "foo.com"). + * + * Areas are matched in the following cases: + * 1. "*" (without quotes) always matches any hosts. + * 2. An exact match. + * 3. The area starts with "." and the area is the last part of the host. e.g. + * '.mit.edu' will match any host that ends with '.mit.edu'. + * + * @param string $host Host to check against the patterns. + * @param array $noProxyArray An array of host patterns. + * + * @return bool + */ +function is_host_in_noproxy($host, array $noProxyArray) +{ + if (strlen($host) === 0) { + throw new \InvalidArgumentException('Empty host provided'); + } + + // Strip port if present. + if (strpos($host, ':')) { + $host = explode($host, ':', 2)[0]; + } + + foreach ($noProxyArray as $area) { + // Always match on wildcards. + if ($area === '*') { + return true; + } elseif (empty($area)) { + // Don't match on empty values. + continue; + } elseif ($area === $host) { + // Exact matches. + return true; + } else { + // Special match if the area when prefixed with ".". Remove any + // existing leading "." and add a new leading ".". + $area = '.' . ltrim($area, '.'); + if (substr($host, -(strlen($area))) === $area) { + return true; + } + } + } + + return false; +} + +/** + * Wrapper for json_decode that throws when an error occurs. + * + * @param string $json JSON data to parse + * @param bool $assoc When true, returned objects will be converted + * into associative arrays. + * @param int $depth User specified recursion depth. + * @param int $options Bitmask of JSON decode options. + * + * @return mixed + * @throws \InvalidArgumentException if the JSON cannot be decoded. + * @link http://www.php.net/manual/en/function.json-decode.php + */ +function json_decode($json, $assoc = false, $depth = 512, $options = 0) +{ + $data = \json_decode($json, $assoc, $depth, $options); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new \InvalidArgumentException( + 'json_decode error: ' . json_last_error_msg()); + } + + return $data; +} + +/** + * Wrapper for JSON encoding that throws when an error occurs. + * + * @param mixed $value The value being encoded + * @param int $options JSON encode option bitmask + * @param int $depth Set the maximum depth. Must be greater than zero. + * + * @return string + * @throws \InvalidArgumentException if the JSON cannot be encoded. + * @link http://www.php.net/manual/en/function.json-encode.php + */ +function json_encode($value, $options = 0, $depth = 512) +{ + $json = \json_encode($value, $options, $depth); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new \InvalidArgumentException( + 'json_encode error: ' . json_last_error_msg()); + } + + return $json; +} diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php new file mode 100644 index 00000000..a93393ac --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -0,0 +1,6 @@ + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/promises/Makefile b/vendor/guzzlehttp/promises/Makefile new file mode 100644 index 00000000..8d5b3ef9 --- /dev/null +++ b/vendor/guzzlehttp/promises/Makefile @@ -0,0 +1,13 @@ +all: clean test + +test: + vendor/bin/phpunit + +coverage: + vendor/bin/phpunit --coverage-html=artifacts/coverage + +view-coverage: + open artifacts/coverage/index.html + +clean: + rm -rf artifacts/* diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md new file mode 100644 index 00000000..7b607e28 --- /dev/null +++ b/vendor/guzzlehttp/promises/README.md @@ -0,0 +1,504 @@ +# Guzzle Promises + +[Promises/A+](https://promisesaplus.com/) implementation that handles promise +chaining and resolution iteratively, allowing for "infinite" promise chaining +while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) +for a general introduction to promises. + +- [Features](#features) +- [Quick start](#quick-start) +- [Synchronous wait](#synchronous-wait) +- [Cancellation](#cancellation) +- [API](#api) + - [Promise](#promise) + - [FulfilledPromise](#fulfilledpromise) + - [RejectedPromise](#rejectedpromise) +- [Promise interop](#promise-interop) +- [Implementation notes](#implementation-notes) + + +# Features + +- [Promises/A+](https://promisesaplus.com/) implementation. +- Promise resolution and chaining is handled iteratively, allowing for + "infinite" promise chaining. +- Promises have a synchronous `wait` method. +- Promises can be cancelled. +- Works with any object that has a `then` function. +- C# style async/await coroutine promises using + `GuzzleHttp\Promise\coroutine()`. + + +# Quick start + +A *promise* represents the eventual result of an asynchronous operation. The +primary way of interacting with a promise is through its `then` method, which +registers callbacks to receive either a promise's eventual value or the reason +why the promise cannot be fulfilled. + + +## Callbacks + +Callbacks are registered with the `then` method by providing an optional +`$onFulfilled` followed by an optional `$onRejected` function. + + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then( + // $onFulfilled + function ($value) { + echo 'The promise was fulfilled.'; + }, + // $onRejected + function ($reason) { + echo 'The promise was rejected.'; + } +); +``` + +*Resolving* a promise means that you either fulfill a promise with a *value* or +reject a promise with a *reason*. Resolving a promises triggers callbacks +registered with the promises's `then` method. These callbacks are triggered +only once and in the order in which they were added. + + +## Resolving a promise + +Promises are fulfilled using the `resolve($value)` method. Resolving a promise +with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger +all of the onFulfilled callbacks (resolving a promise with a rejected promise +will reject the promise and trigger the `$onRejected` callbacks). + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(function ($value) { + // Return a value and don't break the chain + return "Hello, " . $value; + }) + // This then is executed after the first then and receives the value + // returned from the first then. + ->then(function ($value) { + echo $value; + }); + +// Resolving the promise triggers the $onFulfilled callbacks and outputs +// "Hello, reader". +$promise->resolve('reader.'); +``` + + +## Promise forwarding + +Promises can be chained one after the other. Each then in the chain is a new +promise. The return value of a promise is what's forwarded to the next +promise in the chain. Returning a promise in a `then` callback will cause the +subsequent promises in the chain to only be fulfilled when the returned promise +has been fulfilled. The next promise in the chain will be invoked with the +resolved value of the promise. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$nextPromise = new Promise(); + +$promise + ->then(function ($value) use ($nextPromise) { + echo $value; + return $nextPromise; + }) + ->then(function ($value) { + echo $value; + }); + +// Triggers the first callback and outputs "A" +$promise->resolve('A'); +// Triggers the second callback and outputs "B" +$nextPromise->resolve('B'); +``` + +## Promise rejection + +When a promise is rejected, the `$onRejected` callbacks are invoked with the +rejection reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + echo $reason; +}); + +$promise->reject('Error!'); +// Outputs "Error!" +``` + +## Rejection forwarding + +If an exception is thrown in an `$onRejected` callback, subsequent +`$onRejected` callbacks are invoked with the thrown exception as the reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + throw new \Exception($reason); +})->then(null, function ($reason) { + assert($reason->getMessage() === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +You can also forward a rejection down the promise chain by returning a +`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or +`$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + return new RejectedPromise($reason); +})->then(null, function ($reason) { + assert($reason === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +If an exception is not thrown in a `$onRejected` callback and the callback +does not return a rejected promise, downstream `$onFulfilled` callbacks are +invoked using the value returned from the `$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise + ->then(null, function ($reason) { + return "It's ok"; + }) + ->then(function ($value) { + assert($value === "It's ok"); + }); + +$promise->reject('Error!'); +``` + +# Synchronous wait + +You can synchronously force promises to complete using a promise's `wait` +method. When creating a promise, you can provide a wait function that is used +to synchronously force a promise to complete. When a wait function is invoked +it is expected to deliver a value to the promise or reject the promise. If the +wait function does not deliver a value, then an exception is thrown. The wait +function provided to a promise constructor is invoked when the `wait` function +of the promise is called. + +```php +$promise = new Promise(function () use (&$promise) { + $promise->resolve('foo'); +}); + +// Calling wait will return the value of the promise. +echo $promise->wait(); // outputs "foo" +``` + +If an exception is encountered while invoking the wait function of a promise, +the promise is rejected with the exception and the exception is thrown. + +```php +$promise = new Promise(function () use (&$promise) { + throw new \Exception('foo'); +}); + +$promise->wait(); // throws the exception. +``` + +Calling `wait` on a promise that has been fulfilled will not trigger the wait +function. It will simply return the previously resolved value. + +```php +$promise = new Promise(function () { die('this is not called!'); }); +$promise->resolve('foo'); +echo $promise->wait(); // outputs "foo" +``` + +Calling `wait` on a promise that has been rejected will throw an exception. If +the rejection reason is an instance of `\Exception` the reason is thrown. +Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason +can be obtained by calling the `getReason` method of the exception. + +```php +$promise = new Promise(); +$promise->reject('foo'); +$promise->wait(); +``` + +> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' + + +## Unwrapping a promise + +When synchronously waiting on a promise, you are joining the state of the +promise into the current state of execution (i.e., return the value of the +promise if it was fulfilled or throw an exception if it was rejected). This is +called "unwrapping" the promise. Waiting on a promise will by default unwrap +the promise state. + +You can force a promise to resolve and *not* unwrap the state of the promise +by passing `false` to the first argument of the `wait` function: + +```php +$promise = new Promise(); +$promise->reject('foo'); +// This will not throw an exception. It simply ensures the promise has +// been resolved. +$promise->wait(false); +``` + +When unwrapping a promise, the resolved value of the promise will be waited +upon until the unwrapped value is not a promise. This means that if you resolve +promise A with a promise B and unwrap promise A, the value returned by the +wait function will be the value delivered to promise B. + +**Note**: when you do not unwrap the promise, no value is returned. + + +# Cancellation + +You can cancel a promise that has not yet been fulfilled using the `cancel()` +method of a promise. When creating a promise you can provide an optional +cancel function that when invoked cancels the action of computing a resolution +of the promise. + + +# API + + +## Promise + +When creating a promise object, you can provide an optional `$waitFn` and +`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is +expected to resolve the promise. `$cancelFn` is a function with no arguments +that is expected to cancel the computation of a promise. It is invoked when the +`cancel()` method of a promise is called. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise( + function () use (&$promise) { + $promise->resolve('waited'); + }, + function () { + // do something that will cancel the promise computation (e.g., close + // a socket, cancel a database query, etc...) + } +); + +assert('waited' === $promise->wait()); +``` + +A promise has the following methods: + +- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` + + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. + +- `wait($unwrap = true) : mixed` + + Synchronously waits on the promise to complete. + + `$unwrap` controls whether or not the value of the promise is returned for a + fulfilled promise or if an exception is thrown if the promise is rejected. + This is set to `true` by default. + +- `cancel()` + + Attempts to cancel the promise if possible. The promise being cancelled and + the parent most ancestor that has not yet been resolved will also be + cancelled. Any promises waiting on the cancelled promise to resolve will also + be cancelled. + +- `getState() : string` + + Returns the state of the promise. One of `pending`, `fulfilled`, or + `rejected`. + +- `resolve($value)` + + Fulfills the promise with the given `$value`. + +- `reject($reason)` + + Rejects the promise with the given `$reason`. + + +## FulfilledPromise + +A fulfilled promise can be created to represent a promise that has been +fulfilled. + +```php +use GuzzleHttp\Promise\FulfilledPromise; + +$promise = new FulfilledPromise('value'); + +// Fulfilled callbacks are immediately invoked. +$promise->then(function ($value) { + echo $value; +}); +``` + + +## RejectedPromise + +A rejected promise can be created to represent a promise that has been +rejected. + +```php +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new RejectedPromise('Error'); + +// Rejected callbacks are immediately invoked. +$promise->then(null, function ($reason) { + echo $reason; +}); +``` + + +# Promise interop + +This library works with foreign promises that have a `then` method. This means +you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) +for example. When a foreign promise is returned inside of a then method +callback, promise resolution will occur recursively. + +```php +// Create a React promise +$deferred = new React\Promise\Deferred(); +$reactPromise = $deferred->promise(); + +// Create a Guzzle promise that is fulfilled with a React promise. +$guzzlePromise = new \GuzzleHttp\Promise\Promise(); +$guzzlePromise->then(function ($value) use ($reactPromise) { + // Do something something with the value... + // Return the React promise + return $reactPromise; +}); +``` + +Please note that wait and cancel chaining is no longer possible when forwarding +a foreign promise. You will need to wrap a third-party promise with a Guzzle +promise in order to utilize wait and cancel functions with foreign promises. + + +## Event Loop Integration + +In order to keep the stack size constant, Guzzle promises are resolved +asynchronously using a task queue. When waiting on promises synchronously, the +task queue will be automatically run to ensure that the blocking promise and +any forwarded promises are resolved. When using promises asynchronously in an +event loop, you will need to run the task queue on each tick of the loop. If +you do not run the task queue, then promises will not be resolved. + +You can run the task queue using the `run()` method of the global task queue +instance. + +```php +// Get the global task queue +$queue = \GuzzleHttp\Promise\queue(); +$queue->run(); +``` + +For example, you could use Guzzle promises with React using a periodic timer: + +```php +$loop = React\EventLoop\Factory::create(); +$loop->addPeriodicTimer(0, [$queue, 'run']); +``` + +*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? + + +# Implementation notes + + +## Promise resolution and chaining is handled iteratively + +By shuffling pending handlers from one owner to another, promises are +resolved iteratively, allowing for "infinite" then chaining. + +```php +then(function ($v) { + // The stack size remains constant (a good thing) + echo xdebug_get_stack_depth() . ', '; + return $v + 1; + }); +} + +$parent->resolve(0); +var_dump($p->wait()); // int(1000) + +``` + +When a promise is fulfilled or rejected with a non-promise value, the promise +then takes ownership of the handlers of each child promise and delivers values +down the chain without using recursion. + +When a promise is resolved with another promise, the original promise transfers +all of its pending handlers to the new promise. When the new promise is +eventually resolved, all of the pending handlers are delivered the forwarded +value. + + +## A promise is the deferred. + +Some promise libraries implement promises using a deferred object to represent +a computation and a promise object to represent the delivery of the result of +the computation. This is a nice separation of computation and delivery because +consumers of the promise cannot modify the value that will be eventually +delivered. + +One side effect of being able to implement promise resolution and chaining +iteratively is that you need to be able for one promise to reach into the state +of another promise to shuffle around ownership of handlers. In order to achieve +this without making the handlers of a promise publicly mutable, a promise is +also the deferred value, allowing promises of the same parent class to reach +into and modify the private properties of promises of the same type. While this +does allow consumers of the value to modify the resolution or rejection of the +deferred, it is a small price to pay for keeping the stack size constant. + +```php +$promise = new Promise(); +$promise->then(function ($value) { echo $value; }); +// The promise is the deferred value, so you can deliver a value to it. +$promise->resolve('foo'); +// prints "foo" +``` diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json new file mode 100644 index 00000000..ec41a61e --- /dev/null +++ b/vendor/guzzlehttp/promises/composer.json @@ -0,0 +1,34 @@ +{ + "name": "guzzlehttp/promises", + "description": "Guzzle promises library", + "keywords": ["promise"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text" + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php new file mode 100644 index 00000000..6a5690c3 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -0,0 +1,16 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + + /** + * @var Generator + */ + private $generator; + + /** + * @var Promise + */ + private $result; + + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new Promise(function () { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + $this->nextCoroutine($this->generator->current()); + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + return $this->result->then($onFulfilled, $onRejected); + } + + public function otherwise(callable $onRejected) + { + return $this->result->otherwise($onRejected); + } + + public function wait($unwrap = true) + { + return $this->result->wait($unwrap); + } + + public function getState() + { + return $this->result->getState(); + } + + public function resolve($value) + { + $this->result->resolve($value); + } + + public function reject($reason) + { + $this->result->reject($reason); + } + + public function cancel() + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + + private function nextCoroutine($yielded) + { + $this->currentPromise = promise_for($yielded) + ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + + /** + * @internal + */ + public function _handleSuccess($value) + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * @internal + */ + public function _handleFailure($reason) + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(exception_for($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php new file mode 100644 index 00000000..d0ddf603 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -0,0 +1,229 @@ +iterable = iter_for($iterable); + + if (isset($config['concurrency'])) { + $this->concurrency = $config['concurrency']; + } + + if (isset($config['fulfilled'])) { + $this->onFulfilled = $config['fulfilled']; + } + + if (isset($config['rejected'])) { + $this->onRejected = $config['rejected']; + } + } + + public function promise() + { + if ($this->aggregate) { + return $this->aggregate; + } + + try { + $this->createPromise(); + $this->iterable->rewind(); + $this->refillPending(); + } catch (\Throwable $e) { + $this->aggregate->reject($e); + } catch (\Exception $e) { + $this->aggregate->reject($e); + } + + return $this->aggregate; + } + + private function createPromise() + { + $this->mutex = false; + $this->aggregate = new Promise(function () { + reset($this->pending); + if (empty($this->pending) && !$this->iterable->valid()) { + $this->aggregate->resolve(null); + return; + } + + // Consume a potentially fluctuating list of promises while + // ensuring that indexes are maintained (precluding array_shift). + while ($promise = current($this->pending)) { + next($this->pending); + $promise->wait(); + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + } + }); + + // Clear the references when the promise is resolved. + $clearFn = function () { + $this->iterable = $this->concurrency = $this->pending = null; + $this->onFulfilled = $this->onRejected = null; + }; + + $this->aggregate->then($clearFn, $clearFn); + } + + private function refillPending() + { + if (!$this->concurrency) { + // Add all pending promises. + while ($this->addPending() && $this->advanceIterator()); + return; + } + + // Add only up to N pending promises. + $concurrency = is_callable($this->concurrency) + ? call_user_func($this->concurrency, count($this->pending)) + : $this->concurrency; + $concurrency = max($concurrency - count($this->pending), 0); + // Concurrency may be set to 0 to disallow new promises. + if (!$concurrency) { + return; + } + // Add the first pending promise. + $this->addPending(); + // Note this is special handling for concurrency=1 so that we do + // not advance the iterator after adding the first promise. This + // helps work around issues with generators that might not have the + // next value to yield until promise callbacks are called. + while (--$concurrency + && $this->advanceIterator() + && $this->addPending()); + } + + private function addPending() + { + if (!$this->iterable || !$this->iterable->valid()) { + return false; + } + + $promise = promise_for($this->iterable->current()); + $idx = $this->iterable->key(); + + $this->pending[$idx] = $promise->then( + function ($value) use ($idx) { + if ($this->onFulfilled) { + call_user_func( + $this->onFulfilled, $value, $idx, $this->aggregate + ); + } + $this->step($idx); + }, + function ($reason) use ($idx) { + if ($this->onRejected) { + call_user_func( + $this->onRejected, $reason, $idx, $this->aggregate + ); + } + $this->step($idx); + } + ); + + return true; + } + + private function advanceIterator() + { + // Place a lock on the iterator so that we ensure to not recurse, + // preventing fatal generator errors. + if ($this->mutex) { + return false; + } + + $this->mutex = true; + + try { + $this->iterable->next(); + $this->mutex = false; + return true; + } catch (\Throwable $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } catch (\Exception $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } + } + + private function step($idx) + { + // If the promise was already resolved, then ignore this step. + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + + unset($this->pending[$idx]); + + // Only refill pending promises if we are not locked, preventing the + // EachPromise to recursively invoke the provided iterator, which + // cause a fatal error: "Cannot resume an already running generator" + if ($this->advanceIterator() && !$this->checkIfFinished()) { + // Add more pending promises if possible. + $this->refillPending(); + } + } + + private function checkIfFinished() + { + if (!$this->pending && !$this->iterable->valid()) { + // Resolve the promise if there's nothing left to do. + $this->aggregate->resolve(null); + return true; + } + + return false; + } +} diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php new file mode 100644 index 00000000..dbbeeb9f --- /dev/null +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -0,0 +1,82 @@ +value = $value; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // Return itself if there is no onFulfilled function. + if (!$onFulfilled) { + return $this; + } + + $queue = queue(); + $p = new Promise([$queue, 'run']); + $value = $this->value; + $queue->add(static function () use ($p, $value, $onFulfilled) { + if ($p->getState() === self::PENDING) { + try { + $p->resolve($onFulfilled($value)); + } catch (\Throwable $e) { + $p->reject($e); + } catch (\Exception $e) { + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + return $unwrap ? $this->value : null; + } + + public function getState() + { + return self::FULFILLED; + } + + public function resolve($value) + { + if ($value !== $this->value) { + throw new \LogicException("Cannot resolve a fulfilled promise"); + } + } + + public function reject($reason) + { + throw new \LogicException("Cannot reject a fulfilled promise"); + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php new file mode 100644 index 00000000..844ada07 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -0,0 +1,280 @@ +waitFn = $waitFn; + $this->cancelFn = $cancelFn; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + if ($this->state === self::PENDING) { + $p = new Promise(null, [$this, 'cancel']); + $this->handlers[] = [$p, $onFulfilled, $onRejected]; + $p->waitList = $this->waitList; + $p->waitList[] = $this; + return $p; + } + + // Return a fulfilled promise and immediately invoke any callbacks. + if ($this->state === self::FULFILLED) { + return $onFulfilled + ? promise_for($this->result)->then($onFulfilled) + : promise_for($this->result); + } + + // It's either cancelled or rejected, so return a rejected promise + // and immediately invoke any callbacks. + $rejection = rejection_for($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true) + { + $this->waitIfPending(); + + $inner = $this->result instanceof PromiseInterface + ? $this->result->wait($unwrap) + : $this->result; + + if ($unwrap) { + if ($this->result instanceof PromiseInterface + || $this->state === self::FULFILLED + ) { + return $inner; + } else { + // It's rejected so "unwrap" and throw an exception. + throw exception_for($inner); + } + } + } + + public function getState() + { + return $this->state; + } + + public function cancel() + { + if ($this->state !== self::PENDING) { + return; + } + + $this->waitFn = $this->waitList = null; + + if ($this->cancelFn) { + $fn = $this->cancelFn; + $this->cancelFn = null; + try { + $fn(); + } catch (\Throwable $e) { + $this->reject($e); + } catch (\Exception $e) { + $this->reject($e); + } + } + + // Reject the promise only if it wasn't rejected in a then callback. + if ($this->state === self::PENDING) { + $this->reject(new CancellationException('Promise has been cancelled')); + } + } + + public function resolve($value) + { + $this->settle(self::FULFILLED, $value); + } + + public function reject($reason) + { + $this->settle(self::REJECTED, $reason); + } + + private function settle($state, $value) + { + if ($this->state !== self::PENDING) { + // Ignore calls with the same resolution. + if ($state === $this->state && $value === $this->result) { + return; + } + throw $this->state === $state + ? new \LogicException("The promise is already {$state}.") + : new \LogicException("Cannot change a {$this->state} promise to {$state}"); + } + + if ($value === $this) { + throw new \LogicException('Cannot fulfill or reject a promise with itself'); + } + + // Clear out the state of the promise but stash the handlers. + $this->state = $state; + $this->result = $value; + $handlers = $this->handlers; + $this->handlers = null; + $this->waitList = $this->waitFn = null; + $this->cancelFn = null; + + if (!$handlers) { + return; + } + + // If the value was not a settled promise or a thenable, then resolve + // it in the task queue using the correct ID. + if (!method_exists($value, 'then')) { + $id = $state === self::FULFILLED ? 1 : 2; + // It's a success, so resolve the handlers in the queue. + queue()->add(static function () use ($id, $value, $handlers) { + foreach ($handlers as $handler) { + self::callHandler($id, $value, $handler); + } + }); + } elseif ($value instanceof Promise + && $value->getState() === self::PENDING + ) { + // We can just merge our handlers onto the next promise. + $value->handlers = array_merge($value->handlers, $handlers); + } else { + // Resolve the handlers when the forwarded promise is resolved. + $value->then( + static function ($value) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(1, $value, $handler); + } + }, + static function ($reason) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(2, $reason, $handler); + } + } + ); + } + } + + /** + * Call a stack of handlers using a specific callback index and value. + * + * @param int $index 1 (resolve) or 2 (reject). + * @param mixed $value Value to pass to the callback. + * @param array $handler Array of handler data (promise and callbacks). + * + * @return array Returns the next group to resolve. + */ + private static function callHandler($index, $value, array $handler) + { + /** @var PromiseInterface $promise */ + $promise = $handler[0]; + + // The promise may have been cancelled or resolved before placing + // this thunk in the queue. + if ($promise->getState() !== self::PENDING) { + return; + } + + try { + if (isset($handler[$index])) { + $promise->resolve($handler[$index]($value)); + } elseif ($index === 1) { + // Forward resolution values as-is. + $promise->resolve($value); + } else { + // Forward rejections down the chain. + $promise->reject($value); + } + } catch (\Throwable $reason) { + $promise->reject($reason); + } catch (\Exception $reason) { + $promise->reject($reason); + } + } + + private function waitIfPending() + { + if ($this->state !== self::PENDING) { + return; + } elseif ($this->waitFn) { + $this->invokeWaitFn(); + } elseif ($this->waitList) { + $this->invokeWaitList(); + } else { + // If there's not wait function, then reject the promise. + $this->reject('Cannot wait on a promise that has ' + . 'no internal wait function. You must provide a wait ' + . 'function when constructing the promise to be able to ' + . 'wait on a promise.'); + } + + queue()->run(); + + if ($this->state === self::PENDING) { + $this->reject('Invoking the wait callback did not resolve the promise'); + } + } + + private function invokeWaitFn() + { + try { + $wfn = $this->waitFn; + $this->waitFn = null; + $wfn(true); + } catch (\Exception $reason) { + if ($this->state === self::PENDING) { + // The promise has not been resolved yet, so reject the promise + // with the exception. + $this->reject($reason); + } else { + // The promise was already resolved, so there's a problem in + // the application. + throw $reason; + } + } + } + + private function invokeWaitList() + { + $waitList = $this->waitList; + $this->waitList = null; + + foreach ($waitList as $result) { + while (true) { + $result->waitIfPending(); + + if ($result->result instanceof Promise) { + $result = $result->result; + } else { + if ($result->result instanceof PromiseInterface) { + $result->result->wait(false); + } + break; + } + } + } + } +} diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php new file mode 100644 index 00000000..8f5f4b99 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -0,0 +1,93 @@ +reason = $reason; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // If there's no onRejected callback then just return self. + if (!$onRejected) { + return $this; + } + + $queue = queue(); + $reason = $this->reason; + $p = new Promise([$queue, 'run']); + $queue->add(static function () use ($p, $reason, $onRejected) { + if ($p->getState() === self::PENDING) { + try { + // Return a resolved promise if onRejected does not throw. + $p->resolve($onRejected($reason)); + } catch (\Throwable $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } catch (\Exception $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + if ($unwrap) { + throw exception_for($this->reason); + } + } + + public function getState() + { + return self::REJECTED; + } + + public function resolve($value) + { + throw new \LogicException("Cannot resolve a rejected promise"); + } + + public function reject($reason) + { + if ($reason !== $this->reason) { + throw new \LogicException("Cannot reject a rejected promise"); + } + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php new file mode 100644 index 00000000..07c1136d --- /dev/null +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -0,0 +1,47 @@ +reason = $reason; + + $message = 'The promise was rejected'; + + if ($description) { + $message .= ' with reason: ' . $description; + } elseif (is_string($reason) + || (is_object($reason) && method_exists($reason, '__toString')) + ) { + $message .= ' with reason: ' . $this->reason; + } elseif ($reason instanceof \JsonSerializable) { + $message .= ' with reason: ' + . json_encode($this->reason, JSON_PRETTY_PRINT); + } + + parent::__construct($message); + } + + /** + * Returns the rejection reason. + * + * @return mixed + */ + public function getReason() + { + return $this->reason; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php new file mode 100644 index 00000000..6e8a2a08 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -0,0 +1,66 @@ +run(); + */ +class TaskQueue implements TaskQueueInterface +{ + private $enableShutdown = true; + private $queue = []; + + public function __construct($withShutdown = true) + { + if ($withShutdown) { + register_shutdown_function(function () { + if ($this->enableShutdown) { + // Only run the tasks if an E_ERROR didn't occur. + $err = error_get_last(); + if (!$err || ($err['type'] ^ E_ERROR)) { + $this->run(); + } + } + }); + } + } + + public function isEmpty() + { + return !$this->queue; + } + + public function add(callable $task) + { + $this->queue[] = $task; + } + + public function run() + { + /** @var callable $task */ + while ($task = array_shift($this->queue)) { + $task(); + } + } + + /** + * The task queue will be run and exhausted by default when the process + * exits IFF the exit is not the result of a PHP E_ERROR error. + * + * You can disable running the automatic shutdown of the queue by calling + * this function. If you disable the task queue shutdown process, then you + * MUST either run the task queue (as a result of running your event loop + * or manually using the run() method) or wait on each outstanding promise. + * + * Note: This shutdown will occur before any destructors are triggered. + */ + public function disableShutdown() + { + $this->enableShutdown = false; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100644 index 00000000..ac8306e1 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,25 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\queue()->run(); + * } + * + * + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface + */ +function queue(TaskQueueInterface $assign = null) +{ + static $queue; + + if ($assign) { + $queue = $assign; + } elseif (!$queue) { + $queue = new TaskQueue(); + } + + return $queue; +} + +/** + * Adds a function to run in the task queue when it is next `run()` and returns + * a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + * + * @return PromiseInterface + */ +function task(callable $task) +{ + $queue = queue(); + $promise = new Promise([$queue, 'run']); + $queue->add(function () use ($task, $promise) { + try { + $promise->resolve($task()); + } catch (\Throwable $e) { + $promise->reject($e); + } catch (\Exception $e) { + $promise->reject($e); + } + }); + + return $promise; +} + +/** + * Creates a promise for a value if the value is not a promise. + * + * @param mixed $value Promise or value. + * + * @return PromiseInterface + */ +function promise_for($value) +{ + if ($value instanceof PromiseInterface) { + return $value; + } + + // Return a Guzzle promise that shadows the given promise. + if (method_exists($value, 'then')) { + $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null; + $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null; + $promise = new Promise($wfn, $cfn); + $value->then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; + } + + return new FulfilledPromise($value); +} + +/** + * Creates a rejected promise for a reason if the reason is not a promise. If + * the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + * + * @return PromiseInterface + */ +function rejection_for($reason) +{ + if ($reason instanceof PromiseInterface) { + return $reason; + } + + return new RejectedPromise($reason); +} + +/** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + * + * @return \Exception|\Throwable + */ +function exception_for($reason) +{ + return $reason instanceof \Exception || $reason instanceof \Throwable + ? $reason + : new RejectionException($reason); +} + +/** + * Returns an iterator for the given value. + * + * @param mixed $value + * + * @return \Iterator + */ +function iter_for($value) +{ + if ($value instanceof \Iterator) { + return $value; + } elseif (is_array($value)) { + return new \ArrayIterator($value); + } else { + return new \ArrayIterator([$value]); + } +} + +/** + * Synchronously waits on a promise to resolve and returns an inspection state + * array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the array + * will contain a "value" key mapping to the fulfilled value of the promise. If + * the promise is rejected, the array will contain a "reason" key mapping to + * the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + * + * @return array + */ +function inspect(PromiseInterface $promise) +{ + try { + return [ + 'state' => PromiseInterface::FULFILLED, + 'value' => $promise->wait() + ]; + } catch (RejectionException $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; + } catch (\Throwable $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } catch (\Exception $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } +} + +/** + * Waits on all of the provided promises, but does not unwrap rejected promises + * as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function inspect_all($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = inspect($promise); + } + + return $results; +} + +/** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same order + * the promises were provided). An exception is thrown if any of the promises + * are rejected. + * + * @param mixed $promises Iterable of PromiseInterface objects to wait on. + * + * @return array + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 + */ +function unwrap($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = $promise->wait(); + } + + return $results; +} + +/** + * Given an array of promises, return a promise that is fulfilled when all the + * items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function all($promises) +{ + $results = []; + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = $value; + }, + function ($reason, $idx, Promise $aggregate) { + $aggregate->reject($reason); + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Initiate a competitive race between multiple promises or values (values will + * become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise is + * fulfilled with an array that contains the fulfillment values of the winners + * in order of resolution. + * + * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} + * if the number of fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function some($count, $promises) +{ + $results = []; + $rejections = []; + + return each( + $promises, + function ($value, $idx, PromiseInterface $p) use (&$results, $count) { + if ($p->getState() !== PromiseInterface::PENDING) { + return; + } + $results[$idx] = $value; + if (count($results) >= $count) { + $p->resolve(null); + } + }, + function ($reason) use (&$rejections) { + $rejections[] = $reason; + } + )->then( + function () use (&$results, &$rejections, $count) { + if (count($results) !== $count) { + throw new AggregateException( + 'Not enough promises to fulfill count', + $rejections + ); + } + ksort($results); + return array_values($results); + } + ); +} + +/** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function any($promises) +{ + return some(1, $promises)->then(function ($values) { return $values[0]; }); +} + +/** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function settle($promises) +{ + $results = []; + + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; + }, + function ($reason, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Given an iterator that yields promises or values, returns a promise that is + * fulfilled with a null value when the iterator has been consumed or the + * aggregate promise has been fulfilled or rejected. + * + * $onFulfilled is a function that accepts the fulfilled value, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * $onRejected is a function that accepts the rejection reason, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * @param mixed $iterable Iterator or array to iterate over. + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each( + $iterable, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected + ]))->promise(); +} + +/** + * Like each, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow for + * dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each_limit( + $iterable, + $concurrency, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency + ]))->promise(); +} + +/** + * Like each_limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface + */ +function each_limit_all( + $iterable, + $concurrency, + callable $onFulfilled = null +) { + return each_limit( + $iterable, + $concurrency, + $onFulfilled, + function ($reason, $idx, PromiseInterface $aggregate) { + $aggregate->reject($reason); + } + ); +} + +/** + * Returns true if a promise is fulfilled. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_fulfilled(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::FULFILLED; +} + +/** + * Returns true if a promise is rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_rejected(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::REJECTED; +} + +/** + * Returns true if a promise is fulfilled or rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_settled(PromiseInterface $promise) +{ + return $promise->getState() !== PromiseInterface::PENDING; +} + +/** + * @see Coroutine + * + * @param callable $generatorFn + * + * @return PromiseInterface + */ +function coroutine(callable $generatorFn) +{ + return new Coroutine($generatorFn); +} diff --git a/vendor/guzzlehttp/promises/src/functions_include.php b/vendor/guzzlehttp/promises/src/functions_include.php new file mode 100644 index 00000000..34cd1710 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/functions_include.php @@ -0,0 +1,6 @@ +withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` +* Fix compatibility of URIs with `file` scheme and empty host. +* Added common URI utility methods based on RFC 3986 (see documentation in the readme): + - `Uri::isDefaultPort` + - `Uri::isAbsolute` + - `Uri::isNetworkPathReference` + - `Uri::isAbsolutePathReference` + - `Uri::isRelativePathReference` + - `Uri::isSameDocumentReference` + - `Uri::composeComponents` + - `UriNormalizer::normalize` + - `UriNormalizer::isEquivalent` + - `UriResolver::relativize` +* Deprecated `Uri::resolve` in favor of `UriResolver::resolve` +* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +## 1.3.1 - 2016-06-25 + +* Fix `Uri::__toString` for network path references, e.g. `//example.org`. +* Fix missing lowercase normalization for host. +* Fix handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +* Fix `Uri::withAddedHeader` to correctly merge headers with different case. +* Fix trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +* Fix `Uri::withAddedHeader` with an array of header values. +* Fix `Uri::resolve` when base path has no slash and handling of fragment. +* Fix handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +* Fix `ServerRequest::withoutAttribute` when attribute value is null. + +## 1.3.0 - 2016-04-13 + +* Added remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +* Added support for stream_for from scalars. +* Can now extend Uri. +* Fixed a bug in validating request methods by making it more permissive. + +## 1.2.3 - 2016-02-18 + +* Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +* Fixed handling of gzipped responses with FNAME headers. + +## 1.2.2 - 2016-01-22 + +* Added support for URIs without any authority. +* Added support for HTTP 451 'Unavailable For Legal Reasons.' +* Added support for using '0' as a filename. +* Added support for including non-standard ports in Host headers. + +## 1.2.1 - 2015-11-02 + +* Now supporting negative offsets when seeking to SEEK_END. + +## 1.2.0 - 2015-08-15 + +* Body as `"0"` is now properly added to a response. +* Now allowing forward seeking in CachingStream. +* Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +* functions.php is now conditionally required. +* user-info is no longer dropped when resolving URIs. + +## 1.1.0 - 2015-06-24 + +* URIs can now be relative. +* `multipart/form-data` headers are now overridden case-insensitively. +* URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +* A port is no longer added to a URI when the scheme is missing and no port is + present. + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` diff --git a/vendor/guzzlehttp/psr7/LICENSE b/vendor/guzzlehttp/psr7/LICENSE new file mode 100644 index 00000000..581d95f9 --- /dev/null +++ b/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md new file mode 100644 index 00000000..16499358 --- /dev/null +++ b/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,739 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) + + +# Stream implementation + +This package comes with a number of stream implementations and stream +decorators. + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\stream_for('abc, '); +$b = Psr7\stream_for('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\stream_for(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\stream_for(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\stream_for('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. + +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + call_user_func($this->callback); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\stream_for('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Function API + +There are various functions available under the `GuzzleHttp\Psr7` namespace. + + +## `function str` + +`function str(MessageInterface $message)` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\str($request); +``` + + +## `function uri_for` + +`function uri_for($uri)` + +This function accepts a string or `Psr\Http\Message\UriInterface` and returns a +UriInterface for the given value. If the value is already a `UriInterface`, it +is returned as-is. + +```php +$uri = GuzzleHttp\Psr7\uri_for('http://example.com'); +assert($uri === GuzzleHttp\Psr7\uri_for($uri)); +``` + + +## `function stream_for` + +`function stream_for($resource = '', array $options = [])` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +* - metadata: Array of custom metadata. +* - size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\stream_for('foo'); +$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); + +$generator function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\stream_for($generator(100)); +``` + + +## `function parse_header` + +`function parse_header($header)` + +Parse an array of header values containing ";" separated data into an array of +associative arrays representing the header key value pair data of the header. +When a parameter does not contain a value, but just contains a key, this +function will inject a key with a '' string value. + + +## `function normalize_header` + +`function normalize_header($header)` + +Converts an array of header values that may contain comma separated headers +into an array of headers with no comma separated values. + + +## `function modify_request` + +`function modify_request(RequestInterface $request, array $changes)` + +Clone and modify a request with the given changes. This method is useful for +reducing the number of clones needed to mutate a message. + +The changes can be one of: + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `function rewind_body` + +`function rewind_body(MessageInterface $message)` + +Attempts to rewind a message body and throws an exception on failure. The body +of the message will only be rewound if a call to `tell()` returns a value other +than `0`. + + +## `function try_fopen` + +`function try_fopen($filename, $mode)` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an error +handler that checks for errors and throws an exception instead. + + +## `function copy_to_string` + +`function copy_to_string(StreamInterface $stream, $maxLen = -1)` + +Copy the contents of a stream into a string until the given number of bytes +have been read. + + +## `function copy_to_stream` + +`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)` + +Copy the contents of a stream into another stream until the given number of +bytes have been read. + + +## `function hash` + +`function hash(StreamInterface $stream, $algo, $rawOutput = false)` + +Calculate a hash of a Stream. This method reads the entire stream to calculate +a rolling hash (based on PHP's hash_init functions). + + +## `function readline` + +`function readline(StreamInterface $stream, $maxLength = null)` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `function parse_request` + +`function parse_request($message)` + +Parses a request message string into a request object. + + +## `function parse_response` + +`function parse_response($message)` + +Parses a response message string into a response object. + + +## `function parse_query` + +`function parse_query($str, $urlEncoding = true)` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key value pair +will become an array. This function does not parse nested PHP style arrays into +an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into +`['foo[a]' => '1', 'foo[b]' => '2']`). + + +## `function build_query` + +`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)` + +Build a query string from an array of key value pairs. + +This function can use the return value of parse_query() to build a query string. +This function does not modify the provided keys when an array is encountered +(like http_build_query would). + + +## `function mimetype_from_filename` + +`function mimetype_from_filename($filename)` + +Determines the mimetype of a file by looking at its extension. + + +## `function mimetype_from_extension` + +`function mimetype_from_extension($extension)` + +Maps a file extensions to a mimetype. + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json new file mode 100644 index 00000000..b1c5a90b --- /dev/null +++ b/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,39 @@ +{ + "name": "guzzlehttp/psr7", + "type": "library", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": ["request", "response", "message", "stream", "http", "uri", "url"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100644 index 00000000..23039fd7 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,233 @@ +addStream($stream); + } + } + + public function __toString() + { + try { + $this->rewind(); + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(StreamInterface $stream) + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = false; + } + + $this->streams[] = $stream; + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Closes each attached stream. + * + * {@inheritdoc} + */ + public function close() + { + $this->pos = $this->current = 0; + + foreach ($this->streams as $stream) { + $stream->close(); + } + + $this->streams = []; + } + + /** + * Detaches each attached stream + * + * {@inheritdoc} + */ + public function detach() + { + $this->close(); + $this->detached = true; + } + + public function tell() + { + return $this->pos; + } + + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + * + * {@inheritdoc} + */ + public function getSize() + { + $size = 0; + + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + + return $size; + } + + public function eof() + { + return !$this->streams || + ($this->current >= count($this->streams) - 1 && + $this->streams[$this->current]->eof()); + } + + public function rewind() + { + $this->seek(0); + } + + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + + $this->pos = $this->current = 0; + + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' + . $i . ' of the AppendStream', 0, $e); + } + } + + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + + /** + * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} + */ + public function read($length) + { + $buffer = ''; + $total = count($this->streams) - 1; + $remaining = $length; + $progressToNext = false; + + while ($remaining > 0) { + + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = false; + if ($this->current === $total) { + break; + } + $this->current++; + } + + $result = $this->streams[$this->current]->read($remaining); + + // Using a loose comparison here to match on '', false, and null + if ($result == null) { + $progressToNext = true; + continue; + } + + $buffer .= $result; + $remaining = $length - strlen($buffer); + } + + $this->pos += strlen($buffer); + + return $buffer; + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return false; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100644 index 00000000..af4d4c22 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,137 @@ +hwm = $hwm; + } + + public function __toString() + { + return $this->getContents(); + } + + public function getContents() + { + $buffer = $this->buffer; + $this->buffer = ''; + + return $buffer; + } + + public function close() + { + $this->buffer = ''; + } + + public function detach() + { + $this->close(); + } + + public function getSize() + { + return strlen($this->buffer); + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return true; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + + public function eof() + { + return strlen($this->buffer) === 0; + } + + public function tell() + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + + /** + * Reads data from the buffer. + */ + public function read($length) + { + $currentLength = strlen($this->buffer); + + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = substr($this->buffer, 0, $length); + $this->buffer = substr($this->buffer, $length); + } + + return $result; + } + + /** + * Writes data to the buffer. + */ + public function write($string) + { + $this->buffer .= $string; + + // TODO: What should happen here? + if (strlen($this->buffer) >= $this->hwm) { + return false; + } + + return strlen($string); + } + + public function getMetadata($key = null) + { + if ($key == 'hwm') { + return $this->hwm; + } + + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100644 index 00000000..ed68f086 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,138 @@ +remoteStream = $stream; + $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + } + + public function getSize() + { + return max($this->stream->getSize(), $this->remoteStream->getSize()); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + if ($whence == SEEK_SET) { + $byte = $offset; + } elseif ($whence == SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence == SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + + $diff = $byte - $this->stream->getSize(); + + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + + public function read($length) + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - strlen($data); + + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read( + $remaining + $this->skipReadBytes + ); + + if ($this->skipReadBytes) { + $len = strlen($remoteData); + $remoteData = substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = max(0, $this->skipReadBytes - $len); + } + + $data .= $remoteData; + $this->stream->write($remoteData); + } + + return $data; + } + + public function write($string) + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + + return $this->stream->write($string); + } + + public function eof() + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + + /** + * Close both the remote stream and buffer stream + */ + public function close() + { + $this->remoteStream->close() && $this->stream->close(); + } + + private function cacheEntireStream() + { + $target = new FnStream(['write' => 'strlen']); + copy_to_stream($this, $target); + + return $this->tell(); + } +} diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100644 index 00000000..8935c80d --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,42 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + + public function write($string) + { + $diff = $this->maxLength - $this->stream->getSize(); + + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + + // Write the stream or a subset of the stream if needed. + if (strlen($string) < $diff) { + return $this->stream->write($string); + } + + return $this->stream->write(substr($string, 0, $diff)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php new file mode 100644 index 00000000..cc9b4453 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -0,0 +1,149 @@ +methods = $methods; + + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_' . $name} = $fn; + } + } + + /** + * Lazily determine which methods are not implemented. + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException(str_replace('_fn_', '', $name) + . '() is not implemented in the FnStream'); + } + + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + call_user_func($this->_fn_close); + } + } + + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; + } + + return new self($methods); + } + + public function __toString() + { + return call_user_func($this->_fn___toString); + } + + public function close() + { + return call_user_func($this->_fn_close); + } + + public function detach() + { + return call_user_func($this->_fn_detach); + } + + public function getSize() + { + return call_user_func($this->_fn_getSize); + } + + public function tell() + { + return call_user_func($this->_fn_tell); + } + + public function eof() + { + return call_user_func($this->_fn_eof); + } + + public function isSeekable() + { + return call_user_func($this->_fn_isSeekable); + } + + public function rewind() + { + call_user_func($this->_fn_rewind); + } + + public function seek($offset, $whence = SEEK_SET) + { + call_user_func($this->_fn_seek, $offset, $whence); + } + + public function isWritable() + { + return call_user_func($this->_fn_isWritable); + } + + public function write($string) + { + return call_user_func($this->_fn_write, $string); + } + + public function isReadable() + { + return call_user_func($this->_fn_isReadable); + } + + public function read($length) + { + return call_user_func($this->_fn_read, $length); + } + + public function getContents() + { + return call_user_func($this->_fn_getContents); + } + + public function getMetadata($key = null) + { + return call_user_func($this->_fn_getMetadata, $key); + } +} diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100644 index 00000000..0051d3fe --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,52 @@ +read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); + $resource = StreamWrapper::getResource($stream); + stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); + $this->stream = new Stream($resource); + } + + /** + * @param StreamInterface $stream + * @param $header + * @return int + */ + private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) + { + $filename_header_length = 0; + + if (substr(bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== chr(0)) { + $filename_header_length++; + } + } + + return $filename_header_length; + } +} diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100644 index 00000000..02cec3af --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,39 @@ +filename = $filename; + $this->mode = $mode; + } + + /** + * Creates the underlying stream lazily when required. + * + * @return StreamInterface + */ + protected function createStream() + { + return stream_for(try_fopen($this->filename, $this->mode)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100644 index 00000000..3c13d4f4 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,155 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + + public function eof() + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return true; + } + + // No limit and the underlying stream is not at EOF + if ($this->limit == -1) { + return false; + } + + return $this->stream->tell() >= $this->offset + $this->limit; + } + + /** + * Returns the size of the limited subset of data + * {@inheritdoc} + */ + public function getSize() + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit == -1) { + return $length - $this->offset; + } else { + return min($this->limit, $length - $this->offset); + } + } + + /** + * Allow for a bounded seek on the read limited stream + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( + 'Cannot seek to offset % with whence %s', + $offset, + $whence + )); + } + + $offset += $this->offset; + + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + + $this->stream->seek($offset); + } + + /** + * Give a relative tell() + * {@inheritdoc} + */ + public function tell() + { + return $this->stream->tell() - $this->offset; + } + + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset($offset) + { + $current = $this->stream->tell(); + + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset $offset"); + } else { + $this->stream->read($offset - $current); + } + } + + $this->offset = $offset; + } + + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit($limit) + { + $this->limit = $limit; + } + + public function read($length) + { + if ($this->limit == -1) { + return $this->stream->read($length); + } + + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = ($this->offset + $this->limit) - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(min($remaining, $length)); + } + + return ''; + } +} diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100644 index 00000000..1e4da649 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,183 @@ + array of values */ + private $headers = []; + + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; + + /** @var string */ + private $protocol = '1.1'; + + /** @var StreamInterface */ + private $stream; + + public function getProtocolVersion() + { + return $this->protocol; + } + + public function withProtocolVersion($version) + { + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = $version; + return $new; + } + + public function getHeaders() + { + return $this->headers; + } + + public function hasHeader($header) + { + return isset($this->headerNames[strtolower($header)]); + } + + public function getHeader($header) + { + $header = strtolower($header); + + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header) + { + return implode(', ', $this->getHeader($header)); + } + + public function withHeader($header, $value) + { + if (!is_array($value)) { + $value = [$value]; + } + + $value = $this->trimHeaderValues($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + public function withAddedHeader($header, $value) + { + if (!is_array($value)) { + $value = [$value]; + } + + $value = $this->trimHeaderValues($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + + return $new; + } + + public function withoutHeader($header) + { + $normalized = strtolower($header); + + if (!isset($this->headerNames[$normalized])) { + return $this; + } + + $header = $this->headerNames[$normalized]; + + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + + return $new; + } + + public function getBody() + { + if (!$this->stream) { + $this->stream = stream_for(''); + } + + return $this->stream; + } + + public function withBody(StreamInterface $body) + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + return $new; + } + + private function setHeaders(array $headers) + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + if (!is_array($value)) { + $value = [$value]; + } + + $value = $this->trimHeaderValues($value); + $normalized = strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param string[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function trimHeaderValues(array $values) + { + return array_map(function ($value) { + return trim($value, " \t"); + }, $values); + } +} diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100644 index 00000000..c0fd584f --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,153 @@ +boundary = $boundary ?: sha1(uniqid('', true)); + $this->stream = $this->createStream($elements); + } + + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() + { + return $this->boundary; + } + + public function isWritable() + { + return false; + } + + /** + * Get the headers needed before transferring the content of a POST file + */ + private function getHeaders(array $headers) + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + + return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + } + + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements) + { + $stream = new AppendStream(); + + foreach ($elements as $element) { + $this->addElement($stream, $element); + } + + // Add the trailing boundary with CRLF + $stream->addStream(stream_for("--{$this->boundary}--\r\n")); + + return $stream; + } + + private function addElement(AppendStream $stream, array $element) + { + foreach (['contents', 'name'] as $key) { + if (!array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + + $element['contents'] = stream_for($element['contents']); + + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if (substr($uri, 0, 6) !== 'php://') { + $element['filename'] = $uri; + } + } + + list($body, $headers) = $this->createElement( + $element['name'], + $element['contents'], + isset($element['filename']) ? $element['filename'] : null, + isset($element['headers']) ? $element['headers'] : [] + ); + + $stream->addStream(stream_for($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(stream_for("\r\n")); + } + + /** + * @return array + */ + private function createElement($name, StreamInterface $stream, $filename, array $headers) + { + // Set a default content-disposition header if one was no provided + $disposition = $this->getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = ($filename === '0' || $filename) + ? sprintf('form-data; name="%s"; filename="%s"', + $name, + basename($filename)) + : "form-data; name=\"{$name}\""; + } + + // Set a default content-length header if one was no provided + $length = $this->getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + + // Set a default Content-Type if one was not supplied + $type = $this->getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + if ($type = mimetype_from_filename($filename)) { + $headers['Content-Type'] = $type; + } + } + + return [$stream, $headers]; + } + + private function getHeader(array $headers, $key) + { + $lowercaseHeader = strtolower($key); + foreach ($headers as $k => $v) { + if (strtolower($k) === $lowercaseHeader) { + return $v; + } + } + + return null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100644 index 00000000..23322180 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,22 @@ +source = $source; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->buffer = new BufferStream(); + } + + public function __toString() + { + try { + return copy_to_string($this); + } catch (\Exception $e) { + return ''; + } + } + + public function close() + { + $this->detach(); + } + + public function detach() + { + $this->tellPos = false; + $this->source = null; + } + + public function getSize() + { + return $this->size; + } + + public function tell() + { + return $this->tellPos; + } + + public function eof() + { + return !$this->source; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + + public function isWritable() + { + return false; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + + public function isReadable() + { + return true; + } + + public function read($length) + { + $data = $this->buffer->read($length); + $readLen = strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += strlen($data) - $readLen; + } + + return $data; + } + + public function getContents() + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; + } + + private function pump($length) + { + if ($this->source) { + do { + $data = call_user_func($this->source, $length); + if ($data === false || $data === null) { + $this->source = null; + return; + } + $this->buffer->write($data); + $length -= strlen($data); + } while ($length > 0); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php new file mode 100644 index 00000000..08285484 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,142 @@ +method = strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!$this->hasHeader('Host')) { + $this->updateHostFromUri(); + } + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + } + + public function getRequestTarget() + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + + $target = $this->uri->getPath(); + if ($target == '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?' . $this->uri->getQuery(); + } + + return $target; + } + + public function withRequestTarget($requestTarget) + { + if (preg_match('#\s#', $requestTarget)) { + throw new InvalidArgumentException( + 'Invalid request target provided; cannot contain whitespace' + ); + } + + $new = clone $this; + $new->requestTarget = $requestTarget; + return $new; + } + + public function getMethod() + { + return $this->method; + } + + public function withMethod($method) + { + $new = clone $this; + $new->method = strtoupper($method); + return $new; + } + + public function getUri() + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false) + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri() + { + $host = $this->uri->getHost(); + + if ($host == '') { + return; + } + + if (($port = $this->uri->getPort()) !== null) { + $host .= ':' . $port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php new file mode 100644 index 00000000..2830c6c9 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,132 @@ + 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-status', + 208 => 'Already Reported', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Switch Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Time-out', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Requested range not satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 425 => 'Unordered Collection', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Time-out', + 505 => 'HTTP Version not supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 511 => 'Network Authentication Required', + ]; + + /** @var string */ + private $reasonPhrase = ''; + + /** @var int */ + private $statusCode = 200; + + /** + * @param int $status Status code + * @param array $headers Response headers + * @param string|null|resource|StreamInterface $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct( + $status = 200, + array $headers = [], + $body = null, + $version = '1.1', + $reason = null + ) { + $this->statusCode = (int) $status; + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + + $this->setHeaders($headers); + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + + $this->protocol = $version; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + public function withStatus($code, $reasonPhrase = '') + { + $new = clone $this; + $new->statusCode = (int) $code; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; + } + $new->reasonPhrase = $reasonPhrase; + return $new; + } +} diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100644 index 00000000..575aab84 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,358 @@ +serverParams = $serverParams; + + parent::__construct($method, $uri, $headers, $body, $version); + } + + /** + * Return an UploadedFile instance array. + * + * @param array $files A array which respect $_FILES structure + * @throws InvalidArgumentException for unrecognized values + * @return array + */ + public static function normalizeFiles(array $files) + { + $normalized = []; + + foreach ($files as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new InvalidArgumentException('Invalid value in files specification'); + } + } + + return $normalized; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * @return array|UploadedFileInterface + */ + private static function createUploadedFileFromSpec(array $value) + { + if (is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + + return new UploadedFile( + $value['tmp_name'], + (int) $value['size'], + (int) $value['error'], + $value['name'], + $value['type'] + ); + } + + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @param array $files + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []) + { + $normalizedFiles = []; + + foreach (array_keys($files['tmp_name']) as $key) { + $spec = [ + 'tmp_name' => $files['tmp_name'][$key], + 'size' => $files['size'][$key], + 'error' => $files['error'][$key], + 'name' => $files['name'][$key], + 'type' => $files['type'][$key], + ]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + + return $normalizedFiles; + } + + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + * + * @return ServerRequestInterface + */ + public static function fromGlobals() + { + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = function_exists('getallheaders') ? getallheaders() : []; + $uri = self::getUriFromGlobals(); + $body = new LazyOpenStream('php://input', 'r+'); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + + $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(self::normalizeFiles($_FILES)); + } + + /** + * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface + */ + public static function getUriFromGlobals() { + $uri = new Uri(''); + + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + + $hasPort = false; + if (isset($_SERVER['HTTP_HOST'])) { + $hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']); + $uri = $uri->withHost($hostHeaderParts[0]); + if (isset($hostHeaderParts[1])) { + $hasPort = true; + $uri = $uri->withPort($hostHeaderParts[1]); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + + $hasQuery = false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = explode('?', $_SERVER['REQUEST_URI']); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + + return $uri; + } + + + /** + * {@inheritdoc} + */ + public function getServerParams() + { + return $this->serverParams; + } + + /** + * {@inheritdoc} + */ + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getCookieParams() + { + return $this->cookieParams; + } + + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getQueryParams() + { + return $this->queryParams; + } + + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + /** + * {@inheritdoc} + */ + public function withParsedBody($data) + { + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttribute($attribute, $default = null) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) + { + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $this; + } + + $new = clone $this; + unset($new->attributes[$attribute]); + + return $new; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100644 index 00000000..e3366287 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,257 @@ + [ + 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, + 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, + 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, + 'x+t' => true, 'c+t' => true, 'a+' => true + ], + 'write' => [ + 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, + 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, + 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, + 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true + ] + ]; + + /** + * This constructor accepts an associative array of options. + * + * - size: (int) If a read stream would otherwise have an indeterminate + * size, but the size is known due to foreknowledge, then you can + * provide that size, in bytes. + * - metadata: (array) Any additional metadata to return when the metadata + * of the stream is accessed. + * + * @param resource $stream Stream resource to wrap. + * @param array $options Associative array of options. + * + * @throws \InvalidArgumentException if the stream is not a stream resource + */ + public function __construct($stream, $options = []) + { + if (!is_resource($stream)) { + throw new \InvalidArgumentException('Stream must be a resource'); + } + + if (isset($options['size'])) { + $this->size = $options['size']; + } + + $this->customMetadata = isset($options['metadata']) + ? $options['metadata'] + : []; + + $this->stream = $stream; + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]); + $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]); + $this->uri = $this->getMetadata('uri'); + } + + public function __get($name) + { + if ($name == 'stream') { + throw new \RuntimeException('The stream is detached'); + } + + throw new \BadMethodCallException('No value for ' . $name); + } + + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + + public function __toString() + { + try { + $this->seek(0); + return (string) stream_get_contents($this->stream); + } catch (\Exception $e) { + return ''; + } + } + + public function getContents() + { + $contents = stream_get_contents($this->stream); + + if ($contents === false) { + throw new \RuntimeException('Unable to read stream contents'); + } + + return $contents; + } + + public function close() + { + if (isset($this->stream)) { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + public function detach() + { + if (!isset($this->stream)) { + return null; + } + + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = false; + + return $result; + } + + public function getSize() + { + if ($this->size !== null) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($this->uri) { + clearstatcache(true, $this->uri); + } + + $stats = fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + + return null; + } + + public function isReadable() + { + return $this->readable; + } + + public function isWritable() + { + return $this->writable; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function eof() + { + return !$this->stream || feof($this->stream); + } + + public function tell() + { + $result = ftell($this->stream); + + if ($result === false) { + throw new \RuntimeException('Unable to determine stream position'); + } + + return $result; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } elseif (fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' + . $offset . ' with whence ' . var_export($whence, true)); + } + } + + public function read($length) + { + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + + if (0 === $length) { + return ''; + } + + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; + } + + public function write($string) + { + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + + // We can't know the size after writing anything + $this->size = null; + $result = fwrite($this->stream, $string); + + if ($result === false) { + throw new \RuntimeException('Unable to write to stream'); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + + $meta = stream_get_meta_data($this->stream); + + return isset($meta[$key]) ? $meta[$key] : null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100644 index 00000000..daec6f52 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,149 @@ +stream = $stream; + } + + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @param string $name Name of the property (allows "stream" only). + * + * @return StreamInterface + */ + public function __get($name) + { + if ($name == 'stream') { + $this->stream = $this->createStream(); + return $this->stream; + } + + throw new \UnexpectedValueException("$name not found on class"); + } + + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + trigger_error('StreamDecorator::__toString exception: ' + . (string) $e, E_USER_ERROR); + return ''; + } + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Allow decorators to implement custom methods + * + * @param string $method Missing method name + * @param array $args Method arguments + * + * @return mixed + */ + public function __call($method, array $args) + { + $result = call_user_func_array([$this->stream, $method], $args); + + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + + public function close() + { + $this->stream->close(); + } + + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + + public function detach() + { + return $this->stream->detach(); + } + + public function getSize() + { + return $this->stream->getSize(); + } + + public function eof() + { + return $this->stream->eof(); + } + + public function tell() + { + return $this->stream->tell(); + } + + public function isReadable() + { + return $this->stream->isReadable(); + } + + public function isWritable() + { + return $this->stream->isWritable(); + } + + public function isSeekable() + { + return $this->stream->isSeekable(); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $this->stream->seek($offset, $whence); + } + + public function read($length) + { + return $this->stream->read($length); + } + + public function write($string) + { + return $this->stream->write($string); + } + + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @return StreamInterface + * @throws \BadMethodCallException + */ + protected function createStream() + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100644 index 00000000..cf7b2232 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,121 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' + . 'writable, or both.'); + } + + return fopen('guzzle://stream', $mode, null, stream_context_create([ + 'guzzle' => ['stream' => $stream] + ])); + } + + /** + * Registers the stream wrapper if needed + */ + public static function register() + { + if (!in_array('guzzle', stream_get_wrappers())) { + stream_wrapper_register('guzzle', __CLASS__); + } + } + + public function stream_open($path, $mode, $options, &$opened_path) + { + $options = stream_context_get_options($this->context); + + if (!isset($options['guzzle']['stream'])) { + return false; + } + + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + + return true; + } + + public function stream_read($count) + { + return $this->stream->read($count); + } + + public function stream_write($data) + { + return (int) $this->stream->write($data); + } + + public function stream_tell() + { + return $this->stream->tell(); + } + + public function stream_eof() + { + return $this->stream->eof(); + } + + public function stream_seek($offset, $whence) + { + $this->stream->seek($offset, $whence); + + return true; + } + + public function stream_stat() + { + static $modeMap = [ + 'r' => 33060, + 'r+' => 33206, + 'w' => 33188 + ]; + + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } +} diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100644 index 00000000..e62bd5c8 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,316 @@ +setError($errorStatus); + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); + + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + + /** + * Depending on the value set file or stream variable + * + * @param mixed $streamOrFile + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile) + { + if (is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (is_resource($streamOrFile)) { + $this->stream = new Stream($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new InvalidArgumentException( + 'Invalid stream or file provided for UploadedFile' + ); + } + } + + /** + * @param int $error + * @throws InvalidArgumentException + */ + private function setError($error) + { + if (false === is_int($error)) { + throw new InvalidArgumentException( + 'Upload file error status must be an integer' + ); + } + + if (false === in_array($error, UploadedFile::$errors)) { + throw new InvalidArgumentException( + 'Invalid error status for UploadedFile' + ); + } + + $this->error = $error; + } + + /** + * @param int $size + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (false === is_int($size)) { + throw new InvalidArgumentException( + 'Upload file size must be an integer' + ); + } + + $this->size = $size; + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringOrNull($param) + { + return in_array(gettype($param), ['string', 'NULL']); + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringNotEmpty($param) + { + return is_string($param) && false === empty($param); + } + + /** + * @param string|null $clientFilename + * @throws InvalidArgumentException + */ + private function setClientFilename($clientFilename) + { + if (false === $this->isStringOrNull($clientFilename)) { + throw new InvalidArgumentException( + 'Upload file client filename must be a string or null' + ); + } + + $this->clientFilename = $clientFilename; + } + + /** + * @param string|null $clientMediaType + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (false === $this->isStringOrNull($clientMediaType)) { + throw new InvalidArgumentException( + 'Upload file client media type must be a string or null' + ); + } + + $this->clientMediaType = $clientMediaType; + } + + /** + * Return true if there is no upload error + * + * @return boolean + */ + private function isOk() + { + return $this->error === UPLOAD_ERR_OK; + } + + /** + * @return boolean + */ + public function isMoved() + { + return $this->moved; + } + + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive() + { + if (false === $this->isOk()) { + throw new RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->isMoved()) { + throw new RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + /** + * {@inheritdoc} + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + return new LazyOpenStream($this->file, 'r+'); + } + + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * @param string $targetPath Path to which to move the uploaded file. + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) + { + $this->validateActive(); + + if (false === $this->isStringNotEmpty($targetPath)) { + throw new InvalidArgumentException( + 'Invalid path provided for move operation; must be a non-empty string' + ); + } + + if ($this->file) { + $this->moved = php_sapi_name() == 'cli' + ? rename($this->file, $targetPath) + : move_uploaded_file($this->file, $targetPath); + } else { + copy_to_stream( + $this->getStream(), + new LazyOpenStream($targetPath, 'w') + ); + + $this->moved = true; + } + + if (false === $this->moved) { + throw new RuntimeException( + sprintf('Uploaded file could not be moved to %s', $targetPath) + ); + } + } + + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() + { + return $this->size; + } + + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() + { + return $this->error; + } + + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() + { + return $this->clientFilename; + } + + /** + * {@inheritdoc} + */ + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100644 index 00000000..f46c1db9 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,702 @@ + 80, + 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, + ]; + + private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; + private static $charSubDelims = '!\$&\'\(\)\*\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; + + /** @var string Uri scheme. */ + private $scheme = ''; + + /** @var string Uri user info. */ + private $userInfo = ''; + + /** @var string Uri host. */ + private $host = ''; + + /** @var int|null Uri port. */ + private $port; + + /** @var string Uri path. */ + private $path = ''; + + /** @var string Uri query string. */ + private $query = ''; + + /** @var string Uri fragment. */ + private $fragment = ''; + + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') + { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { + $parts = parse_url($uri); + if ($parts === false) { + throw new \InvalidArgumentException("Unable to parse URI: $uri"); + } + $this->applyParts($parts); + } + } + + public function __toString() + { + return self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); + } + + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?' . $query; + } + + if ($fragment != '') { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(UriInterface $uri) + { + return $uri->getPort() === null + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return UriResolver::removeDotSegments($path); + } + + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(UriInterface $base, $rel) + { + if (!($rel instanceof UriInterface)) { + $rel = new self($rel); + } + + return UriResolver::resolve($base, $rel); + } + + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + * + * @return UriInterface + */ + public static function withoutQueryValue(UriInterface $uri, $key) + { + $current = $uri->getQuery(); + if ($current === '') { + return $uri; + } + + $decodedKey = rawurldecode($key); + $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { + return rawurldecode(explode('=', $part)[0]) !== $decodedKey; + }); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + * + * @return UriInterface + */ + public static function withQueryValue(UriInterface $uri, $key, $value) + { + $current = $uri->getQuery(); + + if ($current === '') { + $result = []; + } else { + $decodedKey = rawurldecode($key); + $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { + return rawurldecode(explode('=', $part)[0]) !== $decodedKey; + }); + } + + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $key = strtr($key, self::$replaceQuery); + + if ($value !== null) { + $result[] = $key . '=' . strtr($value, self::$replaceQuery); + } else { + $result[] = $key; + } + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a URI from a hash of `parse_url` components. + * + * @param array $parts + * + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. + */ + public static function fromParts(array $parts) + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + + return $uri; + } + + public function getScheme() + { + return $this->scheme; + } + + public function getAuthority() + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo . '@' . $authority; + } + + if ($this->port !== null) { + $authority .= ':' . $this->port; + } + + return $authority; + } + + public function getUserInfo() + { + return $this->userInfo; + } + + public function getHost() + { + return $this->host; + } + + public function getPort() + { + return $this->port; + } + + public function getPath() + { + return $this->path; + } + + public function getQuery() + { + return $this->query; + } + + public function getFragment() + { + return $this->fragment; + } + + public function withScheme($scheme) + { + $scheme = $this->filterScheme($scheme); + + if ($this->scheme === $scheme) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withUserInfo($user, $password = null) + { + $info = $user; + if ($password != '') { + $info .= ':' . $password; + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + $new->validateState(); + + return $new; + } + + public function withHost($host) + { + $host = $this->filterHost($host); + + if ($this->host === $host) { + return $this; + } + + $new = clone $this; + $new->host = $host; + $new->validateState(); + + return $new; + } + + public function withPort($port) + { + $port = $this->filterPort($port); + + if ($this->port === $port) { + return $this; + } + + $new = clone $this; + $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withPath($path) + { + $path = $this->filterPath($path); + + if ($this->path === $path) { + return $this; + } + + $new = clone $this; + $new->path = $path; + $new->validateState(); + + return $new; + } + + public function withQuery($query) + { + $query = $this->filterQueryAndFragment($query); + + if ($this->query === $query) { + return $this; + } + + $new = clone $this; + $new->query = $query; + + return $new; + } + + public function withFragment($fragment) + { + $fragment = $this->filterQueryAndFragment($fragment); + + if ($this->fragment === $fragment) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + + return $new; + } + + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts) + { + $this->scheme = isset($parts['scheme']) + ? $this->filterScheme($parts['scheme']) + : ''; + $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; + $this->host = isset($parts['host']) + ? $this->filterHost($parts['host']) + : ''; + $this->port = isset($parts['port']) + ? $this->filterPort($parts['port']) + : null; + $this->path = isset($parts['path']) + ? $this->filterPath($parts['path']) + : ''; + $this->query = isset($parts['query']) + ? $this->filterQueryAndFragment($parts['query']) + : ''; + $this->fragment = isset($parts['fragment']) + ? $this->filterQueryAndFragment($parts['fragment']) + : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':' . $parts['pass']; + } + + $this->removeDefaultPort(); + } + + /** + * @param string $scheme + * + * @return string + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme) + { + if (!is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + return strtolower($scheme); + } + + /** + * @param string $host + * + * @return string + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host) + { + if (!is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + return strtolower($host); + } + + /** + * @param int|null $port + * + * @return int|null + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port) + { + if ($port === null) { + return null; + } + + $port = (int) $port; + if (1 > $port || 0xffff < $port) { + throw new \InvalidArgumentException( + sprintf('Invalid port: %d. Must be between 1 and 65535', $port) + ); + } + + return $port; + } + + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + + /** + * Filters the path of a URI + * + * @param string $path + * + * @return string + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path) + { + if (!is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $path + ); + } + + /** + * Filters the query string or fragment of a URI. + * + * @param string $str + * + * @return string + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str) + { + if (!is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $str + ); + } + + private function rawurlencodeMatchZero(array $match) + { + return rawurlencode($match[0]); + } + + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/'. $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 00000000..384c29e5 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,216 @@ +getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match) { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match) { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 00000000..c1cb8a27 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,219 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(UriInterface $base, UriInterface $target) + { + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target) + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php new file mode 100644 index 00000000..e40348d6 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,828 @@ +getMethod() . ' ' + . $message->getRequestTarget()) + . ' HTTP/' . $message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: " . $message->getUri()->getHost(); + } + } elseif ($message instanceof ResponseInterface) { + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' + . $message->getStatusCode() . ' ' + . $message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + + foreach ($message->getHeaders() as $name => $values) { + $msg .= "\r\n{$name}: " . implode(', ', $values); + } + + return "{$msg}\r\n\r\n" . $message->getBody(); +} + +/** + * Returns a UriInterface for the given value. + * + * This function accepts a string or {@see Psr\Http\Message\UriInterface} and + * returns a UriInterface for the given value. If the value is already a + * `UriInterface`, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * @throws \InvalidArgumentException + */ +function uri_for($uri) +{ + if ($uri instanceof UriInterface) { + return $uri; + } elseif (is_string($uri)) { + return new Uri($uri); + } + + throw new \InvalidArgumentException('URI must be a string or UriInterface'); +} + +/** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data + * @param array $options Additional options + * + * @return Stream + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ +function stream_for($resource = '', array $options = []) +{ + if (is_scalar($resource)) { + $stream = fopen('php://temp', 'r+'); + if ($resource !== '') { + fwrite($stream, $resource); + fseek($stream, 0); + } + return new Stream($stream, $options); + } + + switch (gettype($resource)) { + case 'resource': + return new Stream($resource, $options); + case 'object': + if ($resource instanceof StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new PumpStream(function () use ($resource) { + if (!$resource->valid()) { + return false; + } + $result = $resource->current(); + $resource->next(); + return $result; + }, $options); + } elseif (method_exists($resource, '__toString')) { + return stream_for((string) $resource, $options); + } + break; + case 'NULL': + return new Stream(fopen('php://temp', 'r+'), $options); + } + + if (is_callable($resource)) { + return new PumpStream($resource, $options); + } + + throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); +} + +/** + * Parse an array of header values containing ";" separated data into an + * array of associative arrays representing the header key value pair + * data of the header. When a parameter does not contain a value, but just + * contains a key, this function will inject a key with a '' string value. + * + * @param string|array $header Header to parse into components. + * + * @return array Returns the parsed header values. + */ +function parse_header($header) +{ + static $trimmed = "\"' \n\t\r"; + $params = $matches = []; + + foreach (normalize_header($header) as $val) { + $part = []; + foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { + if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + + return $params; +} + +/** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @return array Returns the normalized header field values. + */ +function normalize_header($header) +{ + if (!is_array($header)) { + return array_map('trim', explode(',', $header)); + } + + $result = []; + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (strpos($v, ',') === false) { + $result[] = $v; + continue; + } + foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = trim($vv); + } + } + } + + return $result; +} + +/** + * Clone and modify a request with the given changes. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + * + * @return RequestInterface + */ +function modify_request(RequestInterface $request, array $changes) +{ + if (!$changes) { + return $request; + } + + $headers = $request->getHeaders(); + + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':'.$port; + } + } + } + $uri = $changes['uri']; + } + + if (!empty($changes['remove_headers'])) { + $headers = _caseless_remove($changes['remove_headers'], $headers); + } + + if (!empty($changes['set_headers'])) { + $headers = _caseless_remove(array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + + if ($request instanceof ServerRequestInterface) { + return new ServerRequest( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion(), + $request->getServerParams() + ); + } + + return new Request( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion() + ); +} + +/** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` returns a + * value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ +function rewind_body(MessageInterface $message) +{ + $body = $message->getBody(); + + if ($body->tell()) { + $body->rewind(); + } +} + +/** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * @throws \RuntimeException if the file cannot be opened + */ +function try_fopen($filename, $mode) +{ + $ex = null; + set_error_handler(function () use ($filename, $mode, &$ex) { + $ex = new \RuntimeException(sprintf( + 'Unable to open %s using mode %s: %s', + $filename, + $mode, + func_get_args()[1] + )); + }); + + $handle = fopen($filename, $mode); + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $handle; +} + +/** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * @return string + * @throws \RuntimeException on error. + */ +function copy_to_string(StreamInterface $stream, $maxLen = -1) +{ + $buffer = ''; + + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + } + return $buffer; + } + + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + $len = strlen($buffer); + } + + return $buffer; +} + +/** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ +function copy_to_stream( + StreamInterface $source, + StreamInterface $dest, + $maxLen = -1 +) { + $bufferSize = 8192; + + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } +} + +/** + * Calculate a hash of a Stream + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @return string Returns the hash of the stream + * @throws \RuntimeException on error. + */ +function hash( + StreamInterface $stream, + $algo, + $rawOutput = false +) { + $pos = $stream->tell(); + + if ($pos > 0) { + $stream->rewind(); + } + + $ctx = hash_init($algo); + while (!$stream->eof()) { + hash_update($ctx, $stream->read(1048576)); + } + + $out = hash_final($ctx, (bool) $rawOutput); + $stream->seek($pos); + + return $out; +} + +/** + * Read a line from the stream up to the maximum allowed buffer length + * + * @param StreamInterface $stream Stream to read from + * @param int $maxLength Maximum buffer length + * + * @return string|bool + */ +function readline(StreamInterface $stream, $maxLength = null) +{ + $buffer = ''; + $size = 0; + + while (!$stream->eof()) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + + return $buffer; +} + +/** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + * + * @return Request + */ +function parse_request($message) +{ + $data = _parse_message($message); + $matches = []; + if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; + + $request = new Request( + $parts[0], + $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], + $data['headers'], + $data['body'], + $version + ); + + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); +} + +/** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + * + * @return Response + */ +function parse_response($message) +{ + $data = _parse_message($message); + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string'); + } + $parts = explode(' ', $data['start-line'], 3); + + return new Response( + $parts[1], + $data['headers'], + $data['body'], + explode('/', $parts[0])[1], + isset($parts[2]) ? $parts[2] : null + ); +} + +/** + * Parse a query string into an associative array. + * + * If multiple values are found for the same key, the value of that key + * value pair will become an array. This function does not parse nested + * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will + * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). + * + * @param string $str Query string to parse + * @param bool|string $urlEncoding How the query string is encoded + * + * @return array + */ +function parse_query($str, $urlEncoding = true) +{ + $result = []; + + if ($str === '') { + return $result; + } + + if ($urlEncoding === true) { + $decoder = function ($value) { + return rawurldecode(str_replace('+', ' ', $value)); + }; + } elseif ($urlEncoding == PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding == PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { return $str; }; + } + + foreach (explode('&', $str) as $kvp) { + $parts = explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!isset($result[$key])) { + $result[$key] = $value; + } else { + if (!is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + + return $result; +} + +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of parse_query() to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like http_build_query would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + */ +function build_query(array $params, $encoding = PHP_QUERY_RFC3986) +{ + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function ($str) { return $str; }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder($k); + if (!is_array($v)) { + $qs .= $k; + if ($v !== null) { + $qs .= '=' . $encoder($v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + if ($vv !== null) { + $qs .= '=' . $encoder($vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; +} + +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param $filename + * + * @return null|string + */ +function mimetype_from_filename($filename) +{ + return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION)); +} + +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + */ +function mimetype_from_extension($extension) +{ + static $mimetypes = [ + '7z' => 'application/x-7z-compressed', + 'aac' => 'audio/x-aac', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'asc' => 'text/plain', + 'asf' => 'video/x-ms-asf', + 'atom' => 'application/atom+xml', + 'avi' => 'video/x-msvideo', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bzip2', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dvi' => 'application/x-dvi', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'etx' => 'text/x-setext', + 'flac' => 'audio/flac', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/gzip', + 'htm' => 'text/html', + 'html' => 'text/html', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ini' => 'text/plain', + 'iso' => 'application/x-iso9660-image', + 'jar' => 'application/java-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'text/javascript', + 'json' => 'application/json', + 'latex' => 'application/x-latex', + 'log' => 'text/plain', + 'm4a' => 'audio/mp4', + 'm4v' => 'video/mp4', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4v' => 'video/mp4', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'pbm' => 'image/x-portable-bitmap', + 'pdf' => 'application/pdf', + 'pgm' => 'image/x-portable-graymap', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'ppm' => 'image/x-portable-pixmap', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'qt' => 'video/quicktime', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'svg' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'torrent' => 'application/x-bittorrent', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'wav' => 'audio/x-wav', + 'webm' => 'video/webm', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'video/x-ms-wmv', + 'woff' => 'application/x-font-woff', + 'wsdl' => 'application/wsdl+xml', + 'xbm' => 'image/x-xbitmap', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'yaml' => 'text/yaml', + 'yml' => 'text/yaml', + 'zip' => 'application/zip', + ]; + + $extension = strtolower($extension); + + return isset($mimetypes[$extension]) + ? $mimetypes[$extension] + : null; +} + +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * @internal + */ +function _parse_message($message) +{ + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + + // Iterate over each line in the message, accounting for line endings + $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE); + $result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => '']; + array_shift($lines); + + for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) { + $line = $lines[$i]; + // If two line breaks were encountered, then this is the end of body + if (empty($line)) { + if ($i < $totalLines - 1) { + $result['body'] = implode('', array_slice($lines, $i + 2)); + } + break; + } + if (strpos($line, ':')) { + $parts = explode(':', $line, 2); + $key = trim($parts[0]); + $value = isset($parts[1]) ? trim($parts[1]) : ''; + $result['headers'][$key][] = $value; + } + } + + return $result; +} + +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * @internal + */ +function _parse_request_uri($path, array $headers) +{ + $hostKey = array_filter(array_keys($headers), function ($k) { + return strtolower($k) === 'host'; + }); + + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + + $host = $headers[reset($hostKey)][0]; + $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; + + return $scheme . '://' . $host . '/' . ltrim($path, '/'); +} + +/** @internal */ +function _caseless_remove($keys, array $data) +{ + $result = []; + + foreach ($keys as &$key) { + $key = strtolower($key); + } + + foreach ($data as $k => $v) { + if (!in_array(strtolower($k), $keys)) { + $result[$k] = $v; + } + } + + return $result; +} diff --git a/vendor/guzzlehttp/psr7/src/functions_include.php b/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100644 index 00000000..96a4a83a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,6 @@ +, 1 April 1990 Ty Coon, President of Vice -That's all there is to it! - - +That's all there is to it! \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/README.md b/vendor/phpmailer/phpmailer/README.md new file mode 100644 index 00000000..3dc7aba4 --- /dev/null +++ b/vendor/phpmailer/phpmailer/README.md @@ -0,0 +1,219 @@ +![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) + +# PHPMailer - A full-featured email creation and transfer class for PHP + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) +[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) + +[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) + +## Class Features +- Probably the world's most popular code for sending email from PHP! +- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more +- Integrated SMTP support - send without a local mail server +- Send emails with multiple To, CC, BCC and Reply-to addresses +- Multipart/alternative emails for mail clients that do not read HTML email +- Add attachments, including inline +- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings +- SMTP authentication with LOGIN, PLAIN, CRAM-MD5 and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports +- Validates email addresses automatically +- Protect against header injection attacks +- Error messages in 47 languages! +- DKIM and S/MIME signing support +- Compatible with PHP 5.5 and later +- Namespaced to prevent name clashes +- Much more! + +## Why you might need it +Many PHP developers utilize email in their code. The only PHP function that supports this is the `mail()` function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments. + +Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong! +*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc. + +The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. + +## License +This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read LICENSE for information on the +software availability and distribution. + +## Installation & loading +PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via composer is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: + +```json +"phpmailer/phpmailer": "~6.0" +``` + +or run + +```sh +composer require phpmailer/phpmailer +``` + +Note that the `vendor` folder and the `vendor/autoload.php` script are generated by composer; they are not part of PHPMailer. + +If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. + +Alternatively, if you're not using composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: + +```php +SMTPDebug = 2; // Enable verbose debug output + $mail->isSMTP(); // Set mailer to use SMTP + $mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers + $mail->SMTPAuth = true; // Enable SMTP authentication + $mail->Username = 'user@example.com'; // SMTP username + $mail->Password = 'secret'; // SMTP password + $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted + $mail->Port = 587; // TCP port to connect to + + //Recipients + $mail->setFrom('from@example.com', 'Mailer'); + $mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient + $mail->addAddress('ellen@example.com'); // Name is optional + $mail->addReplyTo('info@example.com', 'Information'); + $mail->addCC('cc@example.com'); + $mail->addBCC('bcc@example.com'); + + //Attachments + $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments + $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name + + //Content + $mail->isHTML(true); // Set email format to HTML + $mail->Subject = 'Here is the subject'; + $mail->Body = 'This is the HTML message body in bold!'; + $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; + + $mail->send(); + echo 'Message has been sent'; +} catch (Exception $e) { + echo 'Message could not be sent.'; + echo 'Mailer Error: ' . $mail->ErrorInfo; +} +``` + +You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. + +That's it. You should now be ready to use PHPMailer! + +## Localization +PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find numerous (46 at the time of writing!) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: + +```php +// To load the French version +$mail->setLanguage('fr', '/optional/path/to/language/directory/'); +``` + +We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. + +## Documentation +Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated. + +Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps). + +Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly. + +Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/). + +You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in teh `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/phpmailerTest.php) a good source of how to do various operations such as encryption. + +If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). + +## Tests +There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5. + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) + +If this isn't passing, is there something you can do to help? + +## Security + +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues. + +## Contributing +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). + +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. + +If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it. + +If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: + +```sh +git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git +``` + +Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained. + +## Sponsorship +Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system. + +Smartmessages email marketing + +Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors). + +## Changelog +See [changelog](changelog.md). + +## History +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). +- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004. +- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. +- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008. +- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013. +- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013. + +### What's changed since moving from SourceForge? +- Official successor to the SourceForge and Google Code projects. +- Test suite. +- Continuous integration with Travis-CI. +- Composer support. +- Public development. +- Additional languages and language strings. +- CRAM-MD5 authentication support. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/vendor/phpmailer/phpmailer/SECURITY.md b/vendor/phpmailer/phpmailer/SECURITY.md new file mode 100644 index 00000000..57a1f136 --- /dev/null +++ b/vendor/phpmailer/phpmailer/SECURITY.md @@ -0,0 +1,26 @@ +# Security notices relating to PHPMailer + +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending. + +PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file. + +PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack. + +Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747). + +PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734). + +PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807). + +PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215). + diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION new file mode 100644 index 00000000..39c5d6a6 --- /dev/null +++ b/vendor/phpmailer/phpmailer/VERSION @@ -0,0 +1 @@ +6.0.3 \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php new file mode 100644 index 00000000..1237b57b --- /dev/null +++ b/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -0,0 +1,144 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Get an OAuth2 token from an OAuth2 provider. + * * Install this script on your server so that it's accessible + * as [https/http]:////get_oauth_token.php + * e.g.: http://localhost/phpmailer/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google/Yahoo/Microsoft account + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, + * revoke access to your app and run the script again. + */ + +namespace PHPMailer\PHPMailer; + +/** + * Aliases for League Provider Classes + * Make sure you have added these to your composer.json and run `composer install` + * Plenty to choose from here: + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ + */ +// @see https://github.com/thephpleague/oauth2-google +use League\OAuth2\Client\Provider\Google; +// @see https://packagist.org/packages/hayageek/oauth2-yahoo +use Hayageek\OAuth2\Client\Provider\Yahoo; +// @see https://github.com/stevenmaguire/oauth2-microsoft +use Stevenmaguire\OAuth2\Client\Provider\Microsoft; + +if (!isset($_GET['code']) && !isset($_GET['provider'])) { +?> + +Select Provider:
+Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
+ + + $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'accessType' => 'offline' +]; + +$options = []; +$provider = null; + +switch ($providerName) { + case 'Google': + $provider = new Google($params); + $options = [ + 'scope' => [ + 'https://mail.google.com/' + ] + ]; + break; + case 'Yahoo': + $provider = new Yahoo($params); + break; + case 'Microsoft': + $provider = new Microsoft($params); + $options = [ + 'scope' => [ + 'wl.imap', + 'wl.offline_access' + ] + ]; + break; +} + +if (null === $provider) { + exit('Provider missing'); +} + +if (!isset($_GET['code'])) { + // If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl($options); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; +// Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + unset($_SESSION['provider']); + exit('Invalid state'); +} else { + unset($_SESSION['provider']); + // Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + [ + 'code' => $_GET['code'] + ] + ); + // Use this to interact with an API on the users behalf + // Use this to get a new access token if the old one expires + echo 'Refresh Token: ', $token->getRefreshToken(); +} diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php new file mode 100644 index 00000000..ff2a9695 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; +$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; +$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; +$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; +$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; +$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; +$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; +$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; +$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; +$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; +$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; +$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; +$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php new file mode 100644 index 00000000..790e2a5e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; +$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; +$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; +$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; +$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; +$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; +$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; +$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; +$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; +$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; +$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' . + 'فشل في الارسال لكل من : '; +$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; +$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php new file mode 100644 index 00000000..3749d83d --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php new file mode 100644 index 00000000..e2f98f0f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; +$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; +$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; +$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; +$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; +$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; +$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; +$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; +$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; +$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; +$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; +$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; +$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; +$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php new file mode 100644 index 00000000..b22941f6 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; +$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; +$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; +$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; +$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; +$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; +$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; +$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; +$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; +$PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; +$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; +$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php new file mode 100644 index 00000000..4117596c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; +$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; +$PHPMAILER_LANG['execute'] = 'No es pot executar: '; +$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; +$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; +$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG['signing'] = 'Error al signar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php new file mode 100644 index 00000000..4fda6b85 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php new file mode 100644 index 00000000..1160cf0c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; +$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; +$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php new file mode 100644 index 00000000..aa987a9c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío'; +$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; +$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; +$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; +$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Error al firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php new file mode 100644 index 00000000..7e06da13 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; +$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; +$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; +$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; +$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; +$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; +$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; +$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; +$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; +$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; +$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; +$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; +$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php new file mode 100644 index 00000000..ad0745c5 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php @@ -0,0 +1,27 @@ + + * @author Mohammad Hossein Mojtahedi + */ + +$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; +$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; +$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; +$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; +$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; +$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; +$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; +$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; +$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; +$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; +$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; +$PHPMAILER_LANG['signing'] = 'خطا در امضا: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php new file mode 100644 index 00000000..ec4e7523 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; +$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; +$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; +$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; +$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; +$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; +$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php new file mode 100644 index 00000000..af68c923 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -0,0 +1,29 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; +$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; +$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; +$PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; +$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; +$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php new file mode 100644 index 00000000..70eb7175 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; +$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; +$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; +$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; +$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; +$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; +$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; +$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; +$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; +$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; +$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php new file mode 100644 index 00000000..3822920a --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; +$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php new file mode 100644 index 00000000..d7ca8887 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php @@ -0,0 +1,26 @@ + + * @author @januridp + */ + +$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.'; +$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima peladen.'; +$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; +$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : '; +$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak bisa dibuka : '; +$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel'; +$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : '; +$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Pengirim tidak didukung'; +$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : '; +$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : '; +$PHPMAILER_LANG['variable_set'] = 'Tidak berhasil mengatur atau mengatur ulang variable : '; +$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php new file mode 100644 index 00000000..d2f4643e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php @@ -0,0 +1,27 @@ + + * @author Stefano Sabatini + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; +$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; +$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; +$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; +$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; +$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; +$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; +$PHPMAILER_LANG['signing'] = 'Errore nella firma: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; +$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php new file mode 100644 index 00000000..2d778728 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -0,0 +1,27 @@ + + * @author Yoshi Sakai + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; +$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; +$PHPMAILER_LANG['execute'] = '実行できませんでした: '; +$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; +$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; +$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php new file mode 100644 index 00000000..dd1af8ab --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; +$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; +$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; +$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; +$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; +$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; +$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; +$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; +$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; +$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; +$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; +$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; +$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php new file mode 100644 index 00000000..9599fa68 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; +$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; +$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; +$PHPMAILER_LANG['execute'] = '실행 불가: '; +$PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; +$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; +$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; +$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; +$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['signing'] = '서명 오류: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; +$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; +$PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php new file mode 100644 index 00000000..1253a4fd --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; +$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; +$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; +$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; +$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; +$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; +$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; +$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; +$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; +$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; +$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; +$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php new file mode 100644 index 00000000..39bf9a19 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; +$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; +$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; +$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; +$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; +$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; +$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; +$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; +$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; +$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; +$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php new file mode 100644 index 00000000..4e2c3408 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; +$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; +$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; +$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; +$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; +$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; +$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; +$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; +$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php new file mode 100644 index 00000000..44610542 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; +$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; +$PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; +$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; +$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; +$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; +$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; +$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; +$PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; +$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php new file mode 100644 index 00000000..3da0dee9 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; +$PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php new file mode 100644 index 00000000..4ec10f77 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -0,0 +1,29 @@ + + * @author Lucas Guimarães + * @author Phelipe Alves + * @author Fabio Beneditto + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; +$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php new file mode 100644 index 00000000..fa100eaa --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; +$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; +$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; +$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; +$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; +$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; +$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; +$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; +$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; +$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; +$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; +$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; +$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php new file mode 100644 index 00000000..0502f021 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-rs.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: није могуће повезивање са SMTP сервером.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; +$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; +$PHPMAILER_LANG['encoding'] = 'Непознато кодовање: '; +$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; +$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; +$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; +$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; +$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; +$PHPMAILER_LANG['provide_address'] = 'Потребно је задати најмање једну адресу.'; +$PHPMAILER_LANG['signing'] = 'Грешка приликом пријављивања: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Није могуће задати променљиву, нити је вратити уназад: '; +$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php new file mode 100644 index 00000000..4066f6b4 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php @@ -0,0 +1,27 @@ + + * @author Foster Snowhill + */ + +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; +$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; +$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: '; +$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; +$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; +$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: '; +$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; +$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.'; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: '; +$PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php new file mode 100644 index 00000000..a38f4e52 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; +$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; +$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; +$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; +$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; +$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; +$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; +$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; +$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; +$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; +$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php new file mode 100644 index 00000000..54c95725 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Ne morem vzpostaviti povezave s SMTP gostiteljem.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; +$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; +$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; +$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; +$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; +$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; +$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; +$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; +$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; +$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; +$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php new file mode 100644 index 00000000..4408e63e --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; +$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; +$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; +$PHPMAILER_LANG['signing'] = 'Signerings fel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: '; +$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php new file mode 100644 index 00000000..cfe8eaae --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php @@ -0,0 +1,30 @@ + + * @fixed by Boris Yurchenko + */ + +$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; +$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.'; +$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: '; +$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; +$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; +$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; +$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; +$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.'; +$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; +$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: '; +$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення'; +$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат адреси e-mail: '; +$PHPMAILER_LANG['signing'] = 'Помилка підпису: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання із SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php new file mode 100644 index 00000000..c60dadeb --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; +$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; +$PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; +$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; +$PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; +$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; +$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; +$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; +$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; +$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; +$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; +$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; +$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; +$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; +$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php new file mode 100644 index 00000000..3e9e358c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php @@ -0,0 +1,28 @@ + + * @author Peter Dave Hello <@PeterDaveHello/> + * @author Jason Chiang + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; +$PHPMAILER_LANG['empty_message'] = '郵件內容為空'; +$PHPMAILER_LANG['encoding'] = '未知編碼: '; +$PHPMAILER_LANG['execute'] = '無法執行:'; +$PHPMAILER_LANG['file_access'] = '無法存取檔案:'; +$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; +$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; +$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; +$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; +$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; +$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; +$PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; +$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; +$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php new file mode 100644 index 00000000..37537802 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php @@ -0,0 +1,28 @@ + + * @author young + * @author Teddysun + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; +$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '无法执行:'; +$PHPMAILER_LANG['file_access'] = '无法访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; +$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; +$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; +$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; +$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; +$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; +$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/vendor/phpmailer/phpmailer/src/Exception.php b/vendor/phpmailer/phpmailer/src/Exception.php new file mode 100644 index 00000000..9a05dec3 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/Exception.php @@ -0,0 +1,39 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage()) . "
\n"; + } +} diff --git a/vendor/phpmailer/phpmailer/src/OAuth.php b/vendor/phpmailer/phpmailer/src/OAuth.php new file mode 100644 index 00000000..0bce7e34 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/OAuth.php @@ -0,0 +1,138 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2015 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +use League\OAuth2\Client\Grant\RefreshToken; +use League\OAuth2\Client\Provider\AbstractProvider; +use League\OAuth2\Client\Token\AccessToken; + +/** + * OAuth - OAuth2 authentication wrapper class. + * Uses the oauth2-client package from the League of Extraordinary Packages. + * + * @see http://oauth2-client.thephpleague.com + * + * @author Marcus Bointon (Synchro/coolbru) + */ +class OAuth +{ + /** + * An instance of the League OAuth Client Provider. + * + * @var AbstractProvider + */ + protected $provider; + + /** + * The current OAuth access token. + * + * @var AccessToken + */ + protected $oauthToken; + + /** + * The user's email address, usually used as the login ID + * and also the from address when sending email. + * + * @var string + */ + protected $oauthUserEmail = ''; + + /** + * The client secret, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientSecret = ''; + + /** + * The client ID, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientId = ''; + + /** + * The refresh token, used to obtain new AccessTokens. + * + * @var string + */ + protected $oauthRefreshToken = ''; + + /** + * OAuth constructor. + * + * @param array $options Associative array containing + * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements + */ + public function __construct($options) + { + $this->provider = $options['provider']; + $this->oauthUserEmail = $options['userName']; + $this->oauthClientSecret = $options['clientSecret']; + $this->oauthClientId = $options['clientId']; + $this->oauthRefreshToken = $options['refreshToken']; + } + + /** + * Get a new RefreshToken. + * + * @return RefreshToken + */ + protected function getGrant() + { + return new RefreshToken(); + } + + /** + * Get a new AccessToken. + * + * @return AccessToken + */ + protected function getToken() + { + return $this->provider->getAccessToken( + $this->getGrant(), + ['refresh_token' => $this->oauthRefreshToken] + ); + } + + /** + * Generate a base64-encoded OAuth token. + * + * @return string + */ + public function getOauth64() + { + // Get a new token if it's not available or has expired + if (null === $this->oauthToken or $this->oauthToken->hasExpired()) { + $this->oauthToken = $this->getToken(); + } + + return base64_encode( + 'user=' . + $this->oauthUserEmail . + "\001auth=Bearer " . + $this->oauthToken . + "\001\001" + ); + } +} diff --git a/e_lib/phpmailer5/class.phpmailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php similarity index 65% rename from e_lib/phpmailer5/class.phpmailer.php rename to vendor/phpmailer/phpmailer/src/PHPMailer.php index 99f9092c..dbfc479b 100644 --- a/e_lib/phpmailer5/class.phpmailer.php +++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -1,54 +1,54 @@ - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon + * PHP Version 5.5. + * + * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ +namespace PHPMailer\PHPMailer; + /** * PHPMailer - PHP email creation and transport class. - * @package PHPMailer - * @author Marcus Bointon (Synchro/coolbru) - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) */ class PHPMailer { - /** - * The PHPMailer Version number. - * @var string - */ - public $Version = '5.2.26'; - /** * Email priority. * Options: null (default), 1 = High, 3 = Normal, 5 = low. * When null, the header is not set at all. - * @var integer + * + * @var int */ - public $Priority = null; + public $Priority; /** * The character set of the message. + * * @var string */ public $CharSet = 'iso-8859-1'; /** * The MIME Content-type of the message. + * * @var string */ public $ContentType = 'text/plain'; @@ -56,47 +56,45 @@ class PHPMailer /** * The message encoding. * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * * @var string */ public $Encoding = '8bit'; /** * Holds the most recent mailer error message. + * * @var string */ public $ErrorInfo = ''; /** * The From email address for the message. + * * @var string */ public $From = 'root@localhost'; /** * The From name of the message. + * * @var string */ public $FromName = 'Root User'; /** - * The Sender email (Return-Path) of the message. - * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * * @var string */ public $Sender = ''; - /** - * The Return-Path of the message. - * If empty, it will be set to either From or Sender. - * @var string - * @deprecated Email senders should never set a return-path header; - * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. - * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference - */ - public $ReturnPath = ''; - /** * The Subject of the message. + * * @var string */ public $Subject = ''; @@ -104,6 +102,7 @@ class PHPMailer /** * An HTML or plain text message body. * If HTML then call isHTML(true). + * * @var string */ public $Body = ''; @@ -113,6 +112,7 @@ class PHPMailer * This body can be read by mail clients that do not have HTML email * capability such as mutt & Eudora. * Clients that can read HTML will view the normal Body. + * * @var string */ public $AltBody = ''; @@ -120,50 +120,57 @@ class PHPMailer /** * An iCal message part body. * Only supported in simple alt or alt_inline message types - * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator - * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ - * @link http://kigkonsult.se/iCalcreator/ + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ + * * @var string */ public $Ical = ''; /** * The complete compiled MIME message body. - * @access protected + * * @var string */ protected $MIMEBody = ''; /** * The complete compiled MIME message headers. + * * @var string - * @access protected */ protected $MIMEHeader = ''; /** * Extra headers that createHeader() doesn't fold in. + * * @var string - * @access protected */ protected $mailHeader = ''; /** * Word-wrap the message body to this number of chars. * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. - * @var integer + * + * @see static::STD_LINE_LENGTH + * + * @var int */ public $WordWrap = 0; /** * Which method to use to send mail. * Options: "mail", "sendmail", or "smtp". + * * @var string */ public $Mailer = 'mail'; /** * The path to the sendmail program. + * * @var string */ public $Sendmail = '/usr/sbin/sendmail'; @@ -171,20 +178,14 @@ class PHPMailer /** * Whether mail() uses a fully sendmail-compatible MTA. * One which supports sendmail's "-oi -f" options. - * @var boolean + * + * @var bool */ public $UseSendmailOptions = true; - /** - * Path to PHPMailer plugins. - * Useful if the SMTP class is not in the PHP include path. - * @var string - * @deprecated Should not be needed now there is an autoloader. - */ - public $PluginDir = ''; - /** * The email address that a reading confirmation should be sent to, also known as read receipt. + * * @var string */ public $ConfirmReadingTo = ''; @@ -194,6 +195,7 @@ class PHPMailer * If empty, PHPMailer attempts to find one with, in order, * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value * 'localhost.localdomain'. + * * @var string */ public $Hostname = ''; @@ -203,7 +205,9 @@ class PHPMailer * If empty, a unique id will be generated. * You can set your own, but it must be in the format "", * as defined in RFC5322 section 3.6.4 or it will be ignored. + * * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * * @var string */ public $MessageID = ''; @@ -211,6 +215,7 @@ class PHPMailer /** * The message Date to be used in the Date header. * If empty, the current date will be added. + * * @var string */ public $MessageDate = ''; @@ -224,14 +229,15 @@ class PHPMailer * You can also specify encryption type, for example: * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). * Hosts will be tried in order. + * * @var string */ public $Host = 'localhost'; /** * The default SMTP server port. - * @var integer - * @TODO Why is this needed when the SMTP class takes care of it? + * + * @var int */ public $Port = 25; @@ -239,14 +245,17 @@ class PHPMailer * The SMTP HELO of the message. * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find * one with the same method described above for $Hostname. - * @var string + * * @see PHPMailer::$Hostname + * + * @var string */ public $Helo = ''; /** * What kind of encryption to use on the SMTP connection. - * Options: '', 'ssl' or 'tls' + * Options: '', 'ssl' or 'tls'. + * * @var string */ public $SMTPSecure = ''; @@ -255,62 +264,63 @@ class PHPMailer * Whether to enable TLS encryption automatically if a server supports it, * even if `SMTPSecure` is not set to 'tls'. * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. - * @var boolean + * + * @var bool */ public $SMTPAutoTLS = true; /** * Whether to use SMTP authentication. * Uses the Username and Password properties. - * @var boolean + * * @see PHPMailer::$Username * @see PHPMailer::$Password + * + * @var bool */ public $SMTPAuth = false; /** * Options array passed to stream_context_create when connecting via SMTP. + * * @var array */ - public $SMTPOptions = array(); + public $SMTPOptions = []; /** * SMTP username. + * * @var string */ public $Username = ''; /** * SMTP password. + * * @var string */ public $Password = ''; /** * SMTP auth type. - * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * * @var string */ public $AuthType = ''; /** - * SMTP realm. - * Used for NTLM auth - * @var string + * An instance of the PHPMailer OAuth class. + * + * @var OAuth */ - public $Realm = ''; - - /** - * SMTP workstation. - * Used for NTLM auth - * @var string - */ - public $Workstation = ''; + protected $oauth; /** * The SMTP server timeout in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int */ public $Timeout = 300; @@ -322,9 +332,11 @@ class PHPMailer * * `1` Commands * * `2` Data and commands * * `3` As 2 plus connection status - * * `4` Low-level data output - * @var integer + * * `4` Low-level data output. + * * @see SMTP::$do_debug + * + * @var int */ public $SMTPDebug = 0; @@ -334,13 +346,23 @@ class PHPMailer * * `echo` Output plain-text as-is, appropriate for CLI * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output * * `error_log` Output to error log as configured in php.ini - * + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * + * + * ```php * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface */ public $Debugoutput = 'echo'; @@ -348,7 +370,8 @@ class PHPMailer * Whether to keep SMTP connection open after each message. * If this is set to true then to close the connection * requires an explicit call to smtpClose(). - * @var boolean + * + * @var bool */ public $SMTPKeepAlive = false; @@ -356,42 +379,39 @@ class PHPMailer * Whether to split multiple to addresses into multiple messages * or send them all in one message. * Only supported in `mail` and `sendmail` transports, not in SMTP. - * @var boolean + * + * @var bool */ public $SingleTo = false; /** * Storage for addresses when SingleTo is enabled. + * * @var array - * @TODO This should really not be public */ - public $SingleToArray = array(); + protected $SingleToArray = []; /** * Whether to generate VERP addresses on send. * Only applicable when sending via SMTP. - * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Postfix VERP info - * @var boolean + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool */ public $do_verp = false; /** * Whether to allow sending messages with an empty body. - * @var boolean + * + * @var bool */ public $AllowEmpty = false; - /** - * The default line ending. - * @note The default remains "\n". We force CRLF where we know - * it must be used via self::CRLF. - * @var string - */ - public $LE = "\n"; - /** * DKIM selector. + * * @var string */ public $DKIM_selector = ''; @@ -399,6 +419,7 @@ class PHPMailer /** * DKIM Identity. * Usually the email address used as the source of the email. + * * @var string */ public $DKIM_identity = ''; @@ -406,26 +427,32 @@ class PHPMailer /** * DKIM passphrase. * Used if your key is encrypted. + * * @var string */ public $DKIM_passphrase = ''; /** * DKIM signing domain name. + * * @example 'example.com' + * * @var string */ public $DKIM_domain = ''; /** * DKIM private key file path. + * * @var string */ public $DKIM_private = ''; /** * DKIM private key string. + * * If set, takes precedence over `$DKIM_private`. + * * @var string */ public $DKIM_private_string = ''; @@ -439,20 +466,24 @@ class PHPMailer * Value can be any php callable: http://www.php.net/is_callable * * Parameters: - * boolean $result result of the send action + * bool $result result of the send action * array $to email addresses of the recipients * array $cc cc email addresses * array $bcc bcc email addresses * string $subject the subject * string $body the email body * string $from email address of sender + * string $extra extra information of possible use + * "smtp_transaction_id' => last smtp transaction id + * * @var string */ public $action_function = ''; /** * What to put in the X-Mailer header. - * Options: An empty string for PHPMailer default, whitespace for none, or a string to use + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use. + * * @var string */ public $XMailer = ''; @@ -460,204 +491,240 @@ class PHPMailer /** * Which validator to use by default when validating email addresses. * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * * @see PHPMailer::validateAddress() + * * @var string|callable - * @static */ - public static $validator = 'auto'; + public static $validator = 'php'; /** * An instance of the SMTP sender class. + * * @var SMTP - * @access protected */ - protected $smtp = null; + protected $smtp; /** * The array of 'to' names and addresses. + * * @var array - * @access protected */ - protected $to = array(); + protected $to = []; /** * The array of 'cc' names and addresses. + * * @var array - * @access protected */ - protected $cc = array(); + protected $cc = []; /** * The array of 'bcc' names and addresses. + * * @var array - * @access protected */ - protected $bcc = array(); + protected $bcc = []; /** * The array of reply-to names and addresses. + * * @var array - * @access protected */ - protected $ReplyTo = array(); + protected $ReplyTo = []; /** * An array of all kinds of addresses. - * Includes all of $to, $cc, $bcc + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc */ - protected $all_recipients = array(); + protected $all_recipients = []; /** * An array of names and addresses queued for validation. * In send(), valid and non duplicate entries are moved to $all_recipients * and one of $to, $cc, or $bcc. * This array is used only for addresses with IDN. - * @var array - * @access protected - * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc * @see PHPMailer::$all_recipients + * + * @var array */ - protected $RecipientsQueue = array(); + protected $RecipientsQueue = []; /** * An array of reply-to names and addresses queued for validation. * In send(), valid and non duplicate entries are moved to $ReplyTo. * This array is used only for addresses with IDN. - * @var array - * @access protected + * * @see PHPMailer::$ReplyTo + * + * @var array */ - protected $ReplyToQueue = array(); + protected $ReplyToQueue = []; /** * The array of attachments. + * * @var array - * @access protected */ - protected $attachment = array(); + protected $attachment = []; /** * The array of custom headers. + * * @var array - * @access protected */ - protected $CustomHeader = array(); + protected $CustomHeader = []; /** * The most recent Message-ID (including angular brackets). + * * @var string - * @access protected */ protected $lastMessageID = ''; /** * The message's MIME type. + * * @var string - * @access protected */ protected $message_type = ''; /** * The array of MIME boundary strings. + * * @var array - * @access protected */ - protected $boundary = array(); + protected $boundary = []; /** * The array of available languages. + * * @var array - * @access protected */ - protected $language = array(); + protected $language = []; /** * The number of errors encountered. - * @var integer - * @access protected + * + * @var int */ protected $error_count = 0; /** * The S/MIME certificate file path. + * * @var string - * @access protected */ protected $sign_cert_file = ''; /** * The S/MIME key file path. + * * @var string - * @access protected */ protected $sign_key_file = ''; /** * The optional S/MIME extra certificates ("CA Chain") file path. + * * @var string - * @access protected */ protected $sign_extracerts_file = ''; /** * The S/MIME password for the key. * Used only if the key is encrypted. + * * @var string - * @access protected */ protected $sign_key_pass = ''; /** * Whether to throw exceptions for errors. - * @var boolean - * @access protected + * + * @var bool */ protected $exceptions = false; /** * Unique ID used for message ID and boundaries. + * * @var string - * @access protected */ protected $uniqueid = ''; + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.0.3'; + /** * Error severity: message only, continue processing. + * + * @var int */ const STOP_MESSAGE = 0; /** * Error severity: message, likely ok to continue processing. + * + * @var int */ const STOP_CONTINUE = 1; /** * Error severity: message, plus full stop, critical error reached. + * + * @var int */ const STOP_CRITICAL = 2; /** * SMTP RFC standard line ending. + * + * @var string */ - const CRLF = "\r\n"; + protected static $LE = "\r\n"; /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int */ const MAX_LINE_LENGTH = 998; + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + /** * Constructor. - * @param boolean $exceptions Should we throw external exceptions? + * + * @param bool $exceptions Should we throw external exceptions? */ public function __construct($exceptions = null) { - if ($exceptions !== null) { - $this->exceptions = (boolean)$exceptions; + if (null !== $exceptions) { + $this->exceptions = (bool) $exceptions; } //Pick an appropriate debug output format automatically $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); @@ -676,14 +743,15 @@ class PHPMailer * Call mail() in a safe_mode-aware fashion. * Also, unless sendmail_path points to sendmail (or something that * claims to be sendmail), don't pass params (not a perfect fix, - * but it will do) - * @param string $to To - * @param string $subject Subject - * @param string $body Message Body - * @param string $header Additional Header(s) - * @param string $params Params - * @access private - * @return boolean + * but it will do). + * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params + * + * @return bool */ private function mailPassthru($to, $subject, $body, $header, $params) { @@ -693,21 +761,23 @@ class PHPMailer } else { $subject = $this->encodeHeader($this->secureHeader($subject)); } - - //Can't use additional_parameters in safe_mode, calling mail() with null params breaks - //@link http://php.net/manual/en/function.mail.php - if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) { + //Calling mail() with null params breaks + if (!$this->UseSendmailOptions or null === $params) { $result = @mail($to, $subject, $body, $header); } else { $result = @mail($to, $subject, $body, $header, $params); } + return $result; } + /** * Output debugging info via user-defined method. * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * * @see PHPMailer::$Debugoutput * @see PHPMailer::$SMTPDebug + * * @param string $str */ protected function edebug($str) @@ -715,9 +785,16 @@ class PHPMailer if ($this->SMTPDebug <= 0) { return; } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + return; } switch ($this->Debugoutput) { @@ -731,25 +808,31 @@ class PHPMailer preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, 'UTF-8' - ) - . "
\n"; + ), "
\n"; break; case 'echo': default: //Normalize line breaks - $str = preg_replace('/\r\n?/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - ) . "\n"; + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; } } /** * Sets message type to HTML or plain. - * @param boolean $isHtml True for HTML mode. - * @return void + * + * @param bool $isHtml True for HTML mode */ public function isHTML($isHtml = true) { @@ -762,7 +845,6 @@ class PHPMailer /** * Send messages using SMTP. - * @return void */ public function isSMTP() { @@ -771,7 +853,6 @@ class PHPMailer /** * Send messages using PHP's mail() function. - * @return void */ public function isMail() { @@ -780,13 +861,12 @@ class PHPMailer /** * Send messages using $Sendmail. - * @return void */ public function isSendmail() { $ini_sendmail_path = ini_get('sendmail_path'); - if (!stristr($ini_sendmail_path, 'sendmail')) { + if (false === stripos($ini_sendmail_path, 'sendmail')) { $this->Sendmail = '/usr/sbin/sendmail'; } else { $this->Sendmail = $ini_sendmail_path; @@ -796,13 +876,12 @@ class PHPMailer /** * Send messages using qmail. - * @return void */ public function isQmail() { $ini_sendmail_path = ini_get('sendmail_path'); - if (!stristr($ini_sendmail_path, 'qmail')) { + if (false === stripos($ini_sendmail_path, 'qmail')) { $this->Sendmail = '/var/qmail/bin/qmail-inject'; } else { $this->Sendmail = $ini_sendmail_path; @@ -812,9 +891,11 @@ class PHPMailer /** * Add a "To" address. + * * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used or invalid in some way + * + * @return bool true on success, false if address already used or invalid in some way */ public function addAddress($address, $name = '') { @@ -823,10 +904,11 @@ class PHPMailer /** * Add a "CC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used or invalid in some way + * + * @return bool true on success, false if address already used or invalid in some way */ public function addCC($address, $name = '') { @@ -835,10 +917,11 @@ class PHPMailer /** * Add a "BCC" address. - * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * * @param string $address The email address to send to * @param string $name - * @return boolean true on success, false if address already used or invalid in some way + * + * @return bool true on success, false if address already used or invalid in some way */ public function addBCC($address, $name = '') { @@ -847,9 +930,11 @@ class PHPMailer /** * Add a "Reply-To" address. + * * @param string $address The email address to reply to * @param string $name - * @return boolean true on success, false if address already used or invalid in some way + * + * @return bool true on success, false if address already used or invalid in some way */ public function addReplyTo($address, $name = '') { @@ -861,89 +946,112 @@ class PHPMailer * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still * be modified after calling this function), addition of such addresses is delayed until send(). * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' * @param string $address The email address to send, resp. to reply to * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way */ protected function addOrEnqueueAnAddress($kind, $address, $name) { $address = trim($address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (($pos = strrpos($address, '@')) === false) { - // At-sign is misssing. - $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + $pos = strrpos($address, '@'); + if (false === $pos) { + // At-sign is missing. + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($error_message); + throw new Exception($error_message); } + return false; } - $params = array($kind, $address, $name); + $params = [$kind, $address, $name]; // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. - if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { - if ($kind != 'Reply-To') { + if ($this->has8bitChars(substr($address, ++$pos)) and static::idnSupported()) { + if ('Reply-To' != $kind) { if (!array_key_exists($address, $this->RecipientsQueue)) { $this->RecipientsQueue[$address] = $params; + return true; } } else { if (!array_key_exists($address, $this->ReplyToQueue)) { $this->ReplyToQueue[$address] = $params; + return true; } } + return false; } + // Immediately add standard addresses without IDN. - return call_user_func_array(array($this, 'addAnAddress'), $params); + return call_user_func_array([$this, 'addAnAddress'], $params); } /** * Add an address to one of the recipient arrays or to the ReplyTo array. * Addresses that have been added already return false, but do not throw exceptions. - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' * @param string $address The email address to send, resp. to reply to * @param string $name - * @throws phpmailerException - * @return boolean true on success, false if address already used or invalid in some way - * @access protected + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way */ protected function addAnAddress($kind, $address, $name = '') { - if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { - $error_message = $this->lang('Invalid recipient kind: ') . $kind; + if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + $error_message = sprintf('%s: %s', + $this->lang('Invalid recipient kind'), + $kind); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($error_message); + throw new Exception($error_message); } + return false; } - if (!$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + if (!static::validateAddress($address)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($error_message); + throw new Exception($error_message); } + return false; } - if ($kind != 'Reply-To') { + if ('Reply-To' != $kind) { if (!array_key_exists(strtolower($address), $this->all_recipients)) { - array_push($this->$kind, array($address, $name)); + $this->{$kind}[] = [$address, $name]; $this->all_recipients[strtolower($address)] = true; + return true; } } else { if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); + $this->ReplyTo[strtolower($address)] = [$address, $name]; + return true; } } + return false; } @@ -952,24 +1060,27 @@ class PHPMailer * of the form "display name
" into an array of name/address pairs. * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. * Note that quotes in the name part are removed. + * + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * * @param string $addrstr The address list string - * @param bool $useimap Whether to use the IMAP extension to parse the list + * @param bool $useimap Whether to use the IMAP extension to parse the list + * * @return array - * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation */ - public function parseAddresses($addrstr, $useimap = true) + public static function parseAddresses($addrstr, $useimap = true) { - $addresses = array(); + $addresses = []; if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); foreach ($list as $address) { - if ($address->host != '.SYNTAX-ERROR.') { - if ($this->validateAddress($address->mailbox . '@' . $address->host)) { - $addresses[] = array( + if ('.SYNTAX-ERROR.' != $address->host) { + if (static::validateAddress($address->mailbox . '@' . $address->host)) { + $addresses[] = [ 'name' => (property_exists($address, 'personal') ? $address->personal : ''), - 'address' => $address->mailbox . '@' . $address->host - ); + 'address' => $address->mailbox . '@' . $address->host, + ]; } } } @@ -981,49 +1092,57 @@ class PHPMailer //Is there a separate name part? if (strpos($address, '<') === false) { //No separate name, just use the whole thing - if ($this->validateAddress($address)) { - $addresses[] = array( + if (static::validateAddress($address)) { + $addresses[] = [ 'name' => '', - 'address' => $address - ); + 'address' => $address, + ]; } } else { list($name, $email) = explode('<', $address); $email = trim(str_replace('>', '', $email)); - if ($this->validateAddress($email)) { - $addresses[] = array( - 'name' => trim(str_replace(array('"', "'"), '', $name)), - 'address' => $email - ); + if (static::validateAddress($email)) { + $addresses[] = [ + 'name' => trim(str_replace(['"', "'"], '', $name)), + 'address' => $email, + ]; } } } } + return $addresses; } /** * Set the From and FromName properties. + * * @param string $address * @param string $name - * @param boolean $auto Whether to also set the Sender address, defaults to true - * @throws phpmailerException - * @return boolean + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool */ public function setFrom($address, $name = '', $auto = true) { $address = trim($address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim // Don't validate now addresses with IDN. Will be done in send(). - if (($pos = strrpos($address, '@')) === false or - (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and - !$this->validateAddress($address)) { - $error_message = $this->lang('invalid_address') . " (setFrom) $address"; + $pos = strrpos($address, '@'); + if (false === $pos or + (!$this->has8bitChars(substr($address, ++$pos)) or !static::idnSupported()) and + !static::validateAddress($address)) { + $error_message = sprintf('%s (From): %s', + $this->lang('invalid_address'), + $address); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($error_message); + throw new Exception($error_message); } + return false; } $this->From = $address; @@ -1033,6 +1152,7 @@ class PHPMailer $this->Sender = $address; } } + return true; } @@ -1041,6 +1161,7 @@ class PHPMailer * Technically this is the value from the last time the headers were created, * but it's also the message ID of the last sent message except in * pathological cases. + * * @return string */ public function getLastMessageID() @@ -1050,27 +1171,32 @@ class PHPMailer /** * Check that a string looks like an email address. - * @param string $address The email address to check - * @param string|callable $patternselect A selector for the validation pattern to use : + * Validation patterns supported: * * `auto` Pick best pattern automatically; - * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; * * `pcre` Use old PCRE implementation; * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. * * `noregex` Don't use a regex: super fast, really dumb. * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php * PHPMailer::validateAddress('user@example.com', function($address) { * return (strpos($address, '@') !== false); * }); + * ``` + * * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. - * @return boolean - * @static - * @access public + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool */ public static function validateAddress($address, $patternselect = null) { - if (is_null($patternselect)) { - $patternselect = self::$validator; + if (null === $patternselect) { + $patternselect = static::$validator; } if (is_callable($patternselect)) { return call_user_func($patternselect, $address); @@ -1079,37 +1205,26 @@ class PHPMailer if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { return false; } - if (!$patternselect or $patternselect == 'auto') { - //Check this constant first so it works when extension_loaded() is disabled by safe mode - //Constant was added in PHP 5.2.4 - if (defined('PCRE_VERSION')) { - //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2 - if (version_compare(PCRE_VERSION, '8.0.3') >= 0) { - $patternselect = 'pcre8'; - } else { - $patternselect = 'pcre'; - } - } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) { - //Fall back to older PCRE - $patternselect = 'pcre'; - } else { - //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension - if (version_compare(PHP_VERSION, '5.2.0') >= 0) { - $patternselect = 'php'; - } else { - $patternselect = 'noregex'; - } - } - } switch ($patternselect) { + case 'pcre': //Kept for BC case 'pcre8': - /** - * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. - * @link http://squiloople.com/2009/12/20/email-address-validation/ + /* + * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL + * is based. + * In addition to the addresses allowed by filter_var, also permits: + * * dotless domains: `a@b` + * * comments: `1234 @ local(blah) .machine .example` + * * quoted elements: `'"test blah"@example.org'` + * * numeric TLDs: `a@b.123` + * * unbracketed IPv4 literals: `a@192.168.0.1` + * * IPv6 literals: 'first.last@[IPv6:a1::]' + * Not all of these will necessarily work for sending! + * + * @see http://squiloople.com/2009/12/20/email-address-validation/ * @copyright 2009-2010 Michael Rushton * Feel free to use and redistribute this code. But please keep this copyright notice. */ - return (boolean)preg_match( + return (bool) preg_match( '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . @@ -1121,51 +1236,31 @@ class PHPMailer '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address ); - case 'pcre': - //An older regex that doesn't need a recent PCRE - return (boolean)preg_match( - '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . - '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . - '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . - '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . - '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . - '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . - '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . - '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . - '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . - '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', - $address - ); case 'html5': - /** + /* * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. - * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + * + * @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) */ - return (boolean)preg_match( + return (bool) preg_match( '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $address ); - case 'noregex': - //No PCRE! Do something _very_ approximate! - //Check the address is 3 chars or longer and contains an @ that's not the first or last char - return (strlen($address) >= 3 - and strpos($address, '@') >= 1 - and strpos($address, '@') != strlen($address) - 1); case 'php': default: - return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL); + return (bool) filter_var($address, FILTER_VALIDATE_EMAIL); } } /** * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the - * "intl" and "mbstring" PHP extensions. - * @return bool "true" if required functions for IDN support are present + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present */ - public function idnSupported() + public static function idnSupported() { - // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); } @@ -1175,36 +1270,45 @@ class PHPMailer * This function silently returns unmodified address if: * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) * - Conversion to punycode is impossible (e.g. required PHP functions are not available) - * or fails for any reason (e.g. domain has characters not allowed in an IDN) - * @see PHPMailer::$CharSet + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * * @param string $address The email address to convert + * * @return string The encoded address in ASCII form */ public function punyencodeAddress($address) { // Verify we have required functions, CharSet, and at-sign. - if ($this->idnSupported() and + $pos = strrpos($address, '@'); + if (static::idnSupported() and !empty($this->CharSet) and - ($pos = strrpos($address, '@')) !== false) { + false !== $pos + ) { $domain = substr($address, ++$pos); // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); - if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? - idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : - idn_to_ascii($domain)) !== false) { + //Ignore IDE complaints about this line - method signature changed in PHP 5.4 + $errorcode = 0; + $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46); + if (false !== $punycode) { return substr($address, 0, $pos) . $punycode; } } } + return $address; } /** * Create a message and send it. * Uses the sending method specified by $Mailer. - * @throws phpmailerException - * @return boolean false on error - See the ErrorInfo property for details of the error. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error */ public function send() { @@ -1212,24 +1316,55 @@ class PHPMailer if (!$this->preSend()) { return false; } + return $this->postSend(); - } catch (phpmailerException $exc) { + } catch (Exception $exc) { $this->mailHeader = ''; $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } + return false; } } /** * Prepare a message for sending. - * @throws phpmailerException - * @return boolean + * + * @throws Exception + * + * @return bool */ public function preSend() { + if ('smtp' == $this->Mailer or + ('mail' == $this->Mailer and stripos(PHP_OS, 'WIN') === 0) + ) { + //SMTP mandates RFC-compliant line endings + //and it's also used with mail() on Windows + static::setLE("\r\n"); + } else { + //Maintain backward compatibility with legacy Linux command line mailers + static::setLE(PHP_EOL); + } + //Check for buggy PHP versions that add a header with an incorrect line break + if (ini_get('mail.add_x_header') == 1 + and 'mail' == $this->Mailer + and stripos(PHP_OS, 'WIN') === 0 + and ((version_compare(PHP_VERSION, '7.0.0', '>=') + and version_compare(PHP_VERSION, '7.0.17', '<')) + or (version_compare(PHP_VERSION, '7.1.0', '>=') + and version_compare(PHP_VERSION, '7.1.3', '<'))) + ) { + trigger_error( + 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + E_USER_WARNING + ); + } + try { $this->error_count = 0; // Reset errors $this->mailHeader = ''; @@ -1237,26 +1372,30 @@ class PHPMailer // Dequeue recipient and Reply-To addresses with IDN foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { $params[1] = $this->punyencodeAddress($params[1]); - call_user_func_array(array($this, 'addAnAddress'), $params); + call_user_func_array([$this, 'addAnAddress'], $params); } - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); + if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { + throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); } // Validate From, Sender, and ConfirmReadingTo addresses - foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { + foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { $this->$address_kind = trim($this->$address_kind); if (empty($this->$address_kind)) { continue; } $this->$address_kind = $this->punyencodeAddress($this->$address_kind); - if (!$this->validateAddress($this->$address_kind)) { - $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind; + if (!static::validateAddress($this->$address_kind)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $address_kind, + $this->$address_kind); $this->setError($error_message); $this->edebug($error_message); if ($this->exceptions) { - throw new phpmailerException($error_message); + throw new Exception($error_message); } + return false; } } @@ -1269,9 +1408,11 @@ class PHPMailer $this->setMessageType(); // Refuse to send an empty message unless we are specifically allowing it if (!$this->AllowEmpty and empty($this->Body)) { - throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); } + //Trim subject consistently + $this->Subject = trim($this->Subject); // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); @@ -1282,7 +1423,7 @@ class PHPMailer // To capture the complete message when using mail(), create // an extra header list which createHeader() doesn't fold in - if ($this->Mailer == 'mail') { + if ('mail' == $this->Mailer) { if (count($this->to) > 0) { $this->mailHeader .= $this->addrAppend('To', $this->to); } else { @@ -1290,15 +1431,15 @@ class PHPMailer } $this->mailHeader .= $this->headerLine( 'Subject', - $this->encodeHeader($this->secureHeader(trim($this->Subject))) + $this->encodeHeader($this->secureHeader($this->Subject)) ); } // Sign with DKIM if enabled if (!empty($this->DKIM_domain) - && !empty($this->DKIM_selector) - && (!empty($this->DKIM_private_string) - || (!empty($this->DKIM_private) && file_exists($this->DKIM_private)) + and !empty($this->DKIM_selector) + and (!empty($this->DKIM_private_string) + or (!empty($this->DKIM_private) and file_exists($this->DKIM_private)) ) ) { $header_dkim = $this->DKIM_Add( @@ -1306,24 +1447,27 @@ class PHPMailer $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody ); - $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . - str_replace("\r\n", "\n", $header_dkim) . self::CRLF; + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . static::$LE . + static::normalizeBreaks($header_dkim) . static::$LE; } + return true; - } catch (phpmailerException $exc) { + } catch (Exception $exc) { $this->setError($exc->getMessage()); if ($this->exceptions) { throw $exc; } + return false; } } /** - * Actually send a message. - * Send the email via the selected mechanism - * @throws phpmailerException - * @return boolean + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool */ public function postSend() { @@ -1338,80 +1482,86 @@ class PHPMailer case 'mail': return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: - $sendMethod = $this->Mailer.'Send'; + $sendMethod = $this->Mailer . 'Send'; if (method_exists($this, $sendMethod)) { return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } - } catch (phpmailerException $exc) { + } catch (Exception $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } } + return false; } /** * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * * @param string $header The message headers - * @param string $body The message body - * @see PHPMailer::$Sendmail - * @throws phpmailerException - * @access protected - * @return boolean + * @param string $body The message body + * + * @throws Exception + * + * @return bool */ protected function sendmailSend($header, $body) { // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { - if ($this->Mailer == 'qmail') { + if ('qmail' == $this->Mailer) { $sendmailFmt = '%s -f%s'; } else { $sendmailFmt = '%s -oi -f%s -t'; } } else { - if ($this->Mailer == 'qmail') { + if ('qmail' == $this->Mailer) { $sendmailFmt = '%s'; } else { $sendmailFmt = '%s -oi -t'; } } - // TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing. $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); if ($this->SingleTo) { foreach ($this->SingleToArray as $toAddr) { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } - fputs($mail, 'To: ' . $toAddr . "\n"); - fputs($mail, $header); - fputs($mail, $body); + fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, $header); + fwrite($mail, $body); $result = pclose($mail); $this->doCallback( ($result == 0), - array($toAddr), + [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, - $this->From + $this->From, + [] ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } } else { - if (!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } - fputs($mail, $header); - fputs($mail, $body); + fwrite($mail, $header); + fwrite($mail, $body); $result = pclose($mail); $this->doCallback( ($result == 0), @@ -1420,36 +1570,39 @@ class PHPMailer $this->bcc, $this->Subject, $body, - $this->From + $this->From, + [] ); - if ($result != 0) { - throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } + return true; } /** * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. - * * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. - * @param string $string The string to be validated + * * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report - * @access protected - * @return boolean + * + * @param string $string The string to be validated + * + * @return bool */ protected static function isShellSafe($string) { // Future-proof if (escapeshellcmd($string) !== $string - or !in_array(escapeshellarg($string), array("'$string'", "\"$string\"")) + or !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) ) { return false; } $length = strlen($string); - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { $c = $string[$i]; // All other characters have a special meaning in at least one common shell, including = and +. @@ -1465,16 +1618,19 @@ class PHPMailer /** * Send mail using the PHP mail() function. + * + * @see http://www.php.net/manual/en/book.mail.php + * * @param string $header The message headers - * @param string $body The message body - * @link http://www.php.net/manual/en/book.mail.php - * @throws phpmailerException - * @access protected - * @return boolean + * @param string $body The message body + * + * @throws Exception + * + * @return bool */ protected function mailSend($header, $body) { - $toArr = array(); + $toArr = []; foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } @@ -1482,13 +1638,19 @@ class PHPMailer $params = null; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver - if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. if (self::isShellSafe($this->Sender)) { $params = sprintf('-f%s', $this->Sender); } } - if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) { + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { $old_from = ini_get('sendmail_from'); ini_set('sendmail_from', $this->Sender); } @@ -1496,117 +1658,162 @@ class PHPMailer if ($this->SingleTo and count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); + $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); } } else { $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); - $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); } if (isset($old_from)) { ini_set('sendmail_from', $old_from); } if (!$result) { - throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); + throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); } + return true; } /** * Get an instance to use for SMTP operations. - * Override this function to load your own SMTP implementation + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * * @return SMTP */ public function getSMTPInstance() { if (!is_object($this->smtp)) { - $this->smtp = new SMTP; + $this->smtp = new SMTP(); } + + return $this->smtp; + } + + /** + * Provide an instance to use for SMTP operations. + * + * @param SMTP $smtp + * + * @return SMTP + */ + public function setSMTPInstance(SMTP $smtp) + { + $this->smtp = $smtp; + return $this->smtp; } /** * Send mail via SMTP. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * Uses the PHPMailerSMTP class by default. - * @see PHPMailer::getSMTPInstance() to use a different class. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * * @param string $header The message headers - * @param string $body The message body - * @throws phpmailerException - * @uses SMTP - * @access protected - * @return boolean + * @param string $body The message body + * + * @throws Exception + * + * @return bool */ protected function smtpSend($header, $body) { - $bad_rcpt = array(); + $bad_rcpt = []; if (!$this->smtpConnect($this->SMTPOptions)) { - throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); } - if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { - $smtp_from = $this->Sender; - } else { + //Sender already validated in preSend() + if ('' == $this->Sender) { $smtp_from = $this->From; + } else { + $smtp_from = $this->Sender; } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); - throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); + throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); } + $callbacks = []; // Attempt to send to all recipients - foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { + foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { foreach ($togroup as $to) { if (!$this->smtp->recipient($to[0])) { $error = $this->smtp->getError(); - $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']); + $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; $isSent = false; } else { $isSent = true; } - $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); + + $callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]]; } } // Only send the DATA command if we have viable recipients if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { - throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); + throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); } + + $smtp_transaction_id = $this->smtp->getLastTransactionID(); + if ($this->SMTPKeepAlive) { $this->smtp->reset(); } else { $this->smtp->quit(); $this->smtp->close(); } + + foreach ($callbacks as $cb) { + $this->doCallback( + $cb['issent'], + [$cb['to']], + [], + [], + $this->Subject, + $body, + $this->From, + ['smtp_transaction_id' => $smtp_transaction_id] + ); + } + //Create error message for any bad addresses if (count($bad_rcpt) > 0) { $errstr = ''; foreach ($bad_rcpt as $bad) { $errstr .= $bad['to'] . ': ' . $bad['error']; } - throw new phpmailerException( + throw new Exception( $this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE ); } + return true; } /** * Initiate a connection to an SMTP server. * Returns false if the operation failed. + * * @param array $options An array of options compatible with stream_context_create() - * @uses SMTP - * @access public - * @throws phpmailerException - * @return boolean + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool */ public function smtpConnect($options = null) { - if (is_null($this->smtp)) { + if (null === $this->smtp) { $this->smtp = $this->getSMTPInstance(); } //If no options are provided, use whatever is set in the instance - if (is_null($options)) { + if (null === $options) { $options = $this->SMTPOptions; } @@ -1623,14 +1830,14 @@ class PHPMailer $lastexception = null; foreach ($hosts as $hostentry) { - $hostinfo = array(); + $hostinfo = []; if (!preg_match( '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', trim($hostentry), $hostinfo )) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); // Not a valid host entry - $this->edebug('Ignoring invalid host: ' . $hostentry); continue; } // $hostinfo[2]: optional ssl or tls prefix @@ -1638,29 +1845,35 @@ class PHPMailer // $hostinfo[4]: optional port number // The host string prefix can temporarily override the current setting for SMTPSecure // If it's not specified, the default value is used + + //Check the host name is a valid name or IP address before trying to use it + if (!static::isValidHost($hostinfo[3])) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); + continue; + } $prefix = ''; $secure = $this->SMTPSecure; - $tls = ($this->SMTPSecure == 'tls'); + $tls = ('tls' == $this->SMTPSecure); if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { $prefix = 'ssl://'; $tls = false; // Can't have SSL and TLS at the same time $secure = 'ssl'; - } elseif ($hostinfo[2] == 'tls') { + } elseif ('tls' == $hostinfo[2]) { $tls = true; // tls doesn't use a prefix $secure = 'tls'; } //Do we need the OpenSSL extension? - $sslext = defined('OPENSSL_ALGO_SHA1'); + $sslext = defined('OPENSSL_ALGO_SHA256'); if ('tls' === $secure or 'ssl' === $secure) { //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled if (!$sslext) { - throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); + throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); } } $host = $hostinfo[3]; $port = $this->Port; - $tport = (integer)$hostinfo[4]; + $tport = (int) $hostinfo[4]; if ($tport > 0 and $tport < 65536) { $port = $tport; } @@ -1677,12 +1890,12 @@ class PHPMailer // * we have openssl extension // * we are not already using SSL // * the server offers STARTTLS - if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { + if ($this->SMTPAutoTLS and $sslext and 'ssl' != $secure and $this->smtp->getServerExt('STARTTLS')) { $tls = true; } if ($tls) { if (!$this->smtp->startTLS()) { - throw new phpmailerException($this->lang('connect_host')); + throw new Exception($this->lang('connect_host')); } // We must resend EHLO after TLS negotiation $this->smtp->hello($hello); @@ -1692,15 +1905,15 @@ class PHPMailer $this->Username, $this->Password, $this->AuthType, - $this->Realm, - $this->Workstation + $this->oauth ) ) { - throw new phpmailerException($this->lang('authenticate')); + throw new Exception($this->lang('authenticate')); } } + return true; - } catch (phpmailerException $exc) { + } catch (Exception $exc) { $lastexception = $exc; $this->edebug($exc->getMessage()); // We must have connected, but then failed TLS or Auth, so close connection nicely @@ -1711,19 +1924,19 @@ class PHPMailer // If we get here, all connection attempts have failed, so close connection hard $this->smtp->close(); // As we've caught all exceptions, just report whatever the last one was - if ($this->exceptions and !is_null($lastexception)) { + if ($this->exceptions and null !== $lastexception) { throw $lastexception; } + return false; } /** * Close the active SMTP session if one exists. - * @return void */ public function smtpClose() { - if (is_a($this->smtp, 'SMTP')) { + if (null !== $this->smtp) { if ($this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); @@ -1735,29 +1948,30 @@ class PHPMailer * Set the language for error messages. * Returns false if it cannot load the language file. * The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") * @param string $lang_path Path to the language file directory, with trailing separator (slash) - * @return boolean - * @access public + * + * @return bool */ public function setLanguage($langcode = 'en', $lang_path = '') { // Backwards compatibility for renamed language codes - $renamed_langcodes = array( + $renamed_langcodes = [ 'br' => 'pt_br', 'cz' => 'cs', 'dk' => 'da', 'no' => 'nb', 'se' => 'sv', - 'sr' => 'rs' - ); + 'sr' => 'rs', + ]; if (isset($renamed_langcodes[$langcode])) { $langcode = $renamed_langcodes[$langcode]; } // Define full set of translatable strings in English - $PHPMAILER_LANG = array( + $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', @@ -1776,11 +1990,11 @@ class PHPMailer 'smtp_connect_failed' => 'SMTP connect() failed.', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', - 'extension_missing' => 'Extension missing: ' - ); + 'extension_missing' => 'Extension missing: ', + ]; if (empty($lang_path)) { // Calculate an absolute path so it can work if CWD is not here - $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; + $lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } //Validate $langcode if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { @@ -1789,9 +2003,9 @@ class PHPMailer $foundlang = true; $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; // There is no English translation file - if ($langcode != 'en') { + if ('en' != $langcode) { // Make sure language file path is readable - if (!is_readable($lang_file)) { + if (!file_exists($lang_file)) { $foundlang = false; } else { // Overwrite language-specific strings. @@ -1800,11 +2014,13 @@ class PHPMailer } } $this->language = $PHPMAILER_LANG; - return (boolean)$foundlang; // Returns false if language not found + + return (bool) $foundlang; // Returns false if language not found } /** * Get the array of strings for the current language. + * * @return array */ public function getTranslations() @@ -1814,39 +2030,42 @@ class PHPMailer /** * Create recipient headers. - * @access public + * * @param string $type - * @param array $addr An array of recipient, - * where each recipient is a 2-element indexed array with element 0 containing an address - * and element 1 containing a name, like: - * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) + * @param array $addr An array of recipients, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] + * * @return string */ public function addrAppend($type, $addr) { - $addresses = array(); + $addresses = []; foreach ($addr as $address) { $addresses[] = $this->addrFormat($address); } - return $type . ': ' . implode(', ', $addresses) . $this->LE; + + return $type . ': ' . implode(', ', $addresses) . static::$LE; } /** * Format an address for use in a message header. - * @access public - * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name - * like array('joe@example.com', 'Joe User') + * + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like + * ['joe@example.com', 'Joe User'] + * * @return string */ public function addrFormat($addr) { if (empty($addr[1])) { // No name provided return $this->secureHeader($addr[0]); - } else { - return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( + } + + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( $addr[0] ) . '>'; - } } /** @@ -1854,33 +2073,34 @@ class PHPMailer * For use with mailers that do not automatically perform wrapping * and for quoted-printable encoded messages. * Original written by philippe. + * * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public + * @param int $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * * @return string */ public function wrapText($message, $length, $qp_mode = false) { if ($qp_mode) { - $soft_break = sprintf(' =%s', $this->LE); + $soft_break = sprintf(' =%s', static::$LE); } else { - $soft_break = $this->LE; + $soft_break = static::$LE; } // If utf-8 encoding is used, we will need to make sure we don't // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == 'utf-8'); - $lelen = strlen($this->LE); - $crlflen = strlen(self::CRLF); + $is_utf8 = 'utf-8' == strtolower($this->CharSet); + $lelen = strlen(static::$LE); + $crlflen = strlen(static::$LE); - $message = $this->fixEOL($message); + $message = static::normalizeBreaks($message); //Remove a trailing line break - if (substr($message, -$lelen) == $this->LE) { + if (substr($message, -$lelen) == static::$LE) { $message = substr($message, 0, -$lelen); } //Split message into lines - $lines = explode($this->LE, $message); + $lines = explode(static::$LE, $message); //Message will be rebuilt in here $message = ''; foreach ($lines as $line) { @@ -1895,15 +2115,15 @@ class PHPMailer $len = $space_left; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); $buf .= ' ' . $part; - $message .= $buf . sprintf('=%s', self::CRLF); + $message .= $buf . sprintf('=%s', static::$LE); } else { $message .= $buf . $soft_break; } @@ -1916,16 +2136,16 @@ class PHPMailer $len = $length; if ($is_utf8) { $len = $this->utf8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == '=') { - $len--; - } elseif (substr($word, $len - 2, 1) == '=') { + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { $len -= 2; } $part = substr($word, 0, $len); $word = substr($word, $len); if (strlen($word) > 0) { - $message .= $part . sprintf('=%s', self::CRLF); + $message .= $part . sprintf('=%s', static::$LE); } else { $buf = $part; } @@ -1937,14 +2157,14 @@ class PHPMailer } $buf .= $word; - if (strlen($buf) > $length and $buf_o != '') { + if (strlen($buf) > $length and '' != $buf_o) { $message .= $buf_o . $soft_break; $buf = $word; } } $firstword = false; } - $message .= $buf . self::CRLF; + $message .= $buf . static::$LE; } return $message; @@ -1954,10 +2174,11 @@ class PHPMailer * Find the last character boundary prior to $maxLength in a utf-8 * quoted-printable encoded string. * Original written by Colin Brown. - * @access public + * * @param string $encodedText utf-8 QP text - * @param integer $maxLength Find the last character boundary prior to this length - * @return integer + * @param int $maxLength Find the last character boundary prior to this length + * + * @return int */ public function utf8CharBoundary($encodedText, $maxLength) { @@ -1976,13 +2197,13 @@ class PHPMailer // If the encoded char was found at pos 0, it will fit // otherwise reduce maxLength to start of the encoded char if ($encodedCharPos > 0) { - $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $maxLength -= $lookBack - $encodedCharPos; } $foundSplitPos = true; } elseif ($dec >= 192) { // First byte of a multi byte character // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $maxLength -= $lookBack - $encodedCharPos; $foundSplitPos = true; } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back @@ -1993,6 +2214,7 @@ class PHPMailer $foundSplitPos = true; } } + return $maxLength; } @@ -2001,8 +2223,6 @@ class PHPMailer * Wraps the message body to the number of chars set in the WordWrap property. * You should only do this to plain-text bodies as wrapping HTML tags may break them. * This is called automatically by createBody(), so you don't need to call it yourself. - * @access public - * @return void */ public function setWordWrap() { @@ -2025,25 +2245,25 @@ class PHPMailer /** * Assemble message headers. - * @access public + * * @return string The assembled headers */ public function createHeader() { $result = ''; - $result .= $this->headerLine('Date', $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate); + $result .= $this->headerLine('Date', '' == $this->MessageDate ? self::rfcDate() : $this->MessageDate); // To be created automatically by mail() if ($this->SingleTo) { - if ($this->Mailer != 'mail') { + if ('mail' != $this->Mailer) { foreach ($this->to as $toaddr) { $this->SingleToArray[] = $this->addrFormat($toaddr); } } } else { if (count($this->to) > 0) { - if ($this->Mailer != 'mail') { + if ('mail' != $this->Mailer) { $result .= $this->addrAppend('To', $this->to); } } elseif (count($this->cc) == 0) { @@ -2051,7 +2271,7 @@ class PHPMailer } } - $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); + $result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]); // sendmail and mail() extract Cc from the header before sending if (count($this->cc) > 0) { @@ -2060,7 +2280,7 @@ class PHPMailer // sendmail and mail() extract Bcc from the header before sending if (( - $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' + 'sendmail' == $this->Mailer or 'qmail' == $this->Mailer or 'mail' == $this->Mailer ) and count($this->bcc) > 0 ) { @@ -2072,7 +2292,7 @@ class PHPMailer } // mail() sets the subject itself - if ($this->Mailer != 'mail') { + if ('mail' != $this->Mailer) { $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); } @@ -2084,13 +2304,13 @@ class PHPMailer $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); } $result .= $this->headerLine('Message-ID', $this->lastMessageID); - if (!is_null($this->Priority)) { + if (null !== $this->Priority) { $result .= $this->headerLine('X-Priority', $this->Priority); } - if ($this->XMailer == '') { + if ('' == $this->XMailer) { $result .= $this->headerLine( 'X-Mailer', - 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' + 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)' ); } else { $myXmailer = trim($this->XMailer); @@ -2099,7 +2319,7 @@ class PHPMailer } } - if ($this->ConfirmReadingTo != '') { + if ('' != $this->ConfirmReadingTo) { $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); } @@ -2120,7 +2340,7 @@ class PHPMailer /** * Get the message MIME type headers. - * @access public + * * @return string */ public function getMailMIME() @@ -2151,10 +2371,10 @@ class PHPMailer break; } // RFC1341 part 5 says 7bit is assumed if not specified - if ($this->Encoding != '7bit') { + if ('7bit' != $this->Encoding) { // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE if ($ismultipart) { - if ($this->Encoding == '8bit') { + if ('8bit' == $this->Encoding) { $result .= $this->headerLine('Content-Transfer-Encoding', '8bit'); } // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible @@ -2163,8 +2383,8 @@ class PHPMailer } } - if ($this->Mailer != 'mail') { - $result .= $this->LE; + if ('mail' != $this->Mailer) { + $result .= static::$LE; } return $result; @@ -2174,28 +2394,43 @@ class PHPMailer * Returns the whole MIME message. * Includes complete headers and body. * Only valid post preSend(). + * * @see PHPMailer::preSend() - * @access public + * * @return string */ public function getSentMIMEMessage() { - return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody; + return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody; } /** - * Create unique ID + * Create a unique ID to use for boundaries. + * * @return string */ - protected function generateId() { - return md5(uniqid(time())); + protected function generateId() + { + $len = 32; //32 bytes = 256 bits + if (function_exists('random_bytes')) { + $bytes = random_bytes($len); + } elseif (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($len); + } else { + //Use a hash to force the length to the same as the other methods + $bytes = hash('sha256', uniqid((string) mt_rand(), true), true); + } + + //We don't care about messing up base64 format here, just want a random string + return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true))); } /** * Assemble the message body. * Returns an empty string on failure. - * @access public - * @throws phpmailerException + * + * @throws Exception + * * @return string The assembled message body */ public function createBody() @@ -2208,7 +2443,7 @@ class PHPMailer $this->boundary[3] = 'b3_' . $this->uniqueid; if ($this->sign_key_file) { - $body .= $this->getMailMIME() . $this->LE; + $body .= $this->getMailMIME() . static::$LE; } $this->setWordWrap(); @@ -2216,45 +2451,45 @@ class PHPMailer $bodyEncoding = $this->Encoding; $bodyCharSet = $this->CharSet; //Can we do a 7-bit downgrade? - if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { + if ('8bit' == $bodyEncoding and !$this->has8bitChars($this->Body)) { $bodyEncoding = '7bit'; //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit $bodyCharSet = 'us-ascii'; } //If lines are too long, and we're not already using an encoding that will shorten them, //change to quoted-printable transfer encoding for the body part only - if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { + if ('base64' != $this->Encoding and static::hasLineLongerThanMax($this->Body)) { $bodyEncoding = 'quoted-printable'; } $altBodyEncoding = $this->Encoding; $altBodyCharSet = $this->CharSet; //Can we do a 7-bit downgrade? - if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { + if ('8bit' == $altBodyEncoding and !$this->has8bitChars($this->AltBody)) { $altBodyEncoding = '7bit'; //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit $altBodyCharSet = 'us-ascii'; } //If lines are too long, and we're not already using an encoding that will shorten them, //change to quoted-printable transfer encoding for the alt body part only - if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { + if ('base64' != $altBodyEncoding and static::hasLineLongerThanMax($this->AltBody)) { $altBodyEncoding = 'quoted-printable'; } //Use this as a preamble in all multipart message types - $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; + $mimepre = 'This is a multi-part message in MIME format.' . static::$LE; switch ($this->message_type) { case 'inline': $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->attachAll('inline', $this->boundary[1]); break; case 'attach': $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->attachAll('attachment', $this->boundary[1]); break; case 'inline_attach': @@ -2262,26 +2497,26 @@ class PHPMailer $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', 'multipart/related;'); $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->attachAll('attachment', $this->boundary[1]); break; case 'alt': $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; if (!empty($this->Ical)) { $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); $body .= $this->encodeString($this->Ical, $this->Encoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; } $body .= $this->endBoundary($this->boundary[1]); break; @@ -2289,16 +2524,16 @@ class PHPMailer $body .= $mimepre; $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', 'multipart/related;'); $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->attachAll('inline', $this->boundary[2]); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->endBoundary($this->boundary[1]); break; case 'alt_attach': @@ -2306,15 +2541,19 @@ class PHPMailer $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[2], '', 'text/calendar; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + } $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->attachAll('attachment', $this->boundary[1]); break; case 'alt_inline_attach': @@ -2322,21 +2561,21 @@ class PHPMailer $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); $body .= $this->encodeString($this->AltBody, $altBodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->textLine('--' . $this->boundary[2]); $body .= $this->headerLine('Content-Type', 'multipart/related;'); $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding); $body .= $this->encodeString($this->Body, $bodyEncoding); - $body .= $this->LE . $this->LE; + $body .= static::$LE; $body .= $this->attachAll('inline', $this->boundary[3]); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->endBoundary($this->boundary[2]); - $body .= $this->LE; + $body .= static::$LE; $body .= $this->attachAll('attachment', $this->boundary[1]); break; default: @@ -2349,15 +2588,18 @@ class PHPMailer if ($this->isError()) { $body = ''; + if ($this->exceptions) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } } elseif ($this->sign_key_file) { try { if (!defined('PKCS7_TEXT')) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + throw new Exception($this->lang('extension_missing') . 'openssl'); } - // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 + // @TODO would be nice to use php://temp streams here $file = tempnam(sys_get_temp_dir(), 'mail'); if (false === file_put_contents($file, $body)) { - throw new phpmailerException($this->lang('signing') . ' Could not write temp file'); + throw new Exception($this->lang('signing') . ' Could not write temp file'); } $signed = tempnam(sys_get_temp_dir(), 'signed'); //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 @@ -2366,96 +2608,96 @@ class PHPMailer $file, $signed, 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [] ); } else { $sign = @openssl_pkcs7_sign( $file, $signed, 'file://' . realpath($this->sign_cert_file), - array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), - null, + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [], PKCS7_DETACHED, $this->sign_extracerts_file ); } + @unlink($file); if ($sign) { - @unlink($file); $body = file_get_contents($signed); @unlink($signed); //The message returned by openssl contains both headers and body, so need to split them up $parts = explode("\n\n", $body, 2); - $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; + $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE; $body = $parts[1]; } else { - @unlink($file); @unlink($signed); - throw new phpmailerException($this->lang('signing') . openssl_error_string()); + throw new Exception($this->lang('signing') . openssl_error_string()); } - } catch (phpmailerException $exc) { + } catch (Exception $exc) { $body = ''; if ($this->exceptions) { throw $exc; } } } + return $body; } /** * Return the start of a message boundary. - * @access protected + * * @param string $boundary * @param string $charSet * @param string $contentType * @param string $encoding + * * @return string */ protected function getBoundary($boundary, $charSet, $contentType, $encoding) { $result = ''; - if ($charSet == '') { + if ('' == $charSet) { $charSet = $this->CharSet; } - if ($contentType == '') { + if ('' == $contentType) { $contentType = $this->ContentType; } - if ($encoding == '') { + if ('' == $encoding) { $encoding = $this->Encoding; } $result .= $this->textLine('--' . $boundary); $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); - $result .= $this->LE; + $result .= static::$LE; // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { + if ('7bit' != $encoding) { $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); } - $result .= $this->LE; + $result .= static::$LE; return $result; } /** * Return the end of a message boundary. - * @access protected + * * @param string $boundary + * * @return string */ protected function endBoundary($boundary) { - return $this->LE . '--' . $boundary . '--' . $this->LE; + return static::$LE . '--' . $boundary . '--' . static::$LE; } /** * Set the message type. * PHPMailer only supports some preset message types, not arbitrary MIME structures. - * @access protected - * @return void */ protected function setMessageType() { - $type = array(); + $type = []; if ($this->alternativeExists()) { $type[] = 'alt'; } @@ -2466,7 +2708,7 @@ class PHPMailer $type[] = 'attach'; } $this->message_type = implode('_', $type); - if ($this->message_type == '') { + if ('' == $this->message_type) { //The 'plain' message_type refers to the message having a single body element, not that it is plain-text $this->message_type = 'plain'; } @@ -2474,57 +2716,62 @@ class PHPMailer /** * Format a header line. - * @access public - * @param string $name - * @param string $value + * + * @param string $name + * @param string|int $value + * * @return string */ public function headerLine($name, $value) { - return $name . ': ' . $value . $this->LE; + return $name . ': ' . $value . static::$LE; } /** * Return a formatted mail line. - * @access public + * * @param string $value + * * @return string */ public function textLine($value) { - return $value . $this->LE; + return $value . static::$LE; } /** * Add an attachment from a path on the filesystem. * Never use a user-supplied path to a file! * Returns false if the file could not be found or read. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. + * + * @param string $path Path to the attachment + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type * @param string $disposition Disposition to use - * @throws phpmailerException - * @return boolean + * + * @throws Exception + * + * @return bool */ public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { try { if (!@is_file($path)) { - throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); + throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE); } // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); + if ('' == $type) { + $type = static::filenameToType($path); } $filename = basename($path); - if ($name == '') { + if ('' == $name) { $name = $filename; } - $this->attachment[] = array( + $this->attachment[] = [ 0 => $path, 1 => $filename, 2 => $name, @@ -2532,22 +2779,24 @@ class PHPMailer 4 => $type, 5 => false, // isStringAttachment 6 => $disposition, - 7 => 0 - ); - - } catch (phpmailerException $exc) { + 7 => $name, + ]; + } catch (Exception $exc) { $this->setError($exc->getMessage()); $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } + return false; } + return true; } /** * Return the array of attachments. + * * @return array */ public function getAttachments() @@ -2558,17 +2807,18 @@ class PHPMailer /** * Attach all file, string, and binary attachments to the message. * Returns an empty string on failure. - * @access protected + * * @param string $disposition_type * @param string $boundary + * * @return string */ protected function attachAll($disposition_type, $boundary) { // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); + $mime = []; + $cidUniq = []; + $incl = []; // Add all attachments foreach ($this->attachment as $attachment) { @@ -2584,7 +2834,7 @@ class PHPMailer $path = $attachment[0]; } - $inclhash = md5(serialize($attachment)); + $inclhash = hash('sha256', serialize($attachment)); if (in_array($inclhash, $incl)) { continue; } @@ -2594,34 +2844,34 @@ class PHPMailer $type = $attachment[4]; $disposition = $attachment[6]; $cid = $attachment[7]; - if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { + if ('inline' == $disposition and array_key_exists($cid, $cidUniq)) { continue; } $cidUniq[$cid] = true; - $mime[] = sprintf('--%s%s', $boundary, $this->LE); + $mime[] = sprintf('--%s%s', $boundary, static::$LE); //Only include a filename property if we have one if (!empty($name)) { $mime[] = sprintf( 'Content-Type: %s; name="%s"%s', $type, $this->encodeHeader($this->secureHeader($name)), - $this->LE + static::$LE ); } else { $mime[] = sprintf( 'Content-Type: %s%s', $type, - $this->LE + static::$LE ); } // RFC1341 part 5 says 7bit is assumed if not specified - if ($encoding != '7bit') { - $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); + if ('7bit' != $encoding) { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, static::$LE); } - if ($disposition == 'inline') { - $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE); + if (!empty($cid)) { + $mime[] = sprintf('Content-ID: <%s>%s', $cid, static::$LE); } // If a filename contains any of these chars, it should be quoted, @@ -2635,7 +2885,7 @@ class PHPMailer 'Content-Disposition: %s; filename="%s"%s', $disposition, $encoded_name, - $this->LE . $this->LE + static::$LE . static::$LE ); } else { if (!empty($encoded_name)) { @@ -2643,38 +2893,34 @@ class PHPMailer 'Content-Disposition: %s; filename=%s%s', $disposition, $encoded_name, - $this->LE . $this->LE + static::$LE . static::$LE ); } else { $mime[] = sprintf( 'Content-Disposition: %s%s', $disposition, - $this->LE . $this->LE + static::$LE . static::$LE ); } } } else { - $mime[] = $this->LE; + $mime[] = static::$LE; } // Encode as string attachment if ($bString) { $mime[] = $this->encodeString($string, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; } else { $mime[] = $this->encodeFile($path, $encoding); - if ($this->isError()) { - return ''; - } - $mime[] = $this->LE . $this->LE; } + if ($this->isError()) { + return ''; + } + $mime[] = static::$LE; } } - $mime[] = sprintf('--%s--%s', $boundary, $this->LE); + $mime[] = sprintf('--%s--%s', $boundary, static::$LE); return implode('', $mime); } @@ -2682,41 +2928,30 @@ class PHPMailer /** * Encode a file attachment in requested format. * Returns an empty string on failure. - * @param string $path The full path to the file + * + * @param string $path The full path to the file * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @throws phpmailerException - * @access protected + * + * @throws Exception + * * @return string */ protected function encodeFile($path, $encoding = 'base64') { try { - if (!is_readable($path)) { - throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); - } - $magic_quotes = get_magic_quotes_runtime(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(false); - } else { - //Doesn't exist in PHP 5.4, but we don't need to check because - //get_magic_quotes_runtime always returns false in 5.4+ - //so it will never get here - ini_set('magic_quotes_runtime', false); - } + if (!file_exists($path)) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); } $file_buffer = file_get_contents($path); - $file_buffer = $this->encodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } + if (false === $file_buffer) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); } + $file_buffer = $this->encodeString($file_buffer, $encoding); + return $file_buffer; } catch (Exception $exc) { $this->setError($exc->getMessage()); + return ''; } } @@ -2724,9 +2959,10 @@ class PHPMailer /** * Encode a string in requested format. * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public + * + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable + * * @return string */ public function encodeString($str, $encoding = 'base64') @@ -2734,14 +2970,18 @@ class PHPMailer $encoded = ''; switch (strtolower($encoding)) { case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); + $encoded = chunk_split( + base64_encode($str), + static::STD_LINE_LENGTH, + static::$LE + ); break; case '7bit': case '8bit': - $encoded = $this->fixEOL($str); + $encoded = static::normalizeBreaks($str); // Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) { - $encoded .= $this->LE; + if (substr($encoded, -(strlen(static::$LE))) != static::$LE) { + $encoded .= static::$LE; } break; case 'binary': @@ -2754,15 +2994,18 @@ class PHPMailer $this->setError($this->lang('encoding') . $encoding); break; } + return $encoded; } /** - * Encode a header string optimally. - * Picks shortest of Q, B, quoted-printable or none. - * @access public - * @param string $str - * @param string $position + * Encode a header value (not including its label) optimally. + * Picks shortest of Q, B, or none. Result includes folding if needed. + * See RFC822 definitions for phrase, comment and text positions. + * + * @param string $str The header value to encode + * @param string $position What context the string will be used in + * * @return string */ public function encodeHeader($str, $position = 'text') @@ -2773,35 +3016,39 @@ class PHPMailer if (!preg_match('/[\200-\377]/', $str)) { // Can't use addslashes as we don't know the value of magic_quotes_sybase $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); + if (($str == $encoded) and !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return $encoded; } + + return "\"$encoded\""; } $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); break; - /** @noinspection PhpMissingBreakStatementInspection */ + /* @noinspection PhpMissingBreakStatementInspection */ case 'comment': $matchcount = preg_match_all('/[()"]/', $str, $matches); - // Intentional fall-through + //fallthrough case 'text': default: $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); break; } - //There are no chars that need encoding - if ($matchcount == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); + //RFCs specify a maximum line length of 78 chars, however mail() will sometimes + //corrupt messages with headers longer than 65 chars. See #818 + $lengthsub = 'mail' == $this->Mailer ? 13 : 0; + $maxlen = static::STD_LINE_LENGTH - $lengthsub; // Try to select the encoding which should produce the shortest output if ($matchcount > strlen($str) / 3) { // More than a third of the content will need encoding, so B encoding will be most efficient $encoding = 'B'; - if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { + //This calculation is: + // max line length + // - shorten to avoid mail() corruption + // - Q/B encoding char overhead ("` =??[QB]??=`") + // - charset name length + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); + if ($this->hasMultiBytes($str)) { // Use a custom function which correctly encodes and wraps long // multibyte strings without breaking lines within a character $encoded = $this->base64EncodeWrapMB($str, "\n"); @@ -2810,52 +3057,72 @@ class PHPMailer $maxlen -= $maxlen % 4; $encoded = trim(chunk_split($encoded, $maxlen, "\n")); } - } else { + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif ($matchcount > 0) { + //1 or more chars need encoding, use Q-encode $encoding = 'Q'; + //Recalc max line length for Q encoding - see comments on B encode + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); $encoded = $this->encodeQ($str, $position); $encoded = $this->wrapText($encoded, $maxlen, true); - $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); + $encoded = str_replace('=' . static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif (strlen($str) > $maxlen) { + //No chars need encoding, but line is too long, so fold it + $encoded = trim($this->wrapText($str, $maxlen, false)); + if ($str == $encoded) { + //Wrapping nicely didn't work, wrap hard instead + $encoded = trim(chunk_split($str, static::STD_LINE_LENGTH, static::$LE)); + } + $encoded = str_replace(static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' \\1', $encoded); + } else { + //No reformatting needed + return $str; } - $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; + return trim(static::normalizeBreaks($encoded)); } /** * Check if a string contains multi-byte characters. - * @access public + * * @param string $str multi-byte text to wrap encode - * @return boolean + * + * @return bool */ public function hasMultiBytes($str) { if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - return false; + return strlen($str) > mb_strlen($str, $this->CharSet); } + + // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; } /** * Does a string contain any 8-bit chars (in any charset)? + * * @param string $text - * @return boolean + * + * @return bool */ public function has8bitChars($text) { - return (boolean)preg_match('/[\x80-\xFF]/', $text); + return (bool) preg_match('/[\x80-\xFF]/', $text); } /** * Encode and wrap long multibyte strings for mail headers * without breaking lines within a character. - * Adapted from a function by paravoid - * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 - * @access public - * @param string $str multi-byte text to wrap encode + * Adapted from a function by paravoid. + * + * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * + * @param string $str multi-byte text to wrap encode * @param string $linebreak string to use as linefeed/end-of-line + * * @return string */ public function base64EncodeWrapMB($str, $linebreak = null) @@ -2863,8 +3130,8 @@ class PHPMailer $start = '=?' . $this->CharSet . '?B?'; $end = '?='; $encoded = ''; - if ($linebreak === null) { - $linebreak = $this->LE; + if (null === $linebreak) { + $linebreak = static::$LE; } $mb_length = mb_strlen($str, $this->CharSet); @@ -2881,90 +3148,65 @@ class PHPMailer $offset = $avgLength - $lookBack; $chunk = mb_substr($str, $i, $offset, $this->CharSet); $chunk = base64_encode($chunk); - $lookBack++; + ++$lookBack; } while (strlen($chunk) > $length); $encoded .= $chunk . $linebreak; } // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($linebreak)); - return $encoded; + return substr($encoded, 0, -strlen($linebreak)); } /** * Encode a string in quoted-printable format. * According to RFC2045 section 6.7. - * @access public + * * @param string $string The text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping + * * @return string - * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment */ - public function encodeQP($string, $line_max = 76) + public function encodeQP($string) { - // Use native function if it's available (>= PHP5.3) - if (function_exists('quoted_printable_encode')) { - return quoted_printable_encode($string); - } - // Fall back to a pure PHP implementation - $string = str_replace( - array('%20', '%0D%0A.', '%0D%0A', '%'), - array(' ', "\r\n=2E", "\r\n", '='), - rawurlencode($string) - ); - return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); - } - - /** - * Backward compatibility wrapper for an old QP encoding function that was removed. - * @see PHPMailer::encodeQP() - * @access public - * @param string $string - * @param integer $line_max - * @param boolean $space_conv - * @return string - * @deprecated Use encodeQP instead. - */ - public function encodeQPphp( - $string, - $line_max = 76, - /** @noinspection PhpUnusedParameterInspection */ $space_conv = false - ) { - return $this->encodeQP($string, $line_max); + return static::normalizeBreaks(quoted_printable_encode($string)); } /** * Encode a string using Q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode + * + * @see http://tools.ietf.org/html/rfc2047#section-4.2 + * + * @param string $str the text to encode * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public + * * @return string */ public function encodeQ($str, $position = 'text') { // There should not be any EOL in the string $pattern = ''; - $encoded = str_replace(array("\r", "\n"), '', $str); + $encoded = str_replace(["\r", "\n"], '', $str); switch (strtolower($position)) { case 'phrase': // RFC 2047 section 5.3 $pattern = '^A-Za-z0-9!*+\/ -'; break; - /** @noinspection PhpMissingBreakStatementInspection */ + /* + * RFC 2047 section 5.2. + * Build $pattern without including delimiters and [] + */ + /* @noinspection PhpMissingBreakStatementInspection */ case 'comment': - // RFC 2047 section 5.2 $pattern = '\(\)"'; - // intentional fall-through - // for this reason we build the $pattern without including delimiters and [] + /* Intentional fall through */ case 'text': default: // RFC 2047 section 5.1 // Replace every high ascii, control, =, ? and _ characters + /** @noinspection SuspiciousAssignmentsInspection */ $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; break; } - $matches = array(); + $matches = []; if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { // If the string contains an '=', make sure it's the first thing we replace // so as to avoid double-encoding @@ -2977,7 +3219,8 @@ class PHPMailer $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); } } - // Replace every spaces to _ (more readable than =20) + // Replace spaces with _ (more readable than =20) + // RFC 2047 section 4.2(2) return str_replace(' ', '_', $encoded); } @@ -2985,12 +3228,12 @@ class PHPMailer * Add a string or binary attachment (non-filesystem). * This method can be used to attach ascii or binary data, * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. + * + * @param string $string String attachment data + * @param string $filename Name of the attachment + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type * @param string $disposition Disposition to use - * @return void */ public function addStringAttachment( $string, @@ -3000,11 +3243,11 @@ class PHPMailer $disposition = 'attachment' ) { // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($filename); + if ('' == $type) { + $type = static::filenameToType($filename); } // Append to $attachment array - $this->attachment[] = array( + $this->attachment[] = [ 0 => $string, 1 => $filename, 2 => basename($filename), @@ -3012,8 +3255,8 @@ class PHPMailer 4 => $type, 5 => true, // isStringAttachment 6 => $disposition, - 7 => 0 - ); + 7 => 0, + ]; } /** @@ -3024,34 +3267,37 @@ class PHPMailer * This is used in HTML messages that embed the images * the HTML refers to using the $cid value. * Never use a user-supplied path to a file! - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File MIME type. + * + * @param string $path Path to the attachment + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File MIME type * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment + * + * @return bool True on successfully adding an attachment */ public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') { if (!@is_file($path)) { $this->setError($this->lang('file_access') . $path); + return false; } // If a MIME type is not specified, try to work it out from the file name - if ($type == '') { - $type = self::filenameToType($path); + if ('' == $type) { + $type = static::filenameToType($path); } $filename = basename($path); - if ($name == '') { + if ('' == $name) { $name = $filename; } // Append to $attachment array - $this->attachment[] = array( + $this->attachment[] = [ 0 => $path, 1 => $filename, 2 => $name, @@ -3059,24 +3305,28 @@ class PHPMailer 4 => $type, 5 => false, // isStringAttachment 6 => $disposition, - 7 => $cid - ); + 7 => $cid, + ]; + return true; } /** * Add an embedded stringified attachment. * This can include images, sounds, and just about any other document type. - * Be sure to set the $type to an image type for images: - * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. - * @param string $string The attachment binary data. - * @param string $cid Content ID of the attachment; Use this to reference - * the content when using an embedded image in HTML. - * @param string $name - * @param string $encoding File encoding (see $Encoding). - * @param string $type MIME type. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. + * + * @param string $string The attachment binary data + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type * @param string $disposition Disposition to use - * @return boolean True on successfully adding an attachment + * + * @return bool True on successfully adding an attachment */ public function addStringEmbeddedImage( $string, @@ -3087,12 +3337,12 @@ class PHPMailer $disposition = 'inline' ) { // If a MIME type is not specified, try to work it out from the name - if ($type == '' and !empty($name)) { - $type = self::filenameToType($name); + if ('' == $type and !empty($name)) { + $type = static::filenameToType($name); } // Append to $attachment array - $this->attachment[] = array( + $this->attachment[] = [ 0 => $string, 1 => $name, 2 => $name, @@ -3100,43 +3350,66 @@ class PHPMailer 4 => $type, 5 => true, // isStringAttachment 6 => $disposition, - 7 => $cid - ); + 7 => $cid, + ]; + return true; } + /** + * Check if an embedded attachment is present with this cid. + * + * @param string $cid + * + * @return bool + */ + protected function cidExists($cid) + { + foreach ($this->attachment as $attachment) { + if ('inline' == $attachment[6] and $cid == $attachment[7]) { + return true; + } + } + + return false; + } + /** * Check if an inline attachment is present. - * @access public - * @return boolean + * + * @return bool */ public function inlineImageExists() { foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { + if ('inline' == $attachment[6]) { return true; } } + return false; } /** * Check if an attachment (non-inline) is present. - * @return boolean + * + * @return bool */ public function attachmentExists() { foreach ($this->attachment as $attachment) { - if ($attachment[6] == 'attachment') { + if ('attachment' == $attachment[6]) { return true; } } + return false; } /** * Check if this message has an alternative body set. - * @return boolean + * + * @return bool */ public function alternativeExists() { @@ -3145,115 +3418,106 @@ class PHPMailer /** * Clear queued addresses of given kind. - * @access protected + * * @param string $kind 'to', 'cc', or 'bcc' - * @return void */ public function clearQueuedAddresses($kind) { - $RecipientsQueue = $this->RecipientsQueue; - foreach ($RecipientsQueue as $address => $params) { - if ($params[0] == $kind) { - unset($this->RecipientsQueue[$address]); + $this->RecipientsQueue = array_filter( + $this->RecipientsQueue, + function ($params) use ($kind) { + return $params[0] != $kind; } - } + ); } /** * Clear all To recipients. - * @return void */ public function clearAddresses() { foreach ($this->to as $to) { unset($this->all_recipients[strtolower($to[0])]); } - $this->to = array(); + $this->to = []; $this->clearQueuedAddresses('to'); } /** * Clear all CC recipients. - * @return void */ public function clearCCs() { foreach ($this->cc as $cc) { unset($this->all_recipients[strtolower($cc[0])]); } - $this->cc = array(); + $this->cc = []; $this->clearQueuedAddresses('cc'); } /** * Clear all BCC recipients. - * @return void */ public function clearBCCs() { foreach ($this->bcc as $bcc) { unset($this->all_recipients[strtolower($bcc[0])]); } - $this->bcc = array(); + $this->bcc = []; $this->clearQueuedAddresses('bcc'); } /** * Clear all ReplyTo recipients. - * @return void */ public function clearReplyTos() { - $this->ReplyTo = array(); - $this->ReplyToQueue = array(); + $this->ReplyTo = []; + $this->ReplyToQueue = []; } /** * Clear all recipient types. - * @return void */ public function clearAllRecipients() { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - $this->RecipientsQueue = array(); + $this->to = []; + $this->cc = []; + $this->bcc = []; + $this->all_recipients = []; + $this->RecipientsQueue = []; } /** * Clear all filesystem, string, and binary attachments. - * @return void */ public function clearAttachments() { - $this->attachment = array(); + $this->attachment = []; } /** * Clear all custom headers. - * @return void */ public function clearCustomHeaders() { - $this->CustomHeader = array(); + $this->CustomHeader = []; } /** * Add an error message to the error container. - * @access protected + * * @param string $msg - * @return void */ protected function setError($msg) { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { + ++$this->error_count; + if ('smtp' == $this->Mailer and null !== $this->smtp) { $lasterror = $this->smtp->getError(); if (!empty($lasterror['error'])) { $msg .= $this->lang('smtp_error') . $lasterror['error']; if (!empty($lasterror['detail'])) { - $msg .= ' Detail: '. $lasterror['detail']; + $msg .= ' Detail: ' . $lasterror['detail']; } if (!empty($lasterror['smtp_code'])) { $msg .= ' SMTP code: ' . $lasterror['smtp_code']; @@ -3268,43 +3532,83 @@ class PHPMailer /** * Return an RFC 822 formatted date. - * @access public + * * @return string - * @static */ public static function rfcDate() { // Set the time zone to whatever the default is to avoid 500 errors // Will default to UTC if it's not set properly in php.ini date_default_timezone_set(@date_default_timezone_get()); + return date('D, j M Y H:i:s O'); } /** * Get the server hostname. * Returns 'localhost.localdomain' if unknown. - * @access protected + * * @return string */ protected function serverHostname() { - $result = 'localhost.localdomain'; + $result = ''; if (!empty($this->Hostname)) { $result = $this->Hostname; - } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER)) { $result = $_SERVER['SERVER_NAME']; - } elseif (function_exists('gethostname') && gethostname() !== false) { + } elseif (function_exists('gethostname') and gethostname() !== false) { $result = gethostname(); } elseif (php_uname('n') !== false) { $result = php_uname('n'); } + if (!static::isValidHost($result)) { + return 'localhost.localdomain'; + } + return $result; } + /** + * Validate whether a string contains a valid value to use as a hostname or IP address. + * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. + * + * @param string $host The host name or IP address to check + * + * @return bool + */ + public static function isValidHost($host) + { + //Simple syntax limits + if (empty($host) + or !is_string($host) + or strlen($host) > 256 + ) { + return false; + } + //Looks like a bracketed IPv6 address + if (trim($host, '[]') != $host) { + return (bool) filter_var(trim($host, '[]'), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); + } + //If removing all the dots results in a numeric string, it must be an IPv4 address. + //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names + if (is_numeric(str_replace('.', '', $host))) { + //Is it a valid IPv4 address? + return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); + } + if (filter_var('http://' . $host, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED)) { + //Is it a syntactically valid hostname? + return true; + } + + return false; + } + /** * Get an error message in the current language. - * @access protected + * * @param string $key + * * @return string */ protected function lang($key) @@ -3314,68 +3618,51 @@ class PHPMailer } if (array_key_exists($key, $this->language)) { - if ($key == 'smtp_connect_failed') { + if ('smtp_connect_failed' == $key) { //Include a link to troubleshooting docs on SMTP connection failure //this is by far the biggest cause of support questions //but it's usually not PHPMailer's fault. return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; } + return $this->language[$key]; - } else { - //Return the key as a fallback - return $key; } + + //Return the key as a fallback + return $key; } /** * Check if an error occurred. - * @access public - * @return boolean True if an error did occur. + * + * @return bool True if an error did occur */ public function isError() { - return ($this->error_count > 0); - } - - /** - * Ensure consistent line endings in a string. - * Changes every end of line from CRLF, CR or LF to $this->LE. - * @access public - * @param string $str String to fixEOL - * @return string - */ - public function fixEOL($str) - { - // Normalise to \n - $nstr = str_replace(array("\r\n", "\r"), "\n", $str); - // Now convert LE as needed - if ($this->LE !== "\n") { - $nstr = str_replace("\n", $this->LE, $nstr); - } - return $nstr; + return $this->error_count > 0; } /** * Add a custom header. * $name value can be overloaded to contain - * both header name and value (name:value) - * @access public - * @param string $name Custom header name - * @param string $value Header value - * @return void + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value */ public function addCustomHeader($name, $value = null) { - if ($value === null) { + if (null === $value) { // Value passed in as name:value $this->CustomHeader[] = explode(':', $name, 2); } else { - $this->CustomHeader[] = array($name, $value); + $this->CustomHeader[] = [$name, $value]; } } /** * Returns all custom headers. + * * @return array */ public function getCustomHeaders() @@ -3391,58 +3678,69 @@ class PHPMailer * $basedir is prepended when handling relative URLs, e.g. and must not be empty * will look for an image file in $basedir/images/a.png and convert it to inline. * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * Converts data-uri images into embedded attachments. * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. - * @access public - * @param string $message HTML message string - * @param string $basedir Absolute path to a base directory to prepend to relative paths to images - * @param boolean|callable $advanced Whether to use the internal HTML to text converter - * or your own custom converter @see PHPMailer::html2text() + * + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param bool|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter @see PHPMailer::html2text() + * * @return string $message The transformed message Body */ public function msgHTML($message, $basedir = '', $advanced = false) { preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); if (array_key_exists(2, $images)) { - if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { + if (strlen($basedir) > 1 && '/' != substr($basedir, -1)) { // Ensure $basedir has a trailing / $basedir .= '/'; } foreach ($images[2] as $imgindex => $url) { // Convert data URIs into embedded images - if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { - $data = substr($url, strpos($url, ',')); - if ($match[2]) { - $data = base64_decode($data); + //e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { + if (count($match) == 4 and 'base64' == $match[2]) { + $data = base64_decode($match[3]); + } elseif ('' == $match[2]) { + $data = rawurldecode($match[3]); } else { - $data = rawurldecode($data); + //Not recognised so leave it alone + continue; } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { - $message = str_replace( - $images[0][$imgindex], - $images[1][$imgindex] . '="cid:' . $cid . '"', - $message - ); + //Hash the decoded data, not the URL so that the same data-URI image used in multiple places + //will only be embedded once, even if it used a different encoding + $cid = hash('sha256', $data) . '@phpmailer.0'; // RFC2392 S 2 + + if (!$this->cidExists($cid)) { + $this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1]); } + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); continue; } - if ( - // Only process relative URLs if a basedir is provided (i.e. no absolute local paths) + if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths) !empty($basedir) // Ignore URLs containing parent dir traversal (..) - && (strpos($url, '..') === false) + and (strpos($url, '..') === false) // Do not change urls that are already inline images - && substr($url, 0, 4) !== 'cid:' + and 0 !== strpos($url, 'cid:') // Do not change absolute URLs, including anonymous protocol - && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + and !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) ) { $filename = basename($url); $directory = dirname($url); - if ($directory == '.') { + if ('.' == $directory) { $directory = ''; } - $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 - if (strlen($directory) > 1 && substr($directory, -1) != '/') { + $cid = hash('sha256', $url) . '@phpmailer.0'; // RFC2392 S 2 + if (strlen($basedir) > 1 and '/' != substr($basedir, -1)) { + $basedir .= '/'; + } + if (strlen($directory) > 1 and '/' != substr($directory, -1)) { $directory .= '/'; } if ($this->addEmbeddedImage( @@ -3450,7 +3748,7 @@ class PHPMailer $cid, $filename, 'base64', - self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION)) + static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION)) ) ) { $message = preg_replace( @@ -3463,13 +3761,14 @@ class PHPMailer } } $this->isHTML(true); - // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better - $this->Body = $this->normalizeBreaks($message); - $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); + // Convert all message body line breaks to LE, makes quoted-printable encoding work much better + $this->Body = static::normalizeBreaks($message); + $this->AltBody = static::normalizeBreaks($this->html2text($message, $advanced)); if (!$this->alternativeExists()) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . - self::CRLF . self::CRLF; + $this->AltBody = 'This is an HTML-only message. To view it, activate HTML in your email application.' + . static::$LE; } + return $this->Body; } @@ -3477,9 +3776,10 @@ class PHPMailer * Convert an HTML string into plain text. * This is used by msgHTML(). * Note - older versions of this function used a bundled advanced converter - * which was been removed for license reasons in #232. + * which was removed for license reasons in #232. * Example usage: - * + * + * ```php * // Use default conversion * $plain = $mail->html2text($html); * // Use your own custom converter @@ -3487,10 +3787,12 @@ class PHPMailer * $converter = new MyHtml2text($html); * return $converter->get_text(); * }); - * - * @param string $html The HTML text to convert - * @param boolean|callable $advanced Any boolean value to use the internal converter, - * or provide your own callable for custom conversion. + * ``` + * + * @param string $html The HTML text to convert + * @param bool|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion + * * @return string */ public function html2text($html, $advanced = false) @@ -3498,6 +3800,7 @@ class PHPMailer if (is_callable($advanced)) { return call_user_func($advanced, $html); } + return html_entity_decode( trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), ENT_QUOTES, @@ -3507,125 +3810,129 @@ class PHPMailer /** * Get the MIME type for a file extension. + * * @param string $ext File extension - * @access public - * @return string MIME type of file. - * @static + * + * @return string MIME type of file */ public static function _mime_types($ext = '') { - $mimes = array( - 'xl' => 'application/excel', - 'js' => 'application/javascript', - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'bin' => 'application/macbinary', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', - 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + $mimes = [ + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'class' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'dms' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php3' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php' => 'application/x-httpd-php', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xht' => 'application/xhtml+xml', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', 'xhtml' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'mpga' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'eml' => 'message/rfc822', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', 'shtml' => 'text/html', - 'log' => 'text/plain', - 'text' => 'text/plain', - 'txt' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'vcf' => 'text/vcard', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', 'vcard' => 'text/vcard', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mov' => 'video/quicktime', - 'qt' => 'video/quicktime', - 'rv' => 'video/vnd.rn-realvideo', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie' - ); - if (array_key_exists(strtolower($ext), $mimes)) { - return $mimes[strtolower($ext)]; + 'ics' => 'text/calendar', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + ]; + $ext = strtolower($ext); + if (array_key_exists($ext, $mimes)) { + return $mimes[$ext]; } + return 'application/octet-stream'; } /** * Map a file name to a MIME type. * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * * @param string $filename A file name or full path, does not need to exist as a file + * * @return string - * @static */ public static function filenameToType($filename) { @@ -3634,26 +3941,28 @@ class PHPMailer if (false !== $qpos) { $filename = substr($filename, 0, $qpos); } - $pathinfo = self::mb_pathinfo($filename); - return self::_mime_types($pathinfo['extension']); + $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION); + + return static::_mime_types($ext); } /** * Multi-byte-safe pathinfo replacement. - * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. - * Works similarly to the one in PHP >= 5.2.0 - * @link http://www.php.net/manual/en/function.pathinfo.php#107461 - * @param string $path A filename or path, does not need to exist as a file - * @param integer|string $options Either a PATHINFO_* constant, - * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 + * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. + * + * @see http://www.php.net/manual/en/function.pathinfo.php#107461 + * + * @param string $path A filename or path, does not need to exist as a file + * @param int|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece + * * @return string|array - * @static */ public static function mb_pathinfo($path, $options = null) { - $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); - $pathinfo = array(); - if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) { + $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '']; + $pathinfo = []; + if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$#im', $path, $pathinfo)) { if (array_key_exists(1, $pathinfo)) { $ret['dirname'] = $pathinfo[1]; } @@ -3692,56 +4001,88 @@ class PHPMailer * Usage Example: * `$mail->set('SMTPSecure', 'tls');` * is the same as: - * `$mail->SMTPSecure = 'tls';` - * @access public - * @param string $name The property name to set - * @param mixed $value The value to set the property to - * @return boolean - * @TODO Should this not be using the __set() magic function? + * `$mail->SMTPSecure = 'tls';`. + * + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * + * @return bool */ public function set($name, $value = '') { if (property_exists($this, $name)) { $this->$name = $value; + return true; - } else { - $this->setError($this->lang('variable_set') . $name); - return false; } + $this->setError($this->lang('variable_set') . $name); + + return false; } /** * Strip newlines to prevent header injection. - * @access public + * * @param string $str + * * @return string */ public function secureHeader($str) { - return trim(str_replace(array("\r", "\n"), '', $str)); + return trim(str_replace(["\r", "\n"], '', $str)); } /** * Normalize line breaks in a string. * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * * @param string $text - * @param string $breaktype What kind of line break to use, defaults to CRLF + * @param string $breaktype What kind of line break to use; defaults to static::$LE + * * @return string - * @access public - * @static */ - public static function normalizeBreaks($text, $breaktype = "\r\n") + public static function normalizeBreaks($text, $breaktype = null) { - return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); + if (null === $breaktype) { + $breaktype = static::$LE; + } + // Normalise to \n + $text = str_replace(["\r\n", "\r"], "\n", $text); + // Now convert LE as needed + if ("\n" !== $breaktype) { + $text = str_replace("\n", $breaktype, $text); + } + + return $text; + } + + /** + * Return the current line break format string. + * + * @return string + */ + public static function getLE() + { + return static::$LE; + } + + /** + * Set the line break format string, e.g. "\r\n". + * + * @param string $le + */ + protected static function setLE($le) + { + static::$LE = $le; } /** * Set the public and private key files and password for S/MIME signing. - * @access public + * * @param string $cert_filename * @param string $key_filename - * @param string $key_pass Password for private key + * @param string $key_pass Password for private key * @param string $extracerts_filename Optional path to chain certificate */ public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') @@ -3754,118 +4095,135 @@ class PHPMailer /** * Quoted-Printable-encode a DKIM header. - * @access public + * * @param string $txt + * * @return string */ public function DKIM_QP($txt) { $line = ''; - for ($i = 0; $i < strlen($txt); $i++) { + $len = strlen($txt); + for ($i = 0; $i < $len; ++$i) { $ord = ord($txt[$i]); - if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { + if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) { $line .= $txt[$i]; } else { $line .= '=' . sprintf('%02X', $ord); } } + return $line; } /** * Generate a DKIM signature. - * @access public + * * @param string $signHeader - * @throws phpmailerException + * + * @throws Exception + * * @return string The DKIM signature value */ public function DKIM_Sign($signHeader) { if (!defined('PKCS7_TEXT')) { if ($this->exceptions) { - throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + throw new Exception($this->lang('extension_missing') . 'openssl'); } + return ''; } - $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); + $privKeyStr = !empty($this->DKIM_private_string) ? + $this->DKIM_private_string : + file_get_contents($this->DKIM_private); if ('' != $this->DKIM_passphrase) { $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); } else { $privKey = openssl_pkey_get_private($privKeyStr); } - //Workaround for missing digest algorithms in old PHP & OpenSSL versions - //@link http://stackoverflow.com/a/11117338/333340 - if (version_compare(PHP_VERSION, '5.3.0') >= 0 and - in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { - if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { - openssl_pkey_free($privKey); - return base64_encode($signature); - } - } else { - $pinfo = openssl_pkey_get_details($privKey); - $hash = hash('sha256', $signHeader); - //'Magic' constant for SHA256 from RFC3447 - //@link https://tools.ietf.org/html/rfc3447#page-43 - $t = '3031300d060960864801650304020105000420' . $hash; - $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3); - $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); - if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { - openssl_pkey_free($privKey); - return base64_encode($signature); - } + return base64_encode($signature); } openssl_pkey_free($privKey); + return ''; } /** * Generate a DKIM canonicalization header. - * @access public + * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. + * Canonicalized headers should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.2 + * * @param string $signHeader Header + * * @return string */ public function DKIM_HeaderC($signHeader) { - $signHeader = preg_replace('/\r\n\s+/', ' ', $signHeader); + //Unfold all header continuation lines + //Also collapses folded whitespace. + //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]` + //@see https://tools.ietf.org/html/rfc5322#section-2.2 + //That means this may break if you do something daft like put vertical tabs in your headers. + $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader); $lines = explode("\r\n", $signHeader); foreach ($lines as $key => $line) { + //If the header is missing a :, skip it as it's invalid + //This is likely to happen because the explode() above will also split + //on the trailing LE, leaving an empty line + if (strpos($line, ':') === false) { + continue; + } list($heading, $value) = explode(':', $line, 2); + //Lower-case header name $heading = strtolower($heading); - $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces - $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value + //Collapse white space within the value + $value = preg_replace('/[ \t]{2,}/', ' ', $value); + //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value + //But then says to delete space before and after the colon. + //Net result is the same as trimming both ends of the value. + //by elimination, the same applies to the field name + $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t"); } - $signHeader = implode("\r\n", $lines); - return $signHeader; + + return implode("\r\n", $lines); } /** * Generate a DKIM canonicalization body. - * @access public + * Uses the 'simple' algorithm from RFC6376 section 3.4.3. + * Canonicalized bodies should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.3 + * * @param string $body Message Body + * * @return string */ public function DKIM_BodyC($body) { - if ($body == '') { + if (empty($body)) { return "\r\n"; } - // stabilize line endings - $body = str_replace("\r\n", "\n", $body); - $body = str_replace("\n", "\r\n", $body); - // END stabilize line endings - while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { - $body = substr($body, 0, strlen($body) - 2); - } - return $body; + // Normalize line endings to CRLF + $body = static::normalizeBreaks($body, "\r\n"); + + //Reduce multiple trailing line breaks to a single one + return rtrim($body, "\r\n") . "\r\n"; } /** * Create the DKIM header and body in a new message header. - * @access public + * * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body + * @param string $subject Subject + * @param string $body Body + * * @return string */ public function DKIM_Add($headers_line, $subject, $body) @@ -3875,7 +4233,7 @@ class PHPMailer $DKIMquery = 'dns/txt'; // Query method $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) $subject_header = "Subject: $subject"; - $headers = explode($this->LE, $headers_line); + $headers = explode(static::$LE, $headers_line); $from_header = ''; $to_header = ''; $date_header = ''; @@ -3891,7 +4249,7 @@ class PHPMailer $date_header = $header; $current = 'date_header'; } else { - if (!empty($$current) && strpos($header, ' =?') === 0) { + if (!empty($$current) and strpos($header, ' =?') === 0) { $$current .= $header; } else { $current = ''; @@ -3937,25 +4295,27 @@ class PHPMailer $dkimhdrs ); $signed = $this->DKIM_Sign($toSign); - return $dkimhdrs . $signed . "\r\n"; + + return static::normalizeBreaks($dkimhdrs . $signed) . static::$LE; } /** - * Detect if a string contains a line longer than the maximum line length allowed. + * Detect if a string contains a line longer than the maximum line length + * allowed by RFC 2822 section 2.1.1. + * * @param string $str - * @return boolean - * @static + * + * @return bool */ public static function hasLineLongerThanMax($str) { - //+2 to include CRLF line break for a 1000 total - return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str); + return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str); } /** * Allows for public read access to 'to' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * * @return array */ public function getToAddresses() @@ -3965,8 +4325,8 @@ class PHPMailer /** * Allows for public read access to 'cc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * * @return array */ public function getCcAddresses() @@ -3976,8 +4336,8 @@ class PHPMailer /** * Allows for public read access to 'bcc' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * * @return array */ public function getBccAddresses() @@ -3987,8 +4347,8 @@ class PHPMailer /** * Allows for public read access to 'ReplyTo' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * * @return array */ public function getReplyToAddresses() @@ -3998,8 +4358,8 @@ class PHPMailer /** * Allows for public read access to 'all_recipients' property. - * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. - * @access public + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * * @return array */ public function getAllRecipientAddresses() @@ -4009,36 +4369,40 @@ class PHPMailer /** * Perform a callback. - * @param boolean $isSent - * @param array $to - * @param array $cc - * @param array $bcc + * + * @param bool $isSent + * @param array $to + * @param array $cc + * @param array $bcc * @param string $subject * @param string $body * @param string $from + * @param array $extra */ - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) { - if (!empty($this->action_function) && is_callable($this->action_function)) { - $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); - call_user_func_array($this->action_function, $params); + if (!empty($this->action_function) and is_callable($this->action_function)) { + call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra); } } -} -/** - * PHPMailer exception handler - * @package PHPMailer - */ -class phpmailerException extends Exception -{ /** - * Prettify error message output - * @return string + * Get the OAuth instance. + * + * @return OAuth */ - public function errorMessage() + public function getOAuth() { - $errorMsg = '' . htmlspecialchars($this->getMessage()) . "
\n"; - return $errorMsg; + return $this->oauth; + } + + /** + * Set an OAuth instance. + * + * @param OAuth $oauth + */ + public function setOAuth(OAuth $oauth) + { + $this->oauth = $oauth; } } diff --git a/e_lib/phpmailer5/class.pop3.php b/vendor/phpmailer/phpmailer/src/POP3.php similarity index 62% rename from e_lib/phpmailer5/class.pop3.php rename to vendor/phpmailer/phpmailer/src/POP3.php index f833ac61..47aa3949 100644 --- a/e_lib/phpmailer5/class.pop3.php +++ b/vendor/phpmailer/phpmailer/src/POP3.php @@ -1,141 +1,146 @@ - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2014 Marcus Bointon + * PHP Version 5.5. + * + * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ +namespace PHPMailer\PHPMailer; + /** * PHPMailer POP-Before-SMTP Authentication Class. * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. - * Does not support APOP. - * @package PHPMailer - * @author Richard Davey (original author) - * @author Marcus Bointon (Synchro/coolbru) - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) + * 1) This class does not support APOP authentication. + * 2) Opening and closing lots of POP3 connections can be quite slow. If you need + * to send a batch of emails then just perform the authentication once at the start, + * and then loop through your mail sending script. Providing this process doesn't + * take longer than the verification period lasts on your POP3 server, you should be fine. + * 3) This is really ancient technology; you should only need to use it to talk to very old systems. + * 4) This POP3 class is deliberately lightweight and incomplete, and implements just + * enough to do authentication. + * If you want a more complete class there are other POP3 classes for PHP available. + * + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) */ class POP3 { /** * The POP3 PHPMailer Version number. + * * @var string - * @access public */ - public $Version = '5.2.26'; + const VERSION = '6.0.3'; /** * Default POP3 port number. - * @var integer - * @access public + * + * @var int */ - public $POP3_PORT = 110; + const DEFAULT_PORT = 110; /** * Default timeout in seconds. - * @var integer - * @access public + * + * @var int */ - public $POP3_TIMEOUT = 30; - - /** - * POP3 Carriage Return + Line Feed. - * @var string - * @access public - * @deprecated Use the constant instead - */ - public $CRLF = "\r\n"; + const DEFAULT_TIMEOUT = 30; /** * Debug display level. - * Options: 0 = no, 1+ = yes - * @var integer - * @access public + * Options: 0 = no, 1+ = yes. + * + * @var int */ public $do_debug = 0; /** * POP3 mail server hostname. + * * @var string - * @access public */ public $host; /** * POP3 port number. - * @var integer - * @access public + * + * @var int */ public $port; /** * POP3 Timeout Value in seconds. - * @var integer - * @access public + * + * @var int */ public $tval; /** - * POP3 username + * POP3 username. + * * @var string - * @access public */ public $username; /** * POP3 password. + * * @var string - * @access public */ public $password; /** * Resource handle for the POP3 connection socket. + * * @var resource - * @access protected */ protected $pop_conn; /** * Are we connected? - * @var boolean - * @access protected + * + * @var bool */ protected $connected = false; /** * Error container. + * * @var array - * @access protected */ - protected $errors = array(); + protected $errors = []; /** - * Line break constant + * Line break constant. */ - const CRLF = "\r\n"; + const LE = "\r\n"; /** - * Simple static wrapper for all-in-one POP before SMTP - * @param $host - * @param integer|boolean $port The port number to connect to - * @param integer|boolean $timeout The timeout value - * @param string $username - * @param string $password - * @param integer $debug_level - * @return boolean + * Simple static wrapper for all-in-one POP before SMTP. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool */ public static function popBeforeSmtp( $host, @@ -145,7 +150,8 @@ class POP3 $password = '', $debug_level = 0 ) { - $pop = new POP3; + $pop = new self(); + return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); } @@ -153,56 +159,60 @@ class POP3 * Authenticate with a POP3 server. * A connect, login, disconnect sequence * appropriate for POP-before SMTP authorisation. - * @access public - * @param string $host The hostname to connect to - * @param integer|boolean $port The port number to connect to - * @param integer|boolean $timeout The timeout value - * @param string $username - * @param string $password - * @param integer $debug_level - * @return boolean + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool */ public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) { $this->host = $host; // If no port value provided, use default if (false === $port) { - $this->port = $this->POP3_PORT; + $this->port = static::DEFAULT_PORT; } else { - $this->port = (integer)$port; + $this->port = (int) $port; } // If no timeout value provided, use default if (false === $timeout) { - $this->tval = $this->POP3_TIMEOUT; + $this->tval = static::DEFAULT_TIMEOUT; } else { - $this->tval = (integer)$timeout; + $this->tval = (int) $timeout; } $this->do_debug = $debug_level; $this->username = $username; $this->password = $password; // Reset the error log - $this->errors = array(); + $this->errors = []; // connect $result = $this->connect($this->host, $this->port, $this->tval); if ($result) { $login_result = $this->login($this->username, $this->password); if ($login_result) { $this->disconnect(); + return true; } } // We need to disconnect regardless of whether the login succeeded $this->disconnect(); + return false; } /** * Connect to a POP3 server. - * @access public - * @param string $host - * @param integer|boolean $port - * @param integer $tval - * @return boolean + * + * @param string $host + * @param int|bool $port + * @param int $tval + * + * @return bool */ public function connect($host, $port = false, $tval = 30) { @@ -213,10 +223,10 @@ class POP3 //On Windows this will raise a PHP Warning error if the hostname doesn't exist. //Rather than suppress it with @fsockopen, capture it cleanly instead - set_error_handler(array($this, 'catchWarning')); + set_error_handler([$this, 'catchWarning']); if (false === $port) { - $port = $this->POP3_PORT; + $port = static::DEFAULT_PORT; } // connect to the POP3 server @@ -233,11 +243,10 @@ class POP3 // Did we connect? if (false === $this->pop_conn) { // It would appear not... - $this->setError(array( - 'error' => "Failed to connect to server $host on port $port", - 'errno' => $errno, - 'errstr' => $errstr - )); + $this->setError( + "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr" + ); + return false; } @@ -250,18 +259,21 @@ class POP3 if ($this->checkResponse($pop3_response)) { // The connection is established and the POP3 server is talking $this->connected = true; + return true; } + return false; } /** * Log in to the POP3 server. * Does not support APOP (RFC 2828, 4949). - * @access public + * * @param string $username * @param string $password - * @return boolean + * + * @return bool */ public function login($username = '', $password = '') { @@ -276,22 +288,22 @@ class POP3 } // Send the Username - $this->sendString("USER $username" . self::CRLF); + $this->sendString("USER $username" . static::LE); $pop3_response = $this->getResponse(); if ($this->checkResponse($pop3_response)) { // Send the Password - $this->sendString("PASS $password" . self::CRLF); + $this->sendString("PASS $password" . static::LE); $pop3_response = $this->getResponse(); if ($this->checkResponse($pop3_response)) { return true; } } + return false; } /** * Disconnect from the POP3 server. - * @access public */ public function disconnect() { @@ -302,76 +314,78 @@ class POP3 @fclose($this->pop_conn); } catch (Exception $e) { //Do nothing - }; + } } /** * Get a response from the POP3 server. - * $size is the maximum number of bytes to retrieve - * @param integer $size + * + * @param int $size The maximum number of bytes to retrieve + * * @return string - * @access protected */ protected function getResponse($size = 128) { $response = fgets($this->pop_conn, $size); if ($this->do_debug >= 1) { - echo "Server -> Client: $response"; + echo 'Server -> Client: ', $response; } + return $response; } /** * Send raw data to the POP3 server. + * * @param string $string - * @return integer - * @access protected + * + * @return int */ protected function sendString($string) { if ($this->pop_conn) { if ($this->do_debug >= 2) { //Show client messages when debug >= 2 - echo "Client -> Server: $string"; + echo 'Client -> Server: ', $string; } + return fwrite($this->pop_conn, $string, strlen($string)); } + return 0; } /** * Checks the POP3 server response. * Looks for for +OK or -ERR. + * * @param string $string - * @return boolean - * @access protected + * + * @return bool */ protected function checkResponse($string) { if (substr($string, 0, 3) !== '+OK') { - $this->setError(array( - 'error' => "Server reported an error: $string", - 'errno' => 0, - 'errstr' => '' - )); + $this->setError("Server reported an error: $string"); + return false; - } else { - return true; } + + return true; } /** * Add an error to the internal error store. * Also display debug output if it's enabled. - * @param $error - * @access protected + * + * @param string $error */ protected function setError($error) { $this->errors[] = $error; if ($this->do_debug >= 1) { echo '
';
-            foreach ($this->errors as $error) {
-                print_r($error);
+            foreach ($this->errors as $e) {
+                print_r($e);
             }
             echo '
'; } @@ -379,6 +393,7 @@ class POP3 /** * Get an array of error messages, if any. + * * @return array */ public function getErrors() @@ -388,20 +403,17 @@ class POP3 /** * POP3 connection error handler. - * @param integer $errno + * + * @param int $errno * @param string $errstr * @param string $errfile - * @param integer $errline - * @access protected + * @param int $errline */ protected function catchWarning($errno, $errstr, $errfile, $errline) { - $this->setError(array( - 'error' => "Connecting to the POP3 server raised a PHP warning: ", - 'errno' => $errno, - 'errstr' => $errstr, - 'errfile' => $errfile, - 'errline' => $errline - )); + $this->setError( + 'Connecting to the POP3 server raised a PHP warning:' . + "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" + ); } } diff --git a/e_lib/phpmailer5/class.smtp.php b/vendor/phpmailer/phpmailer/src/SMTP.php similarity index 71% rename from e_lib/phpmailer5/class.smtp.php rename to vendor/phpmailer/phpmailer/src/SMTP.php index be6ddce4..27b752ec 100644 --- a/e_lib/phpmailer5/class.smtp.php +++ b/vendor/phpmailer/phpmailer/src/SMTP.php @@ -1,104 +1,87 @@ - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2014 Marcus Bointon + * PHP Version 5.5. + * + * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ +namespace PHPMailer\PHPMailer; + /** * PHPMailer RFC821 SMTP email transport class. * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. - * @package PHPMailer - * @author Chris Ryan - * @author Marcus Bointon + * + * @author Chris Ryan + * @author Marcus Bointon */ class SMTP { /** * The PHPMailer SMTP version number. + * * @var string */ - const VERSION = '5.2.26'; + const VERSION = '6.0.3'; /** * SMTP line break constant. + * * @var string */ - const CRLF = "\r\n"; + const LE = "\r\n"; /** * The SMTP port to use if one is not specified. - * @var integer + * + * @var int */ - const DEFAULT_SMTP_PORT = 25; + const DEFAULT_PORT = 25; /** - * The maximum line length allowed by RFC 2822 section 2.1.1 - * @var integer + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int */ const MAX_LINE_LENGTH = 998; /** - * Debug level for no output + * Debug level for no output. */ const DEBUG_OFF = 0; /** - * Debug level to show client -> server messages + * Debug level to show client -> server messages. */ const DEBUG_CLIENT = 1; /** - * Debug level to show client -> server and server -> client messages + * Debug level to show client -> server and server -> client messages. */ const DEBUG_SERVER = 2; /** - * Debug level to show connection status, client -> server and server -> client messages + * Debug level to show connection status, client -> server and server -> client messages. */ const DEBUG_CONNECTION = 3; /** - * Debug level to show all messages + * Debug level to show all messages. */ const DEBUG_LOWLEVEL = 4; - /** - * The PHPMailer SMTP Version number. - * @var string - * @deprecated Use the `VERSION` constant instead - * @see SMTP::VERSION - */ - public $Version = '5.2.26'; - - /** - * SMTP server port number. - * @var integer - * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead - * @see SMTP::DEFAULT_SMTP_PORT - */ - public $SMTP_PORT = 25; - - /** - * SMTP reply line ending. - * @var string - * @deprecated Use the `CRLF` constant instead - * @see SMTP::CRLF - */ - public $CRLF = "\r\n"; - /** * Debug output level. * Options: @@ -106,8 +89,9 @@ class SMTP * * self::DEBUG_CLIENT (`1`) Client commands * * self::DEBUG_SERVER (`2`) Client commands and server responses * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status - * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages - * @var integer + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. + * + * @var int */ public $do_debug = self::DEBUG_OFF; @@ -117,75 +101,99 @@ class SMTP * * `echo` Output plain-text as-is, appropriate for CLI * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output * * `error_log` Output to error log as configured in php.ini - * * Alternatively, you can provide a callable expecting two params: a message string and the debug level: - * + * + * ```php * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; - * - * @var string|callable + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @var string|callable|\Psr\Log\LoggerInterface */ public $Debugoutput = 'echo'; /** * Whether to use VERP. - * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path - * @link http://www.postfix.org/VERP_README.html Info on VERP - * @var boolean + * + * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Info on VERP + * + * @var bool */ public $do_verp = false; /** * The timeout value for connection, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. - * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 - * @var integer + * + * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * + * @var int */ public $Timeout = 300; /** * How long to wait for commands to complete, in seconds. - * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 - * @var integer + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int */ public $Timelimit = 300; /** - * @var array Patterns to extract an SMTP transaction id from reply to a DATA command. + * Patterns to extract an SMTP transaction id from reply to a DATA command. * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. + * + * @var string[] */ - protected $smtp_transaction_id_patterns = array( + protected $smtp_transaction_id_patterns = [ 'exim' => '/[0-9]{3} OK id=(.*)/', 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', - 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' - ); + 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/', + 'Microsoft_ESMTP' => '/[0-9]{3} 2.[0-9].0 (.*)@(?:.*) Queued mail for delivery/', + 'Amazon_SES' => '/[0-9]{3} Ok (.*)/', + 'SendGrid' => '/[0-9]{3} Ok: queued as (.*)/', + ]; /** - * @var string The last transaction ID issued in response to a DATA command, - * if one was detected + * The last transaction ID issued in response to a DATA command, + * if one was detected. + * + * @var string|bool|null */ protected $last_smtp_transaction_id; /** * The socket for the server connection. - * @var resource + * + * @var ?resource */ protected $smtp_conn; /** * Error information, if any, for the last SMTP command. + * * @var array */ - protected $error = array( + protected $error = [ 'error' => '', 'detail' => '', 'smtp_code' => '', - 'smtp_code_ex' => '' - ); + 'smtp_code_ex' => '', + ]; /** * The reply the server sent to us for HELO. * If null, no HELO string has yet been received. + * * @var string|null */ protected $helo_rply = null; @@ -197,32 +205,42 @@ class SMTP * represents the server name. In case of HELO it is the only element of the array. * Other values can be boolean TRUE or an array containing extension options. * If null, no HELO/EHLO string has yet been received. + * * @var array|null */ protected $server_caps = null; /** * The most recent reply received from the server. + * * @var string */ protected $last_reply = ''; /** * Output debugging info via a user-selected method. + * + * @param string $str Debug string to output + * @param int $level The debug level of this message; see DEBUG_* constants + * * @see SMTP::$Debugoutput * @see SMTP::$do_debug - * @param string $str Debug string to output - * @param integer $level The debug level of this message; see DEBUG_* constants - * @return void */ protected function edebug($str, $level = 0) { if ($level > $this->do_debug) { return; } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } //Avoid clash with built-in function names - if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { call_user_func($this->Debugoutput, $str, $level); + return; } switch ($this->Debugoutput) { @@ -232,39 +250,47 @@ class SMTP break; case 'html': //Cleans up output a bit for a better looking, HTML-safe output - echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities( + echo gmdate('Y-m-d H:i:s'), ' ', htmlentities( preg_replace('/[\r\n]+/', '', $str), ENT_QUOTES, 'UTF-8' - ) . "
\n"; + ), "
\n"; break; case 'echo': default: //Normalize line breaks - $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( - "\n", - "\n \t ", - trim($str) - ) . "\n"; + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; } } /** * Connect to an SMTP server. - * @param string $host SMTP server IP or host name - * @param integer $port The port number to connect to - * @param integer $timeout How long to wait for the connection to open - * @param array $options An array of options for stream_context_create() - * @access public - * @return boolean + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return bool */ - public function connect($host, $port = null, $timeout = 30, $options = array()) + public function connect($host, $port = null, $timeout = 30, $options = []) { static $streamok; //This is enabled by default since 5.0.0 but some providers disable it //Check this once and cache the result - if (is_null($streamok)) { + if (null === $streamok) { $streamok = function_exists('stream_socket_client'); } // Clear errors to avoid confusion @@ -273,24 +299,25 @@ class SMTP if ($this->connected()) { // Already connected, generate error $this->setError('Already connected to a server'); + return false; } if (empty($port)) { - $port = self::DEFAULT_SMTP_PORT; + $port = self::DEFAULT_PORT; } // Connect to the SMTP server $this->edebug( "Connection: opening to $host:$port, timeout=$timeout, options=" . - var_export($options, true), + (count($options) > 0 ? var_export($options, true) : 'array()'), self::DEBUG_CONNECTION ); $errno = 0; $errstr = ''; if ($streamok) { $socket_context = stream_context_create($options); - set_error_handler(array($this, 'errorHandler')); + set_error_handler([$this, 'errorHandler']); $this->smtp_conn = stream_socket_client( - $host . ":" . $port, + $host . ':' . $port, $errno, $errstr, $timeout, @@ -301,10 +328,10 @@ class SMTP } else { //Fall back to fsockopen which should work in more places, but is missing some features $this->edebug( - "Connection: stream_socket_client not available, falling back to fsockopen", + 'Connection: stream_socket_client not available, falling back to fsockopen', self::DEBUG_CONNECTION ); - set_error_handler(array($this, 'errorHandler')); + set_error_handler([$this, 'errorHandler']); $this->smtp_conn = fsockopen( $host, $port, @@ -318,14 +345,16 @@ class SMTP if (!is_resource($this->smtp_conn)) { $this->setError( 'Failed to connect to server', - $errno, - $errstr + '', + (string) $errno, + (string) $errstr ); $this->edebug( 'SMTP ERROR: ' . $this->error['error'] . ": $errstr ($errno)", self::DEBUG_CLIENT ); + return false; } $this->edebug('Connection: opened', self::DEBUG_CONNECTION); @@ -334,7 +363,7 @@ class SMTP if (substr(PHP_OS, 0, 3) != 'WIN') { $max = ini_get('max_execution_time'); // Don't bother if unlimited - if ($max != 0 && $timeout > $max) { + if (0 != $max and $timeout > $max) { @set_time_limit($timeout); } stream_set_timeout($this->smtp_conn, $timeout, 0); @@ -342,13 +371,14 @@ class SMTP // Get any announcement $announce = $this->get_lines(); $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); + return true; } /** * Initiate a TLS (encrypted) session. - * @access public - * @return boolean + * + * @return bool */ public function startTLS() { @@ -367,38 +397,39 @@ class SMTP } // Begin encrypted connection - set_error_handler(array($this, 'errorHandler')); + set_error_handler([$this, 'errorHandler']); $crypto_ok = stream_socket_enable_crypto( $this->smtp_conn, true, $crypto_method ); restore_error_handler(); - return $crypto_ok; + + return (bool) $crypto_ok; } /** * Perform SMTP authentication. * Must be run after hello(). - * @see hello() + * + * @see hello() + * * @param string $username The user name * @param string $password The password - * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) - * @param string $realm The auth realm for NTLM - * @param string $workstation The auth workstation for NTLM - * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) - * @return bool True if successfully authenticated.* @access public + * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) + * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * + * @return bool True if successfully authenticated */ public function authenticate( $username, $password, $authtype = null, - $realm = '', - $workstation = '', $OAuth = null ) { if (!$this->server_caps) { $this->setError('Authentication is not allowed before HELO/EHLO'); + return false; } @@ -408,17 +439,26 @@ class SMTP $this->setError('Authentication is not allowed at this stage'); // 'at this stage' means that auth may be allowed after the stage changes // e.g. after STARTTLS + return false; } - self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); - self::edebug( + $this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); + $this->edebug( 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), self::DEBUG_LOWLEVEL ); + //If we have requested a specific auth type, check the server supports it before trying others + if (!in_array($authtype, $this->server_caps['AUTH'])) { + $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL); + $authtype = null; + } + if (empty($authtype)) { - foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) { + //If no auth mechanism is specified, attempt to use these, in this order + //Try CRAM-MD5 first as it's more secure than the others + foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) { if (in_array($method, $this->server_caps['AUTH'])) { $authtype = $method; break; @@ -426,6 +466,7 @@ class SMTP } if (empty($authtype)) { $this->setError('No supported authentication methods found'); + return false; } self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); @@ -433,6 +474,7 @@ class SMTP if (!in_array($authtype, $this->server_caps['AUTH'])) { $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + return false; } } elseif (empty($authtype)) { @@ -459,76 +501,13 @@ class SMTP if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { return false; } - if (!$this->sendCommand("Username", base64_encode($username), 334)) { + if (!$this->sendCommand('Username', base64_encode($username), 334)) { return false; } - if (!$this->sendCommand("Password", base64_encode($password), 235)) { + if (!$this->sendCommand('Password', base64_encode($password), 235)) { return false; } break; - case 'XOAUTH2': - //If the OAuth Instance is not set. Can be a case when PHPMailer is used - //instead of PHPMailerOAuth - if (is_null($OAuth)) { - return false; - } - $oauth = $OAuth->getOauth64(); - - // Start authentication - if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { - return false; - } - break; - case 'NTLM': - /* - * ntlm_sasl_client.php - * Bundled with Permission - * - * How to telnet in windows: - * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx - * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication - */ - require_once 'extras/ntlm_sasl_client.php'; - $temp = new stdClass; - $ntlm_client = new ntlm_sasl_client_class; - //Check that functions are available - if (!$ntlm_client->initialize($temp)) { - $this->setError($temp->error); - $this->edebug( - 'You need to enable some modules in your php.ini file: ' - . $this->error['error'], - self::DEBUG_CLIENT - ); - return false; - } - //msg1 - $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1 - - if (!$this->sendCommand( - 'AUTH NTLM', - 'AUTH NTLM ' . base64_encode($msg1), - 334 - ) - ) { - return false; - } - //Though 0 based, there is a white space after the 3 digit number - //msg2 - $challenge = substr($this->last_reply, 3); - $challenge = base64_decode($challenge); - $ntlm_res = $ntlm_client->NTLMResponse( - substr($challenge, 24, 8), - $password - ); - //msg3 - $msg3 = $ntlm_client->typeMsg3( - $ntlm_res, - $username, - $realm, - $workstation - ); - // send encoded username - return $this->sendCommand('Username', base64_encode($msg3), 235); case 'CRAM-MD5': // Start authentication if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { @@ -542,20 +521,35 @@ class SMTP // send encoded credentials return $this->sendCommand('Username', base64_encode($response), 235); + case 'XOAUTH2': + //The OAuth instance must be set up prior to requesting auth. + if (null === $OAuth) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; default: $this->setError("Authentication method \"$authtype\" is not supported"); + return false; } + return true; } /** * Calculate an MD5 HMAC hash. * Works like hash_hmac('md5', $data, $key) - * in case that function is not available + * in case that function is not available. + * * @param string $data The data to hash - * @param string $key The key to hash with - * @access protected + * @param string $key The key to hash with + * * @return string */ protected function hmac($data, $key) @@ -587,8 +581,8 @@ class SMTP /** * Check connection state. - * @access public - * @return boolean True if connected. + * + * @return bool True if connected */ public function connected() { @@ -601,19 +595,21 @@ class SMTP self::DEBUG_CLIENT ); $this->close(); + return false; } + return true; // everything looks good } + return false; } /** * Close the socket and clean up the state of the class. * Don't use this function without first trying to use QUIT. + * * @see quit() - * @access public - * @return void */ public function close() { @@ -634,11 +630,12 @@ class SMTP * finializing the mail transaction. $msg_data is the message * that is to be send with the headers. Each header needs to be * on a single line followed by a with the message headers - * and the message body being separated by and additional . - * Implements rfc 821: DATA + * and the message body being separated by an additional . + * Implements RFC 821: DATA . + * * @param string $msg_data Message data to send - * @access public - * @return boolean + * + * @return bool */ public function data($msg_data) { @@ -648,7 +645,7 @@ class SMTP } /* The server is ready to accept data! - * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF) + * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into * smaller lines to fit within the limit. * We will also look for lines that start with a '.' and prepend an additional '.'. @@ -656,7 +653,7 @@ class SMTP */ // Normalize line breaks before exploding - $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); + $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field * of the first line (':' separated) does not contain a space then it _should_ be a header and we will @@ -665,12 +662,12 @@ class SMTP $field = substr($lines[0], 0, strpos($lines[0], ':')); $in_headers = false; - if (!empty($field) && strpos($field, ' ') === false) { + if (!empty($field) and strpos($field, ' ') === false) { $in_headers = true; } foreach ($lines as $line) { - $lines_out = array(); + $lines_out = []; if ($in_headers and $line == '') { $in_headers = false; } @@ -705,7 +702,7 @@ class SMTP if (!empty($line_out) and $line_out[0] == '.') { $line_out = '.' . $line_out; } - $this->client_send($line_out . self::CRLF); + $this->client_send($line_out . static::LE, 'DATA'); } } @@ -717,6 +714,7 @@ class SMTP $this->recordLastTransactionID(); //Restore timelimit $this->Timelimit = $savetimelimit; + return $result; } @@ -726,24 +724,27 @@ class SMTP * This makes sure that client and server are in a known state. * Implements RFC 821: HELO * and RFC 2821 EHLO. + * * @param string $host The host name or IP to connect to - * @access public - * @return boolean + * + * @return bool */ public function hello($host = '') { //Try extended hello first (RFC 2821) - return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); + return (bool) ($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); } /** * Send an SMTP HELO or EHLO command. - * Low-level implementation used by hello() - * @see hello() + * Low-level implementation used by hello(). + * * @param string $hello The HELO string - * @param string $host The hostname to say we are - * @access protected - * @return boolean + * @param string $host The hostname to say we are + * + * @return bool + * + * @see hello() */ protected function sendHello($hello, $host) { @@ -754,18 +755,19 @@ class SMTP } else { $this->server_caps = null; } + return $noerror; } /** * Parse a reply to HELO/EHLO command to discover server extensions. * In case of HELO, the only parameter that can be discovered is a server name. - * @access protected - * @param string $type - 'HELO' or 'EHLO' + * + * @param string $type `HELO` or `EHLO` */ protected function parseHelloFields($type) { - $this->server_caps = array(); + $this->server_caps = []; $lines = explode("\n", $this->helo_rply); foreach ($lines as $n => $s) { @@ -787,7 +789,7 @@ class SMTP break; case 'AUTH': if (!is_array($fields)) { - $fields = array(); + $fields = []; } break; default: @@ -805,14 +807,16 @@ class SMTP * $from. Returns true if successful or false otherwise. If True * the mail transaction is started and then one or more recipient * commands may be called followed by a data command. - * Implements rfc 821: MAIL FROM: + * Implements RFC 821: MAIL FROM: . + * * @param string $from Source address of this message - * @access public - * @return boolean + * + * @return bool */ public function mail($from) { $useVerp = ($this->do_verp ? ' XVERP' : ''); + return $this->sendCommand( 'MAIL FROM', 'MAIL FROM:<' . $from . '>' . $useVerp, @@ -823,10 +827,11 @@ class SMTP /** * Send an SMTP QUIT command. * Closes the socket if there is no error or the $close_on_error argument is true. - * Implements from rfc 821: QUIT - * @param boolean $close_on_error Should the connection close if an error occurs? - * @access public - * @return boolean + * Implements from RFC 821: QUIT . + * + * @param bool $close_on_error Should the connection close if an error occurs? + * + * @return bool */ public function quit($close_on_error = true) { @@ -836,6 +841,7 @@ class SMTP $this->close(); $this->error = $err; //Restore any error from the quit command } + return $noerror; } @@ -843,26 +849,27 @@ class SMTP * Send an SMTP RCPT command. * Sets the TO argument to $toaddr. * Returns true if the recipient was accepted false if it was rejected. - * Implements from rfc 821: RCPT TO: + * Implements from RFC 821: RCPT TO: . + * * @param string $address The address the message is being sent to - * @access public - * @return boolean + * + * @return bool */ public function recipient($address) { return $this->sendCommand( 'RCPT TO', 'RCPT TO:<' . $address . '>', - array(250, 251) + [250, 251] ); } /** * Send an SMTP RSET command. * Abort any transaction that is currently in progress. - * Implements rfc 821: RSET - * @access public - * @return boolean True on success. + * Implements RFC 821: RSET . + * + * @return bool True on success */ public function reset() { @@ -871,35 +878,38 @@ class SMTP /** * Send a command to an SMTP server and check its return code. - * @param string $command The command name - not sent to the server - * @param string $commandstring The actual command to send - * @param integer|array $expect One or more expected integer success codes - * @access protected - * @return boolean True on success. + * + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * + * @return bool True on success */ protected function sendCommand($command, $commandstring, $expect) { if (!$this->connected()) { $this->setError("Called $command without being connected"); + return false; } //Reject line breaks in all commands if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { $this->setError("Command '$command' contained line breaks"); + return false; } - $this->client_send($commandstring . self::CRLF); + $this->client_send($commandstring . static::LE, $command); $this->last_reply = $this->get_lines(); // Fetch SMTP code and possible error code explanation - $matches = array(); - if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) { + $matches = []; + if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/', $this->last_reply, $matches)) { $code = $matches[1]; $code_ex = (count($matches) > 2 ? $matches[2] : null); // Cut off error code from each response line $detail = preg_replace( "/{$code}[ -]" . - ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . "/m", + ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m', '', $this->last_reply ); @@ -912,7 +922,7 @@ class SMTP $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); - if (!in_array($code, (array)$expect)) { + if (!in_array($code, (array) $expect)) { $this->setError( "$command command failed", $detail, @@ -923,10 +933,12 @@ class SMTP 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, self::DEBUG_CLIENT ); + return false; } $this->setError(''); + return true; } @@ -938,10 +950,11 @@ class SMTP * commands may be called followed by a data command. This command * will send the message to the users terminal if they are logged * in and send them an email. - * Implements rfc 821: SAML FROM: + * Implements RFC 821: SAML FROM: . + * * @param string $from The address the message is from - * @access public - * @return boolean + * + * @return bool */ public function sendAndMail($from) { @@ -950,20 +963,21 @@ class SMTP /** * Send an SMTP VRFY command. + * * @param string $name The name to verify - * @access public - * @return boolean + * + * @return bool */ public function verify($name) { - return $this->sendCommand('VRFY', "VRFY $name", array(250, 251)); + return $this->sendCommand('VRFY', "VRFY $name", [250, 251]); } /** * Send an SMTP NOOP command. - * Used to keep keep-alives alive, doesn't actually do anything - * @access public - * @return boolean + * Used to keep keep-alives alive, doesn't actually do anything. + * + * @return bool */ public function noop() { @@ -974,36 +988,47 @@ class SMTP * Send an SMTP TURN command. * This is an optional command for SMTP that this class does not support. * This method is here to make the RFC821 Definition complete for this class - * and _may_ be implemented in future - * Implements from rfc 821: TURN - * @access public - * @return boolean + * and _may_ be implemented in future. + * Implements from RFC 821: TURN . + * + * @return bool */ public function turn() { $this->setError('The SMTP TURN command is not implemented'); $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + return false; } /** * Send raw data to the server. - * @param string $data The data to send - * @access public - * @return integer|boolean The number of bytes sent to the server or false on error + * + * @param string $data The data to send + * @param string $command Optionally, the command this is part of, used only for controlling debug output + * + * @return int|bool The number of bytes sent to the server or false on error */ - public function client_send($data) + public function client_send($data, $command = '') { - $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); - set_error_handler(array($this, 'errorHandler')); + //If SMTP transcripts are left enabled, or debug output is posted online + //it can leak credentials, so hide credentials in all but lowest level + if (self::DEBUG_LOWLEVEL > $this->do_debug and + in_array($command, ['User & Password', 'Username', 'Password'], true)) { + $this->edebug('CLIENT -> SERVER:
+ * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} From dc56de8afdb11caec2a93e3f640a8216d1e0d259 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 21:44:08 +0900 Subject: [PATCH 099/622] =?UTF-8?q?newRootDB(),=20newDB=EA=B0=80=20?= =?UTF-8?q?=EC=9D=B4=EC=A0=84=EC=9D=98=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=9C=BC=EB=A1=9C=20new=EB=A5=BC=20=EC=88=98=ED=96=89?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EA=B0=80=20=EC=A4=84?= =?UTF-8?q?=EC=96=B4=EB=93=A4=EC=97=88=EC=9C=BC=EB=AF=80=EB=A1=9C=20getRoo?= =?UTF-8?q?tDB(),=20newDB()=20=EB=A1=9C=20=EC=9D=B4=EB=A6=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/conf.orig.php | 2 +- twe/_admin2_submit.php | 1 + twe/d_setting/conf.orig.php | 2 +- twe/func.php | 10 +++++----- twe/func_converter.php | 4 ++-- twe/func_message.php | 4 ++-- twe/func_template.php | 4 ++-- twe/j_msgsubmit.php | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index a2e736e3..f11281ce 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -6,7 +6,7 @@ require(__dir__.'/../vendor/autoload.php'); * * @return MeekroDB */ -function newRootDB(){ +function getRootDB(){ $host = '_host_'; $user = '_user_'; $password = '_password_'; diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 99d56b30..54c31794 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -43,6 +43,7 @@ switch($btn) { $gen = MYDB_fetch_array($result); $uid[$i] = $gen['user_id']; } + $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); for($i=0; $i < sizeof($uid); $i++) { diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php index 6d58362d..f51eb9d1 100644 --- a/twe/d_setting/conf.orig.php +++ b/twe/d_setting/conf.orig.php @@ -6,7 +6,7 @@ require_once(__dir__.'/../../d_setting/conf.php'); * * @return MeekroDB */ -function newDB(){ +function getDB(){ $host = '_host_'; $user = '_user_'; $password = '_password_'; diff --git a/twe/func.php b/twe/func.php index 3d7040cf..a09fdfbc 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1797,7 +1797,7 @@ function adminMsg($connect, $skin=1) { } function getOnlineNum() { - return newDB()->queryFirstField('select `online` from `game` where `no`=1'); + return getDB()->queryFirstField('select `online` from `game` where `no`=1'); } function onlinegen($connect) { @@ -2133,7 +2133,7 @@ function CutDay($date) { function increateRefreshEx($type, $cnt=1){ - $db = newDB(); + $db = getDB(); $db->query("update `game` set `refresh` = `refresh` + %d_p_id where `no` = %d_cnt", array( 'p_id'=>$p_id, @@ -2317,12 +2317,12 @@ function CheckOverhead($connect) { } function isLock() { - return newDB()->queryFirstField("select plock from plock where no=1") != 0; + return getDB()->queryFirstField("select plock from plock where no=1") != 0; } function tryLock() { //NOTE: 게임 로직과 관련한 모든 insert, update 함수들은 lock을 거칠것을 권장함. - $db = newDB(); + $db = getDB(); //테이블 락 $db->query("lock tables plock write"); // 잠금 @@ -2340,7 +2340,7 @@ function tryLock() { function unlock() { // 풀림 //NOTE: unlock에는 table lock이 필요없는가? - newDB()->query("update plock set plock=0 where no=1"); + getDB()->query("update plock set plock=0 where no=1"); } function timeover($connect) { diff --git a/twe/func_converter.php b/twe/func_converter.php index c231e076..d0c37e05 100644 --- a/twe/func_converter.php +++ b/twe/func_converter.php @@ -8,7 +8,7 @@ function getScenario() { //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. - $scenario = newDB()->queryFirstColumn('select `scenario` from `game` where no=1'); + $scenario = getDB()->queryFirstColumn('select `scenario` from `game` where no=1'); switch($scenario) { case 0: $str = '공백지모드'; break; @@ -629,7 +629,7 @@ function getBill($dedication) { function getCost($armtype) { //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. //TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함 - return newDB()->queryFirstColumn('select cst%l from game where no=1', intval($armtype)); + return getDB()->queryFirstColumn('select cst%l from game where no=1', intval($armtype)); } function TechLimit($startyear, $year, $tech) { diff --git a/twe/func_message.php b/twe/func_message.php index 791af99d..7ec2ba47 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -75,7 +75,7 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ } //TODO: table 네임의 prefix를 처리할 수 있도록 개선 - $result = newDB()->query($sql, [ + $result = getDB()->query($sql, [ 'mailbox' => $mailbox, 'limit' => $limit, 'time' => $fromTime @@ -100,7 +100,7 @@ function getMessage($msgType, $limit=30, $fromTime=NULL){ return getRawMessage($genID, $limit, $fromTime); } else if($msgType === 'national'){ - $nationID = newDB()->queryFirstField( + $nationID = getDB()->queryFirstField( 'select `nation` from `general` where user_id = %i', $genID ); diff --git a/twe/func_template.php b/twe/func_template.php index ff93547e..10462806 100644 --- a/twe/func_template.php +++ b/twe/func_template.php @@ -66,7 +66,7 @@ function CoreTurnTable() { function allButton() { global $_basecolor2; - $npcmode = newDB()->queryFirstField("select npcmode from game where no='1'"); + $npcmode = getDB()->queryFirstField("select npcmode from game where no='1'"); if($npcmode == 1) { $site = "a_npcList.php"; $call = "빙의일람"; @@ -109,7 +109,7 @@ function commandButton() { if($generalID === NULL){ return ''; } - $db = newDB(); + $db = getDB(); $me = $db->queryFirstRow("select skin,no,nation,level,belong from general where user_id=%i", $generalID); diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index fbf13863..65d86121 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -34,7 +34,7 @@ if(!CheckLoginEx($db)){ } -$db = newDB(); +$db = getDB(); $connect = dbConn(); increaseRefresh($connect, '서신전달', 1); From 6d30e40cd3bfc41756f689b3fd6730bfda4faacd Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 23:56:01 +0900 Subject: [PATCH 100/622] =?UTF-8?q?'=EC=B0=B8=EC=97=AC'=20=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=201=EC=B0=A8=20=EC=A0=9C=EA=B1=B0=20DB?= =?UTF-8?q?=EB=8A=94=20=EB=8B=A4=EC=9D=8C=EC=97=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_install/install.php | 2 +- i_entrance/manage/Get.php | 4 --- i_entrance/serverListPost.php | 1 - twe/_admin2_submit.php | 64 ++++++++--------------------------- twe/b_betting.php | 2 +- twe/b_genList.php | 2 +- twe/func_legacy.php | 1 - twe/main.php | 2 +- 8 files changed, 18 insertions(+), 60 deletions(-) diff --git a/f_install/install.php b/f_install/install.php index 41f7aa81..095cf537 100644 --- a/f_install/install.php +++ b/f_install/install.php @@ -11,7 +11,7 @@ require_once('_common.php');
- +
diff --git a/i_entrance/manage/Get.php b/i_entrance/manage/Get.php index f84d425f..dbfd9def 100644 --- a/i_entrance/manage/Get.php +++ b/i_entrance/manage/Get.php @@ -18,10 +18,6 @@ if($member['GRADE'] == 6) { $response['grade'] = '부운영자'; } elseif($member['GRADE'] == 4) { $response['grade'] = '특별회원'; -} elseif($member['GRADE'] == 3) { - $response['grade'] = '참여회원'; -} elseif($member['GRADE'] == 2) { - $response['grade'] = '참여회원'; } elseif($member['GRADE'] == 1) { $response['grade'] = '일반회원'; } elseif($member['GRADE'] == 0) { diff --git a/i_entrance/serverListPost.php b/i_entrance/serverListPost.php index aefd0361..0be8af4d 100644 --- a/i_entrance/serverListPost.php +++ b/i_entrance/serverListPost.php @@ -22,7 +22,6 @@ for($i=0; $i < $_serverCount; $i++) {

- 폐 쇄 중 -
"; -//
(참여금이 모여 운영비가 마련될수록 많은 서버가 열립니다!) } else { $rs = $DBS[$i]->Select('ISUNITED, NPCMODE, YEAR, MONTH, SCENARIO, MAXGENERAL, TURNTERM', 'game', "NO='1'"); $game = $DBS[$i]->Get($rs); diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 54c31794..275b0c17 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -34,65 +34,29 @@ switch($btn) { } break; case "1단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set block=1,killturn=24 where no IN %li',$genlist); + //FIXME: subquery로 하는게 더 빠를 듯. + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "2단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set gold=0,rice=0,block=2,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set gold=0,rice=0,block=2,killturn=24 where no IN %li',$genlist); + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "3단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set gold=0,rice=0,block=3,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set gold=0,rice=0,block=3,killturn=24 where no IN %li',$genlist); + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "무한삭턴": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set killturn=8000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set killturn=8000 where no IN %li',$genlist); break; case "강제 사망": $date = date('Y-m-d H:i:s'); diff --git a/twe/b_betting.php b/twe/b_betting.php index 0ff55019..7d0e52e8 100644 --- a/twe/b_betting.php +++ b/twe/b_betting.php @@ -31,7 +31,7 @@ $str3 = getTournamentTerm($connect); ?> - + 베팅장 diff --git a/twe/b_genList.php b/twe/b_genList.php index 1fb96bf0..98ce5443 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -37,7 +37,7 @@ if($me['skin'] < 1) { } ?> - + 암행부 diff --git a/twe/func_legacy.php b/twe/func_legacy.php index 59d1bbfc..29c9891d 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -37,7 +37,6 @@ echo " "; } -// (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
function bar($per, $skin=1, $h=7) { diff --git a/twe/main.php b/twe/main.php index c51b66e0..2b268ec2 100644 --- a/twe/main.php +++ b/twe/main.php @@ -269,6 +269,6 @@ banner(); Date: Mon, 29 Jan 2018 02:14:41 +0900 Subject: [PATCH 101/622] =?UTF-8?q?sammo=EB=A5=BC=20=EC=93=B0=EB=8A=94=20?= =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20getRootDB()?= =?UTF-8?q?=EB=A5=BC=20=EC=9D=B4=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 메시지 DB 형태 변경. 메시지를 전송하는 별도의 함수 sendMessage(), sendRawMessage() 생성 j_msgsubmit.php 전면 수정 가능한 메일함을 구해오는 getMailboxList() 함수 추가 CheckBlock를 getBlockLevel로 변경하고, 내부 구현 수정 --- twe/_admin2_submit.php | 10 +-- twe/_admin4_submit.php | 75 ++++------------ twe/c_chiefboard.php | 2 +- twe/c_msgsubmit.php | 2 +- twe/c_nationboard.php | 2 +- twe/func.php | 9 +- twe/func_history.php | 2 +- twe/func_message.php | 129 ++++++++++++++++++++++----- twe/j_msgsubmit.php | 192 ++++++++++++----------------------------- twe/schema.php | 18 +++- 10 files changed, 201 insertions(+), 240 deletions(-) diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 275b0c17..321aadfa 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -28,10 +28,7 @@ switch($btn) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case "블럭 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=0 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set block=0 where no IN %li', $genlist); break; case "1단계 블럭": $date = date('Y-m-d H:i:s'); @@ -60,10 +57,7 @@ switch($btn) { break; case "강제 사망": $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist); break; case "특기 부여": $query = "select year,month from game where no=1"; diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index d70b8da2..3444960e 100644 --- a/twe/_admin4_submit.php +++ b/twe/_admin4_submit.php @@ -14,79 +14,40 @@ if($me['userlevel'] < 5) { echo '_admin4.php';//TODO:debug all and replace } +//NOTE: 왜 기능이 admin2와 admin4가 같이 있는가? +//NOTE: 왜 블럭 시 admin4에선 금쌀을 없애지 않는가? switch($btn) { case "블럭 해제": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=0 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set block=0 where no IN %li', $genlist); break; case "1단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=1,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set block=1,killturn=24 where no IN %li',$genlist); + //FIXME: subquery로 하는게 더 빠를 듯. + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "2단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=2,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set block=2,killturn=24 where no IN %li',$genlist); + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "3단계 블럭": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set block=3,killturn=24 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select user_id from general where no='$genlist[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gen = MYDB_fetch_array($result); - $uid[$i] = $gen['user_id']; - } - $connect = dbConn("sammo"); $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($uid); $i++) { - //블럭정보 - $query = "update MEMBER set block_num=block_num+1,block_date='$date' where id='$uid[$i]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + $db = getDB(); + $db->query('update general set block=3,killturn=24 where no IN %li',$genlist); + $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "무한삭턴": - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set killturn=8000 where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set killturn=8000 where no IN %li',$genlist); break; case "강제 사망": $date = date('Y-m-d H:i:s'); - for($i=0; $i < sizeof($genlist); $i++) { - $query = "update general set turn0=0,killturn=0,turntime='$date' where no='$genlist[$i]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } + getDB()->query('update general set turn0=0,killturn=0,turntime=%s where no IN %li',$date, $genlist); break; case "메세지 전달": $date = date('Y-m-d H:i:s'); diff --git a/twe/c_chiefboard.php b/twe/c_chiefboard.php index 89b62767..a6d5980a 100644 --- a/twe/c_chiefboard.php +++ b/twe/c_chiefboard.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { +if(getBlockLevel() != 1 && getBlockLevel() != 3) { $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index 90b751ff..babe20eb 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -8,7 +8,7 @@ CheckLogin(1); $connect = dbConn(); increaseRefresh($connect, "서신전달", 1); -if(CheckBlock($connect) == 1 || CheckBlock($connect) == 3) { +if(getBlockLevel() == 1 || getBlockLevel() == 3) { $msg = ""; $genlist = 0; } diff --git a/twe/c_nationboard.php b/twe/c_nationboard.php index f3f0c930..cdc05b56 100644 --- a/twe/c_nationboard.php +++ b/twe/c_nationboard.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { +if(getBlockLevel() != 1 && getBlockLevel() != 3) { $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func.php b/twe/func.php index a09fdfbc..b66864fb 100644 --- a/twe/func.php +++ b/twe/func.php @@ -19,7 +19,7 @@ function randF(){ return mt_rand() / mt_getrandmax(); } - +/// $_SESSION['p_id'] 의 값을 받아옴 function getGeneralID(){ //TODO: 서버마다 p_id가 다를 수 있도록 조치 if(!isset($_SESSION['p_id'])){ @@ -67,11 +67,8 @@ function checkLimit($userlevel, $con, $conlimit) { } } -function CheckBlock($connect) { - $query = "select block from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - return $me['block']; +function getBlockLevel() { + return getDB()->queryFirstField('select block from general where user_id= %i', getGeneralID()); } function getRandGenName() { diff --git a/twe/func_history.php b/twe/func_history.php index 0775e1e9..10338795 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -76,7 +76,7 @@ function LogHistory($connect, $isFirst=0) { $current_url = util::get_current_url(); $map_path = explode('/',parse_url($current_url, PHP_URL_PASS)); array_pop($map_path); - array_push($map_path, 'map.php?type=2&graphic=0'); + $map_path[] = 'map.php?type=2&graphic=0'; $map_path = join('/', $map_path); $client = new GuzzleHttp\Client(); diff --git a/twe/func_message.php b/twe/func_message.php index 7ec2ba47..441028c9 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -7,51 +7,43 @@ class Message{ public $id; public $mailbox; public $type; + public $isSender; public $src; public $dest; public $time; public $message; - public $rawType; - function __construct($row){ - $this->raw_type = $row['type']; - $this->id = $row['id']; $this->mailbox = $row['mailbox']; - - if($this->rawType === 'public'){ - $this->type = 'public'; - } - else if(util::ends_with($this->rawType, 'national')){ - $this->type = 'national'; - } - else{ - $this->type = 'private'; - } - + $this->type = $row['type']; + $this->isSender = $row['is_sender'] != 0; $this->src = [ 'id' => $row['src'], 'name' => $row['src_name'], 'nation' => $row['src_nation'], - 'color' => $row['src_color'] + 'color' => $row['src_color'], + 'nation_id' => $row['src_nation_id'] ]; - if($this->src['nation'] === NULL){ + if($this->src['nation'] === null){ $this->src['nation'] = '재야'; $this->src['color'] = '#FFFFFF'; + $this->src['nation_id'] = null; } $this->dest = [ 'id' => $row['dest'], 'name' => $row['dest_name'], 'nation' => $row['dest_nation'], - 'color' => $row['dest_color'] + 'color' => $row['dest_color'], + 'nation_id' => $row['dest_nation_id'] ]; - if($this->dest['nation'] === NULL){ + if($this->dest['nation'] === null){ $this->dest['nation'] = '재야'; $this->dest['color'] = '#FFFFFF'; + $this->dest['nation_id'] = null; } $this->datetime = $row['time']; @@ -88,7 +80,7 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ } function getMessage($msgType, $limit=30, $fromTime=NULL){ - $generalID = genID(); + $generalID = getGeneralID(); if($generalID === NULL){ return []; } @@ -109,10 +101,103 @@ function getMessage($msgType, $limit=30, $fromTime=NULL){ else{ return []; } - - } +function sendRawMessage($msgType, $isSender, $mailbox, $src, $dest, $msg, $date){ + + getDB()->insert('message', array( + 'address' => $dest, + 'type' => 'receive', + 'src' => $src['id'], + 'dest' => $dest['id'], + 'time' => $date, + 'src_nation_id' => util::array_get($src['nation_id'], null), + 'src_name' => util::array_get($src['name'], null), + 'src_nation' => util::array_get($src['nation'], null), + 'src_color' => util::array_get($src['color'], null), + 'src_icon' => util::array_get($src['icon'], null), + 'dest_nation_id' => util::array_get($dest['nation_id'], null), + 'dest_name' => util::array_get($dest['name'], null), + 'dest_nation' => util::array_get($dest['nation'], null), + 'dest_color' => util::array_get($dest['color'], null), + 'message' => $msg + )); +} + +function sendMessage($msgType, $src, $dest, $msg, $date = null){ + if($date === null){ + $date = $datetime->format('Y-m-d H:i:s'); + } + + if($msgType === 'public'){ + //dest는 필요하지 않음 + $srcMailbox = null; + $destMailbox = 9999; + $dest['id'] = 9999; + } + else if($msgType === 'national'){ + //dest는 nation_id만 필요함 + $dest['id'] = $dest['nation_id'] + 9000; + + if($src['nation_id'] === $dest['nation_id']){ + $srcMailbox = null; + } + else{ + $srcMailbox = $src['nation_id'] + 9000; + } + $destMailbox = $dest['nation_id'] + 9000; + } + else{ + //dest는 id, name이 필수 + $srcMailbox = $src['id']; + $destMailbox = $dest['id']; + } + + if($srcMailbox !== null){ + sendRawMessage($msgType, true, $srcMailbox, $src, $dest, $msg, $date); + } + sendRawMessage($msgType, false, $destMailbox, $src, $dest, $msg, $date); +} + +function getMailboxList(){ + $result = []; + + $generalID = getGeneralID(); + $db = getDB(); + $me = $db->queryFirstRow('select no,nation,level from general where user_id=%i', $generalID); + + //가장 최근에 주고 받은 사람. + $latestMessage = util::array_get(getMessage('private', 1)[0], null); + if($latestMessage !== null){ + if($latestMessage->src == $generalID){ + $latestMessage = $latestMessage->dest; + } + else{ + $latestMessage = $latestMessage->src; + } + } + + $nations = []; + foreach ($db->query('select nation, name, color from nation') as $nation) { + $nations[$nation['nation']] = $nation; + } + $nations[0] = [ + 'nation' => 0, + 'name' => '재야', + 'color' => '#ffffff' + ]; + + $generals = $db->query('select no, nation, name, level from general where npc < 2 and no != %i order by name asc', $generalID); + foreach ($generals as $general) { + $nations[$general['nation']] = $general; + } + + return [ + 'me' => $me, + 'latest' => $latestMessage, + 'nations' => $nations + ]; +} function genList($connect) { $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 65d86121..5bf313d1 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -3,9 +3,6 @@ include 'lib.php'; include 'func.php'; require_once('func_message.php'); -// $msg, $genlist - - $post = parseJsonPost(); if(!isset($post['genlist']) || !isset($post['msg'])){ @@ -18,7 +15,7 @@ if(!isset($post['genlist']) || !isset($post['msg'])){ } -$dest = $post['dest']; +$destMailbox = $post['dest_mailbox']; $msg = $post['msg']; $datetime = new DateTime(); $date = $datetime->format('Y-m-d H:i:s'); @@ -39,9 +36,7 @@ $db = getDB(); $connect = dbConn(); increaseRefresh($connect, '서신전달', 1); -//$msg,$genlist 두가지 값을 받 - -if(CheckBlock($connect) == 1 || CheckBlock($connect) == 3) { +if(getBlockLevel() == 1 || getBlockLevel() == 3) { header('Content-Type: application/json'); die(json_encode([ 'result' => false, @@ -50,9 +45,6 @@ if(CheckBlock($connect) == 1 || CheckBlock($connect) == 3) { ])); } - - - $conlimit = $db->queryFirstField('select conlimit from game where no=1'); $me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `user_id` = %s_p_id', @@ -89,106 +81,55 @@ if($msg == ''){ ])); } -$src = $me['no']; -$src_name = $me['name']; -$src_icon = $me['picture']; -$src_nation_id = $me['nation']; -if($src_nation_id == 0) { - $src_nation = '재야'; - $src_color = '#FFFFFF'; -} -else{ +$src = [ + 'id' => $me['no'], + 'name' => $me['name'], + 'icon' => $me['picture'], + 'nation_id' => $me['nation'], + 'nation' => null +]; +if($src['nation_id'] != 0) { $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$src_nation_id); - $src_nation = $nation['name']; - $src_color = '#'.$nation['color']; - $src_color = str_replace('##', '#', $src_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 + $src['nation'] = $nation['name']; + $src['color'] = '#'.$nation['color']; + $src['color'] = str_replace('##', '#', $src['color']); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 } // 전체 메세지 -if($dest == 9999) { - - $db->insert('message', array( - 'address' => $dest, - 'type' => 'global', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'message' => $msg - )); - +if($destMailbox == 9999) { + sendMessage('public', $src, [], $msg, $date); // 국가 메세지 -} elseif($dest >= 9000) { - $real_nation = $dest - 9000; +} elseif($destMailbox >= 9000) { + + if($me['level'] < 5){ + $real_nation = $me['nation_id']; + } + else{ + $real_nation = $dest - 9000; + } $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$real_nation); if($nation === NULL || empty($nation)){ - $dest = 9998; - $dest_nation = '재야'; - $dest_color = '#FFFFFF'; + $dest = ['nation_id' => 0]; } else{ - $dest_nation = $nation['name']; - $dest_color = '#'.$nation['color']; - $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 + $color = '#'.$nation['color']; + $color = str_replace('##', '#', $color); + //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 + $dest = [ + 'nation_id' => $nation['nation'], + 'color' => $color + ]; } - - if($nation['nation'] == $me['nation'] || $me['level'] < 5){ - $db->insert('message', array( - 'address' => $dest, - 'type' => 'receive_nation', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'dest_nation' => $dest_nation, - 'dest_color' => $dest_color, - 'message' => $msg - )); - } - else{ - $db->insert('message', array( - 'address' => $src_nation_id + 9000, - 'type' => 'send_nation', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'dest_nation' => $dest_nation, - 'dest_color' => $dest_color, - 'message' => $msg - )); - $db->insert('message', array( - 'address' => $dest, - 'type' => 'receive_nation', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'dest_nation' => $dest_nation, - 'dest_color' => $dest_color, - 'message' => $msg - )); - } + sendMessage('national', $src, $dest, $msg, $date); // 개인 메세지 -} elseif($dest > 0) { +} elseif($destMailbox > 0) { $last_msg = new DateTime(util::array_get($_SESSION['last_msg'], '0000-00-00')); $msg_interval = $datetime->getTimestamp() - $last_msg->getTimestamp(); + //NOTE: 여기서 유저 레벨을 구별할 코드가 필요할까? if($msg_interval < 2){ header('Content-Type: application/json'); die(json_encode([ @@ -198,11 +139,10 @@ if($dest == 9999) { ])); } - $_SESSION['last_msg'] = $date; + + $destUser = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$destMailbox); - $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$dest); - - if($dest_user == NULL || empty($dest_user)){ + if($destUser == NULL || empty($destUser)){ header('Content-Type: application/json'); die(json_encode([ 'result' => false, @@ -211,49 +151,23 @@ if($dest == 9999) { ])); } - $dest_name = $dest_user['name']; - if($dest_user['nation'] == 0){ - $dest_nation = $nation['name']; - $dest_color = '#'.$nation['color']; - $dest_color = str_replace('##', '#', $dest_color); - } - else{ - $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$dest_user['nation']); - $dest_nation = $nation['name']; - $dest_color = '#'.$nation['color']; - $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 - } + $_SESSION['last_msg'] = $date; - $db->insert('message', array( - 'address' => $src_nation_id + 9000, - 'type' => 'send', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'dest_name' => $dest_name, - 'dest_nation' => $dest_nation, - 'dest_color' => $dest_color, - 'message' => $msg - )); - $db->insert('message', array( - 'address' => $dest, - 'type' => 'receive', - 'src' => $src, - 'dest' => $dest, - 'time' => $date, - 'src_name' => $src_name, - 'src_nation' => $src_nation, - 'src_color' => $src_color, - 'src_icon' => $src_icon, - 'dest_name' => $dest_name, - 'dest_nation' => $dest_nation, - 'dest_color' => $dest_color, - 'message' => $msg - )); + $dest = [ + 'id' => $destMailbox, + 'name' => $dest_user['name'] + ]; + if($dest_user['nation'] != 0){ + $nation = $db->queryFirstRow('select nation,name,color from nation where nation=%i',$dest_user['nation']); + + $color = $nation['color']; + $color = str_replace('##', '#', $color); + //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 + $dest['color'] = $color; + $dest['nation'] = $nation['name']; + $dest['nation_id'] = $nation['nation']; + } + sendMessage('private', $src, $dest, $msg, $date); } else{ header('Content-Type: application/json'); diff --git a/twe/schema.php b/twe/schema.php index c20dba4e..e535007e 100644 --- a/twe/schema.php +++ b/twe/schema.php @@ -432,14 +432,24 @@ $game_schema = " $message_schema = " CREATE TABLE `message` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `address` INT(11) NOT NULL, - `type` ENUM('send','receive') NOT NULL, + `mailbox` INT(11) NOT NULL COMMENT '9999 == public, >= 9000 national', + `type` ENUM('private','national','public') NOT NULL, + `is_sender` BIT(1) NOT NULL, `src` INT(11) NOT NULL, `dest` INT(11) NOT NULL, - `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + `src_nation_id` INT(11) NULL DEFAULT NULL, + `src_name` VARCHAR(15) NOT NULL, + `src_nation` VARCHAR(15) NULL DEFAULT NULL, + `src_color` VARCHAR(15) NULL DEFAULT NULL, + `src_icon` VARCHAR(15) NULL DEFAULT NULL, + `dest_nation_id` INT(11) NULL DEFAULT NULL, + `dest_name` VARCHAR(15) NULL DEFAULT NULL, + `dest_nation` VARCHAR(15) NULL DEFAULT NULL, + `dest_color` VARCHAR(15) NULL DEFAULT NULL, `message` TEXT NOT NULL, PRIMARY KEY (`id`), - INDEX `by_owner` (`address`, `time`), + INDEX `by_owner` (`mailbox`, `time`), INDEX `by_dest` (`dest`, `time`), INDEX `by_full` (`src`, `dest`, `time`) ) From 55d15bb56283555f97f41402d704230c12dd64a6 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Jan 2018 20:14:06 +0900 Subject: [PATCH 102/622] =?UTF-8?q?message=EC=97=90=20=EB=A7=8C=EC=95=BD?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=B4=20aux=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/schema.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/twe/schema.php b/twe/schema.php index e535007e..8f233983 100644 --- a/twe/schema.php +++ b/twe/schema.php @@ -447,7 +447,8 @@ CREATE TABLE `message` ( `dest_name` VARCHAR(15) NULL DEFAULT NULL, `dest_nation` VARCHAR(15) NULL DEFAULT NULL, `dest_color` VARCHAR(15) NULL DEFAULT NULL, - `message` TEXT NOT NULL, + `message` TEXT NOT NULL, + `aux` TEXT NULL DEFAULT NULL COMMENT 'json', PRIMARY KEY (`id`), INDEX `by_owner` (`mailbox`, `time`), INDEX `by_dest` (`dest`, `time`), From a78d93f2826033cd399cb3127e0ae941001dc87d Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Jan 2018 21:46:44 +0900 Subject: [PATCH 103/622] =?UTF-8?q?returnJson();=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_func/class._JSON.php | 1 + twe/j_msgsubmit.php | 38 +++++++++++++++----------------------- twe/lib.php | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/f_func/class._JSON.php b/f_func/class._JSON.php index 54b05b98..3ede024b 100644 --- a/f_func/class._JSON.php +++ b/f_func/class._JSON.php @@ -1,6 +1,7 @@ $val) { diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 5bf313d1..2e5a8c02 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -6,12 +6,11 @@ require_once('func_message.php'); $post = parseJsonPost(); if(!isset($post['genlist']) || !isset($post['msg'])){ - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '올바르지 않은 호출입니다.', 'redirect' => NULL - ])); + ]); } @@ -22,12 +21,11 @@ $date = $datetime->format('Y-m-d H:i:s'); //로그인 검사 if(!CheckLoginEx($db)){ - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '로그인되지 않았습니다.', 'redirect' => NULL - ])); + ]); } @@ -37,12 +35,11 @@ $connect = dbConn(); increaseRefresh($connect, '서신전달', 1); if(getBlockLevel() == 1 || getBlockLevel() == 3) { - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '차단되었습니다.', 'redirect' => NULL - ])); + ]); } $conlimit = $db->queryFirstField('select conlimit from game where no=1'); @@ -52,12 +49,11 @@ $me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userle $con = checkLimit($me['userlevel'], $me['con'], $conlimit); if($con >= 2) { - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '접속 제한입니다.', 'redirect' => NULL - ])); + ]); } //FIXME: 원래는 필요없는 값이지만 예전 코드와 꼬일 수 있어 유지함. @@ -131,24 +127,22 @@ if($destMailbox == 9999) { $msg_interval = $datetime->getTimestamp() - $last_msg->getTimestamp(); //NOTE: 여기서 유저 레벨을 구별할 코드가 필요할까? if($msg_interval < 2){ - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '개인메세지는 2초당 1건만 보낼 수 있습니다!', 'redirect' => NULL - ])); + ]); } $destUser = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$destMailbox); if($destUser == NULL || empty($destUser)){ - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '존재하지 않는 유저입니다.', 'redirect' => NULL - ])); + ]); } $_SESSION['last_msg'] = $date; @@ -170,16 +164,14 @@ if($destMailbox == 9999) { sendMessage('private', $src, $dest, $msg, $date); } else{ - header('Content-Type: application/json'); - die(json_encode([ + returnJson([ 'result' => false, 'reason' => '알 수 없는 에러', 'redirect' => NULL - ])); + ]); } -header('Content-Type: application/json'); -echo json_encode([ +returnJson([ 'result' => true, 'reason' => 'SUCCESS', 'redirect' => 'msglist.php', diff --git a/twe/lib.php b/twe/lib.php index d20e58b0..85845453 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -135,6 +135,20 @@ function Error($message, $url="") { exit; } +function returnJson($value, $pretty = false, $die = true){ + header('Content-Type: application/json'); + if($pretty){ + $flag = JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT; + } + else{ + $flag = JSON_UNESCAPED_UNICODE; + } + echo json_encode($value, $flag); + if($die){ + die(); + } +} + // 게시판의 생성유무 검사 function isTable($connect, $str, $dbname='') { if(!$dbname) { From 20593b0e4458bd89d91870c53ec4b2bdc7822f6c Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Jan 2018 21:55:38 +0900 Subject: [PATCH 104/622] =?UTF-8?q?composer=20=EC=82=AC=EC=9A=A9=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=82=A0=EB=A0=A4=EB=A8=B9=EC=9D=80=20util=20?= =?UTF-8?q?=EB=8B=A8=EC=B6=95=EC=9D=84=20=EC=82=B4=EB=A6=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_func/class._Validation.php | 2 ++ i_entrance/adminPost.php | 12 +++++++----- i_entrance/member/Get.php | 2 ++ i_other/help.php | 2 ++ twe/_simul.php | 3 +++ twe/func_history.php | 2 ++ twe/func_message.php | 2 ++ twe/install2_ok.php | 2 ++ twe/install_ok.php | 3 +++ twe/j_msgsubmit.php | 2 ++ twe/join_post.php | 2 ++ twe/lib.php | 1 + twe/login_process.php | 3 +++ twe/stylesheet.php | 3 +++ 14 files changed, 36 insertions(+), 5 deletions(-) diff --git a/f_func/class._Validation.php b/f_func/class._Validation.php index 3fdf103b..73b9a422 100644 --- a/f_func/class._Validation.php +++ b/f_func/class._Validation.php @@ -2,6 +2,8 @@ require(__dir__.'/../vendor/autoload.php'); require_once(ROOT.W.F_FUNC.W.'class._String.php'); +use utilphp\util as util; + class _Validation { public static function CheckID($id) { $len = strlen($id); diff --git a/i_entrance/adminPost.php b/i_entrance/adminPost.php index fac31bdc..92abf050 100644 --- a/i_entrance/adminPost.php +++ b/i_entrance/adminPost.php @@ -1,15 +1,17 @@
재설치하려면 해당 파일을 지우세요"); diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 2e5a8c02..7de86b96 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -3,6 +3,8 @@ include 'lib.php'; include 'func.php'; require_once('func_message.php'); +use utilphp\util as util; + $post = parseJsonPost(); if(!isset($post['genlist']) || !isset($post['msg'])){ diff --git a/twe/join_post.php b/twe/join_post.php index e1d0346b..f64f3076 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -2,6 +2,8 @@ include "lib.php"; include "func.php"; +use utilphp\util as util; + $id = $_POST['id']; $pw = $_POST['pw']; $name = $_POST['name']; diff --git a/twe/lib.php b/twe/lib.php index 85845453..20617af4 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -1,5 +1,6 @@ Date: Mon, 29 Jan 2018 21:58:19 +0900 Subject: [PATCH 105/622] =?UTF-8?q?func.php=EC=97=90=20=EB=B9=BC=EB=A8=B9?= =?UTF-8?q?=EC=9D=80=20php=ED=8C=8C=EC=9D=BC=20include?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 1 + twe/msglist.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/twe/func.php b/twe/func.php index b66864fb..ae1a1fb3 100644 --- a/twe/func.php +++ b/twe/func.php @@ -12,6 +12,7 @@ require_once 'func_history.php'; require_once 'func_legacy.php'; require_once 'func_file.php'; require_once 'func_converter.php'; +require_once('func_template.php'); require_once('func_message.php'); /// 0.0~1.0 사이의 랜덤 float diff --git a/twe/msglist.php b/twe/msglist.php index 3880df73..4a5473a5 100644 --- a/twe/msglist.php +++ b/twe/msglist.php @@ -1,6 +1,6 @@ Date: Mon, 29 Jan 2018 22:00:38 +0900 Subject: [PATCH 106/622] =?UTF-8?q?doctype=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/twe/main.php b/twe/main.php index 2b268ec2..f11ed29c 100644 --- a/twe/main.php +++ b/twe/main.php @@ -53,6 +53,7 @@ if($me['skin'] < 1) { $scenario = getScenario(); ?> + 메인 From a4ecf23dd06d09a6277e031c8f32db79f243257c Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 29 Jan 2018 22:04:50 +0900 Subject: [PATCH 107/622] =?UTF-8?q?css=20=EA=B8=B0=EB=B3=B8=ED=8B=80=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bar() 함수 수정. 막대 수정 --- twe/css/common.css | 1 + twe/css/main.css | 1 + twe/func_legacy.php | 4 ++-- twe/main.php | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 twe/css/common.css create mode 100644 twe/css/main.css diff --git a/twe/css/common.css b/twe/css/common.css new file mode 100644 index 00000000..03bb3631 --- /dev/null +++ b/twe/css/common.css @@ -0,0 +1 @@ +@charset "UTF-8"; \ No newline at end of file diff --git a/twe/css/main.css b/twe/css/main.css new file mode 100644 index 00000000..03bb3631 --- /dev/null +++ b/twe/css/main.css @@ -0,0 +1 @@ +@charset "UTF-8"; \ No newline at end of file diff --git a/twe/func_legacy.php b/twe/func_legacy.php index 29c9891d..568dc037 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -46,8 +46,8 @@ function bar($per, $skin=1, $h=7) { $per = round($per, 1); if($per < 1 || $per > 99) { $per = round($per); } - $str1 = "
  
도 움 말
diff --git a/i_other/screenshot.php b/i_other/screenshot.php index 4e1914fd..05e1f0ab 100644 --- a/i_other/screenshot.php +++ b/i_other/screenshot.php @@ -39,7 +39,7 @@ font { font-family:'맑은 고딕'; line-height:110%; } - +
스 크 린 샷
diff --git a/twe/_119.php b/twe/_119.php index ef39f6e9..db784666 100644 --- a/twe/_119.php +++ b/twe/_119.php @@ -16,7 +16,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -42,7 +42,7 @@ $plock = MYDB_fetch_array($result); - +
시간조정 : 최종갱신 :
시간조정 : 토너먼트 :
diff --git a/twe/_admin1.php b/twe/_admin1.php index db28e3a0..b5b82eaa 100644 --- a/twe/_admin1.php +++ b/twe/_admin1.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -36,7 +36,7 @@ $admin = getAdmin($connect); - +
게 임 관 리
diff --git a/twe/_admin2.php b/twe/_admin2.php index 48610db6..2243abca 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -38,7 +38,7 @@ $admin = MYDB_fetch_array($result); - +
회 원 관 리
diff --git a/twe/_admin3.php b/twe/_admin3.php index 101f256a..d6fcda9a 100644 --- a/twe/_admin3.php +++ b/twe/_admin3.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -35,7 +35,7 @@ if($me['userlevel'] < 5) { - +
특 별 회 원
diff --git a/twe/_admin4.php b/twe/_admin4.php index 46712c41..18ae4f21 100644 --- a/twe/_admin4.php +++ b/twe/_admin4.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -38,7 +38,7 @@ $admin = MYDB_fetch_array($result); - +
멀 티 관 리
diff --git a/twe/_admin5.php b/twe/_admin5.php index ab036395..7465bbf6 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -47,7 +47,7 @@ $admin = MYDB_fetch_array($result); - +
일 제 정 보
diff --git a/twe/_admin6.php b/twe/_admin6.php index 890323fb..c1774fcc 100644 --- a/twe/_admin6.php +++ b/twe/_admin6.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -40,7 +40,7 @@ $sel[$type] = "selected"; - +
접 속 정 보
정렬순서 : diff --git a/twe/_admin7.php b/twe/_admin7.php index 3810804d..c9adb99f 100644 --- a/twe/_admin7.php +++ b/twe/_admin7.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -43,7 +43,7 @@ $sel[$type] = "selected"; - +
로 그 정 보
diff --git a/twe/_admin8.php b/twe/_admin8.php index 19026d70..741ca0cc 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -17,7 +17,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -43,7 +43,7 @@ $sel[$type] = "selected"; - +
외 교 정 보
diff --git a/twe/_simul.php b/twe/_simul.php index 1a0dc9ec..063a83ce 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -1109,7 +1109,7 @@ input { background-color:black;color:white; } - + diff --git a/twe/a_bestGeneral.php b/twe/a_bestGeneral.php index 9fd1d0ad..70245686 100644 --- a/twe/a_bestGeneral.php +++ b/twe/a_bestGeneral.php @@ -26,7 +26,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } - +
명 장 일 람
diff --git a/twe/a_emperior.php b/twe/a_emperior.php index 7a433b7d..28dbbf13 100644 --- a/twe/a_emperior.php +++ b/twe/a_emperior.php @@ -14,7 +14,7 @@ increaseRefresh($connect, "왕조일람", 2); - +
역 대 왕 조

diff --git a/twe/a_emperior2.php b/twe/a_emperior2.php index a7d2eb19..bd8b6e8d 100644 --- a/twe/a_emperior2.php +++ b/twe/a_emperior2.php @@ -14,7 +14,7 @@ increaseRefresh($connect, "왕조일람", 2); - +
역 대 왕 조

diff --git a/twe/a_genList.php b/twe/a_genList.php index d5731b0b..58213da8 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -32,7 +32,7 @@ if(!isset($type) || $type == 0) { - +
장 수 일 람
정렬순서 : diff --git a/twe/a_hallOfFame.php b/twe/a_hallOfFame.php index af1b6d89..10f5dcfa 100644 --- a/twe/a_hallOfFame.php +++ b/twe/a_hallOfFame.php @@ -13,7 +13,7 @@ increaseRefresh($connect, "명예의전당", 2); - +
명 예 의 전 당
diff --git a/twe/a_history.php b/twe/a_history.php index 1d2c94d7..b484a967 100644 --- a/twe/a_history.php +++ b/twe/a_history.php @@ -67,7 +67,7 @@ if($me['skin'] < 1) { - +
연 감
diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index 3097997b..2ee0bb82 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -26,7 +26,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } - +
세 력 일 람
diff --git a/twe/a_npcList.php b/twe/a_npcList.php index a165626e..ab2b2bec 100644 --- a/twe/a_npcList.php +++ b/twe/a_npcList.php @@ -19,7 +19,7 @@ $sel[$type] = "selected"; - +
빙 의 일 람
정렬순서 : diff --git a/twe/a_status.php b/twe/a_status.php index deedfe44..f1ff081f 100644 --- a/twe/a_status.php +++ b/twe/a_status.php @@ -27,7 +27,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } - +
세 력 도
diff --git a/twe/a_traffic.php b/twe/a_traffic.php index 1005941a..d449497c 100644 --- a/twe/a_traffic.php +++ b/twe/a_traffic.php @@ -38,7 +38,7 @@ if($game['maxonline'] < $curonline) { $game['maxonline'] = $curonline; } - +
트 래 픽 정 보
diff --git a/twe/a_vote.php b/twe/a_vote.php index c2b1fe73..84102cd6 100644 --- a/twe/a_vote.php +++ b/twe/a_vote.php @@ -34,7 +34,7 @@ function captureKey(e) { - +
설 문 조 사
diff --git a/twe/b_auction.php b/twe/b_auction.php index 3d4a185d..c803b111 100644 --- a/twe/b_auction.php +++ b/twe/b_auction.php @@ -48,7 +48,7 @@ if($msg2 == "") $msg2 = "-"; - + diff --git a/twe/b_battleCenter.php b/twe/b_battleCenter.php index be4339ad..56c07f01 100644 --- a/twe/b_battleCenter.php +++ b/twe/b_battleCenter.php @@ -62,7 +62,7 @@ if($me['skin'] < 1) { - +
거 래 장
거 래 장
감 찰 부
diff --git a/twe/b_betting.php b/twe/b_betting.php index 7d0e52e8..0993c429 100644 --- a/twe/b_betting.php +++ b/twe/b_betting.php @@ -48,7 +48,7 @@ select { font-family:'굴림'; line-height:100%; } - +
베 팅 장
diff --git a/twe/b_chiefboard.php b/twe/b_chiefboard.php index ff1dbacc..e18aa334 100644 --- a/twe/b_chiefboard.php +++ b/twe/b_chiefboard.php @@ -28,7 +28,7 @@ if($me['skin'] < 1) { - + diff --git a/twe/b_chiefcenter.php b/twe/b_chiefcenter.php index 1f78b424..bab79441 100644 --- a/twe/b_chiefcenter.php +++ b/twe/b_chiefcenter.php @@ -79,7 +79,7 @@ function turn(type) { - +
기 밀 실
사 령 부
diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index f4073549..375d422d 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -28,7 +28,7 @@ if($me['skin'] < 1) { - +
도 시 정 보
diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 38cfc504..7228c7f8 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -42,7 +42,7 @@ if($me['skin'] < 1) { - +
내 무 부
diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 594ce42e..9884622b 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -55,7 +55,7 @@ if($me['skin'] < 1) { - +
중 원 정 보
diff --git a/twe/b_genList.php b/twe/b_genList.php index 98ce5443..86a12ab5 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -45,7 +45,7 @@ if($me['skin'] < 1) { - +
암 행 부
정렬순서 : diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index 9bbd4f0f..568a9c54 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -37,7 +37,7 @@ function out() { - +
인 사 부
diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 91204be5..0dedae31 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -34,7 +34,7 @@ if($me['skin'] < 1) { - +
세 력 도 시
정렬순서 : diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index e59ffc42..85887545 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -35,7 +35,7 @@ if($me['skin'] < 1) { - +
세 력 장 수
정렬순서 : diff --git a/twe/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php index bd4c4421..dffef03d 100644 --- a/twe/b_myKingdomInfo.php +++ b/twe/b_myKingdomInfo.php @@ -24,7 +24,7 @@ if($me['level'] == 0) { - +
세 력 정 보
diff --git a/twe/b_myPage.php b/twe/b_myPage.php index 77da7517..60a073a9 100644 --- a/twe/b_myPage.php +++ b/twe/b_myPage.php @@ -52,7 +52,7 @@ function go(type) { - +
내 정 보
diff --git a/twe/b_nationboard.php b/twe/b_nationboard.php index 6ae09c8c..c65d2140 100644 --- a/twe/b_nationboard.php +++ b/twe/b_nationboard.php @@ -23,7 +23,7 @@ if($me['skin'] < 1) { - + diff --git a/twe/b_nationrule.php b/twe/b_nationrule.php index cc272ca9..1e2e6d68 100644 --- a/twe/b_nationrule.php +++ b/twe/b_nationrule.php @@ -14,7 +14,7 @@ increaseRefresh($connect, "국법", 1); - +
회 의 실
국 법
diff --git a/twe/b_tournament.php b/twe/b_tournament.php index b408fd0f..a7e614a2 100644 --- a/twe/b_tournament.php +++ b/twe/b_tournament.php @@ -44,7 +44,7 @@ select { font-family:'굴림'; line-height:100%; } - +
삼모전 토너먼트
diff --git a/twe/b_troop.php b/twe/b_troop.php index 37e4fe93..a563ad74 100644 --- a/twe/b_troop.php +++ b/twe/b_troop.php @@ -27,7 +27,7 @@ if($me['skin'] < 1) { - +
부 대 편 성
diff --git a/twe/commandlist.php b/twe/commandlist.php index ca27aab5..20edb8a7 100644 --- a/twe/commandlist.php +++ b/twe/commandlist.php @@ -51,7 +51,7 @@ function myclock() { - + - + 관리자가 아닙니다.
"; banner(); diff --git a/twe/event_2.php b/twe/event_2.php index f55e6d36..c31752aa 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -21,7 +21,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); diff --git a/twe/event_3.php b/twe/event_3.php index ac5684e1..4d1cfa19 100644 --- a/twe/event_3.php +++ b/twe/event_3.php @@ -21,7 +21,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); diff --git a/twe/event_4.php b/twe/event_4.php index 61512c10..697271b8 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -21,7 +21,7 @@ if($me['userlevel'] < 5) { - + 관리자가 아닙니다.
"; banner(); @@ -45,7 +45,7 @@ if($general['no'] > 0) { - + 이미 있습니다.
"; banner(); diff --git a/twe/func_legacy.php b/twe/func_legacy.php index 568dc037..4286056f 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -28,7 +28,7 @@ function printLimitMsg($turntime) { require('analytics.php'); echo " - + 접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$turntime})
(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)
diff --git a/twe/join.php b/twe/join.php index 37adb282..34efd6ec 100644 --- a/twe/join.php +++ b/twe/join.php @@ -103,7 +103,7 @@ function abilityPowint() { - +
장 수 생 성
diff --git a/twe/main.php b/twe/main.php index 4b60f6fc..4d1c4d91 100644 --- a/twe/main.php +++ b/twe/main.php @@ -66,7 +66,7 @@ $scenario = getScenario(); - +
심의
diff --git a/twe/map.php b/twe/map.php index 7ab98e5c..59384d46 100644 --- a/twe/map.php +++ b/twe/map.php @@ -4,7 +4,7 @@ $graphic = 0; $type=0; if($graphic == 2) { echo " - + 지 도 생 략
(개인설정 또는 과부하로 인한 서버의 긴급모드) @@ -66,7 +66,7 @@ function hideLayer() { - +
-
- - - - - - - - - - - -
/inst_top.gif>
-
- /inst_step1.gif> - -
- 위의 라이센스를 모두 읽었으며 동의합니다 -

- /inst_step1-2.gif>


-현재 707로 퍼미션이 되어 있지 않습니다. 텔넷이나 FTP에서 퍼미션을 조정하세요. -
-
-
- - - - - - -
- -
- "; -} else { - echo " -

- - - - - - -
- -
- "; -} -?> -
-
- - - diff --git a/che/install1.php b/che/install1.php deleted file mode 100644 index 12e49135..00000000 --- a/che/install1.php +++ /dev/null @@ -1,85 +0,0 @@ -
재설치하려면 해당 파일을 지우세요"); -?> - - - - - - - - - -


-
- - - - - - - - - - -
/inst_top.gif>
-
- /inst_step2.gif> -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Host NameMySQL DB의 호스트네임을 입력하세요.
SQL User IDMySQL계정의 ID를 입력하세요
PasswordMysql DB의 패스워드를 입력하세요
DB NameMysql DB의 Name을 입력하세요


/inst_b_2.gif border=0 align=absmiddle>
-
-
- - - diff --git a/che/install2.php b/che/install2.php deleted file mode 100644 index 2a8bbcfb..00000000 --- a/che/install2.php +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - -


-
- - - - - - - -
/inst_top.gif>
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- /inst_step3.gif> -
TurnTerm  - 0:120분, 1:60분, 2:30분, 3:20분, 4:10분, 5:5분, 6:2분, 7:1분 -
TurnTerm  - 0:무동기, 1:13시 시작으로 동기 -
시나리오 - -
가상상성 - 0:사실상성, 1:가상상성 -
확장장수 - 0:비확장, 1:확장장수등장 -
NPC유저 - 0:불가능, 1:가능 -
이미지  - 0:없음, 1:전콘, 2:병종, 3:엔장 -
시나리오 종류 - 역사모드
- 0 : 180년 공백지
- 1 : 184년 황건적의 난
- 2 : 190년 반동탁연합
- 3 : 194년 군웅할거
- 4 : 196년 황제는 허도로
- 5 : 200년 관도대전
- 6 : 202년 원가의 분열
- 7 : 207년 적벽대전
- 8 : 213년 익주 공방전
- 9 : 219년 삼국정립
- 10 : 225년 칠종칠금
- 11 : 228년 출사표
- IF모드
- 12 : 191년 백마장군의 위세
- - 가상모드
- 20 : 180년 영웅 난무
- 21 : 180년 영웅 집결
- 22 : 179년 훼신 집결
- 23 : 180년 영웅 시대
- 24 : 180년 결사항전
- 25 : 180년 영웅독존
- 26 : 180년 무풍지대
- 27 : 180년 가요대잔치
- 28 : 180년 확산성 밀리언 아서
-


- /inst_b_3.gif border=0 align=absmiddle> -
- - - diff --git a/che/install2_ok.php b/che/install2_ok.php deleted file mode 100644 index 1c9a3955..00000000 --- a/che/install2_ok.php +++ /dev/null @@ -1,385 +0,0 @@ -웹 IRC
: http://barosl.com/webirc/흠냐
폭력적/선정적인 전콘/전메는 블럭/삭제 대상이 될 수 있습니다.', - 500, 300, 55, 120, 100, 100, - '$turntime', '$starttime', '$turnterm', '$killturn', - 5, '$startyear', '$scenario', '$img', '$npcmode', '$extend', '$fiction', - - 100, 150, 7, 10, 9, 9, -- 보병 - 100, 200, 7, 10, 10, 11, -- 청주병(중원) - 150, 150, 7, 10, 11, 10, -- 수병(오월) - 100, 150, 7, 20, 10, 10, -- 자객병(저) - 150, 200, 7, 10, 12, 12, -- 근위병(낙양) - 100, 250, 7, 5, 13, 10, -- 등갑병(남중) - - 100, 100, 7, 20, 10, 10, -- 궁병 - 100, 100, 8, 30, 11, 12, -- 궁기병(동이) - 150, 100, 8, 20, 12, 11, -- 연노병(서촉) - 150, 150, 7, 20, 13, 13, -- 강궁병(양양) - 200, 100, 7, 20, 13, 13, -- 석궁병(건업) - - 150, 100, 7, 5, 11, 11, -- 기병 - 200, 100, 7, 5, 12, 13, -- 백마병(하북) - 150, 150, 7, 5, 13, 12, -- 중장기병(서북) - 200, 100, 8, 5, 13, 11, -- 돌격기병(흉노) - 100, 200, 7, 5, 11, 13, -- 철기병(강) - 150, 100, 8, 15, 12, 12, -- 수렵기병(산월) - 250, 200, 6, 0, 16, 16, -- 맹수병(남만) - 200, 150, 7, 5, 14, 14, -- 호표기병(허창) - - 80, 80, 7, 5, 9, 9, -- 귀병 - 80, 80, 7, 20, 10, 10, -- 신귀병(초) - 80, 130, 7, 5, 9, 11, -- 백귀병(오환) - 130, 80, 7, 5, 11, 9, -- 흑귀병(왜) - 130, 130, 7, 0, 12, 12, -- 악귀병(장안) - 60, 60, 7, 10, 8, 8, -- 남귀병 - 110, 110, 7, 0, 13, 10, -- 황귀병(낙양) - 80, 130, 7, 15, 11, 12, -- 천귀병(성도) - 130, 80, 7, 15, 12, 11, -- 마귀병(업) - - 100, 100, 6, 0, 15, 5, -- 정란 - 150, 100, 6, 0, 20, 5, -- 충차 - 200, 100, 6, 0, 25, 5, -- 벽력거(업) - 50, 200, 5, 0, 30, 5 -- 목우(성도) - )", - $connect -) or Error(__LINE__.MYDB_error($connect),""); - -// 도시정보 입력 -// 이름 규모 인구 농업 상업 치안 수비 성벽 지역 경로 -insertCity($connect, "업", 8, 620500, 12500, 11300, 10000, 11700, 12200, 1, "9|18|70|78|80"); // 1 : 업 -insertCity($connect, "허창", 8, 587600, 12100, 12400, 10000, 11700, 12500, 2, "10|19|38|71|74|80"); // 2 : 허창 -insertCity($connect, "낙양", 8, 835700, 11700, 12000, 10000, 12100, 12400, 2, "70|71|72|74"); // 3 : 낙양 -insertCity($connect, "장안", 8, 592300, 11600, 12300, 10000, 12000, 11800, 3, "41|73|86"); // 4 : 장안 -insertCity($connect, "성도", 8, 652500, 12300, 12500, 10000, 12500, 12300, 4, "26|27|87"); // 5 : 성도 -insertCity($connect, "양양", 8, 583700, 12000, 12600, 10000, 11500, 11700, 6, "51|89"); // 6 : 양양 -insertCity($connect, "건업", 8, 638600, 11600, 12300, 10000, 11500, 11900, 7, "31|82|83"); // 7 : 건업 - -insertCity($connect, "북평", 7, 486200, 10200, 9500, 8000, 10300, 9900, 1, "77|90"); // 8 : 북평 -insertCity($connect, "남피", 7, 503200, 9900, 10100, 8000, 10100, 10500, 1, "1|36|77"); // 9 : 남피 -insertCity($connect, "완", 7, 472400, 10300, 10000, 8000, 10100, 9900, 2, "2|20|51|71"); // 10 : 완 -insertCity($connect, "수춘", 7, 514300, 9900, 9600, 8000, 9900, 9500, 2, "12|20|38|82"); // 11 : 수춘 -insertCity($connect, "서주", 7, 485300, 10100, 9800, 8000, 10200, 9700, 2, "11|21|38|39"); // 12 : 서주 -insertCity($connect, "강릉", 7, 485000, 10500, 9600, 8000, 9500, 9600, 6, "14|53|88|89"); // 13 : 강릉 -insertCity($connect, "장사", 7, 471000, 9700, 9900, 8000, 10000, 10500, 6, "13|15|30|53|54"); // 14 : 장사 -insertCity($connect, "시상", 7, 525200, 9800, 10000, 10000, 9900, 9600, 7, "14|56|58|91|92"); // 15 : 시상 -insertCity($connect, "위례", 7, 492600, 10000, 9300, 8000, 9800, 10300, 8, "32|33|34|60|79"); // 16 : 위례 - -insertCity($connect, "계", 6, 388500, 7500, 8000, 6000, 7800, 8100, 1, "35|77"); // 17 : 계 -insertCity($connect, "복양", 6, 418500, 8000, 8300, 6000, 8200, 8000, 2, "1|19|78|81"); // 18 : 복양 -insertCity($connect, "진류", 6, 395700, 8200, 8000, 6000, 8000, 8300, 2, "2|18|74|80|81"); // 19 : 진류 -insertCity($connect, "여남", 6, 383100, 7700, 8100, 6000, 8400, 7700, 2, "10|11|38"); // 20 : 여남 -insertCity($connect, "하비", 6, 427800, 8500, 8300, 6000, 8200, 7800, 2, "12|83"); // 21 : 하비 -insertCity($connect, "서량", 6, 387400, 7700, 7900, 6000, 8300, 8000, 3, "40|63|64"); // 22 : 서량 -insertCity($connect, "하내", 6, 373600, 7700, 8100, 6000, 8100, 8000, 3, "35|42|65|70"); // 23 : 하내 -insertCity($connect, "한중", 6, 402700, 7700, 8400, 6000, 8000, 8500, 4, "25|75|86"); // 24 : 한중 -insertCity($connect, "상용", 6, 368700, 7800, 7600, 6000, 7700, 8100, 4, "24|51"); // 25 : 상용 -insertCity($connect, "덕양", 6, 380300, 8100, 8400, 6000, 7900, 7700, 4, "5|27|44|45"); // 26 : 덕양 -insertCity($connect, "강주", 6, 412600, 7900, 8000, 6000, 8400, 8100, 4, "5|26|45|46|47"); // 27 : 강주 -insertCity($connect, "건녕", 6, 376500, 8200, 8000, 6000, 8600, 8100, 5, "46|48|49"); // 28 : 건녕 -insertCity($connect, "남해", 6, 380300, 8200, 7600, 6000, 8000, 8100, 5, "50|55|59|67"); // 29 : 남해 -insertCity($connect, "계양", 6, 395500, 8300, 8000, 6000, 8100, 7700, 6, "14|54|55"); // 30 : 계양 -insertCity($connect, "오", 6, 435500, 7700, 8100, 6000, 7700, 7600, 7, "7|57|92|93"); // 31 : 오 -insertCity($connect, "평양", 6, 398200, 7800, 8000, 6000, 8300, 7800, 8, "16|61"); // 32 : 평양 -insertCity($connect, "사비", 6, 415700, 7700, 7900, 6000, 7800, 8000, 8, "16|34|93"); // 33 : 사비 -insertCity($connect, "계림", 6, 391100, 8000, 7400, 6000, 8100, 7800, 8, "16|33|62|93"); // 34 : 계림 - -insertCity($connect, "진양", 5, 307400, 5600, 5900, 4000, 6400, 5900, 1, "17|23|70"); // 35 : 진양 -insertCity($connect, "평원", 5, 307400, 6200, 6500, 4000, 6100, 6300, 1, "9|37|78"); // 36 : 평원 -insertCity($connect, "북해", 5, 314600, 5500, 6300, 4000, 6300, 5800, 1, "36|39|79"); // 37 : 북해 -insertCity($connect, "초", 5, 328600, 6000, 6200, 4000, 6200, 5700, 2, "2|11|12|20|81"); // 38 : 초 -insertCity($connect, "패", 5, 287700, 6400, 5800, 4000, 5800, 5900, 2, "12|37|81"); // 39 : 패 -insertCity($connect, "천수", 5, 298500, 5900, 6400, 4000, 6000, 5800, 3, "22|41|64|84"); // 40 : 천수 -insertCity($connect, "안정", 5, 276400, 5700, 5900, 4000, 5700, 6200, 3, "4|40|85"); // 41 : 안정 -insertCity($connect, "홍농", 5, 274800, 5700, 6300, 4000, 5800, 6300, 3, "23|72|73"); // 42 : 홍농 -insertCity($connect, "하변", 5, 278500, 5800, 6200, 4000, 6000, 5600, 4, "76|85"); // 43 : 하변 -insertCity($connect, "자동", 5, 287000, 5700, 5500, 4000, 6000, 5800, 4, "26|75|76|87"); // 44 : 자동 -insertCity($connect, "영안", 5, 315300, 6200, 5900, 4000, 5800, 5900, 4, "26|27|88"); // 45 : 영안 -insertCity($connect, "귀양", 5, 274600, 5800, 6100, 4000, 6100, 5800, 5, "27|28|47"); // 46 : 귀양 -insertCity($connect, "주시", 5, 282800, 6000, 5900, 4000, 5800, 6300, 5, "27|46|48"); // 47 : 주시 -insertCity($connect, "운남", 5, 325800, 6200, 6000, 4000, 6400, 6100, 5, "28|47|66"); // 48 : 운남 -insertCity($connect, "남영", 5, 285300, 5900, 6200, 4000, 5800, 5700, 5, "28|54|66"); // 49 : 남영 -insertCity($connect, "교지", 5, 319500, 5800, 5900, 4000, 5800, 5900, 5, "29|66"); // 50 : 교지 -insertCity($connect, "신야", 5, 278600, 6000, 6200, 4000, 5800, 5500, 6, "6|10|25"); // 51 : 신야 -insertCity($connect, "강하", 5, 307400, 5500, 5600, 4000, 5700, 6000, 6, "89|91"); // 52 : 강하 -insertCity($connect, "무릉", 5, 319600, 5800, 6300, 4000, 6300, 5800, 6, "13|14|54"); // 53 : 무릉 -insertCity($connect, "영릉", 5, 284900, 6200, 5800, 4000, 6200, 6200, 6, "14|30|49|53"); // 54 : 영릉 -insertCity($connect, "상동", 5, 276700, 5800, 5900, 4000, 6200, 5800, 6, "29|30|58"); // 55 : 상동 -insertCity($connect, "여강", 5, 290500, 5600, 5800, 4000, 6000, 5500, 7, "15|82|91|92"); // 56 : 여강 -insertCity($connect, "회계", 5, 300500, 6400, 5900, 4000, 6200, 6400, 7, "31|67"); // 57 : 회계 -insertCity($connect, "고창", 5, 280200, 5700, 6200, 4000, 5800, 6300, 7, "15|55|67"); // 58 : 고창 -insertCity($connect, "대", 5, 325600, 6000, 6200, 4000, 5700, 6000, 7, "29|67|94"); // 59 : 대 -insertCity($connect, "안평", 5, 293700, 6300, 5900, 4000, 5900, 6300, 8, "16|61|79|90"); // 60 : 안평 -insertCity($connect, "졸본", 5, 293900, 5500, 5900, 4000, 6000, 5800, 8, "32|60|68"); // 61 : 졸본 -insertCity($connect, "이도", 5, 317400, 5800, 6100, 4000, 5800, 5600, 8, "34|69|93"); // 62 : 이도 - -insertCity($connect, "강", 4, 209500, 4000, 4200, 2000, 4300, 4000, 3, "22|84"); // 63 : 강 -insertCity($connect, "저", 4, 195700, 4000, 4200, 2000, 4300, 4200, 3, "22|40|85"); // 64 : 저 -insertCity($connect, "흉노", 4, 206400, 4000, 4100, 2000, 4000, 3800, 3, "23|84"); // 65 : 흉노 -insertCity($connect, "남만", 4, 237800, 4000, 4200, 2000, 4300, 4500, 5, "48|49|50"); // 66 : 남만 -insertCity($connect, "산월", 4, 227500, 4000, 3700, 2000, 4300, 3800, 7, "29|57|58|59"); // 67 : 산월 -insertCity($connect, "오환", 4, 215300, 4200, 3700, 2000, 4300, 4000, 8, "61|90"); // 68 : 오환 -insertCity($connect, "왜", 4, 206500, 3900, 3700, 2000, 4300, 4100, 8, "62|94"); // 69 : 왜 - -insertCity($connect, "호관", 3, 88700, 1900, 1800, 2000, 9500, 9600, 1, "1|3|23|35"); // 70 : 호관 -insertCity($connect, "호로", 3, 111200, 2200, 2100, 2000, 10300, 9800, 2, "2|3|10"); // 71 : 호로 -insertCity($connect, "사곡", 3, 100800, 2100, 1900, 2000, 9900, 10100, 3, "3|42"); // 72 : 사곡 -insertCity($connect, "함곡", 3, 108100, 2000, 2200, 2000, 10100, 10200, 3, "4|42"); // 73 : 함곡 -insertCity($connect, "사수", 3, 95800, 1700, 1900, 2000, 9500, 9600, 2, "2|3|19|80"); // 74 : 사수 -insertCity($connect, "양평", 3, 86800, 1900, 1900, 2000, 9700, 9600, 4, "24|44|86"); // 75 : 양평 -insertCity($connect, "가맹", 3, 85500, 1700, 1800, 2000, 9600, 9500, 4, "43|44"); // 76 : 가맹 - -insertCity($connect, "역경", 2, 98500, 1800, 1900, 2000, 3900, 4100, 1, "8|9|17"); // 77 : 역경 -insertCity($connect, "계교", 2, 101200, 2100, 1900, 2000, 4000, 4200, 1, "1|18|36"); // 78 : 계교 -insertCity($connect, "동황", 2, 99200, 1900, 2100, 2000, 3800, 4000, 1, "16|37|60"); // 79 : 동황 -insertCity($connect, "관도", 2, 112300, 2200, 2000, 2000, 4200, 4300, 2, "1|2|19|74"); // 80 : 관도 -insertCity($connect, "정도", 2, 108500, 2100, 2100, 2000, 4100, 3800, 2, "18|19|38|39"); // 81 : 정도 -insertCity($connect, "합비", 2, 99800, 2000, 1900, 2000, 3900, 4100, 2, "7|11|56"); // 82 : 합비 -insertCity($connect, "광릉", 2, 100100, 2000, 2100, 2000, 4100, 4000, 2, "7|21"); // 83 : 광릉 -insertCity($connect, "적도", 2, 95200, 1800, 1700, 2000, 3800, 3700, 3, "40|63|65"); // 84 : 적도 -insertCity($connect, "가정", 2, 93100, 1700, 1700, 2000, 3600, 3800, 3, "41|43|64"); // 85 : 가정 -insertCity($connect, "기산", 2, 100500, 1900, 1800, 2000, 4100, 4000, 4, "4|24|75"); // 86 : 기산 -insertCity($connect, "면죽", 3, 109300, 2200, 2100, 2000, 10800, 9900, 4, "5|44"); // 87 : 면죽 -insertCity($connect, "이릉", 2, 96800, 1800, 1900, 2000, 3900, 4100, 6, "13|45"); // 88 : 이릉 -insertCity($connect, "장판", 2, 103200, 2100, 2000, 2000, 4000, 3700, 6, "6|13|52|91"); // 89 : 장판 -insertCity($connect, "백랑", 2, 105200, 2200, 1900, 2000, 3800, 4200, 8, "8|60|68"); // 90 : 백랑 - -insertCity($connect, "적벽", 1, 111700, 2300, 2100, 2000, 4200, 4100, 7, "15|52|56|89"); // 91 : 적벽 -insertCity($connect, "파양", 1, 103700, 2000, 2200, 2000, 3800, 3800, 7, "15|31|56"); // 92 : 파양 -insertCity($connect, "탐라", 1, 113000, 2200, 2100, 2000, 4300, 4100, 8, "31|33|34|62"); // 93 : 탐라 -insertCity($connect, "유구", 1, 92100, 1700, 1800, 2000, 3700, 3700, 8, "59|69"); // 94 : 유구 - -//TODO:replace -switch($scenario) { - case 0: echo "index.php"; break; - case 1: echo "scenario_1.php"; break; - case 2: echo "scenario_2.php"; break; - case 3: echo "scenario_3.php"; break; - case 4: echo "scenario_4.php"; break; - case 5: echo "scenario_5.php"; break; - case 6: echo "scenario_6.php"; break; - case 7: echo "scenario_7.php"; break; - case 8: echo "scenario_8.php"; break; - case 9: echo "scenario_9.php"; break; - case 10: echo "scenario_10.php"; break; - case 11: echo "scenario_11.php"; break; - - case 12: echo "scenario_12.php"; break; - - case 20: echo "scenario_20.php"; break; - case 21: echo "scenario_21.php"; break; - case 22: echo "scenario_22.php"; break; - case 23: echo "scenario_23.php"; break; - case 24: echo "scenario_24.php"; break; - case 25: echo "scenario_25.php"; break; - case 26: echo "scenario_26.php"; break; - case 27: echo "scenario_27.php"; break; - case 28: echo "scenario_28.php"; break; - default: echo "install3_ok.php"; break; -} -/* -switch($scenario) { - case 0: echo ""; break; - case 1: echo ""; break; - case 2: echo ""; break; - case 3: echo ""; break; - case 4: echo ""; break; - case 5: echo ""; break; - case 6: echo ""; break; - case 7: echo ""; break; - case 8: echo ""; break; - case 9: echo ""; break; - case 10: echo ""; break; - case 11: echo ""; break; - - case 12: echo ""; break; - - case 20: echo ""; break; - case 21: echo ""; break; - case 22: echo ""; break; - case 23: echo ""; break; - case 24: echo ""; break; - case 25: echo ""; break; - case 26: echo ""; break; - case 27: echo ""; break; - case 28: echo ""; break; - default: echo ""; break; -} -*/ -function insertCity($connect, $name, $level, $pop2, $agri2, $comm2, $secu2, $def2, $wall2, $region, $path) { - switch($level) { - case 1: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; - case 2: $pop = 5000; $agri = 100; $comm = 100; $secu = 100; $def = 500; $wall = 500; break; - case 3: $pop = 10000; $agri = 100; $comm = 100; $secu = 100; $def = 1000; $wall = 1000; break; - case 4: $pop = 50000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 1000; $wall = 1000; break; - case 5: $pop = 100000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 2000; $wall = 2000; break; - case 6: $pop = 100000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 3000; $wall = 3000; break; - case 7: $pop = 150000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 4000; $wall = 4000; break; - case 8: $pop = 150000; $agri = 1000; $comm = 1000; $secu = 1000; $def = 5000; $wall = 5000; break; - } - - @MYDB_query(" - insert into city ( - name, level, path, pop, pop2, agri, agri2, comm, comm2, secu, secu2, rate, - trade, def, def2, wall, wall2, gen1, gen2, gen3, region - ) values ( - '$name', '$level', '$path', '$pop', '$pop2', '$agri', '$agri2', '$comm', '$comm2', '$secu', '$secu2', 50, - 100, '$def', '$def2', '$wall', '$wall2', 0, 0, 0, '$region' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/install3_ok.php b/che/install3_ok.php deleted file mode 100644 index 5ff3b1d3..00000000 --- a/che/install3_ok.php +++ /dev/null @@ -1,10 +0,0 @@ -location.replace('index.php');"; -echo 'index.php'; //TODO:replace diff --git a/che/install_ok.php b/che/install_ok.php deleted file mode 100644 index 490d3b17..00000000 --- a/che/install_ok.php +++ /dev/null @@ -1,102 +0,0 @@ -
재설치하려면 해당 파일을 지우세요"); - - -$hostname = util::array_get($_POST['hostname'], ''); -$user_id = util::array_get($_POST['user_id'], ''); -$password = util::array_get($_POST['password'], ''); -$dbname = util::array_get($_POST['dbname'], ''); - -// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사 -if(isBlank($hostname)) Error("HostName을 입력하세요",""); -if(isBlank($user_id)) Error("User ID 를 입력하세요",""); -if(isBlank($dbname)) Error("DB NAME을 입력하세요",""); - -// DB에 커넥트 하고 DB NAME으로 select DB -$connect = MYDB_connect($hostname,$user_id,$password) or Error("MySQL-DB Connect
Error!!!",""); -if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); -MYDB_select_db($dbname, $connect) or Error("MySQL-DB Select
Error!!!",""); - -delInDir("logs"); -delInDir("data/session"); -@unlink("data/connected.php"); - -// 관리자 테이블 삭제 -if(isTable($connect, "game", $dbname)) @MYDB_query("drop table game", $connect) or Error("drop ".MYDB_error($connect),""); -// 락 테이블 삭제 -if(isTable($connect, "plock", $dbname)) @MYDB_query("drop table plock", $connect) or Error("drop ".MYDB_error($connect),""); -// 장수 테이블 삭제 -if(isTable($connect, "general", $dbname)) @MYDB_query("drop table general", $connect) or Error("drop ".MYDB_error($connect),""); -// 국가 테이블 삭제 -if(isTable($connect, "nation", $dbname)) @MYDB_query("drop table nation", $connect) or Error("drop ".MYDB_error($connect),""); -// 도시 테이블 삭제 -if(isTable($connect, "city", $dbname)) @MYDB_query("drop table city", $connect) or Error("drop ".MYDB_error($connect),""); -// 부대 테이블 삭제 -if(isTable($connect, "troop", $dbname)) @MYDB_query("drop table troop", $connect) or Error("drop ".MYDB_error($connect),""); -// 토큰 테이블 삭제 -if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 외교 테이블 삭제 -if(isTable($connect, "diplomacy", $dbname)) @MYDB_query("drop table diplomacy", $connect) or Error("drop ".MYDB_error($connect),""); -// 토너먼트 테이블 삭제 -if(isTable($connect, "tournament", $dbname)) @MYDB_query("drop table tournament", $connect) or Error("drop ".MYDB_error($connect),""); -// 거래 테이블 삭제 -if(isTable($connect, "auction", $dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),""); -// 통계 테이블 삭제 -if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),""); -// 연감 테이블 삭제 -if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),""); - -// 관리자 테이블 생성 -if(!isTable($connect, "game", $dbname)) @MYDB_query($game_schema, $connect) or Error("create game ".MYDB_error($connect),""); -// 락 테이블 생성 -if(!isTable($connect, "plock", $dbname)) @MYDB_query($plock_schema, $connect) or Error("create plock ".MYDB_error($connect),""); -// 장수 테이블 생성 -if(!isTable($connect, "general", $dbname)) @MYDB_query($general_schema, $connect) or Error("create general ".MYDB_error($connect),""); -// 국가 테이블 생성 -if(!isTable($connect, "nation", $dbname)) @MYDB_query($nation_schema, $connect) or Error("create nation ".MYDB_error($connect),""); -// 도시 테이블 생성 -if(!isTable($connect, "city", $dbname)) @MYDB_query($city_schema, $connect) or Error("create city ".MYDB_error($connect),""); -// 부대 테이블 생성 -if(!isTable($connect, "troop", $dbname)) @MYDB_query($troop_schema, $connect) or Error("create troop ".MYDB_error($connect),""); -// 토큰 테이블 생성 -if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 외교 테이블 생성 -if(!isTable($connect, "diplomacy", $dbname)) @MYDB_query($diplomacy_schema, $connect) or Error("create diplomacy ".MYDB_error($connect),""); -// 전당 테이블 생성 -if(!isTable($connect, "hall", $dbname)) { - MYDB_query($hall_schema, $connect) or Error("create hall ".MYDB_error($connect),""); - for($i=0; $i < 21; $i++) { - for($j=0; $j < 10; $j++) { - MYDB_query("insert into hall (type, rank) values ({$i}, {$j})", $connect); - } - } -} - -// 왕조 테이블 생성 -if(!isTable($connect, "emperior",$dbname)) @MYDB_query($emperior_schema, $connect) or Error("create emperior ".MYDB_error($connect),""); -// 토너먼트 테이블 생성 -if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error("create tournament ".MYDB_error($connect),""); -// 거래 테이블 생성 -if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error("create auction ".MYDB_error($connect),""); -// 통계 테이블 생성 -if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error("create statistic ".MYDB_error($connect),""); -// 연감 테이블 생성 -if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),""); - -// 파일로 DB 정보 저장 -$file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); -@fclose($file); -@mkdir("data",0707); -@chmod("data",0707); -@chmod("d_setting/set.php",0707); - -$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect)); - -MYDB_close($connect); - -echo ""; diff --git a/che/join.php b/che/join.php deleted file mode 100644 index 6a493f29..00000000 --- a/che/join.php +++ /dev/null @@ -1,246 +0,0 @@ -history.go(-1);"; - exit(1); -} - -$connect = dbConn(); - -$abil = abilityRand(); - -//토큰 테이블에서 정보확인 -$query = "select id from token where id='{$id}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$token = MYDB_fetch_array($result); - -if(!$token) { - //능력치 토큰 생성 - $query = " - insert into token ( - id, leader, power, intel - ) values ( - '{$id}', {$abil['leader']}, {$abil['power']}, {$abil['intel']} - )"; - $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -} else { - $query = "update token set leader={$abil['leader']},power={$abil['power']},intel={$abil['intel']} where id='{$id}'"; - MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); -} - -?> - - - -장수생성 - - - - - - - - - -
장 수 생 성
- - -
-= $admin[maxgeneral]) { - echo ""; - echo ""; - exit(); -} -?> - - - -"; - } else { - echo " - "; - } -} -?> -
임관 권유 메세지
$nation[name]-
$nation[name]$nation[scoutmsg]
- -
- - - - - - - - - - -= 1 && $member[grade] >= 1 && $member[picture] != "") { - $imageTemp = GetImageURL($member[imgsvr]); - echo " - - - - - - "; -} -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
장수 생성
장수명 - >(6글자 이내) -
전콘 사용 여부 - - - 사용 -
- 계정관리에서 자신만을 표현할 수 있는 아이콘을 업로드 해보세요! -
성격 - ※보정은 도움말 참고 -
통솔
무력
지력
능력치 조정 - - - - -
- 모든 능력치는 ( 10 <= 능력치 <= 75 ) 사이로 잡으셔야 합니다.
- 그 외의 능력치는 가입되지 않습니다.
-
- 능력치의 총합은 150입니다. 가입후 0~10의 능력치 보너스를 받게 됩니다.
- 임의의 도시에서 재야로 시작하며 건국과 임관은 게임 내에서 실행합니다. -
-
- - - -
- - diff --git a/che/join_post.php b/che/join_post.php deleted file mode 100644 index f6ab7941..00000000 --- a/che/join_post.php +++ /dev/null @@ -1,274 +0,0 @@ -history.go(-1);"; - exit(1); -} - -$date = date('Y-m-d H:i:s'); -//등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -$connect = dbConn(); - -########## 동일 정보 존재여부 확인. ########## - -$query = "select year,month,scenario,maxgeneral,turnterm,genius,img from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$query = "select no from general where npc<2"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -$query = "select no from general where user_id='$member[id]'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$id_num = MYDB_num_rows($result); - -$query = "select no from general where name='$name'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$name_num = MYDB_num_rows($result); - -$query = "select * from token where id='$member[id]'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$token_num = MYDB_num_rows($result); - -if($token_num == 1) { - $token = MYDB_fetch_array($result); - $leader = $token['leader']; - $power = $token['power']; - $intel = $token['intel']; -} else { - $leader = 0; - $power = 0; - $intel = 0; -} - -if($id_num) { - echo(""); - exit; -} elseif($name_num) { - echo(""); - exit; -} elseif($token_num != 1) { - echo(""); - exit; -} elseif($admin[maxgeneral] <= $gencount) { - echo(""); - exit; -} elseif($id == "") { - echo(""); - exit; -} elseif(_String::GetStrLen($name) < 1) { - echo(""); - exit; -} elseif($name == "") { - echo(""); - exit; -} elseif(_String::GetStrLen($name) > 6) { - echo(""); - exit; -} elseif($leader + $power + $intel > 150) { - echo(""); - exit; -} elseif($leader > 75 || $leader < 10 || $power > 75 || $power < 10 || $intel > 75 || $intel < 10) { - echo(""); - exit; -} elseif($character < 0 || $character > 11) { - echo(""); - exit; -} else { - $ratio = rand() % 100; - // 현재 1% - if($ratio == 50 && $admin[genius] > 0) { - $genius = 1; - - $query = "update game set genius=genius-1 where no='1'"; - MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - } else { - $genius = 0; - } - - //중, 소 공백지 개수 - $query = "select city from city where level>=5 and level<=6 and nation=0"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - // 공백지에서만 태어나게 - if($citycount > 0) { - $query = "select city from city where level>=5 and level<=6 and nation=0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } else { - $query = "select city from city where level>=5 and level<=6 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } - $city = $city[city]; - - $total = rand() % 6; - $pleader = rand() % 100; - $ppower = rand() % 100; - $pintel = rand() % 100; - $rate = $pleader + $ppower + $pintel; - $pleader = floor($pleader / $rate * $total + 0.5); - $ppower = floor($ppower / $rate * $total + 0.5); - $pintel = floor($pintel / $rate * $total + 0.5); - - $leader = $leader + $pleader; - $power = $power + $ppower; - $intel = $intel + $pintel; - - $age = 20 + ($pleader + $ppower + $pintel) * 2 + (rand() % 2); - // 아직 남았고 천재등록상태이면 특기 부여 - if($genius == 1) { - $specage2 = $age; - $special2 = getSpecial2($connect, $leader, $power, $intel); - } else { - $specage2 = round((80 - $age)/3) + $age; - $special2 = 0; - } - //내특 - $specage = round((80 - $age)/12) + $age; - $special = 0; - - if($admin[scenario] > 0) { - $specage2 = $age + 3; - $specage = $age + 3; - } - - $turntime = getRandTurn($admin[turnterm]); - - $lastconnect = date('Y-m-d H:i:s'); - if($lastconnect >= $turntime) { - $turntime = addTurn($turntime, $admin[turnterm]); - } - - //특회 전콘 - if($admin[img] >= 1 && $member[grade] >= 1 && $member[picture] != "" && $pic == 1) { - $face = $member[picture]; - $imgsvr = $member[imgsvr]; - } else { - $face = "default.jpg"; - $imgsvr = 0; - } - //특회 - $userlevel = $member[grade]; - - //성격 랜덤시 - if($character == 11) $character = rand()%10; - //상성 랜덤 - $npcmatch = rand()%150 + 1; - - ########## 회원정보 테이블에 입력값을 등록한다. ########## - $query = " - insert into general ( - user_id, password, name, picture, imgsvr, nation, city, troop, npcmatch, - leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, - userlevel, level, turntime, killturn, lastconnect, makelimit, age, startage, personal, specage, special, specage2, special2 - ) values ( - '$id', '$pwTemp', '$name', '$face', '$imgsvr', '0', '$city', '0', '$npcmatch', - '$leader', '$power', '$intel', '0', '0', '1000', '1000', '0', '0', '0', - '$userlevel', '0', '$turntime', '6', '$lastconnect', '0', '$age', '$age', '$character', '$specage', '$special', '$specage2', '$special2' - )"; - $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name,history from general where user_id='$id'"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[name] == "") { - $r = rand() % 999 + 1; - $me[name] = '장수-'.$r; - - $query = "update general set name='$me[name]' where user_id='$id'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $cityname = getCity($connect, $city, "name"); - if($genius == 1) { - $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 기재가 천하에 이름을 알립니다."; - $log[1] = "●{$admin[month]}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; - - $history[0] = "●$admin[year]년 $admin[month]월:【천재】$cityname[name]에 천재가 등장했습니다."; - pushHistory($connect, $history); - } else { - $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 호걸이 천하에 이름을 알립니다."; - } - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name], $cityname[name]에서 큰 뜻을 품다."); - $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; - $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; - $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; - $mylog[count($mylog)] = "●부디 즐거운 삼모전 되시길 바랍니다 ^^"; - $mylog[count($mylog)] = "●통솔 $pleader 무력 $ppower 지력 $pintel 의 보너스를 받으셨습니다."; - $mylog[count($mylog)] = "●연령은 $age세로 시작합니다."; - if($genius == 1) { - $mylog[count($mylog)] = "●축하합니다! 천재로 태어나 처음부터 ".getGenSpecial($special2)." 특기를 가지게 됩니다!"; - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); - } - pushGenLog($me, $mylog); - pushAllLog($log); - - $adminLog[0] = "가입 : {$name} // {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); - pushAdminLog($connect, $adminLog); - - MYDB_close($connect); - - echo(""); - echo(""); -} - diff --git a/che/join_post.php.orig b/che/join_post.php.orig deleted file mode 100644 index c796b36b..00000000 --- a/che/join_post.php.orig +++ /dev/null @@ -1,274 +0,0 @@ -history.go(-1);"; - exit(1); -} - -$date = date('Y-m-d H:i:s'); -//등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -$connect = dbConn(); - -########## 동일 정보 존재여부 확인. ########## - -$query = "select year,month,scenario,maxgeneral,turnterm,genius,img from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$query = "select no from general where npc<2"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -$query = "select no from general where user_id='$member[id]'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$id_num = MYDB_num_rows($result); - -$query = "select no from general where name='$name'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$name_num = MYDB_num_rows($result); - -$query = "select * from token where id='$member[id]'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$token_num = MYDB_num_rows($result); - -if($token_num == 1) { - $token = MYDB_fetch_array($result); - $leader = $token['leader']; - $power = $token['power']; - $intel = $token['intel']; -} else { - $leader = 0; - $power = 0; - $intel = 0; -} - -if($id_num) { - echo(""); - exit; -} elseif($name_num) { - echo(""); - exit; -} elseif($token_num != 1) { - echo(""); - exit; -} elseif($admin[maxgeneral] <= $gencount) { - echo(""); - exit; -} elseif($id == "") { - echo(""); - exit; -} elseif(_String::GetStrLen($name) < 1) { - echo(""); - exit; -} elseif($name == "") { - echo(""); - exit; -} elseif(_String::GetStrLen($name) > 6) { - echo(""); - exit; -} elseif($leader + $power + $intel > 150) { - echo(""); - exit; -} elseif($leader > 75 || $leader < 10 || $power > 75 || $power < 10 || $intel > 75 || $intel < 10) { - echo(""); - exit; -} elseif($character < 0 || $character > 11) { - echo(""); - exit; -} else { - $ratio = rand() % 100; - // 현재 1% - if($ratio == 50 && $admin[genius] > 0) { - $genius = 1; - - $query = "update game set genius=genius-1 where no='1'"; - MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - } else { - $genius = 0; - } - - //중, 소 공백지 개수 - $query = "select city from city where level>=5 and level<=6 and nation=0"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - // 공백지에서만 태어나게 - if($citycount > 0) { - $query = "select city from city where level>=5 and level<=6 and nation=0 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } else { - $query = "select city from city where level>=5 and level<=6 order by rand() limit 0,1"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $city = MYDB_fetch_array($result); - } - $city = $city[city]; - - $total = rand() % 6; - $pleader = rand() % 100; - $ppower = rand() % 100; - $pintel = rand() % 100; - $rate = $pleader + $ppower + $pintel; - $pleader = floor($pleader / $rate * $total + 0.5); - $ppower = floor($ppower / $rate * $total + 0.5); - $pintel = floor($pintel / $rate * $total + 0.5); - - $leader = $leader + $pleader; - $power = $power + $ppower; - $intel = $intel + $pintel; - - $age = 20 + ($pleader + $ppower + $pintel) * 2 + (rand() % 2); - // 아직 남았고 천재등록상태이면 특기 부여 - if($genius == 1) { - $specage2 = $age; - $special2 = getSpecial2($connect, $leader, $power, $intel); - } else { - $specage2 = round((80 - $age)/3) + $age; - $special2 = 0; - } - //내특 - $specage = round((80 - $age)/12) + $age; - $special = 0; - - if($admin[scenario] > 0) { - $specage2 = $age + 3; - $specage = $age + 3; - } - - $turntime = getRandTurn($admin[turnterm]); - - $lastconnect = date('Y-m-d H:i:s'); - if($lastconnect >= $turntime) { - $turntime = addTurn($turntime, $admin[turnterm]); - } - - //특회 전콘 - if($admin[img] >= 1 && $member[grade] >= 1 && $member[picture] != "" && $pic == 1) { - $face = $member[picture]; - $imgsvr = $member[imgsvr]; - } else { - $face = "default.jpg"; - $imgsvr = 0; - } - //특회 - $userlevel = $member[grade]; - - //성격 랜덤시 - if($character == 11) $character = rand()%10; - //상성 랜덤 - $npcmatch = rand()%150 + 1; - - ########## 회원정보 테이블에 입력값을 등록한다. ########## - $query = " - insert into general ( - user_id, password, name, picture, imgsvr, nation, city, troop, npcmatch, - leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, - userlevel, level, turntime, killturn, lastconnect, makelimit, age, startage, personal, specage, special, specage2, special2 - ) values ( - '$id', '$pwTemp', '$name', '$face', '$imgsvr', '0', '$city', '0', '$npcmatch', - '$leader', '$power', '$intel', '0', '0', '1000', '1000', '0', '0', '0', - '$userlevel', '0', '$turntime', '6', '$lastconnect', '0', '$age', '$age', '$character', '$specage', '$special', '$specage2', '$special2' - )"; - $result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select no,name,history from general where user_id='$id'"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[name] == "") { - $r = rand() % 999 + 1; - $me[name] = '장수-'.$r; - - $query = "update general set name='$me[name]' where user_id='$id'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - $cityname = getCity($connect, $city, "name"); - if($genius == 1) { - $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 기재가 천하에 이름을 알립니다."; - $log[1] = "●{$admin[month]}월:".getGenSpecial($special2)." 특기를 가진 천재의 등장으로 온 천하가 떠들썩합니다."; - - $history[0] = "●$admin[year]년 $admin[month]월:【천재】$cityname[name]에 천재가 등장했습니다."; - pushHistory($connect, $history); - } else { - $log[0] = "●{$admin[month]}월:$cityname[name]에서 $me[name](이)라는 호걸이 천하에 이름을 알립니다."; - } - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name], $cityname[name]에서 큰 뜻을 품다."); - $mylog[count($mylog)] = "●삼국지 모의전투 PHP의 세계에 오신 것을 환영합니다 ^o^"; - $mylog[count($mylog)] = "●처음 하시는 경우에는 도움말을 참고하시고,"; - $mylog[count($mylog)] = "●문의사항이 있으시면 게시판에 글을 남겨주시면 되겠네요~"; - $mylog[count($mylog)] = "●부디 즐거운 삼모전 되시길 바랍니다 ^^"; - $mylog[count($mylog)] = "●통솔 $pleader 무력 $ppower 지력 $pintel 의 보너스를 받으셨습니다."; - $mylog[count($mylog)] = "●연령은 $age세로 시작합니다."; - if($genius == 1) { - $mylog[count($mylog)] = "●축하합니다! 천재로 태어나 처음부터 ".getGenSpecial($special2)." 특기를 가지게 됩니다!"; - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:".getGenSpecial($special2)." 특기를 가진 천재로 탄생."); - } - pushGenLog($me, $mylog); - pushAllLog($log); - - $adminLog[0] = "가입 : {$name} // {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); - pushAdminLog($connect, $adminLog); - - MYDB_close($connect); - - echo(""); - echo(""); -} - diff --git a/che/join_token.php b/che/join_token.php deleted file mode 100644 index dad9d390..00000000 --- a/che/join_token.php +++ /dev/null @@ -1,57 +0,0 @@ -a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n(" - - - - - - - - - - - - - - -
- 0?"cyan":"white";?>> Ctrl, Shift, 드래그로 복수선택 가능     반복&수정 - ;color:white;width:50;font-size:13; value='반복' onclick='refreshing(2,0)'>;color:white;width:80;font-size:13; value='▼미루기' onclick='refreshing(2,1)'>;color:white;width:80;font-size:13; value='▲당기기' onclick='refreshing(2,2)'> -
- - ;color:white;width:110;font-size:13; value='실 행' onclick='refreshing(3,form2)'>;color:white;width:110;font-size:13; value='갱 신' onclick='refreshing(0,0)'>;color:white;width:160;font-size:13; value='로그아웃' onclick=location.replace('logout_process.php')>
-
- - - - - - -
- - - - - - - - - - - -
장수 동향개인 기록
중원 정세
- - - - - - - -
-
- - - ;color:white;font-size:13;width:100px; value='서신전달&갱신' onclick='refreshing(4,message)'> -
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다. -
-
- -
- - - -
- - - - - -지 도 생 략
-(개인설정 또는 과부하로 인한 서버의 긴급모드) -
- -"; - exit(); -} -$connect=dbConn(); -// -?> - - - -지도 - - - - - - - - - - - -"; - $ad = "background={$images}/ad.gif"; - $season = "background={$images}/{$season}.gif"; - $rtitle = ""; - } else { - $ltitle = " "; - $ad = ""; - $season = ""; - $rtitle = "" ";"; - } - echo " - - - - - - - - - - - -
{$ltitle} {$admin[year]}年 {$admin[month]}月{$rtitle}
-
"; - - $query = "select nation,name,color,capital from nation"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=1; $i <= $count; $i++) { - $nation = MYDB_fetch_array($result); - $nationcolor[$nation[nation]] = $nation[color]; - $nationname[$nation[nation]] = $nation[name]; - $nationCapital[$nation[nation]] = $nation[capital]; - } - - if($type == 0) { - // 운영자의 경우 다 볼 수 있음 - if($me[userlevel] >= 5) { - for($i=1; $i <= $allcount; $i++) { - $valid[$i] = 1; - } - } elseif($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),""); - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid[city]] = 1; - } else { - // 아국 도시 - $query = "select city,name 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++) { - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid[city]] = 1; - } - // 아국 장수가 있는 타국 도시들 선택 - $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++) { - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid[city]] = 1; - } - // 첩보된 도시 - $citys = explode("|", $myNation[spy]); - for($i=0; $i < count($citys); $i++) { - $valid[floor($citys[$i]/10)] = 1; - } - } - } - - $x = array( -// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 - 345, 330, 275, 145, 25, 255, 505, 465, 395, 270, 395, 440, 245, 255, 360, 620, -// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 - 365, 410, 365, 330, 480, 25, 230, 135, 185, 85, 70, 80, 245, 230, 510, 590, -// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 - 605, 655, 295, 440, 470, 365, 430, 70, 95, 210, 45, 75, 115, 90, 30, 30, -// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 - 135, 130, 250, 315, 195, 190, 210, 380, 480, 350, 450, 530, 570, 680, 95, 25, -// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 - 180, 80, 425, 610, 680, 285, 285, 240, 180, 310, 90, 45, 410, 405, 515, 340, -// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 - 400, 435, 490, 130, 40, 110, 35, 215, 280, 530, 330, 430, 605, 625 - ); - - $y = array( -// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 - 130, 215, 180, 165, 290, 290, 305, 65, 95, 235, 270, 250, 335, 375, 360, 145, -// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 - 35, 170, 185, 260, 235, 50, 150, 205, 225, 275, 310, 400, 480, 400, 345, 100, -// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 - 205, 200, 60, 115, 155, 230, 220, 105, 145, 175, 190, 245, 295, 360, 345, 415, -// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 - 405, 480, 260, 295, 355, 395, 435, 315, 395, 405, 480, 80, 65, 260, 35, 120, -// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 - 95, 455, 430, 20, 320, 140, 205, 175, 175, 185, 220, 225, 65, 135, 145, 165, -// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 - 210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435 - ); - - $query = "select name,level,nation,city,state,region,supply from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($i=0; $i < $allcount; $i++) { - $city = MYDB_fetch_array($result); - $name = $city[name]; - $nation = $nationname[$city[nation]]; - $color = $nationcolor[$city[nation]]; - $capital = $nationCapital[$city[nation]]; - $level = $city[level]; - $state = $city[state]; - $region = $city[region]; - - if($me[city] == $city[city]) { $myCity = 1; } - else { $myCity = 0; } - - if($capital == $city[city]) { $cap = 1; } - else { $cap = 0; } - - city($graphic, $brouserIE, - $type, $name, $nation, $color, $level, $region, $i+1, $valid[$i+1], $x[$i], $y[$i], - $state, $myCity, $city[supply], $cap); - } - - echo " -
-
-"; -} - -function city($graphic, $brouser, $type, $name, $nation, $color, $level, $region, $city, $valid, $x, $y, $state, $mycity, $supply, $capital) { - global $images; - - if($graphic == 0) { - switch($level) { - case 1: $width = 16; $height = 15; break; - case 2: $width = 20; $height = 14; break; - case 3: $width = 14; $height = 14; break; - case 4: $width = 20; $height = 15; break; - case 5: $width = 24; $height = 16; break; - case 6: $width = 26; $height = 18; break; - case 7: $width = 28; $height = 20; break; - case 8: $width = 32; $height = 24; break; - } - } else { - switch($level) { - case 1: $width = 12; $height = 12; break; - case 2: $width = 12; $height = 12; break; - case 3: $width = 14; $height = 14; break; - case 4: $width = 16; $height = 14; break; - case 5: $width = 18; $height = 16; break; - case 6: $width = 20; $height = 16; break; - case 7: $width = 22; $height = 18; break; - case 8: $width = 24; $height = 18; break; - } - } - $x -= floor($width / 2); - $y -= floor($height / 2); - - $backwidth = floor($width * 3.0); $backheight = floor($height * 3.0); - - $backx = $x - floor(($backwidth - $width)/2); - $backy = $y - floor(($backheight - $height)/2); - $fx = $x + $width - 6; - $fy = $y - 3; - $cx = $x + $width - 4; - $cy = $y - 2; - $ex = $x - 5; - $ey = $y; - - // 0 명령화면의 지도(본국 장수 있는 도시 링크), - // 1 전쟁,이동,계략시 지도(전도시 클릭되게), - // 2 사령부 태수임명(본국만 클릭되게) - - // 0인 경우 현재도시 링크 생성 - if($type == 0 && $valid == 1) { echo "
"; } - //메인화면 - if($graphic == 0) { - if($type == 0 && $valid == 1) { - $tag = "input type=image"; - $tail = "><{$tag} {$mid} {$tail}>
"; - //재난표시 - if($state > 0) { - $mid2 = "src={$images}/event{$state}.gif style=width:15;height:15; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
<{$tag} {$mid2} {$tail}>
"; - } - } else { - //메인화면 - if($type == 0 && $valid == 1) { - $tail = " onclick='form{$city}.submit()'>
"; - //재난표시 - if($state > 0) { - if($state < 10) { $color3 = "blue"; } - elseif($state < 40) { $color3 = "orange"; } - elseif($state < 50) { $color3 = "red"; } - $mid2 = "width:10;height:10;background-color:{$color3}; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
"; - } - } - //공백지 아니면 - if($color != "") { - if($graphic == 0) { - //배경국가색 - if($brouser == 1) { - echo "
"; - } else { - echo " -
- -
"; - } - //깃발표시 - if($supply == 1) { $mid3 = "src={$images}/f{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } - else { $mid3 = "src={$images}/d{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } - echo "
<{$tag} {$mid3} {$tail}>
"; - //수도표시 - if($capital == 1) { - $mid4 = "src={$images}/event51.gif style=width:10;height:10; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
<{$tag} {$mid4} {$tail}>
"; - } - } else { - //수도표시 - if($capital == 1) { - echo "
"; - } - } - } - // 0인 경우 현재도시 링크 생성했던거 종료 - if($type == 0 && $valid == 1) { - echo ""; - } - - // 내 도시인 경우 빨간 네모 그리기 - if($mycity == 1) { - $width += 8; - $height += 8; - $x -= 4; - $y -= 4; - - echo " -
- - -
-
"; - } -} - -function getCityLevel($region, $level) { - switch($region) { - case 1: $str = "【하북|"; break; - case 2: $str = "【중원|"; break; - case 3: $str = "【서북|"; break; - case 4: $str = "【서촉|"; break; - case 5: $str = "【남중|"; break; - case 6: $str = "【 초|"; break; - case 7: $str = "【오월|"; break; - case 8: $str = "【동이|"; break; - } - - switch($level) { - case 1: $str .= "수】"; break; - case 2: $str .= "진】"; break; - case 3: $str .= "관】"; break; - case 4: $str .= "이】"; break; - case 5: $str .= "소】"; break; - case 6: $str .= "중】"; break; - case 7: $str .= "대】"; break; - case 8: $str .= "특】"; break; - } - - return $str; -} - diff --git a/che/map_history.php b/che/map_history.php deleted file mode 100644 index 8da98be7..00000000 --- a/che/map_history.php +++ /dev/null @@ -1,33 +0,0 @@ -', "'", $map); -$map = str_replace('<_dquot_>', '"', $map); - -echo $map; diff --git a/che/msglist.php b/che/msglist.php deleted file mode 100644 index 98fa26a3..00000000 --- a/che/msglist.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - -메시지리스트 - - - - - - - - - - - - -
- 전체 메세지(최고75자)
- -
- 개인 메세지(최고75자)
- -
- - 국가 메세지(최고75자)
- -
- - - diff --git a/che/mysql_opt.txt b/che/mysql_opt.txt deleted file mode 100644 index bf51dd0f..00000000 --- a/che/mysql_opt.txt +++ /dev/null @@ -1,53 +0,0 @@ -로그활성화 -show variables like '%log%'; - -ALTER TABLE mysql.general_log -ADD COLUMN seq BIGINT UNSIGNED NOT NULL AUTO_INCREMENT AFTER argument, -ADD PRIMARY KEY(seq), -ENGINE=MYISAM; - -set global expire_logs_days=7; -set global log_output='TABLE'; -set global general_log=1; - -select count(*) from mysql.general_log; -select * from mysql.general_log limit 100; - -set global general_log=0; -truncate mysql.general_log; - - -캐시들 -show variables like '%cache%'; -show status like '%cache%'; -show variables like '%key%'; -show status like '%key%'; - -key_buffer_size 줄이자. 현16M -> 8M이하 -myisam_sort_buffer_size 줄이자. 현8M -> 2M - -innodb 설정 -기존 Antelope 포맷은 가변컬럼의 767바이트까지만 저장하고 나머지는 offset하여 외부에 저장한다. -그런데 innodb는 1개 행이 최대 8KB만 저장 가능하므로 가변컬럼이 11개 이상인 경우는 오류 위험이 있다. -(MyISAM은 64KB) -Barracuda 포맷에 Dynamic 또는 Compressed를 사용하면 포인터 20바이트만 저장하고 실데이터는 외부에 저장한다. - -[mysqld] -innodb_file_format=barracuda -innodb_file_per_table=1 - - -innodb 최적화 -innodb_buffer_pool_size: 체섭 테이블 최대 5M정도. 인덱스 포함해도 32M면 충분? -innodb_flush_method: 기본값대로. O_DIRECT는 메모리가 커서 캐시 2중 필요 없을때만. -innodb_file_per_table: 테이블마다 독립파일로 저장 -innodb_flush_log_at_trx_commit: 기본1(커밋마다), 0(로그찰때만), 추천2(1초마다) -innodb_log_file_size: 현 5M, 많이 키워도 될듯 -innodb_log_buffer_size: 기본 8M 적당 -innodb_thread_concurrency: 코어개수 2배 정도 - -sync_binlog=0 이미 꺼져있음 - -ib_logfile0, ib_logfile1은 로그사이즈 바꾸면 재시작이 안되므로 지우고 다시 해야함 - -alter table table_name engine=innodb row_format=dynamic diff --git a/che/new_lib.php b/che/new_lib.php deleted file mode 100644 index 5158468e..00000000 --- a/che/new_lib.php +++ /dev/null @@ -1,27 +0,0 @@ - - - -NPC로그인 - - - - - - - - - - -
삼국지 모의전투 PHP (유기체서버)
-
- - - - - - - - - - - - - - - - -
ID
비밀번호
-
-
-
- - - diff --git a/che/npc_login_process.php b/che/npc_login_process.php deleted file mode 100644 index 969c95ae..00000000 --- a/che/npc_login_process.php +++ /dev/null @@ -1,75 +0,0 @@ -location.replace('index.php');"; -} elseif(!$me) { - MessageBox("아이디나 암호가 올바르지 않습니다!!!"); - echo ""; -} else { - switch($me[block]) { - case 1: - MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; - case 2: - MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; - case 3: - MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! $me[killturn]시간 후 재등록 가능합니다."); break; - } - - $_SESSION[p_id] = $id; - $_SESSION[p_name] = $me[name]; - $_SESSION[p_nation] = $me[nation]; - $_SESSION[p_time] = time(); - - $date = date('Y-m-d H:i:s'); - - $query="update general set logcnt=logcnt+1,ip='$_SESSION[p_ip]',lastconnect='$date',conmsg='$conmsg' where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - echo ""; - - $date2 = substr($date, 0, 10); - $fp = fopen("logs/_{$date2}-login.txt", "a"); - $msg = _String::Fill2($date,20," ")._String::Fill2($id,13," ")._String::Fill2($me[name],13," ")._String::Fill2($_SESSION[p_ip],16," "); - fwrite($fp, $msg."\r\n"); - fclose($fp); -} - -function DeleteSession() { - $session_path = "data/session"; // 세션이저장된 디렉토리 - if(!$dir=@opendir($session_path)) echo "디렉토리를 열지못했습니다."; - - while($file=@readdir($dir)) { - if(!strstr($file,'sess_')) continue; - if(strpos($file,'sess_')!=0) continue; - if (!$atime=@fileatime("$session_path/$file")) continue; - if (time() > $atime + 86400) { // 10대시 지난시간을 초로 계산해서 적어주시면 됩니다. - // $return = (@unlink("$session_path/$file")); - @unlink("$session_path/$file"); - } - } - closedir($dir); -} - -MYDB_close($connect); diff --git a/che/preprocessing.php b/che/preprocessing.php deleted file mode 100644 index b6e7ad95..00000000 --- a/che/preprocessing.php +++ /dev/null @@ -1,122 +0,0 @@ -= 2) { echo ""; exit(); } - -$count = sizeof($turn); -for($i=0; $i < $count; $i++) { - if($turn[$i] == 100 || $turn[$i] == 99 || $turn[$i] == 98) { - } elseif($turn[$i] >= 0 && $turn[$i] <= 23) { - } else { - unset($turn); - $turn[0] = 100; - break; - } -} - -if($turn[0] == 100) { - unset($turn); - for($i=0; $i < 24; $i++) $turn[$i] = $i; -} elseif($turn[0] == 99) { - unset($turn); - for($i=0, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; -} elseif($turn[0] == 98) { - unset($turn); - for($i=1, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; -} - -switch($commandtype) { - case 0: command_Single($connect, $turn, 0); break; //휴식 - case 1: command_Single($connect, $turn, 1); break; //농업 - case 2: command_Single($connect, $turn, 2); break; //상업 - case 3: command_Single($connect, $turn, 3); break; //기술 - case 4: command_Single($connect, $turn, 4); break; //선정 - case 5: command_Single($connect, $turn, 5); break; //수비 - case 6: command_Single($connect, $turn, 6); break; //성벽 - case 7: command_Single($connect, $turn, 7); break; //정착 장려 - case 8: command_Single($connect, $turn, 8); break; //치안 강화 - case 9: command_Single($connect, $turn, 9); break; //자금 조달 - -// case 11: command_11($connect, $turn, 11); break; //징병 -// case 12: command_12($connect, $turn, 12); break; //모병 - case 13: command_Single($connect, $turn, 13); break; //훈련 - case 14: command_Single($connect, $turn, 14); break; //사기진작 - case 15: command_Single($connect, $turn, 0); break; //전투태세 -// case 16: command_16($connect, $turn, 16); break; //전쟁 - case 17: command_Single($connect, $turn, 17); break; //소집해제 - -// case 21: command_21($connect, $turn, 21); break; //이동 -// case 22: command_22($connect, $turn, 22); break; //등용 -// case 23: command_23($connect, $turn, 23); break; //포상 -// case 24: command_24($connect, $turn, 24); break; //몰수 -// case 25: command_25($connect, $turn, 25); break; //임관 - case 26: command_Single($connect, $turn, 26); break; //집합 -// case 27: command_27($connect, $turn, 27); break; //발령 - case 28: command_Single($connect, $turn, 28); break; //귀환 - case 29: command_Single($connect, $turn, 29); break; //인재탐색 -// case 30: command_30($connect, $turn, 30); break; //강행 - -// case 31: command_31($connect, $turn, 31); break; //첩보 -// case 32: command_32($connect, $turn, 32); break; //화계 -// case 33: command_33($connect, $turn, 33); break; //탈취 -// case 34: command_34($connect, $turn, 34); break; //파괴 -// case 35: command_35($connect, $turn, 35); break; //선동 -// case 36: command_36($connect, $turn, 36); break; //기습 - - case 41: command_Single($connect, $turn, 41); break; //단련 - case 42: command_Single($connect, $turn, 42); break; //견문 -// case 43: command_43($connect, $turn, 43); break; //증여 -// case 44: command_44($connect, $turn, 44); break; //헌납 - case 45: command_Single($connect, $turn, 45); break; //하야 -// case 46: command_46($connect, $turn, 46); break; //건국 - case 47: command_Single($connect, $turn, 47); break; //방랑 -// case 48: command_48($connect, $turn, 48); break; //장비구입 -// case 49: command_49($connect, $turn, 49); break; //군량매매 - case 50: command_Single($connect, $turn, 50); break; //요양 - -// case 51: command_51($connect, $turn, 51); break; //항복권고 -// case 52: command_52($connect, $turn, 52); break; //원조 -// case 53: command_53($connect, $turn, 53); break; //통합제의 -// case 54: command_54($connect, $turn, 54); break; //선양 - case 55: command_Single($connect, $turn, 55); break; //거병 - case 56: command_Single($connect, $turn, 56); break; //해산 - case 57: command_Single($connect, $turn, 57); break; //모반 시도 - -// case 61: command_61($connect, $turn, 61); break; //불가침 -// case 62: command_62($connect, $turn, 62); break; //선포 -// case 63: command_63($connect, $turn, 63); break; //종전 -// case 64: command_64($connect, $turn, 64); break; //파기 -// case 65: command_65($connect, $turn, 65); break; //초토화 -// case 66: command_66($connect, $turn, 66); break; //천도 -// case 67: command_67($connect, $turn, 67); break; //증축 -// case 68: command_68($connect, $turn, 68); break; //감축 - - case 71: command_Chief($connect, $turn, 71); break; //필사즉생 -// case 72: command_72($connect, $turn, 72); break; //백성동원 -// case 73: command_73($connect, $turn, 73); break; //수몰 -// case 74: command_74($connect, $turn, 74); break; //허보 -// case 75: command_75($connect, $turn, 75); break; //피장파장 - case 76: command_Chief($connect, $turn, 76); break; //의병모집 -// case 77: command_77($connect, $turn, 77); break; //이호경식 -// case 78: command_78($connect, $turn, 78); break; //급습 - -// case 81: command_81($connect, $turn, 81); break; //국기변경 - -// case 99: command_99($connect, $turn); break; //수뇌부 후식 - default: command_Other($connect, $turn, $commandtype); break; -} - diff --git a/che/proc.php b/che/proc.php deleted file mode 100644 index 7d9408b6..00000000 --- a/che/proc.php +++ /dev/null @@ -1,7 +0,0 @@ -".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 14 && $general[item] <= 16) { - //의적주, 두강주, 보령압주 사용 - $genAtmos += 5; - } elseif($general[item] >= 19 && $general[item] <= 20) { - //춘화첩, 초선화 사용 - $genAtmos += 7; - } - $genTrain = 0; - if($general[item] == 4) { - //청주 사용 - $genTrain += 3; - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[item] >= 12 && $general[item] <= 13) { - //과실주, 이강주 사용 - $genTrain += 5; - } elseif($general[item] >= 17 && $general[item] <= 18) { - //철벽서, 단결도 사용 - $genTrain += 7; - } - - // 우선 스케일링 - $city[def] *= 10; - $city[wall] *= 10; - - $query = "select level from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $originCity = MYDB_fetch_array($result); - - $query = "select nation,level,name,history,capital,tech,type from nation where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,level,name,history,rice,capital,tech,type from nation where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destnation = MYDB_fetch_array($result); - - //장수수 구함 - $query = "select no from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - if($gencount < 10) $gencount = 10; - //장수수 구함 - $query = "select no from general where nation='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $destgencount = MYDB_num_rows($result); - if($destgencount < 10) $destgencount = 10; - - $genAtmosBonus = 0; $genTrainBonus = 0; - $oppAtmosBonus = 0; $oppTrainBonus = 0; - //공격자 수도보정 - if($nation[capital] == $general[city]) { $genAtmosBonus += 5; } - //방어자 수도보정 - //if($destnation[capital] == $city[city]) { $oppTrainBonus += 5; } - //관,진,수진 보정 - if($city[level] == 1) { $oppTrainBonus += 5; } // 방어도시가 수진이면 방어자 방어보정 - if($originCity[level] == 2) { $genAtmosBonus += 5; } // 출병도시가 진이면 공격자 공격보정 - if($city[level] == 3) { $oppTrainBonus += 5; } // 방어도시가 관이면 방어자 방어보정 - - $alllog[count($alllog)] = "●{$game[month]}월:$nation[name]$general[name](이)가 $city[name](으)로 진격합니다."; - $log[count($log)] = "●{$game[month]}월:$city[name](으)로 진격합니다. <1>$date"; -// $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【전투】$nation[name](이)가 $destnation[name]$city[name](으)로 진격합니다."; - - // 목표 도시내에 목표 국가 소속 장수 중, 병사가 있는 능력치합+병사수 순으로 훈,사 60, 80 이상 - $query = "select no,name,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,power,power2,weap,injury,leader,leader2,horse,item,explevel,level,rice,leader+power+intel+weap+horse+book+crew/100 as sum,dex0,dex10,dex20,dex30,dex40 from general where city='$city[city]' and nation='$city[nation]' and nation!=0 and crew>'0' and rice>round(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2)) order by sum desc"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opposecount = MYDB_num_rows($result); - - $exp = 0; //병사 소진 시킨 만큼 - $opexp = 0; - $exp2 = 1; //능력경험치 - $phase = 0; - while($phase < $warphase) { - // 장수가 없어서 도시 공격하려했으나 병량없을시 - if($opposecount == 0 && $destnation[nation] > 0 && $destnation[rice] <= 0 && $city[supply] == 1) { - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $alllog[count($alllog)] = "●{$game[month]}월:병량 부족으로 $city[name]의 수비병들이 패퇴합니다."; - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【패퇴】$destnation[name](이)가 병량 부족으로 $city[name](을)를 뺏기고 말았습니다."; - pushGenLog($general, $log); - pushAllLog($alllog); - pushHistory($connect, $history); - unset($log); - unset($alllog); - unset($history); - - //패퇴시 병량보충 - $destnation[rice] += 500; - $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //내정 피폐 - $query = "update city set agri=agri*0.5,comm=comm*0.5,secu=secu*0.5 where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $city = addConflict($connect, $city, $general[nation], 1); - - ConquerCity($connect, $game, $general, $city, $nation, $destnation); - break; - // 장수가 없어서 도시 공격 - } elseif($opposecount == 0) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 ".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; - $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 성벽을 공격합니다."; - - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $mykillnum = 0; $mydeathnum = 0; - while($phase < $warphase) { - $phase++; - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - $myAtt = getAtt($game, $general, $nation[tech], $lbonus); - $myDef = getDef($game, $general, $nation[tech]); - $cityAtt = getCityAtt($city); - $cityDef = getCityDef($city); - - // 감소할 병사 수 - $cityCrew = $_armperphase + $myAtt - $cityDef; - $myCrew = $_armperphase + $cityAtt - $myDef; - if($cityCrew <= 0) { $cityCrew = rand() % 90 + 10; } - if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } - - //훈련 사기따라 - $myCrew = getCrew($myCrew, $game[city_rate]+$oppAtmosBonus, CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); - $cityCrew = getCrew($cityCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), $game[city_rate]+$oppTrainBonus); - //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, 40); - $cityCrew *= getDexLog($genDexAtt, ($game[city_rate]-60)*7200); - $myCrew *= getDexLog(($game[city_rate]-60)*7200, $genDexDef); - - $avoid = 1; - // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); - if($general[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - - // 특기보정 : 신산 - if($general[special2] == 41) { $ratio2 += 200; } - - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; // 0~99 - // 특기보정 : 귀병, 신산, 환술, 신중 - if($general[special2] == 40) { $ratio += 20; } - if($general[special2] == 41) { $ratio += 20; } - if($general[special2] == 42) { $ratio += 10; } - if($general[special2] == 44) { $ratio += 100; } - if($ratio >= 30) { - // 특기보정 : 환술, 집중 - if($general[special2] == 42) { $cityCrew *= 1.3; } - if($general[special2] == 43) { $cityCrew *= 1.5; } - $type = rand() % 3; - switch($type) { - case 0: - $batlog[count($batlog)] = "급습을 성공했다!"; - $cityCrew *= 1.2; - break; - case 1: - $batlog[count($batlog)] = "위보를 성공했다!"; - $cityCrew *= 1.4; - break; - case 2: - $batlog[count($batlog)] = "혼란을 성공했다!"; - $cityCrew *= 1.6; - break; - } - } else { - $type = rand() % 3; - switch($type) { - case 0: - $batlog[count($batlog)] = "급습을 실패했다!"; - $cityCrew /= 1.2; $myCrew *= 1.2; - break; - case 1: - $batlog[count($batlog)] = "위보를 실패했다!"; - $cityCrew /= 1.4; $myCrew *= 1.4; - break; - case 2: - $batlog[count($batlog)] = "혼란을 실패했다!"; - $cityCrew /= 1.6; $myCrew *= 1.6; - break; - } - } - } - } elseif($general[crewtype] == 40) { // 정란 - $cityCrew = $cityCrew * 1.5; - } elseif($general[crewtype] == 41) { // 충차 - $cityCrew = $cityCrew * 2.0; - } elseif($general[crewtype] == 42) { // 벽력거 - $cityCrew = $cityCrew * 1.5; - } - //군주 공격 보정 10% - if($general[level] == 12) { - $cityCrew = $cityCrew * 1.10; - //참모, 장군 공격 보정 5% - } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { - $cityCrew = $cityCrew * 1.05; - } - //레벨 보정 - $cityCrew = $cityCrew * (100 + $general[explevel]/6)/100; - - // 특기보정 : 공성, 기병, 돌격, 무쌍, 보병, 견고, 의술(청낭서,태평청령) - if($general[special2] == 53) { $cityCrew *= 2.00; } - if($general[special2] == 52) { $cityCrew *= 1.20; } - if($general[special2] == 60) { $cityCrew *= 1.10; } - if($general[special2] == 61) { $cityCrew *= 1.10; } - if($general[special2] == 50) { $myCrew *= 0.90; } - if($general[special2] == 62) { $myCrew *= 0.90; } - $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $avoid == 1) { - $batlog[count($batlog)] = "치료했다!"; - $myCrew /= 1.5; // 66%만 소모 - $avoid = 0; - } - - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); - // 특기보정 : 무쌍, 필살 - if($general[special2] == 61) { $ratio += 10; } - if($general[special2] == 71) { $ratio += 20; } - if($ratio >= $rd && $avoid == 1) { - $batlog[count($batlog)] = "필살공격!"; - $cityCrew = CriticalScore2($cityCrew); - $avoid = 0; - } - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 - //특기보정 : 궁병 - if($general[special2] == 51) { $ratio2 += 20; } - //도구 보정 : 둔갑천서, 태평요술 - if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } - if($ratio < $ratio2 && $avoid == 1) { - $batlog[count($batlog)] = "회피했다!"; - $myCrew /= 10; // 10%만 소모 - $avoid = 0; - } - - //랜타추가 - $cityCrew *= (rand() % 21 + 90)/100; // 90~110% - $myCrew *= (rand() % 21 + 90)/100; // 90~110% - - //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { - $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; - $myCrew = 0; - } - - $general[crew] -= round($myCrew); - $city[def] -= round($cityCrew); - $city[wall] -= round($cityCrew); - - $tempMyCrew = $myCrew; $tempCityCrew = $cityCrew; - $tempGeneralCrew = $general[crew]; $tempCityDef = $city[def]; - - if($city[wall] <= 0) { $city[wall] = 0; } - - if($general[crew] <= 0 && $city[def] <= 0) { - $r1 = $tempGeneralCrew / $tempMyCrew; - $r2 = $tempCityDef / $tempCityCrew; - - if($r1 > $r2) { - $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $cityCrew += $tempCityDef; - $city[def] = 0; - } else { - $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); - $cityCrew += $offset; - $city[def] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } elseif($general[crew] * $city[def] <= 0) { - if($city[def] < 0) { - $offset = round($tempCityDef*$tempMyCrew/$tempCityCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $cityCrew += $tempCityDef; - $city[def] = 0; - } - if($general[crew] < 0) { - $offset = round($tempGeneralCrew*$tempCityCrew/$tempMyCrew); - $cityCrew += $offset; - $city[def] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } - - $exp += $cityCrew; - $opexp += $myCrew; - $general[crew] = round($general[crew]); - $cityCrew = round($cityCrew); - $myCrew = round($myCrew); - $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $city[def] (-$cityCrew) 【$city[name]】"; - - $mykillnum += $cityCrew; $mydeathnum += $myCrew; - - // 중간 쌀 체크 - $myRice = round($exp / 50); - // 성격 보정 - $myRice = CharExperience($myRice, $general[personal]); - // 쌀 소모 - $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); - // 결과 쌀 - $myRice = $general[rice] - $myRice; - - if($myRice <= round($general[crew]/100)) { break; } - - if($city[def] <= 0) { break; } - if($general[crew] <= 0) { break; } - } - $res = "성 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $city[def] (-$mykillnum) 【$city[name]】<1>성벽"; - $log[count($log)] = "◆".$res; - $batlog[count($batlog)] = "◆".$res; - $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; - $deadAmount[att] = $deadAmount[att] + $mydeathnum; - $deadAmount[def] = $deadAmount[def] + $mykillnum; - - // 도시쌀 소모 계산 - $opexp = round($opexp / 50 * 0.8); - $rice = round($opexp * 5 * getCrewtypeRice($game, 0, 0) * ($game[city_rate]/100 - 0.2)); - $destnation[rice] -= $rice; - if($destnation[rice] < 0) { $destnation[rice] = 0; } - $query = "update nation set rice='$destnation[rice]' where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $adminLog[0] = "성벽 쌀 소모 : $rice"; - pushAdminLog($connect, $adminLog); - - //원래대로 스케일링 - $city[def] = round($city[def] / 10); - $city[wall] = round($city[wall] / 10); - //내정 감소 - $dec = round($cityCrew / 10); - $city[agri] -= $dec; - $city[comm] -= $dec; - $city[secu] -= $dec; - if($city[agri] < 0) { $city[agri] = 0; } - if($city[comm] < 0) { $city[comm] = 0; } - if($city[secu] < 0) { $city[secu] = 0; } - // 병사수 변경 - $query = "update general set crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $mykillnum); - addGenDex($connect, $general[no], 40, $mydeathnum); - // 죽은수 기술로 누적 - $num = round($mydeathnum * 0.01); - // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } - // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 죽은수 기술로 누적 - $num = round($mykillnum * 0.01); - // 국가보정 - if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } - if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } - // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //양국 평균 기술가격 - //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; - $techRatio = 1.0; - // 죽은수 도시 재정으로 누적 60% - $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); - // 국가보정 - if($destnation[type] == 1) { $num *= 1.1; } - if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num',def='$city[def]',wall='$city[wall]',agri='$city[agri]',comm='$city[comm]',secu='$city[secu]' where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 죽은수 도시 재정으로 누적 40% - $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); - // 국가보정 - if($nation[type] == 1) { $num *= 1.1; } - if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //분쟁현황에 추가 - $city = addConflict($connect, $city, $general[nation], $mykillnum); - - // 병사 소진시 성 함락 - if($city[def] <= 0) { - $exp += 1000; - $exp2++; - - pushGenLog($general, $log); - pushBatLog($general, $batlog); - pushBatRes($general, $batres); - pushAllLog($alllog); - pushHistory($connect, $history); - unset($log); - unset($batlog); - unset($batres); - unset($alllog); - unset($history); - - ConquerCity($connect, $game, $general, $city, $nation, $destnation); - break; - // 공격 장수 병사 소진시 실패 처리 - } elseif($general[crew] <= 0) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - $log[count($log)] = "●퇴각했습니다."; - - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } elseif($myRice <= round($general[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - $log[count($log)] = "●군량 부족으로 퇴각합니다."; - - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; - } - // 장수 대결 - } else { - $oppose = MYDB_fetch_array($result); - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(와)과 $oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 대결합니다."; - $log[count($log)] = "●".getTypename($general[crewtype])."(으)로 $oppose[name]의 ".getTypename($oppose[crewtype])."(을)를 공격합니다."; - $opplog[count($opplog)] = "●".getTypename($oppose[crewtype])."(으)로 $general[name]의 ".getTypename($general[crewtype])."(을)를 수비합니다."; - - $oppAtmos = 0; - if($oppose[item] == 3) { - //탁주 사용 - $oppAtmos += 3; - $query = "update general set item=0 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[item] >= 14 && $oppose[item] <= 16) { - //의적주, 두강주, 보령압주 사용 - $oppAtmos += 5; - } elseif($oppose[item] >= 19 && $oppose[item] <= 20) { - //춘화첩, 초선화 사용 - $oppAtmos += 7; - } - $oppTrain = 0; - if($oppose[item] == 4) { - //청주 사용 - $oppTrain += 3; - $query = "update general set item=0 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[item] >= 12 && $oppose[item] <= 13) { - //과실주, 이강주 사용 - $oppTrain += 5; - } elseif($oppose[item] >= 17 && $oppose[item] <= 18) { - //철벽서, 단결도 사용 - $oppTrain += 7; - } - - $general[train] += 1; //훈련 상승 - if($general[train] > $_maximumtrain) { $general[train] = $_maximumtrain; } - $oppose[train] += 1; //훈련 상승 - if($oppose[train] > $_maximumtrain) { $oppose[train] = $_maximumtrain; } - - $query = "update general set recwar='$general[turntime]',train='$general[train]',warnum=warnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set recwar='$general[turntime]',train='$oppose[train]',warnum=warnum+1 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $ratio = rand() % 100; - //특기보정 : 저격(수극), 활무기저격 - if(($general[special2] == 70 && $ratio <= 33) || ($general[item] == 2 && $ratio <= 20) || (($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) && $ratio <= 20)) { - //수극 사용 - if($general[item] == 2) { - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $log[count($log)] = "".getItemName($general[item])."(을)를 사용!"; - $general[item] = 0; - } elseif($general[weap] == 10 || $general[weap] == 14 || $general[weap] == 18 || $general[weap] == 22) { -// $log[count($log)] = "".getWeapName($general[weap])."(을)를 사용!"; - } - $log[count($log)] = "●상대를 저격했다!"; - $batlog[count($batlog)] = "●상대를 저격했다!"; - $opplog[count($opplog)] = "●상대에게 저격당했다!"; - $oppbatlog[count($oppbatlog)] = "●상대에게 저격당했다!"; - // 부상 - $oppose[injury] += rand() % 41 + 20; // 20 ~ 60 - if($oppose[injury] > 80) { $oppose[injury] = 80; } - } else if($general[item] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $batlog[count($batlog)] = "".getItemName($general[item])."(이)가 빗나갑니다!"; - $general[item] = 0; - } - $ratio = rand() % 100; - //특기보정 : 저격(수극), 활무기저격 - if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose[item] == 2 && $ratio <= 20) || (($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) && $ratio <= 20)) { - //수극 사용 - if($oppose[item] == 2) { - $query = "update general set item=0 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opplog[count($opplog)] = "".getItemName($oppose[item])."(을)를 사용!"; - $oppose[item] = 0; - } elseif($oppose[weap] == 10 || $oppose[weap] == 14 || $oppose[weap] == 18 || $oppose[weap] == 22) { -// $opplog[count($opplog)] = "".getWeapName($oppose[weap])."(을)를 사용!"; - } - $oppbatlog[count($oppbatlog)] = "●상대를 저격했다!"; - $opplog[count($opplog)] = "●상대를 저격했다!"; - $batlog[count($batlog)] = "●상대에게 저격당했다!"; - $log[count($log)] = "●상대에게 저격당했다!"; - // 부상 - $general[injury] += rand() % 41 + 20; // 20 ~ 60 - if($general[injury] > 80) { $general[injury] = 80; } - } else if($oppose[item] == 2 && $ratio <= 40) { - $query = "update general set item=0 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $oppbatlog[count($oppbatlog)] = "".getItemName($oppose[item])."(이)가 빗나갑니다!"; - $oppose[item] = 0; - } - - $mykillnum = 0; $mydeathnum = 0; - $opkillnum = 0; $opdeathnum = 0; - while($phase < $warphase) { - $phase++; - - if($general[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($general[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - $myAtt = getAtt($game, $general, $nation[tech], $lbonus); - $myDef = getDef($game, $general, $nation[tech]); - - if($oppose[level] == 12) { - $opplbonus = $destnation[level] * 2; - } elseif($oppose[level] >= 5) { - $opplbonus = $destnation[level]; - } else { - $opplbonus = 0; - } - $opAtt = getAtt($game, $oppose, $destnation[tech], $opplbonus); - $opDef = getDef($game, $oppose, $destnation[tech]); - // 감소할 병사 수 - $myCrew = $_armperphase + $opAtt - $myDef; - $opCrew = $_armperphase + $myAtt - $opDef; - if($myCrew <= 0) { $myCrew = rand() % 90 + 10; } - if($opCrew <= 0) { $opCrew = rand() % 90 + 10; } - //훈련 사기따라 - $myCrew = getCrew($myCrew, CharAtmos($oppose[atmos]+$oppAtmos+$oppAtmosBonus, $oppose[personal]), CharTrain($general[train]+$genTrain+$genTrainBonus, $general[personal])); - $opCrew = getCrew($opCrew, CharAtmos($general[atmos]+$genAtmos+$genAtmosBonus, $general[personal]), CharTrain($oppose[train]+$oppTrain+$oppTrainBonus, $oppose[personal])); - //숙련도 따라 - $genDexAtt = getGenDex($general, $general[crewtype]); - $genDexDef = getGenDex($general, $oppose[crewtype]); - $oppDexAtt = getGenDex($oppose, $oppose[crewtype]); - $oppDexDef = getGenDex($oppose, $general[crewtype]); - $opCrew *= getDexLog($genDexAtt, $oppDexDef); - $myCrew *= getDexLog($oppDexAtt, $genDexDef); - - $myAvoid = 1; - $opAvoid = 1; - // 병종간 특성 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $int = round($general[intel] * (100-$general[injury])/100) + getBookEff($general[book]); - if($general[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($general[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($general[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($general[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - - // 특기보정 : 신산 - if($general[special2] == 41) { $ratio2 += 200; } - - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; - // 특기보정 : 귀병, 신산, 환술, 신중 - if($general[special2] == 40) { $ratio += 20; } - if($general[special2] == 41) { $ratio += 20; } - if($general[special2] == 42) { $ratio += 10; } - if($general[special2] == 44) { $ratio += 100; } - if($ratio >= 30) { - // 특기보정 : 환술, 집중 - if($general[special2] == 42) { $opCrew *= 1.3; } - if($general[special2] == 43) { $opCrew *= 1.5; } - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { - $batlog[count($batlog)] = "위보를 역으로 당했다!"; - $oppbatlog[count($oppbatlog)] = "반계로 상대의 위보를 되돌렸다!"; - $myCrew *= 1.2; - } else { - $batlog[count($batlog)] = "위보를 성공했다!"; - $oppbatlog[count($oppbatlog)] = "위보에 당했다!"; - $opCrew *= 1.2; - } - break; - case 1: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { - $batlog[count($batlog)] = "매복을 역으로 당했다!"; - $oppbatlog[count($oppbatlog)] = "반계로 상대의 매복을 되돌렸다!"; - $myCrew *= 1.4; - } else { - $batlog[count($batlog)] = "매복을 성공했다!"; - $oppbatlog[count($oppbatlog)] = "매복에 당했다!"; - $opCrew *= 1.4; - } - break; - case 2: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { - $batlog[count($batlog)] = "반목을 역으로 당했다!"; - $oppbatlog[count($oppbatlog)] = "반계로 상대의 반목을 되돌렸다!"; - $myCrew *= 1.6; - } else { - $batlog[count($batlog)] = "반목을 성공했다!"; - $oppbatlog[count($oppbatlog)] = "반목에 당했다!"; - $opCrew *= 1.6; - // 특기보정 : 반계 - if($general[special2] == 45) { $opCrew *= 2; } - } - break; - case 3: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { - $batlog[count($batlog)] = "화계를 역으로 당했다!"; - $oppbatlog[count($oppbatlog)] = "반계로 상대의 화계를 되돌렸다!"; - $myCrew *= 1.8; - } else { - $batlog[count($batlog)] = "화계를 성공했다!"; - $oppbatlog[count($oppbatlog)] = "화계에 당했다!"; - $opCrew *= 1.8; - } - break; - case 4: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { - $batlog[count($batlog)] = "혼란을 역으로 당했다!"; - $oppbatlog[count($oppbatlog)] = "반계로 상대의 혼란을 되돌렸다!"; - $myCrew *= 2.0; - } else { - $batlog[count($batlog)] = "혼란을 성공했다!"; - $oppbatlog[count($oppbatlog)] = "혼란에 당했다!"; - $opCrew *= 2.0; - } - break; - } - } else { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $batlog[count($batlog)] = "위보를 실패했다!"; - $oppbatlog[count($oppbatlog)] = "위보를 간파했다!"; - $opCrew /= 1.1; $myCrew *= 1.1; - break; - case 1: - $batlog[count($batlog)] = "매복을 실패했다!"; - $oppbatlog[count($oppbatlog)] = "매복을 간파했다!"; - $opCrew /= 1.2; $myCrew *= 1.2; - break; - case 2: - $batlog[count($batlog)] = "반목을 실패했다!"; - $oppbatlog[count($oppbatlog)] = "반목을 간파했다!"; - $opCrew /= 1.3; $myCrew *= 1.3; - break; - case 3: - $batlog[count($batlog)] = "화계를 실패했다!"; - $oppbatlog[count($oppbatlog)] = "화계를 간파했다!"; - $opCrew /= 1.4; $myCrew *= 1.4; - break; - case 4: - $batlog[count($batlog)] = "혼란을 실패했다!"; - $oppbatlog[count($oppbatlog)] = "혼란을 간파했다!"; - $opCrew /= 1.5; $myCrew *= 1.5; - break; - } - } - } - } - - // 상대 장수 병종간 특성 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $int = round($oppose[intel] * (100-$oppose[injury])/100) + getBookEff($oppose[book]); - if($oppose[crewtype] == 30) { - $ratio2 = $int * 5; // 0~500 즉 50% - } elseif($oppose[crewtype] == 31) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 32) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 33) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 34) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 35) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 36) { - $ratio2 = $int * 8; // 0~800 즉 80% - } elseif($oppose[crewtype] == 37) { - $ratio2 = $int * 6; // 0~600 즉 60% - } elseif($oppose[crewtype] == 38) { - $ratio2 = $int * 6; // 0~600 즉 60% - } - - // 특기보정 : 신산 - if($oppose[special2] == 41) { $ratio2 += 200; } - - $ratio = rand() % 1000; // 0~999 - if($ratio <= $ratio2) { - $ratio = rand() % 100; - // 특기보정 : 귀병, 신산, 환술, 신중 - if($oppose[special2] == 40) { $ratio += 20; } - if($oppose[special2] == 41) { $ratio += 20; } - if($oppose[special2] == 42) { $ratio += 10; } - if($oppose[special2] == 44) { $ratio += 100; } - if($ratio >= 30) { - // 특기보정 : 환술, 집중 - if($oppose[special2] == 42) { $myCrew *= 1.3; } - if($oppose[special2] == 43) { $myCrew *= 1.5; } - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { - $oppbatlog[count($oppbatlog)] = "위보를 역으로 당했다!"; - $batlog[count($batlog)] = "반계로 상대의 위보를 되돌렸다!"; - $opCrew *= 1.2; - } else { - $oppbatlog[count($oppbatlog)] = "위보를 성공했다!"; - $batlog[count($batlog)] = "위보에 당했다!"; - $myCrew *= 1.2; - } - break; - case 1: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { - $oppbatlog[count($oppbatlog)] = "매복을 역으로 당했다!"; - $batlog[count($batlog)] = "반계로 상대의 매복을 되돌렸다!"; - $opCrew *= 1.4; - } else { - $oppbatlog[count($oppbatlog)] = "매복을 성공했다!"; - $batlog[count($batlog)] = "매복에 당했다!"; - $myCrew *= 1.4; - } - break; - case 2: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { - $oppbatlog[count($oppbatlog)] = "반목을 역으로 당했다!"; - $batlog[count($batlog)] = "반계로 상대의 반목을 되돌렸다!"; - $opCrew *= 1.6; - } else { - $oppbatlog[count($oppbatlog)] = "반목을 성공했다!"; - $batlog[count($batlog)] = "반목에 당했다!"; - $myCrew *= 1.6; - // 특기보정 : 반계 - if($oppose[special2] == 45) { $myCrew *= 2; } - } - break; - case 3: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { - $oppbatlog[count($oppbatlog)] = "화계를 역으로 당했다!"; - $batlog[count($batlog)] = "반계로 상대의 화계을 되돌렸다!"; - $opCrew *= 1.8; - } else { - $oppbatlog[count($oppbatlog)] = "화계를 성공했다!"; - $batlog[count($batlog)] = "화계에 당했다!"; - $myCrew *= 1.8; - } - break; - case 4: - $ratio = rand() % 100; - // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { - $oppbatlog[count($oppbatlog)] = "혼란을 역으로 당했다!"; - $batlog[count($batlog)] = "반계로 상대의 혼란을 되돌렸다!"; - $opCrew *= 2.0; - } else { - $oppbatlog[count($oppbatlog)] = "혼란을 성공했다!"; - $batlog[count($batlog)] = "혼란에 당했다!"; - $myCrew *= 2.0; - } - break; - } - } else { - $type = rand() % 5; // 0~4 - switch($type) { - case 0: - $oppbatlog[count($oppbatlog)] = "위보를 실패했다!"; - $batlog[count($batlog)] = "위보를 간파했다!"; - $myCrew /= 1.1; $opCrew *= 1.1; - break; - case 1: - $oppbatlog[count($oppbatlog)] = "매복을 실패했다!"; - $batlog[count($batlog)] = "매복을 간파했다!"; - $myCrew /= 1.2; $opCrew *= 1.2; - break; - case 2: - $oppbatlog[count($oppbatlog)] = "반목을 실패했다!"; - $batlog[count($batlog)] = "반목을 간파했다!"; - $myCrew /= 1.3; $opCrew *= 1.3; - break; - case 3: - $oppbatlog[count($oppbatlog)] = "화계를 실패했다!"; - $batlog[count($batlog)] = "화계를 간파했다!"; - $myCrew /= 1.4; $opCrew *= 1.4; - break; - case 4: - $oppbatlog[count($oppbatlog)] = "혼란을 실패했다!"; - $batlog[count($batlog)] = "혼란을 간파했다!"; - $myCrew /= 1.5; $opCrew *= 1.5; - break; - } - } - } - } - - // 특기보정: 돌격 - if($oppose[crewtype] == 43 && $general[special2] != 60) { // 목우 - $r = 0; - $r += $oppose[atmos] + $oppAtmos + $oppAtmosBonus; - $r += $oppose[train] + $oppTrain + $oppTrainBonus; - $ratio = rand() % 400; // 최대 50% 저지 - if($ratio < $r && $opAvoid == 1) { - $batlog[count($batlog)] = "저지당했다!"; - $oppbatlog[count($oppbatlog)] = "●상대를 저지했다!"; - $opAvoid = 0; - continue; - } - } - - // my 입장 상성 - // 보병계열 > 궁병계열 - if(floor($general[crewtype]/10) == 0 && floor($oppose[crewtype]/10) == 1) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 궁병계열 > 기병계열 - if(floor($general[crewtype]/10) == 1 && floor($oppose[crewtype]/10) == 2) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 기병계열 > 보병계열 - if(floor($general[crewtype]/10) == 2 && floor($oppose[crewtype]/10) == 0) { - $myCrew *= 0.8; - $opCrew *= 1.2; - } - // 차병계열 - if(floor($general[crewtype]/10) == 4) { - $myCrew *= 1.2; - $opCrew *= 0.8; - } - - // op 입장 상성 - // 보병계열 > 궁병계열 - if(floor($oppose[crewtype]/10) == 0 && floor($general[crewtype]/10) == 1) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 궁병계열 > 기병계열 - if(floor($oppose[crewtype]/10) == 1 && floor($general[crewtype]/10) == 2) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 기병계열 > 보병계열 - if(floor($oppose[crewtype]/10) == 2 && floor($general[crewtype]/10) == 0) { - $opCrew *= 0.8; - $myCrew *= 1.2; - } - // 차병계열 - if(floor($oppose[crewtype]/10) == 4) { - $opCrew *= 1.2; - $myCrew *= 0.8; - } - - //군주 공격 보정 10% - if($general[level] == 12) { - $opCrew = $opCrew * 1.10; - //참모, 장군 공격 보정 5% - } elseif($general[level] == 11 || $general[level] == 10 || $general[level] == 8 || $general[level] == 6) { - $opCrew = $opCrew * 1.05; - } - - //상대장수 관직 보정 - //군주 방어 보정 10% - if($oppose[level] == 12) { - $opCrew = $opCrew * 0.90; - //참모, 모사 방어 보정 5% - } elseif($oppose[level] == 11 || $oppose[level] == 9 || $oppose[level] == 7 || $oppose[level] == 5) { - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 4 && $oppose[no] == $city[gen1]) { // 태수 보정 - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 3 && $oppose[no] == $city[gen2]) { // 군사 보정 - $opCrew = $opCrew * 0.95; - } elseif($oppose[level] == 2 && $oppose[no] == $city[gen3]) { // 시중 보정 - $opCrew = $opCrew * 0.95; - } - - //레벨 보정 - $myCrew = $myCrew * ((100 - $general[explevel]/3)/100); - $opCrew = $opCrew / ((100 - $general[explevel]/3)/100); - $myCrew = $myCrew / ((100 - $oppose[explevel]/3)/100); - $opCrew = $opCrew * ((100 - $oppose[explevel]/3)/100); - - // 특기보정 : 기병, 돌격, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) - if($general[special2] == 52) { $opCrew *= 1.20; } - if($general[special2] == 60) { $opCrew *= 1.10; } - if($general[special2] == 61) { $opCrew *= 1.10; } - if($general[special2] == 50) { $myCrew *= 0.90; } - if($general[special2] == 62) { $myCrew *= 0.90; } - if($general[special2] == 75) { - if($oppose[crewtype] != 0 && $oppose[crewtype] != 10 && $oppose[crewtype] != 20 && - $oppose[crewtype] != 30 && $oppose[crewtype] != 40 && $oppose[crewtype] != 41) - { - $opCrew *= 1.1; $myCrew *= 0.9; - } - } - $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general[item] == 23 || $general[item] == 24) && $ratio > 80 && $myAvoid == 1) { - $batlog[count($batlog)] = "치료했다!"; - $myCrew /= 1.5; // 66%만 소모 - $myAvoid = 0; - } - - // 상대 특기보정 : 기병, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) - if($oppose[special2] == 52) { $myCrew *= 1.10; } - if($oppose[special2] == 61) { $myCrew *= 1.10; } - if($oppose[special2] == 50) { $opCrew *= 0.80; } - if($oppose[special2] == 62) { $myCrew *= 1.10; } - if($oppose[special2] == 75) { - if($general[crewtype] != 0 && $general[crewtype] != 10 && $general[crewtype] != 20 && - $general[crewtype] != 30 && $general[crewtype] != 40 && $general[crewtype] != 41) - { - $myCrew *= 1.1; $opCrew *= 0.9; - } - } - $ratio = rand() % 100; // 0 ~ 99 - if(($oppose[special2] == 73 || $oppose[item] == 23 || $oppose[item] == 24) && $ratio > 80 && $opAvoid == 1) { - $oppbatlog[count($oppbatlog)] = "치료했다!"; - $opCrew /= 1.5; // 66%만 소모 - $opAvoid = 0; - } - - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general[leader]+getHorseEff($general[horse])+$lbonus, $general[power]+getWeapEff($general[weap]), $general[intel]+getBookEff($general[book])); - // 특기보정 : 무쌍, 필살 - if($general[special2] == 61) { $ratio += 10; } - if($general[special2] == 71) { $ratio += 20; } - if($ratio >= $rd && $myAvoid == 1) { - $batlog[count($batlog)] = "필살공격!"; - $oppbatlog[count($oppbatlog)] = "●상대의 필살공격!"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - - // 특기보정 : 격노 - if($oppose[special2] == 74) { - if(rand() % 100 < 50) { - $batlog[count($batlog)] = "●필살 공격에 상대가 격노했다!"; - $oppbatlog[count($oppbatlog)] = "●상대의 필살 공격에 격노했다!"; - $myCrew = CriticalScore2($myCrew); - $opAvoid = 0; - } - } - } - //크리 - $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose[leader]+getHorseEff($oppose[horse])+$opplbonus, $oppose[power]+getWeapEff($oppose[weap]), $oppose[intel]+getBookEff($oppose[book])); - // 특기보정 : 필살 - if($oppose[special2] == 71) { $ratio += 20; } - if($ratio >= $rd && $opAvoid == 1) { - $oppbatlog[count($oppbatlog)] = "필살공격!"; - $batlog[count($batlog)] = "●상대의 필살공격!"; - $myCrew = CriticalScore2($myCrew); - $opAvoid = 0; - - // 특기보정 : 격노 - if($general[special2] == 74) { - if(rand() % 100 < 33) { - $oppbatlog[count($oppbatlog)] = "●필살 공격에 상대가 진노했다!"; - $batlog[count($batlog)] = "●상대의 필살 공격에 진노했다!"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - $warphase++; - } elseif(rand() % 100 < 33) { - $oppbatlog[count($oppbatlog)] = "●필살 공격에 상대가 격노했다!"; - $batlog[count($batlog)] = "●상대의 필살 공격에 격노했다!"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - } - } - } - - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $general[crewtype], "avd"); //회피율 - //특기보정 : 돌격, 궁병 - if($oppose[special2] == 60) { $ratio2 -= 100; } - if($general[special2] == 51) { $ratio2 += 20; } - //도구 보정 : 둔갑천서, 태평요술 - if($general[item] == 26 || $general[item] == 25) { $ratio2 += 20; } - if($ratio < $ratio2 && $myAvoid == 1) { - // 특기보정 : 격노 - if($oppose[special2] == 74 && rand() % 100 < 50) { - $batlog[count($batlog)] = "●회피 시도에 상대가 격노했다!"; - $oppbatlog[count($oppbatlog)] = "●상대의 회피 시도에 격노했다!"; - $myCrew = CriticalScore2($myCrew); - $opAvoid = 0; - } else { - $batlog[count($batlog)] = "회피했다!"; - $oppbatlog[count($oppbatlog)] = "●상대가 회피했다!"; - $myCrew /= 10; // 10%만 소모 - $myAvoid = 0; - } - } - //회피 - $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = getRate($game, $oppose[crewtype], "avd"); //회피율 - // 특기보정 : 돌격, 궁병 - if($general[special2] == 60) { $ratio2 -= 100; } - if($oppose[special2] == 51) { $ratio2 += 20; } - //도구 보정 : 둔갑천서, 태평요술 - if($oppose[item] == 26 || $oppose[item] == 25) { $ratio2 += 20; } - if($ratio < $ratio2 && $opAvoid == 1) { - // 특기보정 : 격노 - if($general[special2] == 74 && rand() % 100 < 33) { - $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 진노했다!"; - $batlog[count($batlog)] = "●상대의 회피 시도에 진노했다!"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - $warphase++; - } elseif($general[special2] == 74 && rand() % 100 < 33) { - $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 격노했다!"; - $batlog[count($batlog)] = "●상대의 회피 시도에 격노했다!"; - $opCrew = CriticalScore2($opCrew); - $myAvoid = 0; - } else { - $oppbatlog[count($oppbatlog)] = "회피했다!"; - $batlog[count($batlog)] = "●상대가 회피했다!"; - $opCrew /= 10; // 10%만 소모 - $opAvoid = 0; - } - } - - //랜타추가 - $opCrew *= (rand() % 21 + 90)/100; // 90~110% - $myCrew *= (rand() % 21 + 90)/100; // 90~110% - - //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general[crew] >= 1000 && $general[atmos] >= 90 && $general[train] >= 90) { - $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; - $oppbatlog[count($oppbatlog)] = "●상대에게 위압받았다!"; - $myCrew = 0; - } - //특기보정: 위압 - if($oppose[special2] == 63 && $phase == 1 && $oppose[crew] >= 1000 && $oppose[atmos] >= 90 && $oppose[train] >= 90) { - $batlog[count($batlog)] = "●상대에게 위압받았다!"; - $oppbatlog[count($oppbatlog)] = "●상대에게 위압을 줬다!"; - $opCrew = 0; - } - - $general[crew] -= round($myCrew); - $oppose[crew] -= round($opCrew); - $tempMyCrew = $myCrew; $tempOpCrew = $opCrew; - $tempGeneralCrew = $general[crew]; $tempOpposeCrew = $oppose[crew]; - if($general[crew] <= 0 && $oppose[crew] <= 0) { - $r1 = $tempGeneralCrew / $tempMyCrew; - $r2 = $tempOpposeCrew / $tempOpCrew; - - if($r1 > $r2) { - $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; - } else { - $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); - $opCrew += $offset; - $oppose[crew] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } elseif($general[crew] * $oppose[crew] <= 0) { - if($oppose[crew] < 0) { - $offset = round($tempOpposeCrew*$tempMyCrew/$tempOpCrew); - $myCrew += $offset; - $general[crew] -= $offset; - $opCrew += $tempOpposeCrew; - $oppose[crew] = 0; - } - if($general[crew] < 0) { - $offset = round($tempGeneralCrew*$tempOpCrew/$tempMyCrew); - $opCrew += $offset; - $oppose[crew] -= $offset; - $myCrew += $tempGeneralCrew; - $general[crew] = 0; - } - } - - $exp += $opCrew; - $opexp += $myCrew; - $general[crew] = round($general[crew]); - $oppose[crew] = round($oppose[crew]); - $myCrew = round($myCrew); - $opCrew = round($opCrew); - $batlog[count($batlog)] = "● $phase : 【$general[name]】 $general[crew] (-$myCrew) VS $oppose[crew] (-$opCrew) 【$oppose[name]】"; - $oppbatlog[count($oppbatlog)] = "● $phase : 【$oppose[name]】 $oppose[crew] (-$opCrew) VS $general[crew] (-$myCrew) 【$general[name]】"; - - $mykillnum += $opCrew; $mydeathnum += $myCrew; - $opkillnum += $myCrew; $opdeathnum += $opCrew; - - // 중간 쌀 체크 - $myRice = round($exp / 50); - // 성격 보정 - $myRice = CharExperience($myRice, $general[personal]); - // 쌀 소모 - $myRice = ($myRice * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); - // 결과 쌀 - $myRice = $general[rice] - $myRice; - - // 중간 쌀 체크 - $opRice = round($opexp / 50 * 0.8); - // 성격 보정 - $opRice = CharExperience($opRice, $oppose[personal]); - // 쌀 소모 - $opRice = ($opRice * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - // 결과 쌀 - $opRice = $oppose[rice] - $opRice; - - if($opRice <= round($oppose[crew]/100)) { break; } - if($myRice <= round($general[crew]/100)) { break; } - - if($oppose[crew] <= 0) { break; } - if($general[crew] <= 0) { break; } - } - $res = "공 <1>"._String::SubStr(getTypename($general[crewtype]), 0, 2)."【$general[name]】 $general[crew] (-$mydeathnum) VS $oppose[crew] (-$opdeathnum) 【$oppose[name]】<1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2).""; - $log[count($log)] = "◆".$res; - $batlog[count($batlog)] = "◆".$res; - $batres[count($batres)] = "◆{$game[year]}년 {$game[month]}월: ".$res; - $oppres = "수 <1>"._String::SubStr(getTypename($oppose[crewtype]), 0, 2)."【$oppose[name]】 $oppose[crew] (-$opdeathnum) VS $general[crew] (-$mydeathnum) 【$general[name]】<1>"._String::SubStr(getTypename($general[crewtype]), 0, 2).""; - $opplog[count($opplog)] = "◆".$oppres; - $oppbatlog[count($oppbatlog)] = "◆".$oppres; - $oppbatres[count($oppbatres)] = "◆{$game[year]}년 {$game[month]}월: ".$oppres; - - $deadAmount[att] = $deadAmount[att] + $mydeathnum; - $deadAmount[def] = $deadAmount[def] + $opdeathnum; - - // 상대장수 부상 - $ratio = rand() % 100; - if($ratio >= 95) { - $opplog[count($opplog)] = "●전투중 부상당했다!"; - $oppose[injury] += rand() % 71 + 10; // 10 ~ 80 - if($oppose[injury] > 80) { $oppose[injury] = 80; } - } - // 병사수 변경 - $query = "update general set injury='$oppose[injury]',crew='$oppose[crew]',killcrew=killcrew+'$opkillnum',deathcrew=deathcrew+'$opdeathnum' where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 숙련도 증가 - addGenDex($connect, $oppose[no], $oppose[crewtype], $opkillnum * 0.9); - addGenDex($connect, $oppose[no], $general[crewtype], $opdeathnum * 0.9); - // 죽은수 기술로 누적 - $num = round($mydeathnum * 0.01); - // 국가보정 - if($nation[type] == 3 || $nation[type] == 13) { $num *= 1.1; } - if($nation[type] == 5 || $nation[type] == 6 || $nation[type] == 7 || $nation[type] == 8 || $nation[type] == 12) { $num *= 0.9; } - // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $nation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$gencount' where nation='$nation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 장수 부상 - $ratio = rand() % 100; - if($ratio >= 95) { - $log[count($log)] = "●전투중 부상당했다!"; - $general[injury] += rand() % 71 + 10; // 10 ~ 80 - if($general[injury] > 80) { $general[injury] = 80; } - } - // 병사수 변경 - $query = "update general set injury='$general[injury]',crew='$general[crew]',killcrew=killcrew+'$mykillnum',deathcrew=deathcrew+'$mydeathnum' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 숙련도 증가 - addGenDex($connect, $general[no], $general[crewtype], $mykillnum); - addGenDex($connect, $general[no], $oppose[crewtype], $mydeathnum); - // 죽은수 기술로 누적 - $num = round($opdeathnum * 0.01); - // 국가보정 - if($destnation[type] == 3 || $destnation[type] == 13) { $num *= 1.1; } - if($destnation[type] == 5 || $destnation[type] == 6 || $destnation[type] == 7 || $destnation[type] == 8 || $destnation[type] == 12) { $num *= 0.9; } - // 부드러운 기술 제한 - if(TechLimit($game[startyear], $game[year], $destnation[tech])) { $num = floor($num/4); } - $query = "update nation set totaltech=totaltech+'$num',tech=totaltech/'$destgencount' where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //양국 평균 기술가격 - //$techRatio = (getTechCost($nation[tech]) + getTechCost($destnation[tech])) / 2; - $techRatio = 1.0; - // 죽은수 도시 재정으로 누적 60% - $num = round(($mykillnum+$mydeathnum) * 0.6 * $techRatio); - // 국가보정 - if($destnation[type] == 1) { $num *= 1.1; } - if($destnation[type] == 9 || $destnation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 죽은수 도시 재정으로 누적 40% - $num = round(($mykillnum+$mydeathnum) * 0.4 * $techRatio); - // 국가보정 - if($nation[type] == 1) { $num *= 1.1; } - if($nation[type] == 9 || $nation[type] == 10) { $num *= 0.9; } - $query = "update city set dead=dead+'$num' where city='$general[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 상대 병사 소진이나 쌀 소진시 다음 장수 - if($oppose[crew] <= 0 || ($opRice <= round($oppose[crew]/100) && $general[crew] > 0)) { - if($opRice <= round($oppose[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; - $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 패퇴했습니다."; - $opplog[count($opplog)] = "●군량 부족으로 패퇴합니다."; - } else { - $alllog[count($alllog)] = "●{$game[month]}월:$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; - $log[count($log)] = "$oppose[name]의 ".getTypename($oppose[crewtype])."(이)가 전멸했습니다."; - $opplog[count($opplog)] = "●전멸했습니다."; - } - $opposecount--; - - $general[atmos] *= 1.1; //사기 증가 - if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } - - $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $exp2++; - // 상대장수 경험 등등 증가 - $opexp = round($opexp / 50 * 0.8); - // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); - // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } - - $query = "update general set deathnum=deathnum+1,rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opexp = 0; - - pushGenLog($oppose, $opplog); - pushBatLog($oppose, $oppbatlog); - pushBatRes($oppose, $oppbatres); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); - // 공격 장수 병사 소진이나 쌀 소진시 실패 처리 - } elseif($general[crew] <= 0 || $myRice <= round($general[crew]/100)) { - if($myRice <= round($general[crew]/100)) { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - $log[count($log)] = "●군량 부족으로 퇴각합니다."; - $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - } else { - $alllog[count($alllog)] = "●{$game[month]}월:$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - $log[count($log)] = "●퇴각했습니다."; - $opplog[count($opplog)] = "$general[name]의 ".getTypename($general[crewtype])."(이)가 퇴각했습니다."; - } - - // 경험치 상승 - if(floor($oppose[crewtype]/10) == 3) { // 귀병 - $oppose[intel2]++; - } elseif(floor($oppose[crewtype]/10) == 4) { // 차병 - $oppose[leader2]++; - } else { - $oppose[power2]++; - } - - $oppose[atmos] *= 1.1; //사기 증가 - if($oppose[atmos] > $_maximumatmos) { $oppose[atmos] = $_maximumatmos; } - - // 상대장수 경험 등등 증가 - $opexp = round($opexp / 50 * 0.8); - // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); - // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } - - $query = "update general set rice='$oppose[rice]',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='$oppose[atmos]',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set deathnum=deathnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $opexp = 0; - - $opplog = checkAbility($connect, $oppose, $opplog); - pushGenLog($oppose, $opplog); - pushBatLog($oppose, $oppbatlog); - pushBatRes($oppose, $oppbatres); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); -// $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 }$city[name] 공략에 실패했습니다. <1>$date"; -// $log[count($log)] = "$city[name] 공략에 실패했습니다. <1>$date"; - break; - } else { - // 무승부일때 로그 남김 - pushGenLog($oppose, $opplog); - pushBatLog($oppose, $oppbatlog); - pushBatRes($oppose, $oppbatres); - unset($opplog); - unset($oppbatlog); - unset($oppbatres); - } - } - } - - // 상대장수 경험 등등 증가(페이즈 초과시) - $opexp = round($opexp / 50 * 0.8); - // 성격 보정 - $opexp = CharExperience($opexp, $oppose[personal]); - // 쌀 소모 - $oppose[rice] -= ($opexp * 5 * getCrewtypeRice($game, $oppose[crewtype], $destnation[tech])); - if($oppose[rice] < 0) { $oppose[rice] = 0; } - - $query = "update general set rice='$oppose[rice]',experience=experience+'$opexp',dedication=dedication+'$opexp' where no='$oppose[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 경험치 상승 - if(floor($general[crewtype]/10) == 3) { // 귀병 - $general[intel2] += $exp2; - } elseif(floor($general[crewtype]/10) == 4) { // 차병 - $general[leader2] += $exp2; - } else { - $general[power2] += $exp2; - } - $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 공헌, 명성 상승 - $exp = round($exp / 50); - // 성격 보정 - $exp = CharExperience($exp, $general[personal]); - // 쌀 소모 - $general[rice] -= ($exp * 5 * getCrewtypeRice($game, $general[crewtype], $nation[tech])); - if($general[rice] < 0) { $general[rice] = 0; } - - $query = "update general set rice='$general[rice]',dedication=dedication+'$exp',experience=experience+'$exp' where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - $log = checkAbility($connect, $general, $log); - pushGenLog($general, $log); - pushBatLog($general, $batlog); - pushBatRes($general, $batres); - pushAllLog($alllog); - pushHistory($connect, $history); - - return $deadAmount; -} - -function CriticalRatio2($leader, $power, $intel) { - // 707010장수 9% 706515장수 17% 706020장수 25% xx50xx장수 57% - if($leader <= $power && $leader <= $intel) { // 통솔이 제일 낮은경우 - $ratio = sqrt($leader/($leader+$power+$intel))*150 - 30; - } elseif($power < $leader && $power <= $intel) { // 무력이 제일 낮은경우 - $ratio = sqrt($power /($leader+$power+$intel))*150 - 30; - } elseif($intel < $leader && $intel < $power) { // 지력이 제일 낮은경우 - $ratio = sqrt($intel /($leader+$power+$intel))*150 - 30; - } - - if($ratio > 50) $ratio = 50; - return $ratio; -} - -function CriticalScore2($score) { - $score = round($score * (rand()%8 + 13)/10); // 1.3~2.0 - return $score; -} - -//0 0 : 100 100 이면 최고 무한대 차이 -//30 30 : 100 100 이면 최고 3.3배 차이 -//60 60 : 100 100 이면 최고 1.6배 차이 -function getCrew($crew, $youatmos, $mytrain) { - $ratio = $youatmos / $mytrain; - $crew = $crew * $ratio; - - return $crew; -} - -function getCrewtypeRice($game, $crewtype, $tech) { - if(!$crewtype) { $crewtype = 0; } - $cost = $game["ric{$crewtype}"] / 10; - return $cost * getTechCost($tech); -} - -////////////////////////////////////////////////////////////// -// 표준 공 / 수 반환 수치는 약 0이 되게 (100~550) -////////////////////////////////////////////////////////////// - -function getAtt($game, $general, $tech, $lbonus) { - $att = getRate($game, $general[crewtype], "att") + getTechAbil($tech); - - if(floor($general[crewtype]/10) == 3) { // 귀병 지100% - $ratio = (floor($general[intel]*(100-$general[injury])/100)+getBookEff($general[book]))*2 - 40; - } elseif(floor($general[crewtype]/10) == 4) { // 차병 통100% - $ratio = (floor($general[leader]*(100-$general[injury])/100)+getHorseEff($general[horse])+$lbonus)*2 - 40; - } else { - $ratio = (floor($general[power]*(100-$general[injury])/100)+getWeapEff($general[weap]))*2 - 40; //10일때 -20, 70일때 100, 100일때 160 - } - if($ratio < 10) { $ratio = 10; } - if($ratio > 100) { $ratio = 50 + $ratio/2; } // 100보다 큰 경우는 상승률 1/2 - $att = $att * $ratio / 100; - - return $att; -} - -function getDef($game, $general, $tech) { - $def = getRate($game, $general[crewtype], "def") + getTechAbil($tech); - - $crew = ($general[crew] / (7000 / 30)) + 70; // 5000명일때 91점 7000명일때 100점 10000명일때 113점 - $def = $def * $crew / 100; - - return $def; -} - -function getCityAtt($city) { - $att = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; //50000일때 300점 100000일때 400점 - return $att; -} - -function getCityDef($city) { - $def = ($city[def]*0.1 + $city[wall]*0.9) / 500 + 200; - return $def; -} - -function getRate($game, $type, $dtype) { - $t = "{$dtype}{$type}"; - return $game[$t]; -} - -function addConflict($connect, $city, $nationnum, $mykillnum) { - $query = "select year,month from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); - $game = MYDB_fetch_array($result); - - if($city[conflict] == "") { - unset($nationlist); - unset($killnum); - } else { - $nationlist = explode("|", $city[conflict]); - $killnum = explode("|", $city[conflict2]); - } - - for($i=0; $i < count($nationlist); $i++) { - if($nationlist[$i] == $nationnum) break; - } - if($i != 0 && $i == count($nationlist)) { // 두번째 나라부터 분쟁 가담 메시지 출력 - $query = "select name from nation where nation='$nationnum'"; - $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁】$nation[name](이)가 $city[name] 공략에 가담하여 분쟁이 발생하고 있습니다."; - pushHistory($connect, $history); - } - - $nationlist[$i] = $nationnum; - if($i == 0 || $city[def] == 0) { // 선타, 막타 보너스 - $killnum[$i] += round($mykillnum * 1.05); - } else { - $killnum[$i] += $mykillnum; - } - $city[conflict] = implode("|", $nationlist); - $city[conflict2] = implode("|", $killnum); - - $query = "update city set conflict='$city[conflict]',conflict2='$city[conflict2]' where city='$city[city]'"; - MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); - - return $city; -} - -function DeleteConflict($connect, $nation) { - $query = "select city,conflict,conflict2 from city where conflict!=''"; - $result = MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); - $cityNum = MYDB_num_rows($result); - - $nation = "$nation"; - for($k=0; $k < $cityNum; $k++) { - $city = MYDB_fetch_array($result); - - if(strpos($city[conflict], $nation)) { - $nationlist = explode("|", $city[conflict]); - $killnum = explode("|", $city[conflict2]); - - $count = count($nationlist); - for($i=0; $i < $count; $i++) { - if($nationlist[$i] == $nation) { - unset($nationlist[$i]); - unset($killnum[$i]); - break; - } - } - $conflict = implode("|", $nationlist); - $conflict2 = implode("|", $killnum); - - $query = "update city set conflict='$conflict',conflict2='$conflict2' where city='$city[city]'"; - MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); - } - } -} - -function getConquerNation($connect, $city) { - $nationlist = explode("|", $city[conflict]); - $killnum = explode("|", $city[conflict2]); - - $max = 0; - for($i=0; $i < count($nationlist); $i++) { - if($max <= $killnum[$i]) { - $max = $killnum[$i]; - $index = $i; - } - } - return $nationlist[$index]; -} - -function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { - global $_armperphase, $_maximumatmos, $_basegold, $_baserice; - - if($destnation[nation] > 0) { - $destnationName = "$destnation[name]의"; - } else { - $destnationName = "공백지인"; - } - - $alllog[count($alllog)] = "●{$game[month]}월:$general[name](이)가 $city[name] 공략에 성공했습니다."; - $log[count($log)] = "$city[name] 공략에 성공했습니다."; - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【지배】$nation[name](이)가 $city[name](을)를 지배했습니다."; - $general = addHistory($connect, $general, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 함락시킴"); - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$general[name](이)가 {$destnationName} $city[name](을)를 점령"); - $destnation = addNationHistory($connect, $destnation, "●{$game[year]}년 {$game[month]}월:$nation[name]$general[name]에 의해 $city[name](이)가 함락"); - - $query = "select city from city where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - // 국가 멸망시 - if($citycount == 1 && $city[nation] != 0) { - $query = "select nation,name,history,tech,type from nation where nation='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - $query = "select nation,name,gold,rice from nation where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $losenation = MYDB_fetch_array($result); - - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【멸망】$losenation[name](이)가 멸망하였습니다."; - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$losenation[name](을)를 정복"); - - $query = "select no from general where nation='$general[nation]' and level='12'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $ruler = MYDB_fetch_array($result); - - //다굴치는 나라들 전방설정을 위해 미리 얻어옴 - $query = "select you from diplomacy where me='$losenation[nation]' and state<2"; - $dipResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dipCount = MYDB_num_rows($dipResult); - - $loseGeneralGold = 0; - $loseGeneralRice = 0; - //멸망국 장수들 역사 기록 및 로그 전달 - $query = "select no,name,nation,npc,gold,rice,history,msgindex from general where nation='$city[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation[name](이)가 멸망했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - - $loseGold = floor($gen[gold] * (rand()%30+20)/100.0); - $loseRice = floor($gen[rice] * (rand()%30+20)/100.0); - $genlog[1] = "●도주하며 금$loseGold 쌀$loseRice을 분실했습니다."; - - $query = "update general set gold=gold-{$loseGold},rice=rice-{$loseRice} where no={$gen[no]}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - pushGenLog($gen, $genlog); - - $gen = addHistory($connect, $gen, "●{$game[year]}년 {$game[month]}월:$losenation[name](이)가 멸망"); - - $loseGeneralGold += $loseGold; - $loseGeneralRice += $loseRice; - - //모두 등용장 발부 - if($nation[name] == "강족" || $nation[name] == "저족" || $nation[name] == "흉노족" - || $nation[name] == "남만족" || $nation[name] == "산월족" || $nation[name] == "오환족" - || $nation[name] == "왜족") { - //등용장 미발부 - } elseif(rand() % 100 < 50) { - ScoutMsg($connect, $ruler[no], $nation[name], $gen[no], $gen[msgindex]); - } - - //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) - if($gen[npc] >= 2 && $gen[npc] <= 4 && rand() % 100 < 10) { - $commissionCommand = EncodeCommand(0, 0, $nation[nation], 25); //임관 - $query = "update general set turn0='$commissionCommand' where no={$gen[no]}"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - unset($genlog[1]); - - // 승전국 보상 - $losenation[gold] -= $_basegold; - $losenation[rice] -= $_baserice; - if($losenation[gold] < 0) { $losenation[gold] = 0; } - if($losenation[rice] < 0) { $losenation[rice] = 0; } - - $losenation[gold] += $loseGeneralGold; - $losenation[rice] += $loseGeneralRice; - - $losenation[gold] = floor($losenation[gold] / 2); - $losenation[rice] = floor($losenation[gold] / 2); - - // 기본량 제외 금쌀50% + 장수들 분실 금쌀50% 흡수 - $query = "update nation set gold=gold+'$losenation[gold]',rice=rice+'$losenation[rice]' where nation='$general[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$general[nation]' and level>='9'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "$losenation[name] 정복으로 금$losenation[gold] 쌀$losenation[rice]을 획득했습니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - } - - //분쟁기록 모두 지움 - DeleteConflict($connect, $city[nation]); - // 전 장수 공헌 명성치 깎음 - $query = "update general set dedication=dedication*0.5,experience=experience*0.9 where nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 전 도시 공백지로 - $query = "update city set nation='0',gen1='0',gen2='0',gen3='0',conflict='',conflict2='',term=0 where nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 전 장수 소속 무소속으로, 재야로, 부대 탈퇴 - $query = "update general set nation='0',belong='0',level='0',troop='0' where nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 부대도 삭제 - $query = "delete from troop where nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 외교 삭제 - $query = "delete from diplomacy where me='$city[nation]' or you='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 국가 삭제 - $query = "delete from nation where nation='$city[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - // 아까 얻어온 다굴국들 전방설정 - for($i=0; $i < $dipCount; $i++) { - $dip = MYDB_fetch_array($dipResult); - //전방설정 - SetNationFront($connect, $dip[you]); - } - // 멸망이 아니면 - } else { - // 태수,군사,시중은 일반으로... - $query = "update general set level='1' where no='$city[gen1]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1' where no='$city[gen2]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1' where no='$city[gen3]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //수도였으면 긴급 천도 - if($destnation[capital] == $city[city]) { - $dist = distance($connect, $city[city]); - - $query = "select city,name,pop from city where nation='$destnation[nation]' and city!='$city[city]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityCount = MYDB_num_rows($result); - $minDist = 99; $minCity = 0; $minCityPop = 0; - for($i=0; $i < $cityCount; $i++) { - $nextCap = MYDB_fetch_array($result); - if($minDist > $dist[$nextCap[city]]) { - $minDist = $dist[$nextCap[city]]; - $minCity = $nextCap[city]; - $minCityPop = $nextCap[pop]; - $minCityName = $nextCap[name]; - } elseif($minDist == $dist[$nextCap[city]] && $minCityPop < $nextCap[pop]) { - $minDist = $dist[$nextCap[city]]; - $minCity = $nextCap[city]; - $minCityPop = $nextCap[pop]; - $minCityName = $nextCap[name]; - } - } - - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【긴급천도】$destnation[name](이)가 수도가 함락되어 $minCityName으로 긴급천도하였습니다."; - - //아국 수뇌부에게 로그 전달 - $query = "select no,name,nation from general where nation='$destnation[nation]' and level>='5'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - $genlog[0] = "●수도가 함락되어 $minCityName으로 긴급천도합니다."; - for($i=0; $i < $gencount; $i++) { - $gen = MYDB_fetch_array($result); - pushGenLog($gen, $genlog); - } - //천도 - $query = "update nation set capital='$minCity',gold=gold*0.5,rice=rice*0.5 where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //보급도시로 만듬 - $query = "update city set supply=1 where city='$minCity'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //수뇌부 이동 - $query = "update general set city='$minCity' where nation='$destnation[nation]' and level>='5'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //장수 사기 감소 - $query = "update general set atmos=atmos*0.8 where nation='$destnation[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - - $general[atmos] *= 1.1; //사기 증가 - if($general[atmos] > $_maximumatmos) { $general[atmos] = $_maximumatmos; } - - $conquerNation = getConquerNation($connect, $city); - - if($conquerNation == $general[nation]) { - // 이동 및 사기 변경 - $query = "update general set city='$city[city]',atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($city[level] > 3) { - // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$general[nation]',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //전방설정 - SetNationFront($connect, $nation[nation]); - SetNationFront($connect, $destnation[nation]); - } else { - $query = "select name,nation,history from nation where nation='$conquerNation'"; - $conquerResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $conquerNationArray = MYDB_fetch_array($conquerResult); - - $history[count($history)] = "●{$game[year]}년 {$game[month]}월:【분쟁협상】$conquerNationArray[name](이)가 영토분쟁에서 우위를 점하여 $city[name](을)를 양도받았습니다."; - $nation = addNationHistory($connect, $nation, "●{$game[year]}년 {$game[month]}월:$city[name](을)를 $conquerNationArray[name]양도"); - $conquerNationArray = addNationHistory($connect, $conquerNationArray, "●{$game[year]}년 {$game[month]}월:$nation[name]에서 $city[name](을)를 양도 받음"); - // 이동X 및 사기 변경 - $query = "update general set atmos='$general[atmos]',killnum=killnum+1 where no='$general[no]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($city[level] > 3) { - // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=1000,wall=1000,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - // 도시 소속 변경, 태수,군사,시중 초기화 - $query = "update city set supply=1,conflict='',term=0,conflict2='',agri=agri*0.7,comm=comm*0.7,secu=secu*0.7,def=def2/2,wall=wall2/2,nation='$conquerNation',gen1=0,gen2=0,gen3=0 where city='$city[city]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - //전방설정 - SetNationFront($connect, $destnation[nation]); - SetNationFront($connect, $conquerNation); - } - - pushGenLog($general, $log); - pushAllLog($alllog); - pushHistory($connect, $history); -} - diff --git a/che/processing.php b/che/processing.php deleted file mode 100644 index 49788cdd..00000000 --- a/che/processing.php +++ /dev/null @@ -1,3127 +0,0 @@ -= 0 || $turn[$i] <= 23) { - } else { - unset($turn); - $turn[0] = 100; - break; - } -} - -if($turn[0] == 100) { - unset($turn); - for($i=0; $i < 24; $i++) $turn[$i] = $i; -} elseif($turn[0] == 99) { - unset($turn); - for($i=0, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; -} elseif($turn[0] == 98) { - unset($turn); - for($i=1, $j=0; $i < 24; $i+=2, $j++) $turn[$j] = $i; -} - -switch($commandtype) { - case 0: command_Single($connect, $turn, 0); break; //휴식 - case 1: command_Single($connect, $turn, 1); break; //농업 - case 2: command_Single($connect, $turn, 2); break; //상업 - case 3: command_Single($connect, $turn, 3); break; //기술 - case 4: command_Single($connect, $turn, 4); break; //선정 - case 5: command_Single($connect, $turn, 5); break; //수비 - case 6: command_Single($connect, $turn, 6); break; //성벽 - case 7: command_Single($connect, $turn, 7); break; //정착 장려 - case 8: command_Single($connect, $turn, 8); break; //치안 강화 - case 9: command_Single($connect, $turn, 9); break; //자금 조달 - - case 11: command_11($connect, $turn, 11); break; //징병 - case 12: command_12($connect, $turn, 12); break; //모병 - case 13: command_Single($connect, $turn, 13); break; //훈련 - case 14: command_Single($connect, $turn, 14); break; //사기진작 - case 15: command_Single($connect, $turn, 0); break; //전투태세 - case 16: command_16($connect, $turn, 16); break; //전쟁 - case 17: command_Single($connect, $turn, 17); break; //소집해제 - - case 21: command_21($connect, $turn, 21); break; //이동 - case 22: command_22($connect, $turn, 22); break; //등용 - case 23: command_23($connect, $turn, 23); break; //포상 - case 24: command_24($connect, $turn, 24); break; //몰수 - case 25: command_25($connect, $turn, 25); break; //임관 - case 26: command_Single($connect, $turn, 26); break; //집합 - case 27: command_27($connect, $turn, 27); break; //발령 - case 28: command_Single($connect, $turn, 28); break; //귀환 - case 29: command_Single($connect, $turn, 29); break; //인재탐색 - case 30: command_30($connect, $turn, 30); break; //강행 - - case 31: command_31($connect, $turn, 31); break; //첩보 - case 32: command_32($connect, $turn, 32); break; //화계 - case 33: command_33($connect, $turn, 33); break; //탈취 - case 34: command_34($connect, $turn, 34); break; //파괴 - case 35: command_35($connect, $turn, 35); break; //선동 - case 36: command_36($connect, $turn, 36); break; //기습 - - case 41: command_Single($connect, $turn, 41); break; //단련 - case 42: command_Single($connect, $turn, 42); break; //견문 - case 43: command_43($connect, $turn, 43); break; //증여 - case 44: command_44($connect, $turn, 44); break; //헌납 - case 45: command_Single($connect, $turn, 45); break; //하야 - case 46: command_46($connect, $turn, 46); break; //건국 - case 47: command_Single($connect, $turn, 47); break; //방랑 - case 48: command_48($connect, $turn, 48); break; //장비구입 - case 49: command_49($connect, $turn, 49); break; //군량매매 - case 50: command_Single($connect, $turn, 50); break; //요양 - - case 51: command_51($connect, $turn, 51); break; //항복권고 - case 52: command_52($connect, $turn, 52); break; //원조 - case 53: command_53($connect, $turn, 53); break; //통합제의 - case 54: command_54($connect, $turn, 54); break; //선양 - case 55: command_Single($connect, $turn, 55); break; //거병 - case 56: command_Single($connect, $turn, 56); break; //해산 - case 57: command_Single($connect, $turn, 57); break; //모반 시도 - - case 61: command_61($connect, $turn, 61); break; //불가침 - case 62: command_62($connect, $turn, 62); break; //선포 - case 63: command_63($connect, $turn, 63); break; //종전 - case 64: command_64($connect, $turn, 64); break; //파기 - case 65: command_65($connect, $turn, 65); break; //초토화 - case 66: command_66($connect, $turn, 66); break; //천도 - case 67: command_67($connect, $turn, 67); break; //증축 - case 68: command_68($connect, $turn, 68); break; //감축 - case 71: command_Chief($connect, $turn, 71); break; //필사즉생 - case 72: command_72($connect, $turn, 72); break; //백성동원 - case 73: command_73($connect, $turn, 73); break; //수몰 - case 74: command_74($connect, $turn, 74); break; //허보 - case 75: command_75($connect, $turn, 75); break; //피장파장 - case 76: command_Chief($connect, $turn, 76); break; //의병모집 - case 77: command_77($connect, $turn, 77); break; //이호경식 - case 78: command_78($connect, $turn, 78); break; //급습 - case 81: command_81($connect, $turn, 81); break; //국기변경 - case 99: command_99($connect, $turn); break; //수뇌부 휴식 -} - -function starter($name, $type=0) { - global $_basecolor2, $_basecolor4; - global $images; - echo " - - -$name - - -"; -require('analytics.php'); -echo " - - - - - -
$name
-"; - if($type == 1) CoreBackButton(); - else backButton(); -} - -function ender($type=0) { - if($type == 1) CoreBackButton(); - else backButton(); - banner(); - echo " -
"; - - PrintElapsedTime(); - - echo " - - -"; -} - -function command_99($connect, $turn) { - $query = "select nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - if($me[level] >= 5) { - $command = EncodeCommand(0, 0, 0, 99); - - for($i=0; $i < sizeof($turn); $i++) { - $query = "update nation set l{$me[level]}turn{$turn[$i]}='{$command}' where nation='$me[nation]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } - } - echo ""; -} - -function GetExplain() { - $explain[0] = "표준적인 보병입니다.
보병은 방어특화입니다."; - $explain[1] = "저렴하고 튼튼합니다.
중원지역 소유시 가능."; - $explain[2] = "저렴하고 강력합니다.
오월지역 소유시 가능."; - $explain[3] = "은밀하고 날쌥니다.
저 소유시 가능."; - $explain[4] = "최강의 보병입니다.
낙양 소유시 가능."; - $explain[5] = "등갑을 두른 보병입니다.
남중지역 소유시 가능."; - - $explain[10] = "표준적인 궁병입니다.
궁병은 회피특화입니다."; - $explain[11] = "말을 타고 잘 피합니다.
동이지역 소유시 가능."; - $explain[12] = "화살을 연사합니다.
서촉지역 소유시 가능."; - $explain[13] = "강건한 궁병입니다.
양양 소유시 가능."; - $explain[14] = "강력한 화살을 쏩니다.
건업 소유시 가능."; - - $explain[20] = "표준적인 기병입니다.
기병은 공격특화입니다."; - $explain[21] = "백마의 위용을 보여줍니다.
하북지역 소유시 가능."; - $explain[22] = "갑주를 두른 기병입니다.
서북지역 소유시 가능."; - $explain[23] = "저돌적으로 공격합니다.
흉노 소유시 가능."; - $explain[24] = "철갑을 두른 기병입니다.
강 소유시 가능."; - $explain[25] = "날쎄고 빠른 기병입니다.
산월 소유시 가능."; - $explain[26] = "어느 누구보다 강력합니다.
남만 소유시 가능."; - $explain[27] = "정예 기병입니다.
허창 소유시 가능."; - - $explain[30] = "계략을 사용하는 병종입니다.
귀병은 계략특화입니다."; - $explain[31] = "신출귀몰한 귀병입니다.
초지역 소유시 가능."; - $explain[32] = "저렴하고 튼튼합니다.
오환 소유시 가능."; - $explain[33] = "저렴하고 강력합니다.
왜 소유시 가능."; - $explain[34] = "백병전에도 능숙합니다.
장안 소유시 가능."; - $explain[35] = "전투를 포기하고 계략에 몰두합니다.
귀병은 계략특화입니다."; - $explain[36] = "고도로 훈련된 귀병입니다.
낙양 소유시 가능."; - $explain[37] = "갑주를 두른 귀병입니다.
성도 소유시 가능."; - $explain[38] = "날카로운 무기를 가진 귀병입니다.
업 소유시 가능."; - - $explain[40] = "높은 구조물 위에서 공격합니다.
차병은 공성특화입니다."; - $explain[41] = "엄청난 위력으로 성벽을 부수어버립니다.
차병은 공성특화입니다."; - $explain[42] = "상대에게 돌덩이를 날립니다.
업 소유시 가능."; - $explain[43] = "상대를 저지하는 특수병기입니다.
성도 소유시 가능."; - - return $explain; -} - -function command_11($connect, $turn, $command) { - global $_basecolor, $_basecolor2, $images, $image; - starter("징병"); - $query = "select * from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - //현재 도시 - $query = "select city,region from city where city='$me[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $curCity = MYDB_fetch_array($result); - - $query = "select level,tech from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($me[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($me[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - $explain = GetExplain(); - - if($admin[year] < $admin[startyear]+3) { - //그 국가에서 그 병종 가능한지 - $valid[0] = 1; $color[0] = $_basecolor2; - $valid[10] = 1; $color[10] = $_basecolor2; - $valid[20] = 1; $color[20] = $_basecolor2; - $valid[30] = 1; $color[30] = $_basecolor2; - $valid[40] = 1; $color[40] = "red"; // 정란 - $valid[41] = 1; $color[41] = "red"; // 충차 - } else { - // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($result); - // 기술 1000 이상부터 지역병 - if($nation[tech] >= 1000) { - $myregion[$city[region]] = 1; - } - // 기술 2000 이상부터 이민족병 - if($city[level] == 4 && $nation[tech] >= 2000) { - $mycity[$city[city]] = 1; - } - // 기술 3000 이상부터 특수병 - if($city[level] == 8 && $nation[tech] >= 3000) { - $mycity[$city[city]] = 1; - } - } - - //그 국가에서 그 병종 가능한지 - $valid[0] = 1; $color[0] = $_basecolor2; - $valid[1] = $myregion[2]; $color[1] = "limegreen"; // 청주병(중원) - $valid[2] = $myregion[7]; $color[2] = "limegreen"; // 수병(오월) - $valid[3] = $mycity[64]; $color[3] = "limegreen"; // 자객병(저) - $valid[4] = $mycity[3]; $color[4] = "limegreen"; // 근위병(낙양) - $valid[5] = $myregion[5]; $color[5] = "limegreen"; // 등갑병(남중) - $valid[10] = 1; $color[10] = $_basecolor2; - $valid[11] = $myregion[8]; $color[11] = "limegreen"; // 궁기병(동이) - $valid[12] = $myregion[4]; $color[12] = "limegreen"; // 연노병(서촉) - $valid[13] = $mycity[6]; $color[13] = "limegreen"; // 강궁병(양양) - $valid[14] = $mycity[7]; $color[14] = "limegreen"; // 석궁병(건업) - $valid[20] = 1; $color[20] = $_basecolor2; - $valid[21] = $myregion[1]; $color[21] = "limegreen"; // 백마병(하북) - $valid[22] = $myregion[3]; $color[22] = "limegreen"; // 중장기병(서북) - $valid[23] = $mycity[65]; $color[23] = "limegreen"; // 돌격기병(흉노) - $valid[24] = $mycity[63]; $color[24] = "limegreen"; // 철기병(강) - $valid[25] = $mycity[67]; $color[25] = "limegreen"; // 수렵기병(산월) - $valid[26] = $mycity[66]; $color[26] = "limegreen"; // 맹수병(남만) - $valid[27] = $mycity[2]; $color[27] = "limegreen"; // 호표기병(허창) - $valid[30] = 1; $color[30] = $_basecolor2; - $valid[31] = $myregion[6]; $color[31] = "limegreen"; // 신귀병(초) - $valid[32] = $mycity[68]; $color[32] = "limegreen"; // 백귀병(오환) - $valid[33] = $mycity[69]; $color[33] = "limegreen"; // 흑귀병(왜) - $valid[34] = $mycity[4]; $color[34] = "limegreen"; // 악귀병(장안) - $valid[35] = 1; $color[35] = $_basecolor2;// 남귀병 - $valid[36] = $mycity[3]; $color[36] = "limegreen"; // 황귀병(낙양) - $valid[37] = $mycity[5]; $color[37] = "limegreen"; // 천귀병(성도) - $valid[38] = $mycity[1]; $color[38] = "limegreen"; // 마귀병(업) - $valid[40] = 1; $color[40] = $_basecolor2;// 정란 - $valid[41] = 1; $color[41] = $_basecolor2;// 충차 - $valid[42] = $mycity[1]; $color[42] = "limegreen"; // 벽력거(업) - $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) - - // 남귀병은 기술1등급부터 - if($nation[tech] < 1000) { - $valid[35] = 0; - } - // 충차는 기술1등급부터 - if($nation[tech] < 1000) { - $valid[41] = 0; - } - } - - $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; - $crew = $leader - round($me[crew]/100); - $abil = getTechAbil($nation[tech]); - $cost = getTechCost($nation[tech]); - echo " -병사를 모집합니다. 훈련과 사기치는 낮지만 가격이 저렴합니다.
-가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
-이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
-현재 징병 가능한 병종은 녹색으로 표시되며,
-현재 징병 가능한 특수병종은 초록색으로 표시됩니다.
- - - - - - - - - - - - - - - - - "; - - echo " - "; - - for($i=0; $i <= 5; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 보병, 징병 - if($me[special2] == 50) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=10; $i <= 14; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 궁병, 징병 - if($me[special2] == 51) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=20; $i <= 27; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 기병, 징병 - if($me[special2] == 52) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=30; $i <= 38; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 귀병, 징병 - if($me[special2] == 40) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=40; $i <= 43; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 공성, 징병 - if($me[special2] == 53) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " -
- 현재 기술력 : - 현재 통솔 : - 현재 병종 : - 현재 병사 : - 현재 자금 : -
사진병종공격방어기동회피군량가격병사수특징
보병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
궁병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
기병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
귀병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
차 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
"; - - ender(); -} - -function command_12($connect, $turn, $command) { - global $_basecolor, $_basecolor2, $images, $image; - starter("모병"); - $query = "select * from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - //현재 도시 - $query = "select city,region from city where city='$me[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $curCity = MYDB_fetch_array($result); - - $query = "select level,tech from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("process53 ".MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($me[level] == 12) { - $lbonus = $nation[level] * 2; - } elseif($me[level] >= 5) { - $lbonus = $nation[level]; - } else { - $lbonus = 0; - } - - $explain = GetExplain(); - - if($admin[year] < $admin[startyear]+3) { - //그 국가에서 그 병종 가능한지 - $valid[0] = 1; $color[0] = $_basecolor2; - $valid[10] = 1; $color[10] = $_basecolor2; - $valid[20] = 1; $color[20] = $_basecolor2; - $valid[30] = 1; $color[30] = $_basecolor2; - $valid[40] = 1; $color[40] = "red"; // 정란 - $valid[41] = 1; $color[41] = "red"; // 충차 - } else { - // 아국 도시 구분 - $query = "select city,level,region from city where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $citycount = MYDB_num_rows($result); - - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($result); - // 기술 1000 이상부터 지역병 - if($nation[tech] >= 1000) { - $myregion[$city[region]] = 1; - } - // 기술 2000 이상부터 이민족병 - if($city[level] == 4 && $nation[tech] >= 2000) { - $mycity[$city[city]] = 1; - } - // 기술 3000 이상부터 특수병 - if($city[level] == 8 && $nation[tech] >= 3000) { - $mycity[$city[city]] = 1; - } - } - - //그 국가에서 그 병종 가능한지 - $valid[0] = 1; $color[0] = $_basecolor2; - $valid[1] = $myregion[2]; $color[1] = "limegreen"; // 청주병(중원) - $valid[2] = $myregion[7]; $color[2] = "limegreen"; // 수병(오월) - $valid[3] = $mycity[64]; $color[3] = "limegreen"; // 자객병(저) - $valid[4] = $mycity[3]; $color[4] = "limegreen"; // 근위병(낙양) - $valid[5] = $myregion[5]; $color[5] = "limegreen"; // 등갑병(남중) - $valid[10] = 1; $color[10] = $_basecolor2; - $valid[11] = $myregion[8]; $color[11] = "limegreen"; // 궁기병(동이) - $valid[12] = $myregion[4]; $color[12] = "limegreen"; // 연노병(서촉) - $valid[13] = $mycity[6]; $color[13] = "limegreen"; // 강궁병(양양) - $valid[14] = $mycity[7]; $color[14] = "limegreen"; // 석궁병(건업) - $valid[20] = 1; $color[20] = $_basecolor2; - $valid[21] = $myregion[1]; $color[21] = "limegreen"; // 백마병(하북) - $valid[22] = $myregion[3]; $color[22] = "limegreen"; // 중장기병(서북) - $valid[23] = $mycity[65]; $color[23] = "limegreen"; // 돌격기병(흉노) - $valid[24] = $mycity[63]; $color[24] = "limegreen"; // 철기병(강) - $valid[25] = $mycity[67]; $color[25] = "limegreen"; // 수렵기병(산월) - $valid[26] = $mycity[66]; $color[26] = "limegreen"; // 맹수병(남만) - $valid[27] = $mycity[2]; $color[27] = "limegreen"; // 호표기병(허창) - $valid[30] = 1; $color[30] = $_basecolor2; - $valid[31] = $myregion[6]; $color[31] = "limegreen"; // 신귀병(초) - $valid[32] = $mycity[68]; $color[32] = "limegreen"; // 백귀병(오환) - $valid[33] = $mycity[69]; $color[33] = "limegreen"; // 흑귀병(왜) - $valid[34] = $mycity[4]; $color[34] = "limegreen"; // 악귀병(장안) - $valid[35] = 1; $color[35] = $_basecolor2;// 남귀병 - $valid[36] = $mycity[3]; $color[36] = "limegreen"; // 황귀병(낙양) - $valid[37] = $mycity[5]; $color[37] = "limegreen"; // 천귀병(성도) - $valid[38] = $mycity[1]; $color[38] = "limegreen"; // 마귀병(업) - $valid[40] = 1; $color[40] = $_basecolor2;// 정란 - $valid[41] = 1; $color[41] = $_basecolor2;// 충차 - $valid[42] = $mycity[1]; $color[42] = "limegreen"; // 벽력거(업) - $valid[43] = $mycity[5]; $color[43] = "limegreen"; // 목우(성도) - - // 남귀병은 기술1등급부터 - if($nation[tech] < 1000) { - $valid[35] = 0; - } - // 충차는 기술1등급부터 - if($nation[tech] < 1000) { - $valid[41] = 0; - } - } - - $leader = floor($me[leader] * (100 - $me[injury])/100) + getHorseEff($me[horse]) + $lbonus; - $crew = $leader - round($me[crew]/100); - $abil = getTechAbil($nation[tech]); - $cost = getTechCost($nation[tech]); - echo " -병사를 모집합니다. 훈련과 사기치는 높지만 자금이 많이 듭니다.
-가능한 수보다 많게 입력하면 가능한 최대 병사를 모집합니다.
-이미 병사가 있는 경우 추가징병되며, 병종이 다를경우는 기존의 병사는 소집해제됩니다.
-현재 모병 가능한 병종은 녹색으로 표시되며,
-현재 모병 가능한 특수병종은 초록색으로 표시됩니다.
- - - - - - - - - - - - - - - - - - "; - - echo " - "; - - for($i=0; $i <= 5; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 보병, 징병 - if($me[special2] == 50) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=10; $i <= 14; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 궁병, 징병 - if($me[special2] == 51) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=20; $i <= 27; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 기병, 징병 - if($me[special2] == 52) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=30; $i <= 38; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 귀병, 징병 - if($me[special2] == 40) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " - "; - - for($i=40; $i <= 43; $i++) { - if($valid[$i] == 1) { - $ric = $admin["ric{$i}"] * $cost; - $cst = $admin["cst{$i}"] * $cost; - //성격 보정 - $cst = CharCost($cst, $me[personal]); - //특기 보정 : 공성, 징병 - if($me[special2] == 53) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } - $att = $admin["att{$i}"] + $abil; - $def = $admin["def{$i}"] + $abil; - $spd = $admin["spd{$i}"]; - $avd = $admin["avd{$i}"]; - $ric = round($ric); - $cst = round($cst); - $l = $color[$i]; - $weapImage = "{$images}/weap{$i}.jpg"; - if($admin[img] < 2) { $weapImage = "{$image}/default.jpg"; } - echo " - - - - - - - - - - - - - - "; - } - } - - echo " -
모병은 가격 2배의 자금이 소요됩니다.
- 현재 기술력 : - 현재 통솔 : - 현재 병종 : - 현재 병사 : - 현재 자금 : -
사진병종공격방어기동회피군량가격병사수특징
보병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
궁병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
기병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
귀병 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
차 계열
".getTypename($i)."{$att}{$def}{$spd}{$avd}{$ric}{$cst}
- 00명
- - - "; - - for($j=0; $j < sizeof($turn); $j++) { - echo " - "; - } - echo " -
$explain[$i]
"; - - ender(); -} - -function command_15($connect, $turn, $command) { - starter("재편성"); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - $me = $general[no]; - - $query = "select no,name from general where nation='$general[nation]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -자신의 병사를 다른 장수에게 보냅니다. -
- -00명 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_16($connect, $turn, $command) { - starter("출병"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시로 침공을 합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - - ender(); -} - -function command_21($connect, $turn, $command) { - starter("이동"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시로 이동합니다.
-인접 도시로만 이동이 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - - ender(); -} - -function command_22($connect, $turn, $command) { - starter("등용"); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -재야나 타국의 장수를 등용합니다.
-서신은 개인 메세지로 전달됩니다.
-등용할 장수를 목록에서 선택하세요.
-
- - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(); -} - -function command_23($connect, $turn, $command) { - starter("포상", 1); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -국고로 장수에게 자금이나 군량을 지급합니다.
-
- - - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(1); -} - -function command_24($connect, $turn, $command) { - starter("몰수", 1); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -장수의 자금이나 군량을 몰수합니다.
-몰수한것은 국가재산으로 귀속됩니다.
-
- - - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(1); -} - -function command_25($connect, $turn, $command) { - global $_basecolor2, $_basecolor4, $images; - - starter("임관"); - - $query = "select startyear,year from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $query = "select no,nations from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,name,color,scout,scoutmsg,tricklimit,gennum from nation order by gennum"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - echo " -국가에 임관합니다.
-이미 임관/등용되었던 국가는 다시 임관할 수 없습니다.
-바로 군주의 위치로 이동합니다.
-임관할 국가를 목록에서 선택하세요.
-!!!는 방랑군을 포함한 랜덤임관입니다. 유니크를 기대하신다면!
-???는 방랑군을 제외한 랜덤임관입니다. 유니크 혜택은 없습니다.
-임관 금지이거나 초기 제한중인 국가는 붉은색 배경으로 표시됩니다.
-900px x 200px 넘는 높이를 점유할 시 통보없이 제한될 수 있습니다.
-
- - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
- - -{$scoutStr} -
임관 권유 메세지
"; - - ender(); -} - -function command_27($connect, $turn, $command) { - starter("발령", 1); - - $query = "select no,nation,level from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select no,name,level,npc from general where nation='$me[nation]' and no!='$me[no]' order by npc,binary(name)"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -
-선택된 도시로 아국 장수를 발령합니다.
-아국 도시로만 발령이 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(1); -} - -function command_30($connect, $turn, $command) { - starter("강행"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시로 강행합니다.
-최대 3칸내 도시로만 강행이 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " -"; -} - -echo " -
-"; - -printCitysName($connect, $currentcity[city], 1); -printCitysName($connect, $currentcity[city], 2); -printCitysName($connect, $currentcity[city], 3); - -ender(); -} - -function command_31($connect, $turn, $command) { - starter("첩보"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 첩보를 실행합니다.
-인접도시일 경우 많은 정보를 얻을 수 있습니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - echo " -모든 도시가 가능하지만 많은 정보를 얻을 수 있는
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_32($connect, $turn, $command) { - starter("화계"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 화계를 실행합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_33($connect, $turn, $command) { - starter("탈취"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 탈취를 실행합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_34($connect, $turn, $command) { - starter("파괴"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 파괴를 실행합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_35($connect, $turn, $command) { - starter("선동"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 선동을 실행합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_36($connect, $turn, $command) { - starter("기습"); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select city,name from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - - echo " -
-선택된 도시에 기습을 실행합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
-$currentcity[name] => - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - printCitysName($connect, $currentcity[city], 1); - printCitysName($connect, $currentcity[city], 2); - - ender(); -} - -function command_43($connect, $turn, $command) { - starter("증여"); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select no,name,level,npc from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -자신의 자금이나 군량을 다른 장수에게 증여합니다.
-장수를 선택하세요.
-
- - - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_44($connect, $turn, $command) { - starter("헌납"); - - echo " -자신의 자금이나 군량을 국가 재산으로 헌납합니다.
-
- - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_46($connect, $turn, $command) { - starter("건국"); - - $query = "select maxnation from game where no='1'"; - $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - $color = GetNationColors(); - - $query = "select color from nation where level>0"; - $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - for($i=0; $i < $nationcount; $i++) { - $nation = MYDB_fetch_array($result); - $nationcolor[$i] = $nation[color]; - } - $validCount = count($color); - //등록된 색깔 가려내기 - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - for($j=0; $j < $nationcount; $j++) { - if($color[$i] == $nationcolor[$j]) { - $valid[$i] = 0; - $validCount--; - } - } - } - //색깔이 다 쓰였으면 그냥 모두 허용 - if($validCount <= 0) { - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - } - } - - if($nationcount < $admin[maxnation]) { - echo " -현재 도시에서 나라를 세웁니다. 중, 소도시에서만 가능합니다.
- -- 법 가 : 금수입↑ 치안↑ 인구↓ 민심↓
-- 유 가 : 내정↑ 민심↑ 쌀수입↓
-- 병 가 : 기술↑ 수성↑ 인구↓ 민심↓
-- 덕 가 : 치안↑인구↑ 민심↑ 쌀수입↓ 수성↓
-- 묵 가 : 수성↑ 기술↓
-- 도 가 : 인구↑ 기술↓ 치안↓
-- 태 평 도 : 인구↑ 민심↑ 기술↓ 수성↓
-- 오 두 미 도 : 쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓
-- 도 적 : 계략↑ 금수입↓ 치안↓ 민심↓
-- 불 가 : 민심↑ 수성↑ 금수입↓
-- 종 횡 가 : 전략↑ 수성↑ 금수입↓ 내정↓
-- 음 양 가 : 내정↑ 인구↑ 기술↓ 전략↓
-- 명 가 : 기술↑ 인구↑ 쌀수입↓ 수성↓
- -
-국명 : -색깔 : -성향 : - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " -"; - } - - echo " -
"; - } else { - echo " -더 이상 건국은 불가능합니다.
"; - } - ender(); -} - -function command_48($connect, $turn, $command) { - starter("장비 매매"); - - $query = "select no,city,gold from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("command_48 ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - $city = getCity($connect, $me[city], "secu"); - - for($i=1; $i <= 6; $i++) { - if($city[secu] >= $i*1000) { - $color[$i] = "white"; - } else { - $color[$i] = "red"; - } - } - - echo " -장비를 구입하거나 매각합니다.
-현재 구입 불가능한 것은 붉은색으로 표시됩니다.
-현재 도시 치안 : $city[secu]    현재 자금 : $me[gold]
-
-장비 : - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_49($connect, $turn, $command) { - starter("군량매매"); - - echo " -자신의 군량을 사거나 팝니다.
-
- - - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_51($connect, $turn, $command) { - starter("항복 권고", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,power from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $myNation = MYDB_fetch_array($result); - - echo " -타국에게 항복을 권고합니다.
-서신은 개인 메세지로 전달됩니다.
-권고할 국가를 목록에서 선택하세요.
-합병이 불가능한 국가는 붉은 배경으로 표시됩니다.
-
- - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-제한 조건
-- 인접 국가
-- 양국 모두 외교제한 기간 없음
-- 제의한 국가가 항복하는 국가보다 국력 3배 초과
-"; - ender(1); -} - -function command_52($connect, $turn, $command) { - starter("원조", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,level from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $mynation = MYDB_fetch_array($result); - - echo " -타국에게 원조합니다.
-작위별로 금액 제한이 있습니다.
- 호족: 1만
- 군벌: 2만
-주자사: 3만
- 주목: 4만
-  공: 5만
-  왕: 6만
- 황제: 7만
-원조할 국가를 목록에서 선택하세요.
-
- 대상 국가 -국고 -병량 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_53($connect, $turn, $command) { - starter("통합제의", 1); - - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select round(avg(power)) as power,round(avg(gennum)) as gennum from nation where level>=1"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $avgNation = MYDB_fetch_array($result); - - $query = "select round(std(power)) as power,round(std(gennum)) as gennum from nation where level>=1"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $stdNation = MYDB_fetch_array($result); - - $query = "select nation,power,gennum from nation where nation='$me[nation]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $myNation = MYDB_fetch_array($result); - - echo " -세력이 비슷한 국가에 통합 제의를 합니다. 제의한 국가 위주로 통합됩니다.
-서신은 개인 메세지로 전달됩니다.
-제의할 국가를 목록에서 선택하세요.
-통합이 불가능한 국가는 붉은 배경으로 표시됩니다.
-
-대상국 : - 통합국명 : - - "; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-제한 조건
-- 인접 국가
-- 양국 모두 외교제한 없음
-- 양국 국력의 합이 평균+표준편차(현재 {$cond1}) 이하
-- 양국 장수수의 합이 평균+표준편차(현재 {$cond2}) 이하
-"; - ender(1); -} - -function command_54($connect, $turn, $command) { - starter("선양"); - $query = "select no,nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select no,name,level from general where nation='$general[nation]' and no!='$general[no]' order by npc,binary(name)"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $gencount = MYDB_num_rows($result); - - echo " -군주의 자리를 다른 장수에게 물려줍니다.
-장수를 선택하세요.
-
- - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_61($connect, $turn, $command) { - starter("불가침", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -타국에게 불가침을 제의합니다.
-제의할 국가를 목록에서 선택하세요.
-배경색은 현재 제의가 불가능한 국가는 붉은색, 현재 불가침중인 국가는 푸른색으로 표시됩니다.
-비고는 불가침시 세부 조건등을 지정하는 곳입니다.(최대 45자) ※유저 편의를 위한 것일뿐 시스템적으로 보장하지는 않습니다.
-
- 대상 국가 -기간 -년
-비고 : - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_62($connect, $turn, $command) { - starter("선전포고", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -타국에게 선전 포고합니다.
-선전 포고할 국가를 목록에서 선택하세요.
-고립되지 않은 아국 도시에서 인접한 국가에 선포 가능합니다.
-초반제한 해제 2년전부터 선포가 가능합니다. (체섭기준 181년 1월부터 가능)
-배경색은 현재 선포가 불가능한 국가는 붉은색, 현재 불가침중(역시 불가)인 국가는 푸른색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_63($connect, $turn, $command) { - starter("종전", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -전쟁중인 국가에 종전을 제의합니다.
-제의할 국가를 목록에서 선택하세요.
-배경색은 현재 제의가 불가능한 국가는 붉은색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_64($connect, $turn, $command) { - starter("파기", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -불가침중인 국가에 조약 파기를 제의합니다.
-제의할 국가를 목록에서 선택하세요.
-배경색은 현재 제의가 불가능한 국가는 붉은색, 현재 불가침중(제의 가능)인 국가는 푸른색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_65($connect, $turn, $command) { - starter("초토화", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시를 초토화 시킵니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_66($connect, $turn, $command) { - starter("천도", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시로 천도합니다.
-현재 수도에서 인접한 도시만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_67($connect, $turn, $command) { - starter("증축", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시를 증축합니다.
-현재 수도만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_68($connect, $turn, $command) { - starter("감축", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시를 감축합니다.
-현재 수도만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_72($connect, $turn, $command) { - starter("백성동원", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시에 백성동원을 발동합니다.
-아국 도시만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_73($connect, $turn, $command) { - starter("수몰", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시에 수몰을 발동합니다.
-전쟁중인 상대국 도시만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_74($connect, $turn, $command) { - starter("허보", 1); - $query = "select city from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $general = MYDB_fetch_array($result); - - $query = "select name,path from city where city='$general[city]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $currentcity = MYDB_fetch_array($result); - -echo " -
-선택된 도시에 허보를 발동합니다.
-선포, 전쟁중인 상대국 도시만 가능합니다.
-목록을 선택하거나 도시를 클릭하세요.
-
- - -"; - - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - - ender(); -} - -function command_75($connect, $turn, $command) { - starter("피장파장", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -선택된 국가에 피장파장을 발동합니다.
-선포, 전쟁중인 상대국에만 가능합니다.
-상대 국가를 목록에서 선택하세요.
-배경색은 현재 피장파장 불가능 국가는 붉은색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_77($connect, $turn, $command) { - starter("이호경식", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -선택된 국가에 이호경식을 발동합니다.
-선포, 전쟁중인 상대국에만 가능합니다.
-상대 국가를 목록에서 선택하세요.
-배경색은 현재 이호경식 불가능 국가는 붉은색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_78($connect, $turn, $command) { - starter("급습", 1); - - $query = "select nation from general where user_id='$_SESSION[p_id]'"; - $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - echo " -선택된 국가에 급습을 발동합니다.
-선포, 전쟁중인 상대국에만 가능합니다.
-상대 국가를 목록에서 선택하세요.
-배경색은 현재 급습 불가능 국가는 붉은색으로 표시됩니다.
-
- 대상 국가 - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} - -function command_81($connect, $turn, $command) { - starter("국기변경", 1); - - $color = GetNationColors(); - - $query = "select color from nation where level>0"; - $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); - $nationcount = MYDB_num_rows($result); - - for($i=0; $i < $nationcount; $i++) { - $nation = MYDB_fetch_array($result); - $nationcolor[$i] = $nation[color]; - } - $validCount = count($color); - //등록된 색깔 가려내기 - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - for($j=0; $j < $nationcount; $j++) { - if($color[$i] == $nationcolor[$j]) { - $valid[$i] = 0; - $validCount--; - } - } - } - //색깔이 다 쓰였으면 그냥 모두 허용 - if($validCount <= 0) { - for($i=0; $i < count($color); $i++) { - $valid[$i] = 1; - } - } - - echo " -국기를 변경합니다. 단 1회 가능합니다.
-
-색깔 : - -"; - for($i=0; $i < sizeof($turn); $i++) { - echo " - "; - } - - echo " -
-"; - ender(1); -} diff --git a/che/queue.php b/che/queue.php deleted file mode 100644 index 7fa94915..00000000 --- a/che/queue.php +++ /dev/null @@ -1,40 +0,0 @@ -capacity = $capacity; - $this->size = 0; - $this->head = 0; - $this->tail = 0; - } - - function getSize() { - return $this->size; - } - - function clear() { - $this->size = 0; - $this->head = 0; - $this->tail = 0; - } - - function push($value) { - if($this->size >= $this->capacity) return; - $this->arr[$this->tail] = $value; - $this->tail = ($this->tail + 1) % $this->capacity; - $this->size++; - } - - function pop() { - if($this->size <= 0) return null; - $value = $this->arr[$this->head]; - $this->head = ($this->head + 1) % $this->capacity; - $this->size--; - return $value; - } -} diff --git a/che/reset.php b/che/reset.php deleted file mode 100644 index 98d01c04..00000000 --- a/che/reset.php +++ /dev/null @@ -1,80 +0,0 @@ -Error!!!",""); -if(MYDB_error($connect)) Error(__LINE__.MYDB_error($connect),""); -MYDB_select_db($dbname, $connect ) or Error("MySQL-DB Select
Error!!!",""); - -delInDir("logs"); -delInDir("data/session"); -@unlink("data/connected.php"); - -// 관리자 테이블 삭제 -if(isTable($connect, "game",$dbname)) @MYDB_query("drop table game", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 장수 테이블 삭제 -if(isTable($connect, "gen",$dbname)) @MYDB_query("drop table general", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 국가 테이블 삭제 -if(isTable($connect, "nation",$dbname)) @MYDB_query("drop table nation", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 도시 테이블 삭제 -if(isTable($connect, "city",$dbname)) @MYDB_query("drop table city", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 부대 테이블 삭제 -if(isTable($connect, "troop",$dbname)) @MYDB_query("drop table troop", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 토큰 테이블 삭제 -if(isTable($connect, "token",$dbname)) @MYDB_query("drop table token", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 외교 테이블 삭제 -if(isTable($connect, "diplomacy",$dbname)) @MYDB_query("drop table diplomacy", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 토너먼트 테이블 삭제 -if(isTable($connect, "tournament",$dbname)) @MYDB_query("drop table tournament", $connect) or Error(__LINE__.MYDB_error($connect),""); -// 거래 테이블 삭제 -if(isTable($connect, "auction",$dbname)) @MYDB_query("drop table auction", $connect) or Error("drop ".MYDB_error($connect),""); -// 통계 테이블 삭제 -if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),""); -// 연감 테이블 삭제 -if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),""); - -// 관리자 테이블 생성 -if(!isTable($connect, "game",$dbname)) @MYDB_query($game_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 장수 테이블 생성 -if(!isTable($connect, "gen",$dbname)) @MYDB_query($general_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 국가 테이블 생성 -if(!isTable($connect, "nation",$dbname)) @MYDB_query($nation_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 도시 테이블 생성 -if(!isTable($connect, "city",$dbname)) @MYDB_query($city_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 부대 테이블 생성 -if(!isTable($connect, "troop",$dbname)) @MYDB_query($troop_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 토큰 테이블 생성 -if(!isTable($connect, "token",$dbname)) @MYDB_query($token_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 외교 테이블 생성 -if(!isTable($connect, "diplomacy",$dbname)) @MYDB_query($diplomacy_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 전당 테이블 생성 -if(!isTable($connect, "hall",$dbname)) @MYDB_query($hall_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 토너먼트 테이블 생성 -if(!isTable($connect, "tournament",$dbname)) @MYDB_query($tournament_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 거래 테이블 생성 -if(!isTable($connect, "auction",$dbname)) @MYDB_query($auction_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 통계 테이블 생성 -if(!isTable($connect, "statistic",$dbname)) @MYDB_query($statistic_schema, $connect) or Error(__LINE__.MYDB_error($connect),""); -// 연감 테이블 생성 -if(!isTable($connect, "history",$dbname)) @MYDB_query($history_schema, $connect) or Error("create history ".MYDB_error($connect),""); - -// 파일로 DB 정보 저장 -$file=@fopen("d_setting/set.php","w") or Error("set.php 파일 생성 실패

디렉토리의 퍼미션을 707로 주십시요",""); -@fwrite($file,"
디렉토리의 퍼미션을 707로 주십시요",""); -@fclose($file); -@mkdir("data",0707); -@chmod("data",0707); -@chmod("d_setting/set.php",0707); - -$temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1'", $connect)); - -MYDB_close($connect); - -echo ""; diff --git a/che/scenario_1.php b/che/scenario_1.php deleted file mode 100644 index e39633f0..00000000 --- a/che/scenario_1.php +++ /dev/null @@ -1,794 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●184년 1월:【역사모드1】황건적의 난"; -$history[count($history)] = "●184년 1월:【황건적】전국 각지에서 황건적이 들고 일어서고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_10.php b/che/scenario_10.php deleted file mode 100644 index 47588492..00000000 --- a/che/scenario_10.php +++ /dev/null @@ -1,900 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●225년 1월:【역사모드10】칠종칠금"; -$history[count($history)] = "●225년 1월:【이벤트】조조는 조비에게 후사를 부탁합니다."; -$history[count($history)] = "●225년 1월:【이벤트】손권은 국력을 비축하며 웅크리고 있습니다."; -$history[count($history)] = "●225년 1월:【이벤트】남만맹획은 유선에게 반기를 듭니다!"; -$history[count($history)] = "●225년 1월:【이벤트】제갈량은 남만을 정벌하기 위해 출정합니다!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_11.php b/che/scenario_11.php deleted file mode 100644 index e064095a..00000000 --- a/che/scenario_11.php +++ /dev/null @@ -1,899 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●228년 1월:【역사모드11】출사표"; -$history[count($history)] = "●228년 1월:【이벤트】손권은 국력을 비축하며 웅크리고 있습니다."; -$history[count($history)] = "●228년 1월:【이벤트】제갈량은 출사표를 내고 북벌에 나섭니다!"; -$history[count($history)] = "●228년 1월:【이벤트】조예는 이에 맞서 사마의를 보냅니다!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_12.php b/che/scenario_12.php deleted file mode 100644 index 73d612cc..00000000 --- a/che/scenario_12.php +++ /dev/null @@ -1,1183 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●191년 1월:【IF모드1】백마장군의 위세"; -$history[count($history)] = "●191년 1월:【시나리오】동탁은 장안으로 후퇴합니다!"; -$history[count($history)] = "●191년 1월:【시나리오】낙양손견과 결탁한 원술이 차지합니다!"; -$history[count($history)] = "●191년 1월:【시나리오】기주에는 조조와 의기투합한 원소가 힘을 비축합니다!"; -$history[count($history)] = "●191년 1월:【시나리오】병주에는 유비가 합세한 공손찬이 위용을 뽐냅니다!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_2.php b/che/scenario_2.php deleted file mode 100644 index 8340b15b..00000000 --- a/che/scenario_2.php +++ /dev/null @@ -1,1713 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●190년 1월:【역사모드2】반동탁연합 결성"; -$history[count($history)] = "●190년 1월:【연합】조조의 주도하에 전국 각지의 세력들이 동탁 타도를 외치며 연합을 결성했습니다."; -$history[count($history)] = "●190년 1월:【연합】진류에서 조조가 반동탁연합 격문을 썼습니다."; -$history[count($history)] = "●190년 1월:【연합】남피원소가 맹주로 추대되었습니다."; -$history[count($history)] = "●190년 1월:【연합】원술이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】장사손견이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】하비도겸이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】북평공손찬이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】서량마등이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】한복이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】복양유대가 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】하내장양이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】평원유비가 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】북해공융이 연합에 참가했습니다."; -$history[count($history)] = "●190년 1월:【연합】공주가 연합에 참가했습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_20.php b/che/scenario_20.php deleted file mode 100644 index a4ae577f..00000000 --- a/che/scenario_20.php +++ /dev/null @@ -1,748 +0,0 @@ -●180년 1월:【가상모드1】영웅 난무"; -$history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_21.php b/che/scenario_21.php deleted file mode 100644 index 6dd317b0..00000000 --- a/che/scenario_21.php +++ /dev/null @@ -1,776 +0,0 @@ -●180년 1월:【가상모드1】영웅 집결"; -$history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_22.php b/che/scenario_22.php deleted file mode 100644 index 5176501c..00000000 --- a/che/scenario_22.php +++ /dev/null @@ -1,196 +0,0 @@ -ㅁ< ♡"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; - -//////////////////////////장수 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●179년 1월:【가상모드2】훼신 집결"; -$history[count($history)] = "●179년 1월:【이벤트】삼모전 역대 훼신들이 등장합니다."; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓝ".$name; - $genid = "gen{$gencount}"; - $turntime = getRandTurn($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%61 + 1; - $age = 15; - $specage = $age; - $specage2 = $age; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 2; - $npcmatch = rand()%150 + 1; - $picture = 'default.jpg'; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', - '$city','$leader','$power','$intel','$experience','$dedication', - '0','1000','1000','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); - //방랑군 - if(rand()%20 == 0) { - @MYDB_query(" - insert into nation ( - name,color,gold,rice,bill,rate,scout,war,tricklimit,surlimit, - scoutmsg,level - ) values ( - '$name','330000','1000','1000','100','15','0','0','24','72', - '훼신NPC국','0' - )", $connect - ) or Error(__LINE__.MYDB_error($connect),""); - - $query = "select nation from nation where name='$name'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - // 군주로 // 현 국가 소속으로 - $query = "update general set belong=1,level=12,nation='$nation[nation]' where user_id='$genid'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - //외교 추가 - $query = "select nation from nation where nation!='$nation[nation]'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - for($i=0; $i < $count; $i++) { - $you = MYDB_fetch_array($result); - @MYDB_query(" - insert into diplomacy ( - me, you, state, term - ) values ( - '$nation[nation]', '$you[nation]', '2', '0' - )", $connect - ) or Error(__LINE__.MYDB_error($connect),""); - @MYDB_query(" - insert into diplomacy ( - me, you, state, term - ) values ( - '$you[nation]', '$nation[nation]', '2', '0' - )", $connect - ) or Error(__LINE__.MYDB_error($connect),""); - } - } -} - diff --git a/che/scenario_23.php b/che/scenario_23.php deleted file mode 100644 index dee04c1c..00000000 --- a/che/scenario_23.php +++ /dev/null @@ -1,752 +0,0 @@ -●180년 1월:【가상모드3】영웅 시대"; -$history[count($history)] = "●180년 1월:【이벤트】출연 가능한 모든 장수들이 재야로 등장하는 가상 시나리오."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_24.php b/che/scenario_24.php deleted file mode 100644 index 8fb46725..00000000 --- a/che/scenario_24.php +++ /dev/null @@ -1,327 +0,0 @@ -ㅁ< ♡"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "사푸", 59, 33, 63,"안전","상재", "이게 다 사푸때문이다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "살수묵랑", 69, 85, 13,"정복","무쌍", "남자라믄 고저 근성 열혈이라요!!!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "성야", 77, 62, 19,"출세","집중", "훼야 훼야"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소마", 73, 22, 69,"대의","신중", "오늘 항가해요 (.. *)"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소용녀", 64, 22, 84,"대의","신중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "소지로", 70, 71, 20,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "수", 41, 16, 68,"안전","견고", "흠... 그럼 어쩔수 없이 흉노로 가야겠군요..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "슈이쯔", 75, 76, 18,"패권","격노", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "스노곰", 70, 75, 10,"안전","궁병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "시그리", 81, 63, 14,"왕좌","징병", "어이쿠야 월척이다. 보람 있구나~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "심심해", 60, 85, 11,"의협","무쌍", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "실바누스", 83, 61, 15,"대의","신산", "살려주셍쇼ㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "아시루스", 56, 27, 75,"패권","집중", "왼손은 거들뿐..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "얀웬리", 66, 17, 82,"재간","반계", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "여휘", 67, 20, 70,"재간","공성", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에드워드", 68, 70, 12,"안전","인덕", "훼드훼드에염"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "에레니아", 70, 19, 63,"정복","척사", "에레냐에염 ㅇㅅㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"온몸이근육", 58, 81, 10,"패권","징병", "불끈!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "유기체", 70, 21, 75,"출세","환술", "5분 후에 리셋합니다. ㄳ ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "윤석민", 73, 20, 66,"패권","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "율", 68, 10, 78,"패권","반계", "율!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"이노베이션", 83, 65, 14,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "임사영", 75, 75, 18,"출세","필살", "평민왔셈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "자소유", 77, 70, 19,"대의","기병", "ㅇ_ㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장군보", 67, 82, 21,"의협","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수명", 66, 62, 18,"유지","견고", "장수명에 장수명을 입력한 장수명입니다."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장수왕", 77, 34, 43,"왕좌","위압", "장수왕섭 다음주 오픈해요. 기대해주셍."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장임", 50, 70, 75,"출세","저격", "훼력짱임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "장자", 66, 27, 80,"할거","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제로스", 71, 79, 24,"패권","필살", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "제이토", 76, 72, 14,"정복","보병", "훼이토 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "조용", 58, 62, 45,"할거","궁병", "조용..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "중달", 70, 73, 15,"대의","귀모", "내가 바로 그 훼달임."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지장", 58, 84, 21,"정복","무쌍", "췌퉤훼섭 모두 가리지 않는 훼력 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "지천영", 65, 84, 11,"왕좌","위압", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이사르", 74, 75, 16,"정복","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "카이토", 63, 15, 78,"유지","집중", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "캐양민", 67, 18, 71,"패권","반계", "캐양민임...ㅠㅠ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "쿄타로", 75, 21, 66,"정복","신산", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"크리스티앙", 60, 83, 16,"유지","견고", "끌턍 꿀사턍 꾸린스탈 ㅇㅇ"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "통키", 79, 68, 14,"대의","통찰", "불꽃슛~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "철혈대신", 72, 14, 85,"안전","견고", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"초절정미녀", 68, 19, 81,"출세","환술", "<- 초미녀임 ㅇㅇ;"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "페르난도", 68, 69, 21,"대의","징병", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "펠퍼틴", 58, 29, 61,"안전","의술", "짝퉁 화타가 바로 나!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하누리", 55, 22, 85,"패권","귀병", "하루 종일 누르리!"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하리", 80, 63, 12,"왕좌","위압", "열전 쓰고 있는중..."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "하오마루", 65, 85, 12,"정복","위압", "사무라이 쇼다운 막판왕 깨고 왔음."); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount,"하후연묘재", 65, 15, 67,"유지","반계", "묘섭 베타서버 운영중입니다. 많이 찾아주세욤~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "환선", 60, 76, 24,"패권","돌격", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "황월영", 72, 10, 68,"대의","인덕", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "허기", 64, 12, 77,"출세","거상", ""); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "형왔다", 64, 72, 27,"의협","기병", "형왔다~"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "헹이", 75, 16, 73,"의협","환술", "다 헹궈버리겠다~ ㅇ<-<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "효주곰", 54, 32, 77,"유지","경작", "순수한 효주곰이에여 >_<"); $gencount++; -RegGeneral2($connect,$admin[turnterm],$gencount, "후랴", 56, 79, 20,"의협","기병", "후랴 후랴~"); $gencount++; - -//군주임명 -$no = rand() % 79 + 2; -$query = "update general set level=12 where no='$no'"; -MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); - -RegGeneral3($connect,$admin[turnterm],$gencount, 2,12,"오랑캐대왕", 95, 95, 95,"패권","돌격", "오랑캐들이여 일어서라!"); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2,11, "오환대왕", 85, 55, 85,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2,10, "저대왕", 75, 75, 45,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 9, "흉노대왕", 65, 50, 50,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 8, "남만대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 7, "산월대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 6, "왜대왕", 45, 15, 45,"패권","환술", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 5, "강대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; - -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "북적대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "서융대왕", 45, 15, 45,"패권","돌격", ""); $gencount++; -RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1, "동이대왕", 45, 45, 15,"패권","돌격", ""); $gencount++; - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"북적장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"서융장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"동이장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"강장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"저장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"흉노장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"오환장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"남만장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"산월장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -for($k=0; $k <= 99; $k++) { - if(rand()%2) { $l = rand()%10 + 10; $p = rand()%10 + 15; $i = rand()%10 + 10; } - else { $l = rand()%10 + 10; $p = rand()%10 + 10; $i = rand()%10 + 15; } - RegGeneral3($connect,$admin[turnterm],$gencount, 2, 1,"왜장수{$k}", $l, $p, $i,"패권","", ""); $gencount++; -} - -//////////////////////////장수 끝/////////////////////////////////////////////// - -//////////////////////////도시 소속///////////////////////////////////////////// -RegCity($connect, 1, "업", 1); -RegCity($connect, 2, "양양", 1); - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●180년 1월:【가상모드4】결사항전"; -$history[count($history)] = "●180년 1월:【이벤트】오랑캐에 맞서 버텨내야 합니다!"; -pushHistory($connect, $history); - -echo ""; - -function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓝ".$name; - $genid = "gen{$gencount}"; - $turntime = getRandTurn($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%61 + 1; - $age = 15; - $specage = $age; - $specage2 = $age; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 2; - $npcmatch = rand()%150 + 1; - $picture = 'default.jpg'; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,level,city, - leader,power,intel,experience,dedication, - gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','1','1','$city', - '$leader','$power','$intel','$experience','$dedication', - '2000','2000','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - -function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { - $name = "ⓝ".$name; - $genid = "npc{$gencount}"; - $turntime = getRandTurn($turnterm); - $personal = CharCall($personal); - $special = SpecCall($special); - if($special >= 40) { $special2 = $special; $special = 0; } - else { $special2 = 0; } - $city = rand()%61 + 1; - $age = 15; - $specage = $age+1; - $specage2 = $age+1; - $killturn = 9999; - $experience = $age * 100; - $dedication = $age * 100; - $npc = 2; - $npcmatch = 999; - $picture = 'default.jpg'; - $pw = md5("18071807"); - //장수 - @MYDB_query(" - insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, - leader,power,intel,experience,dedication, - level,gold,rice,crew,crewtype,train,atmos, - weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, - makelimit - ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', - '$leader','$power','$intel','$experience','$dedication', - '$level','2000','2000','0','0','0','0', - '0','0','0','$turntime','$killturn','$age','1', - '$personal','$special','$specage','$special2','$specage2','$msg', - '0' - )", - $connect - ) or Error(__LINE__.MYDB_error($connect),""); -} - diff --git a/che/scenario_25.php b/che/scenario_25.php deleted file mode 100644 index 906f1525..00000000 --- a/che/scenario_25.php +++ /dev/null @@ -1,318 +0,0 @@ -●180년 1월:【가상모드5】영웅독존"; -$history[count($history)] = "●180년 1월:【이벤트】진정한 영웅들만이 재야로 등장하는 가상 시나리오."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_26.php b/che/scenario_26.php deleted file mode 100644 index 4f32a294..00000000 --- a/che/scenario_26.php +++ /dev/null @@ -1,315 +0,0 @@ -●180년 1월:【가상모드6】무풍지대"; -$history[count($history)] = "●180년 1월:【이벤트】영웅은 없다! 오직 내가 영웅일 뿐이다!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_27.php b/che/scenario_27.php deleted file mode 100644 index 46082d2b..00000000 --- a/che/scenario_27.php +++ /dev/null @@ -1,593 +0,0 @@ -●180년 1월:【가상모드7】가요대잔치"; -$history[count($history)] = "●180년 1월:【이벤트】올해의 가요대상은!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_28.php b/che/scenario_28.php deleted file mode 100644 index f233c2bd..00000000 --- a/che/scenario_28.php +++ /dev/null @@ -1,422 +0,0 @@ -●180년 1월:【가상모드8】확산성 밀리언 아서"; -$history[count($history)] = "●180년 1월:【이벤트】삼모전에 확밀아가 빙의됩니다!"; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_3.php b/che/scenario_3.php deleted file mode 100644 index 34380b1f..00000000 --- a/che/scenario_3.php +++ /dev/null @@ -1,1754 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●194년 1월:【역사모드3】군웅할거"; -$history[count($history)] = "●194년 1월:【이벤트】연주조조가 부친의 복수를 빌미로 서주 토벌에 나섭니다."; -$history[count($history)] = "●194년 1월:【이벤트】평원유비가 원군에 나섭니다."; -$history[count($history)] = "●194년 1월:【이벤트】여포가 진궁의 계책으로 진류를 확보했습니다."; -$history[count($history)] = "●194년 1월:【이벤트】조조가 근거지 재탈환을 위해 급히 물러납니다."; -$history[count($history)] = "●194년 1월:【이벤트】유비는 도겸의 권유로 소패에 머뭅니다."; -$history[count($history)] = "●194년 1월:【이벤트】한편 하북에서 원소와 공손찬이 자웅을 겨루려 합니다."; -$history[count($history)] = "●194년 1월:【이벤트】강동에서는 손책이 웅크리고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_4.php b/che/scenario_4.php deleted file mode 100644 index ffc45ada..00000000 --- a/che/scenario_4.php +++ /dev/null @@ -1,1291 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●196년 1월:【역사모드4】황제는 허도로"; -$history[count($history)] = "●196년 1월:【이벤트】황제가 이각에게서 탈출하여 낙양으로 향합니다."; -$history[count($history)] = "●196년 1월:【이벤트】황제는 폐허가 된 낙양의 수비를 위해 몇 군벌들에게 서신을 띄웁니다.."; -$history[count($history)] = "●196년 1월:【이벤트】기주원소는 세력 다지기에 바쁩니다."; -$history[count($history)] = "●196년 1월:【이벤트】연주조조가 병력을 출동하여 낙양을 점거합니다."; -$history[count($history)] = "●196년 1월:【이벤트】조조는 황제를 강압적으로 허창으로 이주시킵니다."; - -$history[count($history)] = "●196년 1월:【이벤트】여포는 패주하여 유비에 몸을 맡깁니다."; -$history[count($history)] = "●196년 1월:【이벤트】유비는 여포에게 소패를 내어줍니다."; -$history[count($history)] = "●196년 1월:【이벤트】동오손책은 소패왕의 이름을 떨칩니다."; -$history[count($history)] = "●196년 1월:【이벤트】회남원술은 황제가 될 기회를 노리고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_5.php b/che/scenario_5.php deleted file mode 100644 index c621480b..00000000 --- a/che/scenario_5.php +++ /dev/null @@ -1,997 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●200년 1월:【역사모드5】관도대전"; -$history[count($history)] = "●200년 1월:【이벤트】조조에게 패한 유비는 원소에게 의지하기 위해 방랑하고 있습니다."; -$history[count($history)] = "●200년 1월:【이벤트】관우는 조조에게 투항합니다."; -$history[count($history)] = "●200년 1월:【이벤트】원소와 조조는 사활을 건 한판 승부를 준비하고 있습니다."; -$history[count($history)] = "●200년 1월:【이벤트】관도에는 전운이 감돌고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_6.php b/che/scenario_6.php deleted file mode 100644 index f697a60f..00000000 --- a/che/scenario_6.php +++ /dev/null @@ -1,1043 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●202년 1월:【역사모드6】원가의 분열"; -$history[count($history)] = "●202년 1월:【이벤트】원소는 후계자로 셋째 아들 원상을 선택합니다."; -$history[count($history)] = "●202년 1월:【이벤트】맏아들 원담은 이에 반발하여 조조와 결탁하여 할거를 노립니다."; -$history[count($history)] = "●202년 1월:【이벤트】조조는 원담을 이용하여 원소의 잔당을 물리치기 위한 진군을 시작합니다."; -$history[count($history)] = "●202년 1월:【이벤트】남쪽으로 피신한 유비는 유표에게 의지해 신야에 머무릅니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_7.php b/che/scenario_7.php deleted file mode 100644 index 8cc61f2d..00000000 --- a/che/scenario_7.php +++ /dev/null @@ -1,1095 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●207년 1월:【역사모드7】적벽대전"; -$history[count($history)] = "●207년 1월:【이벤트】하후돈을 패주시킨 서서는 계책에 빠져 조조에게 귀순합니다."; -$history[count($history)] = "●207년 1월:【이벤트】서서의 천거로 유비는 제갈량을 삼고초려의 예로 영입합니다."; -$history[count($history)] = "●207년 1월:【이벤트】원씨 가문을 무너뜨린 조조는 강남 정벌을 위해 대군을 이끌고 남하합니다."; -$history[count($history)] = "●207년 1월:【이벤트】손권은 유비와 불가침을 맺고 조조의 대군에 맞서기로 결심합니다."; -$history[count($history)] = "●207년 1월:【이벤트】대군을 몰고 온 조조, 이에 맞서는 손권과 유비. 적벽은 피로 물들려 하고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_8.php b/che/scenario_8.php deleted file mode 100644 index 6529ca47..00000000 --- a/che/scenario_8.php +++ /dev/null @@ -1,947 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●213년 1월:【역사모드8】익주 공방전"; -$history[count($history)] = "●213년 1월:【이벤트】마등을 섬멸시킨 조조는 익주로 눈을 돌립니다."; -$history[count($history)] = "●213년 1월:【이벤트】도망친 마초는 한중장로에게 의지합니다."; -$history[count($history)] = "●213년 1월:【이벤트】유장은 장로에 맞서기 위해 유비에게 도움을 청합니다."; -$history[count($history)] = "●213년 1월:【이벤트】일이 여의치 않은 유비는 등을 돌려 익주를 차지하려합니다."; -$history[count($history)] = "●213년 1월:【이벤트】형주에 일었던 피바람은 익주에서 다시 불어오고 있습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/scenario_9.php b/che/scenario_9.php deleted file mode 100644 index ba703829..00000000 --- a/che/scenario_9.php +++ /dev/null @@ -1,871 +0,0 @@ -0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$query = "update city set pop=pop2*0.7,agri=agri2*0.7,comm=comm2*0.7,secu=secu2*0.7,rate=80 where nation=0"; -MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -//전방설정 -$query = "select nation from nation"; -$result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); -$count = MYDB_num_rows($result); -for($i=0; $i < $count; $i++) { - $nation = MYDB_fetch_array($result); - SetNationFront($connect, $nation[nation]); -} - -//////////////////////////도시 끝/////////////////////////////////////////////// - -//////////////////////////이벤트/////////////////////////////////////////////// -$history[count($history)] = "●219년 1월:【역사모드9】삼국정립"; -$history[count($history)] = "●219년 1월:【이벤트】한중을 빼앗긴 조조는 허창으로 퇴각합니다."; -$history[count($history)] = "●219년 1월:【이벤트】동오손권은 형주를 되찾기 위해 호시탐탐 노리고 있습니다."; -$history[count($history)] = "●219년 1월:【이벤트】한중왕에 오른 유비군의 기세는 하늘을 찌를 듯 합니다!"; -$history[count($history)] = "●219년 1월:【이벤트】위, 오, 촉의 본격적인 삼국시대가 되었습니다."; -pushHistory($connect, $history); - -echo ""; - diff --git a/che/schema.php b/che/schema.php deleted file mode 100644 index 96f018c7..00000000 --- a/che/schema.php +++ /dev/null @@ -1,619 +0,0 @@ -history.go(-1);"; - exit(1); -} - -$connect = dbConn(); -?> - - - -NPC선택 - - - - - - - - -
장 수 선 택
- - -
-alert('잘못된 접근입니다!');"; - echo ""; - exit(); -} - -$query = "select no from general where npc<2"; -$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -if($gencount >= $admin[maxgeneral]) { - echo ""; - echo ""; - exit(); -} -?> - - - -"; - } else { - echo " - "; - } -} -?> -
임관 권유 메세지
$nation[name]-
$nation[name]$nation[scoutmsg]
- -
- - - - - - -= 3) { -?> - - - - - - - - - - - - - - -
장수 선택
장수/1001.jpg border=0 name=picture width=64 height=64>
- -
- 컴퓨터가 조작중이던 NPC장수를 조종하게 됩니다.
- 80시간동안 휴식을 취하면 다시 컴퓨터가 조종하게 되고 장수의 소유권을 잃습니다. -
-
- - - -
- - - diff --git a/che/select_npc_post.php b/che/select_npc_post.php deleted file mode 100644 index ebe9997c..00000000 --- a/che/select_npc_post.php +++ /dev/null @@ -1,126 +0,0 @@ -history.go(-1);"; - exit(1); -} - -$date = date('Y-m-d H:i:s'); -//등록정보 -$query = "update MEMBER set reg_num=reg_num+1,reg_date='$date' where no='$member[no]'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - -$connect = dbConn(); - -$npcid = "gen{$face}"; -$query = "select no,npc,level from general where user_id='$npcid'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$npc = MYDB_fetch_array($result); - -########## 동일 정보 존재여부 확인. ########## - -$query = "select year,month,maxgeneral,turnterm,genius,npcmode from game where no='1'"; -$result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); - -$query = "select no from general where npc<2"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$gencount = MYDB_num_rows($result); - -$query = "select no from general where user_id='$member[id]'"; -$result = MYDB_query($query,$connect) or Error(__LINE__.MYDB_error($connect),""); -$id_num = MYDB_num_rows($result); - -if($admin[npcmode] != 1) { - echo ""; - echo ""; - exit(); -} elseif($id_num) { - echo(""); - exit; -} elseif($admin[maxgeneral] <= $gencount) { - echo(""); - exit; -} elseif($npc[npc] < 2) { - echo(""); - exit; -} elseif($npc[npc] != 2) { - echo(""); - exit; -/* -} elseif($npc[level] >= 5) { - echo(""); - exit; -*/ -} else { - //특회 - $userlevel = $member[grade]; - - $query = " - update general set - user_id='{$id}', - password='{$pwTemp}', - name2='{$member[name]}', - conmsg='', - npc=1, - killturn=6, - skin=1, - mode=2, - map=0, - userlevel='{$userlevel}' - where user_id='{$npcid}' - "; - MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - - $query = "select no,name,history from general where user_id='$id'"; - $result = MYDB_query($query, $connect) or Error("join_post ".MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $log[0] = "●{$admin[month]}월:$me[name]의 육체에 $member[name](이)가 빙의됩니다!"; - $me = addHistory($connect, $me, "●$admin[year]년 $admin[month]월:$me[name]의 육체에 $member[name](이)가 빙의되다."); - pushGenLog($me, $mylog); - pushAllLog($log); - - $adminLog[0] = "가입 : {$me[name]} // {$id} // ".getenv("REMOTE_ADDR"); - pushAdminLog($connect, $adminLog); - - MYDB_close($connect); - - echo(""); - echo(""); - echo(""); -} - diff --git a/che/selection.php b/che/selection.php deleted file mode 100644 index 32db0e7c..00000000 --- a/che/selection.php +++ /dev/null @@ -1,35 +0,0 @@ -history.go(-1);"; - exit(1); -} - -if($btn == "장수생성") { - $site = "join.php"; -} elseif($btn == "장수선택") { - $site = "select_npc.php"; -} -?> - -
method=post> - - -
-a - - diff --git a/che/start.php b/che/start.php deleted file mode 100644 index 54dd5924..00000000 --- a/che/start.php +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/che/stylesheet.php b/che/stylesheet.php deleted file mode 100644 index 96a11ee5..00000000 --- a/che/stylesheet.php +++ /dev/null @@ -1,86 +0,0 @@ - - -body { color:; background-color:; border-width:1; border-color:gray; } -table { font-family:'맑은 고딕'; line-height:110%; } -font { font-family:'맑은 고딕'; line-height:110%; } -input { font-family:'맑은 고딕'; line-height:110%; height:20px } -select { font-family:'굴림'; line-height:100%; } -#bg0 { } -#bg1 { } -#bg2 { } diff --git a/che/templates/.htaccess b/che/templates/.htaccess deleted file mode 100644 index 698196ae..00000000 --- a/che/templates/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/che/turn.php b/che/turn.php deleted file mode 100644 index f7373898..00000000 --- a/che/turn.php +++ /dev/null @@ -1,87 +0,0 @@ -= 2) { echo ""; exit(); } - -switch($type) { -case 0: -/* - for($i=0; $i < $sel; $i++) { - $k = $i + $sel; - $query = "update general set "; - while(1) { - $query .= "turn{$k}=turn{$i}"; - $k += $sel; - if($k >= 24) break; - $query .= ","; - } - $query .= " where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } -*/ - $query = "update general set "; - for($i=0; $i < $sel; $i++) { - $k = $i + $sel; - while(1) { - $query .= "turn{$k}=turn{$i}"; - $k += $sel; - if($i < $sel-1 || $k < 24) { $query .= ","; } - if($k >= 24) break; - } - } - $query .= " where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case 1: - $i = 23 - $sel; - $k = 23; - $query = "update general set "; - while(1) { - $query .= "turn{$k}=turn{$i},"; - $i--; $k--; - if($i < 0) break; - } - while(1) { - $query .= "turn{$k}=0"; - $k--; - if($k < 0) break; - $query .= ","; - } - $query .= " where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -case 2: - $i = 0; - $k = $sel; - $query = "update general set "; - while(1) { - $query .= "turn{$i}=turn{$k},"; - $i++; $k++; - if($k >= 24) break; - } - while(1) { - $query .= "turn{$i}=0"; - $i++; - if($i >= 24) break; - $query .= ","; - } - $query .= " where user_id='$_SESSION[p_id]'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - break; -} - -echo ""; diff --git a/che/turn_pop_core.php b/che/turn_pop_core.php deleted file mode 100644 index 4198b506..00000000 --- a/che/turn_pop_core.php +++ /dev/null @@ -1,14 +0,0 @@ -location.replace('b_chiefcenter.php');"; diff --git a/che/turn_push_core.php b/che/turn_push_core.php deleted file mode 100644 index 740ae1a7..00000000 --- a/che/turn_push_core.php +++ /dev/null @@ -1,15 +0,0 @@ -location.replace('b_chiefcenter.php');"; - diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index be0b8477..48347bd3 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -7,6 +7,7 @@ require_once('_common.php'); require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); +require_once(ROOT.W.E_LIB.W.UTIL.PHP); $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/twe/_simul.php b/twe/_simul.php index 8324364e..1bf64b65 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -1,7 +1,47 @@ Date: Wed, 17 Jan 2018 19:59:59 +0900 Subject: [PATCH 050/622] =?UTF-8?q?=5Fsimul=20=EB=A7=88=EC=A0=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=84=B1=EB=B2=BD=20=EA=B3=B5=EA=B2=A9=20?= =?UTF-8?q?=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_simul.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twe/_simul.php b/twe/_simul.php index 1bf64b65..795c29e9 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -120,6 +120,9 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $city['def'] = $def; $city['wall'] = $wall; + $city['agri'] = 0; + $city['comm'] = 0; + $city['secu'] = 0; if($isgen == "장수공격" || $isgen == "장수평균") { $opposecount = 1; @@ -148,7 +151,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 $mykillnum = 0; $mydeathnum = 0; while($phase < $warphase) { $phase++; - $myAtt = getAtt($game, $general, $tech1); + $myAtt = getAtt($game, $general, $tech1, 0); $myDef = getDef($game, $general, $tech1); $cityAtt = getCityAtt($city); $cityDef = getCityDef($city); From 7816fc1ebae57f926d2d8e539279aa991c7c8c3f Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 20:01:06 +0900 Subject: [PATCH 051/622] =?UTF-8?q?[php5=5Fdebug]=20undefined=20=EC=97=90?= =?UTF-8?q?=EB=8B=A4=EA=B0=80=20=EB=AD=90=20=EB=95=8C=EB=A0=A4=EB=B0=95?= =?UTF-8?q?=EB=8A=94=EA=B1=B0=20=EA=B8=88=EC=A7=80!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twe/func.php b/twe/func.php index a29ce46c..80257928 100644 --- a/twe/func.php +++ b/twe/func.php @@ -4011,7 +4011,11 @@ function updateOnline($connect) { //국가별 접속중인 장수 for($i=0; $i < $onlinenum; $i++) { $general = MYDB_fetch_array($result); - $onnation[$general['nation']] .= $general['name'].', '; + if(isset($onnation[$general['nation']])){ + $onnation[$general['nation']] .= $general['name'].', '; + }else { + $onnation[$general['nation']] = $general['name'].', '; + } } //$onnation이 empty라면 굳이 foreach를 수행 할 이유가 없음. From 37e8fae843c160d77f4c466ba3e0a98221f0f507 Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 17 Jan 2018 20:16:00 +0900 Subject: [PATCH 052/622] =?UTF-8?q?=EC=8B=9C=EB=AE=AC=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20$POST=20=EB=B3=80=EC=88=98=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_simul.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/twe/_simul.php b/twe/_simul.php index 795c29e9..e22d2eae 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -5,13 +5,13 @@ require_once '../e_lib/util.php'; //로그인 검사 $isgen = util::array_get($_POST['isgen'], ''); -$tech1 = 0; -$tech2 = 0; -$dex10 = 0; -$dex110 = 0; -$dex120 = 0; -$dex130 = 0; -$dex140 = 0; +$tech1 = util::array_get($_POST['tech1'], 0); +$tech2 =util::array_get($_POST['tech2'], 0); +$dex10 = util::array_get($_POST['dex10'], 0); +$dex110 = util::array_get($_POST['dex110'], 0); +$dex120 = util::array_get($_POST['dex120'], 0); +$dex130 = util::array_get($_POST['dex130'], 0); +$dex140 = util::array_get($_POST['dex140'], 0); $dx10 = array_fill(0, 20, ''); $dx110 = array_fill(0, 20, ''); @@ -19,11 +19,11 @@ $dx120 = array_fill(0, 20, ''); $dx130 = array_fill(0, 20, ''); $dx140 = array_fill(0, 20, ''); -$dex20 = 0; -$dex210 = 0; -$dex220 = 0; -$dex230 = 0; -$dex240 = 0; +$dex20 = util::array_get($_POST['dex20'], 0); +$dex210 = util::array_get($_POST['dex210'], 0); +$dex220 = util::array_get($_POST['dex220'], 0); +$dex230 = util::array_get($_POST['dex230'], 0); +$dex240 = util::array_get($_POST['dex240'], 0); $dx20 = array_fill(0, 20, ''); $dx210 = array_fill(0, 20, ''); From df31672a32f7017d70896c1de96514a4333964f0 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 20:41:27 +0900 Subject: [PATCH 053/622] =?UTF-8?q?[php5=5Fdebug]=20=EB=94=B0=EC=98=B4?= =?UTF-8?q?=ED=91=9C=20=EB=88=84=EB=9D=BD,=20=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=AF=B8=EB=B9=84=20=EB=93=B1?= =?UTF-8?q?=EB=93=B1=20=EB=AC=B8=EB=B2=95=EC=A0=81=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 22 +++--- twe/func_npc.php | 5 +- twe/func_process.php | 166 ++++++++++++++++++++++--------------------- 3 files changed, 99 insertions(+), 94 deletions(-) diff --git a/twe/func.php b/twe/func.php index 80257928..d1617eb8 100644 --- a/twe/func.php +++ b/twe/func.php @@ -4696,12 +4696,12 @@ group by A.nation $nation = MYDB_fetch_array($result); $genNum[$nation['nation']] = $nation['gennum']; - if($nation['gennum'] > $nation[gennum2]) { + if($nation['gennum'] > $nation['gennum2']) { // 장수가 증가했을때 - $nation['chemi'] -= ceil(($nation['gennum'] - $nation[gennum2]) / $nation['gennum'] * 100); + $nation['chemi'] -= ceil(($nation['gennum'] - $nation['gennum2']) / $nation['gennum'] * 100); } else { // 장수가 감소했을때 - $nation['chemi'] -= ceil(($nation[gennum2] - $nation['gennum']) / $nation[gennum2] * 100); + $nation['chemi'] -= ceil(($nation['gennum2'] - $nation['gennum']) / $nation['gennum2'] * 100); } // 매달 2씩 증가 $nation['chemi'] += 2; @@ -5441,7 +5441,7 @@ function PreprocessCommand($connect, $no) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) { + if($general['special2'] == 73 || $general['item'] == 23 || $general['item'] == 24) { //특기보정 : 의술 //의서 사용 if($general['injury'] > 0) { @@ -5583,7 +5583,7 @@ function processCommand($connect, $no) { $general = MYDB_fetch_array($result); } - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); //삭턴 처리 if($general['npc'] >= 2 || $general['killturn'] > $admin['killturn']) { $query = "update general set recturn=turn0,resturn='FAIL',myset=3,con=0,killturn=killturn-1 where no='{$general['no']}'"; @@ -6144,36 +6144,36 @@ function checkAbility($connect, $general, $log) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - if($general[leader2] < 0) { + if($general['leader2'] < 0) { $query = "update general set leader2='$limit'+leader2,leader=leader-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 떨어졌습니다!"; - } elseif($general[leader2] >= $limit) { + } elseif($general['leader2'] >= $limit) { $query = "update general set leader2=leader2-'$limit',leader=leader+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "통솔이 1 올랐습니다!"; } - if($general[power2] < 0) { + if($general['power2'] < 0) { $query = "update general set power2='$limit'+power2,power=power-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 떨어졌습니다!"; - } elseif($general[power2] >= $limit) { + } elseif($general['power2'] >= $limit) { $query = "update general set power2=power2-'$limit',power=power+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "무력이 1 올랐습니다!"; } - if($general[intel2] < 0) { + if($general['intel2'] < 0) { $query = "update general set intel2='$limit'+intel2,intel=intel-1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log[count($log)] = "지력이 1 떨어졌습니다!"; - } elseif($general[intel2] >= $limit) { + } elseif($general['intel2'] >= $limit) { $query = "update general set intel2=intel2-'$limit',intel=intel+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/func_npc.php b/twe/func_npc.php index 5a3ca365..e62d69c1 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -967,7 +967,7 @@ function processAI($connect, $no) { $general = MYDB_fetch_array($result); // 입력된 턴이 있으면 그것 실행 - if($general[turn0] != "00000000000000") { + if($general['turn0'] != "00000000000000") { return; } @@ -979,6 +979,7 @@ function processAI($connect, $no) { $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); $nation = MYDB_fetch_array($result); + $coreCommand = array(); if($general['level'] >= 5) { $query = "select l{$general['level']}turn0 from nation where nation='{$general['nation']}'"; $result = MYDB_query($query, $connect) or Error("processAI03 ".MYDB_error($connect),""); @@ -1263,7 +1264,7 @@ function processAI($connect, $no) { } // 입력된 턴이 있으면 - if($coreCommand["l{$general['level']}turn0"] != EncodeCommand(0, 0, 0, 99)) { + if(!empty($coreCommand) && ($coreCommand["l{$general['level']}turn0"] != EncodeCommand(0, 0, 0, 99))) { $rulerCommand = 1; } diff --git a/twe/func_process.php b/twe/func_process.php index 683e5d31..416f7b1a 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -124,7 +124,7 @@ function process_1($connect, &$general, $type) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 경험치 상승 $general['gold'] -= $admin['develcost']; - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -223,7 +223,7 @@ function process_3($connect, &$general) { // 자금 하락, 경험치 상승 // 공헌도, 명성 상승 = $score * 10 $general['gold'] -= $admin['develcost']; - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -317,7 +317,7 @@ function process_4($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -419,7 +419,7 @@ function process_5($connect, &$general, $type) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; - $general[power2]++; + $general['power2']++; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -513,7 +513,7 @@ function process_7($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -560,7 +560,7 @@ function process_8($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:고립된 도시입니다. $dtype 강화 실패. <1>$date"; } elseif($general['gold'] < $admin['develcost']) { $log[count($log)] = "●{$admin['month']}월:자금이 모자랍니다. $dtype 강화 실패. <1>$date"; - } elseif($city['secu'] >= $city[secu2]) { + } elseif($city['secu'] >= $city['secu2']) { $log[count($log)] = "●{$admin['month']}월:치안은 충분합니다. $dtype 강화 실패. <1>$date"; } else { // 민심 50 이하이면 50과 같게 @@ -578,7 +578,7 @@ function process_8($connect, &$general) { // 군주, 참모, 장군 보정 if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $score *= 1.05; } // 태수 보정 - if($general['level'] == 4 && $general['no'] == $city[gen1]) { $score *= 1.05; } + if($general['level'] == 4 && $general['no'] == $city['gen1']) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); @@ -613,7 +613,7 @@ function process_8($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; - $general[power2]++; + $general['power2']++; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -695,15 +695,15 @@ function process_9($connect, &$general) { switch(rand()%3) { case 0: - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 1: - $general[power2]++; + $general['power2']++; $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 2: - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; } @@ -741,7 +741,7 @@ function process_11($connect, &$general, $type) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $armtype = $command[2]; $crew = $command[1]; @@ -757,12 +757,12 @@ function process_11($connect, &$general, $type) { $cost = round($cost); //특기 보정 : 보병, 궁병, 기병, 귀병, 공성, 징병 - if(floor($armtype/10) == 0 && $general[special2] == 50) { $cost *= 0.9; } - if(floor($armtype/10) == 1 && $general[special2] == 51) { $cost *= 0.9; } - if(floor($armtype/10) == 2 && $general[special2] == 52) { $cost *= 0.9; } - if(floor($armtype/10) == 3 && $general[special2] == 40) { $cost *= 0.9; } - if(floor($armtype/10) == 4 && $general[special2] == 43) { $cost *= 0.9; } - if($general[special2] == 72) { $cost *= 0.5; } + if(floor($armtype/10) == 0 && $general['special2'] == 50) { $cost *= 0.9; } + if(floor($armtype/10) == 1 && $general['special2'] == 51) { $cost *= 0.9; } + if(floor($armtype/10) == 2 && $general['special2'] == 52) { $cost *= 0.9; } + if(floor($armtype/10) == 3 && $general['special2'] == 40) { $cost *= 0.9; } + if(floor($armtype/10) == 4 && $general['special2'] == 43) { $cost *= 0.9; } + if($general['special2'] == 72) { $cost *= 0.5; } if($type == 1) { $dtype = "징병"; } elseif($type == 2) { $dtype = "모병"; $cost *= 2; } @@ -888,7 +888,7 @@ function process_11($connect, &$general, $type) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='{$general['crew']}',train='$train',atmos='$atmos',gold='{$general['gold']}',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -960,7 +960,7 @@ function process_13($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1025,7 +1025,7 @@ function process_14($connect, &$general) { // 사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 $score += $general['atmos']; if($score > $_maxatmos) { $score = $_maxatmos; } - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1093,7 +1093,7 @@ function process_15($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]+=3; + $general['leader2']+=3; $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1120,7 +1120,7 @@ function process_16($connect, &$general) { $city = MYDB_fetch_array($result); $path = explode("|", $city['path']); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select * from city where city='$destination'"; @@ -1236,7 +1236,7 @@ function process_21($connect, &$general) { $city = MYDB_fetch_array($result); $path = explode("|", $city['path']); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select name from city where city='$destination'"; @@ -1259,7 +1259,7 @@ function process_21($connect, &$general) { $exp = CharExperience($exp, $general['personal']); // 이동, 경험치 상승, 명성 상승, 사기 감소 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',gold=gold-'{$admin['develcost']}',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1303,7 +1303,7 @@ function process_22($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $who = $command[1]; $query = "select * from general where no='$who'"; @@ -1333,7 +1333,7 @@ function process_22($connect, &$general) { ScoutMsg($connect, $general['no'], $nation['name'], $who, $you['msgindex']); - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1551,7 +1551,7 @@ function process_25($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $where = $command[1]; // 랜덤임관인 경우 @@ -1609,7 +1609,8 @@ function process_25($connect, &$general) { if($gencount < 10) { $exp = 700; } else { $exp = 100; } - + $ded = 0; + // 성격 보정 $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); @@ -1698,7 +1699,7 @@ function process_26($connect, &$general) { $query = "update general set city='{$general['city']}' where troop='{$general['troop']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 명성 공헌 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1827,7 +1828,7 @@ function process_28($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 상승 // 명성,공헌 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1880,9 +1881,9 @@ function process_29($connect, &$general) { $exp = 100; $ded = 70; switch(rand()%3) { - case 0: $general[leader2] += 1; break; - case 1: $general[power2] += 1; break; - case 2: $general[intel2] += 1; break; + case 0: $general['leader2'] += 1; break; + case 1: $general['power2'] += 1; break; + case 2: $general['intel2'] += 1; break; } $log[count($log)] = "●{$admin['month']}월:인재를 찾을 수 없었습니다. <1>$date"; } else { @@ -1890,9 +1891,9 @@ function process_29($connect, &$general) { $exp = 200; $ded = 300; switch(rand()%3) { - case 0: $general[leader2] += 3; break; - case 1: $general[power2] += 3; break; - case 2: $general[intel2] += 3; break; + case 0: $general['leader2'] += 3; break; + case 1: $general['power2'] += 3; break; + case 2: $general['intel2'] += 3; break; } $name = getRandGenName(); @@ -2104,7 +2105,7 @@ function process_30($connect, &$general) { $city = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 3); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select name from city where city='$destination'"; @@ -2125,7 +2126,7 @@ function process_30($connect, &$general) { $exp = CharExperience($exp, $general['personal']); // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2162,7 +2163,7 @@ function process_31($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 2); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select * from city where city='$destination'"; @@ -2240,7 +2241,7 @@ function process_31($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[leader2]++; + $general['leader2']++; $general['gold'] -= $admin['develcost']*3; $general['rice'] -= $admin['develcost']*3; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -2281,7 +2282,7 @@ function process_32($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 5); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select * from city where city='$destination'"; @@ -2381,7 +2382,7 @@ function process_32($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[intel2]++; + $general['intel2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -2405,7 +2406,7 @@ function process_33($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 5); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select name,level,nation,secu,secu2 from city where city='$destination'"; @@ -2531,7 +2532,7 @@ function process_33($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[power2]++; + $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -2552,7 +2553,7 @@ function process_34($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 5); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select name,nation,def,wall,secu,secu2 from city where city='$destination'"; @@ -2653,7 +2654,7 @@ function process_34($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[power2]++; + $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -2674,7 +2675,7 @@ function process_35($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 5); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select name,nation,rate,secu,secu2 from city where city='$destination'"; @@ -2783,7 +2784,7 @@ function process_35($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[leader2]++; + $general['leader2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -2804,7 +2805,7 @@ function process_36($connect, &$general) { $admin = MYDB_fetch_array($result); $dist = distance($connect, $general['city'], 5); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $destination = $command[1]; $query = "select * from city where city='$destination'"; @@ -2921,9 +2922,9 @@ function process_36($connect, &$general) { $exp = CharExperience($exp, $general['personal']); $ded = CharDedication($ded, $general['personal']); - $general[leader2]++; - $general[intel2]++; - $general[power2]++; + $general['leader2']++; + $general['intel2']++; + $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; @@ -3007,6 +3008,7 @@ function process_42($connect, &$general) { $type = rand() % 27 + 1; $exp = 30; + $ded = 0; // 성격 보정 $exp = CharExperience($exp, $general['personal']); @@ -3030,7 +3032,7 @@ function process_42($connect, &$general) { case 3: $log[count($log)] = "●{$admin['month']}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[intel2] += 2; + $general['intel2'] += 2; $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3043,7 +3045,7 @@ function process_42($connect, &$general) { case 5: $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[power2] += 2; + $general['power2'] += 2; $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3056,7 +3058,7 @@ function process_42($connect, &$general) { case 7: $log[count($log)] = "●{$admin['month']}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; // 자금 상승 // 경험치 상승 // 명성 상승 - $general[power2] += 2; + $general['power2'] += 2; $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3071,7 +3073,7 @@ function process_42($connect, &$general) { case 9: $log[count($log)] = "●{$admin['month']}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 - $general[power2] += 2; + $general['power2'] += 2; $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3079,14 +3081,14 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:호랑이에게 물려 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 11: $log[count($log)] = "●{$admin['month']}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 // 명성 상승 - $general[power2] += 2; + $general['power2'] += 2; $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3094,7 +3096,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:곰에게 할퀴어 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3114,14 +3116,14 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구해주다가 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 16: $log[count($log)] = "●{$admin['month']}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3136,7 +3138,7 @@ function process_42($connect, &$general) { case 18: $log[count($log)] = "●{$admin['month']}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[intel2]++; + $general['intel2']++; $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3151,28 +3153,28 @@ function process_42($connect, &$general) { case 20: $log[count($log)] = "●{$admin['month']}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[intel2] += 2; + $general['intel2'] += 2; $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 21: $log[count($log)] = "●{$admin['month']}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[leader2] += 2; + $general['leader2'] += 2; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 22: $log[count($log)] = "●{$admin['month']}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[power2] += 2; + $general['power2'] += 2; $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 23: $log[count($log)] = "●{$admin['month']}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 - $general[leader2] += 2; + $general['leader2'] += 2; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3180,7 +3182,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:호랑이에게 물려 크게 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3188,7 +3190,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:곰에게 할퀴어 크게 다쳤습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3196,7 +3198,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:위기에 빠진 사람을 구하다가 죽을뻔 했습니다. <1>$date"; // 경험치 하락 // 명성 상승 $injury = rand() % 50 + 30; - $general[power2]--; + $general['power2']--; $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -3219,7 +3221,7 @@ function process_43($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $what = $command[3]; $who = $command[2]; $amount = $command[1]; @@ -3286,7 +3288,7 @@ function process_43($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3311,7 +3313,7 @@ function process_44($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $city = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $what = $command[2]; $amount = $command[1]; $amount *= 100; // 100~10000까지 @@ -3370,7 +3372,7 @@ function process_44($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 경험치 상승 // 공헌도, 명성 상승 - $general[leader2]++; + $general['leader2']++; $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3510,7 +3512,7 @@ function process_46($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $color = $command[1]; $type = $command[2]; // 1 ~ 13 @@ -3640,7 +3642,7 @@ function process_48($connect, &$general) { $city = getCity($connect, $general['city']); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $type = $command[1]; if($type < 100) { $isweap = 0; } @@ -3720,6 +3722,7 @@ function process_48($connect, &$general) { } $exp = 10; + $ded = 0; // 성격 보정 $exp = CharExperience($exp, $general['personal']); @@ -3747,7 +3750,7 @@ function process_49($connect, &$general) { $city = getCity($connect, $general['city']); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $type = $command[2]; $amount = $command[1]; $amount *= 100; @@ -3844,17 +3847,17 @@ function process_49($connect, &$general) { // 경험치 상승 switch(rand()%3) { case 0: - $general[leader2]++; + $general['leader2']++; $query = "update general set leader2='$general[leader2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: - $general[power2]++; + $general['power2']++; $query = "update general set power2='$general[power2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: - $general[intel2]++; + $general['intel2']++; $query = "update general set intel2='$general[intel2]' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; @@ -4125,7 +4128,7 @@ function process_54($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $command = DecodeCommand($general[turn0]); + $command = DecodeCommand($general['turn0']); $who = $command[1]; $query = "select no,name,nation,history from general where no='$who'"; @@ -6133,6 +6136,7 @@ function process_99($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:아직 구현되지 않았습니다. <1>$date"; $exp = 100; + $ded = 0; // 성격 보정 $exp = CharExperience($exp, $general['personal']); From d99707c3d7f309799f52698c7fc1c797f30e53c7 Mon Sep 17 00:00:00 2001 From: revofpla Date: Wed, 17 Jan 2018 22:35:02 +0900 Subject: [PATCH 054/622] =?UTF-8?q?[php5=5Fdebug]=20=EB=94=B0=EC=98=B4?= =?UTF-8?q?=ED=91=9C=20=EB=88=84=EB=9D=BD,=20=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=88=84=EB=9D=BD(=ED=8A=B9?= =?UTF-8?q?=ED=9E=88=20log=EC=99=80=20alllog)=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/b_currentCity.php | 4 +- twe/b_diplomacy.php | 5 ++ twe/func.php | 34 ++++++----- twe/func_npc.php | 1 + twe/func_process.php | 137 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 161 insertions(+), 20 deletions(-) diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index bf02feca..adcf8368 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -39,7 +39,7 @@ if($me['skin'] < 1) {
도시선택 : ",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + diff --git a/twe/join.php b/twe/join.php index 05ceb001..77771c14 100644 --- a/twe/join.php +++ b/twe/join.php @@ -51,7 +51,7 @@ if(!$token) { 장수생성 - + '); - echo(''); + header ("Location: ".ROOT.W.'i_login/login.php'); exit(1); + //echo(''); + //exit(1); } diff --git a/f_func/func.js b/f_func/func.js index 3139228f..d5c2b1f1 100644 --- a/f_func/func.js +++ b/f_func/func.js @@ -7,11 +7,13 @@ function Open(url) { } function Replace(url) { - location.replace(url); + //location.replace(url); + console.log('this',url); } function ReplaceFrame(url) { - window.top.location.replace(url); + //window.top.location.replace(url); + console.log('top',url); } function ImportStyle(href) { diff --git a/i_entrance/manage/iconPost.php b/i_entrance/manage/iconPost.php index a77e3e20..56769534 100644 --- a/i_entrance/manage/iconPost.php +++ b/i_entrance/manage/iconPost.php @@ -72,8 +72,11 @@ if(!is_uploaded_file($image['tmp_name'])) { sleep(1); +/* echo ""; +*/ +echo ROOT.W.I.ENTRANCE.W.ENTRANCE.PHP;//TODO:debug all and replace diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index 48347bd3..69200ba6 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -7,7 +7,7 @@ require_once('_common.php'); require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); require_once(ROOT.W.F_CONFIG.W.DB.PHP); require_once(ROOT.W.F_CONFIG.W.SESSION.PHP); -require_once(ROOT.W.E_LIB.W.UTIL.PHP); +require_once(ROOT.W.E_LIB.W.'util.php'); $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); diff --git a/index.php b/index.php index 4173b042..a59956f6 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,8 @@ + @@ -12,3 +17,4 @@ +*/ \ No newline at end of file diff --git a/twe/_119_b.php b/twe/_119_b.php index eb8e746e..dbf7ab7f 100644 --- a/twe/_119_b.php +++ b/twe/_119_b.php @@ -9,7 +9,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 5) { - echo ""; + //echo ""; + echo '_119.php';//TODO:debug all and replace } switch($btn) { @@ -54,4 +55,4 @@ case "락풀기": } //echo ""; -echo '_119.php';//TODO:replace +echo '_119.php';//TODO:debug all and replace diff --git a/twe/_admin1_submit.php b/twe/_admin1_submit.php index 8f032a9a..c88de998 100644 --- a/twe/_admin1_submit.php +++ b/twe/_admin1_submit.php @@ -12,7 +12,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 5) { - echo ""; + //echo ""; + echo '_admin1.php';//TODO:debug all and replace } switch($btn) { @@ -176,5 +177,5 @@ switch($btn) { } //echo ""; -echo '_admin1.php';//TODO:replace +echo '_admin1.php';//TODO:debug all and replace diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 354f26bf..99d56b30 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -10,7 +10,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 5) { - echo ""; + //echo ""; + echo '_admin2.php';//TODO:debug all and replace } switch($btn) { @@ -428,5 +429,5 @@ switch($btn) { } //echo ""; -echo '_admin2.php';//TODO:replace +echo '_admin2.php';//TODO:debug all and replace diff --git a/twe/_admin3_submit.php b/twe/_admin3_submit.php index 5b2da323..0ba212e1 100644 --- a/twe/_admin3_submit.php +++ b/twe/_admin3_submit.php @@ -12,7 +12,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 4) { - echo ""; + //echo ""; + echo '_admin3.php';//TODO:debug all and replace } switch($btn) { @@ -130,5 +131,5 @@ switch($btn) { } //echo ""; -echo '_admin3.php';//TODO:replace +echo '_admin3.php';//TODO:debug all and replace diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index ef8b543f..d70b8da2 100644 --- a/twe/_admin4_submit.php +++ b/twe/_admin4_submit.php @@ -10,7 +10,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 5) { - echo ""; + //echo ""; + echo '_admin4.php';//TODO:debug all and replace } switch($btn) { @@ -103,5 +104,5 @@ switch($btn) { } //echo ""; -echo '_admin4.php'; //TODO:replace +echo '_admin4.php'; //TODO:debug all and replace diff --git a/twe/_admin5_submit.php b/twe/_admin5_submit.php index c99f6fce..cfbda22e 100644 --- a/twe/_admin5_submit.php +++ b/twe/_admin5_submit.php @@ -10,7 +10,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); if($me['userlevel'] < 5) { - echo ""; + //echo ""; + echo '_admin5.php';//TODO:debug all and replace } switch($btn) { @@ -26,6 +27,6 @@ switch($btn) { } //echo ""; -echo '_admin5.php';//TODO:replace +echo '_admin5.php';//TODO:debug all and replace diff --git a/twe/b_myPage.php b/twe/b_myPage.php index 3099287d..77da7517 100644 --- a/twe/b_myPage.php +++ b/twe/b_myPage.php @@ -43,7 +43,10 @@ if($me['skin'] < 1) { type=text/css> diff --git a/twe/c_betting.php b/twe/c_betting.php index 06a4e4e0..01d7c7d4 100644 --- a/twe/c_betting.php +++ b/twe/c_betting.php @@ -13,7 +13,8 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $admin = MYDB_fetch_array($result); if($admin['tournament'] != 6) { - echo ""; + //echo ""; + echo 'b_betting.php';//TODO:debug all and replace exit(); } @@ -38,5 +39,5 @@ for($i=0; $i < 16; $i++) { ?> - + b_betting.php diff --git a/twe/c_chiefboard.php b/twe/c_chiefboard.php index 2615e896..cc493a2d 100644 --- a/twe/c_chiefboard.php +++ b/twe/c_chiefboard.php @@ -43,7 +43,7 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } //echo ""; -echo 'b_chiefboard.php';//TODO:replace +echo 'b_chiefboard.php';//TODO:debug all and replace ?> diff --git a/twe/c_dipcenter.php b/twe/c_dipcenter.php index c369612b..cc932de1 100644 --- a/twe/c_dipcenter.php +++ b/twe/c_dipcenter.php @@ -15,7 +15,8 @@ $btn = $_POST['btn']; //내가 수뇌부이어야함 if($me['level'] < 5) { - echo ""; + //echo ""; + echo 'b_myBossInfo.php';//TODO:debug all and replace exit(); } @@ -57,6 +58,6 @@ if($btn == "국가방침") { } //echo ""; -echo 'b_dipcenter.php';//TODO:replace +echo 'b_dipcenter.php';//TODO:debug all and replace diff --git a/twe/c_double.php b/twe/c_double.php index ba3734ca..56e76755 100644 --- a/twe/c_double.php +++ b/twe/c_double.php @@ -40,7 +40,8 @@ if($command == 46) { } $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; + //echo ""; + echo 'main.php';//TODO:debug all and replace //통합제의 } elseif($command == 53) { $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; @@ -66,7 +67,8 @@ if($command == 46) { $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - echo ""; + //echo ""; + echo 'b_chiefcenter.php';//TODO:debug all and replace //불가침 } elseif($command == 61) { $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; @@ -91,7 +93,8 @@ if($command == 46) { $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - echo ""; + //echo ""; + echo 'b_chiefcenter.php';//TODO:debug all and replace //포상, 몰수, 발령, 항복권고, 원조 //선전포고, 종전, 파기, 초토화, 천도, 증축, 감축 //백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 @@ -112,7 +115,8 @@ if($command == 46) { $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - echo ""; + //echo ""; + echo 'b_chiefcenter.php';//TODO:debug all and replace } else { $count = sizeof($turn); $str = "con=con"; @@ -121,7 +125,8 @@ if($command == 46) { } $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; + //echo ""; + echo 'main.php';//TODO:debug all and replace } diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index a0f14079..4779a914 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -22,7 +22,10 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); $con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); -if($con >= 2) { echo ""; exit(); } +if($con >= 2) { + //echo ""; exit(); + echo 'main.php';//TODO:debug all and replace + } $msg = str_replace("|", "", $msg); $msg = trim($msg); @@ -124,6 +127,6 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { fclose($fp); } -echo ""; -//echo 'msglist.php';//TODO:replace +//echo ""; +echo 'msglist.php';//TODO:debug all and replace diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index b2d46c2f..f2095184 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -27,7 +27,8 @@ if($btn == "임명") { //임명할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $genlist != 0)) { - echo ""; + //echo ""; + echo 'b_myBossInfo.php';//TODO:debug all and replace exit(); } } elseif($btn == "추방") { @@ -37,7 +38,8 @@ if($btn == "임명") { //추방할사람이 군주이면 불가, 내가 수뇌부이어야함, 공석아닌때는 국가가 같아야함 if($general['level'] == 12 || $meLevel < 5 || ($general['nation'] != $me['nation'] && $outlist != 0)) { - echo ""; + //echo ""; + echo 'b_myBossInfo.php';//TODO:debug all and replace exit(); } } @@ -251,6 +253,6 @@ if($btn == "추방") { } //echo ""; -echo 'b_myBossInfo.php';//TODO:replace +echo 'b_myBossInfo.php';//TODO:debug all and replace diff --git a/twe/c_nationboard.php b/twe/c_nationboard.php index 4b55d19f..21879aaf 100644 --- a/twe/c_nationboard.php +++ b/twe/c_nationboard.php @@ -43,7 +43,7 @@ if(CheckBlock($connect) != 1 && CheckBlock($connect) != 3) { } //echo ""; -echo 'b_nationboard.php';//TODO:replace +echo 'b_nationboard.php';//TODO:debug all and replace ?> diff --git a/twe/c_nationrule.php b/twe/c_nationrule.php index bc7b8327..0918a692 100644 --- a/twe/c_nationrule.php +++ b/twe/c_nationrule.php @@ -17,5 +17,5 @@ $query = "update nation set rule='$msg' where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; -echo 'b_nationrule.php';//TODO:replace +echo 'b_nationrule.php';//TODO:debug all and replace diff --git a/twe/c_tournament.php b/twe/c_tournament.php index 14fd7148..ae6a9563 100644 --- a/twe/c_tournament.php +++ b/twe/c_tournament.php @@ -202,5 +202,5 @@ if($btn == "자동개최설정" && $me['userlevel'] >= 5) { } ?> - + b_tournament.php diff --git a/twe/c_vacation.php b/twe/c_vacation.php index dcc23100..3479b2a0 100644 --- a/twe/c_vacation.php +++ b/twe/c_vacation.php @@ -15,5 +15,5 @@ $query = "update general set killturn='{$admin['killturn']}' where user_id='{$_S $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; -echo 'b_myPage.php'; //TODO:replace +echo 'b_myPage.php'; //TODO:debug all and replace diff --git a/twe/c_vote.php b/twe/c_vote.php index 6623d7be..d43f6caf 100644 --- a/twe/c_vote.php +++ b/twe/c_vote.php @@ -73,5 +73,5 @@ if($btn == "수정" && $me['userlevel'] >= 5) { } ?> - + a_vote.php diff --git a/twe/event_4.php b/twe/event_4.php index 0379269a..df66037d 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -92,7 +92,8 @@ pushAllLog($log); $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【이벤트】NPC 유기체가 등장합니다. 의병장과 NPC들의 지능 개선을 위해 NPC 두뇌를 체험합니다. 크게 신경쓰진 마세요."; pushHistory($connect, $history); -echo ""; +//echo ""; +echo './';//TODO:debug all and replace function RegGeneral4($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$specage,$specage2,$msg="") { $name = "ⓝ".$name; diff --git a/twe/func.php b/twe/func.php index 7b898a65..283c1bf1 100644 --- a/twe/func.php +++ b/twe/func.php @@ -112,8 +112,14 @@ function GetImageURL($imgsvr) { function CheckLogin($type=0) { if($_SESSION['p_id'] == "") { - if($type == 0) { echo ""; } - else { echo ""; } + if($type == 0) { + //echo ""; + echo 'start.php';//TODO:debug all and replace + } + else { + echo 'main.php';//TODO:debug all and replace + //echo ""; + } exit(); } } @@ -7390,7 +7396,8 @@ function command_Single($connect, $turn, $command) { } $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; + //echo ""; + echo 'commandlist.php';//TODO:debug all and replace } @@ -7410,7 +7417,8 @@ function command_Chief($connect, $turn, $command) { $query = "update nation set {$str} where nation='{$me['nation']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } - echo ""; + //echo ""; + echo 'b_chiefcenter.php';//TODO:debug all and replace } function command_Other($connect, $turn, $commandtype) { diff --git a/twe/index.php b/twe/index.php index 3e8e5e49..95992a56 100644 --- a/twe/index.php +++ b/twe/index.php @@ -1,3 +1,6 @@ + 삼국지 모의전투 유기체서버 @@ -7,3 +10,4 @@ +*/ \ No newline at end of file diff --git a/twe/install2_ok.php b/twe/install2_ok.php index 1c9a3955..6ae3940f 100644 --- a/twe/install2_ok.php +++ b/twe/install2_ok.php @@ -302,7 +302,7 @@ insertCity($connect, "파양", 1, 103700, 2000, 2200, 2000, 3800, 3800, 7, insertCity($connect, "탐라", 1, 113000, 2200, 2100, 2000, 4300, 4100, 8, "31|33|34|62"); // 93 : 탐라 insertCity($connect, "유구", 1, 92100, 1700, 1800, 2000, 3700, 3700, 8, "59|69"); // 94 : 유구 -//TODO:replace +//TODO:debug all and replace switch($scenario) { case 0: echo "index.php"; break; case 1: echo "scenario_1.php"; break; diff --git a/twe/install3_ok.php b/twe/install3_ok.php index 5ff3b1d3..92681649 100644 --- a/twe/install3_ok.php +++ b/twe/install3_ok.php @@ -7,4 +7,4 @@ $connect=dbConn(); LogHistory($connect, 1); //echo ""; -echo 'index.php'; //TODO:replace +echo 'index.php'; //TODO:debug all and replace diff --git a/twe/install_ok.php b/twe/install_ok.php index 490d3b17..fa2d7615 100644 --- a/twe/install_ok.php +++ b/twe/install_ok.php @@ -99,4 +99,5 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); -echo ""; +//echo ""; +echo 'install2.php';//TODO:debug all and replace diff --git a/twe/join.php b/twe/join.php index 77771c14..00469055 100644 --- a/twe/join.php +++ b/twe/join.php @@ -67,7 +67,8 @@ function updateToken(type) { console.log(data); if(data.result != "rand" && data.result != "leadpow" && data.result != "leadint" && data.result != "powint") { alert(jqXHR.status+", "+jqXHR.statusText+", "+jqXHR.responseText); - location.replace("index.php"); + //location.replace("index.php"); + echo 'index.php';//TODO:debug all and replace } else { $("#leader").text(data.leader); $("#power").text(data.power); @@ -77,7 +78,8 @@ function updateToken(type) { dataType: 'json', error: function(jqXHR, textStatus, errorThrown) { alert(jqXHR.status+", "+jqXHR.statusText+", "+jqXHR.responseText); - location.replace("index.php"); + //location.replace("index.php"); + echo 'index.php';//TODO:debug all and replace } }); } diff --git a/twe/join_post.php b/twe/join_post.php index d1074408..f2bdfcc3 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -269,6 +269,7 @@ if($id_num) { echo(""); - echo(""); + //echo(""); + echo 'index.php';//TODO:debug all and replace } diff --git a/twe/login_process.php b/twe/login_process.php index 32f5f541..5f02be3a 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -26,10 +26,12 @@ $me = MYDB_fetch_array($result); if(!$member) { MessageBox("아이디나 암호가 올바르지 않습니다!!!"); - echo ""; + //echo ""; + echo 'index.php';//TODO:debug all and replace } elseif(!$me) { MessageBox("캐릭터가 없습니다!!!"); - echo ""; + //echo ""; + echo 'index.php';//TODO:debug all and replace } else { switch($me['block']) { case 1: @@ -52,7 +54,8 @@ if(!$member) { $query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; + //echo ""; + echo './';//TODO:debug all and replace $date = date('Y_m_d H:i:s'); $date2 = substr($date, 0, 10); diff --git a/twe/logout_process.php b/twe/logout_process.php index 03172f8f..1d246fb6 100644 --- a/twe/logout_process.php +++ b/twe/logout_process.php @@ -20,7 +20,7 @@ $conmsg = $me['conmsg']; session_destroy(); //echo ""; -echo 'start.php';//TODO:replace +echo 'start.php';//TODO:debug all and replace /* diff --git a/twe/npc_login_process.php b/twe/npc_login_process.php index 5f40f7f6..9358d137 100644 --- a/twe/npc_login_process.php +++ b/twe/npc_login_process.php @@ -21,10 +21,12 @@ $me = MYDB_fetch_array($result); if(!$me2) { MessageBox("캐릭터가 없습니다!!!"); - echo ""; + //echo ""; + echo 'index.php';//TODO:debug all and replace } elseif(!$me) { MessageBox("아이디나 암호가 올바르지 않습니다!!!"); - echo ""; + //echo ""; + echo 'index.php';//TODO:debug all and replace } else { switch($me['block']) { case 1: @@ -47,7 +49,8 @@ if(!$me2) { $query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where user_id='{$_SESSION['p_id']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - echo ""; + //echo ""; + echo './';//TODO:debug all and replace $date2 = substr($date, 0, 10); $fp = fopen("logs/_{$date2}-login.txt", "a"); diff --git a/twe/preprocessing.php b/twe/preprocessing.php index 7eb12b68..f49a538b 100644 --- a/twe/preprocessing.php +++ b/twe/preprocessing.php @@ -15,7 +15,11 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); $con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); -if($con >= 2) { echo ""; exit(); } +if($con >= 2) { + //echo ""; + echo 'main.php';//TODO:debug all and replace + exit(); + } $count = sizeof($turn); for($i=0; $i < $count; $i++) { diff --git a/twe/processing.php b/twe/processing.php index 4e71454d..bcf340dd 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -155,7 +155,8 @@ function command_99($connect, $turn) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } } - echo ""; + //echo ""; + echo 'b_chiefcenter.php';//TODO:debug all and replace } function GetExplain() { diff --git a/twe/reset.php b/twe/reset.php index 98d01c04..5f3e777b 100644 --- a/twe/reset.php +++ b/twe/reset.php @@ -77,4 +77,5 @@ $temp=MYDB_fetch_array(MYDB_query("select count(*) from general where level = '1 MYDB_close($connect); -echo ""; +//echo ""; +echo 'install2.php';//TODO:debug all and replace \ No newline at end of file diff --git a/twe/scenario_1.php b/twe/scenario_1.php index 16aa9cc5..f8df828a 100644 --- a/twe/scenario_1.php +++ b/twe/scenario_1.php @@ -790,5 +790,5 @@ $history[count($history)] = "●184년 1월:【역사모드1】< $history[count($history)] = "●184년 1월:【황건적】전국 각지에서 황건적이 들고 일어서고 있습니다."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_10.php b/twe/scenario_10.php index 82def41a..1b7d730e 100644 --- a/twe/scenario_10.php +++ b/twe/scenario_10.php @@ -896,5 +896,5 @@ $history[count($history)] = "●225년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_11.php b/twe/scenario_11.php index bb6220b6..92db624e 100644 --- a/twe/scenario_11.php +++ b/twe/scenario_11.php @@ -895,5 +895,5 @@ $history[count($history)] = "●228년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_12.php b/twe/scenario_12.php index 81000489..49948a76 100644 --- a/twe/scenario_12.php +++ b/twe/scenario_12.php @@ -1179,5 +1179,5 @@ $history[count($history)] = "●191년 1월:【시나리오】●191년 1월:【시나리오】병주에는 유비가 합세한 공손찬이 위용을 뽐냅니다!"; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_2.php b/twe/scenario_2.php index 4cd917fa..be280095 100644 --- a/twe/scenario_2.php +++ b/twe/scenario_2.php @@ -1709,5 +1709,5 @@ $history[count($history)] = "●190년 1월:【연합】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_20.php b/twe/scenario_20.php index 1a2a9183..6c0b6de2 100644 --- a/twe/scenario_20.php +++ b/twe/scenario_20.php @@ -744,5 +744,5 @@ $history[count($history)] = "●180년 1월:【가상모드1】 $history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_21.php b/twe/scenario_21.php index 165a92b1..9e3f674e 100644 --- a/twe/scenario_21.php +++ b/twe/scenario_21.php @@ -772,5 +772,5 @@ $history[count($history)] = "●180년 1월:【가상모드1】 $history[count($history)] = "●180년 1월:【이벤트】당대의 대표 세력들이 등장합니다."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_22.php b/twe/scenario_22.php index 2b77b622..3e6fb3c3 100644 --- a/twe/scenario_22.php +++ b/twe/scenario_22.php @@ -113,7 +113,8 @@ $history[count($history)] = "●179년 1월:【가상모드2】 $history[count($history)] = "●179년 1월:【이벤트】삼모전 역대 훼신들이 등장합니다."; pushHistory($connect, $history); -echo ""; +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; diff --git a/twe/scenario_23.php b/twe/scenario_23.php index 156fbed0..34292ba4 100644 --- a/twe/scenario_23.php +++ b/twe/scenario_23.php @@ -748,5 +748,5 @@ $history[count($history)] = "●180년 1월:【가상모드3】 $history[count($history)] = "●180년 1월:【이벤트】출연 가능한 모든 장수들이 재야로 등장하는 가상 시나리오."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_24.php b/twe/scenario_24.php index a15084d9..d0f9e671 100644 --- a/twe/scenario_24.php +++ b/twe/scenario_24.php @@ -245,7 +245,8 @@ $history[count($history)] = "●180년 1월:【가상모드4】 $history[count($history)] = "●180년 1월:【이벤트】오랑캐에 맞서 버텨내야 합니다!"; pushHistory($connect, $history); -echo ""; +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; diff --git a/twe/scenario_25.php b/twe/scenario_25.php index c3cc8cd0..9f2c5487 100644 --- a/twe/scenario_25.php +++ b/twe/scenario_25.php @@ -314,5 +314,5 @@ $history[count($history)] = "●180년 1월:【가상모드5】 $history[count($history)] = "●180년 1월:【이벤트】진정한 영웅들만이 재야로 등장하는 가상 시나리오."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_26.php b/twe/scenario_26.php index d174771a..b1f3e1ff 100644 --- a/twe/scenario_26.php +++ b/twe/scenario_26.php @@ -311,5 +311,5 @@ $history[count($history)] = "●180년 1월:【가상모드6】 $history[count($history)] = "●180년 1월:【이벤트】영웅은 없다! 오직 내가 영웅일 뿐이다!"; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_27.php b/twe/scenario_27.php index 5d18462b..1c6d4bde 100644 --- a/twe/scenario_27.php +++ b/twe/scenario_27.php @@ -589,5 +589,5 @@ $history[count($history)] = "●180년 1월:【가상모드7】 $history[count($history)] = "●180년 1월:【이벤트】올해의 가요대상은!"; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_28.php b/twe/scenario_28.php index 36dfb9b8..936d50e0 100644 --- a/twe/scenario_28.php +++ b/twe/scenario_28.php @@ -418,5 +418,5 @@ $history[count($history)] = "●180년 1월:【가상모드8】 $history[count($history)] = "●180년 1월:【이벤트】삼모전에 확밀아가 빙의됩니다!"; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_3.php b/twe/scenario_3.php index ca2b3c2d..4e81ea84 100644 --- a/twe/scenario_3.php +++ b/twe/scenario_3.php @@ -1750,5 +1750,5 @@ $history[count($history)] = "●194년 1월:【이벤트】 $history[count($history)] = "●194년 1월:【이벤트】강동에서는 손책이 웅크리고 있습니다."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_4.php b/twe/scenario_4.php index 1ad99bda..a342c13f 100644 --- a/twe/scenario_4.php +++ b/twe/scenario_4.php @@ -1287,5 +1287,5 @@ $history[count($history)] = "●196년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_5.php b/twe/scenario_5.php index 5ce25929..c963da75 100644 --- a/twe/scenario_5.php +++ b/twe/scenario_5.php @@ -993,5 +993,5 @@ $history[count($history)] = "●200년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_6.php b/twe/scenario_6.php index b9ff513d..8f30586c 100644 --- a/twe/scenario_6.php +++ b/twe/scenario_6.php @@ -1039,5 +1039,5 @@ $history[count($history)] = "●202년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_7.php b/twe/scenario_7.php index ad6b89e2..cd6053d2 100644 --- a/twe/scenario_7.php +++ b/twe/scenario_7.php @@ -1091,5 +1091,5 @@ $history[count($history)] = "●207년 1월:【이벤트】location.replace('install3_ok.php');"; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_8.php b/twe/scenario_8.php index 40ea4158..206ceae5 100644 --- a/twe/scenario_8.php +++ b/twe/scenario_8.php @@ -943,5 +943,5 @@ $history[count($history)] = "●213년 1월:【이벤트】 $history[count($history)] = "●213년 1월:【이벤트】형주에 일었던 피바람은 익주에서 다시 불어오고 있습니다."; pushHistory($connect, $history); -echo ""; - +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/scenario_9.php b/twe/scenario_9.php index 8768603a..c4113784 100644 --- a/twe/scenario_9.php +++ b/twe/scenario_9.php @@ -867,5 +867,6 @@ $history[count($history)] = "●219년 1월:【이벤트】location.replace('install3_ok.php');"; +//echo ""; +echo 'install3_ok.php';//TODO:debug all and replace diff --git a/twe/select_npc_post.php b/twe/select_npc_post.php index 9c480a16..1e22b9e3 100644 --- a/twe/select_npc_post.php +++ b/twe/select_npc_post.php @@ -121,6 +121,7 @@ if($admin['npcmode'] != 1) { window.alert('정상적으로 회원 가입되었습니다. ID : $id'); "); echo(""); - echo(""); + //echo(""); + echo 'index.php';//TODO:debug all and replace } diff --git a/twe/start.php b/twe/start.php index 54dd5924..83358cc6 100644 --- a/twe/start.php +++ b/twe/start.php @@ -1,3 +1,5 @@ - + +../ diff --git a/twe/turn.php b/twe/turn.php index 61c76a91..ad9e5410 100644 --- a/twe/turn.php +++ b/twe/turn.php @@ -15,7 +15,11 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"" $me = MYDB_fetch_array($result); $con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); -if($con >= 2) { echo ""; exit(); } +if($con >= 2) { + //echo ""; + echo 'main.php';//TODO:debug all and replace + exit(); + } switch($type) { case 0: @@ -84,4 +88,5 @@ case 2: break; } -echo ""; +//echo ""; +echo 'commandlist.php';//TODO:debug all and replace diff --git a/twe/turn_pop_core.php b/twe/turn_pop_core.php index 6c2adf2d..0ade6768 100644 --- a/twe/turn_pop_core.php +++ b/twe/turn_pop_core.php @@ -11,4 +11,5 @@ $me = MYDB_fetch_array($result); updateCommand($connect, $me['no'], 2); -echo ""; +//echo ""; +echo 'b_chiefcenter.php';//TODO:debug all and replace diff --git a/twe/turn_push_core.php b/twe/turn_push_core.php index d8b8aea4..1848b853 100644 --- a/twe/turn_push_core.php +++ b/twe/turn_push_core.php @@ -11,5 +11,6 @@ $me = MYDB_fetch_array($result); backupdateCommand($connect, $me['no'], 2); -echo ""; +//echo ""; +echo 'b_chiefcenter.php';//TODO:debug all and replace From 9c27544fb7bf1a848560d8ab95718ff0a25985bf Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 20 Jan 2018 04:09:21 +0900 Subject: [PATCH 061/622] =?UTF-8?q?=EC=B0=B8=EC=97=AC=20=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=EA=B0=80=20=EC=97=86=EC=9D=84=20=EC=8B=9C=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=EA=B0=80=20=EB=B0=9C=EC=83=9D=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_entrance/member/Get.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i_entrance/member/Get.php b/i_entrance/member/Get.php index 69200ba6..6e96756a 100644 --- a/i_entrance/member/Get.php +++ b/i_entrance/member/Get.php @@ -11,7 +11,8 @@ require_once(ROOT.W.E_LIB.W.'util.php'); $rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'"); $member = $DB->Get($rs); - +$donCumul = []; +$donDate = []; if($member['GRADE'] < 6) { $response['result'] = 'FAIL'; $response['msg'] = '운영자 권한이 없습니다.'; @@ -66,8 +67,8 @@ if($member['GRADE'] < 6) { {$member['REG_NUM']} {$member['REG_DATE']} {$member['GRADE']} - {$donCumul[$member['ID']]} - {$donDate[$member['ID']]} + ".util::array_get($donCumul[$member['ID']],'0')." + ".util::array_get($donDate[$member['ID']],'')." {$member['PICTURE']} {$member['IMGSVR']} {$member['QUIT']} From 3aaf7c832887c778daee46e4dc33338a175cfe2a Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 20 Jan 2018 04:19:03 +0900 Subject: [PATCH 062/622] =?UTF-8?q?set.php=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=20=EC=A0=84=EC=86=A1=20=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + d_setting/set.php | 10 +++++----- f_func/class._Validation.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1421360c..3cde3ffd 100644 --- a/.gitignore +++ b/.gitignore @@ -118,3 +118,4 @@ set.php config.php sess_* */logs/*.txt +d_setting/set.php \ No newline at end of file diff --git a/d_setting/set.php b/d_setting/set.php index 1cba5893..7627c9db 100644 --- a/d_setting/set.php +++ b/d_setting/set.php @@ -3,9 +3,9 @@ localhost sam_dev letmein sammo -smtp.gmail.com -465 -aser -ewrwer -@gmail.com +localhost +25 +test +lemein +@localhost */ diff --git a/f_func/class._Validation.php b/f_func/class._Validation.php index dbf4e7da..6e919202 100644 --- a/f_func/class._Validation.php +++ b/f_func/class._Validation.php @@ -89,7 +89,7 @@ class _Validation { //if($year < 50) { return 3; } if($month < 1 || $month > 12) { return 3; } if($day < 1 || $day > 31) { return 3; } - if($sex < 1 || $sex > 2) { return 3; } + if($sex < 1 || $sex > 4) { return 3; } return 0; } From 0df2484b8eb7347d1d233a73323300a70e141bd6 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 20 Jan 2018 04:23:46 +0900 Subject: [PATCH 063/622] =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=EB=A9=94=EC=9D=BC?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=EB=A5=BC=20=EC=9C=84=ED=95=B4=20?= =?UTF-8?q?@localhost=20=EC=82=AC=EC=9A=A9=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20String=20static=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/set.php | 2 +- f_func/class._String.php | 4 ++-- f_func/class._Validation.php | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/d_setting/set.php b/d_setting/set.php index 7627c9db..2405cdb0 100644 --- a/d_setting/set.php +++ b/d_setting/set.php @@ -6,6 +6,6 @@ sammo localhost 25 test -lemein +letmein @localhost */ diff --git a/f_func/class._String.php b/f_func/class._String.php index be0865eb..207f32f0 100644 --- a/f_func/class._String.php +++ b/f_func/class._String.php @@ -154,7 +154,7 @@ class _String { return $str; } - function Fill($str, $maxsize, $ch) { + static function Fill($str, $maxsize, $ch) { $size = strlen($str); $count = ($maxsize - $size) / 2; @@ -169,7 +169,7 @@ class _String { return $string; } - function Fill2($str, $maxsize, $ch='0') { + static function Fill2($str, $maxsize, $ch='0') { $size = strlen($str); $count = ($maxsize - $size); diff --git a/f_func/class._Validation.php b/f_func/class._Validation.php index 6e919202..0d7bd6bb 100644 --- a/f_func/class._Validation.php +++ b/f_func/class._Validation.php @@ -1,6 +1,6 @@ Date: Sat, 20 Jan 2018 04:32:15 +0900 Subject: [PATCH 064/622] =?UTF-8?q?phpmailer5=20=EC=B5=9C=EC=8B=A0?= =?UTF-8?q?=EB=B2=84=EC=A0=84=EC=9C=BC=EB=A1=9C=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- e_lib/phpmailer5/LICENSE | 2 +- e_lib/phpmailer5/LICENSE.orig | 504 -- e_lib/phpmailer5/PHPMailerAutoload.php | 49 + e_lib/phpmailer5/README | 218 - e_lib/phpmailer5/README.orig | 218 - e_lib/phpmailer5/VERSION | 1 + e_lib/phpmailer5/changelog.txt | 415 -- e_lib/phpmailer5/class.phpmailer.php | 6371 ++++++++++------- e_lib/phpmailer5/class.phpmaileroauth.php | 197 + .../phpmailer5/class.phpmaileroauthgoogle.php | 77 + e_lib/phpmailer5/class.pop3.php | 747 +- e_lib/phpmailer5/class.smtp.php | 1909 +++-- e_lib/phpmailer5/composer.json | 61 + e_lib/phpmailer5/composer.lock | 3593 ++++++++++ e_lib/phpmailer5/docs.ini | 92 - e_lib/phpmailer5/docs.ini.orig | 92 - e_lib/phpmailer5/get_oauth_token.php | 162 + f_func/class._Mail.php | 1 + 18 files changed, 9669 insertions(+), 5040 deletions(-) delete mode 100644 e_lib/phpmailer5/LICENSE.orig create mode 100644 e_lib/phpmailer5/PHPMailerAutoload.php delete mode 100644 e_lib/phpmailer5/README delete mode 100644 e_lib/phpmailer5/README.orig create mode 100644 e_lib/phpmailer5/VERSION delete mode 100644 e_lib/phpmailer5/changelog.txt create mode 100644 e_lib/phpmailer5/class.phpmaileroauth.php create mode 100644 e_lib/phpmailer5/class.phpmaileroauthgoogle.php create mode 100644 e_lib/phpmailer5/composer.json create mode 100644 e_lib/phpmailer5/composer.lock delete mode 100644 e_lib/phpmailer5/docs.ini delete mode 100644 e_lib/phpmailer5/docs.ini.orig create mode 100644 e_lib/phpmailer5/get_oauth_token.php diff --git a/e_lib/phpmailer5/LICENSE b/e_lib/phpmailer5/LICENSE index f3f1b3b6..8e0763d1 100644 --- a/e_lib/phpmailer5/LICENSE +++ b/e_lib/phpmailer5/LICENSE @@ -312,7 +312,7 @@ of these things: from a designated place, offer equivalent access to copy the above specified materials from the same place. - e) Verify that the user has already received a copy of these + e) verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the diff --git a/e_lib/phpmailer5/LICENSE.orig b/e_lib/phpmailer5/LICENSE.orig deleted file mode 100644 index f3f1b3b6..00000000 --- a/e_lib/phpmailer5/LICENSE.orig +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/e_lib/phpmailer5/PHPMailerAutoload.php b/e_lib/phpmailer5/PHPMailerAutoload.php new file mode 100644 index 00000000..eaa2e303 --- /dev/null +++ b/e_lib/phpmailer5/PHPMailerAutoload.php @@ -0,0 +1,49 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailer SPL autoloader. + * @param string $classname The name of the class to load + */ +function PHPMailerAutoload($classname) +{ + //Can't use __DIR__ as it's only in PHP 5.3+ + $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; + if (is_readable($filename)) { + require $filename; + } +} + +if (version_compare(PHP_VERSION, '5.1.2', '>=')) { + //SPL autoloading was introduced in PHP 5.1.2 + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { + spl_autoload_register('PHPMailerAutoload', true, true); + } else { + spl_autoload_register('PHPMailerAutoload'); + } +} else { + /** + * Fall back to traditional autoload for old PHP versions + * @param string $classname The name of the class to load + */ + function __autoload($classname) + { + PHPMailerAutoload($classname); + } +} diff --git a/e_lib/phpmailer5/README b/e_lib/phpmailer5/README deleted file mode 100644 index 8d48dc05..00000000 --- a/e_lib/phpmailer5/README +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************* -* The http://phpmailer.codeworxtech.com/ website now carries a few * -* advertisements through the Google Adsense network. Please visit * -* the advertiser sites and help us offset some of our costs. * -* Thanks .... * -********************************************************************/ - -PHPMailer -Full Featured Email Transfer Class for PHP -========================================== - -Version 5.0.0 (April 02, 2009) - -With the release of this version, we are initiating a new version numbering -system to differentiate from the PHP4 version of PHPMailer. - -Most notable in this release is fully object oriented code. - -We now have available the PHPDocumentor (phpdocs) documentation. This is -separate from the regular download to keep file sizes down. Please see the -download area of http://phpmailer.codeworxtech.com. - -We also have created a new test script (see /test_script) that you can use -right out of the box. Copy the /test_script folder directly to your server (in -the same structure ... with class.phpmailer.php and class.smtp.php in the -folder above it. Then launch the test script with: -http://www.yourdomain.com/phpmailer/test_script/index.php -from this one script, you can test your server settings for mail(), sendmail (or -qmail), and SMTP. This will email you a sample email (using contents.html for -the email body) and two attachments. One of the attachments is used as an inline -image to demonstrate how PHPMailer will automatically detect if attachments are -the same source as inline graphics and only include one version. Once you click -the Submit button, the results will be displayed including any SMTP debug -information and send status. We will also display a version of the script that -you can cut and paste to include in your projects. Enjoy! - -Version 2.3 (November 08, 2008) - -We have removed the /phpdoc from the downloads. All documentation is now on -the http://phpmailer.codeworxtech.com website. - -The phpunit.php has been updated to support PHP5. - -For all other changes and notes, please see the changelog. - -Donations are accepted at PayPal with our id "paypal@worxteam.com". - -Version 2.2 (July 15 2008) - -- see the changelog. - -Version 2.1 (June 04 2008) - -With this release, we are announcing that the development of PHPMailer for PHP5 -will be our focus from this date on. We have implemented all the enhancements -and fixes from the latest release of PHPMailer for PHP4. - -Far more important, though, is that this release of PHPMailer (v2.1) is -fully tested with E_STRICT error checking enabled. - -** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. - IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE - APPRECIATED. - -We have now added S/MIME functionality (ability to digitally sign emails). -BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. -The "Signed Emails" functionality adds the Sign method to pass the private key -filename and the password to read it, and then email will be sent with -content-type multipart/signed and with the digital signature attached. - -A quick note on E_STRICT: - -- In about half the test environments the development version was subjected - to, an error was thrown for the date() functions (used at line 1565 and 1569). - This is NOT a PHPMailer error, it is the result of an incorrectly configured - PHP5 installation. The fix is to modify your 'php.ini' file and include the - date.timezone = America/New York - directive, (for your own server timezone) -- If you do get this error, and are unable to access your php.ini file, there is - a workaround. In your PHP script, add - date_default_timezone_set('America/Toronto'); - - * do NOT try to use - $myVar = date_default_timezone_get(); - as a test, it will throw an error. - -We have also included more example files to show the use of "sendmail", "mail()", -"smtp", and "gmail". - -We are also looking for more programmers to join the volunteer development team. -If you have an interest in this, please let us know. - -Enjoy! - - -Version 2.1.0beta1 & beta2 - -please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS -INTENDED STRICTLY FOR TESTING - -** NOTE: - -As of November 2007, PHPMailer has a new project team headed by industry -veteran Andy Prevost (codeworxtech). The first release in more than two -years will focus on fixes, adding ease-of-use enhancements, provide -basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility -features. A new release is planned before year-end 2007 that will provide -full compatiblity with PHP4 and PHP5, as well as more bug fixes. - -We are looking for project developers to assist in restoring PHPMailer to -its leadership position. Our goals are to simplify use of PHPMailer, provide -good documentation and examples, and retain backward compatibility to level -1.7.3 standards. - -If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer -and indicate your interest. - -** - -http://phpmailer.sourceforge.net/ - -This software is licenced under the LGPL. Please read LICENSE for information on the -software availability and distribution. - -Class Features: -- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs -- Redundant SMTP servers -- Multipart/alternative emails for mail clients that do not read HTML email -- Support for 8bit, base64, binary, and quoted-printable encoding -- Uses the same methods as the very popular AspEmail active server (COM) component -- SMTP authentication -- Native language support -- Word wrap, and more! - -Why you might need it: - -Many PHP developers utilize email in their code. The only PHP function -that supports this is the mail() function. However, it does not expose -any of the popular features that many email clients use nowadays like -HTML-based emails and attachments. There are two proprietary -development tools out there that have all the functionality built into -easy to use classes: AspEmail(tm) and AspMail. Both of these -programs are COM components only available on Windows. They are also a -little pricey for smaller projects. - -Since I do Linux development I�ve missed these tools for my PHP coding. -So I built a version myself that implements the same methods (object -calls) that the Windows-based components do. It is open source and the -LGPL license allows you to place the class in your proprietary PHP -projects. - - -Installation: - -Copy class.phpmailer.php into your php.ini include_path. If you are -using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call -the PHPMailer SetLanguage method like so: - -// To load the Portuguese version -$mail->SetLanguage("br", "/optional/path/to/language/directory/"); - -That's it. You should now be ready to use PHPMailer! - - -A Simple Example: - -IsSMTP(); // set mailer to use SMTP -$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true; // turn on SMTP authentication -$mail->Username = "jswan"; // SMTP username -$mail->Password = "secret"; // SMTP password - -$mail->From = "from@example.com"; -$mail->FromName = "Mailer"; -$mail->AddAddress("josh@example.net", "Josh Adams"); -$mail->AddAddress("ellen@example.com"); // name is optional -$mail->AddReplyTo("info@example.com", "Information"); - -$mail->WordWrap = 50; // set word wrap to 50 characters -$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments -$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name -$mail->IsHTML(true); // set email format to HTML - -$mail->Subject = "Here is the subject"; -$mail->Body = "This is the HTML message body in bold!"; -$mail->AltBody = "This is the body in plain text for non-HTML mail clients"; - -if(!$mail->Send()) -{ - echo "Message could not be sent.

"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> - -CHANGELOG - -See ChangeLog.txt - -Download: http://sourceforge.net/project/showfiles.php?group_id=26031 - -Andy Prevost diff --git a/e_lib/phpmailer5/README.orig b/e_lib/phpmailer5/README.orig deleted file mode 100644 index 8d48dc05..00000000 --- a/e_lib/phpmailer5/README.orig +++ /dev/null @@ -1,218 +0,0 @@ -/******************************************************************* -* The http://phpmailer.codeworxtech.com/ website now carries a few * -* advertisements through the Google Adsense network. Please visit * -* the advertiser sites and help us offset some of our costs. * -* Thanks .... * -********************************************************************/ - -PHPMailer -Full Featured Email Transfer Class for PHP -========================================== - -Version 5.0.0 (April 02, 2009) - -With the release of this version, we are initiating a new version numbering -system to differentiate from the PHP4 version of PHPMailer. - -Most notable in this release is fully object oriented code. - -We now have available the PHPDocumentor (phpdocs) documentation. This is -separate from the regular download to keep file sizes down. Please see the -download area of http://phpmailer.codeworxtech.com. - -We also have created a new test script (see /test_script) that you can use -right out of the box. Copy the /test_script folder directly to your server (in -the same structure ... with class.phpmailer.php and class.smtp.php in the -folder above it. Then launch the test script with: -http://www.yourdomain.com/phpmailer/test_script/index.php -from this one script, you can test your server settings for mail(), sendmail (or -qmail), and SMTP. This will email you a sample email (using contents.html for -the email body) and two attachments. One of the attachments is used as an inline -image to demonstrate how PHPMailer will automatically detect if attachments are -the same source as inline graphics and only include one version. Once you click -the Submit button, the results will be displayed including any SMTP debug -information and send status. We will also display a version of the script that -you can cut and paste to include in your projects. Enjoy! - -Version 2.3 (November 08, 2008) - -We have removed the /phpdoc from the downloads. All documentation is now on -the http://phpmailer.codeworxtech.com website. - -The phpunit.php has been updated to support PHP5. - -For all other changes and notes, please see the changelog. - -Donations are accepted at PayPal with our id "paypal@worxteam.com". - -Version 2.2 (July 15 2008) - -- see the changelog. - -Version 2.1 (June 04 2008) - -With this release, we are announcing that the development of PHPMailer for PHP5 -will be our focus from this date on. We have implemented all the enhancements -and fixes from the latest release of PHPMailer for PHP4. - -Far more important, though, is that this release of PHPMailer (v2.1) is -fully tested with E_STRICT error checking enabled. - -** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. - IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE - APPRECIATED. - -We have now added S/MIME functionality (ability to digitally sign emails). -BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. -The "Signed Emails" functionality adds the Sign method to pass the private key -filename and the password to read it, and then email will be sent with -content-type multipart/signed and with the digital signature attached. - -A quick note on E_STRICT: - -- In about half the test environments the development version was subjected - to, an error was thrown for the date() functions (used at line 1565 and 1569). - This is NOT a PHPMailer error, it is the result of an incorrectly configured - PHP5 installation. The fix is to modify your 'php.ini' file and include the - date.timezone = America/New York - directive, (for your own server timezone) -- If you do get this error, and are unable to access your php.ini file, there is - a workaround. In your PHP script, add - date_default_timezone_set('America/Toronto'); - - * do NOT try to use - $myVar = date_default_timezone_get(); - as a test, it will throw an error. - -We have also included more example files to show the use of "sendmail", "mail()", -"smtp", and "gmail". - -We are also looking for more programmers to join the volunteer development team. -If you have an interest in this, please let us know. - -Enjoy! - - -Version 2.1.0beta1 & beta2 - -please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS -INTENDED STRICTLY FOR TESTING - -** NOTE: - -As of November 2007, PHPMailer has a new project team headed by industry -veteran Andy Prevost (codeworxtech). The first release in more than two -years will focus on fixes, adding ease-of-use enhancements, provide -basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility -features. A new release is planned before year-end 2007 that will provide -full compatiblity with PHP4 and PHP5, as well as more bug fixes. - -We are looking for project developers to assist in restoring PHPMailer to -its leadership position. Our goals are to simplify use of PHPMailer, provide -good documentation and examples, and retain backward compatibility to level -1.7.3 standards. - -If you are interested in helping out, visit http://sourceforge.net/projects/phpmailer -and indicate your interest. - -** - -http://phpmailer.sourceforge.net/ - -This software is licenced under the LGPL. Please read LICENSE for information on the -software availability and distribution. - -Class Features: -- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs -- Redundant SMTP servers -- Multipart/alternative emails for mail clients that do not read HTML email -- Support for 8bit, base64, binary, and quoted-printable encoding -- Uses the same methods as the very popular AspEmail active server (COM) component -- SMTP authentication -- Native language support -- Word wrap, and more! - -Why you might need it: - -Many PHP developers utilize email in their code. The only PHP function -that supports this is the mail() function. However, it does not expose -any of the popular features that many email clients use nowadays like -HTML-based emails and attachments. There are two proprietary -development tools out there that have all the functionality built into -easy to use classes: AspEmail(tm) and AspMail. Both of these -programs are COM components only available on Windows. They are also a -little pricey for smaller projects. - -Since I do Linux development I�ve missed these tools for my PHP coding. -So I built a version myself that implements the same methods (object -calls) that the Windows-based components do. It is open source and the -LGPL license allows you to place the class in your proprietary PHP -projects. - - -Installation: - -Copy class.phpmailer.php into your php.ini include_path. If you are -using the SMTP mailer then place class.smtp.php in your path as well. -In the language directory you will find several files like -phpmailer.lang-en.php. If you look right before the .php extension -that there are two letters. These represent the language type of the -translation file. For instance "en" is the English file and "br" is -the Portuguese file. Chose the file that best fits with your language -and place it in the PHP include path. If your language is English -then you have nothing more to do. If it is a different language then -you must point PHPMailer to the correct translation. To do this, call -the PHPMailer SetLanguage method like so: - -// To load the Portuguese version -$mail->SetLanguage("br", "/optional/path/to/language/directory/"); - -That's it. You should now be ready to use PHPMailer! - - -A Simple Example: - -IsSMTP(); // set mailer to use SMTP -$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true; // turn on SMTP authentication -$mail->Username = "jswan"; // SMTP username -$mail->Password = "secret"; // SMTP password - -$mail->From = "from@example.com"; -$mail->FromName = "Mailer"; -$mail->AddAddress("josh@example.net", "Josh Adams"); -$mail->AddAddress("ellen@example.com"); // name is optional -$mail->AddReplyTo("info@example.com", "Information"); - -$mail->WordWrap = 50; // set word wrap to 50 characters -$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments -$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name -$mail->IsHTML(true); // set email format to HTML - -$mail->Subject = "Here is the subject"; -$mail->Body = "This is the HTML message body in bold!"; -$mail->AltBody = "This is the body in plain text for non-HTML mail clients"; - -if(!$mail->Send()) -{ - echo "Message could not be sent.

"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> - -CHANGELOG - -See ChangeLog.txt - -Download: http://sourceforge.net/project/showfiles.php?group_id=26031 - -Andy Prevost diff --git a/e_lib/phpmailer5/VERSION b/e_lib/phpmailer5/VERSION new file mode 100644 index 00000000..f0fb1a22 --- /dev/null +++ b/e_lib/phpmailer5/VERSION @@ -0,0 +1 @@ +5.2.26 diff --git a/e_lib/phpmailer5/changelog.txt b/e_lib/phpmailer5/changelog.txt deleted file mode 100644 index 76c75cf2..00000000 --- a/e_lib/phpmailer5/changelog.txt +++ /dev/null @@ -1,415 +0,0 @@ -ChangeLog - -NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5/PHP6. - IT WILL NOT WORK WITH PHP4. - -Version 5.2 (July 19, 2011) -* protected MIME body and header -* better DKIM DNS Resource Record support -* better aly handling -* htmlfilter class added to extras -* moved to Apache Extras - -Version 5.1 (October 20, 2009) -* fixed filename issue with AddStringAttachment (thanks to Tony) -* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in - addition to PHP mail() -* added DKIM digital signing functionality - New properties: - - DKIM_domain (sets the domain name) - - DKIM_private (holds DKIM private key) - - DKIM_passphrase (holds your DKIM passphrase) - - DKIM_selector (holds the DKIM "selector") - - DKIM_identity (holds the identifying email address) -* added callback function support - - callback function parameters include: - result, to, cc, bcc, subject and body - * see the test/test_callback.php file for usage. -* added "auto" identity functionality - - can automatically add: - - Return-path (if Sender not set) - - Reply-To (if ReplyTo not set) - - can be disabled: - - $mail->SetFrom('yourname@yourdomain.com','First Last',false); - - or by adding the $mail->Sender and/or $mail->ReplyTo properties - Note: "auto" identity added to help with emails ending up in spam - or junk boxes because of missing headers - -Version 5.0.2 (May 24, 2009) -* Fix for missing attachments when inline graphics are present -* Fix for missing Cc in header when using SMTP (mail was sent, - but not displayed in header -- Cc receiver only saw email To: - line and no Cc line, but did get the email (To receiver - saw same) - -Version 5.0.1 (April 05, 2009) -* Temporary fix for missing attachments - -Version 5.0.0 (April 02, 2009) - -* With the release of this version, we are initiating a new version numbering - system to differentiate from the PHP4 version of PHPMailer. -* Most notable in this release is fully object oriented code. -class.smtp.php: -* Refactored class.smtp.php to support new exception handling - code size reduced from 29.2 Kb to 25.6 Kb -* Removed unnecessary functions from class.smtp.php: - public function Expand($name) { - public function Help($keyword="") { - public function Noop() { - public function Send($from) { - public function SendOrMail($from) { - public function Verify($name) { -class.phpmailer.php: -* Refactored class.phpmailer.php with new exception handling -* Changed processing functionality of Sendmail and Qmail so they cannot be - inadvertently used -* removed getFile() function, just became a simple wrapper for - file_get_contents() -* added check for PHP version (will gracefully exit if not at least PHP 5.0) -class.phpmailer.php enhancements -* enhanced code to check if an attachment source is the same as an embedded or - inline graphic source to eliminate duplicate attachments -New /test_script -* We have written a test script you can use to test the script as part of your - installation. Once you press submit, the test script will send a multi-mime - email with either the message you type in or an HTML email with an inline - graphic. Two attachments are included in the email (one of the attachments - is also the inline graphic so you can see that only one copy of the graphic - is sent in the email). The test script will also display the functional - script that you can copy/paste to your editor to duplicate the functionality. -New examples -* All new examples in both basic and advanced modes. Advanced examples show - Exception handling. -PHPDocumentator (phpdocs) documentation for PHPMailer version 5.0.0 -* all new documentation - -Please note: the website has been updated to reflect the changes in PHPMailer -version 5.0.0. http://phpmailer.codeworxtech.com/ - -Version 2.3 (November 06, 2008) - -* added Arabic language (many thanks to Bahjat Al Mostafa) -* removed English language from language files and made it a default within - class.phpmailer.php - if no language is found, it will default to use - the english language translation -* fixed public/private declarations -* corrected line 1728, $basedir to $directory -* added $sign_cert_file to avoid improper duplicate use of $sign_key_file -* corrected $this->Hello on line 612 to $this->Helo -* changed default of $LE to "\r\n" to comply with RFC 2822. Can be set by the user - if default is not acceptable -* removed trim() from return results in EncodeQP -* /test and three files it contained are removed from version 2.3 -* fixed phpunit.php for compliance with PHP5 -* changed $this->AltBody = $textMsg; to $this->AltBody = html_entity_decode($textMsg); -* We have removed the /phpdoc from the downloads. All documentation is now on - the http://phpmailer.codeworxtech.com website. - -Version 2.2.1 () July 19 2008 - -* fixed line 1092 in class.smtp.php (my apologies, error on my part) - -Version 2.2 () July 15 2008 - -* Fixed redirect issue (display of UTF-8 in thank you redirect) -* fixed error in getResponse function declaration (class.pop3.php) -* PHPMailer now PHP6 compliant -* fixed line 1092 in class.smtp.php (endless loop from missing = sign) - -Version 2.1 (Wed, June 04 2008) - -** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. - IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE - APPRECIATED. - -* added S/MIME functionality (ability to digitally sign emails) - BIG THANKS TO "sergiocambra" for posting this patch back in November 2007. - The "Signed Emails" functionality adds the Sign method to pass the private key - filename and the password to read it, and then email will be sent with - content-type multipart/signed and with the digital signature attached. -* fully compatible with E_STRICT error level - - Please note: - In about half the test environments this development version was subjected - to, an error was thrown for the date() functions used (line 1565 and 1569). - This is NOT a PHPMailer error, it is the result of an incorrectly configured - PHP5 installation. The fix is to modify your 'php.ini' file and include the - date.timezone = America/New York - directive, to your own server timezone - - If you do get this error, and are unable to access your php.ini file: - In your PHP script, add - date_default_timezone_set('America/Toronto'); - - do not try to use - $myVar = date_default_timezone_get(); - as a test, it will throw an error. -* added ability to define path (mainly for embedded images) - function MsgHTML($message,$basedir='') ... where: - $basedir is the fully qualified path -* fixed MsgHTML() function: - - Embedded Images where images are specified by :// will not be altered or embedded -* fixed the return value of SMTP exit code ( pclose ) -* addressed issue of multibyte characters in subject line and truncating -* added ability to have user specified Message ID - (default is still that PHPMailer create a unique Message ID) -* corrected unidentified message type to 'application/octet-stream' -* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al). -* added check for added attachments -* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny") - -Version 2.1.0beta2 (Sun, Dec 02 2007) -* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon) -* finished all testing, all known bugs corrected, enhancements tested -- note: will NOT work with PHP4. - -please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS -INTENDED STRICTLY FOR TESTING - -Version 2.1.0beta1 -please note, this is BETA software -** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS -INTENDED STRICTLY FOR TESTING - -Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release -* implements new property to control VERP in class.smtp.php - example (requires instantiating class.smtp.php): - $mail->do_verp = true; -* POP-before-SMTP functionality included, thanks to Richard Davey - (see class.pop3.php & pop3_before_smtp_test.php for examples) -* included example showing how to use PHPMailer with GMAIL -* fixed the missing Cc in SendMail() and Mail() - -****************** -A note on sending bulk emails: - -If the email you are sending is not personalized, consider using the -"undisclosed-recipient:;" strategy. That is, put all of your recipients -in the Bcc field and set the To field to "undisclosed-recipients:;". -It's a lot faster (only one send) and saves quite a bit on resources. -Contrary to some opinions, this will not get you listed in spam engines - -it's a legitimate way for you to send emails. - -A partial example for use with PHPMailer: - -$mail->AddAddress("undisclosed-recipients:;"); -$mail->AddBCC("email1@anydomain.com,email2@anyotherdomain.com,email3@anyalternatedomain.com"); - -Many email service providers restrict the number of emails that can be sent -in any given time period. Often that is between 50 - 60 emails maximum -per hour or per send session. - -If that's the case, then break up your Bcc lists into chunks that are one -less than your limit, and put a pause in your script. -******************* - -Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release -* dramatically simplified using inline graphics ... it's fully automated and requires no user input -* added automatic document type detection for attachments and pictures -* added MsgHTML() function to replace Body tag for HTML emails -* fixed the SendMail security issues (input validation vulnerability) -* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address -* removed the need to use the AltBody method (set from the HTML, or default text used) -* set the PHP Mail() function as the default (still support SendMail, SMTP Mail) -* removed the need to set the IsHTML property (set automatically) -* added Estonian language file by Indrek Päri -* added header injection patch -* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc. - example of use: - $mail->set('X-Priority', '3'); - $mail->set('X-MSMail-Priority', 'Normal'); -* fixed warning message in SMTP get_lines method -* added TLS/SSL SMTP support - example of use: - $mail = new PHPMailer(); - $mail->Mailer = "smtp"; - $mail->Host = "smtp.example.com"; - $mail->SMTPSecure = "tls"; // option - //$mail->SMTPSecure = "ssl"; // option - ... - $mail->Send(); -* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7) -* Works with PHP installed as a module or as CGI-PHP -- NOTE: will NOT work with PHP5 in E_STRICT error mode - -Version 1.73 (Sun, Jun 10 2005) -* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf -* Now has a total of 20 translations -* Fixed alt attachments bug: http://tinyurl.com/98u9k - -Version 1.72 (Wed, May 25 2004) -* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. -* Received: Removed this method because spam filter programs like -SpamAssassin reject this header. -* Fixed error count bug. -* SetLanguage default is now "language/". -* Fixed magic_quotes_runtime bug. - -Version 1.71 (Tue, Jul 28 2003) -* Made several speed enhancements -* Added German and Italian translation files -* Fixed HELO/AUTH bugs on keep-alive connects -* Now provides an error message if language file does not load -* Fixed attachment EOL bug -* Updated some unclear documentation -* Added additional tests and improved others - -Version 1.70 (Mon, Jun 20 2003) -* Added SMTP keep-alive support -* Added IsError method for error detection -* Added error message translation support (SetLanguage) -* Refactored many methods to increase library performance -* Hello now sends the newer EHLO message before HELO as per RFC 2821 -* Removed the boundary class and replaced it with GetBoundary -* Removed queue support methods -* New $Hostname variable -* New Message-ID header -* Received header reformat -* Helo variable default changed to $Hostname -* Removed extra spaces in Content-Type definition (#667182) -* Return-Path should be set to Sender when set -* Adds Q or B encoding to headers when necessary -* quoted-encoding should now encode NULs \000 -* Fixed encoding of body/AltBody (#553370) -* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) -* Multiple bug fixes - -Version 1.65 (Fri, Aug 09 2002) -* Fixed non-visible attachment bug (#585097) for Outlook -* SMTP connections are now closed after each transaction -* Fixed SMTP::Expand return value -* Converted SMTP class documentation to phpDocumentor format - -Version 1.62 (Wed, Jun 26 2002) -* Fixed multi-attach bug -* Set proper word wrapping -* Reduced memory use with attachments -* Added more debugging -* Changed documentation to phpDocumentor format - -Version 1.60 (Sat, Mar 30 2002) -* Sendmail pipe and address patch (Christian Holtje) -* Added embedded image and read confirmation support (A. Ognio) -* Added unit tests -* Added SMTP timeout support (*nix only) -* Added possibly temporary PluginDir variable for SMTP class -* Added LE message line ending variable -* Refactored boundary and attachment code -* Eliminated SMTP class warnings -* Added SendToQueue method for future queuing support - -Version 1.54 (Wed, Dec 19 2001) -* Add some queuing support code -* Fixed a pesky multi/alt bug -* Messages are no longer forced to have "To" addresses - -Version 1.50 (Thu, Nov 08 2001) -* Fix extra lines when not using SMTP mailer -* Set WordWrap variable to int with a zero default - -Version 1.47 (Tue, Oct 16 2001) -* Fixed Received header code format -* Fixed AltBody order error -* Fixed alternate port warning - -Version 1.45 (Tue, Sep 25 2001) -* Added enhanced SMTP debug support -* Added support for multiple ports on SMTP -* Added Received header for tracing -* Fixed AddStringAttachment encoding -* Fixed possible header name quote bug -* Fixed wordwrap() trim bug -* Couple other small bug fixes - -Version 1.41 (Wed, Aug 22 2001) -* Fixed AltBody bug w/o attachments -* Fixed rfc_date() for certain mail servers - -Version 1.40 (Sun, Aug 12 2001) -* Added multipart/alternative support (AltBody) -* Documentation update -* Fixed bug in Mercury MTA - -Version 1.29 (Fri, Aug 03 2001) -* Added AddStringAttachment() method -* Added SMTP authentication support - -Version 1.28 (Mon, Jul 30 2001) -* Fixed a typo in SMTP class -* Fixed header issue with Imail (win32) SMTP server -* Made fopen() calls for attachments use "rb" to fix win32 error - -Version 1.25 (Mon, Jul 02 2001) -* Added RFC 822 date fix (Patrice) -* Added improved error handling by adding a $ErrorInfo variable -* Removed MailerDebug variable (obsolete with new error handler) - -Version 1.20 (Mon, Jun 25 2001) -* Added quoted-printable encoding (Patrice) -* Set Version as public and removed PrintVersion() -* Changed phpdoc to only display public variables and methods - -Version 1.19 (Thu, Jun 21 2001) -* Fixed MS Mail header bug -* Added fix for Bcc problem with mail(). *Does not work on Win32* - (See PHP bug report: http://www.php.net/bugs.php?id=11616) -* mail() no longer passes a fifth parameter when not needed - -Version 1.15 (Fri, Jun 15 2001) -[Note: these changes contributed by Patrice Fournier] -* Changed all remaining \n to \r\n -* Bcc: header no longer writen to message except -when sent directly to sendmail -* Added a small message to non-MIME compliant mail reader -* Added Sender variable to change the Sender email -used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode -* Changed boundary setting to a place it will be set only once -* Removed transfer encoding for whole message when using multipart -* Message body now uses Encoding in multipart messages -* Can set encoding and type to attachments 7bit, 8bit -and binary attachment are sent as is, base64 are encoded -* Can set Encoding to base64 to send 8 bits body -through 7 bits servers - -Version 1.10 (Tue, Jun 12 2001) -* Fixed win32 mail header bug (printed out headers in message body) - -Version 1.09 (Fri, Jun 08 2001) -* Changed date header to work with Netscape mail programs -* Altered phpdoc documentation - -Version 1.08 (Tue, Jun 05 2001) -* Added enhanced error-checking -* Added phpdoc documentation to source - -Version 1.06 (Fri, Jun 01 2001) -* Added optional name for file attachments - -Version 1.05 (Tue, May 29 2001) -* Code cleanup -* Eliminated sendmail header warning message -* Fixed possible SMTP error - -Version 1.03 (Thu, May 24 2001) -* Fixed problem where qmail sends out duplicate messages - -Version 1.02 (Wed, May 23 2001) -* Added multiple recipient and attachment Clear* methods -* Added Sendmail public variable -* Fixed problem with loading SMTP library multiple times - -Version 0.98 (Tue, May 22 2001) -* Fixed problem with redundant mail hosts sending out multiple messages -* Added additional error handler code -* Added AddCustomHeader() function -* Added support for Microsoft mail client headers (affects priority) -* Fixed small bug with Mailer variable -* Added PrintVersion() function - -Version 0.92 (Tue, May 15 2001) -* Changed file names to class.phpmailer.php and class.smtp.php to match - current PHP class trend. -* Fixed problem where body not being printed when a message is attached -* Several small bug fixes - -Version 0.90 (Tue, April 17 2001) -* Intial public release diff --git a/e_lib/phpmailer5/class.phpmailer.php b/e_lib/phpmailer5/class.phpmailer.php index 2b994574..99f9092c 100644 --- a/e_lib/phpmailer5/class.phpmailer.php +++ b/e_lib/phpmailer5/class.phpmailer.php @@ -1,2473 +1,4044 @@ + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @version $Id: class.phpmailer.php 450 2010-06-23 16:46:33Z coolbru $ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. */ -if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n"); +/** + * PHPMailer - PHP email creation and transport class. + * @package PHPMailer + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + /** + * The PHPMailer Version number. + * @var string + */ + public $Version = '5.2.26'; -class PHPMailer { + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * @var integer + */ + public $Priority = null; - ///////////////////////////////////////////////// - // PROPERTIES, PUBLIC - ///////////////////////////////////////////////// + /** + * The character set of the message. + * @var string + */ + public $CharSet = 'iso-8859-1'; - /** - * Email priority (1 = High, 3 = Normal, 5 = low). - * @var int - */ - public $Priority = 3; + /** + * The MIME Content-type of the message. + * @var string + */ + public $ContentType = 'text/plain'; - /** - * Sets the CharSet of the message. - * @var string - */ - public $CharSet = 'iso-8859-1'; + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * @var string + */ + public $Encoding = '8bit'; - /** - * Sets the Content-type of the message. - * @var string - */ - public $ContentType = 'text/plain'; + /** + * Holds the most recent mailer error message. + * @var string + */ + public $ErrorInfo = ''; - /** - * Sets the Encoding of the message. Options for this are - * "8bit", "7bit", "binary", "base64", and "quoted-printable". - * @var string - */ - public $Encoding = '8bit'; + /** + * The From email address for the message. + * @var string + */ + public $From = 'root@localhost'; - /** - * Holds the most recent mailer error message. - * @var string - */ - public $ErrorInfo = ''; + /** + * The From name of the message. + * @var string + */ + public $FromName = 'Root User'; - /** - * Sets the From email address for the message. - * @var string - */ - public $From = 'root@localhost'; + /** + * The Sender email (Return-Path) of the message. + * If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. + * @var string + */ + public $Sender = ''; - /** - * Sets the From name of the message. - * @var string - */ - public $FromName = 'Root User'; + /** + * The Return-Path of the message. + * If empty, it will be set to either From or Sender. + * @var string + * @deprecated Email senders should never set a return-path header; + * it's the receiver's job (RFC5321 section 4.4), so this no longer does anything. + * @link https://tools.ietf.org/html/rfc5321#section-4.4 RFC5321 reference + */ + public $ReturnPath = ''; - /** - * Sets the Sender email (Return-Path) of the message. If not empty, - * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. - * @var string - */ - public $Sender = ''; + /** + * The Subject of the message. + * @var string + */ + public $Subject = ''; - /** - * Sets the Subject of the message. - * @var string - */ - public $Subject = ''; + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * @var string + */ + public $Body = ''; - /** - * Sets the Body of the message. This can be either an HTML or text body. - * If HTML then run IsHTML(true). - * @var string - */ - public $Body = ''; + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * @var string + */ + public $AltBody = ''; - /** - * Sets the text-only body of the message. This automatically sets the - * email to multipart/alternative. This body can be read by mail - * clients that do not have HTML email capability such as mutt. Clients - * that can read HTML will view the normal Body. - * @var string - */ - public $AltBody = ''; + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal events, use the bundled extras/EasyPeasyICS.php class or iCalcreator + * @link http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @link http://kigkonsult.se/iCalcreator/ + * @var string + */ + public $Ical = ''; - /** - * Stores the complete compiled MIME message body. - * @var string - * @access protected - */ - protected $MIMEBody = ''; + /** + * The complete compiled MIME message body. + * @access protected + * @var string + */ + protected $MIMEBody = ''; - /** - * Stores the complete compiled MIME message headers. - * @var string - * @access protected - */ - protected $MIMEHeader = ''; + /** + * The complete compiled MIME message headers. + * @var string + * @access protected + */ + protected $MIMEHeader = ''; - /** - * Sets word wrapping on the body of the message to a given number of - * characters. - * @var int - */ - public $WordWrap = 0; + /** + * Extra headers that createHeader() doesn't fold in. + * @var string + * @access protected + */ + protected $mailHeader = ''; - /** - * Method to send mail: ("mail", "sendmail", or "smtp"). - * @var string - */ - public $Mailer = 'mail'; + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * @var integer + */ + public $WordWrap = 0; - /** - * Sets the path of the sendmail program. - * @var string - */ - public $Sendmail = '/usr/sbin/sendmail'; + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * @var string + */ + public $Mailer = 'mail'; - /** - * Path to PHPMailer plugins. Useful if the SMTP class - * is in a different directory than the PHP include path. - * @var string - */ - public $PluginDir = ''; + /** + * The path to the sendmail program. + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; - /** - * Sets the email address that a reading confirmation will be sent. - * @var string - */ - public $ConfirmReadingTo = ''; + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * @var boolean + */ + public $UseSendmailOptions = true; - /** - * Sets the hostname to use in Message-Id and Received headers - * and as default HELO string. If empty, the value returned - * by SERVER_NAME is used or 'localhost.localdomain'. - * @var string - */ - public $Hostname = ''; + /** + * Path to PHPMailer plugins. + * Useful if the SMTP class is not in the PHP include path. + * @var string + * @deprecated Should not be needed now there is an autoloader. + */ + public $PluginDir = ''; - /** - * Sets the message ID to be used in the Message-Id header. - * If empty, a unique id will be generated. - * @var string - */ - public $MessageID = ''; + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * @var string + */ + public $ConfirmReadingTo = ''; - ///////////////////////////////////////////////// - // PROPERTIES FOR SMTP - ///////////////////////////////////////////////// + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * @var string + */ + public $Hostname = ''; - /** - * Sets the SMTP hosts. All hosts must be separated by a - * semicolon. You can also specify a different port - * for each host by using this format: [hostname:port] - * (e.g. "smtp1.example.com:25;smtp2.example.com"). - * Hosts will be tried in order. - * @var string - */ - public $Host = 'localhost'; + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * @var string + */ + public $MessageID = ''; - /** - * Sets the default SMTP server port. - * @var int - */ - public $Port = 25; + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * @var string + */ + public $MessageDate = ''; - /** - * Sets the SMTP HELO of the message (Default is $Hostname). - * @var string - */ - public $Helo = ''; + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * @var string + */ + public $Host = 'localhost'; - /** - * Sets connection prefix. - * Options are "", "ssl" or "tls" - * @var string - */ - public $SMTPSecure = ''; + /** + * The default SMTP server port. + * @var integer + * @TODO Why is this needed when the SMTP class takes care of it? + */ + public $Port = 25; - /** - * Sets SMTP authentication. Utilizes the Username and Password variables. - * @var bool - */ - public $SMTPAuth = false; + /** + * The SMTP HELO of the message. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * @var string + * @see PHPMailer::$Hostname + */ + public $Helo = ''; - /** - * Sets SMTP username. - * @var string - */ - public $Username = ''; + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', 'ssl' or 'tls' + * @var string + */ + public $SMTPSecure = ''; - /** - * Sets SMTP password. - * @var string - */ - public $Password = ''; + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * @var boolean + */ + public $SMTPAutoTLS = true; - /** - * Sets the SMTP server timeout in seconds. - * This function will not work with the win32 version. - * @var int - */ - public $Timeout = 10; + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * @var boolean + * @see PHPMailer::$Username + * @see PHPMailer::$Password + */ + public $SMTPAuth = false; - /** - * Sets SMTP class debugging on or off. - * @var bool - */ - public $SMTPDebug = false; + /** + * Options array passed to stream_context_create when connecting via SMTP. + * @var array + */ + public $SMTPOptions = array(); - /** - * Prevents the SMTP connection from being closed after each mail - * sending. If this is set to true then to close the connection - * requires an explicit call to SmtpClose(). - * @var bool - */ - public $SMTPKeepAlive = false; + /** + * SMTP username. + * @var string + */ + public $Username = ''; - /** - * Provides the ability to have the TO field process individual - * emails, instead of sending to entire TO addresses - * @var bool - */ - public $SingleTo = false; + /** + * SMTP password. + * @var string + */ + public $Password = ''; - /** - * If SingleTo is true, this provides the array to hold the email addresses - * @var bool - */ - public $SingleToArray = array(); + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified + * @var string + */ + public $AuthType = ''; - /** - * Provides the ability to change the line ending - * @var string - */ - public $LE = "\n"; + /** + * SMTP realm. + * Used for NTLM auth + * @var string + */ + public $Realm = ''; - /** - * Used with DKIM DNS Resource Record - * @var string - */ - public $DKIM_selector = 'phpmailer'; + /** + * SMTP workstation. + * Used for NTLM auth + * @var string + */ + public $Workstation = ''; - /** - * Used with DKIM DNS Resource Record - * optional, in format of email address 'you@yourdomain.com' - * @var string - */ - public $DKIM_identity = ''; + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * @var integer + */ + public $Timeout = 300; - /** - * Used with DKIM DNS Resource Record - * @var string - */ - public $DKIM_passphrase = ''; + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * * `0` No output + * * `1` Commands + * * `2` Data and commands + * * `3` As 2 plus connection status + * * `4` Low-level data output + * @var integer + * @see SMTP::$do_debug + */ + public $SMTPDebug = 0; - /** - * Used with DKIM DNS Resource Record - * optional, in format of email address 'you@yourdomain.com' - * @var string - */ - public $DKIM_domain = ''; + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * + * @var string|callable + * @see SMTP::$Debugoutput + */ + public $Debugoutput = 'echo'; - /** - * Used with DKIM DNS Resource Record - * optional, in format of email address 'you@yourdomain.com' - * @var string - */ - public $DKIM_private = ''; + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * @var boolean + */ + public $SMTPKeepAlive = false; - /** - * Callback Action function name - * the function that handles the result of the send email action. Parameters: - * bool $result result of the send action - * string $to email address of the recipient - * string $cc cc email addresses - * string $bcc bcc email addresses - * string $subject the subject - * string $body the email body - * @var string - */ - public $action_function = ''; //'callbackAction'; + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * @var boolean + */ + public $SingleTo = false; - /** - * Sets the PHPMailer Version number - * @var string - */ - public $Version = '5.2'; + /** + * Storage for addresses when SingleTo is enabled. + * @var array + * @TODO This should really not be public + */ + public $SingleToArray = array(); - /** - * What to use in the X-Mailer header - * @var string - */ - public $XMailer = ''; + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * @link https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link http://www.postfix.org/VERP_README.html Postfix VERP info + * @var boolean + */ + public $do_verp = false; - ///////////////////////////////////////////////// - // PROPERTIES, PRIVATE AND PROTECTED - ///////////////////////////////////////////////// + /** + * Whether to allow sending messages with an empty body. + * @var boolean + */ + public $AllowEmpty = false; - protected $smtp = NULL; - protected $to = array(); - protected $cc = array(); - protected $bcc = array(); - protected $ReplyTo = array(); - protected $all_recipients = array(); - protected $attachment = array(); - protected $CustomHeader = array(); - protected $message_type = ''; - protected $boundary = array(); - protected $language = array(); - protected $error_count = 0; - protected $sign_cert_file = ''; - protected $sign_key_file = ''; - protected $sign_key_pass = ''; - protected $exceptions = false; + /** + * The default line ending. + * @note The default remains "\n". We force CRLF where we know + * it must be used via self::CRLF. + * @var string + */ + public $LE = "\n"; - ///////////////////////////////////////////////// - // CONSTANTS - ///////////////////////////////////////////////// + /** + * DKIM selector. + * @var string + */ + public $DKIM_selector = ''; - const STOP_MESSAGE = 0; // message only, continue processing - const STOP_CONTINUE = 1; // message?, likely ok to continue processing - const STOP_CRITICAL = 2; // message, plus full stop, critical error reached + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * @var string + */ + public $DKIM_identity = ''; - ///////////////////////////////////////////////// - // METHODS, VARIABLES - ///////////////////////////////////////////////// + /** + * DKIM passphrase. + * Used if your key is encrypted. + * @var string + */ + public $DKIM_passphrase = ''; - /** - * Constructor - * @param boolean $exceptions Should we throw external exceptions? - */ - public function __construct($exceptions = false) { - $this->exceptions = ($exceptions == true); - } + /** + * DKIM signing domain name. + * @example 'example.com' + * @var string + */ + public $DKIM_domain = ''; - /** - * Sets message type to HTML. - * @param bool $ishtml - * @return void - */ - public function IsHTML($ishtml = true) { - if ($ishtml) { - $this->ContentType = 'text/html'; - } else { - $this->ContentType = 'text/plain'; + /** + * DKIM private key file path. + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * If set, takes precedence over `$DKIM_private`. + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * boolean $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use + * @var string + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * @see PHPMailer::validateAddress() + * @var string|callable + * @static + */ + public static $validator = 'auto'; + + /** + * An instance of the SMTP sender class. + * @var SMTP + * @access protected + */ + protected $smtp = null; + + /** + * The array of 'to' names and addresses. + * @var array + * @access protected + */ + protected $to = array(); + + /** + * The array of 'cc' names and addresses. + * @var array + * @access protected + */ + protected $cc = array(); + + /** + * The array of 'bcc' names and addresses. + * @var array + * @access protected + */ + protected $bcc = array(); + + /** + * The array of reply-to names and addresses. + * @var array + * @access protected + */ + protected $ReplyTo = array(); + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc + * @var array + * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + */ + protected $all_recipients = array(); + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$to @see PHPMailer::$cc @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + */ + protected $RecipientsQueue = array(); + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * @var array + * @access protected + * @see PHPMailer::$ReplyTo + */ + protected $ReplyToQueue = array(); + + /** + * The array of attachments. + * @var array + * @access protected + */ + protected $attachment = array(); + + /** + * The array of custom headers. + * @var array + * @access protected + */ + protected $CustomHeader = array(); + + /** + * The most recent Message-ID (including angular brackets). + * @var string + * @access protected + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * @var string + * @access protected + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * @var array + * @access protected + */ + protected $boundary = array(); + + /** + * The array of available languages. + * @var array + * @access protected + */ + protected $language = array(); + + /** + * The number of errors encountered. + * @var integer + * @access protected + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * @var string + * @access protected + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * @var string + * @access protected + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * @var string + * @access protected + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * @var string + * @access protected + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * @var boolean + * @access protected + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * @var string + * @access protected + */ + protected $uniqueid = ''; + + /** + * Error severity: message only, continue processing. + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + */ + const STOP_CRITICAL = 2; + + /** + * SMTP RFC standard line ending. + */ + const CRLF = "\r\n"; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1 + * @var integer + */ + const MAX_LINE_LENGTH = 998; + + /** + * Constructor. + * @param boolean $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if ($exceptions !== null) { + $this->exceptions = (boolean)$exceptions; + } + //Pick an appropriate debug output format automatically + $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); } - } - /** - * Sets Mailer to send message using SMTP. - * @return void - */ - public function IsSMTP() { - $this->Mailer = 'smtp'; - } - - /** - * Sets Mailer to send message using PHP mail() function. - * @return void - */ - public function IsMail() { - $this->Mailer = 'mail'; - } - - /** - * Sets Mailer to send message using the $Sendmail program. - * @return void - */ - public function IsSendmail() { - if (!stristr(ini_get('sendmail_path'), 'sendmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); } - $this->Mailer = 'sendmail'; - } - /** - * Sets Mailer to send message using the qmail MTA. - * @return void - */ - public function IsQmail() { - if (stristr(ini_get('sendmail_path'), 'qmail')) { - $this->Sendmail = '/var/qmail/bin/sendmail'; + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do) + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string $params Params + * @access private + * @return boolean + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + + //Can't use additional_parameters in safe_mode, calling mail() with null params breaks + //@link http://php.net/manual/en/function.mail.php + if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + return $result; } - $this->Mailer = 'sendmail'; - } - - ///////////////////////////////////////////////// - // METHODS, RECIPIENTS - ///////////////////////////////////////////////// - - /** - * Adds a "To" address. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddAddress($address, $name = '') { - return $this->AddAnAddress('to', $address, $name); - } - - /** - * Adds a "Cc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddCC($address, $name = '') { - return $this->AddAnAddress('cc', $address, $name); - } - - /** - * Adds a "Bcc" address. - * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. - * @param string $address - * @param string $name - * @return boolean true on success, false if address already used - */ - public function AddBCC($address, $name = '') { - return $this->AddAnAddress('bcc', $address, $name); - } - - /** - * Adds a "Reply-to" address. - * @param string $address - * @param string $name - * @return boolean - */ - public function AddReplyTo($address, $name = '') { - return $this->AddAnAddress('ReplyTo', $address, $name); - } - - /** - * Adds an address to one of the recipient arrays - * Addresses that have been added already return false, but do not throw exceptions - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' - * @param string $address The email address to send to - * @param string $name - * @return boolean true on success, false if address already used or invalid in some way - * @access protected - */ - protected function AddAnAddress($kind, $address, $name = '') { - if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) { - $this->SetError($this->Lang('Invalid recipient array').': '.$kind); - if ($this->exceptions) { - throw new phpmailerException('Invalid recipient array: ' . $kind); - } - echo $this->Lang('Invalid recipient array').': '.$kind; - return false; + /** + * Output debugging info via user-defined method. + * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) + . "
\n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n?/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( + "\n", + "\n \t ", + trim($str) + ) . "\n"; + } } - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!self::ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - echo $this->Lang('invalid_address').': '.$address; - return false; + + /** + * Sets message type to HTML or plain. + * @param boolean $isHtml True for HTML mode. + * @return void + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = 'text/html'; + } else { + $this->ContentType = 'text/plain'; + } } - if ($kind != 'ReplyTo') { - if (!isset($this->all_recipients[strtolower($address)])) { - array_push($this->$kind, array($address, $name)); - $this->all_recipients[strtolower($address)] = true; + + /** + * Send messages using SMTP. + * @return void + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + * @return void + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + * @return void + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (!stristr($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + * @return void + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (!stristr($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * @note: This function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * @param string $address The email address to reply to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @throws phpmailerException + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (($pos = strrpos($address, '@')) === false) { + // At-sign is misssing. + $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + $params = array($kind, $address, $name); + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if ($this->has8bitChars(substr($address, ++$pos)) and $this->idnSupported()) { + if ($kind != 'Reply-To') { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + return true; + } + } else { + if (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + return true; + } + } + return false; + } + // Immediately add standard addresses without IDN. + return call_user_func_array(array($this, 'addAnAddress'), $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @throws phpmailerException + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, array('to', 'cc', 'bcc', 'Reply-To'))) { + $error_message = $this->lang('Invalid recipient kind: ') . $kind; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + if (!$this->validateAddress($address)) { + $error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + if ($kind != 'Reply-To') { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + array_push($this->$kind, array($address, $name)); + $this->all_recipients[strtolower($address)] = true; + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = array($address, $name); + return true; + } + } + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name

" into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * @return array + * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + */ + public function parseAddresses($addrstr, $useimap = true) + { + $addresses = array(); + if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + foreach ($list as $address) { + if ($address->host != '.SYNTAX-ERROR.') { + if ($this->validateAddress($address->mailbox . '@' . $address->host)) { + $addresses[] = array( + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host + ); + } + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if ($this->validateAddress($address)) { + $addresses[] = array( + 'name' => '', + 'address' => $address + ); + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + if ($this->validateAddress($email)) { + $addresses[] = array( + 'name' => trim(str_replace(array('"', "'"), '', $name)), + 'address' => $email + ); + } + } + } + } + return $addresses; + } + + /** + * Set the From and FromName properties. + * @param string $address + * @param string $name + * @param boolean $auto Whether to also set the Sender address, defaults to true + * @throws phpmailerException + * @return boolean + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + // Don't validate now addresses with IDN. Will be done in send(). + if (($pos = strrpos($address, '@')) === false or + (!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and + !$this->validateAddress($address)) { + $error_message = $this->lang('invalid_address') . " (setFrom) $address"; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->Sender)) { + $this->Sender = $address; + } + } return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = array($address, $name); - return true; } - } - return false; + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * @param string $address The email address to check + * @param string|callable $patternselect A selector for the validation pattern to use : + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * @return boolean + * @static + * @access public + */ + public static function validateAddress($address, $patternselect = null) + { + if (is_null($patternselect)) { + $patternselect = self::$validator; + } + if (is_callable($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { + return false; + } + if (!$patternselect or $patternselect == 'auto') { + //Check this constant first so it works when extension_loaded() is disabled by safe mode + //Constant was added in PHP 5.2.4 + if (defined('PCRE_VERSION')) { + //This pattern can get stuck in a recursive loop in PCRE <= 8.0.2 + if (version_compare(PCRE_VERSION, '8.0.3') >= 0) { + $patternselect = 'pcre8'; + } else { + $patternselect = 'pcre'; + } + } elseif (function_exists('extension_loaded') and extension_loaded('pcre')) { + //Fall back to older PCRE + $patternselect = 'pcre'; + } else { + //Filter_var appeared in PHP 5.2.0 and does not require the PCRE extension + if (version_compare(PHP_VERSION, '5.2.0') >= 0) { + $patternselect = 'php'; + } else { + $patternselect = 'noregex'; + } + } + } + switch ($patternselect) { + case 'pcre8': + /** + * Uses the same RFC5322 regex on which FILTER_VALIDATE_EMAIL is based, but allows dotless domains. + * @link http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (boolean)preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'pcre': + //An older regex that doesn't need a recent PCRE + return (boolean)preg_match( + '/^(?!(?>"?(?>\\\[ -~]|[^"])"?){255,})(?!(?>"?(?>\\\[ -~]|[^"])"?){65,}@)(?>' . + '[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*")' . + '(?>\.(?>[!#-\'*+\/-9=?^-~-]+|"(?>(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\xFF]))*"))*' . + '@(?>(?![a-z0-9-]{64,})(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>\.(?![a-z0-9-]{64,})' . + '(?>[a-z0-9](?>[a-z0-9-]*[a-z0-9])?)){0,126}|\[(?:(?>IPv6:(?>(?>[a-f0-9]{1,4})(?>:' . + '[a-f0-9]{1,4}){7}|(?!(?:.*[a-f0-9][:\]]){8,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?' . + '::(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,6})?))|(?>(?>IPv6:(?>[a-f0-9]{1,4}(?>:' . + '[a-f0-9]{1,4}){5}:|(?!(?:.*[a-f0-9]:){6,})(?>[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4})?' . + '::(?>(?:[a-f0-9]{1,4}(?>:[a-f0-9]{1,4}){0,4}):)?))?(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?>25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}))\])$/isD', + $address + ); + case 'html5': + /** + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * @link http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + */ + return (boolean)preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'noregex': + //No PCRE! Do something _very_ approximate! + //Check the address is 3 chars or longer and contains an @ that's not the first or last char + return (strlen($address) >= 3 + and strpos($address, '@') >= 1 + and strpos($address, '@') != strlen($address) - 1); + case 'php': + default: + return (boolean)filter_var($address, FILTER_VALIDATE_EMAIL); + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * "intl" and "mbstring" PHP extensions. + * @return bool "true" if required functions for IDN support are present + */ + public function idnSupported() + { + // @TODO: Write our own "idn_to_ascii" function for PHP <= 5.2. + return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain has characters not allowed in an IDN) + * @see PHPMailer::$CharSet + * @param string $address The email address to convert + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + if ($this->idnSupported() and + !empty($this->CharSet) and + ($pos = strrpos($address, '@')) !== false) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? + idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : + idn_to_ascii($domain)) !== false) { + return substr($address, 0, $pos) . $punycode; + } + } + } + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * @throws phpmailerException + * @return boolean false on error - See the ErrorInfo property for details of the error. + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + return $this->postSend(); + } catch (phpmailerException $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + } + + /** + * Prepare a message for sending. + * @throws phpmailerException + * @return boolean + */ + public function preSend() + { + try { + $this->error_count = 0; // Reset errors + $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array(array($this, 'addAnAddress'), $params); + } + if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + throw new phpmailerException($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (array('From', 'Sender', 'ConfirmReadingTo') as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!$this->validateAddress($this->$address_kind)) { + $error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind; + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new phpmailerException($error_message); + } + return false; + } + } + + // Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = 'multipart/alternative'; + } + + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty and empty($this->Body)) { + throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL); + } + + // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + // createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ($this->Mailer == 'mail') { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader(trim($this->Subject))) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + && !empty($this->DKIM_selector) + && (!empty($this->DKIM_private_string) + || (!empty($this->DKIM_private) && file_exists($this->DKIM_private)) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . self::CRLF . + str_replace("\r\n", "\n", $header_dkim) . self::CRLF; + } + return true; + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + } + + /** + * Actually send a message. + * Send the email via the selected mechanism + * @throws phpmailerException + * @return boolean + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer.'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + return false; + } + + /** + * Send mail using the $Sendmail program. + * @param string $header The message headers + * @param string $body The message body + * @see PHPMailer::$Sendmail + * @throws phpmailerException + * @access protected + * @return boolean + */ + protected function sendmailSend($header, $body) + { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { + if ($this->Mailer == 'qmail') { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } else { + if ($this->Mailer == 'qmail') { + $sendmailFmt = '%s'; + } else { + $sendmailFmt = '%s -oi -t'; + } + } + + // TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing. + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, 'To: ' . $toAddr . "\n"); + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + array($toAddr), + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From + ); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + if (!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From + ); + if ($result != 0) { + throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * @param string $string The string to be validated + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * @access protected + * @return boolean + */ + protected static function isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string + or !in_array(escapeshellarg($string), array("'$string'", "\"$string\"")) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; $i++) { + $c = $string[$i]; + + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Send mail using the PHP mail() function. + * @param string $header The message headers + * @param string $body The message body + * @link http://www.php.net/manual/en/book.mail.php + * @throws phpmailerException + * @access protected + * @return boolean + */ + protected function mailSend($header, $body) + { + $toArr = array(); + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + } + if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo and count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new phpmailerException($this->lang('instantiate'), self::STOP_CRITICAL); + } + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP; + } + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * Uses the PHPMailerSMTP class by default. + * @see PHPMailer::getSMTPInstance() to use a different class. + * @param string $header The message headers + * @param string $body The message body + * @throws phpmailerException + * @uses SMTP + * @access protected + * @return boolean + */ + protected function smtpSend($header, $body) + { + $bad_rcpt = array(); + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { + $smtp_from = $this->Sender; + } else { + $smtp_from = $this->From; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL); + } + + // Attempt to send to all recipients + foreach (array($this->to, $this->cc, $this->bcc) as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0])) { + $error = $this->smtp->getError(); + $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']); + $isSent = false; + } else { + $isSent = true; + } + $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From); + } + } + + // Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { + throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new phpmailerException( + $this->lang('recipients_failed') . $errstr, + self::STOP_CONTINUE + ); + } + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * @param array $options An array of options compatible with stream_context_create() + * @uses SMTP + * @access public + * @throws phpmailerException + * @return boolean + */ + public function smtpConnect($options = null) + { + if (is_null($this->smtp)) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (is_null($options)) { + $options = $this->SMTPOptions; + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = array(); + if (!preg_match( + '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', + trim($hostentry), + $hostinfo + )) { + // Not a valid host entry + $this->edebug('Ignoring invalid host: ' . $hostentry); + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ($this->SMTPSecure == 'tls'); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ($hostinfo[2] == 'tls') { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA1'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (integer)$hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new phpmailerException($this->lang('connect_host')); + } + // We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->Realm, + $this->Workstation + ) + ) { + throw new phpmailerException($this->lang('authenticate')); + } + } + return true; + } catch (phpmailerException $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and !is_null($lastexception)) { + throw $lastexception; + } + return false; + } + + /** + * Close the active SMTP session if one exists. + * @return void + */ + public function smtpClose() + { + if (is_a($this->smtp, 'SMTP')) { + if ($this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * @return boolean + * @access public + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + // Backwards compatibility for renamed language codes + $renamed_langcodes = array( + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + 'sr' => 'rs' + ); + + if (isset($renamed_langcodes[$langcode])) { + $langcode = $renamed_langcodes[$langcode]; + } + + // Define full set of translatable strings in English + $PHPMAILER_LANG = array( + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + 'extension_missing' => 'Extension missing: ' + ); + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $langcode = 'en'; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + // There is no English translation file + if ($langcode != 'en') { + // Make sure language file path is readable + if (!is_readable($lang_file)) { + $foundlang = false; + } else { + // Overwrite language-specific strings. + // This way we'll never have missing translation keys. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + return (boolean)$foundlang; // Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * @access public + * @param string $type + * @param array $addr An array of recipient, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * array(array('joe@example.com', 'Joe User'), array('zoe@example.com', 'Zoe User')) + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = array(); + foreach ($addr as $address) { + $addresses[] = $this->addrFormat($address); + } + return $type . ': ' . implode(', ', $addresses) . $this->LE; + } + + /** + * Format an address for use in a message header. + * @access public + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name + * like array('joe@example.com', 'Joe User') + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } else { + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( + $addr[0] + ) . '>'; + } + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * @param string $message The message to wrap + * @param integer $length The line length to wrap to + * @param boolean $qp_mode Whether to run in Quoted-Printable mode + * @access public + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + if ($qp_mode) { + $soft_break = sprintf(' =%s', $this->LE); + } else { + $soft_break = $this->LE; + } + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == 'utf-8'); + $lelen = strlen($this->LE); + $crlflen = strlen(self::CRLF); + + $message = $this->fixEOL($message); + //Remove a trailing line break + if (substr($message, -$lelen) == $this->LE) { + $message = substr($message, 0, -$lelen); + } + + //Split message into lines + $lines = explode($this->LE, $message); + //Message will be rebuilt in here + $message = ''; + foreach ($lines as $line) { + $words = explode(' ', $line); + $buf = ''; + $firstword = true; + foreach ($words as $word) { + if ($qp_mode and (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if (!$firstword) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == '=') { + $len--; + } elseif (substr($word, $len - 2, 1) == '=') { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf('=%s', self::CRLF); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == '=') { + $len--; + } elseif (substr($word, $len - 2, 1) == '=') { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf('=%s', self::CRLF); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + if (!$firstword) { + $buf .= ' '; + } + $buf .= $word; + + if (strlen($buf) > $length and $buf_o != '') { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + $firstword = false; + } + $message .= $buf . self::CRLF; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * @access public + * @param string $encodedText utf-8 QP text + * @param integer $maxLength Find the last character boundary prior to this length + * @return integer + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, '='); + if (false !== $encodedCharPos) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { + // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + if ($encodedCharPos > 0) { + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + } + $foundSplitPos = true; + } elseif ($dec >= 192) { + // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { + // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + * @access public + * @return void + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * @access public + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + $result .= $this->headerLine('Date', $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate); + + // To be created automatically by mail() + if ($this->SingleTo) { + if ($this->Mailer != 'mail') { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } + } else { + if (count($this->to) > 0) { + if ($this->Mailer != 'mail') { + $result .= $this->addrAppend('To', $this->to); + } + } elseif (count($this->cc) == 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + + $result .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + $this->Mailer == 'sendmail' or $this->Mailer == 'qmail' or $this->Mailer == 'mail' + ) + and count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ($this->Mailer != 'mail') { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 + // https://tools.ietf.org/html/rfc5322#section-3.6.4 + if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); + } + $result .= $this->headerLine('Message-ID', $this->lastMessageID); + if (!is_null($this->Priority)) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } + if ($this->XMailer == '') { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ($this->ConfirmReadingTo != '') { + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); + } + + // Add custom headers + foreach ($this->CustomHeader as $header) { + $result .= $this->headerLine( + trim($header[0]), + $this->encodeHeader(trim($header[1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * @access public + * @return string + */ + public function getMailMIME() + { + $result = ''; + $ismultipart = true; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', 'multipart/related;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', 'multipart/mixed;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $ismultipart = false; + break; + } + // RFC1341 part 5 says 7bit is assumed if not specified + if ($this->Encoding != '7bit') { + // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + if ($ismultipart) { + if ($this->Encoding == '8bit') { + $result .= $this->headerLine('Content-Transfer-Encoding', '8bit'); + } + // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible + } else { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + } + + if ($this->Mailer != 'mail') { + $result .= $this->LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * @see PHPMailer::preSend() + * @access public + * @return string + */ + public function getSentMIMEMessage() + { + return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody; + } + + /** + * Create unique ID + * @return string + */ + protected function generateId() { + return md5(uniqid(time())); + } + + /** + * Assemble the message body. + * Returns an empty string on failure. + * @access public + * @throws phpmailerException + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + //Create unique IDs and preset boundaries + $this->uniqueid = $this->generateId(); + $this->boundary[1] = 'b1_' . $this->uniqueid; + $this->boundary[2] = 'b2_' . $this->uniqueid; + $this->boundary[3] = 'b3_' . $this->uniqueid; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . $this->LE; + } + + $this->setWordWrap(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { + $bodyEncoding = '7bit'; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $bodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the body part only + if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { + $bodyEncoding = 'quoted-printable'; + } + + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = '7bit'; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $altBodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the alt body part only + if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { + $altBodyEncoding = 'quoted-printable'; + } + //Use this as a preamble in all multipart message types + $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE; + switch ($this->message_type) { + case 'inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[1], '', 'text/calendar; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= $this->LE . $this->LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', 'multipart/alternative;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, 'text/plain', $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', 'multipart/related;'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= $this->LE; + $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, 'text/html', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= $this->LE . $this->LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= $this->LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types + //Reset the `Encoding` property in case we changed it for line length reasons + $this->Encoding = $bodyEncoding; + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + } + // @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1 + $file = tempnam(sys_get_temp_dir(), 'mail'); + if (false === file_put_contents($file, $body)) { + throw new phpmailerException($this->lang('signing') . ' Could not write temp file'); + } + $signed = tempnam(sys_get_temp_dir(), 'signed'); + //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 + if (empty($this->sign_extracerts_file)) { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), + null + ); + } else { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), + null, + PKCS7_DETACHED, + $this->sign_extracerts_file + ); + } + if ($sign) { + @unlink($file); + $body = file_get_contents($signed); + @unlink($signed); + //The message returned by openssl contains both headers and body, so need to split them up + $parts = explode("\n\n", $body, 2); + $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE; + $body = $parts[1]; + } else { + @unlink($file); + @unlink($signed); + throw new phpmailerException($this->lang('signing') . openssl_error_string()); + } + } catch (phpmailerException $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + return $body; + } + + /** + * Return the start of a message boundary. + * @access protected + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ($charSet == '') { + $charSet = $this->CharSet; + } + if ($contentType == '') { + $contentType = $this->ContentType; + } + if ($encoding == '') { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); + $result .= $this->LE; + // RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + } + $result .= $this->LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * @access protected + * @param string $boundary + * @return string + */ + protected function endBoundary($boundary) + { + return $this->LE . '--' . $boundary . '--' . $this->LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + * @access protected + * @return void + */ + protected function setMessageType() + { + $type = array(); + if ($this->alternativeExists()) { + $type[] = 'alt'; + } + if ($this->inlineImageExists()) { + $type[] = 'inline'; + } + if ($this->attachmentExists()) { + $type[] = 'attach'; + } + $this->message_type = implode('_', $type); + if ($this->message_type == '') { + //The 'plain' message_type refers to the message having a single body element, not that it is plain-text + $this->message_type = 'plain'; + } + } + + /** + * Format a header line. + * @access public + * @param string $name + * @param string $value + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . $this->LE; + } + + /** + * Return a formatted mail line. + * @access public + * @param string $value + * @return string + */ + public function textLine($value) + { + return $value . $this->LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Never use a user-supplied path to a file! + * Returns false if the file could not be found or read. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @throws phpmailerException + * @return boolean + */ + public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') + { + try { + if (!@is_file($path)) { + throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + + } catch (phpmailerException $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + return false; + } + return true; + } + + /** + * Return the array of attachments. + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access protected + * @param string $disposition_type + * @param string $boundary + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = array(); + $cidUniq = array(); + $incl = array(); + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] == $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = md5(serialize($attachment)); + if (in_array($inclhash, $incl)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ($disposition == 'inline' && array_key_exists($cid, $cidUniq)) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf('--%s%s', $boundary, $this->LE); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name="%s"%s', + $type, + $this->encodeHeader($this->secureHeader($name)), + $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + $this->LE + ); + } + // RFC1341 part 5 says 7bit is assumed if not specified + if ($encoding != '7bit') { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE); + } + + if ($disposition == 'inline') { + $mime[] = sprintf('Content-ID: <%s>%s', $cid, $this->LE); + } + + // If a filename contains any of these chars, it should be quoted, + // but not otherwise: RFC2183 & RFC2045 5.1 + // Fixes a warning in IETF's msglint MIME checker + // Allow for bypassing the Content-Disposition header totally + if (!(empty($disposition))) { + $encoded_name = $this->encodeHeader($this->secureHeader($name)); + if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename="%s"%s', + $disposition, + $encoded_name, + $this->LE . $this->LE + ); + } else { + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + $encoded_name, + $this->LE . $this->LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + $this->LE . $this->LE + ); + } + } + } else { + $mime[] = $this->LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } else { + $mime[] = $this->encodeFile($path, $encoding); + if ($this->isError()) { + return ''; + } + $mime[] = $this->LE . $this->LE; + } + } + } + + $mime[] = sprintf('--%s--%s', $boundary, $this->LE); + + return implode('', $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @throws phpmailerException + * @access protected + * @return string + */ + protected function encodeFile($path, $encoding = 'base64') + { + try { + if (!is_readable($path)) { + throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $magic_quotes = get_magic_quotes_runtime(); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime(false); + } else { + //Doesn't exist in PHP 5.4, but we don't need to check because + //get_magic_quotes_runtime always returns false in 5.4+ + //so it will never get here + ini_set('magic_quotes_runtime', false); + } + } + $file_buffer = file_get_contents($path); + $file_buffer = $this->encodeString($file_buffer, $encoding); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime($magic_quotes); + } else { + ini_set('magic_quotes_runtime', $magic_quotes); + } + } + return $file_buffer; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @access public + * @return string + */ + public function encodeString($str, $encoding = 'base64') + { + $encoded = ''; + switch (strtolower($encoding)) { + case 'base64': + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->fixEOL($str); + // Make sure it ends with a line break + if (substr($encoded, -(strlen($this->LE))) != $this->LE) { + $encoded .= $this->LE; + } + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string optimally. + * Picks shortest of Q, B, quoted-printable or none. + * @access public + * @param string $str + * @param string $position + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + // Intentional fall-through + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + //There are no chars that need encoding + if ($matchcount == 0) { + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if ($matchcount > strlen($str) / 3) { + // More than a third of the content will need encoding, so B encoding will be most efficient + $encoding = 'B'; + if (function_exists('mb_strlen') && $this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + } else { + $encoding = 'Q'; + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . self::CRLF, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Check if a string contains multi-byte characters. + * @access public + * @param string $str multi-byte text to wrap encode + * @return boolean + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * @param string $text + * @return boolean + */ + public function has8bitChars($text) + { + return (boolean)preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid + * @link http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * @access public + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = '=?' . $this->CharSet . '?B?'; + $end = '?='; + $encoded = ''; + if ($linebreak === null) { + $linebreak = $this->LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $linebreak; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($linebreak)); + return $encoded; + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * @access public + * @param string $string The text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @return string + * @link http://www.php.net/manual/en/function.quoted-printable-decode.php#89417 Adapted from this comment + */ + public function encodeQP($string, $line_max = 76) + { + // Use native function if it's available (>= PHP5.3) + if (function_exists('quoted_printable_encode')) { + return quoted_printable_encode($string); + } + // Fall back to a pure PHP implementation + $string = str_replace( + array('%20', '%0D%0A.', '%0D%0A', '%'), + array(' ', "\r\n=2E", "\r\n", '='), + rawurlencode($string) + ); + return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string); + } + + /** + * Backward compatibility wrapper for an old QP encoding function that was removed. + * @see PHPMailer::encodeQP() + * @access public + * @param string $string + * @param integer $line_max + * @param boolean $space_conv + * @return string + * @deprecated Use encodeQP instead. + */ + public function encodeQPphp( + $string, + $line_max = 76, + /** @noinspection PhpUnusedParameterInspection */ $space_conv = false + ) { + return $this->encodeQP($string, $line_max); + } + + /** + * Encode a string using Q encoding. + * @link http://tools.ietf.org/html/rfc2047 + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * @access public + * @return string + */ + public function encodeQ($str, $position = 'text') + { + // There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(array("\r", "\n"), '', $str); + switch (strtolower($position)) { + case 'phrase': + // RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /** @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + // RFC 2047 section 5.2 + $pattern = '\(\)"'; + // intentional fall-through + // for this reason we build the $pattern without including delimiters and [] + case 'text': + default: + // RFC 2047 section 5.1 + // Replace every high ascii, control, =, ? and _ characters + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = array(); + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + // If the string contains an '=', make sure it's the first thing we replace + // so as to avoid double-encoding + $eqkey = array_search('=', $matches[0]); + if (false !== $eqkey) { + unset($matches[0][$eqkey]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + // Replace every spaces to _ (more readable than =20) + return str_replace(' ', '_', $encoded); + } + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @param string $disposition Disposition to use + * @return void + */ + public function addStringAttachment( + $string, + $filename, + $encoding = 'base64', + $type = '', + $disposition = 'attachment' + ) { + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($filename); + } + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0 + ); + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * Never use a user-supplied path to a file! + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File MIME type. + * @param string $disposition Disposition to use + * @return boolean True on successfully adding an attachment + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline') + { + if (!@is_file($path)) { + $this->setError($this->lang('file_access') . $path); + return false; + } + + // If a MIME type is not specified, try to work it out from the file name + if ($type == '') { + $type = self::filenameToType($path); + } + + $filename = basename($path); + if ($name == '') { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * Be sure to set the $type to an image type for images: + * JPEG images use 'image/jpeg', GIF uses 'image/gif', PNG uses 'image/png'. + * @param string $string The attachment binary data. + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML. + * @param string $name + * @param string $encoding File encoding (see $Encoding). + * @param string $type MIME type. + * @param string $disposition Disposition to use + * @return boolean True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = 'base64', + $type = '', + $disposition = 'inline' + ) { + // If a MIME type is not specified, try to work it out from the name + if ($type == '' and !empty($name)) { + $type = self::filenameToType($name); + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid + ); + return true; + } + + /** + * Check if an inline attachment is present. + * @access public + * @return boolean + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'inline') { + return true; + } + } + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * @return boolean + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ($attachment[6] == 'attachment') { + return true; + } + } + return false; + } + + /** + * Check if this message has an alternative body set. + * @return boolean + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear queued addresses of given kind. + * @access protected + * @param string $kind 'to', 'cc', or 'bcc' + * @return void + */ + public function clearQueuedAddresses($kind) + { + $RecipientsQueue = $this->RecipientsQueue; + foreach ($RecipientsQueue as $address => $params) { + if ($params[0] == $kind) { + unset($this->RecipientsQueue[$address]); + } + } + } + + /** + * Clear all To recipients. + * @return void + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = array(); + $this->clearQueuedAddresses('to'); + } + + /** + * Clear all CC recipients. + * @return void + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = array(); + $this->clearQueuedAddresses('cc'); + } + + /** + * Clear all BCC recipients. + * @return void + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = array(); + $this->clearQueuedAddresses('bcc'); + } + + /** + * Clear all ReplyTo recipients. + * @return void + */ + public function clearReplyTos() + { + $this->ReplyTo = array(); + $this->ReplyToQueue = array(); + } + + /** + * Clear all recipient types. + * @return void + */ + public function clearAllRecipients() + { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + $this->all_recipients = array(); + $this->RecipientsQueue = array(); + } + + /** + * Clear all filesystem, string, and binary attachments. + * @return void + */ + public function clearAttachments() + { + $this->attachment = array(); + } + + /** + * Clear all custom headers. + * @return void + */ + public function clearCustomHeaders() + { + $this->CustomHeader = array(); + } + + /** + * Add an error message to the error container. + * @access protected + * @param string $msg + * @return void + */ + protected function setError($msg) + { + $this->error_count++; + if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror['error'])) { + $msg .= $this->lang('smtp_error') . $lasterror['error']; + if (!empty($lasterror['detail'])) { + $msg .= ' Detail: '. $lasterror['detail']; + } + if (!empty($lasterror['smtp_code'])) { + $msg .= ' SMTP code: ' . $lasterror['smtp_code']; + } + if (!empty($lasterror['smtp_code_ex'])) { + $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; + } + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * @access public + * @return string + * @static + */ + public static function rfcDate() + { + // Set the time zone to whatever the default is to avoid 500 errors + // Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * @access protected + * @return string + */ + protected function serverHostname() + { + $result = 'localhost.localdomain'; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') && gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + return $result; + } + + /** + * Get an error message in the current language. + * @access protected + * @param string $key + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage('en'); // set the default language + } + + if (array_key_exists($key, $this->language)) { + if ($key == 'smtp_connect_failed') { + //Include a link to troubleshooting docs on SMTP connection failure + //this is by far the biggest cause of support questions + //but it's usually not PHPMailer's fault. + return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; + } + return $this->language[$key]; + } else { + //Return the key as a fallback + return $key; + } + } + + /** + * Check if an error occurred. + * @access public + * @return boolean True if an error did occur. + */ + public function isError() + { + return ($this->error_count > 0); + } + + /** + * Ensure consistent line endings in a string. + * Changes every end of line from CRLF, CR or LF to $this->LE. + * @access public + * @param string $str String to fixEOL + * @return string + */ + public function fixEOL($str) + { + // Normalise to \n + $nstr = str_replace(array("\r\n", "\r"), "\n", $str); + // Now convert LE as needed + if ($this->LE !== "\n") { + $nstr = str_replace("\n", $this->LE, $nstr); + } + return $nstr; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value) + * @access public + * @param string $name Custom header name + * @param string $value Header value + * @return void + */ + public function addCustomHeader($name, $value = null) + { + if ($value === null) { + // Value passed in as name:value + $this->CustomHeader[] = explode(':', $name, 2); + } else { + $this->CustomHeader[] = array($name, $value); + } + } + + /** + * Returns all custom headers. + * @return array + */ + public function getCustomHeaders() + { + return $this->CustomHeader; + } + + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * Do not source $message content from user input! + * $basedir is prepended when handling relative URLs, e.g. and must not be empty + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. + * @access public + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param boolean|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter @see PHPMailer::html2text() + * @return string $message The transformed message Body + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); + if (array_key_exists(2, $images)) { + if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { + // Ensure $basedir has a trailing / + $basedir .= '/'; + } + foreach ($images[2] as $imgindex => $url) { + // Convert data URIs into embedded images + if (preg_match('#^data:(image[^;,]*)(;base64)?,#', $url, $match)) { + $data = substr($url, strpos($url, ',')); + if ($match[2]) { + $data = base64_decode($data); + } else { + $data = rawurldecode($data); + } + $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 + if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + continue; + } + if ( + // Only process relative URLs if a basedir is provided (i.e. no absolute local paths) + !empty($basedir) + // Ignore URLs containing parent dir traversal (..) + && (strpos($url, '..') === false) + // Do not change urls that are already inline images + && substr($url, 0, 4) !== 'cid:' + // Do not change absolute URLs, including anonymous protocol + && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + ) { + $filename = basename($url); + $directory = dirname($url); + if ($directory == '.') { + $directory = ''; + } + $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 + if (strlen($directory) > 1 && substr($directory, -1) != '/') { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + 'base64', + self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } + } + } + $this->isHTML(true); + // Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better + $this->Body = $this->normalizeBreaks($message); + $this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced)); + if (!$this->alternativeExists()) { + $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . + self::CRLF . self::CRLF; + } + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was been removed for license reasons in #232. + * Example usage: + * + * // Use default conversion + * $plain = $mail->html2text($html); + * // Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * + * @param string $html The HTML text to convert + * @param boolean|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion. + * @return string + */ + public function html2text($html, $advanced = false) + { + if (is_callable($advanced)) { + return call_user_func($advanced, $html); + } + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * @param string $ext File extension + * @access public + * @return string MIME type of file. + * @static + */ + public static function _mime_types($ext = '') + { + $mimes = array( + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie' + ); + if (array_key_exists(strtolower($ext), $mimes)) { + return $mimes[strtolower($ext)]; + } + return 'application/octet-stream'; + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * @param string $filename A file name or full path, does not need to exist as a file + * @return string + * @static + */ + public static function filenameToType($filename) + { + // In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if (false !== $qpos) { + $filename = substr($filename, 0, $qpos); + } + $pathinfo = self::mb_pathinfo($filename); + return self::_mime_types($pathinfo['extension']); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte-safe, cross-platform-safe, old-version-safe. + * Works similarly to the one in PHP >= 5.2.0 + * @link http://www.php.net/manual/en/function.pathinfo.php#107461 + * @param string $path A filename or path, does not need to exist as a file + * @param integer|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece, allows 'filename' to work on PHP < 5.2 + * @return string|array + * @static + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''); + $pathinfo = array(); + if (preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im', $path, $pathinfo)) { + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[3]; + } + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', 'tls');` + * is the same as: + * `$mail->SMTPSecure = 'tls';` + * @access public + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * @return boolean + * @TODO Should this not be using the __set() magic function? + */ + public function set($name, $value = '') + { + if (property_exists($this, $name)) { + $this->$name = $value; + return true; + } else { + $this->setError($this->lang('variable_set') . $name); + return false; + } + } + + /** + * Strip newlines to prevent header injection. + * @access public + * @param string $str + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(array("\r", "\n"), '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * @param string $text + * @param string $breaktype What kind of line break to use, defaults to CRLF + * @return string + * @access public + * @static + */ + public static function normalizeBreaks($text, $breaktype = "\r\n") + { + return preg_replace('/(\r\n|\r|\n)/ms', $breaktype, $text); + } + + /** + * Set the public and private key files and password for S/MIME signing. + * @access public + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + $this->sign_extracerts_file = $extracerts_filename; + } + + /** + * Quoted-Printable-encode a DKIM header. + * @access public + * @param string $txt + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + for ($i = 0; $i < strlen($txt); $i++) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= '=' . sprintf('%02X', $ord); + } + } + return $line; + } + + /** + * Generate a DKIM signature. + * @access public + * @param string $signHeader + * @throws phpmailerException + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new phpmailerException($this->lang('extension_missing') . 'openssl'); + } + return ''; + } + $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); + if ('' != $this->DKIM_passphrase) { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = openssl_pkey_get_private($privKeyStr); + } + //Workaround for missing digest algorithms in old PHP & OpenSSL versions + //@link http://stackoverflow.com/a/11117338/333340 + if (version_compare(PHP_VERSION, '5.3.0') >= 0 and + in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); + return base64_encode($signature); + } + } else { + $pinfo = openssl_pkey_get_details($privKey); + $hash = hash('sha256', $signHeader); + //'Magic' constant for SHA256 from RFC3447 + //@link https://tools.ietf.org/html/rfc3447#page-43 + $t = '3031300d060960864801650304020105000420' . $hash; + $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3); + $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); + + if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { + openssl_pkey_free($privKey); + return base64_encode($signature); + } + } + openssl_pkey_free($privKey); + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * @access public + * @param string $signHeader Header + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + $signHeader = preg_replace('/\r\n\s+/', ' ', $signHeader); + $lines = explode("\r\n", $signHeader); + foreach ($lines as $key => $line) { + list($heading, $value) = explode(':', $line, 2); + $heading = strtolower($heading); + $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces + $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value + } + $signHeader = implode("\r\n", $lines); + return $signHeader; + } + + /** + * Generate a DKIM canonicalization body. + * @access public + * @param string $body Message Body + * @return string + */ + public function DKIM_BodyC($body) + { + if ($body == '') { + return "\r\n"; + } + // stabilize line endings + $body = str_replace("\r\n", "\n", $body); + $body = str_replace("\n", "\r\n", $body); + // END stabilize line endings + while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { + $body = substr($body, 0, strlen($body) - 2); + } + return $body; + } + + /** + * Create the DKIM header and body in a new message header. + * @access public + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode($this->LE, $headers_line); + $from_header = ''; + $to_header = ''; + $date_header = ''; + $current = ''; + foreach ($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + $current = 'from_header'; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + $current = 'to_header'; + } elseif (strpos($header, 'Date:') === 0) { + $date_header = $header; + $current = 'date_header'; + } else { + if (!empty($$current) && strpos($header, ' =?') === 0) { + $$current .= $header; + } else { + $current = ''; + } + } + } + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); + $subject = str_replace( + '|', + '=7C', + $this->DKIM_QP($subject_header) + ); // Copied header fields (dkim-quoted-printable) + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body); // Length of body + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body + if ('' == $this->DKIM_identity) { + $ident = ''; + } else { + $ident = ' i=' . $this->DKIM_identity . ';'; + } + $dkimhdrs = 'DKIM-Signature: v=1; a=' . + $DKIMsignatureType . '; q=' . + $DKIMquery . '; l=' . + $DKIMlen . '; s=' . + $this->DKIM_selector . + ";\r\n" . + "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . + "\th=From:To:Date:Subject;\r\n" . + "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . + "\tz=$from\r\n" . + "\t|$to\r\n" . + "\t|$date\r\n" . + "\t|$subject;\r\n" . + "\tbh=" . $DKIMb64 . ";\r\n" . + "\tb="; + $toSign = $this->DKIM_HeaderC( + $from_header . "\r\n" . + $to_header . "\r\n" . + $date_header . "\r\n" . + $subject_header . "\r\n" . + $dkimhdrs + ); + $signed = $this->DKIM_Sign($toSign); + return $dkimhdrs . $signed . "\r\n"; + } + + /** + * Detect if a string contains a line longer than the maximum line length allowed. + * @param string $str + * @return boolean + * @static + */ + public static function hasLineLongerThanMax($str) + { + //+2 to include CRLF line break for a 1000 total + return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str); + } + + /** + * Allows for public read access to 'to' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * @note: Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * @access public + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * Perform a callback. + * @param boolean $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from) + { + if (!empty($this->action_function) && is_callable($this->action_function)) { + $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from); + call_user_func_array($this->action_function, $params); + } + } } /** - * Set the From and FromName properties - * @param string $address - * @param string $name - * @return boolean + * PHPMailer exception handler + * @package PHPMailer */ - public function SetFrom($address, $name = '', $auto = 1) { - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!self::ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '. $address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - echo $this->Lang('invalid_address').': '.$address; - return false; +class phpmailerException extends Exception +{ + /** + * Prettify error message output + * @return string + */ + public function errorMessage() + { + $errorMsg = '' . htmlspecialchars($this->getMessage()) . "
\n"; + return $errorMsg; } - $this->From = $address; - $this->FromName = $name; - if ($auto) { - if (empty($this->ReplyTo)) { - $this->AddAnAddress('ReplyTo', $address, $name); - } - if (empty($this->Sender)) { - $this->Sender = $address; - } - } - return true; - } - - /** - * Check that a string looks roughly like an email address should - * Static so it can be used without instantiation - * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator - * Conforms approximately to RFC2822 - * @link http://www.hexillion.com/samples/#Regex Original pattern found here - * @param string $address The email address to check - * @return boolean - * @static - * @access public - */ - public static function ValidateAddress($address) { - if (function_exists('filter_var')) { //Introduced in PHP 5.2 - if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) { - return false; - } else { - return true; - } - } else { - return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address); - } - } - - ///////////////////////////////////////////////// - // METHODS, MAIL SENDING - ///////////////////////////////////////////////// - - /** - * Creates message and assigns Mailer. If the message is - * not sent successfully then it returns false. Use the ErrorInfo - * variable to view description of the error. - * @return bool - */ - public function Send() { - try { - if(!$this->PreSend()) return false; - return $this->PostSend(); - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - return false; - } - } - - protected function PreSend() { - try { - if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL); - } - - // Set whether the message is multipart/alternative - if(!empty($this->AltBody)) { - $this->ContentType = 'multipart/alternative'; - } - - $this->error_count = 0; // reset errors - $this->SetMessageType(); - //Refuse to send an empty message - if (empty($this->Body)) { - throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL); - } - - $this->MIMEHeader = $this->CreateHeader(); - $this->MIMEBody = $this->CreateBody(); - - - // digitally sign with DKIM if enabled - if ($this->DKIM_domain && $this->DKIM_private) { - $header_dkim = $this->DKIM_Add($this->MIMEHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody); - $this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader; - } - - return true; - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - return false; - } - } - - protected function PostSend() { - try { - // Choose the mailer and send through it - switch($this->Mailer) { - case 'sendmail': - return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody); - case 'smtp': - return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody); - default: - return $this->MailSend($this->MIMEHeader, $this->MIMEBody); - } - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - echo $e->getMessage()."\n"; - return false; - } - } - - /** - * Sends mail using the $Sendmail program. - * @param string $header The message headers - * @param string $body The message body - * @access protected - * @return bool - */ - protected function SendmailSend($header, $body) { - if ($this->Sender != '') { - $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } else { - $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); - } - if ($this->SingleTo === true) { - foreach ($this->SingleToArray as $key => $val) { - if(!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, "To: " . $val . "\n"); - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); - if($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - } else { - if(!@$mail = popen($sendmail, 'w')) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail); - // implement call back function if it exists - $isSent = ($result == 0) ? 1 : 0; - $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body); - if($result != 0) { - throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); - } - } - return true; - } - - /** - * Sends mail using the PHP mail() function. - * @param string $header The message headers - * @param string $body The message body - * @access protected - * @return bool - */ - protected function MailSend($header, $body) { - $toArr = array(); - foreach($this->to as $t) { - $toArr[] = $this->AddrFormat($t); - } - $to = implode(', ', $toArr); - - if (empty($this->Sender)) { - $params = "-oi -f %s"; - } else { - $params = sprintf("-oi -f %s", $this->Sender); - } - if ($this->Sender != '' and !ini_get('safe_mode')) { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - if ($this->SingleTo === true && count($toArr) > 1) { - foreach ($toArr as $key => $val) { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); - } - } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); - } - } else { - if ($this->SingleTo === true && count($toArr) > 1) { - foreach ($toArr as $key => $val) { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); - } - } else { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); - // implement call back function if it exists - $isSent = ($rt == 1) ? 1 : 0; - $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); - } - } - if (isset($old_from)) { - ini_set('sendmail_from', $old_from); - } - if(!$rt) { - throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL); - } - return true; - } - - /** - * Sends mail via SMTP using PhpSMTP - * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. - * @param string $header The message headers - * @param string $body The message body - * @uses SMTP - * @access protected - * @return bool - */ - protected function SmtpSend($header, $body) { - require_once $this->PluginDir . 'class.smtp.php'; - $bad_rcpt = array(); - - if(!$this->SmtpConnect()) { - throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL); - } - $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; - if(!$this->smtp->Mail($smtp_from)) { - throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL); - } - - // Attempt to send attach all recipients - foreach($this->to as $to) { - if (!$this->smtp->Recipient($to[0])) { - $bad_rcpt[] = $to[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); - } - } - foreach($this->cc as $cc) { - if (!$this->smtp->Recipient($cc[0])) { - $bad_rcpt[] = $cc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); - } - } - foreach($this->bcc as $bcc) { - if (!$this->smtp->Recipient($bcc[0])) { - $bad_rcpt[] = $bcc[0]; - // implement call back function if it exists - $isSent = 0; - $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); - } else { - // implement call back function if it exists - $isSent = 1; - $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); - } - } - - - if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses - $badaddresses = implode(', ', $bad_rcpt); - throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses); - } - if(!$this->smtp->Data($header . $body)) { - throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL); - } - if($this->SMTPKeepAlive == true) { - $this->smtp->Reset(); - } - return true; - } - - /** - * Initiates a connection to an SMTP server. - * Returns false if the operation failed. - * @uses SMTP - * @access public - * @return bool - */ - public function SmtpConnect() { - if(is_null($this->smtp)) { - $this->smtp = new SMTP(); - } - - $this->smtp->do_debug = $this->SMTPDebug; - $hosts = explode(';', $this->Host); - $index = 0; - $connection = $this->smtp->Connected(); - - // Retry while there is no connection - try { - while($index < count($hosts) && !$connection) { - $hostinfo = array(); - if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) { - $host = $hostinfo[1]; - $port = $hostinfo[2]; - } else { - $host = $hosts[$index]; - $port = $this->Port; - } - - $tls = ($this->SMTPSecure == 'tls'); - $ssl = ($this->SMTPSecure == 'ssl'); - - if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { - - $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); - $this->smtp->Hello($hello); - - if ($tls) { - if (!$this->smtp->StartTLS()) { - throw new phpmailerException($this->Lang('tls')); - } - - //We must resend HELO after tls negotiation - $this->smtp->Hello($hello); - } - - $connection = true; - if ($this->SMTPAuth) { - if (!$this->smtp->Authenticate($this->Username, $this->Password)) { - throw new phpmailerException($this->Lang('authenticate')); - } - } - } - $index++; - if (!$connection) { - throw new phpmailerException($this->Lang('connect_host')); - } - } - } catch (phpmailerException $e) { - $this->smtp->Reset(); - throw $e; - } - return true; - } - - /** - * Closes the active SMTP session if one exists. - * @return void - */ - public function SmtpClose() { - if(!is_null($this->smtp)) { - if($this->smtp->Connected()) { - $this->smtp->Quit(); - $this->smtp->Close(); - } - } - } - - /** - * Sets the language for all class error messages. - * Returns false if it cannot load the language file. The default language is English. - * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br") - * @param string $lang_path Path to the language file directory - * @access public - */ - function SetLanguage($langcode = 'en', $lang_path = 'language/') { - //Define full set of translatable strings - $PHPMAILER_LANG = array( - 'provide_address' => 'You must provide at least one recipient email address.', - 'mailer_not_supported' => ' mailer is not supported.', - 'execute' => 'Could not execute: ', - 'instantiate' => 'Could not instantiate mail function.', - 'authenticate' => 'SMTP Error: Could not authenticate.', - 'from_failed' => 'The following From address failed: ', - 'recipients_failed' => 'SMTP Error: The following recipients failed: ', - 'data_not_accepted' => 'SMTP Error: Data not accepted.', - 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', - 'file_access' => 'Could not access file: ', - 'file_open' => 'File Error: Could not open file: ', - 'encoding' => 'Unknown encoding: ', - 'signing' => 'Signing Error: ', - 'smtp_error' => 'SMTP server error: ', - 'empty_message' => 'Message body empty', - 'invalid_address' => 'Invalid address', - 'variable_set' => 'Cannot set or reset variable: ' - ); - //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"! - $l = true; - if ($langcode != 'en') { //There is no English translation file - $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php'; - } - $this->language = $PHPMAILER_LANG; - return ($l == true); //Returns false if language not found - } - - /** - * Return the current array of language strings - * @return array - */ - public function GetTranslations() { - return $this->language; - } - - ///////////////////////////////////////////////// - // METHODS, MESSAGE CREATION - ///////////////////////////////////////////////// - - /** - * Creates recipient headers. - * @access public - * @return string - */ - public function AddrAppend($type, $addr) { - $addr_str = $type . ': '; - $addresses = array(); - foreach ($addr as $a) { - $addresses[] = $this->AddrFormat($a); - } - $addr_str .= implode(', ', $addresses); - $addr_str .= $this->LE; - - return $addr_str; - } - - /** - * Formats an address correctly. - * @access public - * @return string - */ - public function AddrFormat($addr) { - if (empty($addr[1])) { - return $this->SecureHeader($addr[0]); - } else { - return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; - } - } - - /** - * Wraps message for use with mailers that do not - * automatically perform wrapping and for quoted-printable. - * Original written by philippe. - * @param string $message The message to wrap - * @param integer $length The line length to wrap to - * @param boolean $qp_mode Whether to run in Quoted-Printable mode - * @access public - * @return string - */ - public function WrapText($message, $length, $qp_mode = false) { - $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; - // If utf-8 encoding is used, we will need to make sure we don't - // split multibyte characters when we wrap - $is_utf8 = (strtolower($this->CharSet) == "utf-8"); - - $message = $this->FixEOL($message); - if (substr($message, -1) == $this->LE) { - $message = substr($message, 0, -1); - } - - $line = explode($this->LE, $message); - $message = ''; - for ($i = 0 ;$i < count($line); $i++) { - $line_part = explode(' ', $line[$i]); - $buf = ''; - for ($e = 0; $e $length)) { - $space_left = $length - strlen($buf) - 1; - if ($e != 0) { - if ($space_left > 20) { - $len = $space_left; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf .= ' ' . $part; - $message .= $buf . sprintf("=%s", $this->LE); - } else { - $message .= $buf . $soft_break; - } - $buf = ''; - } - while (strlen($word) > 0) { - $len = $length; - if ($is_utf8) { - $len = $this->UTF8CharBoundary($word, $len); - } elseif (substr($word, $len - 1, 1) == "=") { - $len--; - } elseif (substr($word, $len - 2, 1) == "=") { - $len -= 2; - } - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if (strlen($word) > 0) { - $message .= $part . sprintf("=%s", $this->LE); - } else { - $buf = $part; - } - } - } else { - $buf_o = $buf; - $buf .= ($e == 0) ? $word : (' ' . $word); - - if (strlen($buf) > $length and $buf_o != '') { - $message .= $buf_o . $soft_break; - $buf = $word; - } - } - } - $message .= $buf . $this->LE; - } - - return $message; - } - - /** - * Finds last character boundary prior to maxLength in a utf-8 - * quoted (printable) encoded string. - * Original written by Colin Brown. - * @access public - * @param string $encodedText utf-8 QP text - * @param int $maxLength find last character boundary prior to this length - * @return int - */ - public function UTF8CharBoundary($encodedText, $maxLength) { - $foundSplitPos = false; - $lookBack = 3; - while (!$foundSplitPos) { - $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); - $encodedCharPos = strpos($lastChunk, "="); - if ($encodedCharPos !== false) { - // Found start of encoded character byte within $lookBack block. - // Check the encoded byte value (the 2 chars after the '=') - $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); - $dec = hexdec($hex); - if ($dec < 128) { // Single byte character. - // If the encoded char was found at pos 0, it will fit - // otherwise reduce maxLength to start of the encoded char - $maxLength = ($encodedCharPos == 0) ? $maxLength : - $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec >= 192) { // First byte of a multi byte character - // Reduce maxLength to split at start of character - $maxLength = $maxLength - ($lookBack - $encodedCharPos); - $foundSplitPos = true; - } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back - $lookBack += 3; - } - } else { - // No encoded character found - $foundSplitPos = true; - } - } - return $maxLength; - } - - - /** - * Set the body wrapping. - * @access public - * @return void - */ - public function SetWordWrap() { - if($this->WordWrap < 1) { - return; - } - - switch($this->message_type) { - case 'alt': - case 'alt_inline': - case 'alt_attach': - case 'alt_inline_attach': - $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->WrapText($this->Body, $this->WordWrap); - break; - } - } - - /** - * Assembles message header. - * @access public - * @return string The assembled header - */ - public function CreateHeader() { - $result = ''; - - // Set the boundaries - $uniq_id = md5(uniqid(time())); - $this->boundary[1] = 'b1_' . $uniq_id; - $this->boundary[2] = 'b2_' . $uniq_id; - $this->boundary[3] = 'b3_' . $uniq_id; - - $result .= $this->HeaderLine('Date', self::RFCDate()); - if($this->Sender == '') { - $result .= $this->HeaderLine('Return-Path', trim($this->From)); - } else { - $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); - } - - // To be created automatically by mail() - if($this->Mailer != 'mail') { - if ($this->SingleTo === true) { - foreach($this->to as $t) { - $this->SingleToArray[] = $this->AddrFormat($t); - } - } else { - if(count($this->to) > 0) { - $result .= $this->AddrAppend('To', $this->to); - } elseif (count($this->cc) == 0) { - $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); - } - } - } - - $from = array(); - $from[0][0] = trim($this->From); - $from[0][1] = $this->FromName; - $result .= $this->AddrAppend('From', $from); - - // sendmail and mail() extract Cc from the header before sending - if(count($this->cc) > 0) { - $result .= $this->AddrAppend('Cc', $this->cc); - } - - // sendmail and mail() extract Bcc from the header before sending - if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) { - $result .= $this->AddrAppend('Bcc', $this->bcc); - } - - if(count($this->ReplyTo) > 0) { - $result .= $this->AddrAppend('Reply-to', $this->ReplyTo); - } - - // mail() sets the subject itself - if($this->Mailer != 'mail') { - $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); - } - - if($this->MessageID != '') { - $result .= $this->HeaderLine('Message-ID', $this->MessageID); - } else { - $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); - } - $result .= $this->HeaderLine('X-Priority', $this->Priority); - if($this->XMailer) { - $result .= $this->HeaderLine('X-Mailer', $this->XMailer); - } else { - $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (http://code.google.com/a/apache-extras.org/p/phpmailer/)'); - } - - if($this->ConfirmReadingTo != '') { - $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); - } - - // Add custom headers - for($index = 0; $index < count($this->CustomHeader); $index++) { - $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); - } - if (!$this->sign_key_file) { - $result .= $this->HeaderLine('MIME-Version', '1.0'); - $result .= $this->GetMailMIME(); - } - - return $result; - } - - /** - * Returns the message MIME. - * @access public - * @return string - */ - public function GetMailMIME() { - $result = ''; - switch($this->message_type) { - case 'plain': - $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); - $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset="'.$this->CharSet.'"'); - break; - case 'inline': - $result .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'attach': - case 'inline_attach': - case 'alt_attach': - case 'alt_inline_attach': - $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - case 'alt': - case 'alt_inline': - $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - } - - if($this->Mailer != 'mail') { - $result .= $this->LE.$this->LE; - } - - return $result; - } - - /** - * Assembles the message body. Returns an empty string on failure. - * @access public - * @return string The assembled message body - */ - public function CreateBody() { - $body = ''; - - if ($this->sign_key_file) { - $body .= $this->GetMailMIME(); - } - - $this->SetWordWrap(); - - switch($this->message_type) { - case 'plain': - $body .= $this->EncodeString($this->Body, $this->Encoding); - break; - case 'inline': - $body .= $this->GetBoundary($this->boundary[1], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[1]); - break; - case 'attach': - $body .= $this->GetBoundary($this->boundary[1], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'inline_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', '', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'alt': - $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[1]); - break; - case 'alt_inline': - $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[2]); - $body .= $this->LE; - $body .= $this->EndBoundary($this->boundary[1]); - break; - case 'alt_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->EndBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - case 'alt_inline_attach': - $body .= $this->TextLine("--" . $this->boundary[1]); - $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); - $body .= $this->EncodeString($this->AltBody, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->TextLine("--" . $this->boundary[2]); - $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); - $body .= $this->TextLine("\tboundary=\"" . $this->boundary[3] . '"'); - $body .= $this->LE; - $body .= $this->GetBoundary($this->boundary[3], '', 'text/html', ''); - $body .= $this->EncodeString($this->Body, $this->Encoding); - $body .= $this->LE.$this->LE; - $body .= $this->AttachAll("inline", $this->boundary[3]); - $body .= $this->LE; - $body .= $this->EndBoundary($this->boundary[2]); - $body .= $this->LE; - $body .= $this->AttachAll("attachment", $this->boundary[1]); - break; - } - - if ($this->IsError()) { - $body = ''; - } elseif ($this->sign_key_file) { - try { - $file = tempnam('', 'mail'); - file_put_contents($file, $body); //TODO check this worked - $signed = tempnam("", "signed"); - if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) { - @unlink($file); - @unlink($signed); - $body = file_get_contents($signed); - } else { - @unlink($file); - @unlink($signed); - throw new phpmailerException($this->Lang("signing").openssl_error_string()); - } - } catch (phpmailerException $e) { - $body = ''; - if ($this->exceptions) { - throw $e; - } - } - } - - return $body; - } - - /** - * Returns the start of a message boundary. - * @access protected - * @return string - */ - protected function GetBoundary($boundary, $charSet, $contentType, $encoding) { - $result = ''; - if($charSet == '') { - $charSet = $this->CharSet; - } - if($contentType == '') { - $contentType = $this->ContentType; - } - if($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->TextLine('--' . $boundary); - $result .= sprintf("Content-Type: %s; charset=\"%s\"", $contentType, $charSet); - $result .= $this->LE; - $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); - $result .= $this->LE; - - return $result; - } - - /** - * Returns the end of a message boundary. - * @access protected - * @return string - */ - protected function EndBoundary($boundary) { - return $this->LE . '--' . $boundary . '--' . $this->LE; - } - - /** - * Sets the message type. - * @access protected - * @return void - */ - protected function SetMessageType() { - $this->message_type = array(); - if($this->AlternativeExists()) $this->message_type[] = "alt"; - if($this->InlineImageExists()) $this->message_type[] = "inline"; - if($this->AttachmentExists()) $this->message_type[] = "attach"; - $this->message_type = implode("_", $this->message_type); - if($this->message_type == "") $this->message_type = "plain"; - } - - /** - * Returns a formatted header line. - * @access public - * @return string - */ - public function HeaderLine($name, $value) { - return $name . ': ' . $value . $this->LE; - } - - /** - * Returns a formatted mail line. - * @access public - * @return string - */ - public function TextLine($value) { - return $value . $this->LE; - } - - ///////////////////////////////////////////////// - // CLASS METHODS, ATTACHMENTS - ///////////////////////////////////////////////// - - /** - * Adds an attachment from a path on the filesystem. - * Returns false if the file could not be found - * or accessed. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { - try { - if ( !@is_file($path) ) { - throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE); - } - $filename = basename($path); - if ( $name == '' ) { - $name = $filename; - } - - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - - } catch (phpmailerException $e) { - $this->SetError($e->getMessage()); - if ($this->exceptions) { - throw $e; - } - echo $e->getMessage()."\n"; - if ( $e->getCode() == self::STOP_CRITICAL ) { - return false; - } - } - return true; - } - - /** - * Return the current array of attachments - * @return array - */ - public function GetAttachments() { - return $this->attachment; - } - - /** - * Attaches all fs, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access protected - * @return string - */ - protected function AttachAll($disposition_type, $boundary) { - // Return text of body - $mime = array(); - $cidUniq = array(); - $incl = array(); - - // Add all attachments - foreach ($this->attachment as $attachment) { - // CHECK IF IT IS A VALID DISPOSITION_FILTER - if($attachment[6] == $disposition_type) { - // Check for string attachment - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - $inclhash = md5(serialize($attachment)); - if (in_array($inclhash, $incl)) { continue; } - $incl[] = $inclhash; - $filename = $attachment[1]; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; } - $cidUniq[$cid] = true; - - $mime[] = sprintf("--%s%s", $boundary, $this->LE); - $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); - - if($disposition == 'inline') { - $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); - } - - $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); - - // Encode as string attachment - if($bString) { - $mime[] = $this->EncodeString($string, $encoding); - if($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } else { - $mime[] = $this->EncodeFile($path, $encoding); - if($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } - } - } - - $mime[] = sprintf("--%s--%s", $boundary, $this->LE); - - return implode("", $mime); - } - - /** - * Encodes attachment in requested format. - * Returns an empty string on failure. - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @see EncodeFile() - * @access protected - * @return string - */ - protected function EncodeFile($path, $encoding = 'base64') { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE); - } - if (function_exists('get_magic_quotes')) { - function get_magic_quotes() { - return false; - } - } - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - $magic_quotes = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->EncodeString($file_buffer, $encoding); - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } - return $file_buffer; - } catch (Exception $e) { - $this->SetError($e->getMessage()); - return ''; - } - } - - /** - * Encodes string to requested format. - * Returns an empty string on failure. - * @param string $str The text to encode - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * @access public - * @return string - */ - public function EncodeString($str, $encoding = 'base64') { - $encoded = ''; - switch(strtolower($encoding)) { - case 'base64': - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->FixEOL($str); - //Make sure it ends with a line break - if (substr($encoded, -(strlen($this->LE))) != $this->LE) - $encoded .= $this->LE; - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->EncodeQP($str); - break; - default: - $this->SetError($this->Lang('encoding') . $encoding); - break; - } - return $encoded; - } - - /** - * Encode a header string to best (shortest) of Q, B, quoted or none. - * @access public - * @return string - */ - public function EncodeHeader($str, $position = 'text') { - $x = 0; - - switch (strtolower($position)) { - case 'phrase': - if (!preg_match('/[\200-\377]/', $str)) { - // Can't use addslashes as we don't know what value has magic_quotes_sybase - $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { - return ($encoded); - } else { - return ("\"$encoded\""); - } - } - $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - case 'comment': - $x = preg_match_all('/[()"]/', $str, $matches); - // Fall-through - case 'text': - default: - $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - if ($x == 0) { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - // Try to select the encoding which should produce the shortest output - if (strlen($str)/3 < $x) { - $encoding = 'B'; - if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { - // Use a custom function which correctly encodes and wraps long - // multibyte strings without breaking lines within a character - $encoded = $this->Base64EncodeWrapMB($str); - } else { - $encoded = base64_encode($str); - $maxlen -= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - } else { - $encoding = 'Q'; - $encoded = $this->EncodeQ($str, $position); - $encoded = $this->WrapText($encoded, $maxlen, true); - $encoded = str_replace('='.$this->LE, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - - return $encoded; - } - - /** - * Checks if a string contains multibyte characters. - * @access public - * @param string $str multi-byte text to wrap encode - * @return bool - */ - public function HasMultiBytes($str) { - if (function_exists('mb_strlen')) { - return (strlen($str) > mb_strlen($str, $this->CharSet)); - } else { // Assume no multibytes (we can't handle without mbstring functions anyway) - return false; - } - } - - /** - * Correctly encodes and wraps long multibyte strings for mail headers - * without breaking lines within a character. - * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php - * @access public - * @param string $str multi-byte text to wrap encode - * @return string - */ - public function Base64EncodeWrapMB($str) { - $start = "=?".$this->CharSet."?B?"; - $end = "?="; - $encoded = ""; - - $mb_length = mb_strlen($str, $this->CharSet); - // Each line must have length <= 75, including $start and $end - $length = 75 - strlen($start) - strlen($end); - // Average multi-byte ratio - $ratio = $mb_length / strlen($str); - // Base64 has a 4:3 ratio - $offset = $avgLength = floor($length * $ratio * .75); - - for ($i = 0; $i < $mb_length; $i += $offset) { - $lookBack = 0; - - do { - $offset = $avgLength - $lookBack; - $chunk = mb_substr($str, $i, $offset, $this->CharSet); - $chunk = base64_encode($chunk); - $lookBack++; - } - while (strlen($chunk) > $length); - - $encoded .= $chunk . $this->LE; - } - - // Chomp the last linefeed - $encoded = substr($encoded, 0, -strlen($this->LE)); - return $encoded; - } - - /** - * Encode string to quoted-printable. - * Only uses standard PHP, slow, but will always work - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @return string - */ - public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false) { - $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); - $lines = preg_split('/(?:\r\n|\r|\n)/', $input); - $eol = "\r\n"; - $escape = '='; - $output = ''; - while( list(, $line) = each($lines) ) { - $linlen = strlen($line); - $newline = ''; - for($i = 0; $i < $linlen; $i++) { - $c = substr( $line, $i, 1 ); - $dec = ord( $c ); - if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E - $c = '=2E'; - } - if ( $dec == 32 ) { - if ( $i == ( $linlen - 1 ) ) { // convert space at eol only - $c = '=20'; - } else if ( $space_conv ) { - $c = '=20'; - } - } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required - $h2 = floor($dec/16); - $h1 = floor($dec%16); - $c = $escape.$hex[$h2].$hex[$h1]; - } - if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted - $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay - $newline = ''; - // check if newline first character will be point or not - if ( $dec == 46 ) { - $c = '=2E'; - } - } - $newline .= $c; - } // end of for - $output .= $newline.$eol; - } // end of while - return $output; - } - - /** - * Encode string to RFC2045 (6.7) quoted-printable format - * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version - * Also results in same content as you started with after decoding - * @see EncodeQPphp() - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function - * @return string - * @author Marcus Bointon - */ - public function EncodeQP($string, $line_max = 76, $space_conv = false) { - if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) - return quoted_printable_encode($string); - } - $filters = stream_get_filters(); - if (!in_array('convert.*', $filters)) { //Got convert stream filter? - return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation - } - $fp = fopen('php://temp/', 'r+'); - $string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks - $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE); - $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); - fputs($fp, $string); - rewind($fp); - $out = stream_get_contents($fp); - stream_filter_remove($s); - $out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange - fclose($fp); - return $out; - } - - /** - * Encode string to q encoding. - * @link http://tools.ietf.org/html/rfc2047 - * @param string $str the text to encode - * @param string $position Where the text is going to be used, see the RFC for what that means - * @access public - * @return string - */ - public function EncodeQ($str, $position = 'text') { - // There should not be any EOL in the string - $encoded = preg_replace('/[\r\n]*/', '', $str); - - switch (strtolower($position)) { - case 'phrase': - $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - break; - case 'comment': - $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - case 'text': - default: - // Replace every high ascii, control =, ? and _ characters - //TODO using /e (equivalent to eval()) is probably not a good idea - $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', - "'='.sprintf('%02X', ord(stripslashes('\\1')))", $encoded); - break; - } - - // Replace every spaces to _ (more readable than =20) - $encoded = str_replace(' ', '_', $encoded); - - return $encoded; - } - - /** - * Adds a string or binary attachment (non-filesystem) to the list. - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return void - */ - public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') { - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => 'attachment', - 7 => 0 - ); - } - - /** - * Adds an embedded attachment. This can include images, sounds, and - * just about any other document. Make sure to set the $type to an - * image type. For JPEG images use "image/jpeg" and for GIF images - * use "image/gif". - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment. Use this to identify - * the Id for accessing the image in an HTML form. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { - - if ( !@is_file($path) ) { - $this->SetError($this->Lang('file_access') . $path); - return false; - } - - $filename = basename($path); - if ( $name == '' ) { - $name = $filename; - } - - // Append to $attachment array - $this->attachment[] = array( - 0 => $path, - 1 => $filename, - 2 => $name, - 3 => $encoding, - 4 => $type, - 5 => false, // isStringAttachment - 6 => 'inline', - 7 => $cid - ); - - return true; - } - - public function AddStringEmbeddedImage($string, $cid, $filename = '', $encoding = 'base64', $type = 'application/octet-stream') { - // Append to $attachment array - $this->attachment[] = array( - 0 => $string, - 1 => $filename, - 2 => basename($filename), - 3 => $encoding, - 4 => $type, - 5 => true, // isStringAttachment - 6 => 'inline', - 7 => $cid - ); - } - - /** - * Returns true if an inline attachment is present. - * @access public - * @return bool - */ - public function InlineImageExists() { - foreach($this->attachment as $attachment) { - if ($attachment[6] == 'inline') { - return true; - } - } - return false; - } - - public function AttachmentExists() { - foreach($this->attachment as $attachment) { - if ($attachment[6] == 'attachment') { - return true; - } - } - return false; - } - - public function AlternativeExists() { - return strlen($this->AltBody)>0; - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MESSAGE RESET - ///////////////////////////////////////////////// - - /** - * Clears all recipients assigned in the TO array. Returns void. - * @return void - */ - public function ClearAddresses() { - foreach($this->to as $to) { - unset($this->all_recipients[strtolower($to[0])]); - } - $this->to = array(); - } - - /** - * Clears all recipients assigned in the CC array. Returns void. - * @return void - */ - public function ClearCCs() { - foreach($this->cc as $cc) { - unset($this->all_recipients[strtolower($cc[0])]); - } - $this->cc = array(); - } - - /** - * Clears all recipients assigned in the BCC array. Returns void. - * @return void - */ - public function ClearBCCs() { - foreach($this->bcc as $bcc) { - unset($this->all_recipients[strtolower($bcc[0])]); - } - $this->bcc = array(); - } - - /** - * Clears all recipients assigned in the ReplyTo array. Returns void. - * @return void - */ - public function ClearReplyTos() { - $this->ReplyTo = array(); - } - - /** - * Clears all recipients assigned in the TO, CC and BCC - * array. Returns void. - * @return void - */ - public function ClearAllRecipients() { - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); - $this->all_recipients = array(); - } - - /** - * Clears all previously set filesystem, string, and binary - * attachments. Returns void. - * @return void - */ - public function ClearAttachments() { - $this->attachment = array(); - } - - /** - * Clears all custom headers. Returns void. - * @return void - */ - public function ClearCustomHeaders() { - $this->CustomHeader = array(); - } - - ///////////////////////////////////////////////// - // CLASS METHODS, MISCELLANEOUS - ///////////////////////////////////////////////// - - /** - * Adds the error message to the error container. - * @access protected - * @return void - */ - protected function SetError($msg) { - $this->error_count++; - if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { - $lasterror = $this->smtp->getError(); - if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) { - $msg .= '

' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "

\n"; - } - } - $this->ErrorInfo = $msg; - } - - /** - * Returns the proper RFC 822 formatted date. - * @access public - * @return string - * @static - */ - public static function RFCDate() { - $tz = date('Z'); - $tzs = ($tz < 0) ? '-' : '+'; - $tz = abs($tz); - $tz = (int)($tz/3600)*100 + ($tz%3600)/60; - $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); - - return $result; - } - - /** - * Returns the server hostname or 'localhost.localdomain' if unknown. - * @access protected - * @return string - */ - protected function ServerHostname() { - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } else { - $result = 'localhost.localdomain'; - } - - return $result; - } - - /** - * Returns a message in the appropriate language. - * @access protected - * @return string - */ - protected function Lang($key) { - if(count($this->language) < 1) { - $this->SetLanguage('en'); // set the default language - } - - if(isset($this->language[$key])) { - return $this->language[$key]; - } else { - return 'Language string failed to load: ' . $key; - } - } - - /** - * Returns true if an error occurred. - * @access public - * @return bool - */ - public function IsError() { - return ($this->error_count > 0); - } - - /** - * Changes every end of line from CR or LF to CRLF. - * @access public - * @return string - */ - public function FixEOL($str) { - $str = str_replace("\r\n", "\n", $str); - $str = str_replace("\r", "\n", $str); - $str = str_replace("\n", $this->LE, $str); - return $str; - } - - /** - * Adds a custom header. - * @access public - * @return void - */ - public function AddCustomHeader($custom_header) { - $this->CustomHeader[] = explode(':', $custom_header, 2); - } - - /** - * Evaluates the message and returns modifications for inline images and backgrounds - * @access public - * @return $message - */ - public function MsgHTML($message, $basedir = '') { - preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); - if(isset($images[2])) { - foreach($images[2] as $i => $url) { - // do not change urls for absolute images (thanks to corvuscorax) - if (!preg_match('#^[A-z]+://#', $url)) { - $filename = basename($url); - $directory = dirname($url); - ($directory == '.') ? $directory='': ''; - $cid = 'cid:' . md5($filename); - $ext = pathinfo($filename, PATHINFO_EXTENSION); - $mimeType = self::_mime_types($ext); - if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; } - if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; } - if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64', $mimeType) ) { - $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message); - } - } - } - } - $this->IsHTML(true); - $this->Body = $message; - $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $message))); - if (!empty($textMsg) && empty($this->AltBody)) { - $this->AltBody = html_entity_decode($textMsg); - } - if (empty($this->AltBody)) { - $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n"; - } - } - - /** - * Gets the MIME type of the embedded or inline image - * @param string File extension - * @access public - * @return string MIME type of ext - * @static - */ - public static function _mime_types($ext = '') { - $mimes = array( - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'doc' => 'application/msword', - 'bin' => 'application/macbinary', - 'dms' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'class' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'js' => 'application/x-javascript', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xhtml' => 'application/xhtml+xml', - 'xht' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mpga' => 'audio/mpeg', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'rv' => 'video/vnd.rn-realvideo', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'txt' => 'text/plain', - 'text' => 'text/plain', - 'log' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xl' => 'application/excel', - 'eml' => 'message/rfc822' - ); - return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; - } - - /** - * Set (or reset) Class Objects (variables) - * - * Usage Example: - * $page->set('X-Priority', '3'); - * - * @access public - * @param string $name Parameter Name - * @param mixed $value Parameter Value - * NOTE: will not work with arrays, there are no arrays to set/reset - * @todo Should this not be using __set() magic function? - */ - public function set($name, $value = '') { - try { - if (isset($this->$name) ) { - $this->$name = $value; - } else { - throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL); - } - } catch (Exception $e) { - $this->SetError($e->getMessage()); - if ($e->getCode() == self::STOP_CRITICAL) { - return false; - } - } - return true; - } - - /** - * Strips newlines to prevent header injection. - * @access public - * @param string $str String - * @return string - */ - public function SecureHeader($str) { - $str = str_replace("\r", '', $str); - $str = str_replace("\n", '', $str); - return trim($str); - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param string $key_filename Parameter File Name - * @param string $key_pass Password for private key - */ - public function Sign($cert_filename, $key_filename, $key_pass) { - $this->sign_cert_file = $cert_filename; - $this->sign_key_file = $key_filename; - $this->sign_key_pass = $key_pass; - } - - /** - * Set the private key file and password to sign the message. - * - * @access public - * @param string $key_filename Parameter File Name - * @param string $key_pass Password for private key - */ - public function DKIM_QP($txt) { - $tmp = ''; - $line = ''; - for ($i = 0; $i < strlen($txt); $i++) { - $ord = ord($txt[$i]); - if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) { - $line .= $txt[$i]; - } else { - $line .= "=".sprintf("%02X", $ord); - } - } - return $line; - } - - /** - * Generate DKIM signature - * - * @access public - * @param string $s Header - */ - public function DKIM_Sign($s) { - $privKeyStr = file_get_contents($this->DKIM_private); - if ($this->DKIM_passphrase != '') { - $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); - } else { - $privKey = $privKeyStr; - } - if (openssl_sign($s, $signature, $privKey)) { - return base64_encode($signature); - } - } - - /** - * Generate DKIM Canonicalization Header - * - * @access public - * @param string $s Header - */ - public function DKIM_HeaderC($s) { - $s = preg_replace("/\r\n\s+/", " ", $s); - $lines = explode("\r\n", $s); - foreach ($lines as $key => $line) { - list($heading, $value) = explode(":", $line, 2); - $heading = strtolower($heading); - $value = preg_replace("/\s+/", " ", $value) ; // Compress useless spaces - $lines[$key] = $heading.":".trim($value) ; // Don't forget to remove WSP around the value - } - $s = implode("\r\n", $lines); - return $s; - } - - /** - * Generate DKIM Canonicalization Body - * - * @access public - * @param string $body Message Body - */ - public function DKIM_BodyC($body) { - if ($body == '') return "\r\n"; - // stabilize line endings - $body = str_replace("\r\n", "\n", $body); - $body = str_replace("\n", "\r\n", $body); - // END stabilize line endings - while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { - $body = substr($body, 0, strlen($body) - 2); - } - return $body; - } - - /** - * Create the DKIM header, body, as new header - * - * @access public - * @param string $headers_line Header lines - * @param string $subject Subject - * @param string $body Body - */ - public function DKIM_Add($headers_line, $subject, $body) { - $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms - $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body - $DKIMquery = 'dns/txt'; // Query method - $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) - $subject_header = "Subject: $subject"; - $headers = explode($this->LE, $headers_line); - foreach($headers as $header) { - if (strpos($header, 'From:') === 0) { - $from_header = $header; - } elseif (strpos($header, 'To:') === 0) { - $to_header = $header; - } - } - $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); - $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); - $subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable - $body = $this->DKIM_BodyC($body); - $DKIMlen = strlen($body) ; // Length of body - $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body - $ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";"; - $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n". - "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n". - "\th=From:To:Subject;\r\n". - "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n". - "\tz=$from\r\n". - "\t|$to\r\n". - "\t|$subject;\r\n". - "\tbh=" . $DKIMb64 . ";\r\n". - "\tb="; - $toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs); - $signed = $this->DKIM_Sign($toSign); - return "X-PHPMAILER-DKIM: phpmailer.worxware.com\r\n".$dkimhdrs.$signed."\r\n"; - } - - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body) { - if (!empty($this->action_function) && function_exists($this->action_function)) { - $params = array($isSent, $to, $cc, $bcc, $subject, $body); - call_user_func_array($this->action_function, $params); - } - } } - -class phpmailerException extends Exception { - public function errorMessage() { - $errorMsg = '' . $this->getMessage() . "
\n"; - return $errorMsg; - } -} - diff --git a/e_lib/phpmailer5/class.phpmaileroauth.php b/e_lib/phpmailer5/class.phpmaileroauth.php new file mode 100644 index 00000000..b1bb09f0 --- /dev/null +++ b/e_lib/phpmailer5/class.phpmaileroauth.php @@ -0,0 +1,197 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailerOAuth - PHPMailer subclass adding OAuth support. + * @package PHPMailer + * @author @sherryl4george + * @author Marcus Bointon (@Synchro) + */ +class PHPMailerOAuth extends PHPMailer +{ + /** + * The OAuth user's email address + * @var string + */ + public $oauthUserEmail = ''; + + /** + * The OAuth refresh token + * @var string + */ + public $oauthRefreshToken = ''; + + /** + * The OAuth client ID + * @var string + */ + public $oauthClientId = ''; + + /** + * The OAuth client secret + * @var string + */ + public $oauthClientSecret = ''; + + /** + * An instance of the PHPMailerOAuthGoogle class. + * @var PHPMailerOAuthGoogle + * @access protected + */ + protected $oauth = null; + + /** + * Get a PHPMailerOAuthGoogle instance to use. + * @return PHPMailerOAuthGoogle + */ + public function getOAUTHInstance() + { + if (!is_object($this->oauth)) { + $this->oauth = new PHPMailerOAuthGoogle( + $this->oauthUserEmail, + $this->oauthClientSecret, + $this->oauthClientId, + $this->oauthRefreshToken + ); + } + return $this->oauth; + } + + /** + * Initiate a connection to an SMTP server. + * Overrides the original smtpConnect method to add support for OAuth. + * @param array $options An array of options compatible with stream_context_create() + * @uses SMTP + * @access public + * @return bool + * @throws phpmailerException + */ + public function smtpConnect($options = array()) + { + if (is_null($this->smtp)) { + $this->smtp = $this->getSMTPInstance(); + } + + if (is_null($this->oauth)) { + $this->oauth = $this->getOAUTHInstance(); + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = array(); + if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) { + // Not a valid host entry + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ($this->SMTPSecure == 'tls'); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ($hostinfo[2] == 'tls') { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA1'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (integer)$hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new phpmailerException($this->lang('connect_host')); + } + // We must resend HELO after tls negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->Realm, + $this->Workstation, + $this->oauth + ) + ) { + throw new phpmailerException($this->lang('authenticate')); + } + } + return true; + } catch (phpmailerException $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and !is_null($lastexception)) { + throw $lastexception; + } + return false; + } +} diff --git a/e_lib/phpmailer5/class.phpmaileroauthgoogle.php b/e_lib/phpmailer5/class.phpmaileroauthgoogle.php new file mode 100644 index 00000000..71c9bd32 --- /dev/null +++ b/e_lib/phpmailer5/class.phpmaileroauthgoogle.php @@ -0,0 +1,77 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * PHPMailerOAuthGoogle - Wrapper for League OAuth2 Google provider. + * @package PHPMailer + * @author @sherryl4george + * @author Marcus Bointon (@Synchro) + * @link https://github.com/thephpleague/oauth2-client + */ +class PHPMailerOAuthGoogle +{ + private $oauthUserEmail = ''; + private $oauthRefreshToken = ''; + private $oauthClientId = ''; + private $oauthClientSecret = ''; + + /** + * @param string $UserEmail + * @param string $ClientSecret + * @param string $ClientId + * @param string $RefreshToken + */ + public function __construct( + $UserEmail, + $ClientSecret, + $ClientId, + $RefreshToken + ) { + $this->oauthClientId = $ClientId; + $this->oauthClientSecret = $ClientSecret; + $this->oauthRefreshToken = $RefreshToken; + $this->oauthUserEmail = $UserEmail; + } + + private function getProvider() + { + return new League\OAuth2\Client\Provider\Google([ + 'clientId' => $this->oauthClientId, + 'clientSecret' => $this->oauthClientSecret + ]); + } + + private function getGrant() + { + return new \League\OAuth2\Client\Grant\RefreshToken(); + } + + private function getToken() + { + $provider = $this->getProvider(); + $grant = $this->getGrant(); + return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]); + } + + public function getOauth64() + { + $token = $this->getToken(); + return base64_encode("user=" . $this->oauthUserEmail . "\001auth=Bearer " . $token . "\001\001"); + } +} diff --git a/e_lib/phpmailer5/class.pop3.php b/e_lib/phpmailer5/class.pop3.php index d15db74c..f833ac61 100644 --- a/e_lib/phpmailer5/class.pop3.php +++ b/e_lib/phpmailer5/class.pop3.php @@ -1,410 +1,407 @@ + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL) - * @version $Id: class.pop3.php 450 2010-06-23 16:46:33Z coolbru $ + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. */ /** - * POP Before SMTP Authentication Class - * Version 5.2.0 - * - * Author: Richard Davey (rich@corephp.co.uk) - * Modifications: Andy Prevost - * License: LGPL, see PHPMailer License - * - * Specifically for PHPMailer to allow POP before SMTP authentication. - * Does not yet work with APOP - if you have an APOP account, contact Richard Davey - * and we can test changes to this script. - * - * This class is based on the structure of the SMTP class originally authored by Chris Ryan - * - * This class is rfc 1939 compliant and implements all the commands - * required for POP3 connection, authentication and disconnection. - * + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * Does not support APOP. * @package PHPMailer - * @author Richard Davey + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) */ +class POP3 +{ + /** + * The POP3 PHPMailer Version number. + * @var string + * @access public + */ + public $Version = '5.2.26'; -class POP3 { - /** - * Default POP3 port - * @var int - */ - public $POP3_PORT = 110; + /** + * Default POP3 port number. + * @var integer + * @access public + */ + public $POP3_PORT = 110; - /** - * Default Timeout - * @var int - */ - public $POP3_TIMEOUT = 30; + /** + * Default timeout in seconds. + * @var integer + * @access public + */ + public $POP3_TIMEOUT = 30; - /** - * POP3 Carriage Return + Line Feed - * @var string - */ - public $CRLF = "\r\n"; + /** + * POP3 Carriage Return + Line Feed. + * @var string + * @access public + * @deprecated Use the constant instead + */ + public $CRLF = "\r\n"; - /** - * Displaying Debug warnings? (0 = now, 1+ = yes) - * @var int - */ - public $do_debug = 2; + /** + * Debug display level. + * Options: 0 = no, 1+ = yes + * @var integer + * @access public + */ + public $do_debug = 0; - /** - * POP3 Mail Server - * @var string - */ - public $host; + /** + * POP3 mail server hostname. + * @var string + * @access public + */ + public $host; - /** - * POP3 Port - * @var int - */ - public $port; + /** + * POP3 port number. + * @var integer + * @access public + */ + public $port; - /** - * POP3 Timeout Value - * @var int - */ - public $tval; + /** + * POP3 Timeout Value in seconds. + * @var integer + * @access public + */ + public $tval; - /** - * POP3 Username - * @var string - */ - public $username; + /** + * POP3 username + * @var string + * @access public + */ + public $username; - /** - * POP3 Password - * @var string - */ - public $password; + /** + * POP3 password. + * @var string + * @access public + */ + public $password; - /** - * Sets the POP3 PHPMailer Version number - * @var string - */ - public $Version = '5.2'; + /** + * Resource handle for the POP3 connection socket. + * @var resource + * @access protected + */ + protected $pop_conn; - ///////////////////////////////////////////////// - // PROPERTIES, PRIVATE AND PROTECTED - ///////////////////////////////////////////////// + /** + * Are we connected? + * @var boolean + * @access protected + */ + protected $connected = false; - private $pop_conn; - private $connected; - private $error; // Error log array + /** + * Error container. + * @var array + * @access protected + */ + protected $errors = array(); - /** - * Constructor, sets the initial values - * @access public - * @return POP3 - */ - public function __construct() { - $this->pop_conn = 0; - $this->connected = false; - $this->error = null; - } + /** + * Line break constant + */ + const CRLF = "\r\n"; - /** - * Combination of public events - connect, login, disconnect - * @access public - * @param string $host - * @param integer $port - * @param integer $tval - * @param string $username - * @param string $password - */ - public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) { - $this->host = $host; - - // If no port value is passed, retrieve it - if ($port == false) { - $this->port = $this->POP3_PORT; - } else { - $this->port = $port; + /** + * Simple static wrapper for all-in-one POP before SMTP + * @param $host + * @param integer|boolean $port The port number to connect to + * @param integer|boolean $timeout The timeout value + * @param string $username + * @param string $password + * @param integer $debug_level + * @return boolean + */ + public static function popBeforeSmtp( + $host, + $port = false, + $timeout = false, + $username = '', + $password = '', + $debug_level = 0 + ) { + $pop = new POP3; + return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); } - // If no port value is passed, retrieve it - if ($tval == false) { - $this->tval = $this->POP3_TIMEOUT; - } else { - $this->tval = $tval; - } - - $this->do_debug = $debug_level; - $this->username = $username; - $this->password = $password; - - // Refresh the error log - $this->error = null; - - // Connect - $result = $this->Connect($this->host, $this->port, $this->tval); - - if ($result) { - $login_result = $this->Login($this->username, $this->password); - - if ($login_result) { - $this->Disconnect(); - - return true; - } - - } - - // We need to disconnect regardless if the login succeeded - $this->Disconnect(); - - return false; - } - - /** - * Connect to the POP3 server - * @access public - * @param string $host - * @param integer $port - * @param integer $tval - * @return boolean - */ - public function Connect ($host, $port = false, $tval = 30) { - // Are we already connected? - if ($this->connected) { - return true; - } - - /* - On Windows this will raise a PHP Warning error if the hostname doesn't exist. - Rather than supress it with @fsockopen, let's capture it cleanly instead - */ - - set_error_handler(array(&$this, 'catchWarning')); - - // Connect to the POP3 server - $this->pop_conn = fsockopen($host, // POP3 Host - $port, // Port # - $errno, // Error Number - $errstr, // Error Message - $tval); // Timeout (seconds) - - // Restore the error handler - restore_error_handler(); - - // Does the Error Log now contain anything? - if ($this->error && $this->do_debug >= 1) { - $this->displayErrors(); - } - - // Did we connect? - if ($this->pop_conn == false) { - // It would appear not... - $this->error = array( - 'error' => "Failed to connect to server $host on port $port", - 'errno' => $errno, - 'errstr' => $errstr - ); - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - - return false; - } - - // Increase the stream time-out - - // Check for PHP 4.3.0 or later - if (version_compare(phpversion(), '5.0.0', 'ge')) { - stream_set_timeout($this->pop_conn, $tval, 0); - } else { - // Does not work on Windows - if (substr(PHP_OS, 0, 3) !== 'WIN') { - socket_set_timeout($this->pop_conn, $tval, 0); - } - } - - // Get the POP3 server response - $pop3_response = $this->getResponse(); - - // Check for the +OK - if ($this->checkResponse($pop3_response)) { - // The connection is established and the POP3 server is talking - $this->connected = true; - return true; - } - - } - - /** - * Login to the POP3 server (does not support APOP yet) - * @access public - * @param string $username - * @param string $password - * @return boolean - */ - public function Login ($username = '', $password = '') { - if ($this->connected == false) { - $this->error = 'Not connected to POP3 server'; - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - } - - if (empty($username)) { - $username = $this->username; - } - - if (empty($password)) { - $password = $this->password; - } - - $pop_username = "USER $username" . $this->CRLF; - $pop_password = "PASS $password" . $this->CRLF; - - // Send the Username - $this->sendString($pop_username); - $pop3_response = $this->getResponse(); - - if ($this->checkResponse($pop3_response)) { - // Send the Password - $this->sendString($pop_password); - $pop3_response = $this->getResponse(); - - if ($this->checkResponse($pop3_response)) { - return true; - } else { + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * @access public + * @param string $host The hostname to connect to + * @param integer|boolean $port The port number to connect to + * @param integer|boolean $timeout The timeout value + * @param string $username + * @param string $password + * @param integer $debug_level + * @return boolean + */ + public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + $this->host = $host; + // If no port value provided, use default + if (false === $port) { + $this->port = $this->POP3_PORT; + } else { + $this->port = (integer)$port; + } + // If no timeout value provided, use default + if (false === $timeout) { + $this->tval = $this->POP3_TIMEOUT; + } else { + $this->tval = (integer)$timeout; + } + $this->do_debug = $debug_level; + $this->username = $username; + $this->password = $password; + // Reset the error log + $this->errors = array(); + // connect + $result = $this->connect($this->host, $this->port, $this->tval); + if ($result) { + $login_result = $this->login($this->username, $this->password); + if ($login_result) { + $this->disconnect(); + return true; + } + } + // We need to disconnect regardless of whether the login succeeded + $this->disconnect(); return false; - } - } else { - return false; - } - } - - /** - * Disconnect from the POP3 server - * @access public - */ - public function Disconnect () { - $this->sendString('QUIT'); - - fclose($this->pop_conn); - } - - ///////////////////////////////////////////////// - // Private Methods - ///////////////////////////////////////////////// - - /** - * Get the socket response back. - * $size is the maximum number of bytes to retrieve - * @access private - * @param integer $size - * @return string - */ - private function getResponse ($size = 128) { - $pop3_response = fgets($this->pop_conn, $size); - - return $pop3_response; - } - - /** - * Send a string down the open socket connection to the POP3 server - * @access private - * @param string $string - * @return integer - */ - private function sendString ($string) { - $bytes_sent = fwrite($this->pop_conn, $string, strlen($string)); - - return $bytes_sent; - } - - /** - * Checks the POP3 server response for +OK or -ERR - * @access private - * @param string $string - * @return boolean - */ - private function checkResponse ($string) { - if (substr($string, 0, 3) !== '+OK') { - $this->error = array( - 'error' => "Server reported an error: $string", - 'errno' => 0, - 'errstr' => '' - ); - - if ($this->do_debug >= 1) { - $this->displayErrors(); - } - - return false; - } else { - return true; } - } + /** + * Connect to a POP3 server. + * @access public + * @param string $host + * @param integer|boolean $port + * @param integer $tval + * @return boolean + */ + public function connect($host, $port = false, $tval = 30) + { + // Are we already connected? + if ($this->connected) { + return true; + } - /** - * If debug is enabled, display the error message array - * @access private - */ - private function displayErrors () { - echo '
';
+        //On Windows this will raise a PHP Warning error if the hostname doesn't exist.
+        //Rather than suppress it with @fsockopen, capture it cleanly instead
+        set_error_handler(array($this, 'catchWarning'));
 
-    foreach ($this->error as $single_error) {
-      print_r($single_error);
+        if (false === $port) {
+            $port = $this->POP3_PORT;
+        }
+
+        //  connect to the POP3 server
+        $this->pop_conn = fsockopen(
+            $host, //  POP3 Host
+            $port, //  Port #
+            $errno, //  Error Number
+            $errstr, //  Error Message
+            $tval
+        ); //  Timeout (seconds)
+        //  Restore the error handler
+        restore_error_handler();
+
+        //  Did we connect?
+        if (false === $this->pop_conn) {
+            //  It would appear not...
+            $this->setError(array(
+                'error' => "Failed to connect to server $host on port $port",
+                'errno' => $errno,
+                'errstr' => $errstr
+            ));
+            return false;
+        }
+
+        //  Increase the stream time-out
+        stream_set_timeout($this->pop_conn, $tval, 0);
+
+        //  Get the POP3 server response
+        $pop3_response = $this->getResponse();
+        //  Check for the +OK
+        if ($this->checkResponse($pop3_response)) {
+            //  The connection is established and the POP3 server is talking
+            $this->connected = true;
+            return true;
+        }
+        return false;
     }
 
-    echo '
'; - } + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * @access public + * @param string $username + * @param string $password + * @return boolean + */ + public function login($username = '', $password = '') + { + if (!$this->connected) { + $this->setError('Not connected to POP3 server'); + } + if (empty($username)) { + $username = $this->username; + } + if (empty($password)) { + $password = $this->password; + } - /** - * Takes over from PHP for the socket warning handler - * @access private - * @param integer $errno - * @param string $errstr - * @param string $errfile - * @param integer $errline - */ - private function catchWarning ($errno, $errstr, $errfile, $errline) { - $this->error[] = array( - 'error' => "Connecting to the POP3 server raised a PHP warning: ", - 'errno' => $errno, - 'errstr' => $errstr - ); - } + // Send the Username + $this->sendString("USER $username" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + // Send the Password + $this->sendString("PASS $password" . self::CRLF); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + return true; + } + } + return false; + } - // End of class + /** + * Disconnect from the POP3 server. + * @access public + */ + public function disconnect() + { + $this->sendString('QUIT'); + //The QUIT command may cause the daemon to exit, which will kill our connection + //So ignore errors here + try { + @fclose($this->pop_conn); + } catch (Exception $e) { + //Do nothing + }; + } + + /** + * Get a response from the POP3 server. + * $size is the maximum number of bytes to retrieve + * @param integer $size + * @return string + * @access protected + */ + protected function getResponse($size = 128) + { + $response = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo "Server -> Client: $response"; + } + return $response; + } + + /** + * Send raw data to the POP3 server. + * @param string $string + * @return integer + * @access protected + */ + protected function sendString($string) + { + if ($this->pop_conn) { + if ($this->do_debug >= 2) { //Show client messages when debug >= 2 + echo "Client -> Server: $string"; + } + return fwrite($this->pop_conn, $string, strlen($string)); + } + return 0; + } + + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * @param string $string + * @return boolean + * @access protected + */ + protected function checkResponse($string) + { + if (substr($string, 0, 3) !== '+OK') { + $this->setError(array( + 'error' => "Server reported an error: $string", + 'errno' => 0, + 'errstr' => '' + )); + return false; + } else { + return true; + } + } + + /** + * Add an error to the internal error store. + * Also display debug output if it's enabled. + * @param $error + * @access protected + */ + protected function setError($error) + { + $this->errors[] = $error; + if ($this->do_debug >= 1) { + echo '
';
+            foreach ($this->errors as $error) {
+                print_r($error);
+            }
+            echo '
'; + } + } + + /** + * Get an array of error messages, if any. + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * POP3 connection error handler. + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline + * @access protected + */ + protected function catchWarning($errno, $errstr, $errfile, $errline) + { + $this->setError(array( + 'error' => "Connecting to the POP3 server raised a PHP warning: ", + 'errno' => $errno, + 'errstr' => $errstr, + 'errfile' => $errfile, + 'errline' => $errline + )); + } } - diff --git a/e_lib/phpmailer5/class.smtp.php b/e_lib/phpmailer5/class.smtp.php index 5254943e..be6ddce4 100644 --- a/e_lib/phpmailer5/class.smtp.php +++ b/e_lib/phpmailer5/class.smtp.php @@ -1,817 +1,1276 @@ + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2014 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. */ /** - * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP - * commands except TURN which will always return a not implemented - * error. SMTP also provides some utility methods for sending mail - * to an SMTP server. - * original author: Chris Ryan + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * @package PHPMailer + * @author Chris Ryan + * @author Marcus Bointon */ +class SMTP +{ + /** + * The PHPMailer SMTP version number. + * @var string + */ + const VERSION = '5.2.26'; -class SMTP { - /** - * SMTP server port - * @var int - */ - public $SMTP_PORT = 25; + /** + * SMTP line break constant. + * @var string + */ + const CRLF = "\r\n"; - /** - * SMTP reply line ending - * @var string - */ - public $CRLF = "\r\n"; + /** + * The SMTP port to use if one is not specified. + * @var integer + */ + const DEFAULT_SMTP_PORT = 25; - /** - * Sets whether debugging is turned on - * @var bool - */ - public $do_debug; // the level of debug to perform + /** + * The maximum line length allowed by RFC 2822 section 2.1.1 + * @var integer + */ + const MAX_LINE_LENGTH = 998; - /** - * Sets VERP use on/off (default is off) - * @var bool - */ - public $do_verp = false; + /** + * Debug level for no output + */ + const DEBUG_OFF = 0; - /** - * Sets the SMTP PHPMailer Version number - * @var string - */ - public $Version = '5.2'; + /** + * Debug level to show client -> server messages + */ + const DEBUG_CLIENT = 1; - ///////////////////////////////////////////////// - // PROPERTIES, PRIVATE AND PROTECTED - ///////////////////////////////////////////////// + /** + * Debug level to show client -> server and server -> client messages + */ + const DEBUG_SERVER = 2; - private $smtp_conn; // the socket to the server - private $error; // error if any on the last call - private $helo_rply; // the reply the server sent to us for HELO + /** + * Debug level to show connection status, client -> server and server -> client messages + */ + const DEBUG_CONNECTION = 3; - /** - * Initialize the class so that the data is in a known state. - * @access public - * @return void - */ - public function __construct() { - $this->smtp_conn = 0; - $this->error = null; - $this->helo_rply = null; + /** + * Debug level to show all messages + */ + const DEBUG_LOWLEVEL = 4; - $this->do_debug = 0; - } + /** + * The PHPMailer SMTP Version number. + * @var string + * @deprecated Use the `VERSION` constant instead + * @see SMTP::VERSION + */ + public $Version = '5.2.26'; - ///////////////////////////////////////////////// - // CONNECTION FUNCTIONS - ///////////////////////////////////////////////// + /** + * SMTP server port number. + * @var integer + * @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead + * @see SMTP::DEFAULT_SMTP_PORT + */ + public $SMTP_PORT = 25; - /** - * Connect to the server specified on the port specified. - * If the port is not specified use the default SMTP_PORT. - * If tval is specified then a connection will try and be - * established with the server for that number of seconds. - * If tval is not specified the default is 30 seconds to - * try on the connection. - * - * SMTP CODE SUCCESS: 220 - * SMTP CODE FAILURE: 421 - * @access public - * @return bool - */ - public function Connect($host, $port = 0, $tval = 30) { - // set the error val to null so there is no confusion - $this->error = null; + /** + * SMTP reply line ending. + * @var string + * @deprecated Use the `CRLF` constant instead + * @see SMTP::CRLF + */ + public $CRLF = "\r\n"; - // make sure we are __not__ connected - if($this->connected()) { - // already connected, generate error - $this->error = array("error" => "Already connected to a server"); - return false; - } + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages + * @var integer + */ + public $do_debug = self::DEBUG_OFF; - if(empty($port)) { - $port = $this->SMTP_PORT; - } + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
`, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * + * @var string|callable + */ + public $Debugoutput = 'echo'; - // connect to the smtp server - $this->smtp_conn = @fsockopen($host, // the host of the server - $port, // the port to use - $errno, // error number if any - $errstr, // error message if any - $tval); // give up after ? secs - // verify we connected properly - if(empty($this->smtp_conn)) { - $this->error = array("error" => "Failed to connect to server", - "errno" => $errno, - "errstr" => $errstr); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '
'; - } - return false; - } + /** + * Whether to use VERP. + * @link http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @link http://www.postfix.org/VERP_README.html Info on VERP + * @var boolean + */ + public $do_verp = false; - // SMTP server can take longer to respond, give longer timeout for first read - // Windows does not have support for this timeout function - if(substr(PHP_OS, 0, 3) != "WIN") - socket_set_timeout($this->smtp_conn, $tval, 0); + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * @var integer + */ + public $Timeout = 300; - // get any announcement - $announce = $this->get_lines(); + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2 + * @var integer + */ + public $Timelimit = 300; - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '
'; - } + /** + * @var array Patterns to extract an SMTP transaction id from reply to a DATA command. + * The first capture group in each regex will be used as the ID. + */ + protected $smtp_transaction_id_patterns = array( + 'exim' => '/[0-9]{3} OK id=(.*)/', + 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', + 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' + ); - return true; - } + /** + * @var string The last transaction ID issued in response to a DATA command, + * if one was detected + */ + protected $last_smtp_transaction_id; - /** - * Initiate a TLS communication with the server. - * - * SMTP CODE 220 Ready to start TLS - * SMTP CODE 501 Syntax error (no parameters allowed) - * SMTP CODE 454 TLS not available due to temporary reason - * @access public - * @return bool success - */ - public function StartTLS() { - $this->error = null; # to avoid confusion + /** + * The socket for the server connection. + * @var resource + */ + protected $smtp_conn; - if(!$this->connected()) { - $this->error = array("error" => "Called StartTLS() without being connected"); - return false; - } + /** + * Error information, if any, for the last SMTP command. + * @var array + */ + protected $error = array( + 'error' => '', + 'detail' => '', + 'smtp_code' => '', + 'smtp_code_ex' => '' + ); - fputs($this->smtp_conn,"STARTTLS" . $this->CRLF); + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * @var string|null + */ + protected $helo_rply = null; - $rply = $this->get_lines(); - $code = substr($rply,0,3); + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * @var array|null + */ + protected $server_caps = null; - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } + /** + * The most recent reply received from the server. + * @var string + */ + protected $last_reply = ''; - if($code != 220) { - $this->error = - array("error" => "STARTTLS not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Begin encrypted connection - if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { - return false; - } - - return true; - } - - /** - * Performs SMTP authentication. Must be run after running the - * Hello() method. Returns true if successfully authenticated. - * @access public - * @return bool - */ - public function Authenticate($username, $password) { - // Start authentication - fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 334) { - $this->error = - array("error" => "AUTH not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Send encoded username - fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 334) { - $this->error = - array("error" => "Username not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - // Send encoded password - fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($code != 235) { - $this->error = - array("error" => "Password not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - return true; - } - - /** - * Returns true if connected to a server otherwise false - * @access public - * @return bool - */ - public function Connected() { - if(!empty($this->smtp_conn)) { - $sock_status = socket_get_status($this->smtp_conn); - if($sock_status["eof"]) { - // the socket is valid but we are not connected - if($this->do_debug >= 1) { - echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected"; + /** + * Output debugging info via a user-selected method. + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + * @param string $str Debug string to output + * @param integer $level The debug level of this message; see DEBUG_* constants + * @return void + */ + protected function edebug($str, $level = 0) + { + if ($level > $this->do_debug) { + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $level); + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ) . "
\n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( + "\n", + "\n \t ", + trim($str) + ) . "\n"; } - $this->Close(); - return false; - } - return true; // everything looks good - } - return false; - } - - /** - * Closes the socket and cleans up the state of the class. - * It is not considered good to use this function without - * first trying to use QUIT. - * @access public - * @return void - */ - public function Close() { - $this->error = null; // so there is no confusion - $this->helo_rply = null; - if(!empty($this->smtp_conn)) { - // close the connection and cleanup - fclose($this->smtp_conn); - $this->smtp_conn = 0; - } - } - - ///////////////////////////////////////////////// - // SMTP COMMANDS - ///////////////////////////////////////////////// - - /** - * Issues a data command and sends the msg_data to the server - * finializing the mail transaction. $msg_data is the message - * that is to be send with the headers. Each header needs to be - * on a single line followed by a with the message headers - * and the message body being seperated by and additional . - * - * Implements rfc 821: DATA - * - * SMTP CODE INTERMEDIATE: 354 - * [data] - * . - * SMTP CODE SUCCESS: 250 - * SMTP CODE FAILURE: 552,554,451,452 - * SMTP CODE FAILURE: 451,554 - * SMTP CODE ERROR : 500,501,503,421 - * @access public - * @return bool - */ - public function Data($msg_data) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Data() without being connected"); - return false; } - fputs($this->smtp_conn,"DATA" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; - } - - if($code != 354) { - $this->error = - array("error" => "DATA command not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - - /* the server is ready to accept data! - * according to rfc 821 we should not send more than 1000 - * including the CRLF - * characters on a single line so we will break the data up - * into lines by \r and/or \n then if needed we will break - * each of those into smaller lines to fit within the limit. - * in addition we will be looking for lines that start with - * a period '.' and append and additional period '.' to that - * line. NOTE: this does not count towards limit. + /** + * Connect to an SMTP server. + * @param string $host SMTP server IP or host name + * @param integer $port The port number to connect to + * @param integer $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * @access public + * @return boolean */ - - // normalize the line breaks so we know the explode works - $msg_data = str_replace("\r\n","\n",$msg_data); - $msg_data = str_replace("\r","\n",$msg_data); - $lines = explode("\n",$msg_data); - - /* we need to find a good way to determine is headers are - * in the msg_data or if it is a straight msg body - * currently I am assuming rfc 822 definitions of msg headers - * and if the first field of the first line (':' sperated) - * does not contain a space then it _should_ be a header - * and we can process all lines before a blank "" line as - * headers. - */ - - $field = substr($lines[0],0,strpos($lines[0],":")); - $in_headers = false; - if(!empty($field) && !strstr($field," ")) { - $in_headers = true; - } - - $max_line_length = 998; // used below; set here for ease in change - - while(list(,$line) = @each($lines)) { - $lines_out = null; - if($line == "" && $in_headers) { - $in_headers = false; - } - // ok we need to break this line up into several smaller lines - while(strlen($line) > $max_line_length) { - $pos = strrpos(substr($line,0,$max_line_length)," "); - - // Patch to fix DOS attack - if(!$pos) { - $pos = $max_line_length - 1; - $lines_out[] = substr($line,0,$pos); - $line = substr($line,$pos); + public function connect($host, $port = null, $timeout = 30, $options = array()) + { + static $streamok; + //This is enabled by default since 5.0.0 but some providers disable it + //Check this once and cache the result + if (is_null($streamok)) { + $streamok = function_exists('stream_socket_client'); + } + // Clear errors to avoid confusion + $this->setError(''); + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->setError('Already connected to a server'); + return false; + } + if (empty($port)) { + $port = self::DEFAULT_SMTP_PORT; + } + // Connect to the SMTP server + $this->edebug( + "Connection: opening to $host:$port, timeout=$timeout, options=" . + var_export($options, true), + self::DEBUG_CONNECTION + ); + $errno = 0; + $errstr = ''; + if ($streamok) { + $socket_context = stream_context_create($options); + set_error_handler(array($this, 'errorHandler')); + $this->smtp_conn = stream_socket_client( + $host . ":" . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + restore_error_handler(); } else { - $lines_out[] = substr($line,0,$pos); - $line = substr($line,$pos + 1); + //Fall back to fsockopen which should work in more places, but is missing some features + $this->edebug( + "Connection: stream_socket_client not available, falling back to fsockopen", + self::DEBUG_CONNECTION + ); + set_error_handler(array($this, 'errorHandler')); + $this->smtp_conn = fsockopen( + $host, + $port, + $errno, + $errstr, + $timeout + ); + restore_error_handler(); + } + // Verify we connected properly + if (!is_resource($this->smtp_conn)) { + $this->setError( + 'Failed to connect to server', + $errno, + $errstr + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)", + self::DEBUG_CLIENT + ); + return false; + } + $this->edebug('Connection: opened', self::DEBUG_CONNECTION); + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (substr(PHP_OS, 0, 3) != 'WIN') { + $max = ini_get('max_execution_time'); + // Don't bother if unlimited + if ($max != 0 && $timeout > $max) { + @set_time_limit($timeout); + } + stream_set_timeout($this->smtp_conn, $timeout, 0); + } + // Get any announcement + $announce = $this->get_lines(); + $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); + return true; + } + + /** + * Initiate a TLS (encrypted) session. + * @access public + * @return boolean + */ + public function startTLS() + { + if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { + return false; } - /* if processing headers add a LWSP-char to the front of new line - * rfc 822 on long msg headers - */ - if($in_headers) { - $line = "\t" . $line; + //Allow the best TLS version(s) we can + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + //so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; } - } - $lines_out[] = $line; - // send the lines to the server - while(list(,$line_out) = @each($lines_out)) { - if(strlen($line_out) > 0) - { - if(substr($line_out, 0, 1) == ".") { - $line_out = "." . $line_out; - } + // Begin encrypted connection + set_error_handler(array($this, 'errorHandler')); + $crypto_ok = stream_socket_enable_crypto( + $this->smtp_conn, + true, + $crypto_method + ); + restore_error_handler(); + return $crypto_ok; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * @see hello() + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2) + * @param string $realm The auth realm for NTLM + * @param string $workstation The auth workstation for NTLM + * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth) + * @return bool True if successfully authenticated.* @access public + */ + public function authenticate( + $username, + $password, + $authtype = null, + $realm = '', + $workstation = '', + $OAuth = null + ) { + if (!$this->server_caps) { + $this->setError('Authentication is not allowed before HELO/EHLO'); + return false; } - fputs($this->smtp_conn,$line_out . $this->CRLF); - } + + if (array_key_exists('EHLO', $this->server_caps)) { + // SMTP extensions are available; try to find a proper authentication method + if (!array_key_exists('AUTH', $this->server_caps)) { + $this->setError('Authentication is not allowed at this stage'); + // 'at this stage' means that auth may be allowed after the stage changes + // e.g. after STARTTLS + return false; + } + + self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL); + self::edebug( + 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), + self::DEBUG_LOWLEVEL + ); + + if (empty($authtype)) { + foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) { + if (in_array($method, $this->server_caps['AUTH'])) { + $authtype = $method; + break; + } + } + if (empty($authtype)) { + $this->setError('No supported authentication methods found'); + return false; + } + self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); + } + + if (!in_array($authtype, $this->server_caps['AUTH'])) { + $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + return false; + } + } elseif (empty($authtype)) { + $authtype = 'LOGIN'; + } + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand("Username", base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand("Password", base64_encode($password), 235)) { + return false; + } + break; + case 'XOAUTH2': + //If the OAuth Instance is not set. Can be a case when PHPMailer is used + //instead of PHPMailerOAuth + if (is_null($OAuth)) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; + case 'NTLM': + /* + * ntlm_sasl_client.php + * Bundled with Permission + * + * How to telnet in windows: + * http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx + * PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication + */ + require_once 'extras/ntlm_sasl_client.php'; + $temp = new stdClass; + $ntlm_client = new ntlm_sasl_client_class; + //Check that functions are available + if (!$ntlm_client->initialize($temp)) { + $this->setError($temp->error); + $this->edebug( + 'You need to enable some modules in your php.ini file: ' + . $this->error['error'], + self::DEBUG_CLIENT + ); + return false; + } + //msg1 + $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1 + + if (!$this->sendCommand( + 'AUTH NTLM', + 'AUTH NTLM ' . base64_encode($msg1), + 334 + ) + ) { + return false; + } + //Though 0 based, there is a white space after the 3 digit number + //msg2 + $challenge = substr($this->last_reply, 3); + $challenge = base64_decode($challenge); + $ntlm_res = $ntlm_client->NTLMResponse( + substr($challenge, 24, 8), + $password + ); + //msg3 + $msg3 = $ntlm_client->typeMsg3( + $ntlm_res, + $username, + $realm, + $workstation + ); + // send encoded username + return $this->sendCommand('Username', base64_encode($msg3), 235); + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + default: + $this->setError("Authentication method \"$authtype\" is not supported"); + return false; + } + return true; } - // message data has been sent - fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available + * @param string $data The data to hash + * @param string $key The key to hash with + * @access protected + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } - $rply = $this->get_lines(); - $code = substr($rply,0,3); + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // by Lance Rushing + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); } - if($code != 250) { - $this->error = - array("error" => "DATA not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * Sends the HELO command to the smtp server. - * This makes sure that we and the server are in - * the same known state. - * - * Implements from rfc 821: HELO - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE ERROR : 500, 501, 504, 421 - * @access public - * @return bool - */ - public function Hello($host = '') { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Hello() without being connected"); - return false; - } - - // if hostname for HELO was not specified send default - if(empty($host)) { - // determine appropriate default to send to server - $host = "localhost"; - } - - // Send extended hello first (RFC 2821) - if(!$this->SendHello("EHLO", $host)) { - if(!$this->SendHello("HELO", $host)) { + /** + * Check connection state. + * @access public + * @return boolean True if connected. + */ + public function connected() + { + if (is_resource($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // The socket is valid but we are not connected + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected', + self::DEBUG_CLIENT + ); + $this->close(); + return false; + } + return true; // everything looks good + } return false; - } } - return true; - } - - /** - * Sends a HELO/EHLO command. - * @access private - * @return bool - */ - private function SendHello($hello, $host) { - fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '
'; + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * @see quit() + * @access public + * @return void + */ + public function close() + { + $this->setError(''); + $this->server_caps = null; + $this->helo_rply = null; + if (is_resource($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = null; //Makes for cleaner serialization + $this->edebug('Connection: closed', self::DEBUG_CONNECTION); + } } - if($code != 250) { - $this->error = - array("error" => $hello . " not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by and additional . + * Implements rfc 821: DATA + * @param string $msg_data Message data to send + * @access public + * @return boolean + */ + public function data($msg_data) + { + //This will use the standard timelimit + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF) + * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into + * smaller lines to fit within the limit. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) && strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = array(); + if ($in_headers and $line == '') { + $in_headers = false; + } + //Break this line up into several smaller lines if it's too long + //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + //Deliberately matches both false and 0 + if (!$pos) { + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + //Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) and $line_out[0] == '.') { + $line_out = '.' . $line_out; + } + $this->client_send($line_out . self::CRLF); + } + } + + //Message data has been sent, complete the command + //Increase timelimit for end of DATA command + $savetimelimit = $this->Timelimit; + $this->Timelimit = $this->Timelimit * 2; + $result = $this->sendCommand('DATA END', '.', 250); + $this->recordLastTransactionID(); + //Restore timelimit + $this->Timelimit = $savetimelimit; + return $result; } - $this->helo_rply = $rply; - - return true; - } - - /** - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more Recipient - * commands may be called followed by a Data command. - * - * Implements rfc 821: MAIL FROM: - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE SUCCESS: 552,451,452 - * SMTP CODE SUCCESS: 500,501,421 - * @access public - * @return bool - */ - public function Mail($from) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Mail() without being connected"); - return false; + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * @param string $host The host name or IP to connect to + * @access public + * @return boolean + */ + public function hello($host = '') + { + //Try extended hello first (RFC 2821) + return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host)); } - $useVerp = ($this->do_verp ? "XVERP" : ""); - fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello() + * @see hello() + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * @access protected + * @return boolean + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + if ($noerror) { + $this->parseHelloFields($hello); + } else { + $this->server_caps = null; + } + return $noerror; } - if($code != 250) { - $this->error = - array("error" => "MAIL not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * @access protected + * @param string $type - 'HELO' or 'EHLO' + */ + protected function parseHelloFields($type) + { + $this->server_caps = array(); + $lines = explode("\n", $this->helo_rply); - /** - * Sends the quit command to the server and then closes the socket - * if there is no error or the $close_on_error argument is true. - * - * Implements from rfc 821: QUIT - * - * SMTP CODE SUCCESS: 221 - * SMTP CODE ERROR : 500 - * @access public - * @return bool - */ - public function Quit($close_on_error = true) { - $this->error = null; // so there is no confusion - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Quit() without being connected"); - return false; + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space + $s = trim(substr($s, 4)); + if (empty($s)) { + continue; + } + $fields = explode(' ', $s); + if (!empty($fields)) { + if (!$n) { + $name = $type; + $fields = $fields[0]; + } else { + $name = array_shift($fields); + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = array(); + } + break; + default: + $fields = true; + } + } + $this->server_caps[$name] = $fields; + } + } } - // send the quit command to the server - fputs($this->smtp_conn,"quit" . $this->CRLF); - - // get any good-bye messages - $byemsg = $this->get_lines(); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '
'; + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements rfc 821: MAIL FROM: + * @param string $from Source address of this message + * @access public + * @return boolean + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); } - $rval = true; - $e = null; - - $code = substr($byemsg,0,3); - if($code != 221) { - // use e as a tmp var cause Close will overwrite $this->error - $e = array("error" => "SMTP server rejected quit command", - "smtp_code" => $code, - "smtp_rply" => substr($byemsg,4)); - $rval = false; - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '
'; - } + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from rfc 821: QUIT + * @param boolean $close_on_error Should the connection close if an error occurs? + * @access public + * @return boolean + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $err = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + return $noerror; } - if(empty($e) || $close_on_error) { - $this->Close(); + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from rfc 821: RCPT TO: + * @param string $address The address the message is being sent to + * @access public + * @return boolean + */ + public function recipient($address) + { + return $this->sendCommand( + 'RCPT TO', + 'RCPT TO:<' . $address . '>', + array(250, 251) + ); } - return $rval; - } - - /** - * Sends the command RCPT to the SMTP server with the TO: argument of $to. - * Returns true if the recipient was accepted false if it was rejected. - * - * Implements from rfc 821: RCPT TO: - * - * SMTP CODE SUCCESS: 250,251 - * SMTP CODE FAILURE: 550,551,552,553,450,451,452 - * SMTP CODE ERROR : 500,501,503,421 - * @access public - * @return bool - */ - public function Recipient($to) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Recipient() without being connected"); - return false; + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements rfc 821: RSET + * @access public + * @return boolean True on success. + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); } - fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); + /** + * Send a command to an SMTP server and check its return code. + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param integer|array $expect One or more expected integer success codes + * @access protected + * @return boolean True on success. + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->setError("Called $command without being connected"); + return false; + } + //Reject line breaks in all commands + if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { + $this->setError("Command '$command' contained line breaks"); + return false; + } + $this->client_send($commandstring . self::CRLF); - $rply = $this->get_lines(); - $code = substr($rply,0,3); + $this->last_reply = $this->get_lines(); + // Fetch SMTP code and possible error code explanation + $matches = array(); + if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) { + $code = $matches[1]; + $code_ex = (count($matches) > 2 ? $matches[2] : null); + // Cut off error code from each response line + $detail = preg_replace( + "/{$code}[ -]" . + ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . "/m", + '', + $this->last_reply + ); + } else { + // Fall back to simple parsing if regex fails + $code = substr($this->last_reply, 0, 3); + $code_ex = null; + $detail = substr($this->last_reply, 4); + } - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + if (!in_array($code, (array)$expect)) { + $this->setError( + "$command command failed", + $detail, + $code, + $code_ex + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, + self::DEBUG_CLIENT + ); + return false; + } + + $this->setError(''); + return true; } - if($code != 250 && $code != 251) { - $this->error = - array("error" => "RCPT not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; - } - return true; - } - - /** - * Sends the RSET command to abort and transaction that is - * currently in progress. Returns true if successful false - * otherwise. - * - * Implements rfc 821: RSET - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE ERROR : 500,501,504,421 - * @access public - * @return bool - */ - public function Reset() { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called Reset() without being connected"); - return false; + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements rfc 821: SAML FROM: + * @param string $from The address the message is from + * @access public + * @return boolean + */ + public function sendAndMail($from) + { + return $this->sendCommand('SAML', "SAML FROM:$from", 250); } - fputs($this->smtp_conn,"RSET" . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + /** + * Send an SMTP VRFY command. + * @param string $name The name to verify + * @access public + * @return boolean + */ + public function verify($name) + { + return $this->sendCommand('VRFY', "VRFY $name", array(250, 251)); } - if($code != 250) { - $this->error = - array("error" => "RSET failed", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything + * @access public + * @return boolean + */ + public function noop() + { + return $this->sendCommand('NOOP', 'NOOP', 250); } - return true; - } - - /** - * Starts a mail transaction from the email address specified in - * $from. Returns true if successful or false otherwise. If True - * the mail transaction is started and then one or more Recipient - * commands may be called followed by a Data command. This command - * will send the message to the users terminal if they are logged - * in and send them an email. - * - * Implements rfc 821: SAML FROM: - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE SUCCESS: 552,451,452 - * SMTP CODE SUCCESS: 500,501,502,421 - * @access public - * @return bool - */ - public function SendAndMail($from) { - $this->error = null; // so no confusion is caused - - if(!$this->connected()) { - $this->error = array( - "error" => "Called SendAndMail() without being connected"); - return false; + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future + * Implements from rfc 821: TURN + * @access public + * @return boolean + */ + public function turn() + { + $this->setError('The SMTP TURN command is not implemented'); + $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + return false; } - fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); - - $rply = $this->get_lines(); - $code = substr($rply,0,3); - - if($this->do_debug >= 2) { - echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + /** + * Send raw data to the server. + * @param string $data The data to send + * @access public + * @return integer|boolean The number of bytes sent to the server or false on error + */ + public function client_send($data) + { + $this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT); + set_error_handler(array($this, 'errorHandler')); + $result = fwrite($this->smtp_conn, $data); + restore_error_handler(); + return $result; } - if($code != 250) { - $this->error = - array("error" => "SAML not accepted from server", - "smtp_code" => $code, - "smtp_msg" => substr($rply,4)); - if($this->do_debug >= 1) { - echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; - } - return false; + /** + * Get the latest error. + * @access public + * @return array + */ + public function getError() + { + return $this->error; } - return true; - } - /** - * This is an optional command for SMTP that this class does not - * support. This method is here to make the RFC821 Definition - * complete for this class and __may__ be implimented in the future - * - * Implements from rfc 821: TURN - * - * SMTP CODE SUCCESS: 250 - * SMTP CODE FAILURE: 502 - * SMTP CODE ERROR : 500, 503 - * @access public - * @return bool - */ - public function Turn() { - $this->error = array("error" => "This method, TURN, of the SMTP ". - "is not implemented"); - if($this->do_debug >= 1) { - echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '
'; + /** + * Get SMTP extensions available on the server + * @access public + * @return array|null + */ + public function getServerExtList() + { + return $this->server_caps; } - return false; - } - /** - * Get the current error - * @access public - * @return array - */ - public function getError() { - return $this->error; - } + /** + * A multipurpose method + * The method works in three ways, dependent on argument value and current state + * 1. HELO/EHLO was not sent - returns null and set up $this->error + * 2. HELO was sent + * $name = 'HELO': returns server name + * $name = 'EHLO': returns boolean false + * $name = any string: returns null and set up $this->error + * 3. EHLO was sent + * $name = 'HELO'|'EHLO': returns server name + * $name = any string: if extension $name exists, returns boolean True + * or its options. Otherwise returns boolean False + * In other words, one can use this method to detect 3 conditions: + * - null returned: handshake was not or we don't know about ext (refer to $this->error) + * - false returned: the requested feature exactly not exists + * - positive value returned: the requested feature exists + * @param string $name Name of SMTP extension or 'HELO'|'EHLO' + * @return mixed + */ + public function getServerExt($name) + { + if (!$this->server_caps) { + $this->setError('No HELO/EHLO was sent'); + return null; + } - ///////////////////////////////////////////////// - // INTERNAL FUNCTIONS - ///////////////////////////////////////////////// + // the tight logic knot ;) + if (!array_key_exists($name, $this->server_caps)) { + if ($name == 'HELO') { + return $this->server_caps['EHLO']; + } + if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) { + return false; + } + $this->setError('HELO handshake was used. Client knows nothing about server extensions'); + return null; + } - /** - * Read in as many lines as possible - * either before eof or socket timeout occurs on the operation. - * With SMTP we can tell if we have more lines to read if the - * 4th character is '-' symbol. If it is a space then we don't - * need to read anything else. - * @access private - * @return string - */ - private function get_lines() { - $data = ""; - while($str = @fgets($this->smtp_conn,515)) { - if($this->do_debug >= 4) { - echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '
'; - echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '
'; - } - $data .= $str; - if($this->do_debug >= 4) { - echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '
'; - } - // if 4th character is a space, we are done reading, break the loop - if(substr($str,3,1) == " ") { break; } + return $this->server_caps[$name]; } - return $data; - } + /** + * Get the last reply from the server. + * @access public + * @return string + */ + public function getLastReply() + { + return $this->last_reply; + } + + /** + * Read the SMTP server's response. + * Either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access protected + * @return string + */ + protected function get_lines() + { + // If the connection is bad, give up straight away + if (!is_resource($this->smtp_conn)) { + return ''; + } + $data = ''; + $endtime = 0; + stream_set_timeout($this->smtp_conn, $this->Timeout); + if ($this->Timelimit > 0) { + $endtime = time() + $this->Timelimit; + } + while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) { + $str = @fgets($this->smtp_conn, 515); + $this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL); + $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL); + $data .= $str; + // If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled), + // or 4th character is a space, we are done reading, break the loop, + // string array access is a micro-optimisation over strlen + if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) { + break; + } + // Timed-out? Log and break + $info = stream_get_meta_data($this->smtp_conn); + if ($info['timed_out']) { + $this->edebug( + 'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + // Now check if reads took too long + if ($endtime and time() > $endtime) { + $this->edebug( + 'SMTP -> get_lines(): timelimit reached (' . + $this->Timelimit . ' sec)', + self::DEBUG_LOWLEVEL + ); + break; + } + } + return $data; + } + + /** + * Enable or disable VERP address generation. + * @param boolean $enabled + */ + public function setVerp($enabled = false) + { + $this->do_verp = $enabled; + } + + /** + * Get VERP address generation mode. + * @return boolean + */ + public function getVerp() + { + return $this->do_verp; + } + + /** + * Set error messages and codes. + * @param string $message The error message + * @param string $detail Further detail on the error + * @param string $smtp_code An associated SMTP error code + * @param string $smtp_code_ex Extended SMTP code + */ + protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '') + { + $this->error = array( + 'error' => $message, + 'detail' => $detail, + 'smtp_code' => $smtp_code, + 'smtp_code_ex' => $smtp_code_ex + ); + } + + /** + * Set debug output method. + * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it. + */ + public function setDebugOutput($method = 'echo') + { + $this->Debugoutput = $method; + } + + /** + * Get debug output method. + * @return string + */ + public function getDebugOutput() + { + return $this->Debugoutput; + } + + /** + * Set debug output level. + * @param integer $level + */ + public function setDebugLevel($level = 0) + { + $this->do_debug = $level; + } + + /** + * Get debug output level. + * @return integer + */ + public function getDebugLevel() + { + return $this->do_debug; + } + + /** + * Set SMTP timeout. + * @param integer $timeout + */ + public function setTimeout($timeout = 0) + { + $this->Timeout = $timeout; + } + + /** + * Get SMTP timeout. + * @return integer + */ + public function getTimeout() + { + return $this->Timeout; + } + + /** + * Reports an error number and string. + * @param integer $errno The error number returned by PHP. + * @param string $errmsg The error message returned by PHP. + * @param string $errfile The file the error occurred in + * @param integer $errline The line number the error occurred on + */ + protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0) + { + $notice = 'Connection failed.'; + $this->setError( + $notice, + $errno, + $errmsg + ); + $this->edebug( + $notice . ' Error #' . $errno . ': ' . $errmsg . " [$errfile line $errline]", + self::DEBUG_CONNECTION + ); + } + + /** + * Extract and return the ID of the last SMTP transaction based on + * a list of patterns provided in SMTP::$smtp_transaction_id_patterns. + * Relies on the host providing the ID in response to a DATA command. + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * @return bool|null|string + */ + protected function recordLastTransactionID() + { + $reply = $this->getLastReply(); + + if (empty($reply)) { + $this->last_smtp_transaction_id = null; + } else { + $this->last_smtp_transaction_id = false; + foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { + if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) { + $this->last_smtp_transaction_id = $matches[1]; + } + } + } + + return $this->last_smtp_transaction_id; + } + + /** + * Get the queue/transaction ID of the last SMTP transaction + * If no reply has been received yet, it will return null. + * If no pattern was matched, it will return false. + * @return bool|null|string + * @see recordLastTransactionID() + */ + public function getLastTransactionID() + { + return $this->last_smtp_transaction_id; + } } - - diff --git a/e_lib/phpmailer5/composer.json b/e_lib/phpmailer5/composer.json new file mode 100644 index 00000000..a0ac2964 --- /dev/null +++ b/e_lib/phpmailer5/composer.json @@ -0,0 +1,61 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "require": { + "ext-ctype": "*", + "php": ">=5.0.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "jms/serializer": "0.16.*", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "4.8.*", + "symfony/debug": "2.8.*", + "symfony/filesystem": "2.8.*", + "symfony/translation": "2.8.*", + "symfony/yaml": "2.8.*", + "zendframework/zend-cache": "2.5.1", + "zendframework/zend-config": "2.5.1", + "zendframework/zend-eventmanager": "2.5.1", + "zendframework/zend-filter": "2.5.1", + "zendframework/zend-i18n": "2.5.1", + "zendframework/zend-json": "2.5.1", + "zendframework/zend-math": "2.5.1", + "zendframework/zend-serializer": "2.5.*", + "zendframework/zend-servicemanager": "2.5.*", + "zendframework/zend-stdlib": "2.5.1" + }, + "suggest": { + "league/oauth2-google": "Needed for Google XOAUTH2 authentication" + }, + "autoload": { + "classmap": [ + "class.phpmailer.php", + "class.phpmaileroauth.php", + "class.phpmaileroauthgoogle.php", + "class.smtp.php", + "class.pop3.php", + "extras/EasyPeasyICS.php", + "extras/ntlm_sasl_client.php" + ] + }, + "license": "LGPL-2.1" +} diff --git a/e_lib/phpmailer5/composer.lock b/e_lib/phpmailer5/composer.lock new file mode 100644 index 00000000..9808f283 --- /dev/null +++ b/e_lib/phpmailer5/composer.lock @@ -0,0 +1,3593 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "7e4b1bef833056eed0df39fad5399d7a", + "packages": [], + "packages-dev": [ + { + "name": "cilex/cilex", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Cilex/Cilex.git", + "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5", + "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5", + "shasum": "" + }, + "require": { + "cilex/console-service-provider": "1.*", + "php": ">=5.3.3", + "pimple/pimple": "~1.0", + "symfony/finder": "~2.1", + "symfony/process": "~2.1" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*", + "symfony/validator": "~2.1" + }, + "suggest": { + "monolog/monolog": ">=1.0.0", + "symfony/validator": ">=1.0.0", + "symfony/yaml": ">=1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Cilex": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components", + "homepage": "http://cilex.github.com", + "keywords": [ + "cli", + "microframework" + ], + "time": "2014-03-29T14:03:13+00:00" + }, + { + "name": "cilex/console-service-provider", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Cilex/console-service-provider.git", + "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e", + "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "1.*@dev", + "symfony/console": "~2.1" + }, + "require-dev": { + "cilex/cilex": "1.*@dev", + "silex/silex": "1.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Cilex\\Provider\\Console": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "Console Service Provider", + "keywords": [ + "cilex", + "console", + "pimple", + "service-provider", + "silex" + ], + "time": "2012-12-19T10:50:58+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2015-08-31T12:32:49+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", + "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2016-11-02T15:56:58+00:00" + }, + { + "name": "herrera-io/json", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kherge-php/json.git", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-php/json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": ">=1.0,<2.0-dev", + "php": ">=5.3.3", + "seld/jsonlint": ">=1.0,<2.0-dev" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/json_version.php" + ], + "psr-0": { + "Herrera\\Json": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for simplifying JSON linting and validation.", + "homepage": "http://herrera-io.github.com/php-json", + "keywords": [ + "json", + "lint", + "schema", + "validate" + ], + "abandoned": "kherge/json", + "time": "2013-10-30T16:51:34+00:00" + }, + { + "name": "herrera-io/phar-update", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-phar-update.git", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "shasum": "" + }, + "require": { + "herrera-io/json": "1.*", + "kherge/version": "1.*", + "php": ">=5.3.3" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/constants.php" + ], + "psr-0": { + "Herrera\\Phar\\Update": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for self-updating Phars.", + "homepage": "http://herrera-io.github.com/php-phar-update", + "keywords": [ + "phar", + "update" + ], + "abandoned": true, + "time": "2013-10-30T17:23:01+00:00" + }, + { + "name": "jms/metadata", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab", + "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "doctrine/cache": "~1.0", + "symfony/cache": "~3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "time": "2016-12-05T10:18:33+00:00" + }, + { + "name": "jms/parser-lib", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/parser-lib.git", + "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", + "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", + "shasum": "" + }, + "require": { + "phpoption/phpoption": ">=0.9,<2.0-dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "JMS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "description": "A library for easily creating recursive-descent parsers.", + "time": "2012-11-18T18:08:43+00:00" + }, + { + "name": "jms/serializer", + "version": "0.16.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/serializer.git", + "reference": "c8a171357ca92b6706e395c757f334902d430ea9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", + "reference": "c8a171357ca92b6706e395c757f334902d430ea9", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "jms/metadata": "~1.1", + "jms/parser-lib": "1.*", + "php": ">=5.3.2", + "phpcollection/phpcollection": "~0.1" + }, + "require-dev": { + "doctrine/orm": "~2.1", + "doctrine/phpcr-odm": "~1.0.1", + "jackalope/jackalope-doctrine-dbal": "1.0.*", + "propel/propel1": "~1.7", + "symfony/filesystem": "2.*", + "symfony/form": "~2.1", + "symfony/translation": "~2.0", + "symfony/validator": "~2.0", + "symfony/yaml": "2.*", + "twig/twig": ">=1.8,<2.0-dev" + }, + "suggest": { + "symfony/yaml": "Required if you'd like to serialize data to YAML format." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.15-dev" + } + }, + "autoload": { + "psr-0": { + "JMS\\Serializer": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh", + "role": "Developer of wrapped JMSSerializerBundle" + } + ], + "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "homepage": "http://jmsyst.com/libs/serializer", + "keywords": [ + "deserialization", + "jaxb", + "json", + "serialization", + "xml" + ], + "time": "2014-03-18T08:39:00+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", + "shasum": "" + }, + "require": { + "php": ">=5.3.29" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-01-25T15:43:01+00:00" + }, + { + "name": "kherge/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/Version.git", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "KevinGH\\Version": "src/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "me@kevingh.com", + "homepage": "http://www.kevingh.com/" + } + ], + "description": "A parsing and comparison library for semantic versioning.", + "homepage": "http://github.com/kherge/Version", + "abandoned": true, + "time": "2012-08-16T17:13:03+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.22.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "~5.3" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2017-03-13T07:08:03+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "lib/bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2015-09-19T14:15:08+00:00" + }, + { + "name": "phpcollection/phpcollection", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-collection.git", + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "shasum": "" + }, + "require": { + "phpoption/phpoption": "1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-0": { + "PhpCollection": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "General-Purpose Collection Library for PHP", + "keywords": [ + "collection", + "list", + "map", + "sequence", + "set" + ], + "time": "2015-05-17T12:39:23+00:00" + }, + { + "name": "phpdocumentor/fileset", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Fileset.git", + "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", + "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/finder": "~2.1" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Fileset component for collecting a set of files given directories and file paths", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "files", + "fileset", + "phpdoc" + ], + "time": "2013-08-06T21:07:42+00:00" + }, + { + "name": "phpdocumentor/graphviz", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/GraphViz.git", + "reference": "a906a90a9f230535f25ea31caf81b2323956283f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/a906a90a9f230535f25ea31caf81b2323956283f", + "reference": "a906a90a9f230535f25ea31caf81b2323956283f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2016-02-02T13:00:08+00:00" + }, + { + "name": "phpdocumentor/phpdocumentor", + "version": "v2.9.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/phpDocumentor2.git", + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/be607da0eef9b9249c43c5b4820d25d631c73667", + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667", + "shasum": "" + }, + "require": { + "cilex/cilex": "~1.0", + "erusev/parsedown": "~1.0", + "herrera-io/phar-update": "1.0.3", + "jms/serializer": ">=0.12", + "monolog/monolog": "~1.6", + "php": ">=5.3.3", + "phpdocumentor/fileset": "~1.0", + "phpdocumentor/graphviz": "~1.0", + "phpdocumentor/reflection": "^3.0", + "phpdocumentor/reflection-docblock": "~2.0", + "symfony/config": "~2.3", + "symfony/console": "~2.3", + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.0", + "symfony/stopwatch": "~2.3", + "symfony/validator": "~2.2", + "twig/twig": "~1.3", + "zendframework/zend-cache": "~2.1", + "zendframework/zend-config": "~2.1", + "zendframework/zend-filter": "~2.1", + "zendframework/zend-i18n": "~2.1", + "zendframework/zend-serializer": "~2.1", + "zendframework/zend-servicemanager": "~2.1", + "zendframework/zend-stdlib": "~2.1", + "zetacomponents/document": ">=1.3.1" + }, + "require-dev": { + "behat/behat": "~3.0", + "mikey179/vfsstream": "~1.2", + "mockery/mockery": "~0.9@dev", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.4", + "symfony/expression-language": "~2.4" + }, + "suggest": { + "ext-twig": "Enabling the twig extension improves the generation of twig based templates.", + "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates." + }, + "bin": [ + "bin/phpdoc.php", + "bin/phpdoc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "2.9-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/" + ], + "Cilex\\Provider": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Documentation Generator for PHP", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "api", + "application", + "dga", + "documentation", + "phpdoc" + ], + "time": "2016-05-22T09:50:56+00:00" + }, + { + "name": "phpdocumentor/reflection", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Reflection.git", + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.0", + "php": ">=5.3.3", + "phpdocumentor/reflection-docblock": "~2.0", + "psr/log": "~1.0" + }, + "require-dev": { + "behat/behat": "~2.4", + "mockery/mockery": "~0.8", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/", + "tests/unit/", + "tests/mocks/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Reflection library to do Static Analysis for PHP Projects", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2016-05-21T08:42:32+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03T12:10:50+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PhpOption\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache2" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "time": "2015-07-25T16:39:46+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2017-03-02T20:05:34+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2016-10-03T07:40:28+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.11", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-02-27T10:12:30+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.35", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-02-06T05:18:07+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "pimple/pimple", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2013-11-22T08:30:29+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08T07:14:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "seld/jsonlint", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/791f8c594f300d246cdf01c6b3e1e19611e301d8", + "reference": "791f8c594f300d246cdf01c6b3e1e19611e301d8", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2017-03-06T16:42:24+00:00" + }, + { + "name": "symfony/config", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/06ce6bb46c24963ec09323da45d0f4f85d3cecd2", + "reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/filesystem": "~2.3|~3.0.0" + }, + "require-dev": { + "symfony/yaml": "~2.7|~3.0.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2017-03-01T18:13:50+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa", + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-03-04T11:00:12+00:00" + }, + { + "name": "symfony/debug", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/e90099a2958d4833a02d05b504cc06e1c234abcc", + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-02-18T19:13:35+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-02-21T08:33:48+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "e542d4765092d22552b1bf01ddccfb01d98ee325" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e542d4765092d22552b1bf01ddccfb01d98ee325", + "reference": "e542d4765092d22552b1bf01ddccfb01d98ee325", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2017-02-18T17:06:33+00:00" + }, + { + "name": "symfony/finder", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/5fc4b5cab38b9d28be318fcffd8066988e7d9451", + "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2017-02-21T08:33:48+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" + }, + { + "name": "symfony/process", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2017-03-04T12:20:59+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/9e4369666d02ee9b8830da878b7f6a769eb96f4b", + "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2017-02-18T17:06:33+00:00" + }, + { + "name": "symfony/translation", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256", + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.7" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", + "symfony/yaml": "~2.2|~3.0.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2017-03-04T12:20:59+00:00" + }, + { + "name": "symfony/validator", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation": "~2.4|~3.0.0" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "egulias/email-validator": "^1.2.1", + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/yaml": "^2.0.5|~3.0.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "egulias/email-validator": "Strict (RFC compliant) email validation", + "symfony/config": "", + "symfony/expression-language": "For using the 2.4 Expression validator", + "symfony/http-foundation": "", + "symfony/intl": "", + "symfony/property-access": "For using the 2.4 Validator API", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Validator Component", + "homepage": "https://symfony.com", + "time": "2017-02-28T02:24:56+00:00" + }, + { + "name": "symfony/yaml", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-03-01T18:13:50+00:00" + }, + { + "name": "twig/twig", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9935b662e24d6e634da88901ab534cc12e8c728f", + "reference": "9935b662e24d6e634da88901ab534cc12e8c728f", + "shasum": "" + }, + "require": { + "php": ">=5.2.7" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.32-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2017-02-27T00:07:03+00:00" + }, + { + "name": "zendframework/zend-cache", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-cache.git", + "reference": "5999e5a03f7dcf82abbbe67eea74da641f959684" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/5999e5a03f7dcf82abbbe67eea74da641f959684", + "reference": "5999e5a03f7dcf82abbbe67eea74da641f959684", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-session": "~2.5" + }, + "suggest": { + "ext-apc": "APC >= 3.1.6 to use the APC storage adapter", + "ext-dba": "DBA, to use the DBA storage adapter", + "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", + "ext-mongo": "Mongo, to use MongoDb storage adapter", + "ext-wincache": "WinCache, to use the WinCache storage adapter", + "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-session": "Zend\\Session component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a generic way to cache any data", + "homepage": "https://github.com/zendframework/zend-cache", + "keywords": [ + "cache", + "zf2" + ], + "time": "2015-06-03T15:31:59+00:00" + }, + { + "name": "zendframework/zend-config", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-config.git", + "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-config/zipball/ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", + "reference": "ec49b1df1bdd9772df09dc2f612fbfc279bf4c27", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-i18n": "~2.5", + "zendframework/zend-json": "~2.5", + "zendframework/zend-mvc": "~2.5", + "zendframework/zend-servicemanager": "~2.5" + }, + "suggest": { + "zendframework/zend-filter": "Zend\\Filter component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", + "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Config\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a nested object property based user interface for accessing this configuration data within application code", + "homepage": "https://github.com/zendframework/zend-config", + "keywords": [ + "config", + "zf2" + ], + "time": "2015-06-03T15:32:00+00:00" + }, + { + "name": "zendframework/zend-eventmanager", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-eventmanager.git", + "reference": "d94a16039144936f107f906896349900fd634443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/d94a16039144936f107f906896349900fd634443", + "reference": "d94a16039144936f107f906896349900fd634443", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-eventmanager", + "keywords": [ + "eventmanager", + "zf2" + ], + "time": "2015-06-03T15:32:01+00:00" + }, + { + "name": "zendframework/zend-filter", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-filter.git", + "reference": "93e6990a198e6cdd811064083acac4693f4b29ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/93e6990a198e6cdd811064083acac4693f4b29ae", + "reference": "93e6990a198e6cdd811064083acac4693f4b29ae", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-config": "~2.5", + "zendframework/zend-crypt": "~2.5", + "zendframework/zend-i18n": "~2.5", + "zendframework/zend-loader": "~2.5", + "zendframework/zend-servicemanager": "~2.5", + "zendframework/zend-uri": "~2.5" + }, + "suggest": { + "zendframework/zend-crypt": "Zend\\Crypt component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component", + "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Filter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a set of commonly needed data filters", + "homepage": "https://github.com/zendframework/zend-filter", + "keywords": [ + "filter", + "zf2" + ], + "time": "2015-06-03T15:32:01+00:00" + }, + { + "name": "zendframework/zend-i18n", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-i18n.git", + "reference": "509271eb7947e4aabebfc376104179cffea42696" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/509271eb7947e4aabebfc376104179cffea42696", + "reference": "509271eb7947e4aabebfc376104179cffea42696", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-cache": "~2.5", + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-servicemanager": "~2.5", + "zendframework/zend-validator": "~2.5", + "zendframework/zend-view": "~2.5" + }, + "suggest": { + "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", + "zendframework/zend-cache": "Zend\\Cache component", + "zendframework/zend-config": "Zend\\Config component", + "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", + "zendframework/zend-filter": "You should install this package to use the provided filters", + "zendframework/zend-resources": "Translation resources", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component", + "zendframework/zend-validator": "You should install this package to use the provided validators", + "zendframework/zend-view": "You should install this package to use the provided view helpers" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\I18n\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-i18n", + "keywords": [ + "i18n", + "zf2" + ], + "time": "2015-06-03T15:32:01+00:00" + }, + { + "name": "zendframework/zend-json", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-json.git", + "reference": "c74eaf17d2dd37dc1e964be8dfde05706a821ebc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/c74eaf17d2dd37dc1e964be8dfde05706a821ebc", + "reference": "c74eaf17d2dd37dc1e964be8dfde05706a821ebc", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-http": "~2.5", + "zendframework/zend-server": "~2.5", + "zendframework/zendxml": "~1.0" + }, + "suggest": { + "zendframework/zend-http": "Zend\\Http component", + "zendframework/zend-server": "Zend\\Server component", + "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", + "homepage": "https://github.com/zendframework/zend-json", + "keywords": [ + "json", + "zf2" + ], + "time": "2015-06-03T15:32:01+00:00" + }, + { + "name": "zendframework/zend-math", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-math.git", + "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-math/zipball/9f02a1ac4d3374d3332c80f9215deec9c71558fc", + "reference": "9f02a1ac4d3374d3332c80f9215deec9c71558fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "ircmaxell/random-lib": "~1.1", + "phpunit/phpunit": "~4.0", + "zendframework/zend-servicemanager": "~2.5" + }, + "suggest": { + "ext-bcmath": "If using the bcmath functionality", + "ext-gmp": "If using the gmp functionality", + "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", + "zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-math", + "keywords": [ + "math", + "zf2" + ], + "time": "2015-06-03T15:32:02+00:00" + }, + { + "name": "zendframework/zend-serializer", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-serializer.git", + "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", + "reference": "b7208eb17dc4a4fb3a660b85e6c4af035eeed40c", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-json": "~2.5", + "zendframework/zend-math": "~2.5", + "zendframework/zend-stdlib": "~2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-servicemanager": "~2.5" + }, + "suggest": { + "zendframework/zend-servicemanager": "To support plugin manager support" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", + "homepage": "https://github.com/zendframework/zend-serializer", + "keywords": [ + "serializer", + "zf2" + ], + "time": "2015-06-03T15:32:02+00:00" + }, + { + "name": "zendframework/zend-servicemanager", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-servicemanager.git", + "reference": "3b22c403e351d92526c642cba0bd810bc22e1c56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/3b22c403e351d92526c642cba0bd810bc22e1c56", + "reference": "3b22c403e351d92526c642cba0bd810bc22e1c56", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-di": "~2.5", + "zendframework/zend-mvc": "~2.5" + }, + "suggest": { + "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", + "zendframework/zend-di": "Zend\\Di component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\ServiceManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-servicemanager", + "keywords": [ + "servicemanager", + "zf2" + ], + "time": "2015-06-03T15:32:02+00:00" + }, + { + "name": "zendframework/zend-stdlib", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cc8e90a60dd5d44b9730b77d07b97550091da1ae", + "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5" + }, + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-filter": "To support naming strategy hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-stdlib", + "keywords": [ + "stdlib", + "zf2" + ], + "time": "2015-06-03T15:32:03+00:00" + }, + { + "name": "zetacomponents/base", + "version": "1.9", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Base.git", + "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", + "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", + "shasum": "" + }, + "require-dev": { + "zetacomponents/unit-test": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sergey Alexeev" + }, + { + "name": "Sebastian Bergmann" + }, + { + "name": "Jan Borsodi" + }, + { + "name": "Raymond Bosman" + }, + { + "name": "Frederik Holljen" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Vadym Savchuk" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", + "homepage": "https://github.com/zetacomponents", + "time": "2014-09-19T03:28:34+00:00" + }, + { + "name": "zetacomponents/document", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/zetacomponents/Document.git", + "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", + "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", + "shasum": "" + }, + "require": { + "zetacomponents/base": "*" + }, + "require-dev": { + "zetacomponents/unit-test": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "src" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Sebastian Bergmann" + }, + { + "name": "Kore Nordmann" + }, + { + "name": "Derick Rethans" + }, + { + "name": "Tobias Schlitt" + }, + { + "name": "Alexandru Stanoi" + } + ], + "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", + "homepage": "https://github.com/zetacomponents", + "time": "2013-12-19T11:40:00+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.0.0" + }, + "platform-dev": [] +} diff --git a/e_lib/phpmailer5/docs.ini b/e_lib/phpmailer5/docs.ini deleted file mode 100644 index 6906eb0d..00000000 --- a/e_lib/phpmailer5/docs.ini +++ /dev/null @@ -1,92 +0,0 @@ -;; phpDocumentor parse configuration file -;; -;; This file is designed to cut down on repetitive typing on the command-line or web interface -;; You can copy this file to create a number of configuration files that can be used with the -;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web -;; interface will automatically generate a list of .ini files that can be used. -;; -;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs -;; -;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini -;; -;; Copyright 2002, Greg Beaver -;; -;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them - -[Parse Data] -;; title of all the documentation -;; legal values: any string -title = PHPMailer Documentation - -;; parse files that start with a . like .bash_profile -;; legal values: true, false -hidden = false - -;; show elements marked @access private in documentation by setting this to on -;; legal values: on, off -parseprivate = on - -;; parse with javadoc-like description (first sentence is always the short description) -;; legal values: on, off -javadocdesc = off - -;; add any custom @tags separated by commas here -;; legal values: any legal tagname separated by commas. -;customtags = mytag1,mytag2 - -;; This is only used by the XML:DocBook/peardoc2 converter -defaultcategoryname = Documentation - -;; what is the main package? -;; legal values: alphanumeric string plus - and _ -defaultpackagename = PHPMailer - -;; output any parsing information? set to on for cron jobs -;; legal values: on -;quiet = on - -;; parse a PEAR-style repository. Do not turn this on if your project does -;; not have a parent directory named "pear" -;; legal values: on/off -;pear = on - -;; where should the documentation be written? -;; legal values: a legal path -target = ./phpdoc - -;; limit output to the specified packages, even if others are parsed -;; legal values: package names separated by commas -;packageoutput = package1,package2 - -;; comma-separated list of files to parse -;; legal values: paths separated by commas -;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory -filename = *.php - -;; comma-separated list of directories to parse -;; legal values: directory paths separated by commas -;directory = /path1,/path2,.,..,subdirectory -;directory = /home/jeichorn/cvs/pear -;;directory = . - -;; template base directory (the equivalent directory of /phpDocumentor) -;templatebase = /path/to/my/templates - -;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore -;; legal values: any wildcard strings separated by commas -;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/ -ignore = templates_c/,*HTML/default/*,spec/,*CVS*,*.txt,docs/,phpdoc/,examples/,test/ - -;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format -;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib, -;; HTML:frames:earthli, -;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de, -;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli -;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS -;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default -;;output=HTML:frames:earthli -output=HTML:Smarty:HandS - -;; turn this option on if you want highlighted source code for every file -;; legal values: on/off -sourcecode = on diff --git a/e_lib/phpmailer5/docs.ini.orig b/e_lib/phpmailer5/docs.ini.orig deleted file mode 100644 index 6906eb0d..00000000 --- a/e_lib/phpmailer5/docs.ini.orig +++ /dev/null @@ -1,92 +0,0 @@ -;; phpDocumentor parse configuration file -;; -;; This file is designed to cut down on repetitive typing on the command-line or web interface -;; You can copy this file to create a number of configuration files that can be used with the -;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web -;; interface will automatically generate a list of .ini files that can be used. -;; -;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs -;; -;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini -;; -;; Copyright 2002, Greg Beaver -;; -;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them - -[Parse Data] -;; title of all the documentation -;; legal values: any string -title = PHPMailer Documentation - -;; parse files that start with a . like .bash_profile -;; legal values: true, false -hidden = false - -;; show elements marked @access private in documentation by setting this to on -;; legal values: on, off -parseprivate = on - -;; parse with javadoc-like description (first sentence is always the short description) -;; legal values: on, off -javadocdesc = off - -;; add any custom @tags separated by commas here -;; legal values: any legal tagname separated by commas. -;customtags = mytag1,mytag2 - -;; This is only used by the XML:DocBook/peardoc2 converter -defaultcategoryname = Documentation - -;; what is the main package? -;; legal values: alphanumeric string plus - and _ -defaultpackagename = PHPMailer - -;; output any parsing information? set to on for cron jobs -;; legal values: on -;quiet = on - -;; parse a PEAR-style repository. Do not turn this on if your project does -;; not have a parent directory named "pear" -;; legal values: on/off -;pear = on - -;; where should the documentation be written? -;; legal values: a legal path -target = ./phpdoc - -;; limit output to the specified packages, even if others are parsed -;; legal values: package names separated by commas -;packageoutput = package1,package2 - -;; comma-separated list of files to parse -;; legal values: paths separated by commas -;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory -filename = *.php - -;; comma-separated list of directories to parse -;; legal values: directory paths separated by commas -;directory = /path1,/path2,.,..,subdirectory -;directory = /home/jeichorn/cvs/pear -;;directory = . - -;; template base directory (the equivalent directory of /phpDocumentor) -;templatebase = /path/to/my/templates - -;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore -;; legal values: any wildcard strings separated by commas -;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/ -ignore = templates_c/,*HTML/default/*,spec/,*CVS*,*.txt,docs/,phpdoc/,examples/,test/ - -;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format -;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib, -;; HTML:frames:earthli, -;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de, -;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli -;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS -;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default -;;output=HTML:frames:earthli -output=HTML:Smarty:HandS - -;; turn this option on if you want highlighted source code for every file -;; legal values: on/off -sourcecode = on diff --git a/e_lib/phpmailer5/get_oauth_token.php b/e_lib/phpmailer5/get_oauth_token.php new file mode 100644 index 00000000..2c26d0fa --- /dev/null +++ b/e_lib/phpmailer5/get_oauth_token.php @@ -0,0 +1,162 @@ +//get_oauth_token.php + * e.g.: http://localhost/phpmail/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google developer console + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, revoke access to your app + * using link: https://accounts.google.com/b/0/IssuedAuthSubTokens and run the script again. + * This script requires PHP 5.4 or later + * PHP Version 5.4 + */ + +namespace League\OAuth2\Client\Provider; + +require 'vendor/autoload.php'; + +use League\OAuth2\Client\Provider\Exception\IdentityProviderException; +use League\OAuth2\Client\Token\AccessToken; +use League\OAuth2\Client\Tool\BearerAuthorizationTrait; +use Psr\Http\Message\ResponseInterface; + +session_start(); + +//If this automatic URL doesn't work, set it yourself manually +$redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; +//$redirectUri = 'http://localhost/phpmailer/get_oauth_token.php'; + +//These details obtained are by setting up app in Google developer console. +$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com'; +$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP'; + +class Google extends AbstractProvider +{ + use BearerAuthorizationTrait; + + const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id'; + + /** + * @var string If set, this will be sent to google as the "access_type" parameter. + * @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline + */ + protected $accessType; + + /** + * @var string If set, this will be sent to google as the "hd" parameter. + * @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param + */ + protected $hostedDomain; + + /** + * @var string If set, this will be sent to google as the "scope" parameter. + * @link https://developers.google.com/gmail/api/auth/scopes + */ + protected $scope; + + public function getBaseAuthorizationUrl() + { + return 'https://accounts.google.com/o/oauth2/auth'; + } + + public function getBaseAccessTokenUrl(array $params) + { + return 'https://accounts.google.com/o/oauth2/token'; + } + + public function getResourceOwnerDetailsUrl(AccessToken $token) + { + return ' '; + } + + protected function getAuthorizationParameters(array $options) + { + if (is_array($this->scope)) { + $separator = $this->getScopeSeparator(); + $this->scope = implode($separator, $this->scope); + } + + $params = array_merge( + parent::getAuthorizationParameters($options), + array_filter([ + 'hd' => $this->hostedDomain, + 'access_type' => $this->accessType, + 'scope' => $this->scope, + // if the user is logged in with more than one account ask which one to use for the login! + 'authuser' => '-1' + ]) + ); + return $params; + } + + protected function getDefaultScopes() + { + return [ + 'email', + 'openid', + 'profile', + ]; + } + + protected function getScopeSeparator() + { + return ' '; + } + + protected function checkResponse(ResponseInterface $response, $data) + { + if (!empty($data['error'])) { + $code = 0; + $error = $data['error']; + + if (is_array($error)) { + $code = $error['code']; + $error = $error['message']; + } + + throw new IdentityProviderException($error, $code, $data); + } + } + + protected function createResourceOwner(array $response, AccessToken $token) + { + return new GoogleUser($response); + } +} + + +//Set Redirect URI in Developer Console as [https/http]:////get_oauth_token.php +$provider = new Google( + array( + 'clientId' => $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'scope' => array('https://mail.google.com/'), + 'accessType' => 'offline' + ) +); + +if (!isset($_GET['code'])) { + // If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl(); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; +// Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + exit('Invalid state'); +} else { + // Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + array( + 'code' => $_GET['code'] + ) + ); + + // Use this to get a new access token if the old one expires + echo 'Refresh Token: ' . $token->getRefreshToken(); +} diff --git a/f_func/class._Mail.php b/f_func/class._Mail.php index 9d218d20..51fce56a 100644 --- a/f_func/class._Mail.php +++ b/f_func/class._Mail.php @@ -1,6 +1,7 @@ Date: Sat, 20 Jan 2018 05:35:11 +0900 Subject: [PATCH 065/622] =?UTF-8?q?=EC=95=84=EC=9D=B4=EB=94=94=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/set.php | 2 +- f_func/class._Mail.php | 10 ++++++++-- f_func/func.js | 3 ++- i_login/join/sendCodePost.php | 8 ++++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/d_setting/set.php b/d_setting/set.php index 2405cdb0..9447e7a9 100644 --- a/d_setting/set.php +++ b/d_setting/set.php @@ -7,5 +7,5 @@ localhost 25 test letmein -@localhost +test@localhost */ diff --git a/f_func/class._Mail.php b/f_func/class._Mail.php index 51fce56a..33982ff9 100644 --- a/f_func/class._Mail.php +++ b/f_func/class._Mail.php @@ -9,8 +9,8 @@ class _Mail { public function __construct($host, $port, $id, $pw, $addr) { $this->objMail = new PHPMailer(); $this->objMail->IsSMTP(); - $this->objMail->SMTPAuth = true; - $this->objMail->SMTPSecure = 'ssl'; + $this->objMail->SMTPAuth = false; + //$this->objMail->SMTPSecure = 'ssl';//TODO 제대로된 Mailer 옵션 설정 $this->objMail->Host = $host; $this->objMail->Port = $port; $this->objMail->Username = $id; @@ -19,6 +19,12 @@ class _Mail { $this->objMail->CharSet = 'utf-8'; $this->objMail->Encoding = 'base64'; $this->objMail->SetFrom($addr); + $this->objMail->SMTPOptions = array ( + 'ssl' => array( + 'verify_peer' => false, + 'allow_self_signed' => true + ) + ); } public function Send($to, $subject, $content) { diff --git a/f_func/func.js b/f_func/func.js index d5c2b1f1..e3e7c597 100644 --- a/f_func/func.js +++ b/f_func/func.js @@ -12,8 +12,9 @@ function Replace(url) { } function ReplaceFrame(url) { - //window.top.location.replace(url); console.log('top',url); + window.top.location.replace(url); + } function ImportStyle(href) { diff --git a/i_login/join/sendCodePost.php b/i_login/join/sendCodePost.php index 5c74adfe..7ac960a7 100644 --- a/i_login/join/sendCodePost.php +++ b/i_login/join/sendCodePost.php @@ -32,10 +32,10 @@ if($err == 1) { $DB->Delete('EMAIL', "EMAIL='{$email}'"); } $DB->InsertArray('EMAIL', array( - EMAIL => $email, - CODE => $code, - VERIFIED=> 0, - REG_DATE=> _Time::DatetimeNow() + 'EMAIL' => $email, + 'CODE' => $code, + 'VERIFIED'=> 0, + 'REG_DATE'=> _Time::DatetimeNow() )); $response['result'] = 'SUCCESS'; From 3e629c5c540a0dedd5d9bb9c71c355b7daf7b003 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 20 Jan 2018 05:43:50 +0900 Subject: [PATCH 066/622] =?UTF-8?q?stylesheet=EB=A5=BC=20=EC=9A=B0?= =?UTF-8?q?=EC=84=A0=20=EA=B8=B0=EB=B3=B8=EA=B0=92=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A3=BC=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 2 +- twe/join.php | 4 ++-- twe/main.php | 7 ++++++- twe/stylesheet.php | 6 +++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/twe/func.php b/twe/func.php index 283c1bf1..61e693d6 100644 --- a/twe/func.php +++ b/twe/func.php @@ -111,7 +111,7 @@ function GetImageURL($imgsvr) { } function CheckLogin($type=0) { - if($_SESSION['p_id'] == "") { + if(!isset($_SESSION['p_id'])) { if($type == 0) { //echo ""; echo 'start.php';//TODO:debug all and replace diff --git a/twe/join.php b/twe/join.php index 00469055..656e3d06 100644 --- a/twe/join.php +++ b/twe/join.php @@ -67,8 +67,8 @@ function updateToken(type) { console.log(data); if(data.result != "rand" && data.result != "leadpow" && data.result != "leadint" && data.result != "powint") { alert(jqXHR.status+", "+jqXHR.statusText+", "+jqXHR.responseText); - //location.replace("index.php"); - echo 'index.php';//TODO:debug all and replace + location.replace("index.php"); + //echo 'index.php';//TODO:debug all and replace } else { $("#leader").text(data.leader); $("#power").text(data.power); diff --git a/twe/main.php b/twe/main.php index 9971a2bf..a1b72d7b 100644 --- a/twe/main.php +++ b/twe/main.php @@ -7,13 +7,18 @@ $connect = dbConn(); increaseRefresh($connect, "메인", 2); checkTurn($connect); +if(!isset($_SESSION['p_id'])){ + echo ""; + exit(0); +} + $query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); //그새 사망이면 if($me['no'] == 0) { - echo "a"; + //echo "a"; echo ""; exit(0); } diff --git a/twe/stylesheet.php b/twe/stylesheet.php index 5f268e66..1d4761b8 100644 --- a/twe/stylesheet.php +++ b/twe/stylesheet.php @@ -1,12 +1,16 @@ Date: Sat, 20 Jan 2018 06:00:17 +0900 Subject: [PATCH 067/622] =?UTF-8?q?log=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=20=EB=95=8C=EB=8A=94=20=EB=B9=88=20=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EB=A5=BC=20=EB=A6=AC=ED=84=B4=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 23 ++++++++++++++++++++++- twe/join.php | 18 +++++++++--------- twe/join_post.php | 5 +++-- twe/stylesheet.php | 8 +++++++- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/twe/func.php b/twe/func.php index 61e693d6..9b04ec0f 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3000,6 +3000,9 @@ function pushHistory($connect, $history) { } function TrickLog($count, $skin) { + if(!file_exists("logs/_tricklog.txt")){ + return ''; + } $fp = @fopen("logs/_tricklog.txt", "r"); @fseek($fp, -$count*150, SEEK_END); $file = @fread($fp, $count*150); @@ -3011,6 +3014,9 @@ function TrickLog($count, $skin) { } function AllLog($count, $skin) { + if(!file_exists("logs/_alllog.txt")){ + return ''; + } $fp = @fopen("logs/_alllog.txt", "r"); @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @@ -3024,6 +3030,9 @@ function AllLog($count, $skin) { } function AuctionLog($count, $skin) { + if(!file_exists("logs/_auctionlog.txt")){ + return ''; + } $fp = @fopen("logs/_auctionlog.txt", "r"); @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @@ -3035,8 +3044,11 @@ function AuctionLog($count, $skin) { } function History($count, $skin) { + if(!file_exists("logs/_history.txt")){ + return ''; + } $fp = @fopen("logs/_history.txt", "r"); - @fseek($fp, -$count*300, SEEK_END); + @fseek($fp, -300*$count, SEEK_END); // $file = @fread($fp, $count*300); @fclose($fp); $log = explode("\r\n",$file); @@ -3048,6 +3060,9 @@ function History($count, $skin) { } function MyLog($no, $count, $skin) { + if(!file_exists("logs/gen{$no}.txt")){ + return ''; + } $fp = @fopen("logs/gen{$no}.txt", "r"); @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @@ -3061,6 +3076,9 @@ function MyLog($no, $count, $skin) { } function MyBatRes($no, $count, $skin) { + if(!file_exists("logs/batres{$no}.txt")){ + return ''; + } $fp = @fopen("logs/batres{$no}.txt", "r"); @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @@ -3074,6 +3092,9 @@ function MyBatRes($no, $count, $skin) { } function MyBatLog($no, $count, $skin) { + if(!file_exists("logs/batlog{$no}.txt")){ + return ''; + } $fp = @fopen("logs/batlog{$no}.txt", "r"); @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); diff --git a/twe/join.php b/twe/join.php index 656e3d06..37adb282 100644 --- a/twe/join.php +++ b/twe/join.php @@ -50,7 +50,7 @@ if(!$token) { 장수생성 - + "; - echo 'index.php';//TODO:debug all and replace -} elseif(!$me) { - MessageBox("캐릭터가 없습니다!!!"); - //echo ""; - echo 'index.php';//TODO:debug all and replace -} else { - switch($me['block']) { - case 1: - MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; - case 2: - MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; - case 3: - MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); - MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; - } - - $_SESSION['p_id'] = $id; - $_SESSION['p_name'] = $me['name']; - $_SESSION['p_nation'] = $me['nation']; - $_SESSION['p_time'] = time(); - - $date = date('Y-m-d H:i:s'); - - $query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where user_id='{$_SESSION['p_id']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - //echo ""; - echo './';//TODO:debug all and replace - - $date = date('Y_m_d H:i:s'); - $date2 = substr($date, 0, 10); - $fp = fopen("logs/_{$date2}_login.txt", "a"); - $msg = _String::Fill2($date,20," ").tab2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); - fwrite($fp, $msg."\r\n"); - fclose($fp); + //MessageBox("아이디나 암호가 올바르지 않습니다!!!"); + //TODO:login_process를 rest 형태로 처리 + header ("Location: index.php"); + exit(0); } +if(!$me) { + //MessageBox("캐릭터가 없습니다!!!"); + //TODO:login_process를 rest 형태로 처리 + header ("Location: index.php"); + exit(0); +} + + +switch($me['block']) { +case 1: + MessageBox("비매너 발언으로 인해, 발언권이 제한됩니다."); break; +case 2: + MessageBox("현재 블럭된 계정입니다. 턴 실행이 제한됩니다."); + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; +case 3: + MessageBox("현재 블럭된 계정입니다. 발언권과 턴 실행이 제한됩니다."); + MessageBox("절대 1계정만 사용하십시오! {$me['killturn']}시간 후 재등록 가능합니다."); break; +} + +$_SESSION['p_id'] = $id; +$_SESSION['p_name'] = $me['name']; +$_SESSION['p_nation'] = $me['nation']; +$_SESSION['p_time'] = time(); + +$date = date('Y-m-d H:i:s'); + +$query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where user_id='{$_SESSION['p_id']}'"; +MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + +$date = date('Y_m_d H:i:s'); +$date2 = substr($date, 0, 10); +$fp = fopen("logs/_{$date2}_login.txt", "a"); +$msg = _String::Fill2($date,20," ").tab2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); +fwrite($fp, $msg."\r\n"); +fclose($fp); + +header ("Location: index.php"); function DeleteSession() { $session_path = "data/session"; // 세션이저장된 디렉토리 diff --git a/twe/main.php b/twe/main.php index a1b72d7b..ca973065 100644 --- a/twe/main.php +++ b/twe/main.php @@ -57,6 +57,7 @@ $scenario = getScenario($connect); 메인 type=text/css> + "; exit(); + header('Content-Type: application/json'); + echo json_encode([ + 'result' => false, + 'reason' => '권한이 충분하지 않습니다.', + 'redirect' => 'main.php', + 'page_target' => 'top' + ]); echo 'main.php';//TODO:debug all and replace } diff --git a/twe/event_1.php b/twe/event_1.php index b9a61d7e..bc0d99b5 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -96,13 +96,13 @@ for($i=0; $i < 7; $i++) { $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result); //태수 해제 - $query = "update general set level=1 where no='{$city[gen1]}'"; + $query = "update general set level=1 where no='{$city['gen1']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //군사 해제 - $query = "update general set level=1 where no='{$city[gen2]}'"; + $query = "update general set level=1 where no='{$city['gen2']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //시중 해제 - $query = "update general set level=1 where no='{$city[gen3]}'"; + $query = "update general set level=1 where no='{$city['gen3']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $query = "update city set nation='{$nation['nation']}',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; diff --git a/twe/event_2.php b/twe/event_2.php index 29696f41..1e323cd5 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -100,13 +100,13 @@ for($i=0; $i < 7; $i++) { $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $city = MYDB_fetch_array($result); //태수 해제 - $query = "update general set level=1 where no='{$city[gen1]}'"; + $query = "update general set level=1 where no='{$city['gen1']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //군사 해제 - $query = "update general set level=1 where no='{$city[gen2]}'"; + $query = "update general set level=1 where no='{$city['gen2']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); //시중 해제 - $query = "update general set level=1 where no='{$city[gen3]}'"; + $query = "update general set level=1 where no='{$city['gen3']}'"; $result = MYDB_query($query, $connect) or Error("scenario_194A ".MYDB_error($connect),""); $query = "update city set nation='{$nation['nation']}',pop='1000000',agri=agri2,comm=comm2,secu=secu2,def=def2,wall=wall2,supply=1,gen1=0,gen2=0,gen3=0 where city='{$cap[$i]}'"; diff --git a/twe/event_4.php b/twe/event_4.php index df66037d..94b6c052 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -81,7 +81,7 @@ if(rand()%2 == 0) { $intel = 150 - $leader - $power; } -RegGeneral4($connect,$admin['turnterm'],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general['specage'], $general[specage2], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; +RegGeneral4($connect,$admin['turnterm'],$gencount, 0, 0, "유기체", $leader, $power, $intel, $personal, $general['specage'], $general['specage2'], "흠... 그럼 어쩔 수 없이 흉노로 가야겠군요."); $gencount++; //////////////////////////장수 끝/////////////////////////////////////////////// diff --git a/twe/func.php b/twe/func.php index b1cf9623..e8336382 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1904,7 +1904,7 @@ function cityInfo($connect) { } if($city['gen1'] > 0) { - $query = "select name from general where no='$city[gen1]'"; + $query = "select name from general where no='{$city['gen1']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen1 = MYDB_fetch_array($result); } else { @@ -1912,7 +1912,7 @@ function cityInfo($connect) { } if($city['gen2'] > 0) { - $query = "select name from general where no='$city[gen2]'"; + $query = "select name from general where no='{$city['gen2']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen2 = MYDB_fetch_array($result); } else { @@ -1920,7 +1920,7 @@ function cityInfo($connect) { } if($city['gen3'] > 0) { - $query = "select name from general where no='$city[gen3]'"; + $query = "select name from general where no='{$city['gen3']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen3 = MYDB_fetch_array($result); } else { @@ -2849,27 +2849,27 @@ function generalInfo2($connect, $no, $skin) { 숙 련 도 보병 -   $general[dex0] +   {$general['dex0']} ".bar($dex0, $skin, 16)." 궁병 -   $general[dex10] +   {$general['dex10']} ".bar($dex10, $skin, 16)." 기병 -   $general[dex20] +   {$general['dex20']} ".bar($dex20, $skin, 16)." 귀병 -   $general[dex30] +   {$general['dex30']} ".bar($dex30, $skin, 16)." 차병 -   $general[dex40] +   {$general['dex40']} ".bar($dex40, $skin, 16)." "; @@ -4137,7 +4137,7 @@ function checkTurn($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이전 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general['turn0']})"; //if(PROCESS_LOG) pushProcessLog($connect, $processlog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); @@ -4244,7 +4244,7 @@ function checkTurn($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general[turn0]})"; + //if(PROCESS_LOG) $processlog[0] = "[{$date}] 월턴 이후 갱신: name({$general['name']}), no({$general['no']}), turntime({$general['turntime']}), turn0({$general['turn0']})"; //if(PROCESS_LOG) pushProcessLog($connect, $processlog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', processAI'); @@ -4328,7 +4328,7 @@ function addAge($connect) { for($i=0; $i < $gencount; $i++) { $general = MYDB_fetch_array($result); - $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel'], 0, $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + $special2 = getSpecial2($connect, $general['leader'], $general['power'], $general['intel'], 0, $general['dex0'], $general['dex10'], $general['dex20'], $general['dex30'], $general['dex40']); $query = "update general set special2='$special2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -4574,7 +4574,7 @@ function preUpdateMonthly($connect) { for($i=0; $i < $cityCount; $i++) { $city = MYDB_fetch_array($result); - $query = "update general set level=1 where no='$city[gen1]' or no='$city[gen2]' or no='$city[gen3]'"; + $query = "update general set level=1 where no='{$city['gen1']}' or no='{$city['gen2']}' or no='{$city['gen3']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $history[count($history)] = "●{$admin['year']}년 {$admin['month']}월:【고립】{$city['name']}(이)가 보급이 끊겨 미지배 도시가 되었습니다."; @@ -4792,7 +4792,7 @@ group by A.nation $dip = MYDB_fetch_array($result); //양측 기간 모두 0이 되는 상황이면 휴전 - if($dip[term1] <= 1 && $dip[term2] <= 1) { + if($dip['term1'] <= 1 && $dip['term2'] <= 1) { $query = "select name from nation where nation='{$dip['me']}' or nation='{$dip['you']}'"; $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($nationResult); @@ -5536,7 +5536,7 @@ function PreprocessCommand($connect, $no) { $log[0] = "".getItemName($general['item'])."(을)를 사용하여 치료합니다!"; pushGenLog($general, $log); - } elseif($general['injury'] > 10 && $general['item'] == 1 && $general[turn0] != EncodeCommand(0, 0, 0, 50)) { + } elseif($general['injury'] > 10 && $general['item'] == 1 && $general['turn0'] != EncodeCommand(0, 0, 0, 50)) { //환약 사용 $query = "update general set injury=0,item=0 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -5791,7 +5791,7 @@ function updateTurntime($connect, $no) { $query = "update general set user_id='$npcid',password='$pw',npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin['month']}월:$general[name2](이)가 {$general['name']}의 육체에서 유체이탈합니다!"; + $alllog[0] = "●{$admin['month']}월:{$general['name2']}(이)가 {$general['name']}의 육체에서 유체이탈합니다!"; pushAllLog($alllog); if($admin['isUnited'] == 0) { @@ -6412,12 +6412,12 @@ function popIncrease($connect) { // 국가보정 if($type[$city['nation']] == 4 || $type[$city['nation']] == 6 || $type[$city['nation']] == 7 || $type[$city['nation']] == 8 || $type[$city['nation']] == 12 || $type[$city['nation']] == 13) { $ratio *= 1.2; } if($type[$city['nation']] == 1 || $type[$city['nation']] == 3) { $ratio *= 0.8; } - $ratio *= (1 + $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 추가 + $ratio *= (1 + $city['secu']/$city['secu2']/10); //치안에 따라 최대 10% 추가 } else { // 국가보정 if($type[$city['nation']] == 4 || $type[$city['nation']] == 6 || $type[$city['nation']] == 7 || $type[$city['nation']] == 8 || $type[$city['nation']] == 12 || $type[$city['nation']] == 13) { $ratio *= 0.8; } if($type[$city['nation']] == 1 || $type[$city['nation']] == 3) { $ratio *= 1.2; } - $ratio *= (1 - $city['secu']/$city[secu2]/10); //치안에 따라 최대 10% 경감 + $ratio *= (1 - $city['secu']/$city['secu2']/10); //치안에 따라 최대 10% 경감 } $pop = $city['pop'] + floor($city['pop'] * $ratio) + 5000; // 기본 5000명은 증가 diff --git a/twe/func_auction.php b/twe/func_auction.php index c56fe55f..2abe51b0 100644 --- a/twe/func_auction.php +++ b/twe/func_auction.php @@ -161,8 +161,8 @@ function processAuction($connect) { // 유닉템 처리 if($auction['stuff'] != 0) { - if($auction[no2] == 0) { - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, 그러나 입찰자 부재"; + if($auction['no2'] == 0) { + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, 그러나 입찰자 부재"; pushAuctionLog($connect, $auctionLog); } else { $trader['no'] = 0; @@ -170,7 +170,7 @@ function processAuction($connect) { $trader['gold'] = 99999999; $trader['rice'] = 99999999; - $query = "select no,name,gold,rice from general where no='$auction[no2]'"; + $query = "select no,name,gold,rice from general where no='{$auction['no2']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $bidder = MYDB_fetch_array($result); @@ -191,28 +191,28 @@ function processAuction($connect) { if($count > 0) { $traderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; $bidderLog[0] = "◆{$auction['no']}번 거래 유찰! 이미 아이템을 누군가가 가로챘습니다!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 아이템 이미 매진!"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 아이템 이미 매진!"; } elseif($auction['value'] > $bidder['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰!"; $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 ".GetStuffName($auction['stuff'])." 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 ".GetStuffName($auction['stuff'])."(을)를 판매, 금 {$auction['value']}(을)를 획득!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, ".GetStuffName($auction['stuff'])." 구입!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction['name1']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 구매"; $auctionLog[0] .= " ★ 아이템 거래 ★"; - $query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='$auction[no2]'"; + $query = "update general set gold=gold-'{$auction['value']}',{$type}='$sel2' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $alllog[0] = "●{$admin['month']}월:$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; - $history[0] = "●{$admin['year']}년 {$admin['month']}월:【암시장】$auction[name2](이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; + $alllog[0] = "●{$admin['month']}월:{$auction['name2']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; + $history[0] = "●{$admin['year']}년 {$admin['month']}월:【암시장】{$auction['name2']}(이)가 ".GetStuffName($auction['stuff'])."(을)를 구매했습니다!"; pushAllLog($alllog); pushHistory($connect, $history); } @@ -225,32 +225,32 @@ function processAuction($connect) { if($auction['no2'] == 0) { // 상인건수가 아닌것만 출력 if($auction['no1'] != 0) { - $query = "select no from general where no='$auction[no1]'"; + $query = "select no from general where no='{$auction['no1']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $trader = MYDB_fetch_array($result); $traderLog[0] = "◆입찰자 부재로 {$auction['no']}번 거래 유찰!"; if($auction['type'] == 0) { - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 판매, 그러나 입찰자 부재"; } else { - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, 그러나 입찰자 부재"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 구매, 그러나 입찰자 부재"; } pushGenLog($trader, $traderLog); pushAuctionLog($connect, $auctionLog); } } else { - if($auction[no1] == 0) { + if($auction['no1'] == 0) { $trader['no'] = 0; $trader['name'] = 'ⓝ상인'; $trader['gold'] = 99999; $trader['rice'] = 99999; } else { - $query = "select no,name,gold,rice from general where no='$auction[no1]'"; + $query = "select no,name,gold,rice from general where no='{$auction['no1']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $trader = MYDB_fetch_array($result); } - $query = "select no,name,gold,rice from general where no='$auction[no2]'"; + $query = "select no,name,gold,rice from general where no='{$auction['no2']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $bidder = MYDB_fetch_array($result); //판매거래 @@ -259,26 +259,26 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $trader['gold'] -= $gold; if($trader['gold'] < 0) $trader['gold'] = 0; - $query = "update general set gold='{$trader['gold']}' where no='$auction[no1]'"; + $query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; $bidderLog[0] = "◆판매자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 판매자 군량부족, 벌금 {$gold}"; } elseif($auction['value'] > $bidder['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; $bidderLog[0] = "◆입찰자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 구매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 판매 성사 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 판매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 구매"; if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; } elseif($auction['value'] >= $auction['topv']) { @@ -286,9 +286,9 @@ function processAuction($connect) { } elseif($auction['value'] * 2 <= $auction['amount']) { $auctionLog[0] .= " ★ 최저가 거래 ★"; } - $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='$auction[no1]'"; + $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='{$auction['no1']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='$auction[no2]'"; + $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); @@ -300,26 +300,26 @@ function processAuction($connect) { $gold = round($auction['value'] * 0.01); $bidder['gold'] -= $gold; if($bidder['gold'] < 0) $bidder['gold'] = 0; - $query = "update general set gold='{$bidder['gold']}' where no='$auction[no2]'"; + $query = "update general set gold='{$bidder['gold']}' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰!"; $bidderLog[0] = "◆입찰자의 군량 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 입찰자 군량부족, 벌금 {$gold}"; } elseif($auction['value'] > $trader['gold'] - 1000) { $gold = round($auction['value'] * 0.01); $trader['gold'] -= $gold; if($trader['gold'] < 0) $trader['gold'] = 0; - $query = "update general set gold='{$trader['gold']}' where no='$auction[no1]'"; + $query = "update general set gold='{$trader['gold']}' where no='{$auction['no1']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $traderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰! 벌금 {$gold}"; $bidderLog[0] = "◆구매자의 자금 부족으로 {$auction['no']}번 거래 유찰!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 유찰 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 입찰, 그러나 구매자 자금부족, 벌금 {$gold}"; } else { $traderLog[0] = "◆{$auction['no']}번 거래 성사로 금 {$auction['value']}(을)를 지불, 쌀 {$auction['amount']}(을)를 구입!"; $bidderLog[0] = "◆{$auction['no']}번 거래 성사로 쌀 {$auction['amount']}(을)를 판매, 금 {$auction['value']}(을)를 획득!"; - $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 성사 : {$auction[name1]}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction[name2]}(이)가 금 {$auction['value']}(으)로 판매"; + $auctionLog[0] = "◆{$admin['year']}년 {$admin['month']}월, {$auction['no']}번 구매 성사 : {$auction['name1']}(이)가 쌀 {$auction['amount']}(을)를 구매, {$auction['name2']}(이)가 금 {$auction['value']}(으)로 판매"; if($auction['value'] >= $auction['amount'] * 2) { $auctionLog[0] .= " ★ 최고가 거래 ★"; } elseif($auction['value'] * 2 <= $auction['amount']) { @@ -328,9 +328,9 @@ function processAuction($connect) { $auctionLog[0] .= " ★ 즉시구매가 거래 ★"; } - $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='$auction[no1]'"; + $query = "update general set gold=gold-'{$auction['value']}',rice=rice+'{$auction['amount']}' where no='{$auction['no1']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='$auction[no2]'"; + $query = "update general set gold=gold+'{$auction['value']}',rice=rice-'{$auction['amount']}' where no='{$auction['no2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } pushGenLog($trader, $traderLog); diff --git a/twe/func_npc.php b/twe/func_npc.php index c1a30d2c..8233a7e7 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -1702,7 +1702,7 @@ function processAI($connect, $no) { if($selCity['city'] == 0) { $selCity['city'] = $general['city']; } - SetCrew($connect, $general['no'], $general['personal'], $general['gold'], $general['leader'], $genType, $nation['tech'], $selRegion['region'], $selCity['city'], $general[dex0], $general[dex10], $general[dex20], $general[dex30], $general[dex40]); + SetCrew($connect, $general['no'], $general['personal'], $general['gold'], $general['leader'], $genType, $nation['tech'], $selRegion['region'], $selCity['city'], $general['dex0'], $general['dex10'], $general['dex20'], $general['dex30'], $general['dex40']); return; default: $query = "update general set turn0='$command' where no='{$general['no']}'"; diff --git a/twe/func_process.php b/twe/func_process.php index 1d7ba253..7a9fe355 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -89,7 +89,7 @@ function process_1($connect, &$general, $type) { // 군주, 참모, 모사 보정 if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 9 || $general['level'] == 7 || $general['level'] == 5) { $score *= 1.05; } // 군사 보정 - if($general['level'] == 3 && $general['no'] == $city[gen2]) { $score *= 1.05; } + if($general['level'] == 3 && $general['no'] == $city['gen2']) { $score *= 1.05; } $rd = rand() % 100; $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 2); @@ -127,7 +127,7 @@ function process_1($connect, &$general, $type) { // 자금 하락, 경험치 상승 $general['gold'] -= $admin['develcost']; $general['intel2']++; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -228,7 +228,7 @@ function process_3($connect, &$general) { $general['gold'] -= $admin['develcost']; $general['intel2']++; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -288,7 +288,7 @@ function process_4($connect, &$general) { // 군주, 참모 보정 if($general['level'] == 12 || $general['level'] == 11) { $score *= 1.05; } // 시중 보정 - if($general['level'] == 2 && $general['no'] == $city[gen3]) { $score *= 1.05; } + if($general['level'] == 2 && $general['no'] == $city['gen3']) { $score *= 1.05; } $rd = rand() % 100; $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); @@ -324,7 +324,7 @@ function process_4($connect, &$general) { // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; $general['leader2']++; - $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -391,7 +391,7 @@ function process_5($connect, &$general, $type) { // 군주, 참모, 장군 보정 if($general['level'] == 12 || $general['level'] == 11 || $general['level'] == 10 || $general['level'] == 8 || $general['level'] == 6) { $score *= 1.05; } // 태수 보정 - if($general['level'] == 4 && $general['no'] == $city[gen1]) { $score *= 1.05; } + if($general['level'] == 4 && $general['no'] == $city['gen1']) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); @@ -428,7 +428,7 @@ function process_5($connect, &$general, $type) { // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; $general['power2']++; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -488,7 +488,7 @@ function process_7($connect, &$general) { // 군주, 참모 보정 if($general['level'] == 12 || $general['level'] == 11) { $score *= 1.05; } // 시중 보정 - if($general['level'] == 2 && $general['no'] == $city[gen3]) { $score *= 1.05; } + if($general['level'] == 2 && $general['no'] == $city['gen3']) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); @@ -524,7 +524,7 @@ function process_7($connect, &$general) { // 군량 하락 내정보다 2배 지력경험 경험, 공헌 상승 $general['rice'] -= $admin['develcost'] * 2; $general['leader2']++; - $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -626,7 +626,7 @@ function process_8($connect, &$general) { // 자금 하락, 무력 경험 경험, 공헌 상승 $general['gold'] -= $admin['develcost']; $general['power2']++; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -711,15 +711,15 @@ function process_9($connect, &$general) { switch(rand()%3) { case 0: $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 1: $general['power2']++; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; case 2: $general['intel2']++; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; break; } MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -907,7 +907,7 @@ function process_11($connect, &$general, $type) { // 통솔경험, 병종 변경, 병사수 변경, 훈련치 변경, 사기치 변경, 자금 군량 하락, 공헌도, 명성 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',crewtype='$armtype',crew='{$general['crew']}',train='$train',atmos='$atmos',gold='{$general['gold']}',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',crewtype='$armtype',crew='{$general['crew']}',train='$train',atmos='$atmos',gold='{$general['gold']}',rice=rice-'$crew',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -981,7 +981,7 @@ function process_13($connect, &$general) { // 경험치 상승 // 공헌도, 명성 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1048,7 +1048,7 @@ function process_14($connect, &$general) { $score += $general['atmos']; if($score > $_maxatmos) { $score = $_maxatmos; } $general['leader2']++; - $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',atmos='$score',gold='$gold',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1118,7 +1118,7 @@ function process_15($connect, &$general) { // 훈련,사기치 변경 // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 $general['leader2']+=3; - $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',term='0',atmos='95',train='95',gold='$gold',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1290,7 +1290,7 @@ function process_21($connect, &$general) { // 이동, 경험치 상승, 명성 상승, 사기 감소 $general['leader2']++; - $query = "update general set resturn='SUCCESS',gold=gold-'{$admin['develcost']}',city='$destination',atmos=atmos*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold=gold-'{$admin['develcost']}',city='$destination',atmos=atmos*0.95,leader2='{$general['leader2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($general['level'] == 12) { @@ -1366,7 +1366,7 @@ function process_22($connect, &$general) { ScoutMsg($connect, $general['no'], $nation['name'], $who, $you['msgindex']); $general['intel2']++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1740,7 +1740,7 @@ function process_26($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 경험치 명성 공헌 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -1876,7 +1876,7 @@ function process_28($connect, &$general) { // 경험치 상승 // 명성,공헌 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp',dedication=dedication+'$ded' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',experience=experience+'$exp',dedication=dedication+'$ded' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2095,7 +2095,7 @@ function process_29($connect, &$general) { '$scoutLevel','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', '0','$bornyear','$deadyear', - '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' + '{$avgGen['dex0']}','{$avgGen['dex10']}','{$avgGen['dex20']}','{$avgGen['dex30']}','{$avgGen['dex40']}' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); @@ -2131,7 +2131,7 @@ function process_29($connect, &$general) { $ded = CharDedication($ded, $general['personal']); // 자금 감소 // 경험치 상승 // 공헌도, 명성 상승 - $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',term='0',gold='$gold',leader2='{$general['leader2']}',power2='{$general['power2']}',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2178,7 +2178,7 @@ function process_30($connect, &$general) { // 이동, 경험치 상승, 명성 상승, 병력/사기/훈련 감소 $general['leader2']++; - $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='$general[leader2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold=gold-'$cost',city='$destination',crew=crew*0.95,atmos=atmos*0.9,train=train*0.95,leader2='{$general['leader2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($general['level'] == 12) { @@ -2297,7 +2297,7 @@ function process_31($connect, &$general) { $general['leader2']++; $general['gold'] -= $admin['develcost']*3; $general['rice'] -= $admin['develcost']*3; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "select spy from nation where nation='{$general['nation']}'"; @@ -2379,7 +2379,7 @@ function process_32($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $intelgen = MYDB_fetch_array($result); - $ratio = round((($general['intel']+getBookEff($general['book']) - $intelgen['intel']-getBookEff($intelgen['book'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['intel']+getBookEff($general['book']) - $intelgen['intel']-getBookEff($intelgen['book'])) / $_firing - ($destcity['secu']/$destcity['secu2'])/5 + $_basefiring)*100); $ratio2 = rand() % 100; if($general['item'] == 5) { @@ -2402,7 +2402,7 @@ function process_32($connect, &$general) { } // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } + if($general['special2'] == 41) { $ratio += 10; } if($general['special'] == 31) { $ratio += 20; } // 국가보정 @@ -2440,7 +2440,7 @@ function process_32($connect, &$general) { $general['intel2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',intel2='$general[intel2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',intel2='{$general['intel2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2509,7 +2509,7 @@ function process_33($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); - $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity['secu2'])/5 + $_basefiring)*100); $ratio2 = rand() % 100; if($general['item'] == 5) { @@ -2532,7 +2532,7 @@ function process_33($connect, &$general) { } // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } + if($general['special2'] == 41) { $ratio += 10; } if($general['special'] == 31) { $ratio += 20; } // 국가보정 @@ -2592,7 +2592,7 @@ function process_33($connect, &$general) { $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2654,7 +2654,7 @@ function process_34($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $powergen = MYDB_fetch_array($result); - $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round((($general['power']+getWeapEff($general['weap']) - $powergen['power']-getWeapEff($powergen['weap'])) / $_firing - ($destcity['secu']/$destcity['secu2'])/5 + $_basefiring)*100); $ratio2 = rand() % 100; if($general['item'] == 5) { @@ -2677,7 +2677,7 @@ function process_34($connect, &$general) { } // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } + if($general['special2'] == 41) { $ratio += 10; } if($general['special'] == 31) { $ratio += 20; } // 국가보정 @@ -2716,7 +2716,7 @@ function process_34($connect, &$general) { $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2786,7 +2786,7 @@ function process_35($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $ratio = round(((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus - ($gen['sum']-$gen['horse']+getHorseEff($gen['horse']))) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round(((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus - ($gen['sum']-$gen['horse']+getHorseEff($gen['horse']))) / $_firing - ($destcity['secu']/$destcity['secu2'])/5 + $_basefiring)*100); $ratio2 = rand() % 100; if($general['item'] == 5) { @@ -2809,7 +2809,7 @@ function process_35($connect, &$general) { } // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } + if($general['special2'] == 41) { $ratio += 10; } if($general['special'] == 31) { $ratio += 20; } // 국가보정 @@ -2848,7 +2848,7 @@ function process_35($connect, &$general) { $general['leader2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -2918,7 +2918,7 @@ function process_36($connect, &$general) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gen = MYDB_fetch_array($result); - $ratio = round(((floor(($general['leader']+$general['intel']+$general['power']) * (100 - $general['injury'])/100)+getWeapEff($general['weap'])+getHorseEff($general['horse'])+$lbonus+getBookEff($general['book']) - ($gen['sum']-$gen['weap']-$gen['horse']-$gen['book']+getWeapEff($gen['weap'])+getHorseEff($gen['horse'])+getBookEff($gen['book']))) / $_firing - ($destcity['secu']/$destcity[secu2])/5 + $_basefiring)*100); + $ratio = round(((floor(($general['leader']+$general['intel']+$general['power']) * (100 - $general['injury'])/100)+getWeapEff($general['weap'])+getHorseEff($general['horse'])+$lbonus+getBookEff($general['book']) - ($gen['sum']-$gen['weap']-$gen['horse']-$gen['book']+getWeapEff($gen['weap'])+getHorseEff($gen['horse'])+getBookEff($gen['book']))) / $_firing - ($destcity['secu']/$destcity['secu2'])/5 + $_basefiring)*100); $ratio2 = rand() % 100; if($general['item'] == 5) { @@ -2941,7 +2941,7 @@ function process_36($connect, &$general) { } // 특기보정 : 신산, 귀모 - if($general[special2] == 41) { $ratio += 10; } + if($general['special2'] == 41) { $ratio += 10; } if($general['special'] == 31) { $ratio += 20; } // 국가보정 @@ -2990,7 +2990,7 @@ function process_36($connect, &$general) { $general['power2']++; $general['gold'] -= $admin['develcost']*5; $general['rice'] -= $admin['develcost']*5; - $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='$general[leader2]',intel2='$general[intel2]',power2='$general[power2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold='{$general['gold']}',rice='{$general['rice']}',leader2='{$general['leader2']}',intel2='{$general['intel2']}',power2='{$general['power2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3100,7 +3100,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:어느 명사와 설전을 벌여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['intel2'] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',intel2='{$general['intel2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 4: @@ -3113,7 +3113,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:동네 장사와 힘겨루기를 하여 멋지게 이겼습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['power2'] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 6: @@ -3126,7 +3126,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:산적과 싸워 금 300을 빼앗았습니다. <1>$date"; // 자금 상승 // 경험치 상승 // 명성 상승 $general['power2'] += 2; - $query = "update general set resturn='SUCCESS',gold=gold+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 8: @@ -3141,7 +3141,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:호랑이를 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 $general['power2'] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 10: @@ -3149,14 +3149,14 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 11: $log[count($log)] = "●{$admin['month']}월:곰을 잡아 고기 300을 얻었습니다. <1>$date"; // 군량 상승 // 경험치 상승 // 명성 상승 $general['power2'] += 2; - $query = "update general set resturn='SUCCESS',rice=rice+300,power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 12: @@ -3164,7 +3164,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 13: @@ -3184,14 +3184,14 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 10 + 10; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 16: $log[count($log)] = "●{$admin['month']}월:돈을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['intel2']++; - $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',gold=gold+300,intel2='{$general['intel2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 17: @@ -3206,7 +3206,7 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:쌀을 빌려주었다가 이자 300을 받았습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['intel2']++; - $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',rice=rice+300,intel2='{$general['intel2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 19: @@ -3221,28 +3221,28 @@ function process_42($connect, &$general) { $log[count($log)] = "●{$admin['month']}월:거리에서 글 모르는 아이들을 모아 글을 가르쳤습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['intel2'] += 2; - $query = "update general set resturn='SUCCESS',intel2='$general[intel2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',intel2='{$general['intel2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 21: $log[count($log)] = "●{$admin['month']}월:백성들에게 현인의 가르침을 설파했습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['leader2'] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 22: $log[count($log)] = "●{$admin['month']}월:어느 집의 무너진 울타리를 고쳐주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['power2'] += 2; - $query = "update general set resturn='SUCCESS',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 23: $log[count($log)] = "●{$admin['month']}월:어느 집의 도망친 가축을 되찾아 주었습니다. <1>$date"; // 경험치 상승 // 명성 상승 $general['leader2'] += 2; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 24: @@ -3250,7 +3250,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 25: @@ -3258,7 +3258,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 30 + 20; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 26: @@ -3266,7 +3266,7 @@ function process_42($connect, &$general) { // 경험치 하락 // 명성 상승 $injury = rand() % 50 + 30; $general['power2']--; - $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='$general[power2]',experience=experience+'$exp2' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',injury=injury+'$injury',power2='{$general['power2']}',experience=experience+'$exp2' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; default: @@ -3358,7 +3358,7 @@ function process_43($connect, &$general) { // 경험치 상승 // 공헌도, 명성 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3444,7 +3444,7 @@ function process_44($connect, &$general) { // 경험치 상승 // 공헌도, 명성 상승 $general['leader2']++; - $query = "update general set resturn='SUCCESS',leader2='$general[leader2]',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; + $query = "update general set resturn='SUCCESS',leader2='{$general['leader2']}',dedication=dedication+'$ded',experience=experience+'$exp' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = checkAbility($connect, $general, $log); @@ -3929,17 +3929,17 @@ function process_49($connect, &$general) { switch(rand()%3) { case 0: $general['leader2']++; - $query = "update general set leader2='$general[leader2]' where no='{$general['no']}'"; + $query = "update general set leader2='{$general['leader2']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: $general['power2']++; - $query = "update general set power2='$general[power2]' where no='{$general['no']}'"; + $query = "update general set power2='{$general['power2']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: $general['intel2']++; - $query = "update general set intel2='$general[intel2]' where no='{$general['no']}'"; + $query = "update general set intel2='{$general['intel2']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } @@ -4834,7 +4834,7 @@ function process_65($connect, &$general) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //직위해제 - $query = "update general set level=1 where no='$destcity[gen1]' or no='$destcity[gen2]' or no='$destcity[gen3]'"; + $query = "update general set level=1 where no='{$destcity['gen1']}' or no='{$destcity['gen2']}' or no='{$destcity['gen3']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //성 공백지로 @@ -5911,7 +5911,7 @@ function process_76($connect, &$general) { '1','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','{$avgGen['age']}','1','$personal','0','0','0','0','', '0','$bornyear','$deadyear', - '$avgGen[dex0]','$avgGen[dex10]','$avgGen[dex20]','$avgGen[dex30]','$avgGen[dex40]' + '{$avgGen['dex0']}','{$avgGen['dex10']}','{$avgGen['dex20']}','{$avgGen['dex30']}','{$avgGen['dex40']}' )", $connect ) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/func_tournament.php b/twe/func_tournament.php index f184bd73..55410edf 100644 --- a/twe/func_tournament.php +++ b/twe/func_tournament.php @@ -431,7 +431,7 @@ function selection($connect, $tnmt_type, $tnmt, $phase) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); //본선에 추가 - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$grp', '$grp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$grp', '$grp_no', '{$general['h']}', '{$general['w']}', '{$general['b']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //시드 삭제 $query = "update tournament set prmt=0 where grp='{$general['grp']}' and grp_no='{$general['grp_no']}'"; @@ -499,7 +499,7 @@ function final16set($connect) { //16강에 추가 $newGrp = 20 + floor($i / 2); $newGrp_no = $i % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '{$general['h']}', '{$general['w']}', '{$general['b']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } $query = "update tournament set prmt=0"; @@ -529,7 +529,7 @@ function finalFight($connect, $tnmt_type, $tnmt, $phase, $type) { //x강에 추가 $newGrp = floor($phase / 2) + $offset + 10; $newGrp_no = $phase % 2; - $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '$general[h]', '$general[w]', '$general[b]')"; + $query = "insert into tournament (no, npc, name, ldr, pwr, itl, lvl, grp, grp_no, h, w, b) values ('{$general['no']}', '{$general['npc']}', '{$general['name']}', '{$general['ldr']}', '{$general['pwr']}', '{$general['itl']}', '{$general['lvl']}', '$newGrp', '$newGrp_no', '{$general['h']}', '{$general['w']}', '{$general['b']}')"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if($phase >= $turn) { @@ -740,52 +740,52 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { $e2 = $energy2 = round($gen2[$tp] * getLog($gen1['lvl'], $gen2['lvl']) * 10); //아이템 로그 - if($gen1[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { + if($gen1['h'] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getHorseName($gen1[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1[h])."(이)가 갈기를 휘날립니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1['h'])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1['h'])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getHorseName($gen1['h'])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1['h'])."(이)가 갈기를 휘날립니다!"; break; } } if($gen1[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getWeapName($gen1[w])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1['w'])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1['w'])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1['w'])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getWeapName($gen1['w'])."(이)가 쥐어져 있습니다!"; break; } } if($gen1[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getBookName($gen1[b])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1['b'])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1['b'])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1['b'])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getBookName($gen1['b'])."(이)가 쥐어져 있습니다!"; break; } } if($gen2[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 포효합니다!"; break; - case 1: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 그 위용을 뽐냅니다!"; break; - case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getHorseName($gen2[h])."(을)를 타고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2[h])."(이)가 갈기를 휘날립니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 포효합니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 그 위용을 뽐냅니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getHorseName($gen2['h'])."(을)를 타고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 갈기를 휘날립니다!"; break; } } if($gen2[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."(이)가 번뜩입니다!"; break; - case 1: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."(이)가 푸르게 빛납니다!"; break; - case 2: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2[w])."에서 살기가 느껴집니다!"; break; - case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getWeapName($gen2[w])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2['w'])."(이)가 번뜩입니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2['w'])."(이)가 푸르게 빛납니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2['w'])."에서 살기가 느껴집니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getWeapName($gen2['w'])."(이)가 쥐어져 있습니다!"; break; } } if($gen2[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { - case 0: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 펼쳐듭니다!"; break; - case 1: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 품에서 꺼냅니다!"; break; - case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2[b])."(을)를 들고 있습니다!"; break; - case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getBookName($gen2[b])."(이)가 쥐어져 있습니다!"; break; + case 0: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2['b'])."(을)를 펼쳐듭니다!"; break; + case 1: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2['b'])."(을)를 품에서 꺼냅니다!"; break; + case 2: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2['b'])."(을)를 들고 있습니다!"; break; + case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getBookName($gen2['b'])."(이)가 쥐어져 있습니다!"; break; } } diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php new file mode 100644 index 00000000..47ed124d --- /dev/null +++ b/twe/j_msgsubmit.php @@ -0,0 +1,146 @@ += 2) { + //echo ""; exit(); + header('Content-Type: application/json'); + echo json_encode([ + 'result' => false, + 'reason' => '권한이 충분하지 않습니다.', + 'redirect' => 'main.php', + 'page_target' => 'top' + ]); + //echo 'main.php';//TODO:debug all and replace + } + +$msg = str_replace("|", "", $msg); +$msg = trim($msg); + +//TODO : 몰라서 임시로 값 세팅해봄. 추후에 용도를 확인하고 수정 필요 +$s = 50; +$msg = _String::SubStrForWidth($msg, $s, 198); + +$date = date('Y-m-d H:i:s'); + +// 전체 메세지 +if($genlist == 9999 && str_replace(" ", "", $msg) != "") { + //echo ''; + if($me['nation'] == 0) { + $nation['name'] = '재야'; + $nation['color'] = 'FFFFFF'; + } else { + $query = "select nation,name,color from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + PushMsg(1, 0, $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $nation['name'], $nation['color'], $msg); +// 국가 메세지 +} elseif($genlist >= 9000 && $msg != "") { + if($me['nation'] == 0) { + $nation['name'] = '재야'; + $nation['color'] = 'FFFFFF'; + $nation['nation'] = 0; + } else { + $query = "select nation,name,color from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + } + + $genlist -= 9000; + $query = "select nation,name,color from nation where nation='$genlist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dest = MYDB_fetch_array($result); + + //$dest가 없다는건 수신도 재야. + if(empty($dest)){ + $dest['name'] = '재야'; + $dest['color'] = 'FFFFFF'; + $dest['nation'] = 0; + } + + if($nation['nation'] == $dest['nation']) { + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $dest['name'], $dest['color'], $msg); + } else { + //타국에 보내는 경우 + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); + // 수뇌이면 발송, 아니면 자국으로 돌림 + if($me['level'] >= 5) { + PushMsg(3, $dest['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); + } else { + PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], "반송"); + } + } +// 개인 메세지 +} elseif($genlist > 0 && $msg != "") { + $query = "select name,msgindex from general where no='$genlist'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + //발신, 수신인 코딩 + $who = $me['no'] * 10000 + $genlist; + + $msg = addslashes(SQ2DQ($msg)); + + $query = "select msg{$me['msgindex']}_when as priv_when from general where no='{$me['no']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $prev_msg = MYDB_fetch_array($result); + $diff_second = strtotime($date) - strtotime($prev_msg['priv_when']); + + if($diff_second < 3) { + $who = 1 * 10000 + $me['no']; // 운영자가 본인에게 + $msg = "개인메세지는 3초당 1건만 보낼 수 있습니다!"; + //자신에게 표시 + $me['msgindex']++; + if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } + $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='10',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date',newmsg=1 where no='{$me['no']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } else { + //자신에게 표시 + $me['msgindex']++; + if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } + $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='9',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date' where no='{$me['no']}'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + + // 상대에게 발송 + $you['msgindex']++; + if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } + $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_type='10',msg{$you['msgindex']}_who='$who',msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + } + + $fp = fopen("logs/_gen_msg.txt", "a"); + //로그 파일에 기록 + fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\r\n"); + fclose($fp); +} + +//echo ""; +//echo 'msglist.php';//TODO:debug all and replace + +header('Content-Type: application/json'); +echo json_encode([ + 'result' => true, + 'reason' => 'SUCCESS', + 'redirect' => 'msglist.php', + 'page_target' => '#msglist' +]); \ No newline at end of file diff --git a/twe/js/main.js b/twe/js/main.js index e69de29b..4ea5edef 100644 --- a/twe/js/main.js +++ b/twe/js/main.js @@ -0,0 +1,69 @@ + +if (document.all) { + document.onkeydown = function () { + var key_f5 = 116; // 116 = F5 + var key_enter = 13; // 13 = 엔터 + if (key_f5 == event.keyCode) { + event.keyCode=0; + refreshing(0,0); + return false; + } else if(key_enter == event.keyCode) { + event.keyCode=0; + refreshing(4,message); + return false; + } + return true; + } +} + +function refreshing(arg1, arg2) { +// if(term <= 0) { + switch(arg1) { + case 0: location.reload(); break; + case 1: go(arg2); break; + case 2: turn(arg2); break; + case 3: arg2.submit(); break; + case 4: + arg2.submit(); + message.msg.value = ""; + document.getElementById("msg").value = ""; + message.msg.focus(); + break; + } +} + +function go(type) { + if(type == 1) location.replace('b_nationboard.php'); + else if(type == 2) location.replace('b_troop.php'); + else if(type == 3) location.replace('b_nationrule.php'); + else if(type == 4) location.replace('b_chiefboard.php'); + else if(type == 5) location.replace('b_chiefcenter.php'); + else if(type == 6) window.open('b_genList.php'); + else if(type == 7) location.replace('b_myKingdomInfo.php'); + else if(type == 8) location.replace('b_myCityInfo.php'); + else if(type == 9) location.replace('b_myGenInfo.php'); + else if(type == 10) location.replace('b_myBossInfo.php'); + else if(type == 11) location.replace('b_currentCity.php'); + else if(type == 12) location.replace('b_myPage.php'); + else if(type == 13) location.replace('b_dipcenter.php'); + else if(type == 14) location.replace('b_diplomacy.php'); + else if(type == 15) window.open('b_tournament.php'); + else if(type == 16) window.open('b_betting.php'); + else if(type == 17) window.open('b_auction.php'); + else if(type == 18) window.open('b_battleCenter.php'); +} + +function turn(type) { + num = form2.sel.value; + commandlist.location.replace('turn.php?type=' + type + '&sel=' + num); +} + +jQuery(function($){ + $('#message').submit(function(event){ + var $this = $(this); + var target = $('[name="genlist"]').val(); + var msg = $('#msg').val(); + console.log(target, msg); + return false; + }); +}); \ No newline at end of file diff --git a/twe/logout_process.php b/twe/logout_process.php index 1d246fb6..93390c01 100644 --- a/twe/logout_process.php +++ b/twe/logout_process.php @@ -20,7 +20,8 @@ $conmsg = $me['conmsg']; session_destroy(); //echo ""; -echo 'start.php';//TODO:debug all and replace +//echo 'start.php';//TODO:debug all and replace +header('Location:start.php'); /* diff --git a/twe/main.php b/twe/main.php index ca973065..8fe0c67a 100644 --- a/twe/main.php +++ b/twe/main.php @@ -19,7 +19,8 @@ $me = MYDB_fetch_array($result); //그새 사망이면 if($me['no'] == 0) { //echo "a"; - echo ""; + header('Location: start.php'); + //echo ""; exit(0); } @@ -58,68 +59,7 @@ $scenario = getScenario($connect); type=text/css> - + @@ -303,17 +243,17 @@ if($me['userlevel'] >= 5) {
- + ;color:white;font-size:13;width:100px; value='서신전달&갱신' onclick='refreshing(4,message)'> -
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다. +
내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다.
-
diff --git a/twe/process_war.php b/twe/process_war.php index 9ea5b3e4..11188a94 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -14,7 +14,7 @@ function processWar($connect, $general, $city) { $warphase = getRate($game, $general['crewtype'], "spd"); //병종간 페이즈 수 얻기 // 특기보정 : 돌격 - if($general[special2] == 60) { $warphase += 1; } + if($general['special2'] == 60) { $warphase += 1; } $genAtmos = 0; if($general['item'] == 3) { @@ -193,20 +193,20 @@ function processWar($connect, $general, $city) { } // 특기보정 : 신산 - if($general[special2] == 41) { $ratio2 += 200; } + if($general['special2'] == 41) { $ratio2 += 200; } $ratio = rand() % 1000; // 0~999 if($ratio <= $ratio2) { $ratio = rand() % 100; // 0~99 // 특기보정 : 귀병, 신산, 환술, 신중 - if($general[special2] == 40) { $ratio += 20; } - if($general[special2] == 41) { $ratio += 20; } - if($general[special2] == 42) { $ratio += 10; } - if($general[special2] == 44) { $ratio += 100; } + if($general['special2'] == 40) { $ratio += 20; } + if($general['special2'] == 41) { $ratio += 20; } + if($general['special2'] == 42) { $ratio += 10; } + if($general['special2'] == 44) { $ratio += 100; } if($ratio >= 30) { // 특기보정 : 환술, 집중 - if($general[special2] == 42) { $cityCrew *= 1.3; } - if($general[special2] == 43) { $cityCrew *= 1.5; } + if($general['special2'] == 42) { $cityCrew *= 1.3; } + if($general['special2'] == 43) { $cityCrew *= 1.5; } $type = rand() % 3; switch($type) { case 0: @@ -258,14 +258,14 @@ function processWar($connect, $general, $city) { $cityCrew = $cityCrew * (100 + $general['explevel']/6)/100; // 특기보정 : 공성, 기병, 돌격, 무쌍, 보병, 견고, 의술(청낭서,태평청령) - if($general[special2] == 53) { $cityCrew *= 2.00; } - if($general[special2] == 52) { $cityCrew *= 1.20; } - if($general[special2] == 60) { $cityCrew *= 1.10; } - if($general[special2] == 61) { $cityCrew *= 1.10; } - if($general[special2] == 50) { $myCrew *= 0.90; } - if($general[special2] == 62) { $myCrew *= 0.90; } + if($general['special2'] == 53) { $cityCrew *= 2.00; } + if($general['special2'] == 52) { $cityCrew *= 1.20; } + if($general['special2'] == 60) { $cityCrew *= 1.10; } + if($general['special2'] == 61) { $cityCrew *= 1.10; } + if($general['special2'] == 50) { $myCrew *= 0.90; } + if($general['special2'] == 62) { $myCrew *= 0.90; } $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $avoid == 1) { + if(($general['special2'] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $avoid == 1) { $batlog[count($batlog)] = "치료했다!"; $myCrew /= 1.5; // 66%만 소모 $avoid = 0; @@ -275,8 +275,8 @@ function processWar($connect, $general, $city) { $rd = rand() % 100; // 0 ~ 99 $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 - if($general[special2] == 61) { $ratio += 10; } - if($general[special2] == 71) { $ratio += 20; } + if($general['special2'] == 61) { $ratio += 10; } + if($general['special2'] == 71) { $ratio += 20; } if($ratio >= $rd && $avoid == 1) { $batlog[count($batlog)] = "필살공격!"; $cityCrew = CriticalScore2($cityCrew); @@ -286,7 +286,7 @@ function processWar($connect, $general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 //특기보정 : 궁병 - if($general[special2] == 51) { $ratio2 += 20; } + if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $avoid == 1) { @@ -300,7 +300,7 @@ function processWar($connect, $general, $city) { $myCrew *= (rand() % 21 + 90)/100; // 90~110% //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { + if($general['special2'] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; $myCrew = 0; } @@ -529,7 +529,7 @@ function processWar($connect, $general, $city) { $ratio = rand() % 100; //특기보정 : 저격(수극), 활무기저격 - if(($general[special2] == 70 && $ratio <= 33) || ($general['item'] == 2 && $ratio <= 20) || (($general['weap'] == 10 || $general['weap'] == 14 || $general['weap'] == 18 || $general['weap'] == 22) && $ratio <= 20)) { + if(($general['special2'] == 70 && $ratio <= 33) || ($general['item'] == 2 && $ratio <= 20) || (($general['weap'] == 10 || $general['weap'] == 14 || $general['weap'] == 18 || $general['weap'] == 22) && $ratio <= 20)) { //수극 사용 if($general['item'] == 2) { $query = "update general set item=0 where no='{$general['no']}'"; @@ -554,7 +554,7 @@ function processWar($connect, $general, $city) { } $ratio = rand() % 100; //특기보정 : 저격(수극), 활무기저격 - if(($oppose[special2] == 70 && $ratio <= 33) || ($oppose['item'] == 2 && $ratio <= 20) || (($oppose['weap'] == 10 || $oppose['weap'] == 14 || $oppose['weap'] == 18 || $oppose['weap'] == 22) && $ratio <= 20)) { + if(($oppose['special2'] == 70 && $ratio <= 33) || ($oppose['item'] == 2 && $ratio <= 20) || (($oppose['weap'] == 10 || $oppose['weap'] == 14 || $oppose['weap'] == 18 || $oppose['weap'] == 22) && $ratio <= 20)) { //수극 사용 if($oppose['item'] == 2) { $query = "update general set item=0 where no='{$oppose['no']}'"; @@ -644,26 +644,26 @@ function processWar($connect, $general, $city) { } // 특기보정 : 신산 - if($general[special2] == 41) { $ratio2 += 200; } + if($general['special2'] == 41) { $ratio2 += 200; } $ratio = rand() % 1000; // 0~999 if($ratio <= $ratio2) { $ratio = rand() % 100; // 특기보정 : 귀병, 신산, 환술, 신중 - if($general[special2] == 40) { $ratio += 20; } - if($general[special2] == 41) { $ratio += 20; } - if($general[special2] == 42) { $ratio += 10; } - if($general[special2] == 44) { $ratio += 100; } + if($general['special2'] == 40) { $ratio += 20; } + if($general['special2'] == 41) { $ratio += 20; } + if($general['special2'] == 42) { $ratio += 10; } + if($general['special2'] == 44) { $ratio += 100; } if($ratio >= 30) { // 특기보정 : 환술, 집중 - if($general[special2] == 42) { $opCrew *= 1.3; } - if($general[special2] == 43) { $opCrew *= 1.5; } + if($general['special2'] == 42) { $opCrew *= 1.3; } + if($general['special2'] == 43) { $opCrew *= 1.5; } $type = rand() % 5; // 0~4 switch($type) { case 0: $ratio = rand() % 100; // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { + if($oppose['special2'] == 45 && $ratio > 70) { $batlog[count($batlog)] = "위보를 역으로 당했다!"; $oppbatlog[count($oppbatlog)] = "반계로 상대의 위보를 되돌렸다!"; $myCrew *= 1.2; @@ -676,7 +676,7 @@ function processWar($connect, $general, $city) { case 1: $ratio = rand() % 100; // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { + if($oppose['special2'] == 45 && $ratio > 70) { $batlog[count($batlog)] = "매복을 역으로 당했다!"; $oppbatlog[count($oppbatlog)] = "반계로 상대의 매복을 되돌렸다!"; $myCrew *= 1.4; @@ -689,7 +689,7 @@ function processWar($connect, $general, $city) { case 2: $ratio = rand() % 100; // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { + if($oppose['special2'] == 45 && $ratio > 70) { $batlog[count($batlog)] = "반목을 역으로 당했다!"; $oppbatlog[count($oppbatlog)] = "반계로 상대의 반목을 되돌렸다!"; $myCrew *= 1.6; @@ -698,13 +698,13 @@ function processWar($connect, $general, $city) { $oppbatlog[count($oppbatlog)] = "반목에 당했다!"; $opCrew *= 1.6; // 특기보정 : 반계 - if($general[special2] == 45) { $opCrew *= 2; } + if($general['special2'] == 45) { $opCrew *= 2; } } break; case 3: $ratio = rand() % 100; // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { + if($oppose['special2'] == 45 && $ratio > 70) { $batlog[count($batlog)] = "화계를 역으로 당했다!"; $oppbatlog[count($oppbatlog)] = "반계로 상대의 화계를 되돌렸다!"; $myCrew *= 1.8; @@ -717,7 +717,7 @@ function processWar($connect, $general, $city) { case 4: $ratio = rand() % 100; // 특기보정 : 반계 - if($oppose[special2] == 45 && $ratio > 70) { + if($oppose['special2'] == 45 && $ratio > 70) { $batlog[count($batlog)] = "혼란을 역으로 당했다!"; $oppbatlog[count($oppbatlog)] = "반계로 상대의 혼란을 되돌렸다!"; $myCrew *= 2.0; @@ -785,26 +785,26 @@ function processWar($connect, $general, $city) { } // 특기보정 : 신산 - if($oppose[special2] == 41) { $ratio2 += 200; } + if($oppose['special2'] == 41) { $ratio2 += 200; } $ratio = rand() % 1000; // 0~999 if($ratio <= $ratio2) { $ratio = rand() % 100; // 특기보정 : 귀병, 신산, 환술, 신중 - if($oppose[special2] == 40) { $ratio += 20; } - if($oppose[special2] == 41) { $ratio += 20; } - if($oppose[special2] == 42) { $ratio += 10; } - if($oppose[special2] == 44) { $ratio += 100; } + if($oppose['special2'] == 40) { $ratio += 20; } + if($oppose['special2'] == 41) { $ratio += 20; } + if($oppose['special2'] == 42) { $ratio += 10; } + if($oppose['special2'] == 44) { $ratio += 100; } if($ratio >= 30) { // 특기보정 : 환술, 집중 - if($oppose[special2] == 42) { $myCrew *= 1.3; } - if($oppose[special2] == 43) { $myCrew *= 1.5; } + if($oppose['special2'] == 42) { $myCrew *= 1.3; } + if($oppose['special2'] == 43) { $myCrew *= 1.5; } $type = rand() % 5; // 0~4 switch($type) { case 0: $ratio = rand() % 100; // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { + if($general['special2'] == 45 && $ratio > 70) { $oppbatlog[count($oppbatlog)] = "위보를 역으로 당했다!"; $batlog[count($batlog)] = "반계로 상대의 위보를 되돌렸다!"; $opCrew *= 1.2; @@ -817,7 +817,7 @@ function processWar($connect, $general, $city) { case 1: $ratio = rand() % 100; // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { + if($general['special2'] == 45 && $ratio > 70) { $oppbatlog[count($oppbatlog)] = "매복을 역으로 당했다!"; $batlog[count($batlog)] = "반계로 상대의 매복을 되돌렸다!"; $opCrew *= 1.4; @@ -830,7 +830,7 @@ function processWar($connect, $general, $city) { case 2: $ratio = rand() % 100; // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { + if($general['special2'] == 45 && $ratio > 70) { $oppbatlog[count($oppbatlog)] = "반목을 역으로 당했다!"; $batlog[count($batlog)] = "반계로 상대의 반목을 되돌렸다!"; $opCrew *= 1.6; @@ -839,13 +839,13 @@ function processWar($connect, $general, $city) { $batlog[count($batlog)] = "반목에 당했다!"; $myCrew *= 1.6; // 특기보정 : 반계 - if($oppose[special2] == 45) { $myCrew *= 2; } + if($oppose['special2'] == 45) { $myCrew *= 2; } } break; case 3: $ratio = rand() % 100; // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { + if($general['special2'] == 45 && $ratio > 70) { $oppbatlog[count($oppbatlog)] = "화계를 역으로 당했다!"; $batlog[count($batlog)] = "반계로 상대의 화계을 되돌렸다!"; $opCrew *= 1.8; @@ -858,7 +858,7 @@ function processWar($connect, $general, $city) { case 4: $ratio = rand() % 100; // 특기보정 : 반계 - if($general[special2] == 45 && $ratio > 70) { + if($general['special2'] == 45 && $ratio > 70) { $oppbatlog[count($oppbatlog)] = "혼란을 역으로 당했다!"; $batlog[count($batlog)] = "반계로 상대의 혼란을 되돌렸다!"; $opCrew *= 2.0; @@ -903,7 +903,7 @@ function processWar($connect, $general, $city) { } // 특기보정: 돌격 - if($oppose['crewtype'] == 43 && $general[special2] != 60) { // 목우 + if($oppose['crewtype'] == 43 && $general['special2'] != 60) { // 목우 $r = 0; $r += $oppose['atmos'] + $oppAtmos + $oppAtmosBonus; $r += $oppose['train'] + $oppTrain + $oppTrainBonus; @@ -975,11 +975,11 @@ function processWar($connect, $general, $city) { //참모, 모사 방어 보정 5% } elseif($oppose['level'] == 11 || $oppose['level'] == 9 || $oppose['level'] == 7 || $oppose['level'] == 5) { $opCrew = $opCrew * 0.95; - } elseif($oppose['level'] == 4 && $oppose['no'] == $city[gen1]) { // 태수 보정 + } elseif($oppose['level'] == 4 && $oppose['no'] == $city['gen1']) { // 태수 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose['level'] == 3 && $oppose['no'] == $city[gen2]) { // 군사 보정 + } elseif($oppose['level'] == 3 && $oppose['no'] == $city['gen2']) { // 군사 보정 $opCrew = $opCrew * 0.95; - } elseif($oppose['level'] == 2 && $oppose['no'] == $city[gen3]) { // 시중 보정 + } elseif($oppose['level'] == 2 && $oppose['no'] == $city['gen3']) { // 시중 보정 $opCrew = $opCrew * 0.95; } @@ -990,12 +990,12 @@ function processWar($connect, $general, $city) { $opCrew = $opCrew * ((100 - $oppose['explevel']/3)/100); // 특기보정 : 기병, 돌격, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) - if($general[special2] == 52) { $opCrew *= 1.20; } - if($general[special2] == 60) { $opCrew *= 1.10; } - if($general[special2] == 61) { $opCrew *= 1.10; } - if($general[special2] == 50) { $myCrew *= 0.90; } - if($general[special2] == 62) { $myCrew *= 0.90; } - if($general[special2] == 75) { + if($general['special2'] == 52) { $opCrew *= 1.20; } + if($general['special2'] == 60) { $opCrew *= 1.10; } + if($general['special2'] == 61) { $opCrew *= 1.10; } + if($general['special2'] == 50) { $myCrew *= 0.90; } + if($general['special2'] == 62) { $myCrew *= 0.90; } + if($general['special2'] == 75) { if($oppose['crewtype'] != 0 && $oppose['crewtype'] != 10 && $oppose['crewtype'] != 20 && $oppose['crewtype'] != 30 && $oppose['crewtype'] != 40 && $oppose['crewtype'] != 41) { @@ -1003,18 +1003,18 @@ function processWar($connect, $general, $city) { } } $ratio = rand() % 100; // 0 ~ 99 - if(($general[special2] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $myAvoid == 1) { + if(($general['special2'] == 73 || $general['item'] == 23 || $general['item'] == 24) && $ratio > 80 && $myAvoid == 1) { $batlog[count($batlog)] = "치료했다!"; $myCrew /= 1.5; // 66%만 소모 $myAvoid = 0; } // 상대 특기보정 : 기병, 무쌍, 보병, 견고, 척사, 의술(청낭서, 태평청령) - if($oppose[special2] == 52) { $myCrew *= 1.10; } - if($oppose[special2] == 61) { $myCrew *= 1.10; } - if($oppose[special2] == 50) { $opCrew *= 0.80; } - if($oppose[special2] == 62) { $myCrew *= 1.10; } - if($oppose[special2] == 75) { + if($oppose['special2'] == 52) { $myCrew *= 1.10; } + if($oppose['special2'] == 61) { $myCrew *= 1.10; } + if($oppose['special2'] == 50) { $opCrew *= 0.80; } + if($oppose['special2'] == 62) { $myCrew *= 1.10; } + if($oppose['special2'] == 75) { if($general['crewtype'] != 0 && $general['crewtype'] != 10 && $general['crewtype'] != 20 && $general['crewtype'] != 30 && $general['crewtype'] != 40 && $general['crewtype'] != 41) { @@ -1022,7 +1022,7 @@ function processWar($connect, $general, $city) { } } $ratio = rand() % 100; // 0 ~ 99 - if(($oppose[special2] == 73 || $oppose['item'] == 23 || $oppose['item'] == 24) && $ratio > 80 && $opAvoid == 1) { + if(($oppose['special2'] == 73 || $oppose['item'] == 23 || $oppose['item'] == 24) && $ratio > 80 && $opAvoid == 1) { $oppbatlog[count($oppbatlog)] = "치료했다!"; $opCrew /= 1.5; // 66%만 소모 $opAvoid = 0; @@ -1032,8 +1032,8 @@ function processWar($connect, $general, $city) { $rd = rand() % 100; // 0 ~ 99 $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 - if($general[special2] == 61) { $ratio += 10; } - if($general[special2] == 71) { $ratio += 20; } + if($general['special2'] == 61) { $ratio += 10; } + if($general['special2'] == 71) { $ratio += 20; } if($ratio >= $rd && $myAvoid == 1) { $batlog[count($batlog)] = "필살공격!"; $oppbatlog[count($oppbatlog)] = "●상대의 필살공격!"; @@ -1041,7 +1041,7 @@ function processWar($connect, $general, $city) { $myAvoid = 0; // 특기보정 : 격노 - if($oppose[special2] == 74) { + if($oppose['special2'] == 74) { if(rand() % 100 < 50) { $batlog[count($batlog)] = "●필살 공격에 상대가 격노했다!"; $oppbatlog[count($oppbatlog)] = "●상대의 필살 공격에 격노했다!"; @@ -1054,7 +1054,7 @@ function processWar($connect, $general, $city) { $rd = rand() % 100; // 0 ~ 99 $ratio = CriticalRatio2($oppose['leader']+getHorseEff($oppose['horse'])+$opplbonus, $oppose['power']+getWeapEff($oppose['weap']), $oppose['intel']+getBookEff($oppose['book'])); // 특기보정 : 필살 - if($oppose[special2] == 71) { $ratio += 20; } + if($oppose['special2'] == 71) { $ratio += 20; } if($ratio >= $rd && $opAvoid == 1) { $oppbatlog[count($oppbatlog)] = "필살공격!"; $batlog[count($batlog)] = "●상대의 필살공격!"; @@ -1062,7 +1062,7 @@ function processWar($connect, $general, $city) { $opAvoid = 0; // 특기보정 : 격노 - if($general[special2] == 74) { + if($general['special2'] == 74) { if(rand() % 100 < 33) { $oppbatlog[count($oppbatlog)] = "●필살 공격에 상대가 진노했다!"; $batlog[count($batlog)] = "●상대의 필살 공격에 진노했다!"; @@ -1082,13 +1082,13 @@ function processWar($connect, $general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = getRate($game, $general['crewtype'], "avd"); //회피율 //특기보정 : 돌격, 궁병 - if($oppose[special2] == 60) { $ratio2 -= 100; } - if($general[special2] == 51) { $ratio2 += 20; } + if($oppose['special2'] == 60) { $ratio2 -= 100; } + if($general['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($general['item'] == 26 || $general['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $myAvoid == 1) { // 특기보정 : 격노 - if($oppose[special2] == 74 && rand() % 100 < 50) { + if($oppose['special2'] == 74 && rand() % 100 < 50) { $batlog[count($batlog)] = "●회피 시도에 상대가 격노했다!"; $oppbatlog[count($oppbatlog)] = "●상대의 회피 시도에 격노했다!"; $myCrew = CriticalScore2($myCrew); @@ -1104,19 +1104,19 @@ function processWar($connect, $general, $city) { $ratio = rand() % 100; // 0 ~ 99 $ratio2 = getRate($game, $oppose['crewtype'], "avd"); //회피율 // 특기보정 : 돌격, 궁병 - if($general[special2] == 60) { $ratio2 -= 100; } - if($oppose[special2] == 51) { $ratio2 += 20; } + if($general['special2'] == 60) { $ratio2 -= 100; } + if($oppose['special2'] == 51) { $ratio2 += 20; } //도구 보정 : 둔갑천서, 태평요술 if($oppose['item'] == 26 || $oppose['item'] == 25) { $ratio2 += 20; } if($ratio < $ratio2 && $opAvoid == 1) { // 특기보정 : 격노 - if($general[special2] == 74 && rand() % 100 < 33) { + if($general['special2'] == 74 && rand() % 100 < 33) { $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 진노했다!"; $batlog[count($batlog)] = "●상대의 회피 시도에 진노했다!"; $opCrew = CriticalScore2($opCrew); $myAvoid = 0; $warphase++; - } elseif($general[special2] == 74 && rand() % 100 < 33) { + } elseif($general['special2'] == 74 && rand() % 100 < 33) { $oppbatlog[count($oppbatlog)] = "●회피 시도에 상대가 격노했다!"; $batlog[count($batlog)] = "●상대의 회피 시도에 격노했다!"; $opCrew = CriticalScore2($opCrew); @@ -1134,13 +1134,13 @@ function processWar($connect, $general, $city) { $myCrew *= (rand() % 21 + 90)/100; // 90~110% //특기보정 : 위압 - if($general[special2] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { + if($general['special2'] == 63 && $phase == 1 && $general['crew'] >= 1000 && $general['atmos'] >= 90 && $general['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압을 줬다!"; $oppbatlog[count($oppbatlog)] = "●상대에게 위압받았다!"; $myCrew = 0; } //특기보정: 위압 - if($oppose[special2] == 63 && $phase == 1 && $oppose['crew'] >= 1000 && $oppose['atmos'] >= 90 && $oppose['train'] >= 90) { + if($oppose['special2'] == 63 && $phase == 1 && $oppose['crew'] >= 1000 && $oppose['atmos'] >= 90 && $oppose['train'] >= 90) { $batlog[count($batlog)] = "●상대에게 위압받았다!"; $oppbatlog[count($oppbatlog)] = "●상대에게 위압을 줬다!"; $opCrew = 0; @@ -1347,11 +1347,11 @@ function processWar($connect, $general, $city) { // 경험치 상승 if(floor($oppose['crewtype']/10) == 3) { // 귀병 - $oppose[intel2]++; + $oppose['intel2']++; } elseif(floor($oppose['crewtype']/10) == 4) { // 차병 - $oppose[leader2]++; + $oppose['leader2']++; } else { - $oppose[power2]++; + $oppose['power2']++; } $oppose['atmos'] *= 1.1; //사기 증가 @@ -1365,7 +1365,7 @@ function processWar($connect, $general, $city) { $oppose['rice'] -= ($opexp * 5 * getCrewtypeRice($game, $oppose['crewtype'], $destnation['tech'])); if($oppose['rice'] < 0) { $oppose['rice'] = 0; } - $query = "update general set rice='{$oppose['rice']}',leader2='$oppose[leader2]',power2='$oppose[power2]',intel2='$oppose[intel2]',atmos='{$oppose['atmos']}',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='{$oppose['no']}'"; + $query = "update general set rice='{$oppose['rice']}',leader2='{$oppose['leader2']}',power2='{$oppose['power2']}',intel2='{$oppose['intel2']}',atmos='{$oppose['atmos']}',experience=experience+'$opexp',dedication=dedication+'$opexp',killnum=killnum+1 where no='{$oppose['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update general set deathnum=deathnum+1 where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -1406,13 +1406,13 @@ function processWar($connect, $general, $city) { // 경험치 상승 if(floor($general['crewtype']/10) == 3) { // 귀병 - $general[intel2] += $exp2; + $general['intel2'] += $exp2; } elseif(floor($general['crewtype']/10) == 4) { // 차병 - $general[leader2] += $exp2; + $general['leader2'] += $exp2; } else { - $general[power2] += $exp2; + $general['power2'] += $exp2; } - $query = "update general set leader2='$general[leader2]',power2='$general[power2]',intel2='$general[intel2]' where no='{$general['no']}'"; + $query = "update general set leader2='{$general['leader2']}',power2='{$general['power2']}',intel2='{$general['intel2']}' where no='{$general['no']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); // 공헌, 명성 상승 @@ -1526,7 +1526,7 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { unset($killnum); } else { $nationlist = explode("|", $city['conflict']); - $killnum = explode("|", $city[conflict2]); + $killnum = explode("|", $city['conflict2']); } for($i=0; $i < count($nationlist); $i++) { @@ -1548,9 +1548,9 @@ function addConflict($connect, $city, $nationnum, $mykillnum) { $killnum[$i] += $mykillnum; } $city['conflict'] = implode("|", $nationlist); - $city[conflict2] = implode("|", $killnum); + $city['conflict2'] = implode("|", $killnum); - $query = "update city set conflict='{$city['conflict']}',conflict2='$city[conflict2]' where city='{$city['city']}'"; + $query = "update city set conflict='{$city['conflict']}',conflict2='{$city['conflict2']}' where city='{$city['city']}'"; MYDB_query($query, $connect) or Error("addConflict ".MYDB_error($connect),""); return $city; @@ -1567,7 +1567,7 @@ function DeleteConflict($connect, $nation) { if(strpos($city['conflict'], $nation)) { $nationlist = explode("|", $city['conflict']); - $killnum = explode("|", $city[conflict2]); + $killnum = explode("|", $city['conflict2']); $count = count($nationlist); for($i=0; $i < $count; $i++) { @@ -1588,7 +1588,7 @@ function DeleteConflict($connect, $nation) { function getConquerNation($connect, $city) { $nationlist = explode("|", $city['conflict']); - $killnum = explode("|", $city[conflict2]); + $killnum = explode("|", $city['conflict2']); $max = 0; for($i=0; $i < count($nationlist); $i++) { @@ -1739,11 +1739,11 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { // 멸망이 아니면 } else { // 태수,군사,시중은 일반으로... - $query = "update general set level='1' where no='$city[gen1]'"; + $query = "update general set level='1' where no='{$city['gen1']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1' where no='$city[gen2]'"; + $query = "update general set level='1' where no='{$city['gen2']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $query = "update general set level='1' where no='$city[gen3]'"; + $query = "update general set level='1' where no='{$city['gen3']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //수도였으면 긴급 천도 if($destnation['capital'] == $city['city']) { diff --git a/twe/processing.php b/twe/processing.php index bcf340dd..4a1ce5a4 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -387,8 +387,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 보병, 징병 - if($me[special2] == 50) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 50) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -437,8 +437,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 궁병, 징병 - if($me[special2] == 51) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 51) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -487,8 +487,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 기병, 징병 - if($me[special2] == 52) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 52) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -537,8 +537,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 귀병, 징병 - if($me[special2] == 40) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 40) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -587,8 +587,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 공성, 징병 - if($me[special2] == 53) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 53) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -821,8 +821,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 보병, 징병 - if($me[special2] == 50) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 50) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -871,8 +871,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 궁병, 징병 - if($me[special2] == 51) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 51) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -921,8 +921,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 기병, 징병 - if($me[special2] == 52) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 52) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -971,8 +971,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 귀병, 징병 - if($me[special2] == 40) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 40) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; @@ -1021,8 +1021,8 @@ function calc(cost, formnum) { //성격 보정 $cst = CharCost($cst, $me['personal']); //특기 보정 : 공성, 징병 - if($me[special2] == 53) { $cst *= 0.9; } - if($me[special2] == 72) { $cst *= 0.5; } + if($me['special2'] == 53) { $cst *= 0.9; } + if($me['special2'] == 72) { $cst *= 0.5; } $att = $admin["att{$i}"] + $abil; $def = $admin["def{$i}"] + $abil; $spd = $admin["spd{$i}"]; diff --git a/twe/start.php b/twe/start.php index 83358cc6..48c460f9 100644 --- a/twe/start.php +++ b/twe/start.php @@ -1,5 +1,11 @@ + - ../ From a4aa0ba476313e2ab224e8efcfd487509a6ec520 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 02:09:20 +0900 Subject: [PATCH 070/622] =?UTF-8?q?array=20=EC=B0=B8=EC=A1=B0=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EB=A7=88=EC=A0=80=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 18 +++++++++--------- twe/func_tournament.php | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/twe/func.php b/twe/func.php index e8336382..8f1ad94e 100644 --- a/twe/func.php +++ b/twe/func.php @@ -6802,12 +6802,12 @@ function disaster($connect) { $city = MYDB_fetch_array($cityresult); //호황 발생 도시 선택 ( 기본 3% 이므로 약 3개 도시 ) //재해 발생 도시 선택 ( 기본 6% 이므로 약 6개 도시 ) - if($isgood == 1) { $ratio = 3 + round(1.0*$city['secu']/$city[secu2]*3); } // 3 ~ 6% - else { $ratio = 6 - round(1.0*$city['secu']/$city[secu2]*3); } // 3 ~ 6% + if($isgood == 1) { $ratio = 3 + round(1.0*$city['secu']/$city['secu2']*3); } // 3 ~ 6% + else { $ratio = 6 - round(1.0*$city['secu']/$city['secu2']*3); } // 3 ~ 6% if(rand()%100+1 < $ratio) { $disastercity[count($disastercity)] = $city['city']; - $disasterratio[count($disastercity)] = 1.0 * $city['secu'] / $city[secu2]; + $disasterratio[count($disastercity)] = 1.0 * $city['secu'] / $city['secu2']; $disastername .= $city['name']." "; } } @@ -6926,13 +6926,13 @@ function disaster($connect) { $city['comm'] *= $ratio; $city['secu'] *= $ratio; $city['def'] *= $ratio; $city['wall'] *= $ratio; - if($city['pop'] > $city[pop2]) { $city['pop'] = $city[pop2]; } + if($city['pop'] > $city['pop2']) { $city['pop'] = $city['pop2']; } if($city['rate'] > 100) { $city['rate'] = 100; } - if($city['agri'] > $city[agri2]) { $city['agri'] = $city[agri2]; } - if($city['comm'] > $city[comm2]) { $city['comm'] = $city[comm2]; } - if($city['secu'] > $city[secu2]) { $city['secu'] = $city[secu2]; } - if($city['def'] > $city[def2]) { $city['def'] = $city[def2]; } - if($city['wall'] > $city[wall2]) { $city['wall'] = $city[wall2]; } + if($city['agri'] > $city['agri2']) { $city['agri'] = $city['agri2']; } + if($city['comm'] > $city['comm2']) { $city['comm'] = $city['comm2']; } + if($city['secu'] > $city['secu2']) { $city['secu'] = $city['secu2']; } + if($city['def'] > $city['def2']) { $city['def'] = $city['def2']; } + if($city['wall'] > $city['wall2']) { $city['wall'] = $city['wall2']; } $query = "update city set state='$state',pop='{$city['pop']}',rate='{$city['rate']}',agri='{$city['agri']}',comm='{$city['comm']}',secu='{$city['secu']}',def='{$city['def']}',wall='{$city['wall']}' where city='$disastercity[$i]'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/func_tournament.php b/twe/func_tournament.php index 55410edf..3e3810bb 100644 --- a/twe/func_tournament.php +++ b/twe/func_tournament.php @@ -748,7 +748,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { case 3: $log[count($log)] = "{$gen1['name']}의 ".getHorseName($gen1['h'])."(이)가 갈기를 휘날립니다!"; break; } } - if($gen1[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { + if($gen1['w'] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { case 0: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1['w'])."(이)가 번뜩입니다!"; break; case 1: $log[count($log)] = "{$gen1['name']}의 ".getWeapName($gen1['w'])."(이)가 푸르게 빛납니다!"; break; @@ -756,7 +756,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getWeapName($gen1['w'])."(이)가 쥐어져 있습니다!"; break; } } - if($gen1[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { + if($gen1['b'] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { case 0: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1['b'])."(을)를 펼쳐듭니다!"; break; case 1: $log[count($log)] = "{$gen1['name']}(이)가 ".getBookName($gen1['b'])."(을)를 품에서 꺼냅니다!"; break; @@ -764,7 +764,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { case 3: $log[count($log)] = "{$gen1['name']}의 손에는 ".getBookName($gen1['b'])."(이)가 쥐어져 있습니다!"; break; } } - if($gen2[h] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { + if($gen2['h'] > 6 && ($tnmt_type == 0 || $tnmt_type == 1)) { switch(rand()%4) { case 0: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 포효합니다!"; break; case 1: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 그 위용을 뽐냅니다!"; break; @@ -772,7 +772,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { case 3: $log[count($log)] = "{$gen2['name']}의 ".getHorseName($gen2['h'])."(이)가 갈기를 휘날립니다!"; break; } } - if($gen2[w] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { + if($gen2['w'] > 6 && ($tnmt_type == 0 || $tnmt_type == 2)) { switch(rand()%4) { case 0: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2['w'])."(이)가 번뜩입니다!"; break; case 1: $log[count($log)] = "{$gen2['name']}의 ".getWeapName($gen2['w'])."(이)가 푸르게 빛납니다!"; break; @@ -780,7 +780,7 @@ function fight($connect, $tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) { case 3: $log[count($log)] = "{$gen2['name']}의 손에는 ".getWeapName($gen2['w'])."(이)가 쥐어져 있습니다!"; break; } } - if($gen2[b] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { + if($gen2['b'] > 6 && ($tnmt_type == 0 || $tnmt_type == 3)) { switch(rand()%4) { case 0: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2['b'])."(을)를 펼쳐듭니다!"; break; case 1: $log[count($log)] = "{$gen2['name']}(이)가 ".getBookName($gen2['b'])."(을)를 품에서 꺼냅니다!"; break; From 6b7f0f8a1475b830faf196829dcd002617c1e1b9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 03:00:24 +0900 Subject: [PATCH 071/622] =?UTF-8?q?BLOCKBODY=20=EC=9D=98=EB=AF=B8=20?= =?UTF-8?q?=EC=97=86=EC=9D=8C.=20=EC=82=AD=EC=A0=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_config/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/f_config/config.php b/f_config/config.php index 07243a04..fa5167e5 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -50,7 +50,7 @@ define('INSTALL', 'install'); define('SLEEP', 'sleep'); -//define(BLOCKBODY, ''); -define('BLOCKBODY', 'oncontextmenu="return false" onselectstart="return false" ondragstart="return false"'); +define('BLOCKBODY', ''); +//define('BLOCKBODY', 'oncontextmenu="return false" onselectstart="return false" ondragstart="return false"'); From f48500dd710726a1cb211e03c6efccacf7797359 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 03:52:45 +0900 Subject: [PATCH 072/622] =?UTF-8?q?config=20=EC=84=A4=EC=A0=95=20=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=EC=9D=84=20=ED=95=A8=EC=88=98=EB=A5=BC=20=EC=9D=B4?= =?UTF-8?q?=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/conf.orig.php | 76 +++++++++++++++++++++++++++++++++++++ f_config/MAIL.php | 2 +- f_func/class._Mail.php | 21 ++-------- twe/d_setting/conf.orig.php | 13 +++++++ 4 files changed, 93 insertions(+), 19 deletions(-) create mode 100644 d_setting/conf.orig.php create mode 100644 twe/d_setting/conf.orig.php diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php new file mode 100644 index 00000000..2e6bd170 --- /dev/null +++ b/d_setting/conf.orig.php @@ -0,0 +1,76 @@ +isSMTP(); + $objMail->setFrom($address); + $objMail->Hostname = $host; + $objMail->FromName = $nickname; + $objMail->Port = $port; + + if($checkAuth){ + $objMail->SMTPAuth = true; + $objMail->Username = $user; + $objMail->Password = $password; + + } + if($ignoreCert){ + $objMail->SMTPOptions = array ( + 'ssl' => array( + 'verify_peer' => false, + 'allow_self_signed' => true + ) + ); + } + + if($mailSubType == 'tls'){ + $objMail->SMTPSecure = 'tls'; + } + else if($mailSubType == 'ssl'){ + $objMail->SMTPSecure = 'ssl'; + } + + return $objMail; + } + else if($mailType == 'mail'){ + throw new BadMethodCallException('Not Implemented'); + } + else if($mailType == 'google'){ + throw new BadMethodCallException('Not Implemented'); + } + else{ + throw new InvalidArgumentException('Invalid Mail Type'); + } + + + + + +} \ No newline at end of file diff --git a/f_config/MAIL.php b/f_config/MAIL.php index 9ababf2d..e056c4b9 100644 --- a/f_config/MAIL.php +++ b/f_config/MAIL.php @@ -4,7 +4,7 @@ require_once(ROOT.W.F_FUNC.W.'class._Mail.php'); require_once(ROOT.W.F_CONFIG.W.SETTING.PHP); if($SETTING->IsExist()) { - $MAIL = new _Mail($SETTING->MailHost(), $SETTING->MailPort(), $SETTING->MailId(), $SETTING->MailPw(), $SETTING->MailAddr()); + $MAIL = new _Mail(); } else { Error('설정 파일이 없습니다. 설정을 먼저 하십시요!'); } diff --git a/f_func/class._Mail.php b/f_func/class._Mail.php index 33982ff9..4f3203e3 100644 --- a/f_func/class._Mail.php +++ b/f_func/class._Mail.php @@ -1,30 +1,15 @@ objMail = new PHPMailer(); - $this->objMail->IsSMTP(); - $this->objMail->SMTPAuth = false; - //$this->objMail->SMTPSecure = 'ssl';//TODO 제대로된 Mailer 옵션 설정 - $this->objMail->Host = $host; - $this->objMail->Port = $port; - $this->objMail->Username = $id; - $this->objMail->Password = $pw; + public function __construct() { + $this->objMail = newMailObj(); $this->objMail->ContentType = 'text/plain'; $this->objMail->CharSet = 'utf-8'; $this->objMail->Encoding = 'base64'; - $this->objMail->SetFrom($addr); - $this->objMail->SMTPOptions = array ( - 'ssl' => array( - 'verify_peer' => false, - 'allow_self_signed' => true - ) - ); } public function Send($to, $subject, $content) { diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php new file mode 100644 index 00000000..51dca3a5 --- /dev/null +++ b/twe/d_setting/conf.orig.php @@ -0,0 +1,13 @@ + Date: Sun, 21 Jan 2018 04:27:08 +0900 Subject: [PATCH 073/622] =?UTF-8?q?=EB=A9=94=EC=8B=9C=EC=A7=80=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/install_ok.php | 6 ++++++ twe/schema.php | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/twe/install_ok.php b/twe/install_ok.php index fa2d7615..d14a0f2a 100644 --- a/twe/install_ok.php +++ b/twe/install_ok.php @@ -49,6 +49,8 @@ if(isTable($connect, "auction", $dbname)) @MYDB_query("drop table auction", $con if(isTable($connect, "statistic",$dbname)) @MYDB_query("drop table statistic", $connect) or Error("drop ".MYDB_error($connect),""); // 연감 테이블 삭제 if(isTable($connect, "history",$dbname)) @MYDB_query("drop table history", $connect) or Error("drop ".MYDB_error($connect),""); +// 메시지 테이블 삭제 +if(isTable($connect, "message",$dbname)) @MYDB_query("drop table message", $connect) or Error("drop ".MYDB_error($connect),""); // 관리자 테이블 생성 if(!isTable($connect, "game", $dbname)) @MYDB_query($game_schema, $connect) or Error("create game ".MYDB_error($connect),""); @@ -75,6 +77,10 @@ if(!isTable($connect, "hall", $dbname)) { } } } +// 메시지 테이블 생성 +if(!isTable($connect, "message", $dbname)) { + MYDB_query($message_schema, $connect) or Error("create message ".MYDB_error($connect),""); +} // 왕조 테이블 생성 if(!isTable($connect, "emperior",$dbname)) @MYDB_query($emperior_schema, $connect) or Error("create emperior ".MYDB_error($connect),""); diff --git a/twe/schema.php b/twe/schema.php index 96f018c7..c20dba4e 100644 --- a/twe/schema.php +++ b/twe/schema.php @@ -426,6 +426,29 @@ $game_schema = " "; +/////////////////////////////////////////////////////////////////////////// +// 메시지 테이블 +/////////////////////////////////////////////////////////////////////////// +$message_schema = " +CREATE TABLE `message` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `address` INT(11) NOT NULL, + `type` ENUM('send','receive') NOT NULL, + `src` INT(11) NOT NULL, + `dest` INT(11) NOT NULL, + `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `message` TEXT NOT NULL, + PRIMARY KEY (`id`), + INDEX `by_owner` (`address`, `time`), + INDEX `by_dest` (`dest`, `time`), + INDEX `by_full` (`src`, `dest`, `time`) +) +COLLATE='utf8_general_ci' +ENGINE=InnoDB +; + +"; + /////////////////////////////////////////////////////////////////////////// // 명전 테이블 /////////////////////////////////////////////////////////////////////////// From 47d5a07a81a37d88450618c4210a7cb8f6e6799e Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 06:08:39 +0900 Subject: [PATCH 074/622] =?UTF-8?q?conf=EC=97=90=20return=20hint=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=EC=A0=84?= =?UTF-8?q?=EC=86=A1=20=EC=A4=80=EB=B9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/conf.orig.php | 5 + twe/d_setting/conf.orig.php | 5 + twe/func.php | 303 +--------------------------- twe/func_message.php | 381 ++++++++++++++++++++++++++++++++++++ twe/j_msgselect.php | 2 + twe/lib.php | 60 ++++++ twe/msglist.php | 12 +- twe/new_lib.php | 11 -- 8 files changed, 462 insertions(+), 317 deletions(-) create mode 100644 twe/func_message.php create mode 100644 twe/j_msgselect.php diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index 2e6bd170..9e45ba67 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -4,6 +4,11 @@ require_once(__dir__.'/../e_lib/meekrodb.2.3.class.php.php'); require_once(__dir__.'/../e_lib/phpmailer5/class.phpmailer.php'); require_once(__dir__.'/../e_lib/phpmailer5/class.smtp.php'); +/** + * DB 객체 생성 + * + * @return MeekroDB + */ function newRootDB(){ $host = '_host_'; $user = '_user_'; diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php index 51dca3a5..03fb571c 100644 --- a/twe/d_setting/conf.orig.php +++ b/twe/d_setting/conf.orig.php @@ -1,6 +1,11 @@ 0?"orange":"white"; echo ">".$nation['msg'].""; } -function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - $you = array(); - - $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $reply = MYDB_fetch_array($result); - if($reply['type'] % 100 == 9) { - $reply['reply'] %= 10000; - $query = "select no,name from general where no={$reply['reply']}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } elseif($reply['type'] % 100 == 10) { - $reply['reply'] = floor($reply['reply']/10000); - $query = "select no,name from general where no={$reply['reply']}"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - } - - $query = "select nation,color,name from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - echo " - -"; -} - -function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { - $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -} - -function MsgMe($connect, $bg) { - $query = "select no,nation,msgindex, - msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, - msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, - msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, - msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when - from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $index = $me['msgindex']; - for($i=0; $i < 10; $i++) { - if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } - $index--; - if($index < 0) { $index = 9; } - } -} - -function MsgDip($connect, $bg) { - $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation['dip0']) { echo "\n"; DecodeMsg($connect, $nation['dip0'], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } - if($nation['dip1']) { echo "\n"; DecodeMsg($connect, $nation['dip1'], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } - if($nation['dip2']) { echo "\n"; DecodeMsg($connect, $nation['dip2'], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } - if($nation['dip3']) { echo "\n"; DecodeMsg($connect, $nation['dip3'], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } - if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } -} - -// type : xx,xx(불가침기간,타입) -// who : xxxx,xxxx(발신인, 수신인) -function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { - $query = "select skin,no,nation,name,picture,level from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 - // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 - // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 - $category = $type % 100; - $term = floor($type / 100); - $from = floor($who / 10000); - $to = $who % 10000; - - $query = "select name,picture,imgsvr,nation from general where no='$from'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndr = MYDB_fetch_array($result); - - if($sndr['nation'] == 0) { - $sndrnation['name'] = '재야'; - $sndrnation['color'] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='{$sndr['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $sndrnation = MYDB_fetch_array($result); - } - - switch($bg) { - case 2: - case 4: $bgcolor = "CC6600"; break; - } - - if($category == 6) { - $query = "select reserved from diplomacy where me='{$sndr['nation']}' and you='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dip = MYDB_fetch_array($result); - - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); - } elseif($category <= 8) { - $query = "select name,color from nation where nation='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); - } elseif($category <= 11) { - $query = "select name,picture,nation from general where no='$to'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvr = MYDB_fetch_array($result); - - if($rcvr['nation'] == 0) { - $rcvrnation['name'] = '재야'; - $rcvrnation['color'] = 'FFFFFF'; - } else { - $query = "select name,color from nation where nation='{$rcvr['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $rcvrnation = MYDB_fetch_array($result); - } - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); - } -} function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $tocolor, $msg) { if($nation == 0) { $nation = 0; } @@ -3448,95 +3240,6 @@ function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $toc fclose($fp); } -function MsgFile($skin, $bg, $nation=0, $level=0) { - switch($bg) { - case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; - case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; - } - - if(!file_exists("logs/{$fl}")){ - return; - } - $fp = @fopen("logs/{$fl}", "r"); - @fseek($fp, -$count*300, SEEK_END); - $file = @fread($fp, $count*300); - @fclose($fp); - $code = explode("\r\n",$file); - for($i=0; $i < $count; $i++) { - $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); - - $cnt = count($msg); - if(!empty($cnt)){ - for($k=0; $k < $cnt; $k++) { - $msg[$k] = trim($msg[$k]); - } - } - if(!empty($msg)){ - ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); - } - } -} - -function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { - if($msg == "") return; - - $msg = Tag2Code($msg); - - $site = ""; $form = ""; $form2 = ""; - if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { - $corebutton = " "; - } else { - $corebutton = " 【수락】【거절】"; - } - if($type == 6) { - $corebutton .= "
비고: {$note}"; - } - switch($type) { - case 1: $sign = ""; $corebutton = ""; break; - case 2: $sign = ""; $corebutton = ""; break; - case 3: $sign = ""; $corebutton = ""; break; - case 4: $sign = ""; $site = "d_surrender.php"; break; - case 5: $sign = ""; $site = "d_merge.php"; break; - case 6: $sign = ""; $site = "d_ally.php"; break; - case 7: $sign = ""; $site = "d_cease.php"; break; - case 8: $sign = ""; $site = "d_cancel.php"; break; - case 9: $sign = ""; $corebutton = ""; break; - case 10: $sign = ""; $corebutton = ""; break; - case 11: $sign = ""; $site = "d_scout.php"; break; - } - if($skin == 0) { - $bgcolor = "000000"; $picture = ""; - $naming = "[{$me}{$sign}{$you}]"; - } else { - $imageTemp = GetImageURL($imgsvr); - $naming = "[$me{$sign}$you]"; - $picture = ""; - } - if($site != "") { - $form = "
"; - $form2 = "
"; - } - if($num >= 0) { $num = ""; } - else { $num = ""; } - if($who > 0) { $who = ""; } - else { $who = ""; } - if($when > 0) { $when = ""; } - else { $when = ""; } - echo " - - - - $form - - $num - $who - $when - $form2 - -
$picture$naming<$date>
{$msg}{$corebutton}
- "; -} - function msgprint($connect, $msg, $name, $picture, $imgsvr, $when, $num, $type) { global $_basecolor2, $_basecolor4, $images; diff --git a/twe/func_message.php b/twe/func_message.php new file mode 100644 index 00000000..d33d32a5 --- /dev/null +++ b/twe/func_message.php @@ -0,0 +1,381 @@ +id = $row['id']; + $this->address = $row['address']; + $this->type = $row['type']; + $this->src = $row['src']; + $this->dest = $row['dest']; + $this->time = $row['time']; + $this->message = $row['message']; + + $this->src_name = $row['src_name']; + } +} + + + +function getRawMessage($address, $limit=30, $fromTime=NULL){ + //'select * from `message` where `address` = 90 and `time` < "2018-01-21 04:47:20" ORDER BY `time` desc LIMIT 3 '; + + + $sql = 'select * from `message` where `address` = %d_address'; + if($fromTime !== NULL){ + $sql .= ' and `time` <= %s_time'; + } + $sql .= ' ORDER BY `time` desc'; + if($limit > 0){ + $sql .= ' LIMIT %d_limit'; + } + + + $db = newDB(); + //TODO: table 네임의 prefix를 처리할 수 있도록 개선 + $result = $db->query($sql, array( + 'address' => $address, + 'limit' => $limit, + 'time' => $fromTime + )); + + + return array_map(function ($row){ + return new Message($row); + }, $result); +} + +function getMessage(){ + +} + + +function genList($connect) { + $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + $you = array(); + + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $reply = MYDB_fetch_array($result); + if($reply['type'] % 100 == 9) { + $reply['reply'] %= 10000; + $query = "select no,name from general where no={$reply['reply']}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } elseif($reply['type'] % 100 == 10) { + $reply['reply'] = floor($reply['reply']/10000); + $query = "select no,name from general where no={$reply['reply']}"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $you = MYDB_fetch_array($result); + } + + $query = "select nation,color,name from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + echo " + +"; +} + + +function MsgFile($skin, $bg, $nation=0, $level=0) { + switch($bg) { + case 1: $bgcolor = "000055"; $count = 10; $fl = "_all_msg.txt"; break; + case 3: $bgcolor = "336600"; $count = 20; $fl = "_nation_msg{$nation}.txt"; break; + } + + if(!file_exists("logs/{$fl}")){ + return; + } + $fp = @fopen("logs/{$fl}", "r"); + @fseek($fp, -$count*300, SEEK_END); + $file = @fread($fp, $count*300); + @fclose($fp); + $code = explode("\r\n",$file); + for($i=0; $i < $count; $i++) { + $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); + + $cnt = count($msg); + if(!empty($cnt)){ + for($k=0; $k < $cnt; $k++) { + $msg[$k] = trim($msg[$k]); + } + } + if(!empty($msg)){ + ShowMsg($skin, $bgcolor, $msg[0], $msg[7], $msg[8], $msg[1], $msg[5], $msg[2], $msg[6], $msg[4], $msg[3]); + } + } +} + + +// type : xx,xx(불가침기간,타입) +// who : xxxx,xxxx(발신인, 수신인) +function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { + $query = "select skin,no,nation,name,picture,level from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + // 1 : 전메, 2 : 아국->타국, 3 : 타국->아국 + // 4 : 합병, 5 : 통합, 6 : 불가침, 7 : 종전, 8 : 파기 + // 9 : 자신->타인, 10 : 타인 -> 자신, 11 : 등용 + $category = $type % 100; + $term = floor($type / 100); + $from = floor($who / 10000); + $to = $who % 10000; + + $query = "select name,picture,imgsvr,nation from general where no='$from'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndr = MYDB_fetch_array($result); + + if($sndr['nation'] == 0) { + $sndrnation['name'] = '재야'; + $sndrnation['color'] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='{$sndr['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $sndrnation = MYDB_fetch_array($result); + } + + switch($bg) { + case 2: + case 4: $bgcolor = "CC6600"; break; + } + + if($category == 6) { + $query = "select reserved from diplomacy where me='{$sndr['nation']}' and you='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $dip = MYDB_fetch_array($result); + + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); + } elseif($category <= 8) { + $query = "select name,color from nation where nation='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); + } elseif($category <= 11) { + $query = "select name,picture,nation from general where no='$to'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvr = MYDB_fetch_array($result); + + if($rcvr['nation'] == 0) { + $rcvrnation['name'] = '재야'; + $rcvrnation['color'] = 'FFFFFF'; + } else { + $query = "select name,color from nation where nation='{$rcvr['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $rcvrnation = MYDB_fetch_array($result); + } + ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); + } +} + + +function MsgMe($connect, $bg) { + $query = "select no,nation,msgindex, + msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8,msg9, + msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, + msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, + msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when + from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $index = $me['msgindex']; + for($i=0; $i < 10; $i++) { + if($me["msg{$index}"]) { echo "\n"; DecodeMsg($connect, $me["msg{$index}"], $me["msg{$index}_type"], $me["msg{$index}_who"], $me["msg{$index}_when"], $bg, $index); } + $index--; + if($index < 0) { $index = 9; } + } +} + + + + +function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, $column, $value) { + //TODO: moveMsg 쓰는 곳 모두 고쳐!!! + $query = "update {$table} set {$msgtype}{$msgnum}='$msg',{$msgtype}{$msgnum}_type='$type',{$msgtype}{$msgnum}_who='$who',{$msgtype}{$msgnum}_when='$when' where {$column}='$value'"; + MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); +} + +function MsgDip($connect, $bg) { + $query = "select no,nation from general where user_id='{$_SESSION['p_id']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $me = MYDB_fetch_array($result); + + $query = "select dip0,dip1,dip2,dip3,dip4,dip0_who,dip1_who,dip2_who,dip3_who,dip4_who,dip0_when,dip1_when,dip2_when,dip3_when,dip4_when,dip0_type,dip1_type,dip2_type,dip3_type,dip4_type from nation where nation='{$me['nation']}'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $nation = MYDB_fetch_array($result); + + if($nation['dip0']) { echo "\n"; DecodeMsg($connect, $nation['dip0'], $nation['dip0_type'], $nation['dip0_who'], $nation['dip0_when'], $bg, 0); } + if($nation['dip1']) { echo "\n"; DecodeMsg($connect, $nation['dip1'], $nation['dip1_type'], $nation['dip1_who'], $nation['dip1_when'], $bg, 1); } + if($nation['dip2']) { echo "\n"; DecodeMsg($connect, $nation['dip2'], $nation['dip2_type'], $nation['dip2_who'], $nation['dip2_when'], $bg, 2); } + if($nation['dip3']) { echo "\n"; DecodeMsg($connect, $nation['dip3'], $nation['dip3_type'], $nation['dip3_who'], $nation['dip3_when'], $bg, 3); } + if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } +} + + + +function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { + if($msg == "") return; + + $msg = Tag2Code($msg); + + $site = ""; $form = ""; $form2 = ""; + if($type == 11 || ($type >= 4 && $type <= 8 && $level >= 5)) { + $corebutton = " "; + } else { + $corebutton = " 【수락】【거절】"; + } + if($type == 6) { + $corebutton .= "
비고: {$note}"; + } + switch($type) { + case 1: $sign = ""; $corebutton = ""; break; + case 2: $sign = ""; $corebutton = ""; break; + case 3: $sign = ""; $corebutton = ""; break; + case 4: $sign = ""; $site = "d_surrender.php"; break; + case 5: $sign = ""; $site = "d_merge.php"; break; + case 6: $sign = ""; $site = "d_ally.php"; break; + case 7: $sign = ""; $site = "d_cease.php"; break; + case 8: $sign = ""; $site = "d_cancel.php"; break; + case 9: $sign = ""; $corebutton = ""; break; + case 10: $sign = ""; $corebutton = ""; break; + case 11: $sign = ""; $site = "d_scout.php"; break; + } + if($skin == 0) { + $bgcolor = "000000"; $picture = ""; + $naming = "[{$me}{$sign}{$you}]"; + } else { + $imageTemp = GetImageURL($imgsvr); + $naming = "[$me{$sign}$you]"; + $picture = ""; + } + if($site != "") { + $form = "
"; + $form2 = "
"; + } + if($num >= 0) { $num = ""; } + else { $num = ""; } + if($who > 0) { $who = ""; } + else { $who = ""; } + if($when > 0) { $when = ""; } + else { $when = ""; } + echo " + + + + $form + + $num + $who + $when + $form2 + +
$picture$naming<$date>
{$msg}{$corebutton}
+ "; +} diff --git a/twe/j_msgselect.php b/twe/j_msgselect.php new file mode 100644 index 00000000..1083d4a9 --- /dev/null +++ b/twe/j_msgselect.php @@ -0,0 +1,2 @@ +
전체 메세지(최고75자)
- +
개인 메세지(최고75자)
- +
- + 국가 메세지(최고75자)
- +
diff --git a/twe/new_lib.php b/twe/new_lib.php index b08635cd..9ccd6bde 100644 --- a/twe/new_lib.php +++ b/twe/new_lib.php @@ -2,17 +2,6 @@ //임시 땜빵 리팩터링. require_once "lib.php"; -function dbConnRoot() { - global $connect, $HTTP_COOKIE_VARS; - $f = @file("../d_setting/set.php") or Error("set.php파일이 없습니다. DB설정을 먼저 하십시요!"); - for($i=1; $i<= 4; $i++) $f[$i] = trim(str_replace("\n","",$f[$i])); - if(!$connect) $connect = @MYDB_connect($f[1],$f[2],$f[3]) or Error("DB 접속시 에러가 발생했습니다"); - @MYDB_select_db($f[4], $connect) or Error("DB Select 에러가 발생했습니다",""); - return $connect; -} - - - class General{ protected $no, $user_id, $name, $level, $level_exp, From d080e5ec2c6b16c6e5e06effb26529885316621f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 16:58:19 +0900 Subject: [PATCH 075/622] =?UTF-8?q?\r\n=EC=9D=84=20\n=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD.=20=EB=A9=94=EB=AA=A8=EC=9E=A5=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=97=B4=20=EA=B2=83=EB=8F=84=20=EC=95=84=EB=8B=88?= =?UTF-8?q?=EA=B3=A0..=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=99=95=EC=9D=B8?= =?UTF-8?q?=20=EB=93=B1=20=EB=AA=87=EB=AA=87=20=EC=9C=A0=ED=8B=B8=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=83=88=20db=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EA=B8=B0=EC=A4=80=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=B6=94=EA=B0=80=20ajax=20=EA=B8=B0=EB=B0=98=20ms?= =?UTF-8?q?gsubmit=20=EC=9E=91=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_func/class._Chat.php | 4 +- f_func/class._Log.php | 4 +- f_func/func.php | 4 +- twe/a_traffic.php | 2 +- twe/c_msgsubmit.php | 2 +- twe/error.php | 4 +- twe/func.php | 117 ++++++++++++++++++++++++++++++-------- twe/func_history.php | 2 +- twe/func_http.php | 34 +++++------ twe/func_tournament.php | 4 +- twe/j_msgsubmit.php | 63 ++++++++++++++------ twe/npc_login_process.php | 2 +- 12 files changed, 168 insertions(+), 74 deletions(-) diff --git a/f_func/class._Chat.php b/f_func/class._Chat.php index 1ada9fc6..c2300d37 100644 --- a/f_func/class._Chat.php +++ b/f_func/class._Chat.php @@ -7,13 +7,13 @@ require_once(ROOT.W.F_FUNC.W.'class._JSON.php'); class _Chat { public static function SetChat($type, $name, $msg) { $filename = ROOT.W.D_CHAT.W.$type."Chat.txt"; - AppendToFile($filename, "{$name}: {$msg}\r\n"); + AppendToFile($filename, "{$name}: {$msg}\n"); } public static function GetChat($type, $size=10) { $filename = ROOT.W.D_CHAT.W.$type."Chat.txt"; $content = ReadToFileBackward($filename, $size*100); - $msgs = explode("\r\n", $content); + $msgs = explode("\n", $content); $count = count($msgs) - 1; $start = $count - $size; if($start < 0) $start = 0; diff --git a/f_func/class._Log.php b/f_func/class._Log.php index 6c3b8bec..ed90cae0 100644 --- a/f_func/class._Log.php +++ b/f_func/class._Log.php @@ -10,14 +10,14 @@ class _Log { public static function SetLog($type, $log) { $filename = ROOT.W.D_LOG.W.$type."Log.txt"; - if(_Log::$flagLog) AppendToFile($filename, $log."\r\n"); + if(_Log::$flagLog) AppendToFile($filename, $log."\n"); } public static function GetWorldLog($type, $size=10) { $filename = ROOT.W.D_LOG.W.$type."Log.txt"; if(_Log::$flagLog) { $content = ReadToFileBackward($filename, $size*150); - $logs = explode("\r\n", $content); + $logs = explode("\n", $content); $count = count($logs) - 1; $start = $count - $size; if($start < 0) $start = 0; diff --git a/f_func/func.php b/f_func/func.php index 4d8a4377..49ac51b9 100644 --- a/f_func/func.php +++ b/f_func/func.php @@ -18,12 +18,12 @@ function getmicrotime() { } function Error($msg) { - AppendToFile(ROOT.'/d_log/err.txt', $msg."\r\n"); + AppendToFile(ROOT.'/d_log/err.txt', $msg."\n"); exit(1); } function ErrorToScreen($msg) { - AppendToFile(ROOT.'/d_log/err.txt', $msg."\r\n"); + AppendToFile(ROOT.'/d_log/err.txt', $msg."\n"); echo $msg; exit(1); } diff --git a/twe/a_traffic.php b/twe/a_traffic.php index efa0a8ef..54429946 100644 --- a/twe/a_traffic.php +++ b/twe/a_traffic.php @@ -12,7 +12,7 @@ $fp = @fopen("logs/_traffic.txt", "r"); @fseek($fp, -1000, SEEK_END); $file = @fread($fp, 1000); @fclose($fp); -$log = explode("\r\n",$file); +$log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } echo $str; diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index ae0f234d..92aa2c0d 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -130,7 +130,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $fp = fopen("logs/_gen_msg.txt", "a"); //로그 파일에 기록 - fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\r\n"); + fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\n"); fclose($fp); } diff --git a/twe/error.php b/twe/error.php index e715fc70..10c73c93 100644 --- a/twe/error.php +++ b/twe/error.php @@ -1,7 +1,5 @@ diff --git a/twe/func.php b/twe/func.php index d52daf1c..aa6d759e 100644 --- a/twe/func.php +++ b/twe/func.php @@ -115,17 +115,27 @@ function GetImageURL($imgsvr) { function CheckLogin($type=0) { if(!isset($_SESSION['p_id'])) { if($type == 0) { + header('Location: start.php'); //echo ""; - echo 'start.php';//TODO:debug all and replace + //echo 'start.php';//TODO:debug all and replace } else { - echo 'main.php';//TODO:debug all and replace + header('Location: main.php'); + //echo 'main.php';//TODO:debug all and replace //echo ""; } exit(); } } +function CheckLoginEx(){ + //TODO: 서버 별로 p_id를 다르게 설정할 수 있어야함. + if(!isset($_SESSION['p_id'])) { + return false; + } + return true; +} + function checkLimit($userlevel, $con, $conlimit) { //운영자 if($userlevel >= 5) { return 0; } @@ -2882,7 +2892,7 @@ function pushTrickLog($connect, $log) { if($size > 0) { $fp = fopen("logs/_tricklog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2894,7 +2904,7 @@ function pushProcessLog($connect, $log) { $date = date('Y_m_d'); $fp = fopen("logs/_{$date}_processlog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2908,7 +2918,7 @@ function delStepLog() { function pushStepLog($log) { $date = date('Y_m_d'); $fp = fopen("logs/_{$date}_steplog.txt", "a"); - fwrite($fp, $log."\r\n"); + fwrite($fp, $log."\n"); fclose($fp); } @@ -2918,7 +2928,7 @@ function pushLockLog($connect, $log) { $date = date('Y_m_d'); $fp = fopen("logs/_{$date}_locklog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2929,7 +2939,7 @@ function pushAdminLog($connect, $log) { if($size > 0) { $fp = fopen("logs/_adminlog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2940,7 +2950,7 @@ function pushAuctionLog($connect, $log) { if($size > 0) { $fp = fopen("logs/_auctionlog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2951,7 +2961,7 @@ function pushGenLog($general, $log) { if($size > 0) { $fp = fopen("logs/gen{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2962,7 +2972,7 @@ function pushBatRes($general, $log) { if($size > 0) { $fp = fopen("logs/batres{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2973,7 +2983,7 @@ function pushBatLog($general, $log) { if($size > 0) { $fp = fopen("logs/batlog{$general['no']}.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2984,7 +2994,7 @@ function pushAllLog($log) { if($size > 0) { $fp = fopen("logs/_alllog.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } @@ -2995,12 +3005,24 @@ function pushHistory($connect, $history) { if($size > 0) { $fp = fopen("logs/_history.txt", "a"); for($i=0; $i < $size; $i++) { - fwrite($fp, $history[$i]."\r\n"); + fwrite($fp, $history[$i]."\n"); } fclose($fp); } } +function getRawLog($path, $count, $line_length, $skin){ + //TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ + if(!file_exists($path)){ + return NULL; + } + + $fp = fopen($path, 'r'); + @fseek(fp, -$count * $line_length, SEEK_END); + $data = fread($fp, $count * $line_length); + fclose($fp); +} + function TrickLog($count, $skin) { if(!file_exists("logs/_tricklog.txt")){ return ''; @@ -3009,7 +3031,7 @@ function TrickLog($count, $skin) { @fseek($fp, -$count*150, SEEK_END); $file = @fread($fp, $count*150); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } echo $str; @@ -3023,7 +3045,7 @@ function AllLog($count, $skin) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; @@ -3039,7 +3061,7 @@ function AuctionLog($count, $skin) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } echo $str; @@ -3053,7 +3075,7 @@ function History($count, $skin) { @fseek($fp, -300*$count, SEEK_END); // $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; @@ -3069,7 +3091,7 @@ function MyLog($no, $count, $skin) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; @@ -3085,7 +3107,7 @@ function MyBatRes($no, $count, $skin) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; @@ -3101,7 +3123,7 @@ function MyBatLog($no, $count, $skin) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; @@ -3179,6 +3201,16 @@ function allButton($connect) { "; } +function getOnlineNumEx($db = NULL){ + if($db === NULL){ + $db = newDB(); + } + + return $db->queryFirstField('select `online` from `game` where `no`=1'); +} + + + function onlinenum($connect) { $query = "select online from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3517,6 +3549,43 @@ function CutDay($date) { return $date; } +function getPID(){ + //TODO: 서버마다 p_id가 다를 수 있도록 조치 + if(!isset($_SESSION['p_id'])){ + return NULL; + } + if($_SESSION['p_id']===''){ + return NULL; + } + return $_SESSION['p_id']; +} + +function increateRefreshEx($type, $cnt=1, $db=NULL){ + + if($db === NULL){ + $db = newDB(); + } + + $db->query("update `game` set `refresh` = `refresh` + %d_p_id where `no` = %d_cnt", array( + 'p_id'=>$p_id, + 'cnt'=>$cnt + )); + + $date = date('Y-m-d H:i:s'); + $p_id = getPID(); + if($p_id !== NULL){ + + $db->query("update `general` set `lastrefresh`= %s_date, `con` = `con`+%d_cnt, `connect`= `connect`+ %d_cnt, '\ + '`refcnt` = `refcnt` + %d_cnt, `refresh` = `refresh` + %d_cnt where `user_id` =%s_p_id",array( + 'date'=>$date, + 'cnt'=>$cnt, + 'p_id'=>$p_id + )); + } + + +} + function increaseRefresh($connect, $type="", $cnt=1) { $date = date('Y-m-d H:i:s'); @@ -3561,11 +3630,9 @@ function increaseRefresh($connect, $type="", $cnt=1) { if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}"; } if($str != "") { - $fp2 = fopen("logs/_{$date2}_ipcheck.txt", "a"); - $str = sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s", - $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str); - fwrite($fp2, $str."\r\n"); - fclose($fp2); + file_put_contents("logs/_{$date2}_ipcheck.txt", + sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\r\n", + $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND); } } diff --git a/twe/func_history.php b/twe/func_history.php index 35ce714c..6c87c1f7 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -34,7 +34,7 @@ function getGenHistory($count, $year, $month, $isFirst=0) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $log = explode("\r\n",$file); + $log = explode("\n",$file); $str = ""; $prefix = "{$month}월:"; diff --git a/twe/func_http.php b/twe/func_http.php index c809b579..75666281 100644 --- a/twe/func_http.php +++ b/twe/func_http.php @@ -27,7 +27,7 @@ class HTTP{ function Head($Url = "/") { $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("HEAD %s HTTP/%s\n", $this->Url, $this->HttpVersion); $msg .= $this->PutHead(); $msg .= "\n\n"; fputs($this->Socket, $msg); @@ -37,7 +37,7 @@ class HTTP{ function isHead($Url = "/"){ $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("HEAD %s HTTP/%s\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } @@ -50,7 +50,7 @@ class HTTP{ function GetHead($Url = "/") { $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); $msg .= $this->PutHead(); $msg .= "\n\n"; fputs($this->Socket, $msg); @@ -60,7 +60,7 @@ class HTTP{ function Get($Url = "/", $Cookie="") { $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } @@ -72,7 +72,7 @@ class HTTP{ function isGet($Url = "/", $Cookie=""){ $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } @@ -84,7 +84,7 @@ class HTTP{ function isGetAll($Url = "/", $Cookie=""){ $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } @@ -99,12 +99,12 @@ class HTTP{ function Post($Url, $Data, $Cookie = ""){ $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); + fputs ($this->Socket,sprintf("POST %s HTTP/%s\n", $this->Url, $this->HttpVersion)); if($Cookie != ""){ $this->PutCookie($Cookie); } $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); + fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\n"); $out = ""; while (list ($k, $v) = each ($Data)) { if(strlen($out) != 0) $out .= "&"; @@ -118,12 +118,12 @@ class HTTP{ function IsPost($Url, $Data, $Cookie = ""){ $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); + fputs ($this->Socket,sprintf("POST %s HTTP/%s\n", $this->Url, $this->HttpVersion)); if($Cookie != ""){ $this->PutCookie($Cookie); } $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); + fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\n"); $out = ""; while (list ($k, $v) = each ($Data)) { if(strlen($out) != 0) $out .= "&"; @@ -137,15 +137,15 @@ class HTTP{ function PutHead(){ $msg = ""; - $msg .= "Accept: */*\r\n"; - $msg .= "Accept-Language: ko\r\n"; - $msg .= "Accept-Encoding: gzip, deflate\r\n"; - $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\r\n"; + $msg .= "Accept: */*\n"; + $msg .= "Accept-Language: ko\n"; + $msg .= "Accept-Encoding: gzip, deflate\n"; + $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\n"; while (list($name, $value) = each ($this->headers)) { - $msg .= "$name: $value\r\n"; + $msg .= "$name: $value\n"; } - $msg .= "Host: ".$this->Server.":".$this->Port."\r\n"; - $msg .= "Connection: close\r\n"; + $msg .= "Host: ".$this->Server.":".$this->Port."\n"; + $msg .= "Connection: close\n"; return $msg; } diff --git a/twe/func_tournament.php b/twe/func_tournament.php index 3e3810bb..8f9c8412 100644 --- a/twe/func_tournament.php +++ b/twe/func_tournament.php @@ -169,7 +169,7 @@ function printFightLog($group) { $fp = @fopen("logs/fight{$group}.txt", "r"); $file = @fread($fp, 3000); @fclose($fp); - $log = explode("\r\n", $file); + $log = explode("\n", $file); $str = ""; for($i=0; $i < count($log); $i++) { $str .= ConvertLog($log[$i], 1)."
"; } return substr($str, 0, -4); @@ -179,7 +179,7 @@ function pushFightLog($group, $log) { $fp = fopen("logs/fight{$group}.txt", "w"); $size = count($log); for($i=0; $i < $size; $i++) { - fwrite($fp, $log[$i]."\r\n"); + fwrite($fp, $log[$i]."\n"); } fclose($fp); } diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 47ed124d..417209b3 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -3,35 +3,64 @@ include "lib.php"; include "func.php"; +require_once('func_message.php'); + + +$post = parseJsonPost(); + +if(!isset($post['genlist']) || !isset($post['msg'])){ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => '올바르지 않은 호출입니다.', + 'redirect' => NULL + ])); +} + + +$genlist = $post['genlist']; +$msg = $post['msg']; + //로그인 검사 -CheckLogin(1); +if(!CheckLoginEx()){ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => '로그인되지 않았습니다.', + 'redirect' => NULL + ])); +} + $connect = dbConn(); increaseRefresh($connect, "서신전달", 1); +//$msg,$genlist 두가지 값을 받 + if(CheckBlock($connect) == 1 || CheckBlock($connect) == 3) { - $msg = ""; - $genlist = 0; + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => '차단되었습니다.', + 'redirect' => NULL + ])); } -$query = "select conlimit from game where no=1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$admin = MYDB_fetch_array($result); +$db = newDB(); -$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where user_id='{$_SESSION['p_id']}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); -$con = checkLimit($me['userlevel'], $me['con'], $admin['conlimit']); +$conlimit = $db->queryFirstField("select conlimit from game where no=1"); + +$me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `user_id` = %s_p_id', + array('p_id'=>$_SESSION['p_id'])); + +$con = checkLimit($me['userlevel'], $me['con'], $conlimit); if($con >= 2) { - //echo ""; exit(); header('Content-Type: application/json'); - echo json_encode([ + die(json_encode([ 'result' => false, - 'reason' => '권한이 충분하지 않습니다.', - 'redirect' => 'main.php', - 'page_target' => 'top' - ]); - //echo 'main.php';//TODO:debug all and replace + 'reason' => '접속 제한입니다.', + 'redirect' => NULL + ])); } $msg = str_replace("|", "", $msg); diff --git a/twe/npc_login_process.php b/twe/npc_login_process.php index 9358d137..b45a79f7 100644 --- a/twe/npc_login_process.php +++ b/twe/npc_login_process.php @@ -55,7 +55,7 @@ if(!$me2) { $date2 = substr($date, 0, 10); $fp = fopen("logs/_{$date2}-login.txt", "a"); $msg = _String::Fill2($date,20," ")._String::Fill2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); - fwrite($fp, $msg."\r\n"); + fwrite($fp, $msg."\n"); fclose($fp); } From 8c3cc7649fce00c43db5b73be7b68b4091dcb46e Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 18:25:59 +0900 Subject: [PATCH 076/622] =?UTF-8?q?\r\n=20=EB=A7=88=EC=A0=80=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twe/func_message.php b/twe/func_message.php index d33d32a5..5fb6bcc1 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -195,7 +195,7 @@ function MsgFile($skin, $bg, $nation=0, $level=0) { @fseek($fp, -$count*300, SEEK_END); $file = @fread($fp, $count*300); @fclose($fp); - $code = explode("\r\n",$file); + $code = explode("\n",$file); for($i=0; $i < $count; $i++) { $msg = isset($code[count($code)-2-$i]) ? explode("|", $code[count($code)-2-$i]) : array(); From 67e2f8342e7f7f638cff0eaecb7d6b46c57c2414 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Jan 2018 18:26:15 +0900 Subject: [PATCH 077/622] =?UTF-8?q?\r\n=20=EB=A7=88=EC=A0=80=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 8 ++++---- twe/j_msgsubmit.php | 2 +- twe/login_process.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/twe/func.php b/twe/func.php index aa6d759e..a1b30d09 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3268,7 +3268,7 @@ function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $toc $fp = fopen("logs/{$file}", "a"); //로그 파일에 기록 $str = "{$type}|"._String::Fill($from,12," ")."|"._String::Fill($to,12," ")."|".$date."|".$msg."|".$fromcolor."|".$tocolor."|".$picture."|".$imgsvr; - fwrite($fp, "{$str}\r\n"); + fwrite($fp, "{$str}\n"); fclose($fp); } @@ -3604,7 +3604,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { $online = onlinenum($connect); $fp = fopen("logs/_{$date2}_refresh.txt", "a"); $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; - fwrite($fp, $msg."\r\n"); + fwrite($fp, $msg."\n"); fclose($fp); $proxy_headers = array( @@ -3631,7 +3631,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { } if($str != "") { file_put_contents("logs/_{$date2}_ipcheck.txt", - sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\r\n", + sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\n", $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND); } } @@ -3664,7 +3664,7 @@ function updateTraffic($connect) { $fp = fopen("logs/_traffic.txt", "a"); //일시|년|월|총갱신|접속자|최다갱신자 $msg = _String::Fill2($date,20," ")."|"._String::Fill2($game['year'],3," ")."|"._String::Fill2($game['month'],2," ")."|"._String::Fill2($game['refresh'],8," ")."|"._String::Fill2($online,5," ")."|"._String::Fill2($user['name']."(".$user['refresh'].")",20," "); - fwrite($fp, $msg."\r\n"); + fwrite($fp, $msg."\n"); fclose($fp); } diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 417209b3..9a868ac4 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -159,7 +159,7 @@ if($genlist == 9999 && str_replace(" ", "", $msg) != "") { $fp = fopen("logs/_gen_msg.txt", "a"); //로그 파일에 기록 - fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\r\n"); + fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\n"); fclose($fp); } diff --git a/twe/login_process.php b/twe/login_process.php index 2bf5bf91..18fcc6ff 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -63,7 +63,7 @@ $date = date('Y_m_d H:i:s'); $date2 = substr($date, 0, 10); $fp = fopen("logs/_{$date2}_login.txt", "a"); $msg = _String::Fill2($date,20," ").tab2($id,13," ")._String::Fill2($me['name'],13," ")._String::Fill2($_SESSION['p_ip'],16," "); -fwrite($fp, $msg."\r\n"); +fwrite($fp, $msg."\n"); fclose($fp); header ("Location: index.php"); From 82110d98ef68afdb7e557bdf3a64f5605fbb74f6 Mon Sep 17 00:00:00 2001 From: hide_d Date: Mon, 22 Jan 2018 02:05:08 +0900 Subject: [PATCH 078/622] =?UTF-8?q?=EA=B0=A0=EB=A9=94=20=EC=A0=84=EC=86=A1?= =?UTF-8?q?=20=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 36 ++++++ twe/j_msgsubmit.php | 283 ++++++++++++++++++++++++++++++-------------- 2 files changed, 233 insertions(+), 86 deletions(-) diff --git a/twe/func.php b/twe/func.php index a1b30d09..fe11774f 100644 --- a/twe/func.php +++ b/twe/func.php @@ -3582,6 +3582,42 @@ function increateRefreshEx($type, $cnt=1, $db=NULL){ 'p_id'=>$p_id )); } + + $date = date('Y_m_d H:i:s'); + $date2 = substr($date, 0, 10); + $online = onlinenum($connect); + $fp = fopen("logs/_{$date2}_refresh.txt", "a"); + $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; + fwrite($fp, $msg."\n"); + fclose($fp); + + $proxy_headers = array( + 'HTTP_VIA', + 'HTTP_X_FORWARDED_FOR', + 'HTTP_FORWARDED_FOR', + 'HTTP_X_FORWARDED', + 'HTTP_FORWARDED', + 'HTTP_CLIENT_IP', + 'HTTP_FORWARDED_FOR_IP', + 'VIA', + 'X_FORWARDED_FOR', + 'FORWARDED_FOR', + 'X_FORWARDED', + 'FORWARDED', + 'CLIENT_IP', + 'FORWARDED_FOR_IP', + 'HTTP_PROXY_CONNECTION' + ); + + $str = ""; + foreach($proxy_headers as $x) { + if(isset($_SERVER[$x])) $str .= "//{$x}:{$_SERVER[$x]}"; + } + if($str != "") { + file_put_contents("logs/_{$date2}_ipcheck.txt", + sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\n", + $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND); + } } diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 9a868ac4..86933be3 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -3,6 +3,7 @@ include "lib.php"; include "func.php"; +require_once('../e_lib/util.php'); require_once('func_message.php'); @@ -18,11 +19,13 @@ if(!isset($post['genlist']) || !isset($post['msg'])){ } -$genlist = $post['genlist']; +$dest = $post['dest']; $msg = $post['msg']; +$datetime = new DateTime(); +$date = $datetime->format('Y-m-d H:i:s'); //로그인 검사 -if(!CheckLoginEx()){ +if(!CheckLoginEx($db)){ header('Content-Type: application/json'); die(json_encode([ 'result' => false, @@ -31,6 +34,9 @@ if(!CheckLoginEx()){ ])); } + +$db = newDB(); + $connect = dbConn(); increaseRefresh($connect, "서신전달", 1); @@ -45,7 +51,7 @@ if(CheckBlock($connect) == 1 || CheckBlock($connect) == 3) { ])); } -$db = newDB(); + $conlimit = $db->queryFirstField("select conlimit from game where no=1"); @@ -63,104 +69,209 @@ if($con >= 2) { ])); } +//FIXME: 원래는 필요없는 값이지만 예전 코드와 꼬일 수 있어 유지함. $msg = str_replace("|", "", $msg); + +//TODO: 몰라서 임시로 값 세팅해봄. 추후에 용도를 확인하고 수정 필요 +//$s = 50; +//$msg = _String::SubStrForWidth($msg, $s, 198); + +//SubStrForWidth는 반각은 1, 전각은 2로 측정하는듯 보이나, 대부분 글자수 단위로 카운트 하고 있어 mb_substr로 처리함. +$msg = mb_substr($msg, 0, 99, 'UTF-8'); $msg = trim($msg); -//TODO : 몰라서 임시로 값 세팅해봄. 추후에 용도를 확인하고 수정 필요 -$s = 50; -$msg = _String::SubStrForWidth($msg, $s, 198); +if($msg == ''){ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => true, + 'reason' => 'SUCCESS', + 'redirect' => 'msglist.php', + 'page_target' => '#msglist' + ])); +} -$date = date('Y-m-d H:i:s'); +$src = $me['no']; +$src_name = $me['name']; +$src_icon = $me['picture']; +$src_nation_id = $me['nation']; +if($src_nation_id == 0) { + $src_nation = '재야'; + $src_color = '#FFFFFF'; +} +else{ + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( + 'nation' => $src_nation_id + )); + $src_nation = $nation['name']; + $src_color = '#'.$nation['color']; + $src_color = str_replace('##', '#', $src_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 +} // 전체 메세지 -if($genlist == 9999 && str_replace(" ", "", $msg) != "") { - //echo ''; - if($me['nation'] == 0) { - $nation['name'] = '재야'; - $nation['color'] = 'FFFFFF'; - } else { - $query = "select nation,name,color from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - PushMsg(1, 0, $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $nation['name'], $nation['color'], $msg); +if($dest == 9999) { + + $db->insert('message', array( + 'address' => $dest, + 'type' => 'global', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'message' => $msg + )); + + //PushMsg(1, 0, $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $nation['name'], $nation['color'], $msg); // 국가 메세지 -} elseif($genlist >= 9000 && $msg != "") { - if($me['nation'] == 0) { - $nation['name'] = '재야'; - $nation['color'] = 'FFFFFF'; - $nation['nation'] = 0; - } else { - $query = "select nation,name,color from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - } - - $genlist -= 9000; +} elseif($dest >= 9000) { + $real_nation = $dest - 9000; $query = "select nation,name,color from nation where nation='$genlist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $dest = MYDB_fetch_array($result); + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( + 'nation' => $real_nation + )); - //$dest가 없다는건 수신도 재야. - if(empty($dest)){ - $dest['name'] = '재야'; - $dest['color'] = 'FFFFFF'; - $dest['nation'] = 0; + if($nation === NULL || empty($nation)){ + $dest = 9998; + $dest_nation = '재야'; + $dest_color = '#FFFFFF'; + } + else{ + $dest_nation = $nation['name']; + $dest_color = '#'.$nation['color']; + $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 } - if($nation['nation'] == $dest['nation']) { - PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:", $nation['color'], $dest['name'], $dest['color'], $msg); - } else { - //타국에 보내는 경우 - PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); - // 수뇌이면 발송, 아니면 자국으로 돌림 - if($me['level'] >= 5) { - PushMsg(3, $dest['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], $msg); - } else { - PushMsg(2, $nation['nation'], $me['picture'], $me['imgsvr'], "{$me['name']}:{$nation['name']}▶", $nation['color'], $dest['name'], $dest['color'], "반송"); - } + + if($nation['nation'] == $me['nation'] || $me['level'] < 5){ + $db->insert('message', array( + 'address' => $dest, + 'type' => 'receive_nation', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'dest_nation' => $dest_nation, + 'dest_color' => $dest_color, + 'message' => $msg + )); } + else{ + $db->insert('message', array( + 'address' => $src_nation_id + 9000, + 'type' => 'send_nation', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'dest_nation' => $dest_nation, + 'dest_color' => $dest_color, + 'message' => $msg + )); + $db->insert('message', array( + 'address' => $dest, + 'type' => 'receive_nation', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'dest_nation' => $dest_nation, + 'dest_color' => $dest_color, + 'message' => $msg + )); + } + // 개인 메세지 -} elseif($genlist > 0 && $msg != "") { - $query = "select name,msgindex from general where no='$genlist'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $you = MYDB_fetch_array($result); - //발신, 수신인 코딩 - $who = $me['no'] * 10000 + $genlist; +} elseif($dest > 0) { + $last_msg = new DateTime(util::array_get($_SESSION['last_msg'], '0000-00-00')); - $msg = addslashes(SQ2DQ($msg)); - - $query = "select msg{$me['msgindex']}_when as priv_when from general where no='{$me['no']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $prev_msg = MYDB_fetch_array($result); - $diff_second = strtotime($date) - strtotime($prev_msg['priv_when']); - - if($diff_second < 3) { - $who = 1 * 10000 + $me['no']; // 운영자가 본인에게 - $msg = "개인메세지는 3초당 1건만 보낼 수 있습니다!"; - //자신에게 표시 - $me['msgindex']++; - if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } - $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='10',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date',newmsg=1 where no='{$me['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - } else { - //자신에게 표시 - $me['msgindex']++; - if($me['msgindex'] >= 10) { $me['msgindex'] = 0; } - $query = "update general set msgindex='{$me['msgindex']}',msg{$me['msgindex']}='$msg',msg{$me['msgindex']}_type='9',msg{$me['msgindex']}_who='$who',msg{$me['msgindex']}_when='$date' where no='{$me['no']}'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - - // 상대에게 발송 - $you['msgindex']++; - if($you['msgindex'] >= 10) { $you['msgindex'] = 0; } - $query = "update general set msgindex='{$you['msgindex']}',msg{$you['msgindex']}='$msg',msg{$you['msgindex']}_type='10',msg{$you['msgindex']}_who='$who',msg{$you['msgindex']}_when='$date',newmsg=1 where no='$genlist'"; - MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $msg_interval = $datetime->getTimestamp() - $last_msg->getTimestamp(); + if($msg_interval < 2){ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => "개인메세지는 2초당 1건만 보낼 수 있습니다!", + 'redirect' => NULL + ])); } - - $fp = fopen("logs/_gen_msg.txt", "a"); - //로그 파일에 기록 - fwrite($fp, _String::Fill($me['name'],12," ")." > "._String::Fill($you['name'],12," ")." | {$msg}\n"); - fclose($fp); + + $_SESSION['last_msg'] = $date; + + $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s_p_id',array( + 'p_id'=>$dest)); + + if($dest_user == NULL || empty($dest_user)){ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => '존재하지 않는 유저입니다.', + 'redirect' => NULL + ])); + } + + $dest_name = $dest_user['name']; + if($dest_user['nation'] == 0){ + $dest_nation = $nation['name']; + $dest_color = '#'.$nation['color']; + $dest_color = str_replace('##', '#', $dest_color); + } + else{ + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( + 'nation' => $dest_user['nation'] + )); + $dest_nation = $nation['name']; + $dest_color = '#'.$nation['color']; + $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비 + } + + $db->insert('message', array( + 'address' => $src_nation_id + 9000, + 'type' => 'send', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'dest_name' => $dest_name, + 'dest_nation' => $dest_nation, + 'dest_color' => $dest_color, + 'message' => $msg + )); + $db->insert('message', array( + 'address' => $dest, + 'type' => 'receive', + 'src' => $src, + 'dest' => $dest, + 'time' => $date, + 'src_name' => $src_name, + 'src_nation' => $src_nation, + 'src_color' => $src_color, + 'src_icon' => $src_icon, + 'dest_name' => $dest_name, + 'dest_nation' => $dest_nation, + 'dest_color' => $dest_color, + 'message' => $msg + )); +} +else{ + header('Content-Type: application/json'); + die(json_encode([ + 'result' => false, + 'reason' => "알 수 없는 에러", + 'redirect' => NULL + ])); } //echo ""; From 86dfbe6bec9270d3380aff7aaaa4f38fab39bf6c Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 27 Jan 2018 06:04:24 +0900 Subject: [PATCH 079/622] =?UTF-8?q?=EC=97=B0=EA=B0=90=EC=9D=B4=2062che.com?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=A7=8C=20=EB=8F=99=EC=9E=91=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_history.php | 17 ++++++++++--- twe/func_http.php | 59 ++++++++++++++++++++++---------------------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/twe/func_history.php b/twe/func_history.php index 6c87c1f7..1c393bf1 100644 --- a/twe/func_history.php +++ b/twe/func_history.php @@ -1,4 +1,5 @@ GetError()); if($http->GetErr() == true) { return false; } $http->setHttpVersion("1.1"); $cookie = ""; - $http->Get($url, $cookie); + $http->Get($map_path, $cookie); if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', Response end, '.$http->GetError()); if($http->GetErr() == true) { return false; } $map = $http->Response["body"]; diff --git a/twe/func_http.php b/twe/func_http.php index 75666281..2afb45bc 100644 --- a/twe/func_http.php +++ b/twe/func_http.php @@ -27,9 +27,9 @@ class HTTP{ function Head($Url = "/") { $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); return $this->Read(); @@ -37,12 +37,12 @@ class HTTP{ function isHead($Url = "/"){ $this->Url = $Url; - $msg = sprintf("HEAD %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("HEAD %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); return $this->isOK(); @@ -50,9 +50,9 @@ class HTTP{ function GetHead($Url = "/") { $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); $out = $this->ReadHeader(); return $out; @@ -60,36 +60,36 @@ class HTTP{ function Get($Url = "/", $Cookie="") { $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); return $this->Read(); } function isGet($Url = "/", $Cookie=""){ $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); return $this->isOK(); } function isGetAll($Url = "/", $Cookie=""){ $this->Url = $Url; - $msg = sprintf("GET %s HTTP/%s\n", $this->Url, $this->HttpVersion); + $msg = sprintf("GET %s HTTP/%s\r\n", $this->Url, $this->HttpVersion); if($Cookie != ""){ $msg .= $this->PutCookie($Cookie); } $msg .= $this->PutHead(); - $msg .= "\n\n"; + $msg .= "\r\n\r\n"; fputs($this->Socket, $msg); $data = $this->Read(); @@ -99,53 +99,53 @@ class HTTP{ function Post($Url, $Data, $Cookie = ""){ $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\n", $this->Url, $this->HttpVersion)); + fputs($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); if($Cookie != ""){ $this->PutCookie($Cookie); } $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\n"); + fputs($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); $out = ""; while (list ($k, $v) = each ($Data)) { if(strlen($out) != 0) $out .= "&"; $out .= rawurlencode($k). "=" .rawurlencode($v); } - fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); - fputs ($this->Socket, "$out"); - fputs ($this->Socket, "\n"); + fputs($this->Socket, "Content-length: ".strlen($out)."\r\n"); + fputs($this->Socket, "$out"); + fputs($this->Socket, "\r\n"); return $this->Read(); } function IsPost($Url, $Data, $Cookie = ""){ $this->Url = $Url; - fputs ($this->Socket,sprintf("POST %s HTTP/%s\n", $this->Url, $this->HttpVersion)); + fputs($this->Socket,sprintf("POST %s HTTP/%s\r\n", $this->Url, $this->HttpVersion)); if($Cookie != ""){ $this->PutCookie($Cookie); } $this->PutHead(); - fputs ($this->Socket, "Content-type: application/x-www-form-urlencoded\n"); + fputs($this->Socket, "Content-type: application/x-www-form-urlencoded\r\n"); $out = ""; while (list ($k, $v) = each ($Data)) { if(strlen($out) != 0) $out .= "&"; $out .= rawurlencode($k). "=" .rawurlencode($v); } - fputs ($this->Socket, "Content-length: ".strlen($out)."\n\n"); - fputs ($this->Socket, "$out"); - fputs ($this->Socket, "\n"); + fputs($this->Socket, "Content-length: ".strlen($out)."\r\n\r\n"); + fputs($this->Socket, "$out"); + fputs($this->Socket, "\r\n"); return $this->isOk(); } function PutHead(){ $msg = ""; - $msg .= "Accept: */*\n"; - $msg .= "Accept-Language: ko\n"; - $msg .= "Accept-Encoding: gzip, deflate\n"; - $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\n"; + $msg .= "Accept: */*\r\n"; + $msg .= "Accept-Language: ko\r\n"; + $msg .= "Accept-Encoding: gzip, deflate\r\n"; + $msg .= "User-Agent: Mozilla/4.0 (compatible; 62che)\r\n"; while (list($name, $value) = each ($this->headers)) { - $msg .= "$name: $value\n"; + $msg .= "$name: $value\r\n"; } - $msg .= "Host: ".$this->Server.":".$this->Port."\n"; - $msg .= "Connection: close\n"; + $msg .= "Host: ".$this->Server.":".$this->Port."\r\n"; + $msg .= "Connection: close\r\n"; return $msg; } @@ -173,6 +173,7 @@ class HTTP{ $chunked = isset($this->Response['transfer-encoding']) && ('chunked' == $this->Response['transfer-encoding']); $gzipped = isset($this->Response['content-encoding']) && ('gzip' == $this->Response['content-encoding']); $body = ''; + $this->_chunkLength = 0; while(!feof($this->Socket)){ if ($chunked) { $buf = $this->_readChunked(); From 2037e9b6af0e6d84021b59cabd8a034a5dafd651 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 27 Jan 2018 06:18:07 +0900 Subject: [PATCH 080/622] =?UTF-8?q?=EB=93=B1=EC=9A=A9=EC=9E=A5=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i_other/help.php | 2 +- twe/d_scout.php | 6 ++++++ twe/func.php | 10 +++++++++- twe/func_process.php | 3 +++ twe/process_war.php | 4 ++++ twe/processing.php | 7 +++++-- 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/i_other/help.php b/i_other/help.php index 9b11f46d..8e3e85bf 100644 --- a/i_other/help.php +++ b/i_other/help.php @@ -730,7 +730,7 @@ if($category == 0) {  소집해제: 현재 소유중인 병사를 해체하고 주민으로 돌려보냅니다.
 ---------- 인 사 ----------
   이동: 인접 도시로 이동합니다.
-   등용: 재야나 타국의 장수를 등용합니다. 서신은 개인메세지로 도착하며 상대 장수가 수락,거절을 하게 됩니다.
+     집합: 현재 도시로 부대원들을 집합합니다. 부대장만 가능합니다.
   귀환: 태수, 군사, 시중인 경우 자신의 도시로 귀환합니다.
   임관: 국가에 사관을 합니다. 대상 국가의 군주가 있는 장소로 바로 이동합니다. 재야만 가능합니다.
diff --git a/twe/d_scout.php b/twe/d_scout.php index 95160cc6..cb60b92e 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -1,7 +1,13 @@ location.replace('msglist.php');"); + include "lib.php"; include "func.php"; //로그인 검사 + CheckLogin(1); $connect = dbConn(); diff --git a/twe/func.php b/twe/func.php index fe11774f..e00ae639 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1438,6 +1438,7 @@ function getTurn($connect, $general, $type, $font=1) { $str[$i] = "【{$city['name']}】(으)로 이동"; break; case 22: //등용 + //TODO:등용장 재디자인 $double = $command[1]; $query = "select name from general where no='$double'"; @@ -2299,11 +2300,15 @@ function commandTable($connect) { } else { addCommand("인재탐색(랜덤경험, 자금$develcost)", 29, 0); } + //TODO:등용장 재 디자인 + //xxx:등용장 일단 끔 + /* if($me['level'] >= 1 && $city['supply'] != 0) { addCommand("등용(자금{$develcost5}+장수가치)", 22); } else { addCommand("등용(자금{$develcost5}+장수가치)", 22, 0); } + */ if($me['no'] == $troop['no'] && $citycount > 0 && $city['supply'] != 0 && $city['nation'] == $me['nation']) { addCommand("집합(통솔경험)", 26); } else { @@ -5474,7 +5479,7 @@ function processCommand($connect, $no) { case 17: process_17($connect, $general); break; //소집해제 case 21: process_21($connect, $general); break; //이동 - case 22: process_22($connect, $general); break; //등용 + //case 22: process_22($connect, $general); break; //등용 //TODO:등용장 재 디자인 case 25: process_25($connect, $general); break; //임관 case 26: process_26($connect, $general); break; //집합 case 28: process_28($connect, $general); break; //귀환 @@ -7205,6 +7210,9 @@ function getRandTurn2($term) { } function ScoutMsg($connect, $genNum, $nationName, $who, $msgIndex) { + return; + //TODO: 등용장 재 디자인. + //xxx: 일단 껐음 // 상대에게 발송 $msgIndex++; if($msgIndex >= 10) { $msgIndex = 0; } diff --git a/twe/func_process.php b/twe/func_process.php index 7a9fe355..019e12f0 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -1319,6 +1319,9 @@ function process_21($connect, &$general) { } function process_22($connect, &$general) { + return; + //TODO: 등용장 재 디자인 + //xxx: 일단 등용장 끔 $log = array(); $alllog = array(); $date = substr($general['turntime'],11,5); diff --git a/twe/process_war.php b/twe/process_war.php index 11188a94..905a145f 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -1666,6 +1666,9 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { $loseGeneralGold += $loseGold; $loseGeneralRice += $loseRice; + /* + //TODO:등용장 재디자인 + //xxx: 일단 끔 //모두 등용장 발부 if($nation['name'] == "강족" || $nation['name'] == "저족" || $nation['name'] == "흉노족" || $nation['name'] == "남만족" || $nation['name'] == "산월족" || $nation['name'] == "오환족" @@ -1674,6 +1677,7 @@ function ConquerCity($connect, $game, $general, $city, $nation, $destnation) { } elseif(rand() % 100 < 50) { ScoutMsg($connect, $ruler['no'], $nation['name'], $gen['no'], $gen['msgindex']); } + */ //NPC인 경우 10% 확률로 임관(엔장, 인재, 의병) if($gen['npc'] >= 2 && $gen['npc'] <= 4 && rand() % 100 < 10) { diff --git a/twe/processing.php b/twe/processing.php index 4a1ce5a4..2fd01070 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -43,12 +43,12 @@ switch($commandtype) { case 12: command_12($connect, $turn, 12); break; //모병 case 13: command_Single($connect, $turn, 13); break; //훈련 case 14: command_Single($connect, $turn, 14); break; //사기진작 - case 15: command_Single($connect, $turn, 0); break; //전투태세 + //case 15: command_Single($connect, $turn, 0); break; //전투태세 case 16: command_16($connect, $turn, 16); break; //전쟁 case 17: command_Single($connect, $turn, 17); break; //소집해제 case 21: command_21($connect, $turn, 21); break; //이동 - case 22: command_22($connect, $turn, 22); break; //등용 + //case 22: command_22($connect, $turn, 22); break; //등용 //TODO:등용장 재 디자인 case 23: command_23($connect, $turn, 23); break; //포상 case 24: command_24($connect, $turn, 24); break; //몰수 case 25: command_25($connect, $turn, 25); break; //임관 @@ -102,6 +102,8 @@ switch($commandtype) { case 78: command_78($connect, $turn, 78); break; //급습 case 81: command_81($connect, $turn, 81); break; //국기변경 case 99: command_99($connect, $turn); break; //수뇌부 휴식 + + default:command_Single($connect, $turn, 0); break; //휴식 } function starter($name, $type=0) { @@ -1189,6 +1191,7 @@ function command_21($connect, $turn, $command) { } function command_22($connect, $turn, $command) { + die('비활성화됨');//TODO:등용장 대 디자인 starter("등용"); $query = "select nation from general where user_id='{$_SESSION['p_id']}'"; From dd2f45c5bda47e128030097fe08a2eb70144eda0 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 27 Jan 2018 06:34:13 +0900 Subject: [PATCH 081/622] =?UTF-8?q?=EC=9C=A0=EC=A0=80=EC=9E=A5=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B1=B0=EC=83=81=20=EC=82=AD=EC=A0=9C.=20NPC?= =?UTF-8?q?=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20=EC=95=84=EC=A7=81=20=EB=82=A8?= =?UTF-8?q?=EA=B2=A8=EB=91=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func.php | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/twe/func.php b/twe/func.php index e00ae639..1e6b4fee 100644 --- a/twe/func.php +++ b/twe/func.php @@ -9,6 +9,11 @@ include "func_auction.php"; include "func_string.php"; include "func_history.php"; require_once("func_message.php"); + +/// 0.0~1.0 사이의 랜덤 float +function randF(){ + return mt_rand() / mt_getrandmax(); +} // 37.5 ~ 75 function abilityRand() { $total = 150; @@ -465,34 +470,34 @@ function SpecCall($call) { function getSpecial($connect, $leader, $power, $intel) { //통장 if($leader*0.9 > $power && $leader*0.9 > $intel) { - $type = array(20, 30, 31); - $special = $type[rand()%3]; - // 거상, 귀모는 33% * 6% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 6) { + $type = array(20, 31); + $special = array_rand($type); + // 귀모는 50% * 5% = 2.5% + if($special == 31 && randF() < 0.05) { $type = array(20, 20); - $special = $type[rand()%2]; + $special = array_rand($type); } //무장 } elseif($power >= $intel) { - $type = array(10, 11, 12, 30, 31); - $special = $type[rand()%5]; - // 거상, 귀모는 그중에 20% * 10% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 10) { + $type = array(10, 11, 12, 31); + $special = array_rand($type); + // 귀모는 그중에 25% * 10% = 2.5% + if(($special == 30 || $special == 31) && randF() < 0.05) { $type = array(10, 11, 12); - $special = $type[rand()%3]; + $special = array_rand($type); } //지장 } elseif($intel > $power) { - $type = array(1, 2, 3, 30, 31); - $special = $type[rand()%5]; - // 거상, 귀모는 그중에 20% * 10% = 2% - if(($special == 30 || $special == 31) && rand()%100 > 10) { + $type = array(1, 2, 3, 31); + $special = array_rand($type); + // 거상, 귀모는 그중에 25% * 10% = 2.5% + if($special == 31 && randF() < 0.05) { $type = array(1, 2, 3); - $special = $type[rand()%3]; + $special = array_rand($type); } } else { - $type = array(30, 31); - $special = $type[rand()%2]; + //귀모. 다만 이쪽으로 빠지지 않음. + $type = 31; } return $special; } From 3f38b6b67587d560a818c7d103d79c166a76133d Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 27 Jan 2018 06:42:52 +0900 Subject: [PATCH 082/622] =?UTF-8?q?=EC=88=98=EB=B9=84,=20=EC=84=B1?= =?UTF-8?q?=EB=B2=BD=20=EA=B0=95=ED=99=94=EC=9D=98=20=EC=84=B1=EA=B3=B5?= =?UTF-8?q?=EC=9D=84=20=EB=AC=B4=EB=A0=A5=20=EA=B8=B0=EC=A4=80=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=98=AC=EB=B0=94=EB=A5=B4=EA=B2=8C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_process.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twe/func_process.php b/twe/func_process.php index 019e12f0..fffbff89 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -394,7 +394,7 @@ function process_5($connect, &$general, $type) { if($general['level'] == 4 && $general['no'] == $city['gen1']) { $score *= 1.05; } $rd = rand() % 100; // 현재 20% - $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 0); + $r = CriticalRatio($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book']), 1); // 특기보정 : 수비, 축성 if($type == 1 && $general['special'] == 11) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } if($type == 2 && $general['special'] == 10) { $r['succ'] += 10; $score *= 1.1; $admin['develcost'] *= 0.8; } From 3ecee6a9e852057f7f45cba932180fa2b8df0aa2 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 27 Jan 2018 07:05:52 +0900 Subject: [PATCH 083/622] =?UTF-8?q?=ED=95=84=EC=82=B4=20=ED=99=95=EB=A5=A0?= =?UTF-8?q?=EC=9D=84=2015%=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_simul.php | 6 +++--- twe/process_war.php | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/twe/_simul.php b/twe/_simul.php index 2ec1a276..62611eb1 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -250,7 +250,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general['leader'], $general['power'], $general['intel']); + $ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']); if($ratio >= $rd && $avoid == 1) { $msg .= "필살공격!
"; $cityCrew = CriticalScore2($cityCrew); @@ -606,7 +606,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general['leader'], $general['power'], $general['intel']); + $ratio = CriticalRatio3($general['leader'], $general['power'], $general['intel']); if($ratio >= $rd && $myAvoid == 1) { $msg .= "필살공격!
"; $opCrew = CriticalScore2($opCrew); @@ -614,7 +614,7 @@ if($isgen == "장수공격" || $isgen == "성벽공격" || $isgen == "장수평 } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose['leader'], $oppose['power'], $oppose['intel']); + $ratio = CriticalRatio3($oppose['leader'], $oppose['power'], $oppose['intel']); if($ratio >= $rd && $opAvoid == 1) { $msg .= "●상대의 필살공격!
"; $myCrew = CriticalScore2($myCrew); diff --git a/twe/process_war.php b/twe/process_war.php index 905a145f..2b172074 100644 --- a/twe/process_war.php +++ b/twe/process_war.php @@ -273,7 +273,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); + $ratio = CriticalRatio3($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 if($general['special2'] == 61) { $ratio += 10; } if($general['special2'] == 71) { $ratio += 20; } @@ -1030,7 +1030,7 @@ function processWar($connect, $general, $city) { //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); + $ratio = CriticalRatio3($general['leader']+getHorseEff($general['horse'])+$lbonus, $general['power']+getWeapEff($general['weap']), $general['intel']+getBookEff($general['book'])); // 특기보정 : 무쌍, 필살 if($general['special2'] == 61) { $ratio += 10; } if($general['special2'] == 71) { $ratio += 20; } @@ -1052,7 +1052,7 @@ function processWar($connect, $general, $city) { } //크리 $rd = rand() % 100; // 0 ~ 99 - $ratio = CriticalRatio2($oppose['leader']+getHorseEff($oppose['horse'])+$opplbonus, $oppose['power']+getWeapEff($oppose['weap']), $oppose['intel']+getBookEff($oppose['book'])); + $ratio = CriticalRatio3($oppose['leader']+getHorseEff($oppose['horse'])+$opplbonus, $oppose['power']+getWeapEff($oppose['weap']), $oppose['intel']+getBookEff($oppose['book'])); // 특기보정 : 필살 if($oppose['special2'] == 71) { $ratio += 20; } if($ratio >= $rd && $opAvoid == 1) { @@ -1436,6 +1436,10 @@ function processWar($connect, $general, $city) { return $deadAmount; } +function CriticalRatio3($leader, $power, $intel) { + return 15; //15% 고정 +} + function CriticalRatio2($leader, $power, $intel) { // 707010장수 9% 706515장수 17% 706020장수 25% xx50xx장수 57% if($leader <= $power && $leader <= $intel) { // 통솔이 제일 낮은경우 From 9b45ca41fa954e676f9b6aad4b5bd4f8d1eb42f3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 03:44:27 +0900 Subject: [PATCH 084/622] =?UTF-8?q?=EB=A9=94=EC=8B=9C=EC=A7=80=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20template=20=EC=A4=80=EB=B9=84=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_message.php | 2 ++ twe/func_string.php | 1 + twe/msglist.php | 1 + twe/templates/msg_plate.php | 47 +++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 twe/templates/msg_plate.php diff --git a/twe/func_message.php b/twe/func_message.php index 5fb6bcc1..22ab9c81 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -318,7 +318,9 @@ function MsgDip($connect, $bg) { if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } } +function ShowMsgEx($msgType, $src, $dest, $msg, $datetime){ +} function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { if($msg == "") return; diff --git a/twe/func_string.php b/twe/func_string.php index 75ca9561..e804e52b 100644 --- a/twe/func_string.php +++ b/twe/func_string.php @@ -32,6 +32,7 @@ function Tag2Code($str) { } function BadTag2Code($str) { + /* FIXME: 제대로된 tag 변환 코드 사용 */ $str = str_replace(" + + bgcolor="#CC6600" + + bgcolor="#000055" + + bgcolor="#336600" + + style="font-size:13;table-layout:fixed;word-break:break-all;" + data-num="" +> + + + + +
+ + + + + + + + [ + : + ▶ + : + ] + + [ + : + ] + + <> +
+ +
\ No newline at end of file From 221652405fb1b90b1694c960c3e794e01be97520 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 04:09:33 +0900 Subject: [PATCH 085/622] =?UTF-8?q?template=EC=99=80=20message=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4=20=EB=B3=80=EC=88=98=EA=B0=80=20=EC=9D=BC?= =?UTF-8?q?=EC=B9=98=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_message.php | 60 ++++++++++++++++++++++--------------- twe/templates/msg_plate.php | 26 +++++++++------- 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/twe/func_message.php b/twe/func_message.php index 22ab9c81..8a12ce21 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -1,48 +1,60 @@ id = $row['id']; - $this->address = $row['address']; - $this->type = $row['type']; - $this->src = $row['src']; - $this->dest = $row['dest']; - $this->time = $row['time']; - $this->message = $row['message']; + $this->raw_type = $row['type']; - $this->src_name = $row['src_name']; + $this->id = $row['id']; + $this->mailbox = $row['mailbox']; + + if($this->rawType === 'public'){ + $this->type = 'public'; + } + else if(util::ends_with($this->rawType, 'national')){ + $this->type = 'national'; + } + else{ + $this->type = 'private'; + } + + $this->src = [ + 'id' => $row['src'], + 'name' => $row['src_name'], + 'nation' => $row['src_nation'], + 'color' => $row['src_color'] + ]; + $this->dest = [ + 'id' => $row['dest'], + 'name' => $row['dest_name'], + 'nation' => $row['dest_nation'], + 'color' => $row['dest_color'] + ]; + $this->datetime = $row['time']; + $this->message = $row['message']; } } -function getRawMessage($address, $limit=30, $fromTime=NULL){ - //'select * from `message` where `address` = 90 and `time` < "2018-01-21 04:47:20" ORDER BY `time` desc LIMIT 3 '; +function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ + //'select * from `message` where `mailbox` = 90 and `time` < "2018-01-21 04:47:20" ORDER BY `time` desc LIMIT 3 '; - $sql = 'select * from `message` where `address` = %d_address'; + $sql = 'select * from `message` where `mailbox` = %d_mailbox'; if($fromTime !== NULL){ $sql .= ' and `time` <= %s_time'; } @@ -55,7 +67,7 @@ function getRawMessage($address, $limit=30, $fromTime=NULL){ $db = newDB(); //TODO: table 네임의 prefix를 처리할 수 있도록 개선 $result = $db->query($sql, array( - 'address' => $address, + 'mailbox' => $mailbox, 'limit' => $limit, 'time' => $fromTime )); @@ -319,7 +331,7 @@ function MsgDip($connect, $bg) { } function ShowMsgEx($msgType, $src, $dest, $msg, $datetime){ - + new Plates('templates'); } function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { diff --git a/twe/templates/msg_plate.php b/twe/templates/msg_plate.php index fe3dda84..29383057 100644 --- a/twe/templates/msg_plate.php +++ b/twe/templates/msg_plate.php @@ -11,18 +11,18 @@ cellspacing="0" bgcolor="#CC6600" - - bgcolor="#000055" - - bgcolor="#336600" + + bgcolor="#336600" + + bgcolor="#000055" style="font-size:13;table-layout:fixed;word-break:break-all;" - data-num="" + data-id="" > - + @@ -30,18 +30,24 @@ [ - : + e($src['name'])?>:e($src['nation'])?> ▶ - : + e($dest['name'])?>:e($dest['nation'])?> + ] + + [ + e($src['name'])?>:e($src['nation'])?> + ▶ + e($dest['nation'])?> ] [ - : + e($src['name'])?>:e($src['nation'])?> ] <>
- + e($message)?> \ No newline at end of file From 0c0c4fa5478134b3679320363ae932a916879d3b Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 04:17:13 +0900 Subject: [PATCH 086/622] =?UTF-8?q?newDB=20=ED=95=A8=EC=88=98=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=8B=9C=20static=20=EB=B3=80=EC=88=98=EB=A1=9C=20DB?= =?UTF-8?q?=20Object=EB=A5=BC=20=EB=B3=B4=EA=B4=80=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=84=A4=EC=A0=95.=20=20=EB=AA=A8=EB=93=A0=20updat?= =?UTF-8?q?e=20=EB=AA=85=EB=A0=B9=EC=9D=80=20global=20lock=20=ED=95=98?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=ED=86=B5=EC=A0=9C=EB=90=98=EB=AF=80?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=20=EB=B0=A9=EC=8B=9D=EC=9D=84=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88=EC=9D=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- d_setting/conf.orig.php | 8 +++++++- twe/d_setting/conf.orig.php | 8 +++++++- twe/func_message.php | 26 ++++++++++++++++++++++---- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/d_setting/conf.orig.php b/d_setting/conf.orig.php index 9e45ba67..e566e043 100644 --- a/d_setting/conf.orig.php +++ b/d_setting/conf.orig.php @@ -17,7 +17,13 @@ function newRootDB(){ $port = _port_; $encoding = 'utf8'; - return new MeekroDB($host,$user,$password,$dbName,$port,$encoding); + static $uDB = NULL; + + if($uDB === NULL){ + $uDB = new MeekroDB($host,$user,$password,$dbName,$port,$encoding); + } + + return $uDB; } function newMailObj(){ diff --git a/twe/d_setting/conf.orig.php b/twe/d_setting/conf.orig.php index 03fb571c..6d58362d 100644 --- a/twe/d_setting/conf.orig.php +++ b/twe/d_setting/conf.orig.php @@ -14,5 +14,11 @@ function newDB(){ $port = _port_; $encoding = 'utf8'; - return new MeekroDB($host,$user,$password,$dbName,$port,$encoding); + static $uDB = NULL; + + if($uDB === NULL){ + $uDB = new MeekroDB($host,$user,$password,$dbName,$port,$encoding); + } + + return $uDB; } \ No newline at end of file diff --git a/twe/func_message.php b/twe/func_message.php index 8a12ce21..c593bc46 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -66,11 +66,11 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ $db = newDB(); //TODO: table 네임의 prefix를 처리할 수 있도록 개선 - $result = $db->query($sql, array( + $result = $db->query($sql, [ 'mailbox' => $mailbox, 'limit' => $limit, 'time' => $fromTime - )); + ]); return array_map(function ($row){ @@ -78,7 +78,25 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ }, $result); } -function getMessage(){ +function getMessage($msgType, $limit=30, $fromTime=NULL){ + $genID = util::array_get($_SESSION['p_id'], NULL); + if($genID === NULL){ + return []; + } + + if($msgType === 'public'){ + return getRawMessage(9999, $limit, $fromTime); + } + else if($msgType === 'private'){ + return getRawMessage($genID, $limit, $fromTime); + } + else if($msgType === 'national'){ + + } + else{ + return []; + } + } @@ -87,7 +105,7 @@ function genList($connect) { $query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - $you = array(); + $you = []; $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); From 9ec48f5f09276effb1a2fa0906b5c0bbcd720203 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 04:56:20 +0900 Subject: [PATCH 087/622] =?UTF-8?q?func.php=20=ED=8C=8C=EC=9D=BC=EC=9D=84?= =?UTF-8?q?=20file,=20legacy,=20converter=EB=A1=9C=20=EB=B6=84=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit message 클래스에서 nation이 NULL경우 예외 처리 --- twe/func.php | 863 +---------------------------------------- twe/func_converter.php | 783 +++++++++++++++++++++++++++++++++++++ twe/func_file.php | 24 ++ twe/func_legacy.php | 40 ++ twe/func_message.php | 30 +- twe/main.php | 2 +- 6 files changed, 884 insertions(+), 858 deletions(-) create mode 100644 twe/func_converter.php create mode 100644 twe/func_file.php create mode 100644 twe/func_legacy.php diff --git a/twe/func.php b/twe/func.php index 1e6b4fee..58a9d85b 100644 --- a/twe/func.php +++ b/twe/func.php @@ -1,13 +1,16 @@ $leader, 'power' => $power, 'intel' => $intel); } -function delInDir($dir) { - $handle = opendir($dir); - if($handle !== false){ - while(false !== ($FolderOrFile = readdir($handle))) { - if ($FolderOrFile == "." || $FolderOrFile == "..") { - continue; - } - - $filepath = sprintf('%s/%s', $dir, $FolderOrFile); - if (is_dir($filepath)) { - delInDir($filepath); - } // recursive - else { - @unlink($filepath); - } - } - } - closedir($handle); -// if(rmdir($dir)) { -// $success = true; -// } - return true; -} - function GetImageURL($imgsvr) { global $image, $image1; if($imgsvr == 0) { @@ -116,23 +95,6 @@ function GetImageURL($imgsvr) { return $image1; } } - -function CheckLogin($type=0) { - if(!isset($_SESSION['p_id'])) { - if($type == 0) { - header('Location: start.php'); - //echo ""; - //echo 'start.php';//TODO:debug all and replace - } - else { - header('Location: main.php'); - //echo 'main.php';//TODO:debug all and replace - //echo ""; - } - exit(); - } -} - function CheckLoginEx(){ //TODO: 서버 별로 p_id를 다르게 설정할 수 있어야함. if(!isset($_SESSION['p_id'])) { @@ -179,63 +141,6 @@ function bar($per, $skin=1, $h=7) { return $str; } -function printLimitMsg($turntime) { - echo " - - -접속제한 - - -"; -require('analytics.php'); -echo " - - - -접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$turntime})
-(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)
-
- - -"; -} -// (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
- -function getScenario($connect) { - $query = "select scenario from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - switch($admin['scenario']) { - case 0: $str = "공백지모드"; break; - case 1: $str = "역사모드1 : 184년 황건적의 난"; break; - case 2: $str = "역사모드2 : 190년 반동탁연합"; break; - case 3: $str = "역사모드3 : 194년 군웅할거"; break; - case 4: $str = "역사모드4 : 196년 황제는 허도로"; break; - case 5: $str = "역사모드5 : 200년 관도대전"; break; - case 6: $str = "역사모드6 : 202년 원가의 분열"; break; - case 7: $str = "역사모드7 : 207년 적벽대전"; break; - case 8: $str = "역사모드8 : 213년 익주 공방전"; break; - case 9: $str = "역사모드9 : 219년 삼국정립"; break; - case 10: $str = "역사모드10 : 225년 칠종칠금"; break; - case 11: $str = "역사모드11 : 228년 출사표"; break; - - case 12: $str = "IF모드1 : 191년 백마장군의 위세"; break; - - case 20: $str = "가상모드1 : 180년 영웅 난무"; break; - case 21: $str = "가상모드1 : 180년 영웅 집결"; break; - case 22: $str = "가상모드2 : 179년 훼신 집결"; break; - case 23: $str = "가상모드3 : 180년 영웅 시대"; break; - case 24: $str = "가상모드4 : 180년 결사항전"; break; - case 25: $str = "가상모드5 : 180년 영웅독존"; break; - case 26: $str = "가상모드6 : 180년 무풍지대"; break; - case 27: $str = "가상모드7 : 180년 가요대잔치"; break; - case 28: $str = "가상모드8 : 180년 확산성 밀리언 아서"; break; - default: $str = "시나리오?"; break; - } - return $str; -} - function CheckBlock($connect) { $query = "select block from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -243,26 +148,6 @@ function CheckBlock($connect) { return $me['block']; } -function NationCharCall($call) { - switch($call) { - case "명가": $type =13; break; - case "음양가": $type =12; break; - case "종횡가": $type =11; break; - case "불가": $type =10; break; - case "도적": $type = 9; break; - case "오두미도":$type = 8; break; - case "태평도": $type = 7; break; - case "도가": $type = 6; break; - case "묵가": $type = 5; break; - case "덕가": $type = 4; break; - case "병가": $type = 3; break; - case "유가": $type = 2; break; - case "법가": $type = 1; break; - default: $type = 0; break; - } - return $type; -} - function getRandGenName() { $first = array('가', '간', '감', '강', '고', '공', '공손', '곽', '관', '괴', '교', '금', '노', '뇌', '능', '도', '동', '두', '등', '마', '맹', '문', '미', '반', '방', '부', '비', '사', '사마', '서', '설', '성', '소', '손', '송', '순', '신', '심', @@ -282,185 +167,6 @@ function getRandGenName() { return $fullname; } -function CityNameArray() { - $cityNames = array( - "","업","허창","낙양","장안","성도","양양","건업","북평","남피","완","수춘","서주","강릉","장사", - "시상","위례","계","복양","진류","여남","하비","서량","하내","한중","상용","덕양","강주","건녕", - "남해","계양","오","평양","사비","계림","진양","평원","북해","초","패","천수","안정","홍농", - "하변","자동","영안","귀양","주시","운남","남영","교지","신야","강하","무릉","영릉","상동","여강", - "회계","고창","대","안평","졸본","이도","강","저","흉노","남만","산월","오환","왜","호관", - "호로","사곡","함곡","사수","양평","가맹","역경","계교","동황","관도","정도","합비","광릉","적도", - "가정","기산","면죽","이릉","장판","백랑","적벽","파양","탐라","유구" - ); - return $cityNames; -} - -function CityCall($call) { - switch($call) { - case "업": $type = 1; break; case "허창": $type = 2; break; - case "낙양": $type = 3; break; case "장안": $type = 4; break; - case "성도": $type = 5; break; case "양양": $type = 6; break; - case "건업": $type = 7; break; case "북평": $type = 8; break; - case "남피": $type = 9; break; case "완": $type = 10; break; - case "수춘": $type = 11; break; case "서주": $type = 12; break; - case "강릉": $type = 13; break; case "장사": $type = 14; break; - case "시상": $type = 15; break; case "위례": $type = 16; break; - case "계": $type = 17; break; case "복양": $type = 18; break; - case "진류": $type = 19; break; case "여남": $type = 20; break; - case "하비": $type = 21; break; case "서량": $type = 22; break; - case "하내": $type = 23; break; case "한중": $type = 24; break; - case "상용": $type = 25; break; case "덕양": $type = 26; break; - case "강주": $type = 27; break; case "건녕": $type = 28; break; - case "남해": $type = 29; break; case "계양": $type = 30; break; - case "오": $type = 31; break; case "평양": $type = 32; break; - case "사비": $type = 33; break; case "계림": $type = 34; break; - case "진양": $type = 35; break; case "평원": $type = 36; break; - case "북해": $type = 37; break; case "초": $type = 38; break; - case "패": $type = 39; break; case "천수": $type = 40; break; - case "안정": $type = 41; break; case "홍농": $type = 42; break; - case "하변": $type = 43; break; case "자동": $type = 44; break; - case "영안": $type = 45; break; case "귀양": $type = 46; break; - case "주시": $type = 47; break; case "운남": $type = 48; break; - case "남영": $type = 49; break; case "교지": $type = 50; break; - case "신야": $type = 51; break; case "강하": $type = 52; break; - case "무릉": $type = 53; break; case "영릉": $type = 54; break; - case "상동": $type = 55; break; case "여강": $type = 56; break; - case "회계": $type = 57; break; case "고창": $type = 58; break; - case "대": $type = 59; break; case "안평": $type = 60; break; - case "졸본": $type = 61; break; case "이도": $type = 62; break; - case "강": $type = 63; break; case "저": $type = 64; break; - case "흉노": $type = 65; break; case "남만": $type = 66; break; - case "산월": $type = 67; break; case "오환": $type = 68; break; - case "왜": $type = 69; break; case "호관": $type = 70; break; - case "호로": $type = 71; break; case "사곡": $type = 72; break; - case "함곡": $type = 73; break; case "사수": $type = 74; break; - case "양평": $type = 75; break; case "가맹": $type = 76; break; - case "역경": $type = 77; break; case "계교": $type = 78; break; - case "동황": $type = 79; break; case "관도": $type = 80; break; - case "정도": $type = 81; break; case "합비": $type = 82; break; - case "광릉": $type = 83; break; case "적도": $type = 84; break; - case "가정": $type = 85; break; case "기산": $type = 86; break; - case "면죽": $type = 87; break; case "이릉": $type = 88; break; - case "장판": $type = 89; break; case "백랑": $type = 90; break; - case "적벽": $type = 91; break; case "파양": $type = 92; break; - case "탐라": $type = 93; break; case "유구": $type = 94; break; - } - return $type; -} - -function CityNum($num) { - switch($num) { - case 1: $call = "업" ; break; case 2: $call = "허창"; break; - case 3: $call = "낙양"; break; case 4: $call = "장안"; break; - case 5: $call = "성도"; break; case 6: $call = "양양"; break; - case 7: $call = "건업"; break; case 8: $call = "북평"; break; - case 9: $call = "남피"; break; case 10: $call = "완" ; break; - case 11: $call = "수춘"; break; case 12: $call = "서주"; break; - case 13: $call = "강릉"; break; case 14: $call = "장사"; break; - case 15: $call = "시상"; break; case 16: $call = "위례"; break; - case 17: $call = "계" ; break; case 18: $call = "복양"; break; - case 19: $call = "진류"; break; case 20: $call = "여남"; break; - case 21: $call = "하비"; break; case 22: $call = "서량"; break; - case 23: $call = "하내"; break; case 24: $call = "한중"; break; - case 25: $call = "상용"; break; case 26: $call = "덕양"; break; - case 27: $call = "강주"; break; case 28: $call = "건녕"; break; - case 29: $call = "남해"; break; case 30: $call = "계양"; break; - case 31: $call = "오" ; break; case 32: $call = "평양"; break; - case 33: $call = "사비"; break; case 34: $call = "계림"; break; - case 35: $call = "진양"; break; case 36: $call = "평원"; break; - case 37: $call = "북해"; break; case 38: $call = "초" ; break; - case 39: $call = "패" ; break; case 40: $call = "천수"; break; - case 41: $call = "안정"; break; case 42: $call = "홍농"; break; - case 43: $call = "하변"; break; case 44: $call = "자동"; break; - case 45: $call = "영안"; break; case 46: $call = "귀양"; break; - case 47: $call = "주시"; break; case 48: $call = "운남"; break; - case 49: $call = "남영"; break; case 50: $call = "교지"; break; - case 51: $call = "신야"; break; case 52: $call = "강하"; break; - case 53: $call = "무릉"; break; case 54: $call = "영릉"; break; - case 55: $call = "상동"; break; case 56: $call = "여강"; break; - case 57: $call = "회계"; break; case 58: $call = "고창"; break; - case 59: $call = "대" ; break; case 60: $call = "안평"; break; - case 61: $call = "졸본"; break; case 62: $call = "이도"; break; - case 63: $call = "강" ; break; case 64: $call = "저" ; break; - case 65: $call = "흉노"; break; case 66: $call = "남만"; break; - case 67: $call = "산월"; break; case 68: $call = "오환"; break; - case 69: $call = "왜" ; break; case 70: $call = "호관"; break; - case 71: $call = "호로"; break; case 72: $call = "사곡"; break; - case 73: $call = "함곡"; break; case 74: $call = "사수"; break; - case 75: $call = "양평"; break; case 76: $call = "가맹"; break; - case 77: $call = "역경"; break; case 78: $call = "계교"; break; - case 79: $call = "동황"; break; case 80: $call = "관도"; break; - case 81: $call = "정도"; break; case 82: $call = "합비"; break; - case 83: $call = "광릉"; break; case 84: $call = "적도"; break; - case 85: $call = "가정"; break; case 86: $call = "기산"; break; - case 87: $call = "면죽"; break; case 88: $call = "이릉"; break; - case 89: $call = "장판"; break; case 90: $call = "백랑"; break; - case 91: $call = "적벽"; break; case 92: $call = "파양"; break; - case 93: $call = "탐라"; break; case 94: $call = "유구"; break; - } - return $call; -} - -function CharCall($call) { - switch($call) { - case "은둔": $type =10; break; - case "안전"; $type = 9; break; - case "유지"; $type = 8; break; - case "재간"; $type = 7; break; - case "출세"; $type = 6; break; - case "할거"; $type = 5; break; - case "정복"; $type = 4; break; - case "패권"; $type = 3; break; - case "의협"; $type = 2; break; - case "대의"; $type = 1; break; - case "왕좌"; $type = 0; break; - } - return $type; -} - -function SpecCall($call) { - switch($call) { - case "-": $type = 0; break; - case "경작": $type = 1; break; - case "상재": $type = 2; break; - case "발명": $type = 3; break; - - case "축성": $type = 10; break; - case "수비": $type = 11; break; - case "통찰": $type = 12; break; - - case "인덕": $type = 20; break; - - case "거상": $type = 30; break; - case "귀모": $type = 31; break; - - case "귀병": $type = 40; break; - case "신산": $type = 41; break; - case "환술": $type = 42; break; - case "집중": $type = 43; break; - case "신중": $type = 44; break; - case "반계": $type = 45; break; - - case "보병": $type = 50; break; - case "궁병": $type = 51; break; - case "기병": $type = 52; break; - case "공성": $type = 53; break; - - case "돌격": $type = 60; break; - case "무쌍": $type = 61; break; - case "견고": $type = 62; break; - case "위압": $type = 63; break; - - case "저격": $type = 70; break; - case "필살": $type = 71; break; - case "징병": $type = 72; break; - case "의술": $type = 73; break; - case "격노": $type = 74; break; - case "척사": $type = 75; break; - } - return $type; -} - // 0 1 2 3 4 5 6 7 // 0 -, 경작, 상재, 발명 = 3 지력내정 // 10 축성, 수비, 통찰 = 3 무력내정 @@ -565,540 +271,6 @@ function getSpecial2($connect, $leader, $power, $intel, $nodex=1, $dex0=0, $dex1 return $special2; } -function getConnect($con) { - if($con < 50) $conname = "안함"; - elseif($con < 100) $conname = "무관심"; - elseif($con < 200) $conname = "가끔"; - elseif($con < 400) $conname = "보통"; - elseif($con < 800) $conname = "자주"; - elseif($con < 1600) $conname = "열심"; - elseif($con < 3200) $conname = "중독"; - elseif($con < 6400) $conname = "폐인"; - elseif($con < 12800) $conname = "경고"; - else $conname = "헐..."; - - return $conname; -} - -function getCityLevel($level) { - switch($level) { - case 8: $call = "특"; break; - case 7: $call = "대"; break; - case 6: $call = "중"; break; - case 5: $call = "소"; break; - case 4: $call = "이"; break; - case 3: $call = "관"; break; - case 2: $call = "진"; break; - case 1: $call = "수"; break; - default:$call = "?"; break; - } - return $call; -} - -function getRegion($region) { - switch($region) { - case 8: $call = "동이"; break; - case 7: $call = "오월"; break; - case 6: $call = "초"; break; - case 5: $call = "남중"; break; - case 4: $call = "서촉"; break; - case 3: $call = "서북"; break; - case 2: $call = "중원"; break; - case 1: $call = "하북"; break; - default:$call = "?"; break; - } - return $call; -} - -function getNationChiefLevel($level) { - switch($level) { - case 7: $lv = 5; break; - case 6: $lv = 5; break; - case 5: $lv = 7; break; - case 4: $lv = 7; break; - case 3: $lv = 9; break; - case 2: $lv = 9; break; - case 1: $lv = 11; break; - case 0: $lv = 11; break; - } - return $lv; -} - -function getNationLevel($level) { - switch($level) { - case 7: $call = "황제"; break; - case 6: $call = "왕"; break; - case 5: $call = "공"; break; - case 4: $call = "주목"; break; - case 3: $call = "주자사"; break; - case 2: $call = "군벌"; break; - case 1: $call = "호족"; break; - case 0: $call = "방랑군"; break; - } - return $call; -} - -function getGenChar($type) { - switch($type) { - case 10: $call = "은둔"; break; - case 9: $call = "안전"; break; - case 8: $call = "유지"; break; - case 7: $call = "재간"; break; - case 6: $call = "출세"; break; - case 5: $call = "할거"; break; - case 4: $call = "정복"; break; - case 3: $call = "패권"; break; - case 2: $call = "의협"; break; - case 1: $call = "대의"; break; - case 0: $call = "왕좌"; break; - } - return $call; -} - -function getGenSpecial($type) { - switch($type) { - case 0: $call = "-"; break; - case 1: $call = "경작"; break; - case 2: $call = "상재"; break; - case 3: $call = "발명"; break; - - case 10: $call = "축성"; break; - case 11: $call = "수비"; break; - case 12: $call = "통찰"; break; - - case 20: $call = "인덕"; break; - - case 30: $call = "거상"; break; - case 31: $call = "귀모"; break; - - case 40: $call = "귀병"; break; - case 41: $call = "신산"; break; - case 42: $call = "환술"; break; - case 43: $call = "집중"; break; - case 44: $call = "신중"; break; - case 45: $call = "반계"; break; - - case 50: $call = "보병"; break; - case 51: $call = "궁병"; break; - case 52: $call = "기병"; break; - case 53: $call = "공성"; break; - - case 60: $call = "돌격"; break; - case 61: $call = "무쌍"; break; - case 62: $call = "견고"; break; - case 63: $call = "위압"; break; - - case 70: $call = "저격"; break; - case 71: $call = "필살"; break; - case 72: $call = "징병"; break; - case 73: $call = "의술"; break; - case 74: $call = "격노"; break; - case 75: $call = "척사"; break; - } - return $call; -} - -function getNationType($type) { - switch($type) { - case 13: $call = "명 가"; break; - case 12: $call = "음 양 가"; break; - case 11: $call = "종 횡 가"; break; - case 10: $call = "불 가"; break; - case 9: $call = "도 적"; break; - case 8: $call = "오 두 미 도"; break; - case 7: $call = "태 평 도"; break; - case 6: $call = "도 가"; break; - case 5: $call = "묵 가"; break; - case 4: $call = "덕 가"; break; - case 3: $call = "병 가"; break; - case 2: $call = "유 가"; break; - case 1: $call = "법 가"; break; - case 0: $call = "-"; break; - } - return $call; -} - -function getNationType2($type, $skin) { - switch($type) { - case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; - case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; - case 11: $call = "전략↑ 수성↑ 금수입↓ 내정↓"; break; - case 10: $call = "민심↑ 수성↑ 금수입↓"; break; - case 9: $call = "계략↑ 금수입↓ 치안↓ 민심↓"; break; - case 8: $call = "쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓"; break; - case 7: $call = "인구↑ 민심↑ 기술↓ 수성↓"; break; - case 6: $call = "인구↑ 기술↓ 치안↓"; break; - case 5: $call = "수성↑ 기술↓"; break; - case 4: $call = "치안↑인구↑ 민심↑ 쌀수입↓ 수성↓"; break; - case 3: $call = "기술↑ 수성↑ 인구↓ 민심↓"; break; - case 2: $call = "내정↑ 민심↑ 쌀수입↓"; break; - case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; - case 0: $call = "-"; break; - } - if($skin == 0) { - $call = str_replace("","", $call); - $call = str_replace("","", $call); - $call = str_replace("","", $call); - } - return $call; -} - -function getLevel($level, $nlevel=8) { - if($level >= 0 && $level <= 4) { $nlevel = 0; } - $code = $nlevel * 100 + $level; - switch($code) { - case 812: $call = "군주"; break; - case 811: $call = "참모"; break; - case 810: $call = "제1장군"; break; - case 809: $call = "제1모사"; break; - case 808: $call = "제2장군"; break; - case 807: $call = "제2모사"; break; - case 806: $call = "제3장군"; break; - case 805: $call = "제3모사"; break; - - case 712: $call = "황제"; break; case 612: $call = "왕"; break; - case 711: $call = "승상"; break; case 611: $call = "광록훈"; break; - case 710: $call = "위장군"; break; case 610: $call = "전장군"; break; - case 709: $call = "사공"; break; case 609: $call = "상서령"; break; - case 708: $call = "표기장군"; break; case 608: $call = "좌장군"; break; - case 707: $call = "태위"; break; case 607: $call = "중서령"; break; - case 706: $call = "거기장군"; break; case 606: $call = "우장군"; break; - case 705: $call = "사도"; break; case 605: $call = "비서령"; break; - - case 512: $call = "공"; break; case 412: $call = "주목"; break; - case 511: $call = "광록대부"; break; case 411: $call = "태사령"; break; - case 510: $call = "안국장군"; break; case 410: $call = "아문장군"; break; - case 509: $call = "집금오"; break; case 409: $call = "낭중"; break; - case 508: $call = "파로장군"; break; case 408: $call = "호군"; break; - case 507: $call = "소부"; break; case 407: $call = "종사중랑"; break; - - case 312: $call = "주자사"; break; case 212: $call = "군벌"; break; - case 311: $call = "주부"; break; case 211: $call = "참모"; break; - case 310: $call = "편장군"; break; case 210: $call = "비장군"; break; - case 309: $call = "간의대부"; break; case 209: $call = "부참모"; break; - - case 112: $call = "영주"; break; case 12: $call = "두목"; break; - case 111: $call = "참모"; break; case 11: $call = "부두목"; break; - - case 4: $call = "태수"; break; - case 3: $call = "군사"; break; - case 2: $call = "시중"; break; - case 1: $call = "일반"; break; - case 0: $call = "재야"; break; - default: $call = "-"; break; - } - return $call; -} - -function getCall($leader, $power, $intel) { - global $_goodgenleader, $_goodgenpower, $_goodgenintel; - - $call = "평범"; - if($leader >= $_goodgenleader && $power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "만능"; - } elseif($leader >= $_goodgenleader && $power >= $_goodgenpower) { - $call = "용장"; - } elseif($leader >= $_goodgenleader && $intel >= $_goodgenintel) { - $call = "지장"; - } elseif($power >= $_goodgenpower && $intel >= $_goodgenintel) { - $call = "명장"; - } elseif($leader >= $_goodgenleader) { - $call = "명사"; - } elseif($power >= $_goodgenpower) { - $call = "용맹"; - } elseif($intel >= $_goodgenintel) { - $call = "현명"; - } - return $call; -} - -function getDed($dedication) { - if($dedication < 1 ) $level2 = "무품관"; - elseif($dedication < 10*10) $level2 = "30품관"; - elseif($dedication < 20*20) $level2 = "29품관"; - elseif($dedication < 30*30) $level2 = "28품관"; - elseif($dedication < 40*40) $level2 = "27품관"; - elseif($dedication < 50*50) $level2 = "26품관"; - elseif($dedication < 60*60) $level2 = "25품관"; - elseif($dedication < 70*70) $level2 = "24품관"; - elseif($dedication < 80*80) $level2 = "23품관"; - elseif($dedication < 90*90) $level2 = "22품관"; - elseif($dedication < 100*100) $level2 = "21품관"; - elseif($dedication < 110*110) $level2 = "20품관"; - elseif($dedication < 120*120) $level2 = "19품관"; - elseif($dedication < 130*130) $level2 = "18품관"; - elseif($dedication < 140*140) $level2 = "17품관"; - elseif($dedication < 150*150) $level2 = "16품관"; - elseif($dedication < 160*160) $level2 = "15품관"; - elseif($dedication < 170*170) $level2 = "14품관"; - elseif($dedication < 180*180) $level2 = "13품관"; - elseif($dedication < 190*190) $level2 = "12품관"; - elseif($dedication < 200*200) $level2 = "11품관"; // 40000 - elseif($dedication < 210*210) $level2 = "10품관"; // 44100 - elseif($dedication < 220*220) $level2 = "9품관"; // 48400 - elseif($dedication < 230*230) $level2 = "8품관"; // 52900 - elseif($dedication < 240*240) $level2 = "7품관"; // 57600 - elseif($dedication < 250*250) $level2 = "6품관"; // 62500 - elseif($dedication < 260*260) $level2 = "5품관"; // 67600 - elseif($dedication < 270*270) $level2 = "4품관"; // 72900 - elseif($dedication < 280*280) $level2 = "3품관"; // 78400 - elseif($dedication < 290*290) $level2 = "2품관"; // 84100 - else { - $level2 = "1품관"; - } - - return $level2; -} - -function getExpLevel($experience) { - if($experience < 1000) { - $level = floor($experience / 100); - } else { - for($level = 0; $experience > (($level+1)*($level+1)*10); $level++) { - } - } - - return $level; -} - -function getDedLevel($dedication) { - for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { - } - - return $level; -} - -function expStatus($exp) { - global $_upgradeLimit; - return $exp / $_upgradeLimit * 100; -} - -function getLevelPer($exp, $level) { - if($exp < 100) { $per = $exp; } - elseif($exp < 1000) { $per = $exp - ($level)*100; } - else { $per = ($exp - 10*$level*$level) / (2*$level+1) * 10; } - return $per; -} - -function getBill($dedication) { - for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { - } - - return ($level * 200 + 400); -} - -function getHonor($experience) { - if($experience < 640 ) $honor = "전무"; - elseif($experience < 2560) $honor = "무명"; - elseif($experience < 5760) $honor = "신동"; - elseif($experience < 10240) $honor = "약간"; - elseif($experience < 16000) $honor = "평범"; - elseif($experience < 23040) $honor = "지역적"; - elseif($experience < 31360) $honor = "전국적"; - elseif($experience < 40960) $honor = "세계적"; - elseif($experience < 45000) $honor = "유명"; - elseif($experience < 51840) $honor = "명사"; - elseif($experience < 55000) $honor = "호걸"; - elseif($experience < 64000) $honor = "효웅"; - elseif($experience < 77440) $honor = "영웅"; - else $honor = "구세주"; - - return $honor; -} - -function getTypename($type) { - switch($type) { - case 0: $typename = "보병"; break; - case 1: $typename = "청주병"; break; - case 2: $typename = "수병"; break; - case 3: $typename = "자객병"; break; - case 4: $typename = "근위병"; break; - case 5: $typename = "등갑병"; break; - - case 10: $typename = "궁병"; break; - case 11: $typename = "궁기병"; break; - case 12: $typename = "연노병"; break; - case 13: $typename = "강궁병"; break; - case 14: $typename = "석궁병"; break; - - case 20: $typename = "기병"; break; - case 21: $typename = "백마병"; break; - case 22: $typename = "중장기병"; break; - case 23: $typename = "돌격기병"; break; - case 24: $typename = "철기병"; break; - case 25: $typename = "수렵기병"; break; - case 26: $typename = "맹수병"; break; - case 27: $typename = "호표기병"; break; - - case 30: $typename = "귀병"; break; - case 31: $typename = "신귀병"; break; - case 32: $typename = "백귀병"; break; - case 33: $typename = "흑귀병"; break; - case 34: $typename = "악귀병"; break; - case 35: $typename = "남귀병"; break; - case 36: $typename = "황귀병"; break; - case 37: $typename = "천귀병"; break; - case 38: $typename = "마귀병"; break; - - case 40: $typename = "정란"; break; - case 41: $typename = "충차"; break; - case 42: $typename = "벽력거"; break; - case 43: $typename = "목우"; break; - } - return $typename; -} - -function getCost($connect, $armtype) { - $query = "select cst{$armtype} from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - return $admin["cst{$armtype}"]; -} - -function TechLimit($startyear, $year, $tech) { - $limit = 0; - if($year < $startyear+ 5 && $tech >= 1000) { $limit = 1; } - if($year < $startyear+10 && $tech >= 2000) { $limit = 1; } - if($year < $startyear+15 && $tech >= 3000) { $limit = 1; } - if($year < $startyear+20 && $tech >= 4000) { $limit = 1; } - if($year < $startyear+25 && $tech >= 5000) { $limit = 1; } - if($year < $startyear+30 && $tech >= 6000) { $limit = 1; } - if($year < $startyear+35 && $tech >= 7000) { $limit = 1; } - if($year < $startyear+40 && $tech >= 8000) { $limit = 1; } - if($year < $startyear+45 && $tech >= 9000) { $limit = 1; } - if($year < $startyear+50 && $tech >= 10000) { $limit = 1; } - if($year < $startyear+55 && $tech >= 11000) { $limit = 1; } - if($year < $startyear+60 && $tech >= 12000) { $limit = 1; } - return $limit; -} - -function getTechAbil($tech) { - if($tech < 1000) { $abil = 0; } - elseif($tech < 2000) { $abil = 25; } - elseif($tech < 3000) { $abil = 50; } - elseif($tech < 4000) { $abil = 75; } - elseif($tech < 5000) { $abil = 100; } - elseif($tech < 6000) { $abil = 125; } - elseif($tech < 7000) { $abil = 150; } - elseif($tech < 8000) { $abil = 175; } - elseif($tech < 9000) { $abil = 200; } - elseif($tech < 10000) { $abil = 225; } - elseif($tech < 11000) { $abil = 250; } - elseif($tech < 12000) { $abil = 275; } - else { $abil = 300; } - return $abil; -} - -function getTechCost($tech) { - if($tech < 1000) { $cost = 1.00; } - elseif($tech < 2000) { $cost = 1.15; } - elseif($tech < 3000) { $cost = 1.30; } - elseif($tech < 4000) { $cost = 1.45; } - elseif($tech < 5000) { $cost = 1.60; } - elseif($tech < 6000) { $cost = 1.75; } - elseif($tech < 7000) { $cost = 1.90; } - elseif($tech < 8000) { $cost = 2.05; } - elseif($tech < 9000) { $cost = 2.20; } - elseif($tech < 10000) { $cost = 2.35; } - elseif($tech < 11000) { $cost = 2.50; } - elseif($tech < 12000) { $cost = 2.65; } - else { $cost = 2.80; } - return $cost; -} - -function getTechCall($tech) { - if($tech < 1000) { $str = "0등급"; } - elseif($tech < 2000) { $str = "1등급"; } - elseif($tech < 3000) { $str = "2등급"; } - elseif($tech < 4000) { $str = "3등급"; } - elseif($tech < 5000) { $str = "4등급"; } - elseif($tech < 6000) { $str = "5등급"; } - elseif($tech < 7000) { $str = "6등급"; } - elseif($tech < 8000) { $str = "7등급"; } - elseif($tech < 9000) { $str = "8등급"; } - elseif($tech < 10000) { $str = "9등급"; } - elseif($tech < 11000) { $str = "10등급"; } - elseif($tech < 12000) { $str = "11등급"; } - else { $str = "12등급"; } - return $str; -} - -function getDexCall($dex) { - if($dex < 2500) { $str = "F-"; } - elseif($dex < 7500) { $str = "F"; } - elseif($dex < 15000) { $str = "F+"; } - elseif($dex < 25000) { $str = "E-"; } - elseif($dex < 37500) { $str = "E"; } - elseif($dex < 52500) { $str = "E+"; } - elseif($dex < 70000) { $str = "D-"; } - elseif($dex < 90000) { $str = "D"; } - elseif($dex < 112500) { $str = "D+"; } - elseif($dex < 137500) { $str = "C-"; } - elseif($dex < 165000) { $str = "C"; } - elseif($dex < 195000) { $str = "C+"; } - elseif($dex < 227500) { $str = "B-"; } - elseif($dex < 262500) { $str = "B"; } - elseif($dex < 300000) { $str = "B+"; } - elseif($dex < 340000) { $str = "A-"; } - elseif($dex < 382500) { $str = "A"; } - elseif($dex < 427500) { $str = "A+"; } - elseif($dex < 475000) { $str = "S-"; } - elseif($dex < 525000) { $str = "S"; } - elseif($dex < 577500) { $str = "S+"; } - elseif($dex < 632500) { $str = "SS-"; } - elseif($dex < 690000) { $str = "SS"; } - elseif($dex < 750000) { $str = "SS+"; } - elseif($dex < 812500) { $str = "SSS-"; } - elseif($dex < 877500) { $str = "SSS"; } - elseif($dex < 945000) { $str = "SSS+"; } - elseif($dex < 1015000) { $str = "Z-"; } - elseif($dex < 1087500) { $str = "Z"; } - elseif($dex < 1162500) { $str = "Z+"; } - else { $str = "?"; } - return $str; -} - -function getDexLevel($dex) { - if($dex < 2500) { $lvl = 0; } - elseif($dex < 7500) { $lvl = 1; } - elseif($dex < 15000) { $lvl = 2; } - elseif($dex < 25000) { $lvl = 3; } - elseif($dex < 37500) { $lvl = 4; } - elseif($dex < 52500) { $lvl = 5; } - elseif($dex < 70000) { $lvl = 6; } - elseif($dex < 90000) { $lvl = 7; } - elseif($dex < 112500) { $lvl = 8; } - elseif($dex < 137500) { $lvl = 9; } - elseif($dex < 165000) { $lvl = 10; } - elseif($dex < 195000) { $lvl = 11; } - elseif($dex < 227500) { $lvl = 12; } - elseif($dex < 262500) { $lvl = 13; } - elseif($dex < 300000) { $lvl = 14; } - elseif($dex < 340000) { $lvl = 15; } - elseif($dex < 382500) { $lvl = 16; } - elseif($dex < 427500) { $lvl = 17; } - elseif($dex < 475000) { $lvl = 18; } - elseif($dex < 525000) { $lvl = 19; } - elseif($dex < 577500) { $lvl = 20; } - elseif($dex < 632500) { $lvl = 21; } - elseif($dex < 690000) { $lvl = 22; } - elseif($dex < 750000) { $lvl = 23; } - elseif($dex < 812500) { $lvl = 24; } - elseif($dex < 877500) { $lvl = 25; } - elseif($dex < 945000) { $lvl = 26; } - elseif($dex < 1015000) { $lvl = 27; } - elseif($dex < 1087500) { $lvl = 28; } - elseif($dex < 1162500) { $lvl = 29; } - else { $lvl = 30; } - return $lvl; -} - -function getDexLog($dex1, $dex2) { - $ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1; - return $ratio; -} - function getGenDex($general, $type) { $type = floor($type / 10) * 10; return $general["dex{$type}"]; @@ -3211,12 +2383,8 @@ function allButton($connect) { "; } -function getOnlineNumEx($db = NULL){ - if($db === NULL){ - $db = newDB(); - } - - return $db->queryFirstField('select `online` from `game` where `no`=1'); +function getOnlineNumEx(){ + return newDB()->queryFirstField('select `online` from `game` where `no`=1'); } @@ -3570,11 +2738,8 @@ function getPID(){ return $_SESSION['p_id']; } -function increateRefreshEx($type, $cnt=1, $db=NULL){ - - if($db === NULL){ - $db = newDB(); - } +function increateRefreshEx($type, $cnt=1){ + $db = newDB(); $db->query("update `game` set `refresh` = `refresh` + %d_p_id where `no` = %d_cnt", array( 'p_id'=>$p_id, diff --git a/twe/func_converter.php b/twe/func_converter.php new file mode 100644 index 00000000..8371bb36 --- /dev/null +++ b/twe/func_converter.php @@ -0,0 +1,783 @@ +queryFirstColumn("select `scenario` from `game` where no=1"); + + switch($scenario) { + case 0: $str = "공백지모드"; break; + case 1: $str = "역사모드1 : 184년 황건적의 난"; break; + case 2: $str = "역사모드2 : 190년 반동탁연합"; break; + case 3: $str = "역사모드3 : 194년 군웅할거"; break; + case 4: $str = "역사모드4 : 196년 황제는 허도로"; break; + case 5: $str = "역사모드5 : 200년 관도대전"; break; + case 6: $str = "역사모드6 : 202년 원가의 분열"; break; + case 7: $str = "역사모드7 : 207년 적벽대전"; break; + case 8: $str = "역사모드8 : 213년 익주 공방전"; break; + case 9: $str = "역사모드9 : 219년 삼국정립"; break; + case 10: $str = "역사모드10 : 225년 칠종칠금"; break; + case 11: $str = "역사모드11 : 228년 출사표"; break; + + case 12: $str = "IF모드1 : 191년 백마장군의 위세"; break; + + case 20: $str = "가상모드1 : 180년 영웅 난무"; break; + case 21: $str = "가상모드1 : 180년 영웅 집결"; break; + case 22: $str = "가상모드2 : 179년 훼신 집결"; break; + case 23: $str = "가상모드3 : 180년 영웅 시대"; break; + case 24: $str = "가상모드4 : 180년 결사항전"; break; + case 25: $str = "가상모드5 : 180년 영웅독존"; break; + case 26: $str = "가상모드6 : 180년 무풍지대"; break; + case 27: $str = "가상모드7 : 180년 가요대잔치"; break; + case 28: $str = "가상모드8 : 180년 확산성 밀리언 아서"; break; + default: $str = "시나리오?"; break; + } + return $str; +} + + +function NationCharCall($call) { + switch($call) { + case "명가": $type =13; break; + case "음양가": $type =12; break; + case "종횡가": $type =11; break; + case "불가": $type =10; break; + case "도적": $type = 9; break; + case "오두미도":$type = 8; break; + case "태평도": $type = 7; break; + case "도가": $type = 6; break; + case "묵가": $type = 5; break; + case "덕가": $type = 4; break; + case "병가": $type = 3; break; + case "유가": $type = 2; break; + case "법가": $type = 1; break; + default: $type = 0; break; + } + return $type; +} + + +function CityNameArray() { + $cityNames = array( + "","업","허창","낙양","장안","성도","양양","건업","북평","남피","완","수춘","서주","강릉","장사", + "시상","위례","계","복양","진류","여남","하비","서량","하내","한중","상용","덕양","강주","건녕", + "남해","계양","오","평양","사비","계림","진양","평원","북해","초","패","천수","안정","홍농", + "하변","자동","영안","귀양","주시","운남","남영","교지","신야","강하","무릉","영릉","상동","여강", + "회계","고창","대","안평","졸본","이도","강","저","흉노","남만","산월","오환","왜","호관", + "호로","사곡","함곡","사수","양평","가맹","역경","계교","동황","관도","정도","합비","광릉","적도", + "가정","기산","면죽","이릉","장판","백랑","적벽","파양","탐라","유구" + ); + return $cityNames; +} + + +function CityCall($call) { + switch($call) { + case "업": $type = 1; break; case "허창": $type = 2; break; + case "낙양": $type = 3; break; case "장안": $type = 4; break; + case "성도": $type = 5; break; case "양양": $type = 6; break; + case "건업": $type = 7; break; case "북평": $type = 8; break; + case "남피": $type = 9; break; case "완": $type = 10; break; + case "수춘": $type = 11; break; case "서주": $type = 12; break; + case "강릉": $type = 13; break; case "장사": $type = 14; break; + case "시상": $type = 15; break; case "위례": $type = 16; break; + case "계": $type = 17; break; case "복양": $type = 18; break; + case "진류": $type = 19; break; case "여남": $type = 20; break; + case "하비": $type = 21; break; case "서량": $type = 22; break; + case "하내": $type = 23; break; case "한중": $type = 24; break; + case "상용": $type = 25; break; case "덕양": $type = 26; break; + case "강주": $type = 27; break; case "건녕": $type = 28; break; + case "남해": $type = 29; break; case "계양": $type = 30; break; + case "오": $type = 31; break; case "평양": $type = 32; break; + case "사비": $type = 33; break; case "계림": $type = 34; break; + case "진양": $type = 35; break; case "평원": $type = 36; break; + case "북해": $type = 37; break; case "초": $type = 38; break; + case "패": $type = 39; break; case "천수": $type = 40; break; + case "안정": $type = 41; break; case "홍농": $type = 42; break; + case "하변": $type = 43; break; case "자동": $type = 44; break; + case "영안": $type = 45; break; case "귀양": $type = 46; break; + case "주시": $type = 47; break; case "운남": $type = 48; break; + case "남영": $type = 49; break; case "교지": $type = 50; break; + case "신야": $type = 51; break; case "강하": $type = 52; break; + case "무릉": $type = 53; break; case "영릉": $type = 54; break; + case "상동": $type = 55; break; case "여강": $type = 56; break; + case "회계": $type = 57; break; case "고창": $type = 58; break; + case "대": $type = 59; break; case "안평": $type = 60; break; + case "졸본": $type = 61; break; case "이도": $type = 62; break; + case "강": $type = 63; break; case "저": $type = 64; break; + case "흉노": $type = 65; break; case "남만": $type = 66; break; + case "산월": $type = 67; break; case "오환": $type = 68; break; + case "왜": $type = 69; break; case "호관": $type = 70; break; + case "호로": $type = 71; break; case "사곡": $type = 72; break; + case "함곡": $type = 73; break; case "사수": $type = 74; break; + case "양평": $type = 75; break; case "가맹": $type = 76; break; + case "역경": $type = 77; break; case "계교": $type = 78; break; + case "동황": $type = 79; break; case "관도": $type = 80; break; + case "정도": $type = 81; break; case "합비": $type = 82; break; + case "광릉": $type = 83; break; case "적도": $type = 84; break; + case "가정": $type = 85; break; case "기산": $type = 86; break; + case "면죽": $type = 87; break; case "이릉": $type = 88; break; + case "장판": $type = 89; break; case "백랑": $type = 90; break; + case "적벽": $type = 91; break; case "파양": $type = 92; break; + case "탐라": $type = 93; break; case "유구": $type = 94; break; + } + return $type; +} + + +function CityNum($num) { + switch($num) { + case 1: $call = "업" ; break; case 2: $call = "허창"; break; + case 3: $call = "낙양"; break; case 4: $call = "장안"; break; + case 5: $call = "성도"; break; case 6: $call = "양양"; break; + case 7: $call = "건업"; break; case 8: $call = "북평"; break; + case 9: $call = "남피"; break; case 10: $call = "완" ; break; + case 11: $call = "수춘"; break; case 12: $call = "서주"; break; + case 13: $call = "강릉"; break; case 14: $call = "장사"; break; + case 15: $call = "시상"; break; case 16: $call = "위례"; break; + case 17: $call = "계" ; break; case 18: $call = "복양"; break; + case 19: $call = "진류"; break; case 20: $call = "여남"; break; + case 21: $call = "하비"; break; case 22: $call = "서량"; break; + case 23: $call = "하내"; break; case 24: $call = "한중"; break; + case 25: $call = "상용"; break; case 26: $call = "덕양"; break; + case 27: $call = "강주"; break; case 28: $call = "건녕"; break; + case 29: $call = "남해"; break; case 30: $call = "계양"; break; + case 31: $call = "오" ; break; case 32: $call = "평양"; break; + case 33: $call = "사비"; break; case 34: $call = "계림"; break; + case 35: $call = "진양"; break; case 36: $call = "평원"; break; + case 37: $call = "북해"; break; case 38: $call = "초" ; break; + case 39: $call = "패" ; break; case 40: $call = "천수"; break; + case 41: $call = "안정"; break; case 42: $call = "홍농"; break; + case 43: $call = "하변"; break; case 44: $call = "자동"; break; + case 45: $call = "영안"; break; case 46: $call = "귀양"; break; + case 47: $call = "주시"; break; case 48: $call = "운남"; break; + case 49: $call = "남영"; break; case 50: $call = "교지"; break; + case 51: $call = "신야"; break; case 52: $call = "강하"; break; + case 53: $call = "무릉"; break; case 54: $call = "영릉"; break; + case 55: $call = "상동"; break; case 56: $call = "여강"; break; + case 57: $call = "회계"; break; case 58: $call = "고창"; break; + case 59: $call = "대" ; break; case 60: $call = "안평"; break; + case 61: $call = "졸본"; break; case 62: $call = "이도"; break; + case 63: $call = "강" ; break; case 64: $call = "저" ; break; + case 65: $call = "흉노"; break; case 66: $call = "남만"; break; + case 67: $call = "산월"; break; case 68: $call = "오환"; break; + case 69: $call = "왜" ; break; case 70: $call = "호관"; break; + case 71: $call = "호로"; break; case 72: $call = "사곡"; break; + case 73: $call = "함곡"; break; case 74: $call = "사수"; break; + case 75: $call = "양평"; break; case 76: $call = "가맹"; break; + case 77: $call = "역경"; break; case 78: $call = "계교"; break; + case 79: $call = "동황"; break; case 80: $call = "관도"; break; + case 81: $call = "정도"; break; case 82: $call = "합비"; break; + case 83: $call = "광릉"; break; case 84: $call = "적도"; break; + case 85: $call = "가정"; break; case 86: $call = "기산"; break; + case 87: $call = "면죽"; break; case 88: $call = "이릉"; break; + case 89: $call = "장판"; break; case 90: $call = "백랑"; break; + case 91: $call = "적벽"; break; case 92: $call = "파양"; break; + case 93: $call = "탐라"; break; case 94: $call = "유구"; break; + } + return $call; +} + + +function CharCall($call) { + switch($call) { + case "은둔": $type =10; break; + case "안전"; $type = 9; break; + case "유지"; $type = 8; break; + case "재간"; $type = 7; break; + case "출세"; $type = 6; break; + case "할거"; $type = 5; break; + case "정복"; $type = 4; break; + case "패권"; $type = 3; break; + case "의협"; $type = 2; break; + case "대의"; $type = 1; break; + case "왕좌"; $type = 0; break; + } + return $type; +} + +function SpecCall($call) { + switch($call) { + case "-": $type = 0; break; + case "경작": $type = 1; break; + case "상재": $type = 2; break; + case "발명": $type = 3; break; + + case "축성": $type = 10; break; + case "수비": $type = 11; break; + case "통찰": $type = 12; break; + + case "인덕": $type = 20; break; + + case "거상": $type = 30; break; + case "귀모": $type = 31; break; + + case "귀병": $type = 40; break; + case "신산": $type = 41; break; + case "환술": $type = 42; break; + case "집중": $type = 43; break; + case "신중": $type = 44; break; + case "반계": $type = 45; break; + + case "보병": $type = 50; break; + case "궁병": $type = 51; break; + case "기병": $type = 52; break; + case "공성": $type = 53; break; + + case "돌격": $type = 60; break; + case "무쌍": $type = 61; break; + case "견고": $type = 62; break; + case "위압": $type = 63; break; + + case "저격": $type = 70; break; + case "필살": $type = 71; break; + case "징병": $type = 72; break; + case "의술": $type = 73; break; + case "격노": $type = 74; break; + case "척사": $type = 75; break; + } + return $type; +} + + +function getCityLevel($level) { + switch($level) { + case 8: $call = "특"; break; + case 7: $call = "대"; break; + case 6: $call = "중"; break; + case 5: $call = "소"; break; + case 4: $call = "이"; break; + case 3: $call = "관"; break; + case 2: $call = "진"; break; + case 1: $call = "수"; break; + default:$call = "?"; break; + } + return $call; +} + +function getRegion($region) { + switch($region) { + case 8: $call = "동이"; break; + case 7: $call = "오월"; break; + case 6: $call = "초"; break; + case 5: $call = "남중"; break; + case 4: $call = "서촉"; break; + case 3: $call = "서북"; break; + case 2: $call = "중원"; break; + case 1: $call = "하북"; break; + default:$call = "?"; break; + } + return $call; +} + +function getNationChiefLevel($level) { + switch($level) { + case 7: $lv = 5; break; + case 6: $lv = 5; break; + case 5: $lv = 7; break; + case 4: $lv = 7; break; + case 3: $lv = 9; break; + case 2: $lv = 9; break; + case 1: $lv = 11; break; + case 0: $lv = 11; break; + } + return $lv; +} + +function getNationLevel($level) { + switch($level) { + case 7: $call = "황제"; break; + case 6: $call = "왕"; break; + case 5: $call = "공"; break; + case 4: $call = "주목"; break; + case 3: $call = "주자사"; break; + case 2: $call = "군벌"; break; + case 1: $call = "호족"; break; + case 0: $call = "방랑군"; break; + } + return $call; +} + +function getGenChar($type) { + switch($type) { + case 10: $call = "은둔"; break; + case 9: $call = "안전"; break; + case 8: $call = "유지"; break; + case 7: $call = "재간"; break; + case 6: $call = "출세"; break; + case 5: $call = "할거"; break; + case 4: $call = "정복"; break; + case 3: $call = "패권"; break; + case 2: $call = "의협"; break; + case 1: $call = "대의"; break; + case 0: $call = "왕좌"; break; + } + return $call; +} + +function getGenSpecial($type) { + switch($type) { + case 0: $call = "-"; break; + case 1: $call = "경작"; break; + case 2: $call = "상재"; break; + case 3: $call = "발명"; break; + + case 10: $call = "축성"; break; + case 11: $call = "수비"; break; + case 12: $call = "통찰"; break; + + case 20: $call = "인덕"; break; + + case 30: $call = "거상"; break; + case 31: $call = "귀모"; break; + + case 40: $call = "귀병"; break; + case 41: $call = "신산"; break; + case 42: $call = "환술"; break; + case 43: $call = "집중"; break; + case 44: $call = "신중"; break; + case 45: $call = "반계"; break; + + case 50: $call = "보병"; break; + case 51: $call = "궁병"; break; + case 52: $call = "기병"; break; + case 53: $call = "공성"; break; + + case 60: $call = "돌격"; break; + case 61: $call = "무쌍"; break; + case 62: $call = "견고"; break; + case 63: $call = "위압"; break; + + case 70: $call = "저격"; break; + case 71: $call = "필살"; break; + case 72: $call = "징병"; break; + case 73: $call = "의술"; break; + case 74: $call = "격노"; break; + case 75: $call = "척사"; break; + } + return $call; +} + +function getNationType($type) { + switch($type) { + case 13: $call = "명 가"; break; + case 12: $call = "음 양 가"; break; + case 11: $call = "종 횡 가"; break; + case 10: $call = "불 가"; break; + case 9: $call = "도 적"; break; + case 8: $call = "오 두 미 도"; break; + case 7: $call = "태 평 도"; break; + case 6: $call = "도 가"; break; + case 5: $call = "묵 가"; break; + case 4: $call = "덕 가"; break; + case 3: $call = "병 가"; break; + case 2: $call = "유 가"; break; + case 1: $call = "법 가"; break; + case 0: $call = "-"; break; + } + return $call; +} + + +function getConnect($con) { + if($con < 50) $conname = "안함"; + elseif($con < 100) $conname = "무관심"; + elseif($con < 200) $conname = "가끔"; + elseif($con < 400) $conname = "보통"; + elseif($con < 800) $conname = "자주"; + elseif($con < 1600) $conname = "열심"; + elseif($con < 3200) $conname = "중독"; + elseif($con < 6400) $conname = "폐인"; + elseif($con < 12800) $conname = "경고"; + else $conname = "헐..."; + + return $conname; +} + +function getNationType2($type, $skin) { + switch($type) { + case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; + case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; + case 11: $call = "전략↑ 수성↑ 금수입↓ 내정↓"; break; + case 10: $call = "민심↑ 수성↑ 금수입↓"; break; + case 9: $call = "계략↑ 금수입↓ 치안↓ 민심↓"; break; + case 8: $call = "쌀수입↑ 인구↑ 기술↓ 수성↓ 내정↓"; break; + case 7: $call = "인구↑ 민심↑ 기술↓ 수성↓"; break; + case 6: $call = "인구↑ 기술↓ 치안↓"; break; + case 5: $call = "수성↑ 기술↓"; break; + case 4: $call = "치안↑인구↑ 민심↑ 쌀수입↓ 수성↓"; break; + case 3: $call = "기술↑ 수성↑ 인구↓ 민심↓"; break; + case 2: $call = "내정↑ 민심↑ 쌀수입↓"; break; + case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; + case 0: $call = "-"; break; + } + if($skin == 0) { + $call = str_replace("","", $call); + $call = str_replace("","", $call); + $call = str_replace("","", $call); + } + return $call; +} + +function getLevel($level, $nlevel=8) { + if($level >= 0 && $level <= 4) { $nlevel = 0; } + $code = $nlevel * 100 + $level; + switch($code) { + case 812: $call = "군주"; break; + case 811: $call = "참모"; break; + case 810: $call = "제1장군"; break; + case 809: $call = "제1모사"; break; + case 808: $call = "제2장군"; break; + case 807: $call = "제2모사"; break; + case 806: $call = "제3장군"; break; + case 805: $call = "제3모사"; break; + + case 712: $call = "황제"; break; case 612: $call = "왕"; break; + case 711: $call = "승상"; break; case 611: $call = "광록훈"; break; + case 710: $call = "위장군"; break; case 610: $call = "전장군"; break; + case 709: $call = "사공"; break; case 609: $call = "상서령"; break; + case 708: $call = "표기장군"; break; case 608: $call = "좌장군"; break; + case 707: $call = "태위"; break; case 607: $call = "중서령"; break; + case 706: $call = "거기장군"; break; case 606: $call = "우장군"; break; + case 705: $call = "사도"; break; case 605: $call = "비서령"; break; + + case 512: $call = "공"; break; case 412: $call = "주목"; break; + case 511: $call = "광록대부"; break; case 411: $call = "태사령"; break; + case 510: $call = "안국장군"; break; case 410: $call = "아문장군"; break; + case 509: $call = "집금오"; break; case 409: $call = "낭중"; break; + case 508: $call = "파로장군"; break; case 408: $call = "호군"; break; + case 507: $call = "소부"; break; case 407: $call = "종사중랑"; break; + + case 312: $call = "주자사"; break; case 212: $call = "군벌"; break; + case 311: $call = "주부"; break; case 211: $call = "참모"; break; + case 310: $call = "편장군"; break; case 210: $call = "비장군"; break; + case 309: $call = "간의대부"; break; case 209: $call = "부참모"; break; + + case 112: $call = "영주"; break; case 12: $call = "두목"; break; + case 111: $call = "참모"; break; case 11: $call = "부두목"; break; + + case 4: $call = "태수"; break; + case 3: $call = "군사"; break; + case 2: $call = "시중"; break; + case 1: $call = "일반"; break; + case 0: $call = "재야"; break; + default: $call = "-"; break; + } + return $call; +} + +function getCall($leader, $power, $intel) { + global $_goodgenleader, $_goodgenpower, $_goodgenintel; + + $call = "평범"; + if($leader >= $_goodgenleader && $power >= $_goodgenpower && $intel >= $_goodgenintel) { + $call = "만능"; + } elseif($leader >= $_goodgenleader && $power >= $_goodgenpower) { + $call = "용장"; + } elseif($leader >= $_goodgenleader && $intel >= $_goodgenintel) { + $call = "지장"; + } elseif($power >= $_goodgenpower && $intel >= $_goodgenintel) { + $call = "명장"; + } elseif($leader >= $_goodgenleader) { + $call = "명사"; + } elseif($power >= $_goodgenpower) { + $call = "용맹"; + } elseif($intel >= $_goodgenintel) { + $call = "현명"; + } + return $call; +} + +function getDed($dedication) { + if($dedication < 1 ) $level2 = "무품관"; + elseif($dedication < 10*10) $level2 = "30품관"; + elseif($dedication < 20*20) $level2 = "29품관"; + elseif($dedication < 30*30) $level2 = "28품관"; + elseif($dedication < 40*40) $level2 = "27품관"; + elseif($dedication < 50*50) $level2 = "26품관"; + elseif($dedication < 60*60) $level2 = "25품관"; + elseif($dedication < 70*70) $level2 = "24품관"; + elseif($dedication < 80*80) $level2 = "23품관"; + elseif($dedication < 90*90) $level2 = "22품관"; + elseif($dedication < 100*100) $level2 = "21품관"; + elseif($dedication < 110*110) $level2 = "20품관"; + elseif($dedication < 120*120) $level2 = "19품관"; + elseif($dedication < 130*130) $level2 = "18품관"; + elseif($dedication < 140*140) $level2 = "17품관"; + elseif($dedication < 150*150) $level2 = "16품관"; + elseif($dedication < 160*160) $level2 = "15품관"; + elseif($dedication < 170*170) $level2 = "14품관"; + elseif($dedication < 180*180) $level2 = "13품관"; + elseif($dedication < 190*190) $level2 = "12품관"; + elseif($dedication < 200*200) $level2 = "11품관"; // 40000 + elseif($dedication < 210*210) $level2 = "10품관"; // 44100 + elseif($dedication < 220*220) $level2 = "9품관"; // 48400 + elseif($dedication < 230*230) $level2 = "8품관"; // 52900 + elseif($dedication < 240*240) $level2 = "7품관"; // 57600 + elseif($dedication < 250*250) $level2 = "6품관"; // 62500 + elseif($dedication < 260*260) $level2 = "5품관"; // 67600 + elseif($dedication < 270*270) $level2 = "4품관"; // 72900 + elseif($dedication < 280*280) $level2 = "3품관"; // 78400 + elseif($dedication < 290*290) $level2 = "2품관"; // 84100 + else { + $level2 = "1품관"; + } + + return $level2; +} + + +function getHonor($experience) { + if($experience < 640 ) $honor = "전무"; + elseif($experience < 2560) $honor = "무명"; + elseif($experience < 5760) $honor = "신동"; + elseif($experience < 10240) $honor = "약간"; + elseif($experience < 16000) $honor = "평범"; + elseif($experience < 23040) $honor = "지역적"; + elseif($experience < 31360) $honor = "전국적"; + elseif($experience < 40960) $honor = "세계적"; + elseif($experience < 45000) $honor = "유명"; + elseif($experience < 51840) $honor = "명사"; + elseif($experience < 55000) $honor = "호걸"; + elseif($experience < 64000) $honor = "효웅"; + elseif($experience < 77440) $honor = "영웅"; + else $honor = "구세주"; + + return $honor; +} + +function getTypename($type) { + switch($type) { + case 0: $typename = "보병"; break; + case 1: $typename = "청주병"; break; + case 2: $typename = "수병"; break; + case 3: $typename = "자객병"; break; + case 4: $typename = "근위병"; break; + case 5: $typename = "등갑병"; break; + + case 10: $typename = "궁병"; break; + case 11: $typename = "궁기병"; break; + case 12: $typename = "연노병"; break; + case 13: $typename = "강궁병"; break; + case 14: $typename = "석궁병"; break; + + case 20: $typename = "기병"; break; + case 21: $typename = "백마병"; break; + case 22: $typename = "중장기병"; break; + case 23: $typename = "돌격기병"; break; + case 24: $typename = "철기병"; break; + case 25: $typename = "수렵기병"; break; + case 26: $typename = "맹수병"; break; + case 27: $typename = "호표기병"; break; + + case 30: $typename = "귀병"; break; + case 31: $typename = "신귀병"; break; + case 32: $typename = "백귀병"; break; + case 33: $typename = "흑귀병"; break; + case 34: $typename = "악귀병"; break; + case 35: $typename = "남귀병"; break; + case 36: $typename = "황귀병"; break; + case 37: $typename = "천귀병"; break; + case 38: $typename = "마귀병"; break; + + case 40: $typename = "정란"; break; + case 41: $typename = "충차"; break; + case 42: $typename = "벽력거"; break; + case 43: $typename = "목우"; break; + } + return $typename; +} + + +function getExpLevel($experience) { + if($experience < 1000) { + $level = floor($experience / 100); + } else { + for($level = 0; $experience > (($level+1)*($level+1)*10); $level++) { + } + } + + return $level; +} + +function getDedLevel($dedication) { + for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { + } + + return $level; +} + +function expStatus($exp) { + global $_upgradeLimit; + return $exp / $_upgradeLimit * 100; +} + +function getLevelPer($exp, $level) { + if($exp < 100) { $per = $exp; } + elseif($exp < 1000) { $per = $exp - ($level)*100; } + else { $per = ($exp - 10*$level*$level) / (2*$level+1) * 10; } + return $per; +} + +function getBill($dedication) { + for($level = 0; $dedication > (($level+1)*($level+1)*100); $level++) { + } + + return ($level * 200 + 400); +} + +function getCost($connect, $armtype) { + $query = "select cst{$armtype} from game where no='1'"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); + $admin = MYDB_fetch_array($result); + + return $admin["cst{$armtype}"]; +} + +function TechLimit($startyear, $year, $tech) { + $limit = 0; + if($year < $startyear+ 5 && $tech >= 1000) { $limit = 1; } + if($year < $startyear+10 && $tech >= 2000) { $limit = 1; } + if($year < $startyear+15 && $tech >= 3000) { $limit = 1; } + if($year < $startyear+20 && $tech >= 4000) { $limit = 1; } + if($year < $startyear+25 && $tech >= 5000) { $limit = 1; } + if($year < $startyear+30 && $tech >= 6000) { $limit = 1; } + if($year < $startyear+35 && $tech >= 7000) { $limit = 1; } + if($year < $startyear+40 && $tech >= 8000) { $limit = 1; } + if($year < $startyear+45 && $tech >= 9000) { $limit = 1; } + if($year < $startyear+50 && $tech >= 10000) { $limit = 1; } + if($year < $startyear+55 && $tech >= 11000) { $limit = 1; } + if($year < $startyear+60 && $tech >= 12000) { $limit = 1; } + return $limit; +} + +function getTechAbil($tech) { + if($tech < 1000) { $abil = 0; } + elseif($tech < 2000) { $abil = 25; } + elseif($tech < 3000) { $abil = 50; } + elseif($tech < 4000) { $abil = 75; } + elseif($tech < 5000) { $abil = 100; } + elseif($tech < 6000) { $abil = 125; } + elseif($tech < 7000) { $abil = 150; } + elseif($tech < 8000) { $abil = 175; } + elseif($tech < 9000) { $abil = 200; } + elseif($tech < 10000) { $abil = 225; } + elseif($tech < 11000) { $abil = 250; } + elseif($tech < 12000) { $abil = 275; } + else { $abil = 300; } + return $abil; +} + +function getTechCost($tech) { + if($tech < 1000) { $cost = 1.00; } + elseif($tech < 2000) { $cost = 1.15; } + elseif($tech < 3000) { $cost = 1.30; } + elseif($tech < 4000) { $cost = 1.45; } + elseif($tech < 5000) { $cost = 1.60; } + elseif($tech < 6000) { $cost = 1.75; } + elseif($tech < 7000) { $cost = 1.90; } + elseif($tech < 8000) { $cost = 2.05; } + elseif($tech < 9000) { $cost = 2.20; } + elseif($tech < 10000) { $cost = 2.35; } + elseif($tech < 11000) { $cost = 2.50; } + elseif($tech < 12000) { $cost = 2.65; } + else { $cost = 2.80; } + return $cost; +} + +function getTechCall($tech) { + if($tech < 1000) { $str = "0등급"; } + elseif($tech < 2000) { $str = "1등급"; } + elseif($tech < 3000) { $str = "2등급"; } + elseif($tech < 4000) { $str = "3등급"; } + elseif($tech < 5000) { $str = "4등급"; } + elseif($tech < 6000) { $str = "5등급"; } + elseif($tech < 7000) { $str = "6등급"; } + elseif($tech < 8000) { $str = "7등급"; } + elseif($tech < 9000) { $str = "8등급"; } + elseif($tech < 10000) { $str = "9등급"; } + elseif($tech < 11000) { $str = "10등급"; } + elseif($tech < 12000) { $str = "11등급"; } + else { $str = "12등급"; } + return $str; +} + +function getDexCall($dex) { + if($dex < 2500) { $str = "F-"; } + elseif($dex < 7500) { $str = "F"; } + elseif($dex < 15000) { $str = "F+"; } + elseif($dex < 25000) { $str = "E-"; } + elseif($dex < 37500) { $str = "E"; } + elseif($dex < 52500) { $str = "E+"; } + elseif($dex < 70000) { $str = "D-"; } + elseif($dex < 90000) { $str = "D"; } + elseif($dex < 112500) { $str = "D+"; } + elseif($dex < 137500) { $str = "C-"; } + elseif($dex < 165000) { $str = "C"; } + elseif($dex < 195000) { $str = "C+"; } + elseif($dex < 227500) { $str = "B-"; } + elseif($dex < 262500) { $str = "B"; } + elseif($dex < 300000) { $str = "B+"; } + elseif($dex < 340000) { $str = "A-"; } + elseif($dex < 382500) { $str = "A"; } + elseif($dex < 427500) { $str = "A+"; } + elseif($dex < 475000) { $str = "S-"; } + elseif($dex < 525000) { $str = "S"; } + elseif($dex < 577500) { $str = "S+"; } + elseif($dex < 632500) { $str = "SS-"; } + elseif($dex < 690000) { $str = "SS"; } + elseif($dex < 750000) { $str = "SS+"; } + elseif($dex < 812500) { $str = "SSS-"; } + elseif($dex < 877500) { $str = "SSS"; } + elseif($dex < 945000) { $str = "SSS+"; } + elseif($dex < 1015000) { $str = "Z-"; } + elseif($dex < 1087500) { $str = "Z"; } + elseif($dex < 1162500) { $str = "Z+"; } + else { $str = "?"; } + return $str; +} + +function getDexLevel($dex) { + if($dex < 2500) { $lvl = 0; } + elseif($dex < 7500) { $lvl = 1; } + elseif($dex < 15000) { $lvl = 2; } + elseif($dex < 25000) { $lvl = 3; } + elseif($dex < 37500) { $lvl = 4; } + elseif($dex < 52500) { $lvl = 5; } + elseif($dex < 70000) { $lvl = 6; } + elseif($dex < 90000) { $lvl = 7; } + elseif($dex < 112500) { $lvl = 8; } + elseif($dex < 137500) { $lvl = 9; } + elseif($dex < 165000) { $lvl = 10; } + elseif($dex < 195000) { $lvl = 11; } + elseif($dex < 227500) { $lvl = 12; } + elseif($dex < 262500) { $lvl = 13; } + elseif($dex < 300000) { $lvl = 14; } + elseif($dex < 340000) { $lvl = 15; } + elseif($dex < 382500) { $lvl = 16; } + elseif($dex < 427500) { $lvl = 17; } + elseif($dex < 475000) { $lvl = 18; } + elseif($dex < 525000) { $lvl = 19; } + elseif($dex < 577500) { $lvl = 20; } + elseif($dex < 632500) { $lvl = 21; } + elseif($dex < 690000) { $lvl = 22; } + elseif($dex < 750000) { $lvl = 23; } + elseif($dex < 812500) { $lvl = 24; } + elseif($dex < 877500) { $lvl = 25; } + elseif($dex < 945000) { $lvl = 26; } + elseif($dex < 1015000) { $lvl = 27; } + elseif($dex < 1087500) { $lvl = 28; } + elseif($dex < 1162500) { $lvl = 29; } + else { $lvl = 30; } + return $lvl; +} + +function getDexLog($dex1, $dex2) { + $ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1; + return $ratio; +} diff --git a/twe/func_file.php b/twe/func_file.php new file mode 100644 index 00000000..958e1402 --- /dev/null +++ b/twe/func_file.php @@ -0,0 +1,24 @@ +location.replace('start.php');"; + //echo 'start.php';//TODO:debug all and replace + } + else { + header('Location: main.php'); + //echo 'main.php';//TODO:debug all and replace + //echo ""; + } + exit(); + } +} + + +function printLimitMsg($turntime) { + echo " + + +접속제한 + + +"; +require('analytics.php'); +echo " + + + +접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : {$turntime})
+(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)
+
+ + +"; +} +// (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
diff --git a/twe/func_message.php b/twe/func_message.php index c593bc46..a285665b 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -37,12 +37,24 @@ class Message{ 'nation' => $row['src_nation'], 'color' => $row['src_color'] ]; + + if($this->src['nation'] === NULL){ + $this->src['nation'] = '재야'; + $this->src['color'] = '#FFFFFF'; + } + $this->dest = [ 'id' => $row['dest'], 'name' => $row['dest_name'], 'nation' => $row['dest_nation'], 'color' => $row['dest_color'] ]; + + if($this->dest['nation'] === NULL){ + $this->dest['nation'] = '재야'; + $this->dest['color'] = '#FFFFFF'; + } + $this->datetime = $row['time']; $this->message = $row['message']; } @@ -54,19 +66,17 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ //'select * from `message` where `mailbox` = 90 and `time` < "2018-01-21 04:47:20" ORDER BY `time` desc LIMIT 3 '; - $sql = 'select * from `message` where `mailbox` = %d_mailbox'; + $sql = 'select * from `message` where `mailbox` = %i_mailbox'; if($fromTime !== NULL){ $sql .= ' and `time` <= %s_time'; } $sql .= ' ORDER BY `time` desc'; if($limit > 0){ - $sql .= ' LIMIT %d_limit'; + $sql .= ' LIMIT %i_limit'; } - - $db = newDB(); //TODO: table 네임의 prefix를 처리할 수 있도록 개선 - $result = $db->query($sql, [ + $result = newDB()->query($sql, [ 'mailbox' => $mailbox, 'limit' => $limit, 'time' => $fromTime @@ -79,8 +89,8 @@ function getRawMessage($mailbox, $limit=30, $fromTime=NULL){ } function getMessage($msgType, $limit=30, $fromTime=NULL){ - $genID = util::array_get($_SESSION['p_id'], NULL); - if($genID === NULL){ + $generalID = genID(); + if($generalID === NULL){ return []; } @@ -91,7 +101,11 @@ function getMessage($msgType, $limit=30, $fromTime=NULL){ return getRawMessage($genID, $limit, $fromTime); } else if($msgType === 'national'){ - + $nationID = newDB()->queryFirstField( + 'select `nation` from `general` where user_id = %i', + $genID + ); + return getRawMessage(9000 + $nationID, $limit, $fromTime); } else{ return []; diff --git a/twe/main.php b/twe/main.php index 8fe0c67a..fb0d27dc 100644 --- a/twe/main.php +++ b/twe/main.php @@ -51,7 +51,7 @@ if($me['skin'] < 1) { $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; } -$scenario = getScenario($connect); +$scenario = getScenario(); ?> From 7a6040bd4d46e7451c311c4f928084c3b8acca21 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:22:57 +0900 Subject: [PATCH 088/622] =?UTF-8?q?func=5Ftemplate=20=EB=B6=84=EB=A6=AC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit func_template의 함수를 형식으로 사용할 수 있도록 수정 --- twe/b_chiefcenter.php | 2 +- twe/func.php | 445 ++--------------------------------------- twe/func_converter.php | 262 ++++++++++++++++++++++-- twe/func_legacy.php | 23 +++ twe/func_npc.php | 2 +- twe/func_process.php | 2 +- twe/func_template.php | 168 ++++++++++++++++ twe/main.php | 10 +- 8 files changed, 466 insertions(+), 448 deletions(-) create mode 100644 twe/func_template.php diff --git a/twe/b_chiefcenter.php b/twe/b_chiefcenter.php index ed5b3732..1f78b424 100644 --- a/twe/b_chiefcenter.php +++ b/twe/b_chiefcenter.php @@ -153,7 +153,7 @@ for($k=0; $k < 2; $k++) { } if($k == 0) { echo "
"; - CoreTurnTable(); + echo CoreTurnTable(); echo " diff --git a/twe/func.php b/twe/func.php index 58a9d85b..71ceeac0 100644 --- a/twe/func.php +++ b/twe/func.php @@ -17,6 +17,19 @@ require_once("func_message.php"); function randF(){ return mt_rand() / mt_getrandmax(); } + + +function getGeneralID(){ + //TODO: 서버마다 p_id가 다를 수 있도록 조치 + if(!isset($_SESSION['p_id'])){ + return NULL; + } + if($_SESSION['p_id']===''){ + return NULL; + } + return $_SESSION['p_id']; +} + // 37.5 ~ 75 function abilityRand() { $total = 150; @@ -95,6 +108,7 @@ function GetImageURL($imgsvr) { return $image1; } } + function CheckLoginEx(){ //TODO: 서버 별로 p_id를 다르게 설정할 수 있어야함. if(!isset($_SESSION['p_id'])) { @@ -104,6 +118,7 @@ function CheckLoginEx(){ } function checkLimit($userlevel, $con, $conlimit) { + //TODO: 접속 제한의 기준을 새로 세울 것. //운영자 if($userlevel >= 5) { return 0; } //특회이면 3배 @@ -119,28 +134,6 @@ function checkLimit($userlevel, $con, $conlimit) { } } -function bar($per, $skin=1, $h=7) { - global $images; - if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } - else { $bd = 1; $h = 12; $h2 = 8; } - - $per = round($per, 1); - if($per < 1 || $per > 99) { $per = round($per); } - $str1 = " "; - $str2 = " "; - if($per <= 0) { $str1 = ""; } - elseif($per >= 100) { $str2 = ""; } - if($skin == 0) { - $str = "-"; - } else { - $str = " - - {$str1}{$str2} -
"; - } - return $str; -} - function CheckBlock($connect) { $query = "select block from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -286,251 +279,6 @@ function addGenDex($connect, $no, $type, $exp) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -function getWeapName($weap) { - switch($weap) { - case 0: $weapname = "-"; break; - case 1: $weapname = "단도(+1)"; break; - case 2: $weapname = "단궁(+2)"; break; - case 3: $weapname = "단극(+3)"; break; - case 4: $weapname = "목검(+4)"; break; - case 5: $weapname = "죽창(+5)"; break; - case 6: $weapname = "소부(+6)"; break; - - case 7: $weapname = "동추(+7)"; break; - case 8: $weapname = "철편(+7)"; break; - case 9: $weapname = "철쇄(+7)"; break; - case 10: $weapname = "맥궁(+7)"; break; - case 11: $weapname = "유성추(+8)"; break; - case 12: $weapname = "철질여골(+8)"; break; - case 13: $weapname = "쌍철극(+9)"; break; - case 14: $weapname = "동호비궁(+9)"; break; - case 15: $weapname = "삼첨도(+10)"; break; - case 16: $weapname = "대부(+10)"; break; - case 17: $weapname = "고정도(+11)"; break; - case 18: $weapname = "이광궁(+11)"; break; - case 19: $weapname = "철척사모(+12)"; break; - case 20: $weapname = "칠성검(+12)"; break; - case 21: $weapname = "사모(+13)"; break; - case 22: $weapname = "양유기궁(+13)"; break; - case 23: $weapname = "언월도(+14)"; break; - case 24: $weapname = "방천화극(+14)"; break; - case 25: $weapname = "청홍검(+15)"; break; - case 26: $weapname = "의천검(+15)"; break; - } - return $weapname; -} - -function getWeapEff($weap) { - switch($weap) { - case 7: $weap = 7; break; - case 8: $weap = 7; break; - case 9: $weap = 7; break; - case 10: $weap = 7; break; - case 11: $weap = 8; break; - case 12: $weap = 8; break; - case 13: $weap = 9; break; - case 14: $weap = 9; break; - case 15: $weap = 10; break; - case 16: $weap = 10; break; - case 17: $weap = 11; break; - case 18: $weap = 11; break; - case 19: $weap = 12; break; - case 20: $weap = 12; break; - case 21: $weap = 13; break; - case 22: $weap = 13; break; - case 23: $weap = 14; break; - case 24: $weap = 14; break; - case 25: $weap = 15; break; - case 26: $weap = 15; break; - default: break; - } - return $weap; -} - -function getBookName($book) { - switch($book) { - case 0: $bookname = "-"; break; - case 1: $bookname = "효경전(+1)"; break; - case 2: $bookname = "회남자(+2)"; break; - case 3: $bookname = "변도론(+3)"; break; - case 4: $bookname = "건상역주(+4)"; break; - case 5: $bookname = "여씨춘추(+5)"; break; - case 6: $bookname = "사민월령(+6)"; break; - - case 7: $bookname = "위료자(+7)"; break; - case 8: $bookname = "사마법(+7)"; break; - case 9: $bookname = "한서(+7)"; break; - case 10: $bookname = "논어(+7)"; break; - case 11: $bookname = "전론(+8)"; break; - case 12: $bookname = "사기(+8)"; break; - case 13: $bookname = "장자(+9)"; break; - case 14: $bookname = "역경(+9)"; break; - case 15: $bookname = "시경(+10)"; break; - case 16: $bookname = "구국론(+10)"; break; - case 17: $bookname = "상군서(+11)"; break; - case 18: $bookname = "춘추전(+11)"; break; - case 19: $bookname = "산해경(+12)"; break; - case 20: $bookname = "맹덕신서(+12)"; break; - case 21: $bookname = "관자(+13)"; break; - case 22: $bookname = "병법24편(+13)"; break; - case 23: $bookname = "한비자(+14)"; break; - case 24: $bookname = "오자병법(+14)"; break; - case 25: $bookname = "노자(+15)"; break; - case 26: $bookname = "손자병법(+15)"; break; - } - return $bookname; -} - -function getBookEff($book) { - switch($book) { - case 7: $book = 7; break; - case 8: $book = 7; break; - case 9: $book = 7; break; - case 10: $book = 7; break; - case 11: $book = 8; break; - case 12: $book = 8; break; - case 13: $book = 9; break; - case 14: $book = 9; break; - case 15: $book = 10; break; - case 16: $book = 10; break; - case 17: $book = 11; break; - case 18: $book = 11; break; - case 19: $book = 12; break; - case 20: $book = 12; break; - case 21: $book = 13; break; - case 22: $book = 13; break; - case 23: $book = 14; break; - case 24: $book = 14; break; - case 25: $book = 15; break; - case 26: $book = 15; break; - default: break; - } - return $book; -} - -function getHorseName($horse) { - switch($horse) { - case 0: $horsename = "-"; break; - case 1: $horsename = "노기(+1)"; break; - case 2: $horsename = "조랑(+2)"; break; - case 3: $horsename = "노새(+3)"; break; - case 4: $horsename = "나귀(+4)"; break; - case 5: $horsename = "갈색마(+5)"; break; - case 6: $horsename = "흑색마(+6)"; break; - - case 7: $horsename = "백마(+7)"; break; - case 8: $horsename = "백마(+7)"; break; - case 9: $horsename = "기주마(+7)"; break; - case 10: $horsename = "기주마(+7)"; break; - case 11: $horsename = "양주마(+8)"; break; - case 12: $horsename = "양주마(+8)"; break; - case 13: $horsename = "과하마(+9)"; break; - case 14: $horsename = "과하마(+9)"; break; - case 15: $horsename = "대완마(+10)"; break; - case 16: $horsename = "대완마(+10)"; break; - case 17: $horsename = "서량마(+11)"; break; - case 18: $horsename = "서량마(+11)"; break; - case 19: $horsename = "사륜거(+12)"; break; - case 20: $horsename = "사륜거(+12)"; break; - case 21: $horsename = "절영(+13)"; break; - case 22: $horsename = "적로(+13)"; break; - case 23: $horsename = "적란마(+14)"; break; - case 24: $horsename = "조황비전(+14)"; break; - case 25: $horsename = "한혈마(+15)"; break; - case 26: $horsename = "적토마(+15)"; break; - } - return $horsename; -} - -function getHorseEff($horse) { - switch($horse) { - case 7: $horse = 7; break; - case 8: $horse = 7; break; - case 9: $horse = 7; break; - case 10: $horse = 7; break; - case 11: $horse = 8; break; - case 12: $horse = 8; break; - case 13: $horse = 9; break; - case 14: $horse = 9; break; - case 15: $horse = 10; break; - case 16: $horse = 10; break; - case 17: $horse = 11; break; - case 18: $horse = 11; break; - case 19: $horse = 12; break; - case 20: $horse = 12; break; - case 21: $horse = 13; break; - case 22: $horse = 13; break; - case 23: $horse = 14; break; - case 24: $horse = 14; break; - case 25: $horse = 15; break; - case 26: $horse = 15; break; - default: break; - } - return $horse; -} - -function getItemName($item) { - switch($item) { - case 0: $itemname = "-"; break; - case 1: $itemname = "환약(치료)"; break; - case 2: $itemname = "수극(저격)"; break; - case 3: $itemname = "탁주(사기)"; break; - case 4: $itemname = "청주(훈련)"; break; - case 5: $itemname = "이추(계략)"; break; - case 6: $itemname = "향낭(계략)"; break; - - case 7: $itemname = "오석산(치료)"; break; - case 8: $itemname = "무후행군(치료)"; break; - case 9: $itemname = "도소연명(치료)"; break; - case 10: $itemname = "칠엽청점(치료)"; break; - case 11: $itemname = "정력견혈(치료)"; break; - case 12: $itemname = "과실주(훈련)"; break; - case 13: $itemname = "이강주(훈련)"; break; - case 14: $itemname = "의적주(사기)"; break; - case 15: $itemname = "두강주(사기)"; break; - case 16: $itemname = "보령압주(사기)"; break; - case 17: $itemname = "철벽서(훈련)"; break; - case 18: $itemname = "단결도(훈련)"; break; - case 19: $itemname = "춘화첩(사기)"; break; - case 20: $itemname = "초선화(사기)"; break; - case 21: $itemname = "육도(계략)"; break; - case 22: $itemname = "삼략(계략)"; break; - case 23: $itemname = "청낭서(의술)"; break; - case 24: $itemname = "태평청령(의술)"; break; - case 25: $itemname = "태평요술(회피)"; break; - case 26: $itemname = "둔갑천서(회피)"; break; - } - return $itemname; -} - -function getItemCost2($weap) { - switch($weap) { - case 0: $weapcost = 0; break; - case 1: $weapcost = 100; break; - case 2: $weapcost = 1000; break; - case 3: $weapcost = 1000; break; - case 4: $weapcost = 1000; break; - case 5: $weapcost = 1000; break; - case 6: $weapcost = 3000; break; - default: $weapcost = 200; break; - } - return $weapcost; -} - -function getItemCost($weap) { - switch($weap) { - case 0: $weapcost = 0; break; - case 1: $weapcost = 1000; break; - case 2: $weapcost = 3000; break; - case 3: $weapcost = 6000; break; - case 4: $weapcost = 10000; break; - case 5: $weapcost = 15000; break; - case 6: $weapcost = 21000; break; - default: $weapcost = 200; break; - } - return $weapcost; -} - function getTurn($connect, $general, $type, $font=1) { $turn[0] = $general["turn0"]; @@ -1000,58 +748,6 @@ function getCoreTurn($connect, $nation, $level) { return $str; } -function turnTable() { - echo " - -"; -} - -function CoreTurnTable() { - echo " - -"; -} function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; @@ -1214,7 +910,7 @@ function myNationInfo($connect) { 성 향 - ".getNationType($nation['type'])." (".getNationType2($nation['type'], $me['skin']).") + ".getNationType($nation['type'])." (".getNationType2($nation['type']).") @@ -1686,66 +1382,6 @@ function CoreCommandTable($connect) { "; } -function commandButton($connect) { - global $_basecolor, $_basecolor2; - - $query = "select skin,no,nation,level,belong from general where user_id='{$_SESSION['p_id']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - - $query = "select nation,color,secretlimit from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - if($nation['color'] == "" || $me['skin'] < 1) { $nation['color'] = "000000"; } - - echo " - - "; - - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 5) { echo ""; } - else { echo ""; } - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } - else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } - else { echo ""; } - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - echo " - -
【회 의 실】【기 밀 실】【부대 편성】【인 사 부】【내 무 부】【사 령 부】【암 행 부】
"; - - echo " - - "; - - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - if($me['level'] >= 1) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { echo ""; } - else { echo ""; } - echo ""; - echo ""; - echo " - -
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; -} - function myInfo($connect) { $query = "select no,skin from general where user_id='{$_SESSION['p_id']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -2345,43 +1981,6 @@ function adminMsg($connect, $skin=1) { echo $admin['msg']."
"; } -function allButton($connect) { - global $_basecolor2; - $query = "select npcmode from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - if($admin['npcmode'] == 1) { - $site = "a_npcList.php"; - $call = "빙의일람"; - } else { - $site = "a_vote.php"; - $call = "설문조사"; - } - - echo " - - - - - - - - - - - - - - - - - - - - - -
"; -} function getOnlineNumEx(){ return newDB()->queryFirstField('select `online` from `game` where `no`=1'); @@ -2727,16 +2326,6 @@ function CutDay($date) { return $date; } -function getPID(){ - //TODO: 서버마다 p_id가 다를 수 있도록 조치 - if(!isset($_SESSION['p_id'])){ - return NULL; - } - if($_SESSION['p_id']===''){ - return NULL; - } - return $_SESSION['p_id']; -} function increateRefreshEx($type, $cnt=1){ $db = newDB(); @@ -2747,7 +2336,7 @@ function increateRefreshEx($type, $cnt=1){ )); $date = date('Y-m-d H:i:s'); - $p_id = getPID(); + $p_id = getGeneralID(); if($p_id !== NULL){ $db->query("update `general` set `lastrefresh`= %s_date, `con` = `con`+%d_cnt, `connect`= `connect`+ %d_cnt, '\ diff --git a/twe/func_converter.php b/twe/func_converter.php index 8371bb36..9f2fc437 100644 --- a/twe/func_converter.php +++ b/twe/func_converter.php @@ -399,7 +399,7 @@ function getConnect($con) { return $conname; } -function getNationType2($type, $skin) { +function getNationType2($type) { switch($type) { case 13: $call = "기술↑ 인구↑ 쌀수입↓ 수성↓"; break; case 12: $call = "내정↑ 인구↑ 기술↓ 전략↓"; break; @@ -416,11 +416,6 @@ function getNationType2($type, $skin) { case 1: $call = "금수입↑ 치안↑ 인구↓ 민심↓"; break; case 0: $call = "-"; break; } - if($skin == 0) { - $call = str_replace("","", $call); - $call = str_replace("","", $call); - $call = str_replace("","", $call); - } return $call; } @@ -631,12 +626,9 @@ function getBill($dedication) { return ($level * 200 + 400); } -function getCost($connect, $armtype) { - $query = "select cst{$armtype} from game where no='1'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $admin = MYDB_fetch_array($result); - - return $admin["cst{$armtype}"]; +function getCost($armtype) { + //FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함. + return newDB()->queryFirstColumn("select cst%l from game where no='1'", $armtype); } function TechLimit($startyear, $year, $tech) { @@ -781,3 +773,249 @@ function getDexLog($dex1, $dex2) { $ratio = (getDexLevel($dex1) - getDexLevel($dex2)) / 50 + 1; return $ratio; } + + +function getWeapName($weap) { + switch($weap) { + case 0: $weapname = "-"; break; + case 1: $weapname = "단도(+1)"; break; + case 2: $weapname = "단궁(+2)"; break; + case 3: $weapname = "단극(+3)"; break; + case 4: $weapname = "목검(+4)"; break; + case 5: $weapname = "죽창(+5)"; break; + case 6: $weapname = "소부(+6)"; break; + + case 7: $weapname = "동추(+7)"; break; + case 8: $weapname = "철편(+7)"; break; + case 9: $weapname = "철쇄(+7)"; break; + case 10: $weapname = "맥궁(+7)"; break; + case 11: $weapname = "유성추(+8)"; break; + case 12: $weapname = "철질여골(+8)"; break; + case 13: $weapname = "쌍철극(+9)"; break; + case 14: $weapname = "동호비궁(+9)"; break; + case 15: $weapname = "삼첨도(+10)"; break; + case 16: $weapname = "대부(+10)"; break; + case 17: $weapname = "고정도(+11)"; break; + case 18: $weapname = "이광궁(+11)"; break; + case 19: $weapname = "철척사모(+12)"; break; + case 20: $weapname = "칠성검(+12)"; break; + case 21: $weapname = "사모(+13)"; break; + case 22: $weapname = "양유기궁(+13)"; break; + case 23: $weapname = "언월도(+14)"; break; + case 24: $weapname = "방천화극(+14)"; break; + case 25: $weapname = "청홍검(+15)"; break; + case 26: $weapname = "의천검(+15)"; break; + } + return $weapname; +} + +function getWeapEff($weap) { + switch($weap) { + case 7: $weap = 7; break; + case 8: $weap = 7; break; + case 9: $weap = 7; break; + case 10: $weap = 7; break; + case 11: $weap = 8; break; + case 12: $weap = 8; break; + case 13: $weap = 9; break; + case 14: $weap = 9; break; + case 15: $weap = 10; break; + case 16: $weap = 10; break; + case 17: $weap = 11; break; + case 18: $weap = 11; break; + case 19: $weap = 12; break; + case 20: $weap = 12; break; + case 21: $weap = 13; break; + case 22: $weap = 13; break; + case 23: $weap = 14; break; + case 24: $weap = 14; break; + case 25: $weap = 15; break; + case 26: $weap = 15; break; + default: break; + } + return $weap; +} + +function getBookName($book) { + switch($book) { + case 0: $bookname = "-"; break; + case 1: $bookname = "효경전(+1)"; break; + case 2: $bookname = "회남자(+2)"; break; + case 3: $bookname = "변도론(+3)"; break; + case 4: $bookname = "건상역주(+4)"; break; + case 5: $bookname = "여씨춘추(+5)"; break; + case 6: $bookname = "사민월령(+6)"; break; + + case 7: $bookname = "위료자(+7)"; break; + case 8: $bookname = "사마법(+7)"; break; + case 9: $bookname = "한서(+7)"; break; + case 10: $bookname = "논어(+7)"; break; + case 11: $bookname = "전론(+8)"; break; + case 12: $bookname = "사기(+8)"; break; + case 13: $bookname = "장자(+9)"; break; + case 14: $bookname = "역경(+9)"; break; + case 15: $bookname = "시경(+10)"; break; + case 16: $bookname = "구국론(+10)"; break; + case 17: $bookname = "상군서(+11)"; break; + case 18: $bookname = "춘추전(+11)"; break; + case 19: $bookname = "산해경(+12)"; break; + case 20: $bookname = "맹덕신서(+12)"; break; + case 21: $bookname = "관자(+13)"; break; + case 22: $bookname = "병법24편(+13)"; break; + case 23: $bookname = "한비자(+14)"; break; + case 24: $bookname = "오자병법(+14)"; break; + case 25: $bookname = "노자(+15)"; break; + case 26: $bookname = "손자병법(+15)"; break; + } + return $bookname; +} + +function getBookEff($book) { + switch($book) { + case 7: $book = 7; break; + case 8: $book = 7; break; + case 9: $book = 7; break; + case 10: $book = 7; break; + case 11: $book = 8; break; + case 12: $book = 8; break; + case 13: $book = 9; break; + case 14: $book = 9; break; + case 15: $book = 10; break; + case 16: $book = 10; break; + case 17: $book = 11; break; + case 18: $book = 11; break; + case 19: $book = 12; break; + case 20: $book = 12; break; + case 21: $book = 13; break; + case 22: $book = 13; break; + case 23: $book = 14; break; + case 24: $book = 14; break; + case 25: $book = 15; break; + case 26: $book = 15; break; + default: break; + } + return $book; +} + +function getHorseName($horse) { + switch($horse) { + case 0: $horsename = "-"; break; + case 1: $horsename = "노기(+1)"; break; + case 2: $horsename = "조랑(+2)"; break; + case 3: $horsename = "노새(+3)"; break; + case 4: $horsename = "나귀(+4)"; break; + case 5: $horsename = "갈색마(+5)"; break; + case 6: $horsename = "흑색마(+6)"; break; + + case 7: $horsename = "백마(+7)"; break; + case 8: $horsename = "백마(+7)"; break; + case 9: $horsename = "기주마(+7)"; break; + case 10: $horsename = "기주마(+7)"; break; + case 11: $horsename = "양주마(+8)"; break; + case 12: $horsename = "양주마(+8)"; break; + case 13: $horsename = "과하마(+9)"; break; + case 14: $horsename = "과하마(+9)"; break; + case 15: $horsename = "대완마(+10)"; break; + case 16: $horsename = "대완마(+10)"; break; + case 17: $horsename = "서량마(+11)"; break; + case 18: $horsename = "서량마(+11)"; break; + case 19: $horsename = "사륜거(+12)"; break; + case 20: $horsename = "사륜거(+12)"; break; + case 21: $horsename = "절영(+13)"; break; + case 22: $horsename = "적로(+13)"; break; + case 23: $horsename = "적란마(+14)"; break; + case 24: $horsename = "조황비전(+14)"; break; + case 25: $horsename = "한혈마(+15)"; break; + case 26: $horsename = "적토마(+15)"; break; + } + return $horsename; +} + +function getHorseEff($horse) { + switch($horse) { + case 7: $horse = 7; break; + case 8: $horse = 7; break; + case 9: $horse = 7; break; + case 10: $horse = 7; break; + case 11: $horse = 8; break; + case 12: $horse = 8; break; + case 13: $horse = 9; break; + case 14: $horse = 9; break; + case 15: $horse = 10; break; + case 16: $horse = 10; break; + case 17: $horse = 11; break; + case 18: $horse = 11; break; + case 19: $horse = 12; break; + case 20: $horse = 12; break; + case 21: $horse = 13; break; + case 22: $horse = 13; break; + case 23: $horse = 14; break; + case 24: $horse = 14; break; + case 25: $horse = 15; break; + case 26: $horse = 15; break; + default: break; + } + return $horse; +} + +function getItemName($item) { + switch($item) { + case 0: $itemname = "-"; break; + case 1: $itemname = "환약(치료)"; break; + case 2: $itemname = "수극(저격)"; break; + case 3: $itemname = "탁주(사기)"; break; + case 4: $itemname = "청주(훈련)"; break; + case 5: $itemname = "이추(계략)"; break; + case 6: $itemname = "향낭(계략)"; break; + + case 7: $itemname = "오석산(치료)"; break; + case 8: $itemname = "무후행군(치료)"; break; + case 9: $itemname = "도소연명(치료)"; break; + case 10: $itemname = "칠엽청점(치료)"; break; + case 11: $itemname = "정력견혈(치료)"; break; + case 12: $itemname = "과실주(훈련)"; break; + case 13: $itemname = "이강주(훈련)"; break; + case 14: $itemname = "의적주(사기)"; break; + case 15: $itemname = "두강주(사기)"; break; + case 16: $itemname = "보령압주(사기)"; break; + case 17: $itemname = "철벽서(훈련)"; break; + case 18: $itemname = "단결도(훈련)"; break; + case 19: $itemname = "춘화첩(사기)"; break; + case 20: $itemname = "초선화(사기)"; break; + case 21: $itemname = "육도(계략)"; break; + case 22: $itemname = "삼략(계략)"; break; + case 23: $itemname = "청낭서(의술)"; break; + case 24: $itemname = "태평청령(의술)"; break; + case 25: $itemname = "태평요술(회피)"; break; + case 26: $itemname = "둔갑천서(회피)"; break; + } + return $itemname; +} + +function getItemCost2($weap) { + switch($weap) { + case 0: $weapcost = 0; break; + case 1: $weapcost = 100; break; + case 2: $weapcost = 1000; break; + case 3: $weapcost = 1000; break; + case 4: $weapcost = 1000; break; + case 5: $weapcost = 1000; break; + case 6: $weapcost = 3000; break; + default: $weapcost = 200; break; + } + return $weapcost; +} + +function getItemCost($weap) { + switch($weap) { + case 0: $weapcost = 0; break; + case 1: $weapcost = 1000; break; + case 2: $weapcost = 3000; break; + case 3: $weapcost = 6000; break; + case 4: $weapcost = 10000; break; + case 5: $weapcost = 15000; break; + case 6: $weapcost = 21000; break; + default: $weapcost = 200; break; + } + return $weapcost; +} diff --git a/twe/func_legacy.php b/twe/func_legacy.php index fa63e72d..59d1bbfc 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -38,3 +38,26 @@ echo " "; } // (자신의 턴이 되면 다시 접속 가능합니다. 제한량을 늘리기 위해 참여해주세요! 참여게시판 참고.)
+ + +function bar($per, $skin=1, $h=7) { + global $images; + if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } + else { $bd = 1; $h = 12; $h2 = 8; } + + $per = round($per, 1); + if($per < 1 || $per > 99) { $per = round($per); } + $str1 = " "; + $str2 = " "; + if($per <= 0) { $str1 = ""; } + elseif($per >= 100) { $str2 = ""; } + if($skin == 0) { + $str = "-"; + } else { + $str = " + + {$str1}{$str2} +
"; + } + return $str; +} diff --git a/twe/func_npc.php b/twe/func_npc.php index 8233a7e7..045e78d3 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -937,7 +937,7 @@ function SetCrew($connect, $no, $personal, $gold, $leader, $genType, $tech, $reg $gold -= 200; // 사기비용 - $cost = getCost($connect, $type) * getTechCost($tech); + $cost = getCost($type) * getTechCost($tech); $cost = CharCost($cost, $personal); $crew = floor($gold / $cost); diff --git a/twe/func_process.php b/twe/func_process.php index fffbff89..f37c740b 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -767,7 +767,7 @@ function process_11($connect, &$general, $type) { if($crew*100 + $general['crew'] > (floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100) { $crew = round(((floor($general['leader'] * (100 - $general['injury'])/100)+getHorseEff($general['horse'])+$lbonus)*100 - $general['crew'])/100, 0); } if($crew < 0) { $crew = 0; } - $cost = $crew * getCost($connect, $armtype); + $cost = $crew * getCost($armtype); //기술로 가격 $cost *= getTechCost($nation['tech']); //성격 보정 diff --git a/twe/func_template.php b/twe/func_template.php new file mode 100644 index 00000000..ff93547e --- /dev/null +++ b/twe/func_template.php @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; +} + +function CoreTurnTable() { + return " + +"; +} + + +function allButton() { + + global $_basecolor2; + $npcmode = newDB()->queryFirstField("select npcmode from game where no='1'"); + if($npcmode == 1) { + $site = "a_npcList.php"; + $call = "빙의일람"; + } else { + $site = "a_vote.php"; + $call = "설문조사"; + } + + return " + + + + + + + + + + + + + + + + + + + + + +
"; +} + + +function commandButton() { + global $_basecolor, $_basecolor2; + + $generalID = getGeneralID(); + + if($generalID === NULL){ + return ''; + } + $db = newDB(); + + $me = $db->queryFirstRow("select skin,no,nation,level,belong from general where user_id=%i", $generalID); + + $nation = $db->queryFirstRow("select nation,color,secretlimit from nation where nation=%i",$me['nation']); + + if($nation['color'] == "") { $nation['color'] = "000000"; } + + $result = ''; + $result .= " + + "; + + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 5) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { $result .= ""; } + else { $result .= ""; } + $result .= ""; + $result .= ""; + $result .= " + +
【회 의 실】【기 밀 실】【부대 편성】【인 사 부】【내 무 부】【사 령 부】【암 행 부】
"; + + $result .= " + + "; + + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + if($me['level'] >= 1) { $result .= ""; } + else { $result .= ""; } + $result .= ""; + $result .= ""; + if($me['level'] >= 2 || ($me['level'] == 1 && $me['belong'] >= $nation['secretlimit'])) { $result .= ""; } + else { $result .= ""; } + $result .= ""; + $result .= ""; + $result .= " + +
【세력 정보】【세력 도시】【세력 장수】【국 법】【감 찰 부】
"; + + return $result; +} diff --git a/twe/main.php b/twe/main.php index fb0d27dc..c51b66e0 100644 --- a/twe/main.php +++ b/twe/main.php @@ -80,7 +80,7 @@ $scenario = getScenario();